cite: Format Quotes with Citations

Description Usage Arguments Details Value Note Warning

Description

Citation tools to grab a quote and format the text taken from the notes.xlsx/notes.csv for LaTeX/Rmd with optional citation included. Functions attempt to copy the output to the clipboard for easy paste inclusion.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
citeL(text.loc = NULL, copy2clip = interactive(), citation = TRUE)

parenciteL(text.loc = NULL, copy2clip = interactive(), citation = TRUE)

textciteL(text.loc = NULL, copy2clip = interactive(), citation = TRUE)

possciteL(text.loc = NULL, copy2clip = interactive(), citation = TRUE)

posciteL(text.loc = NULL, copy2clip = interactive(), citation = TRUE)

parenciteM(text.loc = NULL, width = 70, force.block = TRUE,
  copy2clip = interactive(), citation = TRUE, bib.name = "bib")

textciteM(text.loc = NULL, width = 70, force.block = TRUE,
  copy2clip = interactive(), citation = TRUE, bib.name = "bib")

Arguments

text.loc

The row number (integer value) from notes.xlsx/notes.csv of the text to insert. The user may also input a character string of partial matches of the bibkeys (a quasi-author search). If NULL the interactive use allows the user to view the notes.xlsx/notes.csv and chose a row number.

copy2clip

logical. If TRUE attempts to copy the output to the clipboard.

citation

logical. If TRUE will include the formatted citation + the quote.

width

The widths of a block quote output (for the markdown family only).

force.block

logical. If TRUE forces a block less than 40 words to be a block quote.

bib.name

Optional path to a .bib resource.

Details

Each of the functions in the cite family follow a pattern of (cite, parencite, textcite, posscite, poscite) prefix and (L or M) suffix (note that currently only parencite and textcite functions exist for markdown). The cite and textcite are in the form of LaTeX commands by the same name. posscite and poscite are user defined LaTeX function styles that are extensions of the textcite command to fit possessive and -s- ending possessives. They can be defined as:

\newcommand\posscite[1]{\citeauthor{#1}'s (\citeyear{#1})}
\newcommand\poscite[1]{\citeauthor{#1}' (\citeyear{#1})}

The L and M correspond to LaTeX or markdown outputs; markdown relies on the knitcitations package.

Value

Returns a character vector with LaTeX/markdown formatted text.

Note

It is expected that the user maintains notes.xlsx/notes.csv with markdown notation (e.g., ** for bold type and * for italics).

Warning

The cite family of functions are not designed to be used in text (i.e., using `r FUN()`) as are HTML related functions. It is intended that the user will paste the output into the .Rmd/.tex file manually and make adjustments as necessary.


trinker/reports documentation built on May 31, 2019, 9:51 p.m.