pandoc error: divide by zero
<p>I am writing a book. The orginal format is reST, and sphinx is used to generate HTML/epub format. However it has to be converted into docx, since the editor think it is a good raw format for Indesign in their daily process. </p>

<p>A shell script is used:</p>

<pre><code>#!/bin/bash
cd ./source
echo foreword
pandoc -o foreword.docx foreword.rst
echo ch001
pandoc -o ch001.docx ch001.rst
echo ch002
pandoc -o ch002.docx ch002.rst
echo ch002b
pandoc -o ch002b.docx ch002b.rst
echo ch003
pandoc -o ch003.docx ch003.rst
echo ch004
pandoc -o ch004.docx ch004.rst
echo ch005
pandoc -o ch005.docx ch005.rst 
echo ch006
pandoc -o ch006.docx ch006.rst
echo ch007
pandoc -o ch007.docx ch007.rst
echo ch008
pandoc -o ch008.docx ch008.rst
echo ch009
pandoc -o ch009.docx ch009.rst
echo futureplan
pandoc -o futureplan.docx futureplan.rst

mv *.docx ../release/

cd ../
</code></pre>

<p>I got the following result from console:</p>

<pre><code>foreword
ch001
ch002
ch002b
ch003
pandoc: divide by zero
ch004
ch005
pandoc: divide by zero
ch006
pandoc: divide by zero
ch007
pandoc: divide by zero
ch008
pandoc: divide by zero
ch009
pandoc: divide by zero
futureplan
</code></pre>

<p>Any document which was complainted for divide by zero has only 30B in file size.</p>

<p>Please tell me know to locate and fix that error. I can not find any clue from documentation and group.</p>

<p>Maybe it is a bug, but I have to avoid this issue since the scheduler is very tight.</p>