How to use spanish accents?
You could choose another way of input encoding by the selinput package from the oberdiek bundle. It chooses the right encoding by some glyphs from your language correspondingly to the encoding of the source file.
\documentclass[11pt,spanish]{article}
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{%
aacute={á},
ntilde={ñ},
Euro={€}
}
\usepackage{babel}
\begin{document}
Hola! Cómo estás ?
\end{document}
Gando, I just compile this code with pdflatex in an iMac (Mountain Lion OS X):
\documentclass[11pt, spanish]{report}
\usepackage[spanish]{babel}
\selectlanguage{spanish}
\usepackage[utf8]{inputenc}
\begin{document}
¡Hola! ¿Cómo estás?
\end{document}
and got this output:
But you can get the same result with:
\documentclass[11pt]{report}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\begin{document}
¡Hola! ¿Cómo estás?
\end{document}
You can also use escape codes for any accent you want to make. In general, it might be easier to fix the encoding once than have to escape every accented character, but for the occasional foreign name I use the table here http://en.wikibooks.org/wiki/LaTeX/Special_Characters.
Specifically, I would write:
!`Hola!, ?`c\'{o}mo est\'{a}s?
Do note, that with the letter i a dotless version needs to be used, as otherwise in addition to the accent, the regular i dot would be rendered.
S\'{\i}.
Note, to get the initial question mark and exclamation point, you type a backtick character immediately after.