Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rmarkdown: hanging-indent citation

The rmarkdown package uses the biblatex with the chicago author-date style as default.

I would like to use hanging-indent in the references, like it the biblatex-chicago package.

This suggestion by David Sanson of using this:

\setlength{\parindent}{-0.2in}
\setlength{\leftskip}{0.2in}
\setlength{\parskip}{8pt}

Comes very close, but unfortunately it also indents the first line of the first reference, which does not look very good. Any idea's on how to make this work?

like image 809
Bastiaan Quast Avatar asked Nov 13 '15 11:11

Bastiaan Quast


People also ask

How do I indent text in R markdown?

Text can be indented two ways depending on if the indent is within a list or not. Within a list, four spaces at the begin of the line indicates the text is to be indented one nesting level. Use four additional spaces for each additional nesting level. To indent text which is not in a list, use a block quote.

How do you cite R markdown?

To cite the 'rmarkdown' package in publications, please use: JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone (2020). rmarkdown: Dynamic Documents for R. R package version 2.5.

How do you do a hanging indent in latex?

To indent subsequent lines of a paragraph, use the TeX command \hangindent . (While the default behaviour is to apply the hanging indent after the first line, this may be changed with the \hangafter command.) An example follows. \hangindent=0.7cm This paragraph has an extra indentation at the left.

How do you add citations in Rmarkdown?

Items can be cited directly within the documentation using the syntax @key where key is the citation key in the first line of the entry, e.g., @R-base .


1 Answers

Simply add the \noindent command.

# Bibliography
\setlength{\parindent}{-0.2in}
\setlength{\leftskip}{0.2in}
\setlength{\parskip}{8pt}
\noindent
like image 113
Jason Avatar answered Dec 29 '22 10:12

Jason