Bulk changing environments in Lyx

Udicoudco udifoglle at gmail.com
Thu Apr 20 00:24:09 UTC 2023


On Thu, Apr 20, 2023 at 2:10 AM Steve Litt <slitt at troubleshooters.com> wrote:
>
> Dr Paul Verschueren said on Tue, 18 Apr 2023 15:12:10 +0000
>
> >Dear all -
> >I just had to change the AMS document type for a long paper.
>
> Does long paper really require a change of doctype? I think you can do
> what you need by putting the following two lines in your
> Docuument=>settings=>Latex_preamble:
>
> ================================================
> \pageheight=14in %Paper height
> \pagewidth=8.5in  %Paper width
> ================================================
>
> The preceding works as long as you compile with luatex, which is the
> best way to compile anyway. I don't know about the AMS document type,
> but my best guess would be it would accommodate the preceding.
> Naturally you'd need to change all the margins in LyX, but that's easy.
>
>

The primitives macros called \pageheight and \pagewidth are not
responsible for the size of the text block, they are only changing
the size of the media box that the pdf reader displays.

They were first introduced in pdftex
(where they are called \pdfpageheight
and \pdfpagewidth, and in xetex as well)
since the pdf format is not meant to be used
just for printing.

On the other hand, LaTeX is using
two macros called \paperheight and \paperwidth
to control the text block (they are basically \textwidth and \textheight
plus some extra space for the margins).

Some driver aware packages (such as geometry) are setting
\(pdf)pageheight and \(pdf)pagewidth to be equal to \paperheight and
\paperwidth, but this is not done by default (I think that I saw LyX 2.4
adds \(pdf)pageheight\(pdf)paperheight in the preamble in some cases).

In any case I think the best approach to modify the geometry of the page
is to use the geometry package, this way you won't have to change the code
depending on the engine or driver that you use to convert your files.
>
> --
> lyx-users mailing list
> lyx-users at lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users


More information about the lyx-users mailing list