I would like to know the best practice to get "universal" cite commands.
Across the different articles, I have written, each has had a different template for a different publication venue. And, each template seems to be paired with their own unique commands for citations: \cite
, \autocite
, \citep
, \citeN
, \citeyear
, etc…
In the spirit of separating content and styling, I would like to make it so that I can easily switch templates, without having to –Replace All– of one cite command for another.
So, my question is this: What is the best tactic to obtain universal cite commands? Does the choice of BibTex or BibLatex make a difference with regards to cite commands? Or should I define new commands that make use of template defined commands.
In addendum, I would like to ask, if defining new commands is the way to go, can you please supply an example of how to define new commands making use of existing cite commands?
Hope this is clear.
Thanks in advance! =)
UPDATE:
I see that \autocite
allows for one to choose the formatting of the command to produce parenthesis or footnote citations. This is, however, not the functionality that I seek.
For example, if we look at the ACM latex template (acmsmall): http://www.acm.org/publications/latex_style/
The documentation states the following, "If you mention the work explicitly in your prose, you should use \citeN
command. This command generates for example, Nielson [1985] discusses denotational program transformations. Or, you use \citeyear
and say that Nielson [1985] discusses them." The documentation continues to define other commands like \citeNP
also.
If I format my text using these commands, but then switch templates, I must replace all the citation commands, depending on what is defined by the other templates. What I would like to do is define my own abstraction layer of commands, that I can change to adhere to each of the different templates. If I use \citeN
at the start of my sentence, but the next template doesn't define this command, I would like to define it myself. Thereby slowly building up a set of citation commands that are "universal". Is this the best practice, or is there a better way to go about this?
I see the possibility of declaring cite commands in: renewcommand \cite[99]{Turing} vs. \cite{Turing}
Please let me know if there is more confusion.
Best Answer
If you really want to have one set of citation commands, a good starting point seems to be the list of commands provided by
biblatex
(or rather its standard styles), as outlined in ยงย 3.7 Citation Commands, p. 79 of thebiblatex
documentation.You should then use the appropriate command for the task at hand. I have listed some of the commands I regard as elementary (and their use cases) below. Note that all
biblatex
cite commands come with a 'capitalised version' (the first letter of the command name is capitalised) that should be used at the beginning of sentences, those commands capitalise the first word they print (e.g.,\cite
and\Cite
).If you only have one style for citations in your document, configure
\autocite
so that it gives the expected output. If you have several different styles, configure\autocite
to give the most common style.Use
\cite
to refer to the work itself as the subject (or object) of a sentence. For example:\parencite
for parenthetical citations, for example to give the exact source of a particular quote:Ideally, you wouldn't even use
\parencite
directly, you'd use the high-level\autocite
command together with the appropriateautocite
option for citations like these.\footcite
for citations in footnotes; in my experience the use cases of\parencite
and\footcite
are very similar, one will probably use one or the other, but there is\autocite
to take care of that.\textcite
to obtain the author/editor (as the subject of a sentence) and a parenthetical reference to the particular work.\citeauthor
/\citeyear
/\citetitle
to print just the author, year, title the entry. Only use this if you need to refer to the year, title etc., do not use those commands to mimic the behaviour of\textcite
. That is: Do not write\citeauthor{foo} (\citetitle{foo}) found ...
if you use a author-title style, because you might change to a author-year style which would require\citeauthor{foo} (\citeyear{foo}) found ...
. Use\textcite{foo} found ...
instead.Most (if not all)
biblatex
styles should come with at least that set of commands. So you should be fine there.If, however, you use templates that do not rely on
biblatex
, you could try to define the set of commands below. In your example,\citeN
seems to be equivalent to\textcite
, so you could tell LaTeX to\let\textcite\citeN
and use\textcite
in your document. (Of course, the publisher might not be particularly happy about this seemingly nonsensical\let
ting around of macros, but that's another story.) If you use a template with an author-year style that does not provide a\textcite
you might define it yourself viaOf course this definition does not at all take care of pre- and postnotes, but it might be enough to get along in one document. If you use
biblatex
you should use\DeclareCiteCommand
and internal bibmacros instead, but that might get more involved.If your template does not offer an
\autocite
but does have a\parencite
equivalent, do not hesitate to\let\autocite\parencite
so you can use\autocite
consistently throughout all of your documents.You see, there is no easy solution that can be applied to normalise bibliography styles in different templates. One will always have to look very thoroughly at the commands provided, and - at best - can hope to find (or define) commands equivalent to the "standard" macros one expects to find. But this can at times be quite a tough ask.