Pandoc:创建表,Markdown到PDF

时间:2016-03-30 15:18:33

标签: pdf pandoc

我正在尝试使用pandoc在PDF中创建表格。下表在markdown中很好地呈现:

.container {
    float: left;
    width: 100%;
    background-color: black;
    position: relative;
    left: 0;
}

.container:before,
.container:after {
    content: " ";
    display: table;
}

.container:after {
    clear: both;
}

.left-column {
    float: left;
    width: 30%;
    height: 100%;
    position: absolute;
    background: wheat;
}

.right-column {
    float: right;
    width: 70%;
    position: relative;
    padding: 0;
    margin: 0;
    background: rebeccapurple;            
}

但是当我使用| Type of Policy | Expansionary Policy | Contractionary Policy | |---|---|----| | Fiscal Policy | decrease t (increase di, increase C), increase government spending| opposite | | Monetary Policy |decrease rr, decrease dr, buy securities (increase MS, decrease i, increase I)| opposite | 转换时,我得到以下内容:

enter image description here

桌子的宽度是否有这么小的原因?有没有办法轻易改变这个?

1 个答案:

答案 0 :(得分:1)

参见pandoc README,在这种表格中,您可以直观地设置间距。试试,例如。

| Type of Policy  | Expansionary Policy                                                            | Contractionary Policy  |
|-----------------|--------------------------------------------------------------------------------|------------------------|
| Fiscal Policy   | decrease t (increase di, increase C), increase government spending             | opposite               |
| Monetary Policy | decrease rr, decrease dr, buy securities (increase MS, decrease i, increase I) | opposite               |