Open jeliaslm opened 6 years ago
And what problems did you have?
I'm also having problem with both spanish and portuguese babel. Without changing anything in the template, a lot of errors start appearing in the .out file just by adding the babel package to any of those languages.
The problem seems to be with the presence of some specific characters in the \appendixname command. For example, a simple: \renewcommand{\appendixname}{ê}
or \renewcommand{\appendixname}{é}
in the template file will already spawn 18 errors in the overleaf environment.
There is a conflict between the appendix and babel environments, see Conflict between appendix, bookmark, hyperref and magyar babel due to utf8 chars.
The answer suggests that the appendix package maintainer needs to change the definition of \appendixname
The first thing to do is to ensure that \usepackage[spanish,portuguese]{babel}
appears above \RequirePackage[title,titletoc]{appendix}
in the class file (phDThesisPSnPDF.cls line 259). Then add the code fix from the above answer to the bottom of the class file, you'll still be left with a couple of warnings to deal with from the babel package. I.e. add this to the bottom of phDThesisPSnPDF.cls.
\renewcommand{\@resets@pp}{\par
\@ppsavesec
\stepcounter{@pps}
\setcounter{section}{0}%
\if@chapter@pp
\setcounter{chapter}{0}%
\renewcommand\@chapapp{\appendixname}%
\renewcommand\thechapter{\@Alph\c@chapter}%
\else
\setcounter{subsection}{0}%
\renewcommand\thesection{\@Alph\c@section}%
\fi
\if@pphyper
\if@chapter@pp
\renewcommand{\theHchapter}{\theH@pps.\Alph{chapter}}%
\else
\renewcommand{\theHsection}{\theH@pps.\Alph{section}}%
\fi
\xdef\Hy@chapapp{\Hy@appendixstring}% <- changed appendixname to \Hy@appendixstring
\fi
\restoreapp
}
\renewcommand{\@resets@ppsub}{\par
\stepcounter{@pps}
\if@chapter@pp
\setcounter{section}{0}
\renewcommand{\thesection}{\setthesection}
\else
\setcounter{subsection}{0}
\renewcommand{\thesubsection}{\setthesubsection}
\fi
\if@pphyper
\if@chapter@pp
\renewcommand{\theHsection}{\theH@pps.\setthesection}%
\else
\renewcommand{\theHsubsection}{\theH@pps.\setthesubsection}%
\fi
\xdef\Hy@chapapp{\Hy@appendixstring}% <- changed appendixname to \Hy@appendixstring
\fi
}
I have had problems trying to use \usepackage[spanish]{babel}