Loading keyval does not work any longer. Fix it properly by de-activating
the equal character locally if graphics options use it.
This commit is contained in:
Juergen Spitzmueller 2019-08-14 14:49:38 +02:00
parent f995fba310
commit 1929caf4b7
2 changed files with 15 additions and 9 deletions

View File

@ -1007,6 +1007,7 @@ Language latin
GuiName "Latin"
BabelName latin
PolyglossiaName latin
ActiveChars ^=
Encoding iso8859-15
FontEncoding T1|OT1
LangCode la_LA
@ -1471,13 +1472,11 @@ Language turkish
BabelName turkish
PolyglossiaName turkish
QuoteStyle english
ActiveChars =
Encoding iso8859-9
FontEncoding T1|OT1
LangCode tr_TR
DateFormats "d MMMM yyyy|dd.MMM.yyyy|dd.MM.yyyy"
PostBabelPreamble
\usepackage{xkeyval}
EndPostBabelPreamble
End
# turkmen must be loaded locally with babel options,

View File

@ -841,18 +841,25 @@ void InsetGraphics::latex(otexstream & os,
string before;
string after;
if (runparams.moving_arg)
before += "\\protect";
// We never use the starred form, we use the "clip" option instead.
before += "\\includegraphics";
// Write the options if there are any.
bool const ps = runparams.flavor == OutputParams::LATEX
|| runparams.flavor == OutputParams::DVILUATEX;
string const opts = createLatexOptions(ps);
LYXERR(Debug::GRAPHICS, "\tOpts = " << opts);
if (contains(opts, '=') && contains(runparams.active_chars, '=')) {
// We have a language that makes = active. Deactivate locally
// for keyval option parsing (#2005).
before = "\\begingroup\\catcode`\\=12";
after = "\\endgroup";
}
if (runparams.moving_arg)
before += "\\protect";
// We never use the starred form, we use the "clip" option instead.
before += "\\includegraphics";
if (!opts.empty() && !message.empty())
before += ('[' + opts + ',' + message + ']');
else if (!opts.empty() || !message.empty())