Changes

Jump to navigation Jump to search
3,055 bytes added ,  20:01, 30 August 2020
no edit summary
<cd:commandgroup generated="yes" name="setuplabeltext" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->The instances of <tt>\setup<i>label</i>text</tt> are used for ...to fill in a class of labels
</cd:shortdesc>
<cd:sequence>
</cd:sequence>
<cd:instances>
<cd:constant value="head">Certain sections, like the table of contents or the list of figures, have a default title head. This title can be altered with {{cmd|setupheadtext|[name=text]}}. See [[#Description]] for the list of defined section head labels.</cd:constant> <cd:constant value="label">This class holds most other labels like the '''Figure''' and '''Table''' used in float captions.</cd:constant>
<cd:constant value="mathlabel"></cd:constant>
<cd:constant value="taglabel"></cd:constant>
</cd:command>
</cd:variants>
<cd:description><!-- In some cases ConTeXt generates text labels automatically; for example,the word ''Figure'' is generated automatically when a caption is placedunder a figure. These kind of words are called label texts. Labels areset with the command {{cmd|setuplabeltext}}, and retrieved with thecommand {{cmd|labeltext}}. They follow the language set with{{cmd|mainlanguage}}, not the long description local bits of different language that areset with {{cmd|language}}. '''NB''' The ''option parser'' for the command goes {{gen|setuplabeltext}}is [http://www.ntg.nl/pipermail/ntg-context/2012/067585.html known] tobehave somewhat differently from most setups, posing minor constraintson code formatting.For instance the trailing comma after an assignment, otherwise employedto delimit the value, will lead to an error here.The final option in the list needs thus to be terminated by the closingbracket. <texcode>\setuplabeltext [ Nomen=nomen, Est=est, Omen=est, %% <= fails!]\setuplabeltext [Nomen=nomen, Est=est, Omen=est] %% <= works\starttext\labeltext{Nomen}\labeltext{Est}\labeltext{Omen}\stoptext</texcode> For {{cmd|setupheadtext}}, here is the list of known section heads: {| class="wikitable"! name || text|-| content || Contents|-| tables || Tables|->| figures || Figures|-| graphics || Graphics|-| intermezzi || Intermezzos|-| index || Index|-| abbreviations || Abbreviations|-| logos || Logos|-| units || Units|-| pubs || References|}
</cd:description>
<cd:examples><cd:example title="Example for \setupheadtext"><context source="yes">\setuppapersize[A5]\mainlanguage[de]% default headtext is 'Einhalt'\setupheadtext[de][content=Einhaltsverzeichnis] \starttext \completecontent\chapter{The first chapter} \stoptext</context></cd:example><cd:example title="Example for \setuplabeltext">Here is an example of changing section and subsection heads.<context source="yes" text="results in">% English labels\setuplabeltext[en][section=My section ] % We want a space at the end of the label\setuplabeltext[en][subsection=My subsection ] % Dutch labels\setuplabeltext[nl][section=Mijn hoofdstuk ] % We want a space at the end of the label\setuplabeltext[nl][subsection=Mijn onderdeel ] \def\setheadnumber#1#2{#1. #2} \setuphead [section,subsection] [command=\setheadnumber, before={\blank[disable]}, after={\blank[disable]}] \starttext \section{First Thoughts}\subsection{First Subsection}\hairline % Changing the language does not change the labels\language[nl]\section{Second Thoughts}\subsection{Second Subsection}\hairline % To change the labels, change the main language.\mainlanguage[nl]\section{Third Thoughts}\subsection{Third Subsection}\hairline % Retrieving a label explicity:This is the Dutch label for sections: \labeltext{section}. \stoptext</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>

Navigation menu