Reduce cell width and font size of table using pandoc.table()

前端 未结 2 780
心在旅途
心在旅途 2021-02-02 12:35

I\'m using knitr and pander to make a table in a markdown file. I\'m converting the markdown file to a PDF using Pandoc from within R.

This cod

2条回答
  •  清歌不尽
    2021-02-02 12:54

    You can change the fontsize for specific cells in pander, and thus the entire table, but as a workaround using latex code.

    Where your cell is, if the data populating your cell is "770" next to another cell populated by "$731,258", If you replace the first cell by paste0("\\scriptsize", "770"), your output will look like something like this:

    as you can see, the "770" is in a smaller font. You can do this with any latex font tag.

提交回复
热议问题