Ted Flethuseo
Ted Flethuseo

Reputation: 395

accented characters in latex

I am writing a document in spanish, and I'm trying to add 'í' to the word Montréal.However if I put the i like this: \'{e} in the code below, I just get a space instead of the é. Why is this not working?

   \begin{tabbing}%
   \hspace{2.3in}\= \hspace{2.6in}\= \kill % set up two tab positions          
   {\bf Engineer}\> Panagro S.A.\> Summers  2004-2010\\
                          \>Montréal, Colombia
   \end{tabbing}\vspace{-15pt}

Also I might add that when I try putting Montréal outside of the tabbing block, it works fine.

Ted

Upvotes: 1

Views: 6928

Answers (2)

Tommy
Tommy

Reputation: 303

Related question on tex.stackexchange with a great solution to accented characters.

Save your file as UTF-8 and put

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

in your preamble.

Then you can just type the characters normally into your source file.

Or, use XeLaTeX which accepts UTF-8 input natively. In that case you need to add

\usepackage{fontspec}

to your preamble.

If your text editor doesn't support UTF-8 encoded files, you should probably get another editor. But if you're stuck with one, you can also use:

\usepackage[latin1]{inputenc} % for PCs
\usepackage[applemac]{inputenc} % for Macs

and save the files in the default encoding for your machine.

Thanks to Alan Munn for the solution!

Upvotes: 1

Joel Berger
Joel Berger

Reputation: 20280

Tabbing environment

Some of the accent marks used in running text have other uses in the tabbing environment. In that case they can be created with the following command:

  • \a' for an acute accent
  • \a` for a grave accent
  • \a= for a macron accent

source: LaTeX/Accents at Wikibooks

Upvotes: 6

Related Questions