Changes

Jump to navigation Jump to search
62 bytes removed ,  07:51, 6 October 2015
enhanced formatting, some hints about MkII/MkIV, tried to change default to MkIV
==Basic Footnotes==
For basic footnotes, simply use <{{cmd>|footnote</cmd><tt>|[reference]{footnote text}</tt>}}.The reference is optional, and can be used to refer to the same footnote again. Footnotes can be referenced with the usual <{{cmd>|in</cmd> }} and <{{cmd>|at</cmd> }} macros (see [[References]]), or the note itself can be reproduced with <{{cmd>|note</cmd><tt>|[reference]</tt>}}. For example:
<texcode>
==Footnote Numbering==
You can setup the exact behaviour of footnotes as usual with <{{cmd>|setupnotation|[footnote]}} (MkII: {{cmd|setupfootnotes</cmd>}}). 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:
<texcode>
\setupfootnotessetupnotation[footnote][way=bypage, conversionnumberconversion=set 2]
</texcode>
Beware, in MkIV In MkII this becamewas:
<texcode>
\setupnotation[footnote]setupfootnotes[way=bypage,numberconversionconversion=set 2]
</texcode>
==Alternate Footnote Locations==
The <{{cmd>|setupfootnotes</cmd> }} (MkII) command offers some options for the placement of footnotes; for instance, the <code>location=columns</code> option places the footnotes in a single column (of a multicolumn page) rather than across the whole page. The <code>location=text</code> option places the footnotes in text at a location specified by <{{cmd>|placefootnotes</cmd>}}; this can be easily used to create endnotes, or even to place footnotes after each paragraph or subsection.
<texcode>
\setupfootnotes[location=text]% MkII
This\footnote[footA]{Or that, if you prefer.} is a sentence with a footnote\footnote{Actually,
two footnotes; this one and footnote \note[footA].}.
==== Footnotes at the end of each chapter ====
Another elegant example (given by Hans on the mailing listMkIV) example places all footnotes in a subject (unnumbered section) at the end of each chapter. It is intelligent and will not create an empty subject when there are no footnotes to be placed. At no extra cost, the subject title "Footnote" will be singular or plural depending if there is only one or several footnotes to be placed:
<texcode>
You can change the font used in the footnotes with
<{{cmd>|setupfootnotedefinition</cmd><code>|[before=\MyFontCommand]</code>}}.
Footnotes can be placed in multiple columns, using the <ttcode>n=<i>number</i></ttcode> option in <cmd>setupfootnotes</of {{cmd> (in latest betas it should be added to <cmd>|setupnotes</cmd> }} or <{{cmd>|setupnote</}} (MkII: {{cmd> instead|setupfootnotes}}).
<texcode>
\setupfootnotes[n=3]% MkII
This\footnote[footA](Or that\footnote{Or the other.}, if you prefer.} is a sentence
with a footnote\footnote{Actually, two footnotes; this one and \in{footnote}[footA]
<texcode>
\setupbodyfont
[pagella]
 
\setupnote
[footnote]
==Footnotes in Floats==
[[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>
==Footnotes in a box==
Note that it is necessary to add the command <{{cmd>|automigrateinserts</cmd>}} (for example before <{{cmd>|link=no|starttext</cmd>}})in order to correctly handle the placement of footnotes within a box such as <{{cmd>|framed</cmd> }} or <{{cmd>|placeongrid</cmd>}}...
==Placing Footnotes Manually==
In some cases, ConTeXt's footnoting system may not be able to do exactly what you want. For instance, you may want to place a footnote in a table so that the footnote appears with the rest of the footnotes on the page, or you may want to create a footnote to a footnote to a footnote. Many of these cases can be handled by using the <{{cmd>|footnotetext</cmd> }} command (which creates a footnote without placing the corresponding symbol in the text) and the <{{cmd>|note</cmd> }} command (which places the footnote symbol in the text, but does not create a footnote).
For example, to create a footnote to a footnote to a footnote, all but the first footnotes are created with <{{cmd>|footnotetext</cmd> }} commands, which are placed in the main text -- thereby ensuring that the footnotes are numbered and appear in the correct order. Then, these footnotes are referenced by <{{cmd>|note</cmd> }} commands within the relevant footnotes. In this example, the lines are broken for clarity; note the <ttcode>%</ttcode> at the end of each line to prevent spurious spaces in the text.
<texcode>
The boolean {{cmd|link=no|notesenabled}} controls whether footnotes are processed at all.
If set to ''false'', invocations of {{cmd|footnote}} will be ignored.
After it is set to ''true'' again Context ConTeXt will pick up the footnote counters at their
previous state, so numbering will continuous.
== Color of Footnote Links that Refer to the Same Page ==
If you have set footnotes to be interactive and have noticed that your footnote links become red, it is because they are linked to content on the same page on which they appear. This means they are governed by the \{{cmd|setupinteraction }}’s attribute of '<code>contrastcolor'</code>, rather than '<code>color'</code>.
To fix the redness (or change it to a different color), try:
</texcode>
* How can I change the placement of the footnote mark? Currently, footnotes are set so that the left end of the text of the footnote is aligned with the left edge of the text, and the footnote number hangs out into the margin. Is it possible to change this? (For instance, suppose I would like the number aligned to the text-edge, and then a fixed-width space, and then the text?)
This behavior is controlled by the <code>location</code> key in the <code>\of {{cmd|setupnotation</code> command}}. Here are some examples:
Note number is typeset in an area with a width of 1cm1 cm, aligned at the left of the text area:
<context source="yes" text="produces">
Suppose that one wants a width of 1.5em5 em. Then
<texcode>

Navigation menu