You are not logged in.

#1 2008-11-04 23:12:17

kxtells
Member
Registered: 2008-11-04
Posts: 2

[Solved] LaTeX and special characters

Hi guys! I'm new in the forum and new in LaTeX.

I've got some troubles getting it to work with special characters ( like à,á,í etc) and i don't get why it does not work.
I'm using arch, and I don't know if it's something about the LANG environment or simply that I don't know how to do it:

Here's my simple latex file

\documentclass[a4paper,12pt] {article}
\usepackage[latin1] {inputenc}
\usepackage[T1] {fontenc}
\usepackage[spanish]{babel}
\title{Taste it}


\begin {document}
\maketitle
àÀàáçççññññ
\'a
\end {document}

As you can see, the header of the file contains the usepackages for spanish characters.
Surprisingly for me, when I generate a pdf document, I only can see the à character of the second line. With the first line I only get strange chars. like (~AÖ and similar)

I'm sure that it's only a stupid error, but in every latex manual that I've read, they don't need nothing more than this

And, (just in case) my LANG variable is

es_ES.utf8

Thanks everybody for your patience.

Last edited by kxtells (2008-11-04 23:45:17)

Offline

#2 2008-11-04 23:33:27

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [Solved] LaTeX and special characters

Since you're apparently using utf-8 for editing, your setting for inputenc should reflect that:
\usepackage[utf8]{inputenc}
I tried your sample with this and it worked here.

EDIT: explanation: inputenc package is there to convert a (supported) outside encoding (eg. utf-8, latin1, cp1250, il2, ... many many) into the internal tex encoding, so that tex assigns appropriate glyphs to appropriate letters coming in from your file.

Last edited by bender02 (2008-11-04 23:36:03)

Offline

#3 2008-11-04 23:44:43

kxtells
Member
Registered: 2008-11-04
Posts: 2

Re: [Solved] LaTeX and special characters

I knew that it must be something simple.

Thanks a lot.

Offline

Board footer

Powered by FluxBB