I'm writing my thesis in spanish on latex and I'm using the \include{}
function to bring other .tex files to my master.tex (main file).
My encoding looks something like this:
\documentclass[11pt,a4paper,twoside]{report}
\usepackage[spanish]{babel}
\addto\shorthandsspanish{\spanishdeactivate{~<>}}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
.
.
\begin{document}
some text here...
\tableofcontents
\include{chapter1}
.
.
\end{document}
The thing is that the master.tex file writes perfectly spanish accents. But, when I try to include a chapter, it comes out with this error (! Package utf8x Error: MalformedUTF-8sequence.) And I checked it out and, for example it comes when I do:
This is chapter1.tex:
\chapter{Justificación del tema}
.
.
(in master.tex file: \include{chapter1}
It comes with the error when I do the ó, but If I write "Justificacion" (with no " ´ " on top of the "o", everythings fine.
Does anybody know how can I get this fixed? Do I have to put something on top of the chapter1.tex
file?
To know: - I'm using TexMAKER on Windows 7.
I'd be very grateful if someone could help me! Thank you and greetings from Chile!
utf8x
if you use theutf8
option. However, this might mean the file is not UTF-8 encoded.inputenc
. If you are on a linux machine, tryfile chapter1.tex
from command line to find out the encoding of that file.