MacTeX Install - Final Data Point
Bruno Voisin
bvoisin at icloud.com
Sun Feb 23 23:31:55 CET 2025
> Frank Mittelbach wrote:
>
> wouldn't it in that case perhaps not better not to generate the formats
> at all and let the post install handle that (after the papersize default
> has been determined)? This way there woul be only a single format
> generation - no?
The MacTeX postinstall script
(1) first determines the paper size from the System Settings, and sets it for TeX, with
# Set the default paper size according to the user's preference.
# The install package is constructed in the US, and default paper size is "letter". Note that
# resetting paper size also rebuilds formats. So MacTeX will make formats for most users.
# The lucky few who avoid that step are running Intel machines and using letter paper; they use the
# prebuilt formats.
PAPER=$(sudo -u $USER osascript -e 'use framework "Cocoa"' -e "set pinfo to current application's NSPrintInfo's sharedPrintInfo()" -e "return pinfo's paperName() as text" | sed -E 's/^na-//g' | sed -E 's/^iso-//g')
PATH=/usr/local/texlive/2025/bin/universal-darwin:$PATH; export PATH
echo "### setting default paper size $PAPER"
if [[ "$PAPER" == "a4" ]]; then
/usr/local/texlive/2025/bin/universal-darwin/tlmgr paper $PAPER
fi
(2) then at the end builds all the formats, with
/usr/local/texlive/2025/bin/universal-darwin/fmtutil-sys --all
The TeX Live install script, install-tl, does things in a similar way, setting the paper size at some point, then building the formats at the end. In order to avoid building the formats when it sets the paper size, it uses
> # letter instead of a4
> if ($vars{'instopt_letter'}) {
> # set paper size, but do not execute any post actions, which in this
> # case would be mktexlsr and fmtutil-sys -all; clearly premature
> # here at this point in the installer.
> info("setting default paper size to letter:\n");
> $errcount += run_postinst_cmd("tlmgr --no-execute-actions paper letter");
> }
So it looks like the tlmgr option --no-execute-actions would provide precisely what we're looking for.
In other words, changing the above to
if [[ "$PAPER" == "a4" ]]; then
/usr/local/texlive/2025/bin/universal-darwin/tlmgr --no-execute-actions paper $PAPER
fi
might solve the problem.
Bruno
More information about the tex-live
mailing list.