Difference between revisions of "Footnotes"

From Wiki
Jump to navigation Jump to search
m (A slight alteration to the examples.)
(Example for Footnotes in Floats, adapted from ConTeXt manual.)
Line 79: Line 79:
 
==Footnotes in Floats==
 
==Footnotes in Floats==
  
If you need footnotes in [[Floating Objects|floats]] (figures, tables) you need to define local footnotes. ((example?))
+
[[Floating Objects|Floats]] cannot include normal footnotes, because they are likely to float to another page from the page on which they were defined, thus getting the footnotes out of order.  Thus, to include footnotes in a float, one must use local footnotes. This table, which uses the <cmd>placelegend</cmd> command to create a place for the footnotes, illustrates the process:
 +
 
 +
<texcode>
 +
\startlocalfootnotes[n=0]
 +
\placetable{A table with footnotes.}
 +
  \placelegend
 +
    {\starttable[|l|r|]
 +
      \HL
 +
      \VL One\footnote{First} \VL Two\footnote{Second} \VL\FR
 +
      \VL Three\footnote{Third} \VL Four\footnote{Fourth} \VL\LR
 +
      \HL
 +
      \stoptable}
 +
    {\placelocalfootnotes}
 +
\stoplocalfootnotes
 +
</texcode>
 +
 
 +
<context>
 +
\startlocalfootnotes[n=0]
 +
\placetable{A table with footnotes.}
 +
  \placelegend
 +
    {\strut\starttable[|l|r|]
 +
      \HL
 +
      \VL One\footnote{First} \VL Two\footnote{Second} \VL\FR
 +
      \VL Three\footnote{Third} \VL Four\footnote{Fourth} \VL\LR
 +
      \HL
 +
      \stoptable}
 +
    {\placelocalfootnotes}
 +
\stoplocalfootnotes
 +
</context>

Revision as of 20:23, 3 September 2005

< Structurals | References >

Basic Footnotes

For basic footnotes, simply use \footnote[reference]{footnote text}. The reference is optional, and can be used to refer to the same footnote again with \note[reference]. For example:

This\footnote[footA](Or that, if you prefer.} is a sentence with a footnote\footnote{Actually,
two footnotes; this one and footnote \note[footA].}.  

Thanks to Oblomov, it's also possible to use footnotes in footnotes, as in this example.

This\footnote(Or that\footnote{Or possibly even the other.}, if you prefer.} is a sentence
with a footnote.  

Footnote Numbering

You can setup the exact behaviour of footnotes as usual with \setupfootnotes. For example, to use footnotes with standard footnote symbols (which ConTeXt has defined as the conversion "set 2"), with the footnote counter resetting on each page, one would use the following:

\setupfootnotes[way=bypage, conversion=set 2]

This produces the the following footnotes, using the text of the previous example.

Alternate Footnote Locations

The \setupfootnotes command offers some options for the placement of footnotes; for instance, the location=columns option places the footnotes in a single column (of a multicolumn page) rather than across the whole page. The location=text option places the footnotes in text at a location specified by \placefootnotes; this can be easily used to create endnotes, or even to place footnotes after each paragraph or subsection.

\setupfootnotes[location=text]
This\footnote[footA](Or that, if you prefer.} is a sentence with a footnote\footnote{Actually,
two footnotes; this one and footnote \note[footA].}.  
\placefootnotes
This is some more text, with more footnotes\footnote{Specifically, this one.}.
\placefootnotes

Footnotes in Floats

Floats cannot include normal footnotes, because they are likely to float to another page from the page on which they were defined, thus getting the footnotes out of order. Thus, to include footnotes in a float, one must use local footnotes. This table, which uses the \placelegend command to create a place for the footnotes, illustrates the process:

\startlocalfootnotes[n=0]
\placetable{A table with footnotes.}
  \placelegend
    {\starttable[|l|r|]
      \HL
      \VL One\footnote{First} \VL Two\footnote{Second} \VL\FR
      \VL Three\footnote{Third} \VL Four\footnote{Fourth} \VL\LR
      \HL
      \stoptable}
    {\placelocalfootnotes}
\stoplocalfootnotes