Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm currently writing my final thesis in TeXstudio and for a better organization I'm writing each chapter in a different text file. I'm also writing in Spanish and as far as I know, the inputenc package with utf8 configuration (\usepackage[utf8]{inputenc}) along the babel package (\usepackage[spanish,activeacute]{babel}) must be ok for that. I started to write the first chapter with Spanish accents without any problem, nevertheless as soon as I started writing chapter 2 there was an inputenc error whenever I typed an accented word or the letter ñ. The error is like this:

Package inputenc Error: Unicode char \u8: étr not set up for use with LaTeX
Package inputenc Error: Unicode char \u8: ño not set up for use with LaTeX
Package inputenc Error: Unicode char \u8: ón not set up for use with LaTeX
Package inputenc Error: Unicode char \u8: És not set up for use with LaTeX
etc.
etc.
.
.
.

I don't really get it since I wrote chapter 1 without problems. I'm using those lines to add the chapters to the main file.

\input{Capitulo1}
\input{Capitulo2}
\input{Capitulo3}
\input{Capitulo4}
\input{Capitulo5}

It's as if TeXtstudio wouldn't keep recognizing the inputenc function after the first \input{file.tex} or something. And the wiered thing is that the inputenc error is for the accented words interacting inside a word, for example étr or ño inside the words paramétrico and diseño.

I can only make it work if I place the whole chapter's 2 content into the chapter's 1 TeX file.

Any ideas?

share|improve this question
    
you say the problem disappears when you copy Capitulo2.tex's content into Capitulo1.tex. What happens when you create a copy of Capitulo1.tex, rename it to Capitulo2a (or whatever) and copy Capitulo2's content into that file? –  Nils L Mar 29 '13 at 9:09
    
Your second file is not utf8 encoded. See also tex.stackexchange.com/questions/105672/… –  Ulrike Fischer Mar 29 '13 at 11:12
    
Brilliant! just as you said my second file was not UTF-8 encoded! It was ANSI encoded and I don't know why since I created the whole files at once. However, in order to show the answer to this problem, what I done was to check the tex file codification within notepad, then I realized that some of my files as Capitulo1 and the main file were in UTF-8, but some others as Capitulo2 were ANSI coded, so I just opened them, saved them with the same name but with UTF-8 codification, then reopened them in Textstudio and the problem was solved! Thanks again! –  Giovanni Cásares Mar 29 '13 at 23:13
    
Although Nils L's method would have also worked since Capitulo1.tex was UTF-8 coded. –  Giovanni Cásares Mar 29 '13 at 23:18

1 Answer 1

Try using:

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

If it doesn't work, then try (For iso-8859-1):

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[spanish]{babel}

Write in normal spanish, don't worry about special characters (i.e. use "diseño", you don't have to write "dise\~no").

This should work just fine. It does for me.

share|improve this answer
    
Welcome to TeX.sx! –  egreg Mar 29 '13 at 11:17
    
@egreg, Thank you for the editing. I wanted it to be that way, I'm just kind of getting used to the site. –  Mario S. E. Mar 29 '13 at 11:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.