Hi, I have one particular org file that I would like to export to PDF by way of ODT. (I already set up outline styling in LibreOffice and I would like to use that, instead of trying to reconfigure a similar look in LaTeX. For fun, I did try the LaTeX pdf export and the output format is not what I need for this case.) But I may want to export other org files to ODT *without* converting them to PDF. http://orgmode.org/manual/Extending-ODT-export.html This says I can customize the org-export-odt-preferred-output-format variable. This works beautifully, but it's a global setting that will apply to every ODT export. So my question is -- is there any export option for the preferred format, per file? Something like: #+ODT_PREFERRED_FORMAT: pdf I couldn't find any documentation in the ODT export section of the manual for an option like this. Alternately, I suppose I could write a lisp function that would set the variable and call the export, but that would definitely be a hack. Thanks in advance, hjh -- James Harkins /// dewdrop world jamshark70@dewdrop-world.net http://www.dewdrop-world.net "Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal." -- Whitman blog: http://www.dewdrop-world.net/words audio clips: http://www.dewdrop-world.net/audio more audio: http://soundcloud.com/dewdrop_world/tracks
James Harkins <jamshark70@gmail.com> writes:
> Hi,
>
> I have one particular org file that I would like to export to PDF by
> way of ODT. (I already set up outline styling in LibreOffice and I
> would like to use that, instead of trying to reconfigure a similar
> look in LaTeX. For fun, I did try the LaTeX pdf export and the output
> format is not what I need for this case.)
>
> But I may want to export other org files to ODT *without* converting them to PDF.
>
> http://orgmode.org/manual/Extending-ODT-export.html
>
> This says I can customize the org-export-odt-preferred-output-format
> variable. This works beautifully, but it's a global setting that will
> apply to every ODT export.
>
> So my question is -- is there any export option for the preferred
> format, per file? Something like:
>
> #+ODT_PREFERRED_FORMAT: pdf
>
> I couldn't find any documentation in the ODT export section of the
> manual for an option like this.
>
> Alternately, I suppose I could write a lisp function that would set
> the variable and call the export, but that would definitely be a hack.
Old exporter
============
If you are using org-odt.el, then you can use file local variables. I
have pushed a fix which makes string values of this variable safe.
M-x add-file-local-variable RET org-export-odt-preferred-output-format
RET "pdf" RET
Or
Add the following to your Org file. Remember to re-visit the file to
activate the newly installed value.
# Local Variables:
# org-export-odt-preferred-output-format: "pdf"
# End:
New exporter
============
The above local variable trick will fail in case of org-e-odt.el. When
I get some time I will introduce a per-buffer keyword for this variable.
--
Jambunathan K <kjambunathan@gmail.com> writes:
> James Harkins <jamshark70@gmail.com> writes:
>
>> Hi,
>>
>> I have one particular org file that I would like to export to PDF by
>> way of ODT. (I already set up outline styling in LibreOffice and I
>> would like to use that, instead of trying to reconfigure a similar
>> look in LaTeX. For fun, I did try the LaTeX pdf export and the output
>> format is not what I need for this case.)
>>
>> But I may want to export other org files to ODT *without* converting them to PDF.
>>
>> http://orgmode.org/manual/Extending-ODT-export.html
>>
>> This says I can customize the org-export-odt-preferred-output-format
>> variable. This works beautifully, but it's a global setting that will
>> apply to every ODT export.
>>
>> So my question is -- is there any export option for the preferred
>> format, per file? Something like:
>>
>> #+ODT_PREFERRED_FORMAT: pdf
>>
>> I couldn't find any documentation in the ODT export section of the
>> manual for an option like this.
>>
>> Alternately, I suppose I could write a lisp function that would set
>> the variable and call the export, but that would definitely be a hack.
>
> Old exporter
> ============
>
> If you are using org-odt.el, then you can use file local variables. I
> have pushed a fix which makes string values of this variable safe.
>
> M-x add-file-local-variable RET org-export-odt-preferred-output-format
> RET "pdf" RET
>
> Or
>
> Add the following to your Org file. Remember to re-visit the file to
> activate the newly installed value.
>
> # Local Variables:
> # org-export-odt-preferred-output-format: "pdf"
> # End:
>
>
> New exporter
> ============
>
> The above local variable trick will fail in case of org-e-odt.el. When
> I get some time I will introduce a per-buffer keyword for this
> variable.
I was wrong about the new exporter - org-e-odt.el.
I didn't realize I need to change variable name. One should use the new
`org-e-odt-preferred-output-format' instead.
--
Hi Jambunathan,
Jambunathan K <kjambunathan@gmail.com> writes:
> I was wrong about the new exporter - org-e-odt.el.
>
> I didn't realize I need to change variable name. One should use the new
> `org-e-odt-preferred-output-format' instead.
Thanks for the fix you pushed wrt this!
Best,
--
Bastien
# Local Variables: # org-export-odt-preferred-output-format: "pdf" # End: This is a great help, thanks. Will pull and try it tonight. I suppose I must be using the old exporter, since the variable without -e- enabled PDF conversion. That's working fine for me, but I should probably look into the new exporter (assuming the old one will be removed sometime). Good to know how to do it in both cases. Thanks again! hjh
Hello,
Jambunathan K <kjambunathan@gmail.com> writes:
> James Harkins <jamshark70@gmail.com> writes:
>
>> I have one particular org file that I would like to export to PDF by
>> way of ODT. (I already set up outline styling in LibreOffice and I
>> would like to use that, instead of trying to reconfigure a similar
>> look in LaTeX. For fun, I did try the LaTeX pdf export and the output
>> format is not what I need for this case.)
>>
>> But I may want to export other org files to ODT *without* converting them to PDF.
>>
>> http://orgmode.org/manual/Extending-ODT-export.html
>>
>> This says I can customize the org-export-odt-preferred-output-format
>> variable. This works beautifully, but it's a global setting that will
>> apply to every ODT export.
>>
>> So my question is -- is there any export option for the preferred
>> format, per file? Something like:
>>
>> #+ODT_PREFERRED_FORMAT: pdf
>>
>> I couldn't find any documentation in the ODT export section of the
>> manual for an option like this.
>>
>> Alternately, I suppose I could write a lisp function that would set
>> the variable and call the export, but that would definitely be a hack.
>
> Old exporter
> ============
>
> If you are using org-odt.el, then you can use file local variables. I
> have pushed a fix which makes string values of this variable safe.
>
> M-x add-file-local-variable RET org-export-odt-preferred-output-format
> RET "pdf" RET
>
> Or
>
> Add the following to your Org file. Remember to re-visit the file to
> activate the newly installed value.
>
> # Local Variables:
> # org-export-odt-preferred-output-format: "pdf"
> # End:
>
>
> New exporter
> ============
>
> The above local variable trick will fail in case of org-e-odt.el. When
> I get some time I will introduce a per-buffer keyword for this variable.
Note that Org provides a BIND mechanism for such cases.
So, adding:
#+BIND: org-e-export-opt-preferred-output-format "pdf"
somewhere in the buffer should be enough.
Regards,
--
Nicolas Goaziou