]> git.lyx.org Git - features.git/commitdiff
Fix for recent luatex versions.
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 9 Jul 2016 14:45:27 +0000 (16:45 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 4 Sep 2016 15:35:11 +0000 (17:35 +0200)
src/LaTeXFeatures.cpp
status.22x

index c66d66b3ed0143b9113de0a350e86313bd291b6a..23f1682aeb1c1c8687820a18a90ca7955d5963c8 100644 (file)
@@ -229,6 +229,13 @@ static docstring const papersizepdf_def = from_ascii(
        "\\pdfpageheight\\paperheight\n"
        "\\pdfpagewidth\\paperwidth\n");
 
+static docstring const papersizepdflua_def = from_ascii(
+       "% Backwards compatibility for LuaTeX < 0.90\n"
+       "\\@ifundefined{pageheight}{\\let\\pageheight\\pdfpageheight}\n"
+       "\\@ifundefined{pagewidth}{\\let\\pagewidth\\pdfpagewidth}\n"
+       "\\pageheight\\paperheight\n"
+       "\\pagewidth\\paperwidth\n");
+
 static docstring const cedilla_def = from_ascii(
        "\\newcommand{\\docedilla}[2]{\\underaccent{#1\\mathchar'30}{#2}}\n"
        "\\newcommand{\\cedilla}[1]{\\mathpalette\\docedilla{#1}}\n");
@@ -1169,8 +1176,11 @@ docstring const LaTeXFeatures::getMacros() const
        }
 
        if (mustProvide("papersize")) {
-               if (runparams_.flavor == OutputParams::LATEX)
+               if (runparams_.flavor == OutputParams::LATEX
+                   || runparams_.flavor == OutputParams::DVILUATEX)
                        macros << papersizedvi_def << '\n';
+               else if  (runparams_.flavor == OutputParams::LUATEX)
+                       macros << papersizepdflua_def << '\n';
                else
                        macros << papersizepdf_def << '\n';
        }
index 327f979cd43261c33240286cfbdd7760aa0e8c03..6bcc7a156ecd92e6893ad753f21d69776e5888d0 100644 (file)
@@ -63,6 +63,8 @@ What's new
 - Fix error with older versions of the covington package in the
   Linguistics module (bug 10340).
 
+- Fix LaTeX error with recent LuaTeX versions when using landscape.
+
 
 * LYX2LYX