Open main menu

Command/somewhere

< Command
Revision as of 15:17, 19 November 2021 by Taco (talk | contribs) (Created page with "Documentation for \somewhere")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


\somewhere

Summary

The command \somewhere is used for variable reference text.

Settings

\somewhere{...}{...}[...]
{...}text
{...}text
[...]reference

Description

Typesets the first or the second argument depending on if the reference target is preceding or following its use. If the reference cannot be found, typesets the reference label itself instead.

With interaction turned on, the chosen argument becomes a hyperlink to the target as well.

Examples

Example 1

\setuppapersize[A8,landscape][A6,landscape]
\setuppaper[nx=2,ny=2]
\setuparranging[XY]
\setupinteraction[state=start]

\starttext
Hi, \somewhere{preceding}{following}[sec] there is a section.

\page
\section[sec]{A section title}
\page

Hi again, \somewhere{preceding}{following}[sec] there is a section.

\stoptext

Notes

See also

Help from ConTeXt-Mailinglist/Forum