Changes

Jump to navigation Jump to search
Make the example visible
== Description ==
'''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.
'''{| 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=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|suffix'''}}| If you like to have a colon in your caption, try:<code>\setupcaptions[suffix={:}]</code>|- 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[way=bysection,prefixsegments=section]</code>.|}
'''headstyle''': This defines the formatting of the label, i.e. usually the word ''figure'' or ''table'' and its number. For example, == Example ==<codecontext source=yes>\setuppapersize[headstyle=\itA6]</code> will change it to ''italic''. '''style''': The formatting of the text of the caption, use <code>\setupexternalfigures[stylelocation=default]\it]</code> to get an ''italic'' text. Several values can be given using curly brackets: <code>setupcaptions[ style={\ittfx\tfxsetupinterlinespace[line=10pt]}]</code>. Please note, that some formatting (such as font size) will affect the head as well. '''number''': The option <code>[number headstyle=no]</code> suppresses the label and figure number.\rm,  '''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 stopper=]</code> '''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>.  '''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=Romannumerals</code>
'''conversion''': This is the MkII version of ''numberconversion''.\placefigure {Oh caption, my caption!\crlf (Apologies to Walt Whitman)} {\externalfigure[cow][width=2cm]}
'''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]input linden</codecontext>.
'''suffix''': If you like to have a colon in your caption, try:<code>\setupcaptions[suffix={:}]</code>
 
'''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[way=bysection,prefixsegments=section]</code>.
 
<code>conversion</code> works only in MkII, with MkIV <code>numberconversion</code> must be used.
 
== Example ==
<code>
\setupcaption[style={\tfx\setupinterlinespace[line=10pt]}, headstyle=\rm, suffix={:}]
</code>
The caption is smaller than the other text with 10pt interline spacing. The word 'figure' is switched from bold to roman regular and the suffix after figure is ':'.
== See also ==
<!-- something like {{cmd|goto}} -->

Navigation menu