
Я используюШаблон книги Legrand Orange(Вы можете загрузить tex-файл оттуда или открыть его в Overleaf) и в настоящее время я пытаюсь получить документ со спецификациями на испанском языке, но при использовании \usepackage[spanish]{babel}
выдается несколько ошибок, связанных с секционированием, все они отсутствуют или являются дополнительными \endcsname
.
Я подумал, что это может быть связано с тем, что я поместил babel
команду после загрузки класса книги, который включен в класс Legrand Orange Book LaTeX.
Код МВЭ:
\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 и tex-файл с моим MWE в одну папку.
решение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}
Процедура:
- закомментировал все, кроме какого-то "привет, мир" оставил
- не прокомментировано шаг за шагом
- обнаружили, что одна посылка пропала
-
нарушитель спокойствия
\tableofcontents
Осталось одно предупреждение или ошибка, связанная с documentclass:
Package hyperref Warning: Option `hyperindex' has already been used,
setting the option has no effect on input line 507.