pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
602 stars 165 forks source link

include-files sub files pipe table can not wrap #195

Closed ajeep8 closed 2 years ago

ajeep8 commented 2 years ago

If these's a pipe table in .md file, it will wrap lines only when line content length >72. so if the line content lenght is long but <=72, pandoc to pdf, the table will expand far to page right and can not see all the content. I can walk around this problem using:

pandoc --columns=10 test.md -o test.pdf

(set columns a very small value than 72) the pipe table line will wrap even the line content<72.

But, if the pipe table is in sub files included by include-files.lua, this trick will not function, I test sub file pipe table only wrap when pipe table line content >80, even I set --columns=10

jgm commented 2 years ago

@tarleb I guess the underlying issue is that there currently isn't a way to set reader options using pandoc.read() in a lua filter -- is that correct?

tarleb commented 2 years ago

Yes, the only read options that can currently be controlled in pandoc.read() are format extensions.

alerque commented 2 years ago

I looks like changes that would enable this have landed in Pandoc and this comment suggests this filter is also updated. Is this fixed now?

tarleb commented 2 years ago

I believe it's fixed, at least when the filter is used with the pandoc nightly.