Umlauts in LaTeX - how it works
You cannot type in umlauts in LaTeX as easily as you will quickly notice when writing a German text. This practical tip shows you how umlauts are still displayed as such after compilation.
Use umlauts indirectly in LaTeX
If you enter umlauts indirectly in LaTeX, you can easily edit your document on different operating systems. You do not need any packages for this. The small "ö" is always formed in this text. You can form other umlauts analogously. For example, for a capital "Ä", replace the "o" with an "A".
- You form the "ö" indirectly with \ "o (backslash, quotation marks, o).
- Put the previous variant in curly braces if it doesn't work: {\ "o}.
- If you have included the package "german" or the package "ngerman", you can also form the small ö with "o (quotation marks o).
Include umlauts in the package inputenc in LaTeX
If you include the package inputenc, you can enter umlauts directly in your document and do not have to rewrite them with code. Since different operating systems use different encodings, you need different LaTeX commands here, which you copy in front of your \ begin {document}.
- In Windows, you usually use the "ansinew" coding. The corresponding code is then: \ usepackage [ansinew] {inputenc}.
- The Linux "latin1" encoding is normally used. The code that you should put before \ begin {document} is: \ usepackage [latin1] {inputenc}.
- The coding "AppleMac" should be used on your Mac. You must then copy the code \ usepackage [applemac] {inputenc} before \ begin {document}.
- If the respective coding does not work or if you want to use your LaTeX document on different systems, you should try UTF-8. You integrate this coding with the code \ usepackage [utf8] {inputenc}. However, make sure that your LaTeX document is then actually encoded in UTF-8.
Umlauts in math environments
You should also have difficulties with umlauts in the LaTeX math environment. With a simple trick, however, these can also be eliminated from the world.
- With the command \ textrm {desired text} umlauts in the regular math environment are no longer a concern.
- Use the package "amsmath", put your desired text between the curly brackets of the command \ text {desired text}.
In our download area you will find Texmaker, a solid LaTeX editor. In another practical tip, we will show you how to use LaTeX to create different types of quotation marks.