Format Quotes with Citations

Usage

citeL(text.loc = NULL, copy2clip = TRUE, citation = TRUE)

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

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

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

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

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

textciteM(text.loc = NULL, width = 70, force.block = TRUE, copy2clip = TRUE, 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.

Value

Returns a character vector with LaTeX/markdown formatted text.

Description

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

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.

Note

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