-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\MakeUppercase in toc breaks microtype with latex 2022+ #29
Comments
Oh, I wasn't aware that \MakeUppercase now also accepts an optional argument. Could you try with: \def\MT@prot@check@C{%
\ifx\MT@prot@l\MT@prot@l@tc
\def\MT@temp*{\MT@exp@one@n\MT@prot@l{\the\MT@toks}}%
\else
\let\MT@prot@l\MT@prot@l@tc
\def\MT@temp*##1{%
\the\MT@toks
\MT@toks{}%
\@ifnextchar[%
{\MT@prot@check@C@##1}%
{\MT@prot@check@C@##1[]}%
}%
\fi
}
\def\MT@prot@check@C@#1[#2]#3{%
\MT@ifempty{#2}{%
\let\MT@maybe@textcmd#1%
\MT@prot@toks{#1{#3}}%
}{%
\def\MT@maybe@textcmd{#1[#2]}%
\MT@prot@toks{#1[#2]{#3}}%
}
\MT@prot@get@firstgroup@tc#3\MT@nil
}
\patchcmd\MT@prot@check@cmds{{F\MakeUppercase}{F\MakeLowercase}}{{C\MakeUppercase}{C\MakeLowercase}}{}{}
\patchcmd\MT@prot@check@cmds{{F\MakeTitlecase}}{{C\MakeTitlecase}}{}{} |
Yes, that seems to take care of it, thanks. I also wasn't aware of the optional argument, don't know what it does, and wasn't trying to use it; it was autogenerated in the .toc file for some reason. |
Hi there! It's been ⅓ of a year since the fix was pushed to the Some document classes (such as |
I need to second this -- is a release planned any time soon? I'm not sure if this is also related to issue 31, but we're seeing changes that we didn't expect since March. |
I'm also -- and possibly any other Arch Linux user trying to use abntex2 with microtype -- stuck with this same issue. |
Just to give some background information… Any academic work published in Brazil should follow the standards defined by the ABNT association. To help with that, someone wrote the abnt package, but it seems unmaintained. There is also abntex2, which seems way more active, better maintained, and with more documentation. Unfortunately, anyone using People using "bleeding edge" Linux distributions (like Arch Linux, or Debian testing/unstable) are the canaries in a coal mine. Since we are using the latest versions, we detect issues before they trickle down to "stable" distributions that are usually stuck in older versions for a long period. And that's why I believe a new version should be released soon (assuming there are no further known bugs/regressions). Whenever those "stable" distros get stuck with an older version, it takes considerably more effort to convince them to update, and it affects many more people (at least one order of magnitude more). |
I've also just suffered from the same problem here. I'm glad I've found this issue, because tracking down latex errors is a bit hard for me and I need to write a proposal using abntex2 and Overleaf isn't an option for me. |
sorry everybody for the long delay! |
Consider the following MWE:
For pre-2022 latex (I'm using texlive 2021) this compiles fine with any of {pdflatex,xelatex,lualatex}, and generates the .toc file
\contentsline {chapter}{\hbox to\@tempdima {0.\hfil }\leftprotrusion \MakeUppercase {Test}}{1}{}%
A second compile to update the toc completes without error. In texlive 2022, however, the following .toc is generated:
\contentsline {chapter}{\hbox to\@tempdima {0.\hfil }\leftprotrusion \MakeUppercase []{Test}}{1}{}%
Note the additional
[]
. A second compilation now generates the errorIt would seem that \leftprotrusion does not like the empty optional argument to \MakeUppercase. I am able to work around this using the
nopatch=toc
option in microtype v3.1, which eliminates the\leftprotrusion
from the .toc, but reporting here since this doesn't seem like intended behavior.The text was updated successfully, but these errors were encountered: