Re: Setting papersize in reference cards
David Carlisle <[email protected]> Fri, 8 Aug 2025 21:59:34 +0100
| Newsgroups | gmane.comp.tex.texhax |
|---|---|
| Message-ID | <CAEW6iOi4RAS=t6c4mp-wowAyavmfU1qTvsdGke=DkQxd7pY5=w@mail.gmail.com> |
On Fri, 8 Aug 2025 at 18:44, Vincent Lefevre <[email protected]> wrote: > On 2025-08-07 17:43:26 +0200, Ulrike Fischer wrote: > > But the patch looks wrong. The lines above uses for pdftex the > > length \totalwidth + \totalheight so why does the \special set > > landscape letterpaper? > > In my patch, I just copied the values of \totalwidth and \totalheight, > so this was equivalent (I did not know that I had to use \the, and > since PARI's refcard uses hardcoded values, I did the same thing). > > > --- a/gdb/doc/refcard.tex > > +++ b/gdb/doc/refcard.tex > > @@ -100,6 +100,7 @@ > > \pdfpagewidth=\totalwidth % width of paper in pdf output > > \pdfpageheight=\totalheight % height of paper in pdf output > > \fi > > +\special{papersize=11in,8.5in} % for dvi output > > > > I would have expected > > \special{papersize=\the\totalwidth,\the\totalheight} > > > > Also the placement after \fi looks wrong, that looks as if the > > special is also set if pdftex without output mode pdf is used. > > This is what is done in PARI's refcard, so I thought that I had > to use it unconditionally. There were no issues when generating > the PDF file. > There are issues, the incorrect placement produces the warning Non-PDF special ignored! admittedly as the special is ignored it does no harm but it would be better to place it in an \else clause so you either do the \pdfpagewidth setting or the \special not both (and use the same values in both cases) David > > -- > Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> > 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> > Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon) >