与knitr一起使用的哪种LaTeX软件包可以获得更多的表控制功能?禁忌? [英] What LaTeX package to use with knitr to get more table-control? tabu?
问题描述
当我在.Rnw
文件中print
时,我在longtable包中使用xtable
和tabular.environment='longtable'
用knitr编写了一个更长的表,问题是我无法控制longtable环境足够.
I’m writing a longer table with knitr using xtable
and the tabular.environment='longtable'
in the longtable package when print
ing them in my .Rnw
-file, problem is that I can’t control the longtable environment enough.
我想在表格中以某种方式左对齐并用连字号代替文本(即,我的一些单元格中包含很多文本)
I have some text I would like to have left-justified and hyphenated in a certain way inside the table (i.e. I have some cells with quite a lot of text)
有关如何执行此操作的任何建议?您会推荐什么套餐?有人尝试过tabu
软件包吗?
Any advice on how I could do this? What packages would you recommend? Anyone tried the tabu
package?
我主要要寻找的是一种在表格中以一种很好的方式证明我的文字正确的方法.与此类似,
What I am mainly looking for is a way to justify my text in a nice way inside my table. Something along the lines of this,
推荐答案
我可以确认(作为xtable
的维护者)不需要反斜杠.我已经更新了R-Forge上xtable
的文档.
I can confirm (as maintainer of xtable
) that no backslashes are needed. I have updated the documentation of xtable
on R-Forge.
一些注意事项:
在xtable
图库插图中有一个使用固定宽度对齐的示例.
There is an example of the use of fixed width alignments in the xtable
Gallery vignette.
另外,一个稍微简单的规范也可以工作,即align = "llp{5cm}"
Also, a slightly simpler specification works, namely, align = "llp{5cm}"
这篇关于与knitr一起使用的哪种LaTeX软件包可以获得更多的表控制功能?禁忌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!