Hi,

I have tried two version of pandoc:

- 1.7
- 2.7.3

Both time, I use pdflatex engine.

My follow consist of:

  1.  Write a document on Google Doc
  2. Generating the Table of Content on Google Doc
  3. Downloading the file as `.docx`
  4. Run pandoc and convert to pdf
This is how my pandoc command look like:

pandoc --output "WIP.pdf" --pdf-engine=pdflatex --from docx --to latex --number-sections --toc --toc-depth=2 -V documentclass=amsart "WIP.docx"

I expect to have one single TOC, somebody give me a valid rendered file and it should look exactly like:


- With pandoc 1.7, I can't produce the same result, the TOC title is on the down left corner.
With pandoc 2.7.3, I can't produce the same result, the TOC title is on the down left corner, and I still have the .docx table of content just under the latex TOC.

For instance, this is my Google Document:


With pandoc 2.7.3, I run:

pandoc --output "WIP.pdf" --pdf-engine=pdflatex --from docx --to latex --number-sections --toc --toc-depth=2 -V documentclass=amsart "WIP.docx"

I have:

pdflatex

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.


  1. Is there a way to remove that second TOC?
  2. Is there a way to place the title of the TOC in the middle center (as in my first screenshot, valid sample)





--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/67864477-398d-4310-804f-bd40e1b87908%40googlegroups.com.