我正在编写一个使用 pandoc 和 latex 的脚本.docx
,.pdf
我被要求使用以下改进:
\usepackage{etoolbox}
\makeatletter
%suppression des \vbox underfull badness
\def\@textbottom{\vskip \z@ \@plus 7pt}
\let\@texttop\relax
%numéros des sections en gras
\def\@secnumfont{\bfseries}
%formatage des sections
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{0pt}{6pt plus 2pt minus 2pt}{-.5em}{\normalfont\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{0pt}{6pt plus 2pt minus 0pt}{-.5em}{\normalfont\bfseries}}
\renewcommand\section{\@startsection{section}{1}\z@{0pt}{18pt plus 2pt minus 2pt}{\clearpage\normalfont\bfseries\centering}}
%\renewcommand\section{\@startsection{section}{1}\z@{24pt plus 2pt minus 2pt}{24pt plus 2pt minus 2pt}{\normalfont\bfseries\centering}}
%lignes de points TOC
\newcommand\@dotsep{2}
%\def\l@chapter{\@tocline{0}{0pt}{0pt}{}{}}
%formatage numérotation TOC
\renewcommand{\tocsection}[3]{\indentlabel{\@ifnotempty{#2}{\ignorespaces#1\makebox[\widthof{00.}][l]{#2.}\quad}}#3\dotfill}
\renewcommand{\tocsubsection}[3]{\indentlabel{\@ifnotempty{#2}{\ignorespaces#1\makebox[\widthof{00.00.}][l]{#2.}\quad}}#3\dotfill}
\renewcommand{\tocsubsubsection}[3]{\indentlabel{\@ifnotempty{#2}{\ignorespaces#1\makebox[\widthof{00.00.00}][l]{#2.}\quad}}#3\dotfill}
\def\@seccntformat#1{\csname the#1\endcsname.\,}
%no indent after theorem like environments
%\def\@endtheorem{\endtrivlist}
%ajuster les hauteurs d'indices
%\newcommand{\raisemath}[1]{\mathpalette{\raisem@th{#1}}}
%\newcommand{\raisem@th}[3]{\raisebox{#1}{$#2#3$}}
\makeatother
我尝试将它与--include-in-header
pandoc 选项一起使用但失败了:
LaTeX Error: Command \@dotsep already defined.
所以我更换了
- \newcommand\@dotsep{2}
+ \renewcommand\@dotsep{2}
现在我出现了以下错误:
LaTeX Error: \tocsection undefined.
有人能帮助我理解我做错了什么吗?