mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Add \makeat switches to babel settings if necessary.
Babel settings might contain @ characters. Check for this and wrap the settings into \makeatletter ... \makeatother switches if necessary (see discussion at #8265).
This commit is contained in:
parent
467422f9df
commit
4d5bef1bdc
@ -1026,7 +1026,10 @@ string const LaTeXFeatures::getBabelPresettings() const
|
||||
if (!params_.language->babel_presettings().empty())
|
||||
tmp << params_.language->babel_presettings() << '\n';
|
||||
|
||||
return tmp.str();
|
||||
if (!contains(tmp.str(), '@'))
|
||||
return tmp.str();
|
||||
|
||||
return "\\makeatletter\n" + tmp.str() + "\\makeatother\n";
|
||||
}
|
||||
|
||||
|
||||
@ -1042,7 +1045,10 @@ string const LaTeXFeatures::getBabelPostsettings() const
|
||||
if (!params_.language->babel_postsettings().empty())
|
||||
tmp << params_.language->babel_postsettings() << '\n';
|
||||
|
||||
return tmp.str();
|
||||
if (!contains(tmp.str(), '@'))
|
||||
return tmp.str();
|
||||
|
||||
return "\\makeatletter\n" + tmp.str() + "\\makeatother\n";
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user