davidcarlisle / dpctex

Assorted TeX packages
94 stars 30 forks source link

[textcase] When \NoCaseChange{} is used in \MakeUppercase{}, \o is left capitalized #35

Closed GAndreikenas closed 2 years ago

GAndreikenas commented 2 years ago

Hello,

I've got the following issue: the title of journal's article should be capitalized, text from \thanks{} inside the \title{} is \NoCaseChangeed, but \o is still capitalized. Here is MWE:

\documentclass{article}
\usepackage{textcase}

\makeatletter
\def\title#1{\gdef\@title{\MakeUppercase{#1}}}
\let\case@thanks\thanks
\def\thanks#1{\NoCaseChange{\case@thanks{#1}}}
\makeatother

\begin{document}
\title{My title\thanks{Thanks to Hedda Hassel M\o rch}}
\author{My Name}
\maketitle
\end{document}

Thanks, Giedrius

davidcarlisle commented 2 years ago

With a current release textcase does nothing and if I delete it I get

image

from

\documentclass{article}

\makeatletter
\def\title#1{\gdef\@title{\MakeUppercase{#1}}}
\let\case@thanks\thanks
\def\thanks#1{\NoCaseChange{\case@thanks{#1}}}
\makeatother

\begin{document}
\title{My title\thanks{Thanks to Hedda Hassel M\o rch}}
\author{My Name}
\maketitle
\end{document}

In older LaTeX releases you would have needed to use MakeTextUppercase rather than MakeUppercase to have any effect or use the [overload] package option.

As textcase 2022/07/10 v1.03 does nothing at all in current Latex and the new MakeUppercase (which is generally Unicode-aware) seems to work here, I think I can close with no action?

GAndreikenas commented 2 years ago

Unfortunately, with TL2019 MakeTextUppercase does not solve the problem - \o stays capitalized.

davidcarlisle commented 2 years ago

I may be able to suggest something but not really here the package here does nothing now (as \NoCaseChange is built in to latex now, and your problem is fixed there) and any change I make here or on ctan would only go to texlive 2022 and later.

if you use OT1 (as in your example) \o is

\DeclareTextSymbol{\o}{OT1}{28} so you could use \symbol{28}

in T1 encoding it is

\DeclareTextSymbol{\o}{T1}{248} so you could use \symbol{248}

GAndreikenas commented 2 years ago

Thanks for the help.