LaTeX forum ⇒ Fonts & Character SetsWrite 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

Postby pdela » Wed Sep 18, 2013 7:34 pm

Hello everybody,

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

  1. \documentclass[a4paper]{article}
  2. \usepackage[spanish]{babel}
  3. \usepackage[latin1]{inputenc}
  4. \usepackage{tabularx}
  5.  
  6. \usepackage{ae}
  7.  
  8. \usepackage{hyperref}
  9. \usepackage[T1]{fontenc}
  10. \usepackage{CV}
  11.  
  12. \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

Postby pdela » Wed Sep 18, 2013 7:40 pm

solved it works with utf8 instead of any latin. Don't know I always have issues with that.

Cheers

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Wed Sep 18, 2013 8:51 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.
  1. \documentclass[11pt,spanish]{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{selinput} % Replacement for »inputenc«
  4. \SelectInputMappings{ % Semi-automatic selection
  5. aacute={á}, % of input encoding by a
  6. ntilde={ñ}, % list of selected glyphs
  7. Euro={} % see: http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
  8. }
  9. \usepackage{babel}
  10.  
  11. \begin{document}
  12. Hola! Cómo estás?
  13. \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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


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


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: Google [Bot] and 2 guests