簡體   English   中英

bookdown 圖標題寬度?

[英]bookdown figure caption width?

我剛剛開始在 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.

您可以使用 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.

輸出:

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM