0

I have a document with some (very few) umlauts, for example:

\documentclass[11pt,a4paper]{article}
\begin{document}
This is the Hölder inequality:
$$
\Vert f g \Vert_1 \leq \Vert f \Vert_p \Vert g \Vert_q
$$
\end{document}

This almost works as I have the umlaut in the PDF. However, when I search in the PDF the name "Hölder", it is not found because of the umlaut.

I found the following solution:

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc} 
\usepackage{lmodern}
\begin{document}
This is the Hölder inequality:
$$
\Vert f g \Vert_1 \leq \Vert f \Vert_p \Vert g \Vert_q
$$
\end{document}

The package \usepackage[T1]{fontenc} seems to fix the problem that umlauts are not searchable, the \usepackage{lmodern} seems to be necessary in order to get a high quality PDF.

So far so good, but somehow these packages seem to slightly change the font/spacing/captions (not really sure) used by Latex.

The problem is that if I include these packages into a large document, suddenly many pages are messed up because the content that previously fit on a single page now (for some obscure reason) needs more space. Just including these two packages increased the page count of my document by more than 10%. Rearranging everything is not an option.

Question: How can I have searchable umlauts with high PDF quality and exactly the same font/captions/distances/etc. like without them?

  • 2
    you don't need lmodern, you can install the cm-super package instead and then you will get high quality too. But you need the fontenc line. – Ulrike Fischer Jul 08 '21 at 19:17
  • @UlrikeFischer Can I install that safely without any side effects on my original document? Since the package seems to make a "global" change to Latex fonts I am kind of worried that I won't be able to revert that without reinstalling everything in case that this package also changes the fonts and messes up the spacing? – SampleTime Jul 08 '21 at 19:22
  • If you have current tex system you deinstall and reinstall packages without any problems. Apart from this: it is recommended to install the cm-super fonts, nowadays you no longer want the bitmap version of the fonts. – Ulrike Fischer Jul 08 '21 at 19:30
  • @UlrikeFischer I installed the package and it fixes the umlaut problem without messing up the pages like before but it still seems to change the font of captions. Also some lines are now wrapped differently compared to before. Can I somehow change that? I want ideally to have the exact same output like before just with correct umlauts. – SampleTime Jul 08 '21 at 19:45
  • you can't get the exact output. The fonts are different and due to the fact that you have now real umlauts the hyphenation will be different (better). Accept it and go on. – Ulrike Fischer Jul 08 '21 at 19:49
  • @UlrikeFischer Ok I can live with the different hyphenation but how can I restore the font of the captions? I really don't like how the new captions look they look somehow streched and "thinner" than before... – SampleTime Jul 08 '21 at 19:51
  • 1
    well I don't see much difference if I add a caption to your example, but without T1 you are using a 10pt font which is scaled up to 11pt, while with T1 you are using a real 11pt font. That can look a bit thinner. – Ulrike Fischer Jul 08 '21 at 20:05
  • @UlrikeFischer So in short, there is nothing I can do? – SampleTime Jul 08 '21 at 20:17

0 Answers0