3

I'm using biblatex (actually biblatex-chicago) with biber to process citations in an academic paper. Unfortunately I need to provide a Word file for a stage in the editorial process. I know that pandoc can use Bibtex refs and citeproc to create a bibliography, but it has a different syntax, and I don't want to set up the document to do that if I'm going to use biblatex in the end, and citeproc doesn't allow the same control that biblatex does.

So what I'd like to do is use biblatex as usual, but to produce a modified tex file rather than a pdf. I would then use pandoc to turn the tex into a docx file. Where my original tex file would have citation commands such as:

\cite{XXX2000}

the processed tex file would have commands to typeset the citation:

(XXX, 2000)

I imagine this is an intermediate stage in the biblatex/biber process.

Is there any way I can achieve this?

Thanks for any help.

UPDATE

Thanks to the comments below, I have solved this problem by using tex4ht.

A simple introduction to its use is here: https://github.com/michal-h21/helpers4ht/wiki/tex4ht-tutorial

Note: to use tex4ht with latest versions of biblatex, you need to update one of the tex4ht files, biblatex.4ht. Details here: http://cvr.cc/?p=901#comment-16733

  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – DG' Mar 12 '16 at 13:39
  • I've usually relied on some reasonable PDF->Word converter for things like this - some are quite good. – PLK Mar 12 '16 at 17:37
  • 2
    You might find better luck with tex4ht to get .odt and then save as .docx. Pandoc is great until you start dealing with complex .tex files. – jon Mar 13 '16 at 0:43
  • Thanks. @jon, that's very helpful - I hadn't heard of that. I'm using arara with Texshop, do you know if tex4ht can be called from within that? – Jon Mair Mar 13 '16 at 17:20
  • @JonMair -- I'm afraid I know nothing about Texshop. I'm strictly emacs.... – jon Mar 13 '16 at 21:37
1

Depending on the complexity of your source document, you should also be able to get a decent result with pandoc when converting directly from .tex to .docx. Pick an appropriate Chicago-style from the Zotero style repo and convert your file with pandoc -s -S --csl=Chicago_foo.csl --bibliography=foo.bib --filter pandoc-citeproc your_document.tex -o my_submission.docx. As indicated your mileage may vary, make sure you have the latest pandoc installed (1.16.0.2).

  • Thanks -- I really like pandoc, but citeproc doesn't deal with referencing with enough precision for my purposes. I find it doesn't capitalize properly for example. For publishers I need to be able to give them things in exactly the format they specify. Maybe that's a csl problem, but for whatever reason, having tried with a number of different syles, I always seem to have small problems. – Jon Mair Mar 15 '16 at 20:16
  • Yes, the challenge is more to choose a suitable style file (csl) that matches the needed output. – blue_tiger300 Mar 16 '16 at 8:39
1

Thanks to the comments below, I have solved this problem by using tex4ht.

A simple introduction to its use is here: https://github.com/michal-h21/helpers4ht/wiki/tex4ht-tutorial

Note: to use tex4ht with latest versions of biblatex, you need to update one of the tex4ht files, biblatex.4ht. Details here: http://cvr.cc/?p=901#comment-16733

An extra tip: (Calling the command through Texshop) I found the tex4ht command often returned errors, but trashing auxiliary files and rerunning it solved the problem.

0

When I had to submit a Word file for a stage in the editorial process, I decided to use a secondary, or rudimentary option. I compiled my tex project in PDF, then opened it in Adobe Acrobat DC. This software has a powerful export feature to xdoc. So it worked fine, I was surprised.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.