Package 'pinp'

Title: 'pinp' is not 'PNAS'
Description: A 'PNAS'-alike style for 'rmarkdown', derived from the 'Proceedings of the National Academy of Sciences of the United States of America' ('PNAS', see <https://www.pnas.org>) 'LaTeX' style, and adapted for use with 'markdown' and 'pandoc'.
Authors: Dirk Eddelbuettel [aut, cre] , James Joseph Balamuta [aut]
Maintainer: Dirk Eddelbuettel <[email protected]>
License: GPL-3
Version: 0.0.10.1
Built: 2024-10-29 06:02:10 UTC
Source: https://github.com/eddelbuettel/pinp

Help Index


PNAS-alike two-column journal format.

Description

Format suitable for attractive two-column pdf vignettes

Usage

pinp(..., keep_tex = TRUE, citation_package = "natbib", collapse = FALSE)

Arguments

...

Additional arguments to rmarkdown::pdf_document

keep_tex

A boolean toggle to select whether intermediate LaTeX files are to be kept, defaults to TRUE

citation_package

A character variable selecting the LaTeX citation package; defaults to natbib.

collapse

A boolean toggle to enable the knitr option collapse, defaults to FALSE

Value

R Markdown output format to pass to render

Document options

Various aspects of pdf document can be customized by setting either standard rmarkdown options, or any of the following options (which are shown in alphabetical order) in the document metadata:

abstract

(Optional but recommended) A free-format abstract summarizing the document.

acknowledgements

(Optional) A free-format entry which will be placed at the end of the document.

address

(Mandatory) YAML list with entries for code and address. The former matches the affiliation field of the author entry; the letter can be a free-format text giving, say, department and university along with an email address.

author

(Mandatory) YAML list with entries for name and affiliation. The latter is matched to the code entry in address option.

bibliography

(Optional) Name of a .bib file, suffix can be omitted; defaut is no bibliography.

doi

(Optional but recommended) A free-format entry suitable for a doi or url referencing the document or its underlying code.

fontsize

(Optional) Document fontsize, default is 9pt.

footer_contents

(Optional) A free-format entry for text placed in the footer, useful to associate with a package or volume, default is ‘Package Vignette’.

date_subtitle

(Optional) A free-form text string which be used to mention the bibliographic info in a post-print. If not specified, defaults to "This version was compiled on current date" where the current date is filled in.

document_date

(Optional) A free-form text string designed to specify the date of the document. It can be useful for example to specify the exact date of the publication in a post-print. If not specified it defaults to the current date.

headercolor

(Optional) Color code (in hexadecimal notation) for the title and section headers, default is blue tone matching the R logo: 185FAF.

keywords

(Optional) Keywords describing the document, supplied as a list.

lead_author_surnames

(Optional but recommended) A free-format entry for a short author description placed in the footer.

lineno

(Optional) Logical value to select line number display, may only work in one-column mode, default is false.

linkcolor

(Optional) Color code (in hexadecimal notation) for the urls and reference links, default is a light blue tone from the PNAS style: 000065.

numbersections

(Optional) Logical value to select numbered section headers, default is false.

one_column

(Optional) Logical value to select one-column mode, default is false.

one_sided

(Optional) Logical value to select one-sided format, default is false.

output

(Mandatory) Entry to tell rmarkdown to render via pinp; must be pinp::pinp.

secnumdepth

(Optional) Level of (LaTeX) section levels to number, default is 5.

skip_final_break

(Optional) Logical value to skip a final (force) page that is part of the PNAS style, default is false i.e. break is inserted as with PNAS.

title

(Mandatory) document title, no default.

watermark

(Optional) Logical value to select a ‘Draft’ watermark to be added (though figures tend to render above it, default is false.

The vignette source shows several of these options in use, and also describes some of the options.

References

JJ Allaire, R Foundation, Hadley Wickham, Journal of Statistical Software, Yihui Xie, Ramnath Vaidyanathan, Association for Computing Machinery, Carl Boettiger, Elsevier, Karl Broman, Kirill Mueller, Bastiaan Quast, Randall Pruim, Ben Marwick, Charlotte Wickham, Oliver Keyes and Miao Yu (2017). rticles: Article Formats for R Markdown. R package version 0.4.1. https://CRAN.R-project.org/package=rticles

JJ Allaire, Joe Cheng, Yihui Xie, Jonathan McPherson, Winston Chang, Jeff Allen, Hadley Wickham, Aron Atkins, Rob Hyndman and Ruben Arslan (2017). rmarkdown: Dynamic Documents for R. R package version 1.6. https://CRAN.R-project.org/package=rmarkdown

Yihui Xie (2017). knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.17.

See Also

pnas_article in package rticles.

Examples

## Not run: 
rmarkdown::draft("MyArticle.Rmd", template = "pdf", package = "pinp")
rmarkdown::render("MyArticle.Rmd")

## End(Not run)