-
I'm trying to combine Markdown sources with tables full of CSV data and render them as PDF's. The CSV data has localized strings in several languages and character sets. Pandoc doesn't have a problem with this content, and I know the incantations that are necessary to make it render in XeLaTeX. I just need to load a couple extra packages (fontspec and charclasses), then rig up all the code points and ranges that I need with various font declarations. I can get this to work in a raw Markdown file by adding stuff to the Here is a MWE: $ cat <<- EOF | pandoc -o test.pdf --pdf-engine=xelatex -F pantable
---
header-includes:
- \usepackage{fontspec}
---
\`\`\`table
"TRY","₺22,50"
"TND","65.000 دت"
\`\`\`
EOF Note that if you rip out either the line that loads font spec or drop the pantable filter this works fine. (Note it isn't a finished example so the output isn't quite right either way yet, I stripped this down to be a minimalist example. The python error I'm seeing is something like this: Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/bin/pantable", line 10, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/pantable/pantable.py", line 292, in main
doc=doc
File "/usr/lib/python3.7/site-packages/panflute/io.py", line 260, in run_filter
return run_filters([action], *args, **kwargs)
File "/usr/lib/python3.7/site-packages/panflute/io.py", line 233, in run_filters
doc = load(input_stream=input_stream)
File "/usr/lib/python3.7/site-packages/panflute/io.py", line 56, in load
doc = json.load(input_stream, object_pairs_hook=from_json)
File "/usr/lib/python3.7/json/__init__.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.7/json/__init__.py", line 361, in loads
return cls(**kw).decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
File "/usr/lib/python3.7/site-packages/panflute/elements.py", line 1426, in from_json
return RawInline(text=c[1], format=c[0])
File "/usr/lib/python3.7/site-packages/panflute/elements.py", line 764, in __init__
self.format = check_group(format, RAW_FORMATS)
File "/usr/lib/python3.7/site-packages/panflute/utils.py", line 34, in check_group
raise TypeError(msg)
TypeError: element str not in group {'openxml', 'rtf', 'latex', 'icml', 'opendocument', 'context', 'noteref', 'html', 'tex'}
Error running filter pantable:
Filter returned error status 1 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This appears to be an iteration of this Pandoc issue. The example above could be mitigated like this:
|
Beta Was this translation helpful? Give feedback.
This appears to be an iteration of this Pandoc issue. The example above could be mitigated like this: