I use a template from my university in order to write my dissertation. I wrote and compiled my second and third chapter and generated a PDF. But, when I add the fourth chapter (Capitulo04.tex) I got a lot of errors like if the packages doesn't work. I write in Spanish, so maybe this package \usepackage[latin1]{inputenc} or this \usepackage[T1]{fontenc} it's not working on the four chapter.
I think the problem isn't what I write in the chapter four because I pasted the chapter two (and I also tried chapter three) in the file of chapter four, I also have problems. Even if I only compile the chapter four I have the problems.
This is the main file:
% Clase de documento: libro
\documentclass[12pt,a4paper]{book} % article, report, book.
% Preámbulo: paquetes, comandos, entornos, estilos y título de página.
\input{A1.Preambulo.paquetes.tex}
\input{A2.Preambulo.commandos.tex}
\input{A3.Preambulo.entornos.tex}
\input{A4.Preambulo.estilodepagina.tex}
%Comando para crear glosario (index en inglés)
\makeindex
% Document body.
%-------------------------------------------------------------------%
\begin{document}
% Formato de documento hasta el capítulo 1 (sin incluirlo)
\frontmatter
% Dedicatoria.
\input{B4.Dedicatoria.tex}
% Acrónimos
\input{B5.Acronimos.tex}
% Tabla de contenidos, figuras y tablas.
\input{B5.TableOfContents.tex}
\input{B5.TableOfFigures.tex}
\input{B5.TableOfTables.tex}
% Formato de documento durante los capítulos.
\mainmatter
% Prólogo.
\input{B6.Prologo.tex}
% Introducción y objetivo
\input{B7.Intro.tex}
% Capítulo 01.
\input{Capitulo01.tex}
% Capítulo 2
\part{Capítulo 2}
% Capítulo 02.
\input{Capitulo02.tex}
% Capítulo 03.
\input{Capitulo03.tex}
% Capítulo 04.
%\input{Capitulo04.tex}
\input{D0.Conclusiones.tex}
% Anexos
\part{Apéndices}
\appendix
\input{D1.AppendixA.tex}
%\input{D2.AppendixB.tex}
%\input{D3.AppendixC.tex}
% Formato de documento en la parte final.
\backmatter
% Bibliografía
\input{E1.Bibliografia.tex}
% Índice alfabético%
%\input{F1.Index.tex}
\end{document}
This is A1.Preambulo.paquetes.tex:
%1 Codificación e idioma%
\usepackage[latin1]{inputenc} %Codificación en latin-1%
\usepackage[spanish]{babel} %Hyphenation (Guionado) en español%
\usepackage[T1]{fontenc} %Codificación de fuente%
\usepackage{eurofont} %Tipografía euro ()%
%2 Matemáticas y Física %
% Importante para ecuaciones, magnitudes y unidades%
\usepackage{amssymb,amsmath,latexsym,amsfonts} % paquetes estándar%
\usepackage[squaren]{SIunits} %Paquete para magnitudes y unidades físicas%
\usepackage{ifthen} %sentencias if y while%
\usepackage{latexsym} %Binary Operators (incluye el triangulo invertido)
\usepackage{amsmath}
%3 Gráficos%
\usepackage{graphics,graphicx} %paquetes gráficos estándar%
\usepackage{wrapfig} %paquete para gráfica lateral%
\usepackage[rflt]{floatflt} %figuras flotantes%
% \begin{floatingfigure}[r]/[l]{4.5cm}
% \end{floatingfigure}
\usepackage{graphpap} %comando \graphpaper en el entorno picture%
\usepackage{subfig} %comando \subfloat
%4 Estilo y formato%
\usepackage{fancyhdr} %cabeceras y pies mejor que con \pagestyle{}%
\usepackage{titlesec,titletoc} %Formateo de secciones y títulos%
\raggedbottom %Para fragmentar versos en varias páginas%
\usepackage{makeidx} %MakeIndex%
%\usepackage{showidx}
\usepackage{alltt} % Define el environment alltt, como verbatim, excepto que \, { y } tienen su significado normal. Se describe en el fichero alltt.dtx.
\usepackage[pdftex,bookmarksnumbered,hidelinks]{hyperref} %hyper-references%
\usepackage{minitoc} % Para poner tablas de contenido en cada capítulo.
\usepackage{listings} % Para escribir piezas de código C, Python, etc. %
%listings configuration
\lstset{
language=Python, %Puede ser C, C++, Java, etc.
showstringspaces=false,
formfeed=\newpage,
tabsize=4,
commentstyle=\itshape,
basicstyle=\ttfamily,
morekeywords={models, lambda, forms}
}
\usepackage{tipa} % tipografía IPA (International Phonetic Alphabet)
\usepackage{longtable}
\usepackage{colortbl}
\usepackage{acronym}
First lines of the file .log:
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6700 64-bit) (preloaded format=pdflatex 2018.6.15) 16 AUG 2019 00:29
entering extended mode
**"./A0.Mi Proyecto fin de carrera.tex"
("A0.Mi Proyecto fin de carrera.tex"
LaTeX2e <2018-04-01> patch level 5
("C:\Program Files\MiKTeX 2.9\tex\latex\base\book.cls"
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\bk12.clo"
File: bk12.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count80
\c@chapter=\count81
\c@section=\count82
\c@subsection=\count83
\c@subsubsection=\count84
\c@paragraph=\count85
\c@subparagraph=\count86
\c@figure=\count87
\c@table=\count88
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(A1.Preambulo.paquetes.tex
("C:\Program Files\MiKTeX 2.9\tex\latex\base\inputenc.sty"
Package: inputenc 2018/04/06 v1.3b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
("C:\Program Files\MiKTeX 2.9\tex\latex\base\utf8.def"
File: utf8.def 2018/04/05 v1.2c UTF-8 support for inputenc
Now handling font encoding OML ...
... no UTF-8 mapping file for font encoding OML
Now handling font encoding T1 ...
... processing UTF-8 mapping file for font encoding T1

$in your filechapitolo04.tex... Because you did not show us the code -- or mutch better an minimal working example (MWE) -- we can only guess. And please never show us code as image -- we can not copy it and test it on our computers to help you to find the erroe ... – Mensch Aug 14 '19 at 00:38\usepackage[latin1]{inputenc}and save your source files as UTF-8, which is the default. Seems to be unrelated. – Davislor Aug 14 '19 at 01:55\(and\)than$, which cannot be nested and might easily be missed. Could help you avoid this error in the future. – Davislor Aug 14 '19 at 01:59Now I tried to save the fourth chapter into the first and there is no errors. The problem comes when I use Capitulo04.tex even if I write three lines (in spanish of course).
– Jinx77 Aug 14 '19 at 09:35Capitulo04.tex. If it's saved as UTF-8, and read in as Latin-1, the letter ñ becomes the two characters ñ. That ± will trigger the error you see. As @Davislor said above, it is safest to have everything in UTF-8 encoding. – Harald Hanche-Olsen Aug 14 '19 at 13:24ó) thereafter. The poster is also getting at least one replacement-character, indicating some kind of character-set mismatch. You’re probably right. – Davislor Aug 14 '19 at 15:33\usepackage[squaren]{SIunits}let me guess you are using an outdated version of TeX Live ... Packagesiunitxis the current version of that package. Please add the first line of your*.logfile to your question, then we can see your used tex distribution and version number! Unrelated: packagehyperrefshould be called as last package in your case as far as I can see. Delete double or more loaded packages in your preamble ... – Mensch Aug 15 '19 at 10:51\part{Capítulo 2}(see special character i with accent!) to\part{Capitulo 2}(use usual i) ... (you can copy my second code in comment and put it in your tex file) – Mensch Aug 16 '19 at 00:30