R markdown/bookdown-如何在摘要下方显示关键字? [英] R markdown / bookdown - how to display keywords below an abstract?
本文介绍了R markdown/bookdown-如何在摘要下方显示关键字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在.Rmd文件中定义了关键字,但是它们在输出PDF中不可见.
I defined keywords in the .Rmd file, but they are not visible in the output PDF.
当前输出
预期结果
当前.Rmd
.Rmd文件的第一行如下:
First lines of .Rmd file looks as follows:
---
title: "No keywords within the output file"
abstract: "This is sample text for abstract. Generally speaking, I would like to show keywords list below an abstract (as in case of the linked example)"
keywords: "keywordA, keywordB"
author: "Mateusz Kędzior"
output:
bookdown::pdf_document2:
keep_tex: true
number_sections: yes
toc: false
base_format: rticles::elsevier_article
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Elsevier article
This is an R Markdown document.
I'm trying to prepare an Elsevier article.
推荐答案
我想知道base_format
在您的示例中是否实际上在做任何工作(有和没有base_format
的输出看起来都一样).由于base_format
是pdf_book
的参数,因此请考虑将YAML标头更改为
I wonder if base_format
is actually doing any work in your example (the output looks the same with and without base_format
). Since base_format
is an argument to pdf_book
, consider changing your YAML header to
---
title: "No keywords within the output file"
author:
- name: "Mateusz Kędzior"
abstract: "This is sample text for abstract. Generally speaking, I would like to show keywords list below an abstract (as in case of the linked example)"
keywords: "keywordA, keywordB"
output:
bookdown::pdf_book:
keep_tex: true
number_sections: yes
toc: false
base_format: rticles::elsevier_article
---
为您提供以下输出:
或者,在摘要中添加关键字:
Alternatively, add keywords to the abstract:
abstract: "This is sample text for abstract. Generally speaking, I would like
to show keywords list below an abstract (as in case of the linked example) \\par
\\textbf{Keywords:} a, b"
获得
这篇关于R markdown/bookdown-如何在摘要下方显示关键字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文