Search code examples
latexmarkdownpandoc

How to left align a whole table in markdown (pandoc)?


How do you left align an entire table in Markdown/Pandoc? I know about different ways of specifying tables and how alignment of columns are done, but I cannot find a way to shift the table from center aligned to left aligned (have even tryed embedding <div style="float: left>..</div> which didn't work). Do I have to switch to LaTeX to do this? I will export to pdf later on, if that makes a difference.


Solution

  • I now found a solution to this problem at tex.stackexchange.com. Apparently pandoc inserts \centering for every float in the document. This can be cancelled by inserting \let\centering\relax in a custom preample to pandoc (as pandoc argument -H custompreample.tex). The link also describes more detailed ways to for example define different floats for tables and figures.