我刚刚开始在Bookdown中写我的博士学位论文,到目前为止,一切都很好。但我确实遇到的一个问题是,图形标题在输出为PDF格式时似乎只占据页面宽度的60%左右,并且居中。这对于短标题非常有用,但是对于复杂的面板,我的大多数图形标题的长度都在50个字左右。是否有一些LaTeX魔术可以使它们的页面宽度?
谢谢 汤姆
这是我在.md文件中使用的内容:
| Reagent | Amount |
| ------------------------ | -------- |
| Appropriate Buffer (10x) | 1x |
| DNA | 50-500ng |
| Restriction Enzyme | 1*U* |
| Water | - |
Table: (\#tab:restriction-generic) Schematic for restriction digestion with a single restriction enzyme.
答案 0 :(得分:0)
您可以使用LaTeX软件包caption
:
---
output:
bookdown::pdf_document2
header-includes:
- \usepackage[width=\textwidth]{caption}
---
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
| Reagent | Amount |
| ------------------------ | -------- |
| Appropriate Buffer (10x) | 1x |
| DNA | 50-500ng |
| Restriction Enzyme | 1*U* |
| Water | - |
Table: (\#tab:restriction-generic) Schematic for restriction digestion with a single restriction enzyme. Some really long text that shows how the caption is formatted when it takes multiple lines.
输出: