Jean-François B.

Results 137 comments of Jean-François B.

Perhaps this fixes the two things: ``` \makeatletter \AddToHook{env/macrocode/begin}{\partopsep0pt\relax} \AddToHook{env/macrocode/after}{\@nobreakfalse} \makeatother ```

I see your point, but if you have 2 pages of macrocode after a section title and then comes the first comment, why should the distance of this comment to...

Thanks @FrankMittelbach for your detailed informative answer and sorry for (almost) duplicate (the `zlmtt` was a bit new). In the meantime I had become aware of the relevant ltnews33 entry...

I will gently ping the maintainer of zlmtt about this.

Rather than re-defining `\Hy@DisableOption`, I propose adding `\Hy@GloballyDisableOption` (basically the code as proposed by @muzimuzhi but with some `\Hy@` prefixes) then do this modification ``` \g@addto@macro\Hy@FirstPageHook{% \let\Hy@DisableOption\Hy@GloballyDisableOption \PDF@FinishDoc \global\let\PDF@FinishDoc\ltx@empty }...

by the way, the definition could be simply: ```tex \def\Hy@GloballyDisableOption#1{% \DisableKeyvalOption[package={hyperref},action={warning}]{Hyp}{#1}% } ``` because this acts by default globally. The warning message looks like this: ``` Package hyperref Warning: Option...

Alternative to all of the above (after checking at how `\DisableKeyvalOption` execute its by default global option) ```tex \def\Hy@FirstPageHook{% \PDF@FinishDoc \Hy@GlobalizeOption{pdfauthor}% \Hy@GlobalizeOption{pdftitle}% \Hy@GlobalizeOption{pdfsubject}% \Hy@GlobalizeOption{pdfcreator}% \Hy@GlobalizeOption{addtopdfcreator}% \Hy@GlobalizeOption{pdfcreationdate}% \Hy@GlobalizeOption{pdfmoddate}% \Hy@GlobalizeOption{pdfproducer}% \Hy@GlobalizeOption{pdfkeywords}% \Hy@GlobalizeOption{pdftrapped}%...

Update : the comma is of catcode 12 but `\xspace` does scantokens. Forgot to mention this from my old notes. I will change my title...

Indeed, and besides `\scantokens` as focused upon in my initial report due to `\xspace` internals, there is also the case of `\input`. Here is another mwe: ```latex \documentclass{article} \begin{filecontents*}{\jobname-1} \textbf{Preface}...

I do this after some digging: ``` \documentclass{article} %%%% \usepackage{etoolbox}% if using \patchcmd \usepackage{doc} \begin{document} \CodelineNumbered \MakePercentIgnore \makeatletter % Here is some code % \begin{macrocode} \def\foo{\bar} \def\bar{\foo} % \end{macrocode} %...