LyX, Non-TeX-Fonts and export with pandoc
Tobias Hilbricht
hilbricht at linopus.de
Sat Nov 18 18:24:56 UTC 2023
Am Samstag, dem 18.11.2023 um 12:46 -0500 schrieb Richard Kimberly
Heck:
> On 11/18/23 07:18, Tobias Hilbricht wrote:
> >
> > But when I check that box and want to use Non-TeX-Fonts, the export
> > option to docx or odt via pandoc disappears.
>
> The reason for this is that, if you use non-TeX fonts, then the
> immediate export is to a file that would be compiled with XeLaTeX or
> LuaTeX, and there is no converter defined to convert that format to
> ODT
> or whatever.
Now that you write it it is quite clear, but it did not occur to me
when looking at Settings - Converter ...
>
> The solution is to define one. This is easiest done I think in the
> configuration files themselves rather than in LyX. Find your user
> directory and open the file lyxrc.defaults. In there, you will find a
> line like:
>
> \converter latex odt3 "pandoc -s -f latex -o $$o -t odt
> $$i" ""
>
> Copy it and open the file preferences. Paste twice but change it to:
>
> \converter xetex odt3 "pandoc -s -f latex -o $$o -t odt
> $$i" ""
> \converter luatex odt3 "pandoc -s -f latex -o $$o -t odt
> $$i" ""
>
> Save that file and open LyX. Should work, but not tested. The same
> kind
> of thing will work for Word formats.
A quick test with a simple LyX-document produced docx- and odt-output
without errors and with the expected formatting.
>
> There may be some reason we do not include this by default: Perhaps
> pandoc is liable to choke on something we output in those modes.
> Hopefully, someone else will know. But I'm guessing it's an
> oversight.
>
I can understand that and will see how far I can get. Thank you for
your advice!
Tobias
More information about the lyx-users
mailing list