See below. Is there a reason we do not include this? or is it just an
oversight?
Riki
On 11/18/23 07:18, Tobias Hilbricht wrote:
Dear readers of this list,
I am referring to LyX 2.3.7 on Ubuntu 22.04 and pandoc 2.9.2.1:
I am able to export documents from LyX to docx or odt by means of
pandoc when I use TeX-Fonts (that is, the box "Do not use TeX-Fonts
(via XeteX or LuaTeX)" is *not* checked).
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.
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.
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.
Riki
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel