在bookdown中的双栏文章

问题描述 投票:0回答:1

我正在使用bookdown :: pdf_document2,我想创建一篇包含2列的文章。我正在使用bookdown来进行部分引用。

我使用pandoc_args: [ "-V", "classoption=twocolumn",但这使它忽略了字体,并默认为计算机现代。有没有办法用pdf_document2获得2列文章?

我使用以下标题:

output:
  bookdown::pdf_document2:
    fig_crop: no
    keep_tex: yes
    latex_engine: xelatex
    number_sections: yes
    toc: yes
    toc_depth: 5
fontsize: 12pt
editor_options:
  chunk_output_type: console
sansfont: Source Sans Pro
mainfont: Source Sans Pro
mathfont: Calibri
r-markdown bookdown
1个回答
0
投票

您可以在YAML标头中设置classoption:

---
output:
  bookdown::pdf_document2:
    fig_crop: no
    keep_tex: yes
    latex_engine: xelatex
    number_sections: yes
    toc: yes
    toc_depth: 5
fontsize: 12pt
editor_options:
  chunk_output_type: console
sansfont: Liberation Sans
mainfont: Liberation Sans
classoption: twocolumn
---

我将字体更改为我的系统上可用的字体。

© www.soinside.com 2019 - 2024. All rights reserved.