latex - 使用 tufte-latex 包时未定义的控制序列
问题描述
我在一个全新的 bookdown 项目中有一个 pandoc 网格表:
# Hello bookdown
All chapters start with a first-level heading followed by your chapter title, like the line above. There should be only one first-level heading (`#`) per .Rmd file.
+---------------+---------------+--------------------+
| Fruit | Price | Advantages |
+===============+===============+====================+
| Bananas | $1.34 | - built-in wrapper |
| | | - bright color |
+---------------+---------------+--------------------+
| Oranges | $2.10 | - cures scurvy |
| | | - tasty |
+---------------+---------------+--------------------+
bookdown::gitbook
通过and渲染为 html 和普通 pdf很好,但是通过orbookdown::pdf_book
渲染为 tufte 格式失败:tufte::tufte_book
bookdown::tufte_book2
! Undefined control sequence.
<argument> @{} >{\raggedright \arraybackslash
}p{(\columnwidth - 4\tabcolsep...
l.93 ...umnwidth - 4\tabcolsep) * \real{0.29}}@{}}
表结构与生成的其他表不同:
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.22}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.22}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.29}}@{}}
\toprule
Fruit & Price & Advantages \\
...
因此,我认为问题的根源在于tufte-latex
tufte_book 所依赖的包,但我无法进一步缩小范围。
文档的 tex 代码在这里- 罪魁祸首部分从第 96 行开始。
解决方案
这是tufte包中的一个问题。
它现在已在开发版本 0.10.2 中修复,可以从 github 安装
remotes::install_github("rstudio/tufte")
下一个版本 0.11 将在 CRAN 上进行修复
推荐阅读
- c++ - 在另一个类 C++ 中使用对象的重载 istream
- java - getTables 方法不接受架构参数并从所有架构返回表
- python - 我没有手动确认消息,然后rabbitmq在1分钟后再次给它,我可以延长这个时间吗?
- android - 如何将自定义 XML 布局膨胀到自定义 ItemDecoration?
- r - 带有 ggplot2 geom_bar 的分组条形图正在绘制比例而不是计数
- sql - 如何从mssql中的一个到多个相关表中获取每个id的单个记录
- php - 必须禁用先前用户选中的所有复选框
- odp.net - ServiceStack 现在是否支持 Oracle.ManagedDataAccess.Client?
- c - 如何在用 C 编写的引导 CAN 程序上自动启动
- android - 远程禁用使用 Firebase 消息传递的应用程序?