10

I am used to the fact that LaTeX will only know letters like ä, ö, ü, or ß if I use packages like

\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

Today, I tried LaTeX on a Mac for the first time, using the MacTeX distribution and texmaker. Without writing down any packages, all umlauts and ß were accepted correctly from scratch. Why is that and will the usage of special letters without using the packages cause any problems?

  • 11
    Since 2018, the default encoding for files is UTF-8, so inputenc is not needed for files so encoded. You still need fontenc, though, if you want better hyphenation of words with accented and “special” characters. Note also that ucs and utf8x have been unmaintained for several years and are not recommended. – egreg Jan 22 at 14:57
  • Interesting to know! There are a lot of tutorials out there still using the packages mentioned. As a relative newbie, I never noticed that these are deprecated. Thanks for advice! Is there any official documentation about when these changes happened, though? – TiMauzi Jan 22 at 15:03
  • 2
    @TiMauzi Here: latex-project.org/news/latex2e-news/ltnews28.pdf All significant changes to the LaTeX kernel are announced with a LaTeX News issue, which you can find here – Phelype Oleinik Jan 22 at 15:07
14

Since the April 2018 release, LaTeX considers UTF-8 as default input encoding

enter image description here

enter image description here

Thus calling \usepackage[utf8]{inputenc} at the start is no longer required. If a file has a different encoding than UTF-8, the proper encoding should, of course, be declared.

The utf8x add-on, together with the ucs package, used to be needed for some special application or, mostly, for typesetting Greek. The situation has very much changed and utf8x should be avoided (also ucs) as it has been unmaintained for several years and utf8 (the default) behaves much better.

On the other hand, loading fontenc is still required in order to use the T1 encoding and get better results with hyphenation of words containing accented letters or special glyphs used in European languages.

Why don't manuals and guides mention this? Because inertia prevails. :-(

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.