Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help] Conversion from Tex/PDF to Docx #246

Open
sarkrui opened this issue Jan 6, 2023 · 2 comments
Open

[Help] Conversion from Tex/PDF to Docx #246

sarkrui opened this issue Jan 6, 2023 · 2 comments

Comments

@sarkrui
Copy link

sarkrui commented Jan 6, 2023

Hi everyone,

I am curious if anyone has found a way to convert a tex file to docx for those who are not familiar with LaTeX. I understand that this may not be an appropriate topic to discuss here. However, since the conversion template relies on the source tex file and styling configuration, I am wondering if anyone has faced a similar situation where they need to share a work-in-progress LaTeX project and the reviewer wants an editable format for their revisions (preferably in docx due to its widespread use)

Here is what I've tried:

  1. latex -> PDF -> (with Adobe Acrobat) docx
    With this approach, I got the best-looking conversion and all cross-references (incl. figures, citations) were well-retained. The overall layout looks great, even an inserted landscaped page could be recognized. However, the converted docx will no work with zotero obviously. Fonts embedded in PDF is not recognized and embedded in docx, although there might have some workaround to fix like using a word macros template.

  2. pandoc from tex to docx:

pandoc thesis.tex \
--csl=Classes/PhDThesisPSnPDF.cls \
--toc \
--from=latex \
--to=docx \
--biblatex \
--bibliography Reference/references.bib \
--output=thesis.docx \
--lua-filter no-figure.lua \
--reference-doc=reference.docx

reference template
fyi, I am using linux-biolinum typeface for the template.
Although this approach seems more elegant than using acrobat, I lost figures (probably because figures were relatively referenced.) Also, I am unable to have bibliography embedded in the exported docx... unable to modify the table styling...
Looks like this a huge list of things I will need to fix..

Anyone in the similar dilemma? And do you have any solution for it? Thank you very much in advance!

@GR8DAN
Copy link

GR8DAN commented Feb 9, 2023

What is required is a native Tex to DOCX, but that hasn't emerged yet. As you pointed out, the bibliography becomes hard coded. When I need to give a DOCX version to someone, I usually open the PDF in Word and save it as DOCX. However, unless its a straight forward document, it is usually requires a lot of rework. Maths equations don't convert well. Adobe is still the premium solution for PDF manipulation. I've yet to find a good way to convert from Tex to DOCX.

@clbarnes
Copy link
Contributor

clbarnes commented Jul 3, 2023

What is required is a native Tex to DOCX, but that hasn't emerged yet

docx has only been out for 16 years, and LaTeX predates that by barely another 23 years. You can't rush these things.

It's probably safe to call them incompatible workflows when you have a complex document like the ones based on this template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants