Legrand 橙皮书 -错误

Legrand 橙皮书 -错误

我正在使用 Legrand Orange Book 并使用 pdfLatex 进行编译。我遇到以下问题:

  1. 未定义控制序列。

    \@makechapterhead ...mdepth >\m@ne \if@mainmatter 
                                                     \begin {tikzpicture}[remem...
    l.296 \chapter{chapter1}
    

    错误消息顶行末尾的控制序列从未被 \def 过。如果您拼错了它(例如,\hobx'), typeI')和正确的拼写(例如,`I\hbox')。否则继续,我会忘记未定义的任何东西

  1. 未定义控制序列。

    \@makechapterhead ... ,-9cm) node {\if@mainmatter 
                                                     \thechapter .  \fi #1\strut...
    l.296 \chapter{chapter1}
    

    错误消息顶行末尾的控制序列从未被 \def 过。如果您拼错了它(例如,\hobx'), typeI')和正确的拼写(例如,`I\hbox')。否则继续,我会忘记未定义的任何东西。

  2. 额外的\else

    \@makechapterhead ...}}; \end {tikzpicture} \else 
                                                      \begin {tikzpicture}[remem...
    l.296 \chapter{chapter1}
    
    I'm ignoring this; it doesn't match any \if.
    
  3. 额外的\fi

    \@makechapterhead ...; \end {tikzpicture} \fi \fi 
                                                      \par \vspace *{270\p@ }}
    l.296 \chapter{chapter1}
    
    I'm ignoring this; it doesn't match any \if.
    

5)额外\fi

   \NR@chapter ...chapterhead {#2}\@afterheading \fi 
                                                  
   l.296 \chapter{chapter1}
                            
   I'm ignoring this; it doesn't match any \if.

这些错误几乎在每一章中都会出现。

structure.tex 文件的 CHAPTER HEADINGS 部分如下:

---------------------------------------
CHAPTER HEADINGS
--------------------------------------

\makeatletter
\tikzset{
    chaptertitle/.style={
    %   line width = 2pt ,
    %   rounded corners = 15pt ,
    %   draw = blue ,
    %   fill = white ,
    %   fill opacity = 1 ,
    %   inner sep = 15pt ,
        text = black,
        node font = \huge\sffamily\bfseries ,
        text width = \paperwidth-\Gm@lmargin-10pt ,
        align = left
    }
}


% A switch to conditionally include a picture, implemented by  Christian Hupfer

\newif\ifusechapterimage
\usechapterimagetrue
\newcommand{\thechapterimage}{}%
\newcommand{\chapterimage}[1]{\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}%
\newcommand{\autodot}{.}

\def\@makechapterhead#1{%
    {\parindent \z@ \raggedright \normalfont
        \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
        \begin{tikzpicture}[remember picture,overlay]
        \node at (current page.north west)
        {\begin{tikzpicture}[remember picture,overlay]
            \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
            \draw[anchor=west,chaptertitle] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=blue,fill=white,fill opacity=0.7,inner sep=23pt]{\strut\makebox[44cm]{}};
            \draw[anchor=west,chaptertitle] (\Gm@lmargin,-9cm) node {\if@mainmatter\thechapter. \fi#1\strut};
            \end{tikzpicture}};
    \end{tikzpicture}
    \else
    \begin{tikzpicture}[remember picture,overlay]
    \node at (current page.north west)
    {\begin{tikzpicture}[remember picture,overlay]
        \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
        \draw[anchor=south west] (\Gm@lmargin+.3cm,-9cm) node [line width=2pt,rounded corners=15pt,draw=blue,fill=white,fill opacity=0.7,inner sep=15pt]{\strut\makebox[22cm]{}};
        \draw[anchor=south west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
        \end{tikzpicture}};
\end{tikzpicture}
\fi\fi\par\vspace*{270\p@}}}


\def\@makeschapterhead#1{%
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
%\draw[anchor=south west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=1pt,draw=blue,fill=white,fill opacity=0.7,inner sep=15pt]{\strut\makebox[22cm]{}};
%\draw[anchor=south west] (\Gm@lmargin+.3cm,-9cm) node {\Huge\sffamily\bfseries\color{black}#1\strut};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=blue,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\par\vspace*{270\p@}}
\makeatother

----------------------------------------------------------------------------

我在structure.tex文件中犯了一些错误,但无法弄清楚......我只放了structure文件的一部分。如果需要,我可以把structure.tex和main.tex全部放进去。但我想它们会占用很多空间。structure文件是根据我所在大学的格式要求对原始模板进行的修改。

你能帮我解决这些错误吗?谢谢。

问候

相关内容