如何用-tables 和tufte-handouts
正确放置表格描述?请参见以下最小可重现示例,其中图形描述是正确的(从 tikzDevice-manual 中窃取),但表格描述不正确。我一直在努力寻找解决方案,但没有成功。我需要将表格和图形描述放在一致的位置。sideways
xtable
\documentclass{tufte-handout}
\usepackage{rotating}
\usepackage{tikz}
\begin{document}
<<plotchunk, echo=FALSE, message=FALSE, results=FALSE, warning=FALSE, error=FALSE>>=
library(tikzDevice)
tikz("tikz-example.tex",
width = 3.25, height = 3.25)
plot(1, 1, main = "Hello \\TeX !")
@
\begin{figure}
\centering
\input{tikz-example.tex}
\caption{This figure-description is where it should be, and with the correct direction}
\end{figure}
<<tablechunk, results='asis', echo=FALSE>>=
library(xtable)
example.df <- data.frame(matrix(0, nrow=10, ncol=20))
x.small <- xtable(example.df, label=NULL, caption="This is the table description that should not be sideways, but placed similarly as the figure-description")
digits(x.small) <- 0
print(x.small,include.rownames=FALSE,floating.environment="sidewaystable")
@
\end{document}
如果侧桌可以旋转 180 度,那就太好了,但这不是必需的。