1

Using pandoc -o file.docx file.tex it returns a Word document without code, citation, and also the caption of the figures.

P.S. Regarding the citation my bibliography is included in the latex document as

\begin{thebibliography}
\bibitem{}{}
\end{thebibliography}

Is there a way to convert the to Word format keeping the code cells, citations and caption?

moewe
  • 175,683
walid
  • 207
  • 1
  • 2
  • 7
  • 1
    Try converting the PDF? – Oleg Lobachev Aug 10 '20 at 20:59
  • 1
    To get your in word, you have to use pandoc-citeproc, which needs the bibliography as a special file, e.g. .bib – DG' Aug 10 '20 at 21:01
  • @OlegLobachev is it possible to convert from pdf to Word using Pando? – walid Aug 10 '20 at 21:36
  • @DG' do I need to copy past \begin{thebibliography} \bibitem{}{} \end{thebibliography} inside another file? – walid Aug 10 '20 at 21:42
  • 2
    I fear that won't be enough. You have to create a proper .bib-file. Maybe you can use bbl2bib.pl. You should look into tex4ht as an alternative. – DG' Aug 10 '20 at 22:49
  • 1
    Since manual thebibliography is not biblatex (and not compatible with biblatex either) I have removed the biblatex tag and replaced it with the more generic 'bibliographies'. – moewe Aug 11 '20 at 05:18
  • @walid: No, but see, e.g., https://www.docx2latex.com/ or https://tex.stackexchange.com/a/8514. – Oleg Lobachev Aug 11 '20 at 10:06
  • @DG' I did specify a .bib file, how can I use pandoc-citeproc to show up citation? – walid Aug 13 '20 at 14:03
  • 1
    @walid - pandoc --bibliography file.bib --filter pandoc-citeproc -o file.docx file.tex – DG' Aug 13 '20 at 14:43
  • @DG' Thanks a lot! It is normal to have the name of authors (names) instead of enumeration e.g. [1]? – walid Aug 13 '20 at 18:18
  • 1
    Yes, that's the default style. You can choose an download others from https://www.zotero.org/styles (and specify --csl file.csl. This is all very well documented in pandoc's manual: https://pandoc.org/MANUAL.html#citations – DG' Aug 13 '20 at 20:22
  • @DG' Thanks a lot! that was helpful regarding the citation problem :) – walid Aug 13 '20 at 21:33

0 Answers0