X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeXFeatures.cpp;h=1629186280413fe8ba5d87bcd18f183f107ed095;hb=489b80aef4d7904d667aeb06a32f2cc4ecbb75fa;hp=87330325617716021753fe2727b51a66d26ed00d;hpb=8b793d88b54492dba908c3e20b9270a3d5755978;p=lyx.git diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 8733032561..1629186280 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -200,8 +200,7 @@ static docstring const textgreek_def = from_ascii( " \\fontencoding{LGR}\\selectfont\\def\\encodingdefault{LGR}%\n" " \\renewcommand{\\~}{\\perispomeni}%\n" "}}\n" - "\\DeclareRobustCommand{\\textgreek}[1]{\\leavevmode{%\n" - " \\IfFileExists{grtm10.tfm}{}{\\fontfamily{cmr}}\\greektext #1}}\n" + "\\DeclareRobustCommand{\\textgreek}[1]{\\leavevmode{\\greektext #1}}\n" "\\DeclareFontEncoding{LGR}{}{}\n"); static docstring const textcyr_def = from_ascii( @@ -805,8 +804,19 @@ docstring const LaTeXFeatures::getMacros() const if (mustProvide("lyxarrow")) macros << lyxarrow_def << '\n'; - if (mustProvide("textgreek")) - macros << textgreek_def << '\n'; + if (mustProvide("textgreek")) { + // Avoid a LaTeX error if times fonts are used and the grtimes + // package is installed but actual fonts are not (bug 6469). + if (params_.fontsRoman == "times") + macros << subst(textgreek_def, + from_ascii("\\greektext #1"), + from_ascii("%\n \\IfFileExists" + "{grtm10.tfm}{}{\\fontfamily" + "{cmr}}\\greektext #1")) + << '\n'; + else + macros << textgreek_def << '\n'; + } if (mustProvide("textcyr")) macros << textcyr_def << '\n';