diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 9432a81240..3cf24fce7b 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1026,6 +1026,8 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features, os << ",footskip=" << from_ascii(Length(footskip).asLatexString()); os << "}\n"; texrow.newline(); + } else if (orientation == ORIENTATION_LANDSCAPE) { + features.require("papersize"); } if (tokenPos(tclass.opt_pagestyle(), diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 7fe85818b1..d407570402 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -197,6 +197,13 @@ static string const textcyr_def = "\\DeclareRobustCommand{\\textcyr}[1]{\\leavevmode{\\cyrtext #1}}\n" "\\AtBeginDocument{\\DeclareFontEncoding{T2A}{}{}}\n"; +static string const papersizedvi_def = + "\\special{papersize=\\the\\paperwidth,\\the\\paperheight}\n"; + +static string const papersizepdf_def = + "\\pdfpageheight\\paperheight\n" + "\\pdfpagewidth\\paperwidth\n"; + ///////////////////////////////////////////////////////////////////// // @@ -633,6 +640,12 @@ string const LaTeXFeatures::getMacros() const macros << *pit << '\n'; } + if (mustProvide("papersize")) + if (runparams_.flavor == OutputParams::LATEX) + macros << papersizedvi_def << '\n'; + else + macros << papersizepdf_def << '\n'; + if (mustProvide("LyX")) macros << lyx_def << '\n'; diff --git a/status.15x b/status.15x index 104a282098..ea3c3a57ad 100644 --- a/status.15x +++ b/status.15x @@ -79,6 +79,9 @@ What's new - Fix LaTeX export of combining characters in utf-8* encodings (bug 4946). +- Output paper size info to produced dvi or pdf documents when using landscape + orientation, such that viewers can properly display them (bug 2721). + * USER INTERFACE