Changes

Jump to navigation Jump to search
1,649 bytes added ,  21:20, 19 February 2022
m
→‎Footnotes in Floats: - comment align key
< [[Structurals]] | [[References]] >
 
{{todo|This page needs to be reorganized: progression from simple to more complex use is a bit circular..}}
<texcode>
This\footnote[footA]({Or that, if you prefer.} is a sentence with a footnote\footnote{Actually,
two footnotes; this one and \in{footnote}[footA] on \at{page}[footA], denoted by \note[footA].}.
</texcode>
\starttext
\strut\vfill % A hack to shorten the page.
This\footnote[footA]({Or that, if you prefer.} is a sentence with a footnote\footnote{Actually,
two footnotes; this one and \in{footnote}[footA] on \at{page}[footA], denoted by \note[footA].}.
\stoptext
<texcode>
This\footnote({Or that\footnote{Or possibly even the other.}, if you prefer.} is a sentence
with a footnote.
</texcode>
\starttext
\strut\vfill % A hack to shorten the page.
This\footnote({Or that\footnote{Or possibly even the other.}, if you prefer.} is a sentence
with a footnote.
\stoptext
</context>
==Footnote Numbering==
==Footnote Numbering==You can setup the exact behaviour of footnotes with {{cmd|setupnotation|[footnote]}} (MkII: {{cmd|setupfootnotes}}).(The command page for the MkIV version is still missing, refer to the old version; translate location to alternative and conversion to numberconversion.)
You can setup the exact behaviour of footnotes with {{cmd|setupnotation|[footnote]}} (MkII: {{cmd|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:
<texcode>
<context>
\setupfootnotessetupnotation[footnote][way=bypage, conversionnumberconversion=set 2]
\starttext
\strut\vfill % A hack to shorten the page.
This\footnote[footA]({Or that, if you prefer.} is a sentence with a footnote\footnote{Actually,
two footnotes; this one and \in{footnote}[footA] on \at{page}[footA], denoted by \note[footA].}.
\stoptext
<texcode>
\startsetups [chapter:after]
\ifcase\rawcountervalue[footnote]\relax
\or
\setuphead[chapter][aftersection=\setups{chapter:after}]
 
\starttext
 
\startchapter[title={Chapter One}]
 
This one\footnote{is placed}. And\footnote{this one is too}.
 
\stopchapter
 
\chapter[title={Chapter Two}]
 
But this one\footnote{is not flushed}.
 
\startchapter[title={Chapter Three}]
 
Unless \type{\stopchapter} was invoked.
 
\stopchapter
 
\startchapter[title={Chapter Three}]
 
On a chapter with\footnote{footnote}.
 
\stopchapter
 
\stoptext
</texcode>
width=\rightmarginwidth
]{\placenotes[footnote]}}]
</texcode>
 
===... but not at the bottom===
 
Hraban wanted numbered margin notes, starting in on the same line as the referenced text (like a combination of {{cmd|inmargin}} and {{cmd|footnote}}). Wolfgang answered:
 
The only way I found to achieve this is by flushing the notes at the end of each footnote
entry which can be done with the next key. The positioning of each margin text is tricky
because {{cmd|placenotes}} adds skips at the begin of the block (which can be reduced with
{{cmd|placelocalnotes}}) but a inline version of the command (e.g. <tt>\placeinlinenotes</tt>) which
flushes the notes without vertical skips and a rule at the begin would help.
 
<texcode>
\define\PlaceFootnote
{\inrightmargin{\vtop{\placelocalnotes[footnote][before=,after=]}}}
 
\setupnote
[footnote]
[location=text,
bodyfont=,
next=\PlaceFootnote]
 
\setupnotation
[footnote]
[alternative=serried]
 
\setuplayout
[width=12cm,
rightmargindistance=0.5cm,
rightmargin=5cm]
 
\starttext
\dorecurse{6}{\input ward\expanded{\footnote{This is a footnote \recurselevel}} }
\stoptext
</texcode>
\starttext
\strut\vfill % A hack to shorten the page.
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]
on \at{page}[footA], denoted by \note[footA].}.
[width=\hsize,
frame=off,
%align=right,
%height=fit,
top=\hbox\bgroup,
\starttext
\startlocalfootnotes%[n=0]
\placetable
{Caption}
<context>
\starttext
\strut\vfill
This%
\footnotetext[footC]{It could be something entirely different.}
is a sentence with nested footnotes.
\stoptext
</context>
For more fancy footnote rules, you can use <code>rulecommand=\MyRuleCommand</code>. Look at the definition of <code>\normalnoterule</code> in strc-not.mkvi for a starting point.
 
[[Category:Basics]]
174

edits

Navigation menu