[Tex/LaTex] What’s the correct syntax for accents

accentssyntax

I've found that writing "Sáenz":

S\'{a}enz
S\'aenz
S{\'a}enz
S{\'{a}}enz

Produces the same output.

It gets even trickier when you have two accents in a row, such as in "comunicação" (portuguese):

comunica\c{c}\~{a}o
comunica\c{c}\~ao

(and perhaps some other combinations (?))

What is the correct syntax, and why?

Best Answer

Taking into consideration what was stated by Alan Munn, as long as there is utf8 encoding in your text, you can just write the words normally and just forget about the accents. e.g:

\documentclass{report}
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}

\begin{document}
Sáenz e Comunicação
\end{document}

However, as stated by Barbara Beeton, IF you MUST stick with the explicit syntax, then avoid the {} braces, since those suppress kerning between letters in a word, i.e.:

\documentclass{report}
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}

\begin{document}
S\'aenz e Comunica\c{c}\~ao
\end{document}

Furthermore, Mico pointed out a really important issue when using Bibtex (but not biblatex/biber): it's best to use: S{\'a}enz. That way, the author's surname will be sorted as if it were written as "Saenz", i.e., without an accent. Conversely, Sáenz will be sorted by BibTeX after Szabo

Related Question