From 03c9e5a758fc7e0836c1a9b6714b4e40ba452f02 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 18 Jul 2012 12:41:53 +0200 Subject: [PATCH] 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). --- src/LaTeXFeatures.cpp | 10 ++++++++-- status.20x | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 1d4f31cebf..236a7d3431 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -979,7 +979,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"; } @@ -995,7 +998,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"; } diff --git a/status.20x b/status.20x index 3a655adb58..421cacd061 100644 --- a/status.20x +++ b/status.20x @@ -76,7 +76,7 @@ What's new - Export correct language change commands if document contains different CJK languages (bug 8215). -- Fix bug that Elsevier docments became uncompilable when using refstlye for +- Fix bug that Elsevier documents became uncompilable when using refstlye for cross-references. - Fixed the layout file for scientific articles published by the American @@ -84,6 +84,9 @@ What's new - Write correct DTD for MathML (bug #8160). +- Embrace babel settings to \makeatletter ... \makeatother if they contain + an @ glyph. + * USER INTERFACE -- 2.39.5