public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Converting from .docx to .pdf with pdflatex
@ 2019-10-08 22:19 Kopax Anderson
  0 siblings, 0 replies; only message in thread
From: Kopax Anderson @ 2019-10-08 22:19 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3430 bytes --]

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:

<https://user-images.githubusercontent.com/1866564/66437337-c91a1800-ea29-11e9-8dbe-366d5530d83f.png>

- 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:

<https://i.stack.imgur.com/jGUjz.png>

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:

[image: 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.

[-- Attachment #1.2: Type: text/html, Size: 68529 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-08 22:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 22:19 Converting from .docx to .pdf with pdflatex Kopax Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).