Up: Elements reference



<cite> – bibliographic reference

Attributes:

refid
label(s) of bibliographic entries you want to point to (required, if more than one, then separated by spaces)
kind
"text", "paren", "imparen" or "nocite"

Possible Contents: (Text | inline element)*

Description: The element <cite> is used to refer to other published or unpublished material. Before you can use it, you have to build a bibliographic database outside tbook. Eventually this will be in an XML format, but till then tbook uses BibTeX for this purpose.

So the first step is to create a BibTeX .bib file. Please have a look at the BibTeX documentation or at a good LaTeX book for how to do that. The bib file must be at a place where BibTeX finds it.

Normal citation

The element

     <cite refid="Williams_Kelley1999"/>

inserts a citation reference to the bibliographic entry with the label "Gruber2001" at the current location. The refid can also be a space separated list of more than one citation:

     For further reading, see <cite refid="Williams_Kelley1999 Crawford1998
       Nelson1989"/>.

This refers to the following BibTeX entries in the bib file:

     @MISC{Williams_Kelley1999,
        author = "Thomas Williams and Colin Kelley and Russel Lang and Dave Kotz
                     and John Campbell and Gershon Elber and others",
        title = "Gnuplot",
        month = oct,
        year = 1999,
        url = "http://www.gnuplot.org",
        note = "Das Programm",
     }
     
     @MANUAL{Crawford1998,
        author = "Dick Crawford",
        title = "{g}nuplot, an Interactive Plotting Program",
        month = dec,
        year = 1998,
        url = "http://www.gnuplot.org",
     }
     
     @BOOK{Nelson1989,
        author = "Ross P. Nelson",
        title = "{Programmierhandbuch $80386$ -- Assemblerprogrammierung mit dem
                 Mikroprozessor}",
        publisher = "Vieweg \& Sohn, Braunschweig",
        year = 1989,
     }

The attribute kind determines the kind of insertion. For example,

     <cite refid="Williams_Kelley1999" kind="text"/>

would be printed as

     Williams et.al. (1999)

whereas "paren" makes

     (Williams et.al. 1999)

"imparen" (“implicit parentheses”) produces

     Williams et.al. 1999

If you don't give an explicit kind attribute, tbook tries to find the best choice according to the context. This means that implicit parentheses are assumed if the <cite> element is embraced by parentheses, and "text" otherwise.

You know these “kinds” probably from the natbib package, that's behind all this.

Cite without citing

"nocite" includes nothing in the text, just in the references list at the end:

     <cite refid="Bathe1986" kind="nocite"/>

By the way,

<cite refid="-" kind="nocite"/>

works like \nocite{*} LaTeX, i.e. all entries in your bib file are included in the references list, explicitely cited or not. (An `*' is not allowed in refid.)

Optional contents

The contents of the <cite> element becomes the optional parameter of LaTeX's \cite command. Thus

<cite refid="Einstein1921"><em>first</em> chapter</cite>

yields:

     Einstein (1921, first chapter)