Changes

Jump to navigation Jump to search
23 bytes removed ,  00:55, 22 September 2013
m
no edit summary
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</cmd>}}<tt>[reference]</tt> and <{{cmd>|textreference</cmd>}}<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 <tt>[fig:cow]</tt>.
If you activated interaction, references become links automatically.
Starting with ConTeXt 2012.06.22, there is a third command: <{{cmd>|contentreference</cmd>}}<tt>[reference][framedsettings]{text}</tt> which wraps the <tt>text</tt> argument inside a <{{cmd>|framed</cmd>}}. The main difference with <{{cmd>|textreference</cmd> }} where the <tt>text</tt> contains a <{{cmd>|framed</cmd> }} itself is that, when interaction is enabled, <{{cmd>|contentreference</cmd> }} places the top left of the target area at the top left of the framed box whereas <{{cmd>|textreference</cmd> }} 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}}<cmdtt>in{section}[sec:foo]</cmdtt> the chapter number is prefixed
following by a dot and the according section number.
However, some styles do not show the chapter prefix while displaying the
sections. In this case the referencing commands, like <{{cmd>|in</cmd> }} just output the
section number, which is of course ambiguous.
To fix this problem, the command <{{cmd>|setupreferencestructureprefix</cmd> }} can be
incorporated to adjust the prefixes displayed by the referencing commands.
===Example===
Given that <{{cmd>|start}}/{{cmd|stopchapter</cmd> }} output <tt>Romannumerals</tt> prefixes (<tt>I,II, III, …</tt>) and <{{cmd>|start}}/{{cmd|stopsection</cmd> }} output <tt>Character</tt> prefixes (<tt>A,B, C, …</tt>), the following commands give the results provided in the comments.
<texcode>
To adjust the separator between the different structure
levels in the referencing commands, like <{{cmd>|in</cmd>}}, the command<{{cmd>|definestructureseparatorset</cmd> }} is used.
===Example===
To change the separator between chapter and section from a dot to a hyphen use
<{{cmd>|definestructureseparatorset</cmd> }} as follows.
<texcode>
419

edits

Navigation menu