12

I need to use the \cite command in ConTeXt very often for in-text citations in APA format, in a wide range of forms, e.g.:

  1. (Author, YYYY)
  2. Author (YYYY)
  3. (Author, YYYY, p. n)
  4. Author (YYYY, p. n)
  5. (Author, YYYY, p. n; Author, YYYY, p. n) % two or more citations together
  6. Title % title mentioned alone
  7. Year % year mentioned alone
  8. Author's (YYYY) % with possession
  9. (p. n) % page number cited alone
  10. p. n % page number cited alone

Rather than posting a new question each time I encounter a new form which I need to cite (e.g. How to display in-text citations in the `Author (Year)` format in ConTeXt? and How to add page numbers to APA citations in ConTeXt? How to add an APA-style citation with no author in ConTeXt?), I wonder if there is some reference listing all of the available options in the \cite command?

I can find nothing in the ConTeXt manual and nothing in ConTeXt Garden's entry on cite and related entries on bibliographies.

1 Answer 1

16
+100

Documentation:

You can find the documentation for bibliographies here: bibmod-doc

A new implementation is currently in beta. You can find the documentation for it here:

Some examples:

These citation styles seem to work out of the box:

  • (Author, YYYY)

    \cite[alternative=authoryears][author2001]
    
  • Author (YYYY)

    \cite[alternative=authoryear][author2001]
    
  • (Author, YYYY, p. n)

    \cite[alternative=authoryears,extras={, p.~n}][author2001]
    
  • (Author, YYYY, p. n; Author, YYYY, p. n)

    (\cite[alternative=authoryears,left={},right={},extras={, p.~n}][author2001]; \cite[alternative=authoryears,left={},right={},extras={, p.~n}][buthor2001])
    

    This is very clumsy

  • Author (YYYY, p. n)

    \cite[alternative=authoryear,extras={, p.~n}][author2001]
    
  • Year

    \cite[year,left={},right={}][author2001]
    
  • Author's (YYYY)

    \cite[alternative=author,left={},right={}][author2001]'s \cite[year][author2001]
    

    This is not very elegant

Snippets:

To make citing more comfortable, it would be useful to define wrappers:

\def\citet{\dosingleempty\doCiteT}
\def\doCiteT[#1]#2{%
  \iffirstargument
    \cite[alternative=authoryear,extras={, #1}][#2]%
  \else
    \cite[alternative=authoryear][#2]%
  \fi
}

\def\citep{\dosingleempty\doCiteP}
\def\doCiteP[#1]#2{%
  \iffirstargument
    \cite[alternative=authoryears,extras={, #1}][#2]%
  \else
    \cite[alternative=authoryears][#2]%
  \fi
}

\define[1]\citeyear{\cite[alternative=year,left={},right={}][#1]}
\define[1]\citeauthor{\cite[alternative=author,left={},right={}][#1]}

Now you can use:

  • \citet{author2001}
  • \citep{author2001}
  • \citet[p. n]{author2001}
  • \citep[p. n]{author2001}
  • \citeyear{author2001}
  • \citeauthor{author2001}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .