Am Freitag, 8. Juli 2016 um 18:14:29, schrieb Scott Kostyshak <skost...@lyx.org>
> On Fri, Jul 08, 2016 at 03:37:37PM +0200, Kornel Benko wrote:
> > Exporting to pdf(luatex) I get errors.
> >
> >      \pdfpageheight
> >                  \paperheight
> >     The control sequence at the end of the top line
> >     of your error message was never \def'ed. If you have
> >     misspelled it (e.g., `\hobx'), type `I' and the correct
> >     spelling (e.g., `I\hbox'). Otherwise just continue,
> >     and I'll forget about whatever was undefined.
> >
> > This is due to our preamble containing now
> >     \pdfpageheight\paperheight
> >     \pdfpagewidth\paperwidth
>
> I confirm. I brought this up on the LuaTeX list here:
> https://www.mail-archive.com/search?l=mid&q 
> 160516222738.agr4izmnpt2p3xzp%40cotopaxi
>
> and we've been discussing how to adapt LyX here:
> https://www.mail-archive.com/search?l=mid&q 
> 160520075810.yi3uspufehev5aln%40cotopaxi
>
> Scott

Ah, yes. Fading memory. I remembered after rereading. At that time I didn't 
have TL2016 installed,
so I forgot about the issue.

ATM, the patch I have works for me.

        Kornel
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 16ec4c1..602dd5f 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -226,8 +226,18 @@ static docstring const papersizedvi_def = from_ascii(
 	"\\special{papersize=\\the\\paperwidth,\\the\\paperheight}\n");

 static docstring const papersizepdf_def = from_ascii(
-	"\\pdfpageheight\\paperheight\n"
-	"\\pdfpagewidth\\paperwidth\n");
+	"\\RequirePackage{ifluatex}\n"
+	"\\ifluatex\n"
+	"  \\ifdim\\luatexversion pt> 94 pt\n"
+	"    \\usepackage{luatex85}\n"
+	"  \\else\n"
+	"    \\pdfpageheight\\paperheight\n"
+	"    \\pdfpagewidth\\paperwidth\n"
+	"  \\fi\n"
+	"\\else\n"
+	"  \\pdfpageheight\\paperheight\n"
+	"  \\pdfpagewidth\\paperwidth\n"
+	"\\fi\n");

 static docstring const cedilla_def = from_ascii(
 	"\\newcommand{\\docedilla}[2]{\\underaccent{#1\\mathchar'30}{#2}}\n"

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to