Changes

Jump to navigation Jump to search
3 bytes added ,  08:46, 8 April 2015
better formatting
< [[Structurals]] | [[Bibliography]] >
==General Use==
If you want to refer to any text element, you must first define the target's reference label. All titling commands and a lot of others take one as optional parameter, e.g.
<texcode>
That will typeset the text in braces and add the number of the refered element, e.g. "chapter 1 on page 1".
To define a reference label anywhere you can also use {{cmd|pagereference}}<tt>|[reference]</tt> }} and {{cmd|textreference}}<tt>|[reference]{text}</tt>}}. Everwhere where you can define one label, you can also define more at once, if you separate them with commas. It's also possible to use "namespaces" like <ttcode>[fig:cow]</ttcode>.
If you activated interaction, references become links automatically.
Starting with ConTeXt 2012.06.22, there is a third command: {{cmd|contentreference}}<tt>|[reference][framedsettings]{text}</tt> }} which wraps the <ttcode>text</ttcode> argument inside a {{cmd|framed}}. The main difference with {{cmd|textreference}} where the <ttcode>text</ttcode> contains a {{cmd|framed}} itself is that, when interaction is enabled, {{cmd|contentreference}} places the top left of the target area at the top left of the framed box whereas {{cmd|textreference}} uses its baseline.
===Example===
When the default chapter and section prefixes are used, the chapters are
prefixed by a number, so are the sections. When referring to a section using
the command {{cmd|in}}<tt>|{section}[sec:foo]</tt> }} the chapter number is prefixed
following by a dot and the according section number.
===Example===
Given that {{cmd|start}}/{{cmd|stopchapter}} output <ttcode>Romannumerals</ttcode> prefixes (<tt>I,II, III, …</tt>) and {{cmd|start}}/{{cmd|stopsection}} output <ttcode>Character</ttcode> prefixes (<tt>A,B, C, …</tt>), the following commands give the results provided in the comments.
<texcode>
{{todo|Describe what the arguments of the commands do and how the commands work}}
{{Getting started navbox}}`

Navigation menu