4

This question is about all the non-ascii characters, å is only as an example.

I know you can type the character å two ways:

\usepackage[utf8]{inputenc}
...
Some text with a speciål character.

or

Some text with a speci\aa l character.

Which both generate the same result. However which method is preferred or best practice?

I'm using pdflatex if it makes any difference.

  • 5
    The more special characters, the less compatibility. If you stick to the 'old' commands, they will work with every compiler and in each editor. They are not depending on any errors in encoding and so on. But they are more difficult to read and harder to type. So, this is a matter of taste. Personally, I insert each special character which is easily available on my keyboard. The rest is set by commands. – LaRiFaRi Jan 20 '15 at 15:54
  • 5
    Now that UTF-8 is a well-established standard, use å. – egreg Jan 20 '15 at 16:24
  • 4
    inputenc defines å to expand (more or less) to \aa so it really makes no difference, most people prefer the inputenc form if writing in a language that has non-ascii characters. What is more important is that whatever input form you use, you have \usepackage[T1]{fontenc} so hyphenation of words using such characters works correctly – David Carlisle Jan 20 '15 at 17:12
4

inputenc defines å to expand (more or less) to \aa so it really makes no difference, most people prefer the inputenc form if writing in a language that has non-ascii characters. What is more important is that whatever input form you use, you have \usepackage[T1]{fontenc} so hyphenation of words using such characters works correctly.

One place where it does make a difference is if you use bibtex it is generally better to use \aa (and in general forms such as {\"a} as bibtex doesn't deal well with UTF-8 (or any other non-ascii encoding).

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.