Difference between revisions of "Command/definereferenceformat"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \definereferenceformat")
 
Line 29: Line 29:
 
     right=),
 
     right=),
 
     text=Equation,]
 
     text=Equation,]
 
\section{First section}
 
\section{Second section}
 
  
 
\placeformula[eq:pythagoras]
 
\placeformula[eq:pythagoras]
Line 40: Line 37:
 
This is explained in \ineq[eq:pythagoras].
 
This is explained in \ineq[eq:pythagoras].
 
</context></cd:example><cd:example title=""><context source="yes">
 
</context></cd:example><cd:example title=""><context source="yes">
\setuppagenumbering
 
  [conversion=A,              % pages A, B, C, ...
 
    location={header,inright}]  %
 
 
 
\definereferenceformat
 
\definereferenceformat
 
     [atfig]
 
     [atfig]
Line 49: Line 42:
 
     command=\at]
 
     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.
 
The animal (\atfig[fig:cow]) is black and white and produces milk.
 
  
 
\placefigure[][fig:cow]{A beautiful cow}{\externalfigure[cow][width=2cm]}
 
\placefigure[][fig:cow]{A beautiful cow}{\externalfigure[cow][width=2cm]}
Line 64: Line 53:
 
<cd:commandref name="in">for default references</cd:commandref>
 
<cd:commandref name="in">for default references</cd:commandref>
 
<cd:commandref name="at">for referencing using a page number</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:commandref name="about">for referencing using the actual text</cd:commandref>
 +
<cd:commandref name="setuplabeltext"></cd:commandref></cd:seealso>
 
</cd:commandgroup>
 
</cd:commandgroup>

Revision as of 13:10, 5 September 2020


\definereferenceformat

Summary

The command \definereferenceformat is used for predefining reference formats.

Settings

\definereferenceformat[...][...][...=...,...]
[...]name
[...]name
...=...,...inherits from \setupreferenceformat

Description

Predefine reference text, so that for example you won't have to type \in{Equation}[eq:somelabel] all the time.

Examples

Example 1

\definereferenceformat
   [ineq]
   [left=(,
    right=),
    text=Equation,]

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

This is explained in \ineq[eq:pythagoras].

Example 2

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

The animal (\atfig[fig:cow]) is black and white and produces milk.

\placefigure[][fig:cow]{A beautiful cow}{\externalfigure[cow][width=2cm]}

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: