在编织为PDF的R markdown文档中,我可以在单个文档中使用不同的线段吗?如果是,如何?在下面的示例中,我将YAML中的线段拉伸设置为1.5,但我想将1/2的方式更改为1。
---
title: "Untitled"
author: "me"
date: "today"
output:
pdf_document:
latex_engine: lualatex
number_sections: no
linestretch: 1.5
---
this text has a line stretch of 1.5
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text
now the text below should have no line stretch:
some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text
答案 0 :(得分:1)
使用\setstretch{}
---
title: "Untitled"
author: "me"
date: "today"
output:
pdf_document:
latex_engine: lualatex
number_sections: no
linestretch: 1.5
---
this text has a line stretch of 1.5
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text
now the text below should have no line stretch:
\setstretch{1}
some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text some tigther text