0

I used to slightly adjust my font size with \patchcmd{\normalsize}. Consider this code:

\documentclass[11pt]{memoir}
\usepackage{etoolbox,lipsum}

\makeatletter
\patchcmd{\normalsize}{\@xipt}{{30pt}}{}{} % 30pt only for testing purpose!
\normalsize
\makeatother

\begin{document}
\lipsum
\end{document}

If I compile it with LuaLaTeX (or XeLaTeX, or pdfLaTeX) 2021 or older, the text is resized; with TL 2022 it is not.

I'm using Overleaf, so I wonder if the reason is a change (or a bug) within TL 2022 as such, or its implementation in Overleaf.

1 Answer 1

2

In the meantime, \normalsize has become a robust command, so \patchcmd is trying to patch the wrong command, namely the “surface” one rather than the one with the real code.

You shouldn't be patching \normalsize, actually: use instead a modern package such as fontsize.

Anyway, you can do with the patch with xpatch.

\documentclass[11pt]{memoir}
\usepackage{xpatch,lipsum}

\makeatletter
\xpatchcmd{\normalsize}{\@xipt}{{30pt}}{}{} % 30pt only for testing purpose!
\makeatother

\begin{document}
\lipsum
\end{document}

Note that \normalsize after the patch is completely useless, as \normalsize (in the patched version) will be issued at begin document.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .