Difference between revisions of "Command/definereferenceformat"
< Command
Jump to navigation
Jump to search
(Created page with "Documentation for \definereferenceformat") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 29: | Line 29: | ||
right=), | right=), | ||
text=Equation,] | text=Equation,] | ||
− | |||
− | |||
− | |||
\placeformula[eq:pythagoras] | \placeformula[eq:pythagoras] | ||
Line 39: | Line 36: | ||
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="">The <code>label</code> option uses a defined {{cmd|labeltext}} instead of an explicit text. |
− | \ | + | <context source="yes"> |
− | + | \setcounter[userpage][4] | |
− | |||
− | |||
\definereferenceformat | \definereferenceformat | ||
[atfig] | [atfig] | ||
[label=page, | [label=page, | ||
− | + | type=page] | |
− | |||
− | |||
− | |||
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]} | ||
− | </context></cd:example></cd:examples> | + | </context> |
+ | (the page number is off-by-one because of how the wiki creates its bitmaps)</cd:example></cd:examples> | ||
<cd:notes></cd:notes> | <cd:notes></cd:notes> | ||
<cd:seealso> | <cd:seealso> | ||
Line 64: | Line 56: | ||
<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> |
Latest revision as of 10:05, 29 October 2021
Contents
\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
The label
option uses a defined \labeltext instead of an explicit text.
\setcounter[userpage][4] \definereferenceformat [atfig] [label=page, type=page] The animal (\atfig[fig:cow]) is black and white and produces milk. \placefigure[][fig:cow]{A beautiful cow}{\externalfigure[cow][width=2cm]}
(the page number is off-by-one because of how the wiki creates its bitmaps)
Notes
See also
- \setupreferenceformat
- strc-ref.mkvi
- \in for default references
- \at for referencing using a page number
- \about for referencing using the actual text
- \setuplabeltext