The Knife
29 Dec 2015I really don’t know how I lived before without pandoc. It’s an amazing tool, that saved me from a terrible pain of
latex -> MS Word convertion. If you’re writing many scientific documents in latex
format, and faced with
the demand to convert it into MS Word, you can understand me. It’s like a tiresome point-and-click game, which can
consume unbelievable amount of time.
Pandoc can do it, and I’m not kidding. All you need is to create a source file in markdown
format and
copy all latex formulas. In this post you can find several details.
What do we need to install pandoc? I’ll advise stack:
pandoc-citeproc
and pandoc-crossref
will be used to generate nice bibliography and references.
Now we can do something like this:
ang get a nice result (e.g. from Word Online):
Here you can see a label eq:navier_stokes:motion
for corresponding equation. General template for references is:
More documentation about types and usage is here.
You can enable pandoc-crossref
using command line argument --filter
:
Note, that if we will use begin/end
environment or “\\” for multiple equations, pandoc couldn’t generate MS Word
formula. Also, you shouldn’t forget about empy line between equations.
To use bibliography we can create a regular bib
file and enable pandoc-cireproc
like this:
The default citation style in Pandoc is Chicago author-date, but you can change
it. E.g. if you’re writing an academic paper in Russian, I bet you would like
to use GOST
standard. You can get a corresponding csl
file
here,
and use it like this:
The last one thing is a language. If you’re writing in Russian, you can suffer from encoding issues - to avoid this you need to specify language:
That’s it, you will get a well-formed MS Word file with nice formulas.