24

I am trying to get a ẞ in my LaTeX document. How can I do this? I already tried:

  • Using other fonts: dejavu and libertine
  • Using \MakeUppercase{ß}, which sometimes produces nothing, sometimes produces "SS"
  • Using {\sc ß}, which sometimes produces nothing, sometimes produces "SS"
  • Using XeTeX and lualatex: Just leaves out ẞ and warns about the Glyph that it could not find
  • Using \symbol{"1E9E}, which also produces nothing

How can I do this?

migrated from stackoverflow.com Apr 14 '14 at 13:16

This question came from our site for professional and enthusiast programmers.

  • 3
    A capital 'ß' is 'SS' (see Unicode specs, for example). – Joseph Wright Apr 14 '14 at 13:38
  • 3
    Does your font support the capital-ß? ConTeXt and LuaLaTeX print any unicode-character, if it is in the font. XeTeX should do the same. – Hanseat Apr 14 '14 at 13:38
  • 5
    Just for completeness it should be added that the capital ß is not a SS anymore. In Germany at least en.wikipedia.org/wiki/Capital_ẞ – sheß Jan 5 '18 at 16:54
  • Is there any solution for pdflatex as well? – Sebastian Werk Feb 26 '18 at 11:09
  • Sorry, but from history the ß is an sz-ligature and so is the uppercase. That is, uppercase ß is more likely SZ than SS because the vocal before the SZ is a long one. Wirting uppercase ß as SS always implies that the vocal before is a short one. Thus, the pronounciation is totally different. – somebody Sep 8 at 16:40
14

The easiest solution, if you're sure that all the fonts you use in the document have the character U+1E9E LATIN CAPITAL LETTER SHARP S, is to say

\uccode`ß="1E9E

Otherwise, you need to provide substitutes; here's an example with Linux Libertine and Latin Modern.

\documentclass{article}
\usepackage{fontspec}
\usepackage{libertine}
\usepackage{newunicodechar}

%% simplistic solution
%\uccode`ß="1E9E

%% solution with substitutions
\newunicodechar{ß}{\ss}
\renewcommand{\SS}{\iffontchar\font"1E9E \symbol{"1E9E}\else SS\fi}

\newfontfamily{\lmr}[
  Ligatures=TeX,
  SmallCapsFont=Latin Modern Roman Caps,
]{Latin Modern Roman}


\begin{document}
\Huge
groß \MakeUppercase{groß}
\scshape Groß \MakeUppercase{Groß}

\lmr
groß \MakeUppercase{groß}
\scshape Groß \MakeUppercase{Groß}

\end{document}

enter image description here

8

Linux Libertine has it. Run it with xelatex or lualatex:

\documentclass{article}
\usepackage{fontspec}
\usepackage{libertine}
\uccode`ß="1E9E
\begin{document}
\Huge
groß \MakeUppercase{groß}
\scshape Groß \MakeUppercase{Gro\char"1E9E}

\end{document}

enter image description here

2

In Lualatex, the following works:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{DejaVu Sans}
  • 3
    DejaVu is one of the fonts that include capital-ß. According to Wikipedia, there are a few more that you might have access to. Windows 7: Times New Roman, Arial, Courier New, Tahoma, Verdana, Segoe UI, Segoe UI Light, Segoe UI Semibold. Windows 8: see Windows 7, plus Cambria, Calibri, Candara, Consolas, Constantia and Corbel Mac OS X: Geneva Free fonts: DejaVu-Paket, Linux Libertine and Linux Biolinum, Junicode If your favourite font does not include capital-ß, you can map it in from a font that has it. By the way, the DajaVu-Package is compatible with classic LaTeX too. – Hanseat Apr 14 '14 at 14:05
0

It's more or less everywhere now.

Just looking at five fonts at random:

Five at random

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.