jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.57k stars 3.38k forks source link

LaTeX reader does not read \tightlist #6956

Open 0xc0 opened 3 years ago

0xc0 commented 3 years ago

Synopsis: LaTeX writer respects tight list but not LaTeX reader

The LaTeX writer outputs \tightlist within an enumerate or itemize environment for a Markdown list which is single-spaced. However, the LaTeX reader does not read \tightlist.

Steps to reproduce

echo "ol1

1.  aaa
2.  bbb

ol2

1.  ccc

2.  ddd

ul1

-   eee
-   fff

ul2

-   ggg

-   hhh
" | tee test.md && pandoc -f markdown -t latex test.md | pandoc -f latex -t markdown | diff - test.md

There should be no difference when converting this example from Markdown to LaTeX to Markdown.

0xc0 commented 3 years ago

can reproduce on version 2.11.2

jgm commented 3 years ago

We don't guarantee round-tripping in general, and \tightlist is not a standard LaTeX command, but one we provide in the template. Still, we could probably support this.