LaTeX forum ⇒ Fonts & Character Sets ⇒ Write in Spanish Language

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
pdela
Posts: 15
Joined: Sun May 01, 2011 6:39 pm

Write in Spanish Language

Hello everybody,

Can someone tell me what's wrote in this preamble that I can not directly write
ñ,í, and similar?

\documentclass[a4paper]{article}\usepackage[spanish]{babel}\usepackage[latin1]{inputenc}\usepackage{tabularx} \usepackage{ae} \usepackage{hyperref}\usepackage[T1]{fontenc}\usepackage{CV} \linespread{1,3}

I copied it from some place, then tried to set it for writing in Spanish.
But not sure what the package{ae} works for.

Thanks for attention,
Pablo

Tags:

pdela
Posts: 15
Joined: Sun May 01, 2011 6:39 pm
solved it works with utf8 instead of any latin. Don't know I always have issues with that.

Cheers

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
pdela wrote:[…] Don't know I always have issues with that. […]

You can evade such difficulties by using the selinput package (from the oberdiek bundle) for a semi-automatic selection of the input encoding.
\documentclass[11pt,spanish]{article}\usepackage[T1]{fontenc}\usepackage{selinput}  % Replacement for »inputenc«\SelectInputMappings{  % Semi-automatic selection   aacute={á},          % of input encoding by a   ntilde={ñ},          % list of selected glyphs   Euro={€}             % see: http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt}\usepackage{babel} \begin{document}   Hola! Cómo estás?\end{document}

By the way, the ae package is obsolete. And it is better to use setspace instead of modifying \linespread for other than single line spacing.

Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1