lua-filters icon indicating copy to clipboard operation
lua-filters copied to clipboard

Provides Longtable-to-xtab filter

Open jdutant opened this issue 4 years ago • 3 comments

Convert Pandoc's LaTeX table output from longtable to xtab. This addresses the issue of longtables not being compatible with multiple columns layouts.

Could be improved by turning table headers into proper xtab header code (see README).

jdutant avatar Jan 17 '21 00:01 jdutant

Those TeX hacks are really clever; I never thought about changing tables by redefining the commands. I haven't done a complete review yet, but looks good. I only noticed some inconsistent indentation in Lua and overlong lines in the README.

tarleb avatar Jan 18 '21 14:01 tarleb

Thanks I'll clean that up asap.

jdutant avatar Jan 26 '21 01:01 jdutant

Seems like this table

| kjh | kjh |
| --- | --- |
| 1   | 2   |
| 4   | 3   |

: this is a test {#tbl:asd}

results in this error for me:

Error producing PDF.
! Missing \endgroup inserted.
<inserted text> 
                \endgroup 
l.142 \caption{\label{tbl:asd}this is a test}

The label is not the culprit.

pandoc 2.14.0.3
Compiled with pandoc-types 1.22.1, texmath 0.12.3.2, skylighting 0.10.5.2,
citeproc 0.4.0.1, ipynb 0.1.0.2

Update:

Adding this line did the trick for me:

element.caption.long = {}

I then got errors due to \fi, so i disabled the if #element.head[2] > 0 then statement.

I'll try to report here if i run into any issues with this solution.

pbsds avatar Feb 15 '22 23:02 pbsds