Babel 패키지가 템플릿과 작동하지 않습니다

Babel 패키지가 템플릿과 작동하지 않습니다

나는르그랑 오렌지 북 템플릿(여기서 tex 파일을 다운로드하거나 Overleaf에서 열 수 있습니다.) 현재 스페인어 사양이 포함된 문서를 얻으려고 하는데 를 사용하면 \usepackage[spanish]{babel}섹션화에 대한 몇 가지 오류가 제공됩니다. 모두 누락되었거나 추가 \endcsname.

babelLegrand Orange Book LaTeX 클래스에 포함되어 있는 book 클래스를 로딩한 후 명령어를 넣었기 때문에 그럴 수도 있겠다는 생각이 들었습니다 .

MWE 코드:

\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}

이를 실행하려면 이전에 게시한 링크를 입력하고 "템플릿 코드 다운로드"로 이동하여 LegrandOrangeBook 파일과 내 MWE가 있는 tex 파일을 동일한 폴더에 포함해야 합니다.

답변1

당신이 하는 일이 모두 의미가 있는지는 확실하지 않지만 적어도 다음은 컴파일됩니다.

\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}

절차:

  • "hello world" 외에 모든 것을 주석 처리했습니다.
  • 주석 처리되지 않은 단계별
  • 패키지 하나가 없어진 걸 발견했어요
  • 말썽꾸러기\tableofcontents

문서 클래스와 관련된 하나의 경고 또는 오류가 남아 있습니다.

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

관련 정보