与knitr一起使用的哪种LaTeX软件包可以获得更多的表控制功能?禁忌? [英] What LaTeX package to use with knitr to get more table-control? tabu?

查看:74
本文介绍了与knitr一起使用的哪种LaTeX软件包可以获得更多的表控制功能?禁忌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在.Rnw文件中print时,我在longtable包中使用xtabletabular.environment='longtable'用knitr编写了一个更长的表,问题是我无法控制longtable环境足够.

I’m writing a longer table with knitr using xtable and the tabular.environment='longtable' in the longtable package when printing 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆