9

for some reason some of my Umlauts work, others not.

For your fun, see here:

Umlaut-test

The capital Ä turns weird, and the capital Ü does not get displayed at all. The rest looks just fine.

I am confused.

Here's my MWE:

\documentclass[11pt,a4paper]{letter} % Specify the font size (10pt, 11pt and 12pt) and paper size (letterpaper, a4paper, etc)
\usepackage[utf8]{inputenc}
\usepackage[english, german]{babel}
\usepackage{hyperref}
\usepackage{graphicx} % Required for including pictures
\usepackage{microtype} % Improves typography
\usepackage{gfsdidot} % Use the GFS Didot font: 
http://www.tug.dk/FontCatalogue/gfsdidot/
\usepackage{miama}
\usepackage[T1]{fontenc} % Required for accented characters
\usepackage[official]{eurosym}
\usepackage{setspace}

\begin{document}
\begin{letter}
{Address}
\opening{
Sehr geehrte Damen und Herren,}
blah blah
a Ä ä\\
o Ö ö\\
u Ü ü\\
\closing{Mit freundlichen Grüßen \LARGE \fmmfamily  }
\end{letter}
\end{document}

Maybe some of the packages collide with each other?

Thank you for any hints!

PikkuKatja
  • 479
  • 1
  • 5
  • 12
  • 3
    Your MWE does not include any Ä or Ü... – samcarter_is_at_topanswers.xyz Sep 14 '17 at 12:12
  • Ha, great beginner's mistake! I will add it right away... – PikkuKatja Sep 14 '17 at 12:13
  • 1
    If the font is missing the glyph, you might fudge it with this approach, https://tex.stackexchange.com/questions/390388/looking-for-a-package-method-that-can-make-best-guess-heuristic-accents-onto – Steven B. Segletes Sep 14 '17 at 12:13
  • 1
    @PikkuKatja related discussion: http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2009-02/msg00266.html I suggest to use another font – samcarter_is_at_topanswers.xyz Sep 14 '17 at 12:18
  • Cool, thank you! I guess, so far I have never used the capital versions in one of my letters, so I did not notice. I guess it is indeed the best to use another font. Do you want to write this up as answer? – PikkuKatja Sep 14 '17 at 12:20
  • 2
    Gfs Didot does have a capital U with umlaut. Whether it is usable with LaTeX is another problem. Unrelated: the hyperref package should be loaded as the last package, with very few exceptions (most notable cleveref). – Bernard Sep 14 '17 at 12:25
  • 1
    Address is not German ;-) It's Adresse –  Sep 14 '17 at 12:31
  • 1
    If only there was some... widely available... unified standard... for encoding characters across many character sets. – Russell Borogove Sep 15 '17 at 03:52
  • thank you, Bernard, for the hint -- I will do that in future. and yes, Christian, this is what happens when you take the actual letter, delete all content to create a MWE and then add something back in when writing the question in English. Luckily, it did not distract this wonderful community to help me with the problem. :) I sent the letter yesterday, and trust me, the address was in German. :-) – PikkuKatja Sep 15 '17 at 07:50

2 Answers2

11

As several have noted, the font has problems. Not only the missing umlauted characters, but also a capital U with zero apparent height.

If the use of the font is necessary, I suggest fudging the umlauts using a tailored version of \umlaut, originally provided in Looking for a package/method that can make "best-guess" (heuristic) accents onto a font that doesn't have latin-extended support.

Normally, \umlaut U would be sufficient, but because of the bad height of the U, \umlaut{U\vphantom{A}} is required in this case.

\documentclass[11pt,a4paper]{letter} % Specify the font size (10pt, 11pt and 12pt) and paper size (letterpaper, a4paper, etc)
\usepackage[utf8]{inputenc}
\usepackage[english, german]{babel}
\usepackage{hyperref}
\usepackage{graphicx} % Required for including pictures
\usepackage{microtype} % Improves typography
\usepackage{gfsdidot} % Use the GFS Didot font: 
%http://www.tug.dk/FontCatalogue/gfsdidot/
\usepackage{miama}
\usepackage[T1]{fontenc} % Required for accented characters
\usepackage[official]{eurosym}
\usepackage{setspace}

\usepackage{stackengine}
\newcommand\fit[3][.3ex]{\stackengine{#1}{#3}{#2}{O}{c}{F}{T}{S}}
\newcommand\umlaut[1]{\fit[.05ex]{\scriptsize..}{#1}}
\begin{document}
\begin{letter}
{Address}
\opening{
Sehr geehrte Damen und Herren,}
blah blah\\
a \umlaut A ä\\
o Ö ö\\
u \umlaut{U\vphantom{A}} ü\\
\closing{Mit freundlichen Grüßen \LARGE \fmmfamily  }
\end{letter}
\end{document}

enter image description here

8

If compiling with LuaLaTeX or XeLaTeX instead of pdfLaTeX is an option, consider using the OpenType font (packaged with gfsdidot as well) instead of the Type 1 font which appears to be buggy:

\documentclass[11pt,a4paper]{letter}

\usepackage[english, german]{babel}
\usepackage{graphicx}
\usepackage{microtype}
\usepackage{fontspec}
\setmainfont{GFS Didot}
\usepackage{miama}
\usepackage[official]{eurosym}
\usepackage{setspace}
\usepackage{hyperref}

\begin{document}
\begin{letter}
{Address}
\opening{
Sehr geehrte Damen und Herren,}
blah blah
a Ä ä\\
o Ö ö\\
u Ü ü\\
\closing{Mit freundlichen Grüßen \LARGE \fmmfamily  }
\end{letter}
\end{document}

compiled example document with correct umlauts

diabonas
  • 25,784
  • Thank you, diabonas -- I have not worked with LuaLaTeX or XeLaTeX yet; our company works with pdfLaTeX normally. If that changes at some point, I might come back to your solution :-) – PikkuKatja Sep 15 '17 at 07:53