Nikos Chantziaras wrote: > Hm, LyX generated this LaTeX code when exporting to "LaTeX (XeTeX)": > > [...] > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. > \renewcommand{\figurename}{Xaxa}% > > \makeatother > > \usepackage{xunicode} > \usepackage{polyglossia} > \setdefaultlanguage{greek} > \setotherlanguage{english} > \addto\captionsenglish{\renewcommand{\figurename}{Figure}} > \addto\captionsgreek{\renewcommand{\figurename}{Figure}} > > \begin{document} > [...] > > I'm confused. Why does LyX change \figurename to "Figure" on its own?
This is indeed not necessary. We can safely assume that babel and polyglossia translate the builtin floats and thus skip them in getTClassI18nPreamble. The attached patch does this. Georg, do you object? Jürgen
Index: src/LaTeXFeatures.cpp =================================================================== --- src/LaTeXFeatures.cpp (Revision 37965) +++ src/LaTeXFeatures.cpp (Arbeitskopie) @@ -1197,6 +1197,9 @@ UsedFloats::const_iterator fend = usedFloats_.end(); for (; fit != fend; ++fit) { Floating const & fl = floats.getType(fit->first); + // we assume builtin floats are translated + if (fl.isPredefined()) + continue; docstring const type = from_ascii(fl.floattype()); docstring const flname = from_utf8(fl.name()); docstring name = translateIfPossible(flname,