Reputation: 5600
In the YAML header of a pandoc's markdown file, it's possible to write an abstract. I wonder if there is a way to change the word "abstract" in the rendered document to something else like either word "summary" or equivalent in another language.
If not, what alternatives could be suggested? I'm using R Markdown.
p.s. My question is related to this comment.
Upvotes: 7
Views: 2499
Reputation: 52506
The HTML template now includes the abstract, and its heading can be customized using the metadata variable abstract-title
:
---
title: A title
author: An author
abstract: >
The abstract.
abstract-title: Summary
---
Notice that this only affects the HTML, EPUB, and docx writers, though.
Upvotes: 1
Reputation: 22659
If your main interest is in localization of your document, you can add an lang
meta value to your document. E.g., setting lang: lt
will give "Santrauka" instead of "Abstract" in the produced PDF.
Upvotes: 3
Reputation: 368539
Yes. But not automatically. You would have to redefine the abstract
environment to start with a different header, or at least redefine the \abstractname
variable as article.cls
has this:
\newenvironment{abstract}{%
\titlepage
\null\vfil
\@beginparpenalty\@lowpenalty
\begin{center}%
\bfseries \abstractname %%%% This what you need to redefine
\@endparpenalty\@M
\end{center}}%
{\par\vfil\null\endtitlepage}
So you can do something like the following minimal example:
---
title: "Test Document"
author: "Some User"
output: pdf_document
abstract: >
One or two sentences describing it all.
header-includes:
\renewcommand{\abstractname}{My Very Own Summary}
---
## R Markdown
This is an R Markdown document.
which does what you desire:
Upvotes: 6