TransWikia.com

Pandoc Diamond Symbol Not Working With Subscript

TeX - LaTeX Asked on July 14, 2021

I’m trying to convert a book to word format (or at least get a passable first attempt) using pandoc and the book frequently uses the symbol Diamond in equations. However, pandoc’s output gives garbage whenever that symbol is subscripted.

Here is test code of a file and a screen shot of the resulting output

documentclass[11pt,leqno]{article}
usepackage{amsmath,amssymb}

begin{document}

( Diamond phi ) 


( Diamond_{phi} psi iff Box_{phi} phi ) 

end{document}

And here is what is produced after running: pandoc test.tex -o test.docx (latest word for OS X)

pandoc-result

Note that it works fine without a subscript Is there any way to redefine/replace Diamond with some other symbol that pandoc will handle? Other solutions?

(diamond seems to work better but produces much too small a symbol).

One Answer

This is (somehow, obscurely) a problem with Word's default math font.¹ Change the font in Word and the diamond will be displayed correctly:

Fira Math

enter image description here

Libertinus Math

enter image description here

Another solution is converting to .odt with pandoc test.tex -o test.odt and opening the resulting file with Word:

enter image description here


  1. Maybe it is a problem caused by pandoc's docx-writer, that is fixed by changing to another font...

Correct answer by DG' on July 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP