Changes

Jump to navigation Jump to search
Created page with "Documentation for \definereferenceformat"
<cd:commandgroup name="definereferenceformat" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
The command <tt>\definereferenceformat</tt> is used for predefining reference formats.
</cd:shortdesc>
<cd:variants>
<cd:command category="references" file="strc-ref.mkvi" interfacedate="2020-07-14T09:24" interfacefile="i-references.xml" level="style" name="definereferenceformat" variantnumber="1">
<cd:arguments>
<cd:keywords ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:keywords>
<cd:assignments list="yes" optional="yes" ordinal="3">
<cd:assignmentsdoc></cd:assignmentsdoc>
<cd:inherit name="setupreferenceformat"></cd:inherit>
</cd:assignments>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>Predefine reference text, so that for example you won't have to type <code>\in{Equation}[eq:somelabel]</code> all the time.
</cd:description>
<cd:examples><cd:example title=""><context source="yes">
\definereferenceformat
[ineq]
[left=(,
right=),
text=Equation,]

\section{First section}
\section{Second section}

\placeformula[eq:pythagoras]
\startformula
a^2+b^2=c^2
\stopformula

This is explained in \ineq[eq:pythagoras].
</context></cd:example><cd:example title=""><context source="yes">
\setuppagenumbering
[conversion=A, % pages A, B, C, ...
location={header,inright}] %

\definereferenceformat
[atfig]
[label=page,
command=\at]

\mainlanguage[nl]
Het dier (\atfig[fig:cow]) is zwart en wit en geeft melk.\crlf
\mainlanguage[en]
The animal (\atfig[fig:cow]) is black and white and produces milk.


\placefigure[][fig:cow]{A beautiful cow}{\externalfigure[cow][width=2cm]}
</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:commandref name="setupreferenceformat" originator="system"></cd:commandref>
<cd:source file="strc-ref.mkvi" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:References"></cd:wikipage>
<cd:commandref name="in">for default references</cd:commandref>
<cd:commandref name="at">for referencing using a page number</cd:commandref>
<cd:commandref name="about">for referencing using the actual text</cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu