Changes

Jump to navigation Jump to search
5,269 bytes added ,  14:53, 15 October 2019
no edit summary
}}
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>setupcaptions</syntax>
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:location|location]]</td> <td>[[Reference/enCommand/value:top|top]] [[Reference/enCommand/value:bottom|bottom]] [[Reference/enCommand/value:none|none]] [[Reference/enCommand/value:high|high]] [[Reference/enCommand/value:low|low]] [[Reference/enCommand/value:middle|middle]] [[Command/value:left|left]] [[Command/value:right|right]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:width|width]]</td> <td>[[Reference/enCommand/value:fit|fit]] [[Reference/enCommand/value:broad|broad]] [[Reference/enCommand/value:max|max]] [[Reference/enCommand/value:dimension|dimension]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:minwidth|minwidth]]</td> <td>[[Reference/enCommand/value:fit|fit]] [[Reference/enCommand/value:dimension|dimension]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:headstyle|headstyle]]</td> <td>[[Reference/enCommand/value:normal|normal]] [[Reference/enCommand/value:bold|bold]] [[Reference/enCommand/value:slanted|slanted]] [[Reference/enCommand/value:boldslanted|boldslanted]] [[Reference/enCommand/value:type|type]] [[Reference/enCommand/value:cap|cap]] [[Reference/enCommand/value:small|small...]] [[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:style|style]]</td> <td>[[Reference/enCommand/value:normal|normal]] [[Reference/enCommand/value:bold|bold]] [[Reference/enCommand/value:slanted|slanted]] [[Reference/enCommand/value:boldslanted|boldslanted]] [[Reference/enCommand/value:type|type]] [[Reference/enCommand/value:cap|cap]] [[Reference/enCommand/value:small|small...]] [[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:number|number]]</td> <td>[[Reference/enCommand/value:yes|yes]] [[Reference/enCommand/value:no|no]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:inbetween|inbetween]]</td> <td>[[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:align|align]]</td> <td>[[Reference/enCommand/value:left|left]] [[ReferenceCommand/envalue:flushleft|flushleft]] [[Command/value:middle|middle]] [[ReferenceCommand/envalue:flushright|flushright]] [[Command/value:right|right]] [[Reference/enCommand/value:no|no]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:conversionnumberconversion|conversionnumberconversion]]</td> <td>[[Reference/enCommand/value:numbers|numbers]] [[Reference/enCommand/value:characters|characters]] [[Reference/enCommand/value:Characters|Characters]] [[Reference/enCommand/value:romannumerals|romannumerals]] [[Reference/enCommand/value:Romannumerals|Romannumerals]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:wayconversion|wayconversion]]</td> <td>[[ReferenceCommand/envalue:numbers|numbers]] [[Command/value:bytextcharacters|bytextcharacters]] [[ReferenceCommand/envalue:Characters|Characters]] [[Command/value:romannumerals|romannumerals]] [[Command/value:bysectionRomannumerals|bysectionRomannumerals]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:separatorway|separatorway]]</td> <td>[[ReferenceCommand/envalue:bytext|bytext]] [[Command/value:textbysection|textbysection]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:stopperseparator|stopperseparator]]</td> <td>[[Reference/enCommand/value:text|text]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:commandstopper|commandstopper]]</td> <td>[[Reference/enCommand/value:commandtext|commandtext]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[ReferenceCommand/enkeyword:numberstopper|numberstopper]]</td> <td>[[Command/value:text|text]] </td> </tr> <tr valign="top" class="first"> <td class="cmd">[[Command/keyword:prefix|prefix]]</td> <td>[[Command/value:yes|yes]] [[Command/value:no|no]] </td> </tr> <tr valign="top" class="first"> <td class="cmd">[[Command/keyword:suffix|suffix]]</td> <td>[[Command/value:text|text]] </td> </tr> <tr valign="top" class="first"> <td class="cmd">[[Command/keyword:prefixsegments|prefixsegments]]</td> <td>[[Command/value:none|none]] [[Command/value:section|section]] ...</td> </tr> <tr valign="top" class="first"> <td class="cmd">[[Command/keyword:command|command]]</td> <td>[[Command/value:command|command]] </td> </tr> <tr valign="top" class="first"> <td class="cmd">[[Command/keyword:distance|distance]]</td> <td>[[ReferenceCommand/value:dimension|dimension]] </entd> </tr> <tr valign="top" class="first"> <td class="cmd">[[Command/keyword:spaceafter|spaceafter]]</td> <td>[[Command/value:dimension|dimension]] </td>
</tr>
</table>
== Description ==
{| class=wikitable|- style="vertical-align: top" | {{key|location}}| The first option defines the location of the caption relative to the figure itself. The option <code>[location=right]</code> e.g. puts the caption on the right of the figure. The values of the location can be combined, so that <code>[location={right,low}]</code> adjusts the caption position to be to the right of the figure and in a low vertical position. |- style="vertical-align: top"| {{key|width}} | This is the width of the figure caption. If you do not like default captions that are driven by figure (table) width, try: <code>\setupcaptions[minwidth=\textwidth, align=middle]</code>|- style="vertical-align: top"| {{key|headstyle}}| This defines the formatting of the label, i.e. usually the word ''figure'' or ''table'' and its number. For example, <code>[headstyle=\it]</code> will change it to ''italic''.|- style="vertical-align: top"| {{key|style}}| The formatting of the text of the caption, use <code>[style=\it]</code> to get an ''italic'' text. Several values can be given using curly brackets: <code>[style={\it\tfx}]</code>. Please note, that some formatting (such as font size) will affect the head as well.|- style="vertical-align: top"| {{key|number}}| The option <code>[number=no]</code> suppresses the label and figure number.|- style="vertical-align: top"| {{key|inbetween}}| The macros given here are executed after placing the figure and before placing the caption. To set the space between figure and caption to zero use <code>[inbetween=]</code>|- style="vertical-align: top"| {{key|align}}| This can change the alignment of the caption. It can lead to confusion, since ''left'' and ''right'' means ''raggedleft'' and ''raggedright''. So to align a caption ''flush left'', use <code>[align=flushleft]</code>. |- style="vertical-align: top"| {{key|numberconversion}}| Here, it is possible to change the number of the e.g. figure. ''romannumerals'' means, well, roman numerals, the capitalized version capitalizes the number as well. In MkIV, ''numberconversion'' must be used instead of ''conversion''. Example: <code>numberconversion= Description Romannumerals</code>|- style="vertical-align: top" | {{key|conversion}}| This is the MkII version of ''numberconversion''.|- style="vertical-align: top" | {{key|way}}| Using option <code>[way=bysection]</code> resets the numbering to 1 at each new section, but does not prefix the numbers with the section number, to do that, use the following options:<code>\setupcaptions[way=bysection,prefixsegments=section]</code>. If one has only a small number of figures and wishes to label them sequentially from 1 to ''n'', the following works:<code>\setupcaptions[way=bytext, prefixsegments=none]</code>.|- style="vertical-align: top" | {{key|stopper'''}}| MKII only. The stopper text follows the number and, if present, the ''suffix'', and precedes the caption text. It does not appear in references.|- style="vertical-align: top" | {{key|numberstopper'''}}| MKIV only. The numberstopper text follows the number and, if present, the ''suffix'', and precedes the caption text. It does not appear in references.|- style="vertical-align: top" | {{key|separator'''}}| The separator (in MKIV, ''prefixconnector'') text separates components of the number in the caption and in references when sectioned numbers are used.|- style="vertical-align: top" | {{key|suffix'''}}| The suffix text immediately follows the number in the caption and in references.|- style="vertical-align: top" | {{key|prefixsegments}}| To have a figure number such as ''Figure 2.3'', where 2 is the section number and 3 the figure number, you can use this option. Normally, you want to reset the figure number with every section as well, so that ''Figure 2.1'' follows ''Figure 1.12'' instead of ''Figure 2.13''. Therefore, you have to use <code>\setupcaptions[prefix=yes,way=bysection,prefixsegments=section]</code>.|-| {{key|spaceafter}}| Add some vertical space after the caption.|}
== Example ==
<context source=yes>\setuppapersize[A6]\setupexternalfigures[location=default]\setupcaptions[ style={\tfx\setupinterlinespace[line=10pt]}, headstyle=\rm, stopper={:}] \placefigure {Oh caption, my caption!-- Please fill in an example if you can --\crlf (Apologies to Walt Whitman)} {\externalfigure[cow][width=2cm]} \input linden</context>
== See also ==
<!-- something like [[{{cmd:goto|\goto]] }} --> == Help from ConTeXt-Mailinglist/Forum ==All issues with:{{Forum|{{SUBPAGENAME}}}}
[[Category:ReferenceCommand/enFloating|setupcaptions]]td class="cmd">[[Command/keyword:style|style]]

Navigation menu