# amsbook improvement

Today it was the first time I tried amsbook class and I noticed a (possible?) bug (or should I say incompatibility?)

babel with brazil option translates Chapter to Capítulo. So note the accented letter.

Well, amsbook class produces CAPíTULO.

Checking line 990 in amsbook.cls we find

\uppercase\@xp{\chaptername}\enspace\thechapter}


and the upper case is the problem. (by the way, what is \@xp?)

OK, it is possible to redefine that part of \@makechapterhead to fix the problem but is there any chance to have an updated version of the class in the future?

MWE

\documentclass[11pt,a4paper]{amsbook}
\usepackage[brazil]{babel}

%% original code
\makeatletter
\begingroup
\fontsize{\@xivpt}{18}\bfseries\centering
\ifnum\c@secnumdepth>\m@ne
\leavevmode \hskip-\leftskip
\rlap{\vbox to\z@{\vss
\centerline{\normalsize\mdseries
\uppercase\@xp{\chaptername}%  <----- here
\enspace\thechapter}
\vskip 3pc}}\hskip\leftskip\fi
#1\par \endgroup
\vskip\skip@ }
\makeatother

\begin{document}
\chapter{title}
\end{document}

• It should be \MakeUppercase{\chaptername}, but it could have other consequences. Can you add a MWE to play with? – egreg Feb 20 '15 at 23:15
• @egreg, done! Yes, I agree, your code would work. – Sigur Feb 20 '15 at 23:20

You can make a patch to use \MakeUppercase instead of \uppercase\@xp.

It's a good idea to load textcase along with amsbook, particularly if accented characters are expected.

\documentclass{amsbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}

\usepackage{textcase}
\usepackage{etoolbox}

\makeatletter
{\uppercase\@xp}
{\MakeUppercase}
{}{}
\makeatother

\begin{document}

\mainmatter
\chapter{Abcdéf}

text

\end{document}


• I posted the question so maybe they could update the class. Thanks for let me know about textcase. – Sigur Feb 20 '15 at 23:26

amsbook should use MakeUppercase (or the excellent textcase package as proposed by egreg:-)

However babel's brazil option could use a form that would work with \uppercase if it used \'{i} rather than \'{\i}.

\documentclass[11pt,a4paper]{amsbook}
\usepackage[brazil]{babel}

\begin{document}
\def\chaptername{Cap\'{i}tulo}

\chapter{title}
\end{document}

• I just discovered that you are the author of textcase. Glad to meet you! – Sigur Feb 20 '15 at 23:43
• This wouldn't work for languages using \={\i} that cannot be obtained with \={i} without defining a new composite. Or languages with more complicated settings, such as Greek or Russian that need \MakeUppercase. – egreg Feb 20 '15 at 23:46
• @egreg But I gather Brazilian Portuguese isn't one of them so that's OK:-) – David Carlisle Feb 20 '15 at 23:48
• @egreg I agree amsbook should/could change but babel perhaps has an easier update cycle and this would be enough for some languages at least. – David Carlisle Feb 20 '15 at 23:49