Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.01k stars 957 forks source link

Ability to align tables #340

Open Boggin opened 1 year ago

Boggin commented 1 year ago

I would like to left align tables. The following preamble, .md -> .pdf, causes an error as the 'float' package is also loaded.

- \usepackage[margins=raggedright]{floatrow}

Anyone know how to align tables, please?

Sorry, not really an Issue but there isn't a Discussion tab open.

kflak commented 1 year ago

I would love this as well. Have you found a solution?

mrichman commented 4 months ago

This works perfectly for me:

header-includes:
  - \usepackage[margins=raggedright]{floatrow}
kflak commented 4 months ago

Hmmmm... pandoc refuses to compile when I use that option...

rpinna commented 2 days ago

Same issue here. Adding...

header-includes:
  - \usepackage[margins=raggedright]{floatrow}

results in...

~/ $ yarn docs access-control:pdf
Error producing PDF.
! Package floatrow Error: Do not use float package with floatrow.
(floatrow)                The latter will be skipped.

See the floatrow package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.33   \@namedef{opt@floatrow.sty}{}\endinput}

Package script is:

    "access-control:pdf": "cd designs && mkdir -p dist && pandoc --metadata-file metadata-access-control.yml --template eisvogel --toc -F mermaid-filter -o dist/access-control.pdf chapters/5*.md && echo \"PDF generated at docs/access-control/dist/access-control.pdf\"",

Would love to have an answer, but not willing to learn Tex in order to find one :)

rpinna commented 2 days ago
"access-control:pdf": "cd designs && mkdir -p dist && pandoc --metadata-file metadata-access-control.yml --template eisvogel --toc -F mermaid-filter -o dist/access-control.pdf chapters/5*.md && echo \"PDF generated at docs/access-control/dist/access-control.pdf\"",

In my case it was the mermaid-filter. Removing it resolves the issue. Unfortunately, I would rather have mermaid than left aligned tables. :(