I am creating an article in which each section is a separate file, and I include them with \input
.
The following document compiles without error:
\documentclass{article}
\usepackage[spanish,activeacute]{babel}
\usepackage[ansinew]{inputenc}
\begin{document}
áéíóúñ
\end{document}
But, now I create a file test2.tex
that contains the same line with accentuated letters:
áéíóúñ
And change the main document to input this file:
\begin{document}
áéíóúñ
\input{test2}
\end{document}
Now an error is given by latex:
! Missing $ inserted.
<inserted text>
$
l.1 áéíó
úñ
In worst case I could of course include all in one file, but I prefer to have them separated. How can I separate the sections in files and still being able to use accents in those files?
Note that in my previous question (How can I quickly type a LaTeX accent in vim?) they suggested to use \usepackage[utf8]{inputenc}
, however I found this not to work and now I use \usepackage[ansinew]{inputenc}
as indicated in the congress' template.
ansinew
encoded.\usepackage[ansinew]{inputenc}
to\usepackage[utf8]{inputenc}
.