Am Freitag, 22. November 2013 um 23:21:09, schrieb Kornel Benko <kor...@lyx.org> > Am Freitag, 22. November 2013 um 21:52:45, schrieb Guenter Milde > <mi...@users.sf.net> > > On 2013-11-22, Kornel Benko wrote: > > ... > > > the following command seems not to export correctly: > > ... > > > #lyx -E xetex /tmp/xetextest/file.tex file.lyx > > > > > If I export the file from inside lyx (file->export-?latex(XeTeX)) > > > and then compare both created files > > > > > #diff /tmp/xetextest/file.tex file.tex > > > 4,9c4,7 > > >< \usepackage{fontspec} > > >< \setmainfont[Mapping=tex-text]{TeX Gyre Termes} > > >< \setsansfont[Mapping=tex-text]{TeX Gyre Heros} > > >< \setmonofont{TeX Gyre Cursor} > > > --- > > >> \usepackage{tgtermes} > > >> \usepackage{tgheros} > > >> \usepackage{tgcursor} > > >> \usepackage[T1]{fontenc} > > > 16a15 > > >> \usepackage{babel} > > > 25a25,26 > > > 201,204d201 > > >< \usepackage{polyglossia} > > > > One is using "non TeX fonts" while the other exports just as "normal" LaTeX. > > Both should work with XeTeX but usually "non TeX fonts" is intended when > > exporting for compiling with XeTeX. > > No. The one "non TeX fonts" is using e.g. "TeX Gyre Termes", which has ' ' in > name. > This prevents xetex from compile. > Here the message: > ... > (/usr/local/texlive/2013/texmf-dist/tex/latex/fontspec/fontspec.cfg)))kpathsea:make_tex: > Invalid fontname `TeX Gyre Termes', contains ' ' > > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > ! > ! fontspec error: "font-not-found" > ! > ! The font "TeX Gyre Termes" cannot be found. > ! > ! See the fontspec documentation for further information. > ! > ! For immediate help type H <return>. > !............................................... > > l.7 ...mainfont[Mapping=tex-text]{TeX Gyre Termes} > > > > > > > 223c220 > > >< (Dr. \textlatin{rer. nat.})} > > > --- > > >> (Dr. \foreignlanguage{latin}{rer. nat.})} > > > > It seems polyglossia uses "\textlatin" to change the language while with > > babel "\textlatin" ensures a font encoding supporting the Latin *script* is > > used. > > > > > > > The '-E' exported file is not compilable with xelatex, while the other is. > > > > What is the problem/error report with the -E exported file? > > Does this depend on the file or does it happen with all files? > > > > Günter > > > The problem is that it is not compilable. >
I traced it down to the point that useNonTexFonts becomes true. But first the scenario: FileMain.lyx: Main document with setting '\use_non_tex_fonts true' Some child documents referring to FileMain.lyx as main. Since I did not want to touch original document: In order to compile with xelatex, I made a copy of FileMain.lyx => FileMain_xe.lyx with setting '\use_non_tex_fonts false' Now the try to export with '-E' somehow evaluates the main document from childs and exports from FileMain.lyx. If I do #chmod 0 FileMain.lyx and repeat 'lyx -E xetex ...' then the export is OK. Now, that looks like a bug. Say, there are some childs referring each to different main (this should be valid or not?) The behaviour on export is now undefined from user point. Kornel
signature.asc
Description: This is a digitally signed message part.