pandoc --output "WIP.pdf" --pdf-engine=pdflatex --from docx --to latex --number-sections --toc --toc-depth=2 -V documentclass=amsart "WIP.docx"
pandoc --output "WIP.pdf" --pdf-engine=pdflatex --from docx --to latex --number-sections --toc --toc-depth=2 -V documentclass=amsart "WIP.docx"
This is the .tex
that is generated with pandoc 2.7.3:
\begin{document}
\maketitle
{
\setcounter{tocdepth}{2}
\tableofcontents
}
\listoftables
\LR{{\protect\hyperlink{ruxe9flexions-diverses}{Réflexions diverses}
\textbf{1}}}
\begin{quote}
\LR{{\protect\hyperlink{cas-pratique}{Cas pratique} 1}}
\LR{{\protect\hyperlink{je-suis-un-oiseau}{Je suis un oiseau} 1}}
\LR{\protect\hyperlink{je-suis-un-avion}{Je suis un avion} 1}
\end{quote}
\LR{}
\LR{}
\hypertarget{ruxe9flexions-diverses}{%
\section{\texorpdfstring{\LR{Réflexions
diverses}}{Réflexions diverses}}\label{ruxe9flexions-diverses}}
\LR{Ceci est de la réflexion en tout sens.}
\hypertarget{cas-pratique}{%
\subsection{\texorpdfstring{\LR{Cas
pratique}}{Cas pratique}}\label{cas-pratique}}
\LR{Nous avons deux cas pratiques, oiseai et avion.}
\LR{Il est utile de les développer.}
\hypertarget{je-suis-un-oiseau}{%
\subsubsection{\texorpdfstring{\LR{Je suis un
oiseau}}{Je suis un oiseau}}\label{je-suis-un-oiseau}}
\LR{L'oiseau vol,}
\LR{car il plane avec ses ailes.}
\hypertarget{je-suis-un-avion}{%
\subsubsection{\texorpdfstring{\LR{Je suis un
avion}}{Je suis un avion}}\label{je-suis-un-avion}}
\LR{L'avion vol aussi,}
\LR{car il plane avec ses ailes et à un moteur}
\end{document}
If I open the .docx, and I remove the TOC from the visible document, then I run again the command with Pandoc 2.7.3 I only get the first and valid one.
I want to keep the TOC unique in both Google Doc and LaTeX PDF.