2

I have read on

https://en.wikibooks.org/wiki/LaTeX/Fonts

that there is no variant of \scshape for upper case. Also there seem to be problems with upper case that are addressed by the textcase package. However, using its \MakeTextUppercase does not work for me since it garbles my cross references.

I must have missed something or why is it possible to get small caps out of the box but not upper case? This is quite incredible. (I know that one could create a new \nameref command to get around the problem but that isn't feasible for me.)

Here are two examples:

Works great with \scshape:

\documentclass{scrartcl}
\usepackage{hyperref}
\usepackage{textcase}
\setkomafont{section}{
\normalfont
\scshape
}

\begin{document}
  \section{Test \nameref{sec:test2}}
  \section{Test2}\label{sec:test2}
\end{document}

Doesn't work with \MakeTextUppercase:

\documentclass{scrartcl}
\usepackage{hyperref}
\usepackage{textcase}
\setkomafont{section}{
\normalfont
\MakeTextUppercase
}

\begin{document}
  \section{Test \nameref{sec:test2}}
  \section{Test2}\label{sec:test2}
\end{document}
7
  • 5
    \scshape uses a different font; there is no “all caps” font.
    – egreg
    Jun 10, 2018 at 14:02
  • @egreg Thanks. But why can whatever font is used by \scshape not be used for all caps? It is a real bummer in LaTeX that such a simple functionality is so problematic.
    – Daniel
    Jun 10, 2018 at 14:05
  • 3
    @Daniel an all caps font would a full size A in the slot for a a small caps font, as its name implies has a small A in the slot for a so to use the same mechanism would require a new font. But jou can use \section{Test \NoCaseChange\nameref{sec:test2}} or variants Jun 10, 2018 at 14:30
  • @DavidCarlisle Thanks. How do I use your example? It seems not to work in either of the examples I provided.
    – Daniel
    Jun 10, 2018 at 16:09
  • 2
    You could create such an all caps font with a bit work, (with lualatex more easily than with pdflatex (tex.stackexchange.com/questions/370799/…)). It doesn't exist a lot already as there is not much use for an all caps font. I personally e.g. rather loath them, I do find titles in all caps in german quite difficult to read - I rely quite a lot of mix cases for fast reading. Jun 10, 2018 at 19:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.