Difference between revisions of "Command/definereferenceformat"

From ConTeXt wiki
m (cleanup)
 
(15 intermediate revisions by 5 users not shown)
Line 4: Line 4:
 
}}
 
}}
  
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>definereferenceformat</syntax>
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
<table cellspacing="4" cellpadding="2" class="cmd">
Line 11: Line 13:
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
 
     <td class="cmd">[...]</td>
 
     <td class="cmd">[...]</td>
     <td>name </td>
+
     <td>name</td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="second">
 
   <tr valign="top" class="second">
     <td class="cmd">[[Reference/en/keyword:left|left]]</td>
+
     <td class="cmd">[[Command/keyword:left|left]]</td>
     <td>[[Reference/en/value:text|text]] </td>
+
     <td>[[Command/value:text|text]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="second">
 
   <tr valign="top" class="second">
     <td class="cmd">[[Reference/en/keyword:right|right]]</td>
+
     <td class="cmd">[[Command/keyword:right|right]]</td>
     <td>[[Reference/en/value:text|text]] </td>
+
     <td>[[Command/value:text|text]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="second">
 
   <tr valign="top" class="second">
     <td class="cmd">[[Reference/en/keyword:text|text]]</td>
+
     <td class="cmd">[[Command/keyword:text|text]]</td>
     <td>[[Reference/en/value:text|text]] </td>
+
     <td>[[Command/value:text|text]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="second">
 
   <tr valign="top" class="second">
     <td class="cmd">[[Reference/en/keyword:label|label]]</td>
+
     <td class="cmd">[[Command/keyword:label|label]]</td>
     <td>[[Reference/en/value:name|name]] </td>
+
     <td>[[Command/value:name|name]] </td>
 +
  </tr>
 +
  <tr valign="top" class="second">
 +
    <td class="cmd">[[Command/keyword:command|command]]</td>
 +
    <td>''command that accepts a label''</td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
Line 33: Line 39:
  
 
== Description ==  
 
== Description ==  
 +
Predefine reference text, so that for example you won't have to type \in{Equation}[eq:somelabel] all the time.
 +
 +
== Example 1 ==
 +
 +
<context source="yes">
 +
\setuppapersize[A6]
 +
 +
\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>
 +
 +
== Example 2 ==
 +
 +
<context source="yes">
 +
\setuppapersize[A6]
  
 +
\setuppagenumbering
 +
  [conversion=A,              % pages A, B, C, ...
 +
    location={header,inright}]  %
  
 +
% tell the wiki's ConTeXt where to find the pictures
 +
\setupexternalfigures[location=default]
  
== Example ==
+
\definereferenceformat
<!-- Please fill in an example if you can -->
+
    [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>
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
* {{cmd|in}}
 +
* {{cmd|at}}
 +
* {{cmd|about}}
 +
* {{cmd|setuplabeltext}}
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Reference/en|definereferenceformat]]
+
[[Category:Command/Cross-References|definereferenceformat]]

Latest revision as of 14:36, 13 October 2019

\definereferenceformat

Syntax (autogenerated)

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


Syntax

\definereferenceformat[...][...,...=...,...]
[...] name
left text
right text
text text
label name
command command that accepts a label


Description

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

Example 1

\setuppapersize[A6]

\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].

Example 2

\setuppapersize[A6]

\setuppagenumbering
   [conversion=A,               % pages A, B, C, ...
    location={header,inright}]  %

% tell the wiki's ConTeXt where to find the pictures
\setupexternalfigures[location=default] 

\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]}

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: