Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I try to convert Markdown files to PDF with

FOR %%i IN (*.md) DO pandoc "%%~fi" -o "%%~dpni.pdf" --template=weber-export.tex --pdf-engine=xelatex

But it wont convert pandoc-tables. instead there occurs an error saying

Error producing PDF.
! Missing number, treated as zero.
<to be read again>
                   (
l.357 ...columnwidth - 2abcolsep) * 
eal{0.33}}

Simply Version of the tables it wont convert are :

 Consumption / yield
---------------------

+--+---+--+
|  |   |  |
|  |   |  |
|  |   |  |
+--+---+--+
|  |   |  |
|  |   |  |
|  |   |  |
+--+---+--+
|  |   |  |
|  |   |  |
|  |   |  |
+--+---+--+

and

  -------------------------------------------------------------------
  Type                            Sales unit   Number
  ------------------------------- ------------ ----------------------
  Plastic bucket                  30 liters    18 buckets
  -------------------------------------------------------------------

like its explained in the Pandoc User's Guid

I have installed Miktex 2.9 and pandoc 2.11.2 on Win 10

Without the tables, the conversion is doing well, even when i try out tables without the first line like

  Type                            Sales unit   Number
  ------------------------------- ------------ ----------------------
  Plastic bucket                  30 liters    18 buckets
  -------------------------------------------------------------------

it works.

any suggestions? Is it a bug, or what am i doing wrong?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
789 views
Welcome To Ask or Share your Answers For Others

1 Answer

It seems that your custom template does not load all necessary packages.

Add

usepackage{calc,array}

to your template to ensure the necessary commands are available.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...