Fix bug 2721

http://bugzilla.lyx.org/show_bug.cgi?id=2721


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@25410 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2008-07-01 12:50:54 +00:00
parent f84d8c405f
commit b3e09e7bd3
3 changed files with 18 additions and 0 deletions

View File

@ -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(),

View File

@ -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';

View File

@ -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