如何在markdown(pandoc)中使整个表格左对齐? [英] How to left align a whole table in markdown (pandoc)?
问题描述
如何在Markdown/Pandoc中左对齐整个表格?我知道指定表的不同方法以及如何完成列的对齐,但是我找不到将表从中心对齐移到左对齐的方法(甚至尝试嵌入<div style="float: left>..</div>
都行不通).我需要切换到LaTeX来做到这一点吗?稍后,我将导出为pdf.
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.
推荐答案
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.
这篇关于如何在markdown(pandoc)中使整个表格左对齐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!