Babel-Paket funktioniert nicht mit Vorlage

Babel-Paket funktioniert nicht mit Vorlage

Ich verwende dieLegrand Orange Book-Vorlage(Sie können die Tex-Datei von dort herunterladen oder sie in Overleaf öffnen) und ich versuche derzeit, ein Dokument mit den spanischen Sprachspezifikationen zu erhalten, aber die Verwendung \usepackage[spanish]{babel}liefert mehrere Fehler bezüglich der Abschnittsaufteilung, alle fehlen oder sind zusätzlich \endcsname.

Ich dachte, es könnte daran liegen, dass ich den babelBefehl nach dem Laden der Buchklasse eingegeben habe, die in der LaTeX-Klasse „Legrand Orange Book“ enthalten ist.

MWE-Code:

\documentclass[11pt,a4paper]{LegrandOrangeBook}

\usepackage[spanish]{babel}

\definecolor{ocre}{RGB}{0, 100, 100}

\chapterspaceabove{6.5cm}
\chapterspacebelow{6.75cm}

\usepackage{svg}

\begin{document}


\thispagestyle{empty} 
\begin{tikzpicture}[remember picture, overlay]
    \node [text opacity=1, minimum height=0.2\paperheight, minimum width=\paperwidth, text width=0.8\paperwidth] at (10,-5) {\sffamily 
        {\Huge\bfseries The$\,\,$ document$\,\,$ title\par}
        \vspace{16pt} % Vertical whitespace
        {\LARGE Blablabla\par} % Subtitle
        \vspace{24pt} % Vertical whitespace
        {\huge\bfseries Your$\,\,$ Name\par}
        \vspace{10pt}
        {\LARGE Tutor: }
        }; 
    \end{tikzpicture}
    

\pagestyle{empty} % Disable headers and footers for the following pages
\tableofcontents % Output the table of contents
\pagestyle{fancy} % Enable default headers and footers again
\cleardoublepage % Start the following content on a new page


\chapterspaceabove{6.75cm} 
\chapterspacebelow{7.25cm} 

\chapter{Sectioning Examples}\index{Sectioning}

\section{Section Title}\index{Sectioning!Sections}
Lorem ipsum

\subsection{Subsection Title}\index{Sectioning!Subsections}
Fusce varius orci

\end{document}

Um dies auszuführen, müssen Sie den Link eingeben, den ich zuvor gepostet habe, zu „Vorlagencode herunterladen“ gehen und die LegrandOrangeBook-Datei und die Tex-Datei mit meinem MWE im selben Ordner einschließen.

Antwort1

Ich bin nicht sicher, ob das, was Sie tun, alles Sinn ergibt, aber das hier lässt sich zumindest kompilieren:

\documentclass[11pt,a4paper]{LegrandOrangeBook}

 \usepackage[spanish]{babel}
 \usepackage{csquotes}      % <<< was missing

 \definecolor{ocre}{RGB}{0, 100, 100}

\chapterspaceabove{6.5cm}
\chapterspacebelow{6.75cm}

% \usepackage{svg} % <<< not needed here

\begin{document}


 \thispagestyle{empty} 
\begin{tikzpicture}[remember picture, overlay]
    \node [text opacity=1, minimum height=0.2\paperheight, minimum width=\paperwidth, text width=0.8\paperwidth] at (10,-5) {\sffamily 
        {\Huge\bfseries The$\,\,$ document$\,\,$ title\par}
        \vspace{16pt} % Vertical whitespace
        {\LARGE Blablabla\par} % Subtitle
        \vspace{24pt} % Vertical whitespace
        {\huge\bfseries Your$\,\,$ Name\par}
        \vspace{10pt}
        {\LARGE Tutor: }
        }; 
    \end{tikzpicture}
    

 \pagestyle{empty} % Disable headers and footers for the following pages
 % !!! trouble ahead
% \tableofcontents % Output the table of contents
 \pagestyle{fancy} % Enable default headers and footers again
 \cleardoublepage % Start the following content on a new page


\chapterspaceabove{6.75cm} 
\chapterspacebelow{7.25cm} 

\chapter{Sectioning Examples}\index{Sectioning}

\section{Section Title}\index{Sectioning!Sections}
Lorem ipsum

\subsection{Subsection Title}\index{Sectioning!Subsections}
Fusce varius orci

\end{document}

Verfahren:

  • alles auskommentiert, außer einer Art "Hallo Welt" übrig
  • unkommentiert Schritt für Schritt
  • festgestellt, dass ein Paket fehlte
  • Unruhestifter\tableofcontents

Es bleibt eine Warnung oder ein Fehler, der mit der Dokumentklasse zusammenhängt:

Package hyperref Warning: Option `hyperindex' has already been used, 
setting the option has no effect on input line 507.

verwandte Informationen