#1079786 texlive-latex-base: buggy testpage.tex: missing \usepackage{geometry}

#1079786#5
Date:
2024-08-27 11:31:37 UTC
From:
To:
I've tried

  pdflatex /usr/share/texlive/texmf-dist/tex/latex/base/testpage.tex

under Debian/unstable (TeX Live packages 2024.20240706-1) with

\papertype=a5paper
\doublesided=n

(when asked to the question).

The contents assume A5, but the paper size itself is still A4
(thus with blanks on the right and at the bottom), and pdfinfo
says:

Page size:       595.276 x 841.89 pts (A4)

\usepackage{geometry} should be added after the
\documentclass[\papertype]{article} line to fix the issue.

According to the TeX Live mailing-list, this is a Debian-specific
issue.

#1079786#10
Date:
2024-08-27 13:44:13 UTC
From:
To:
To quote from https://texfaq.org/FAQ-papergeom

This is the core problem.

You **always** need to have to set a lot of parameters, see the geometry
package documentation.

None of the above commands does anything in this direction, so the
default physical paper size is used, which is set via paperconf.

What youare asking is a fix to testpage.tex, to use geometry or some
other ways to set the *physical* page size. But that is as said not the
basic assumption. You can use testpage, and then print it on the correct
page size.

paperconf is Debian specific, so the default physical page size setup is
Debian specific (TeX defaults to letter).

The testpage.tex itself is what it is.

Best regards

Norbert

#1079786#15
Date:
2024-08-28 15:15:35 UTC
From:
To:
The goal of testpage.tex is to match the output to the physical
page size, and the default paper size must *not* be used since the
file explicitly asks for a paper size. Hence the need for a fix.
However, TeX uses a system-level default only. For instance, with

  PAPERSIZE=a5 pdflatex /usr/share/texlive/texmf-dist/tex/latex/base/testpage.tex

the generated PDF file still has the A4 page size, because A4 is still
the system-level default for TeX.

Changing the paperconf default has the effect of reconfiguring the TeX
defaults, like that:

Replacing config file /etc/papersize with new version
tl-paper: setting paper size for context to A4: /var/lib/texmf/tex/context/user/cont-sys-paper.tex
tl-paper: setting paper size for dvipdfmx to a4: /var/lib/texmf/dvipdfmx/dvipdfmx-paper.cfg
tl-paper: setting paper size for dvips to a4: /var/lib/texmf/dvips/config/config-paper.ps
tl-paper: setting paper size for pdftex to a4: /var/lib/texmf/tex/generic/tex-ini-files/pdftexconfig.tex
tl-paper: setting paper size for xdvi to a4: /var/lib/texmf/xdvi/XDvi-paper
Running mktexlsr. This may take some time... done.
Building format(s) --refresh.
        This may take some time... done.

(This may take several minutes.)

Said otherwise, the end user cannot choose the default for TeX
(not even statically).

BTW, the TeX-level configuration isn't even always consistent.
For instance, tl-paper was giving

Current context paper size (from /var/lib/texmf/tex/context/user/cont-sys-paper.tex): letter
Current dvipdfmx paper size (from /var/lib/texmf/dvipdfmx/dvipdfmx-paper.cfg): a4
Current dvips paper size (from /var/lib/texmf/dvips/config/config-paper.ps): a4
Current pdftex paper size (from /var/lib/texmf/tex/generic/tex-ini-files/pdftexconfig.tex): a4
Current xdvi paper size (from /var/lib/texmf/xdvi/XDvi-paper): a4

This is crap design.

#1079786#20
Date:
2024-08-29 04:59:04 UTC
From:
To:
Hi

Since this is a LaTeX base file, please sent your complaints to the
LaTeX team, they have an issue tracker.

Since when? I don't have paperconf available anymore, but when I wrote
the support code, there was only /etc/papersize ...

Yes, and I explained you why. There is no setup for physical papersize
done in testfile.tex.

Yes, I know.

On a per user basis. Yes, because this would require format dumps
per user, which is a pain, and will break practically every system
update.

You can set paper size per application. No problem with me. You probably
have done that at some point.

Or, the paper code parsing for context is broken.

One of the two things.

What would be a better design?

Instead of complaining on a problem that is a problem with LaTeX core
team document, and complaining about "crap design", what about
constructive input?

And dont forget, what about copying testpage.tex, and add the
	\usepackage{geometry}
and be happy?

Is that that hard?

Norbert