Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to include an abstract in a rmakdown Rmd file

In a .Rmd file with the header below, I want to include an abstract, so I tried the standard LateX article form,

\abstract{This paper explores a variety of topics related to the question of testing the equality of
covariance matrices in multivariate linear models, particularly in the MANOVA setting. 
The main focus is on graphical methods that can be used to understand features of data related
to this question.}

But, surprisingly (I know this seems weird), the references in my References section become badly formatted -- no spacing between references, odd indentations. So, how can I include something that looks like an abstract?

My YAML header is:

---
title: "Notes on Testing Equality of Covariance Matrices"
author: "Michael Friendly"
date: '`r format(Sys.time(), "%B %d, %Y")`'
output:
  pdf_document:
    fig_caption: yes
    keep_tex: yes
    number_sections: yes
    includes:
        in_header: mystyles.tex
 csl: apa.csl
bibliography: 
  - "C:/Users/friendly/Dropbox/localtexmf/bibtex/bib/statistics.bib"
  - "C:/Users/friendly/Dropbox/localtexmf/bibtex/bib/graphics.bib"
---

Edit: Thinking this over, the problem may be that pandoc-citeproc is somehow confused by something done by using \abstract{} in the document.

like image 229
user101089 Avatar asked Apr 02 '16 13:04

user101089


People also ask

What are the three types of sections in an Rmarkdown document?

There are three basic components of an R Markdown document: the metadata, text, and code.

How do I add text to Rmarkdown?

Rmd file, you may now add text to your document. You may start with the most basic word processing—simply typing your text below the YAML header section. If you want to start a new paragraph, you can simply hit Enter twice on your key- board, and begin writing again.


1 Answers

The rmarkdown package now allows for including an abstract in your YAML. Like so:

abstract: "This is my abstract."

See this blog post for an example.

like image 150
Joel Schneider Avatar answered Oct 04 '22 03:10

Joel Schneider