Open main menu

Changes

2,050 bytes added ,  17:03, 5 September 2020
Created page with "Documentation for \goto"
<cd:commandgroup name="goto" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
The command <tt>\goto</tt> is used for ...
</cd:shortdesc>
<cd:variants>
<cd:command category="references" file="strc-ref.mkvi" interfacedate="2020-07-14T09:24" interfacefile="i-references.xml" level="document" name="goto" variantnumber="1">
<cd:arguments>
<cd:content ordinal="1"></cd:content>
<cd:keywords ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:reference"></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>This command creates a clickable link (or just normal text when interaction is not enabled).
It takes two arguments, the first in curly braces is the text, the second in square braces is the label to link to.

You should not normally have to use this command. Links are better made using {{cmd|in}} or {{cmd|at}}, which are more conceptual (and lookup the section or page number as well).

If you want to implement some custom command for building links, this command is useful. You might also want to use the {{cmd|ref}} command for getting the raw page number, section number, section title, etc.

</cd:description>
<cd:examples><cd:example title=""><context source="yes">
\setupinteraction[state=start]
\reference[label:1]{Some text}

\page[yes] % Insert page break

Link to \goto{some text}[label:1].
</context>
(of course the wiki cannot really make a workable link)</cd:example><cd:example title="Link to an URL"><texcode>
\goto{Wiki}[url(http://wiki.contextgarden.net)]
\goto{Email}[url(mailto:spam@example.com)]
</texcode></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:source file="strc-ref.mkvi" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:References"></cd:wikipage>
<cd:commandref name="at"></cd:commandref>
<cd:commandref name="in"></cd:commandref>
<cd:commandref name="about"></cd:commandref></cd:seealso>
</cd:commandgroup>