Difference between revisions of "Command/startline"

From Wiki
Jump to navigation Jump to search
m (Taco moved page Command/startline to Environment/line)
m (Text replacement - "<syntax>start" to "<syntax type=“environment”>")
Line 5: Line 5:
  
 
== [[Help:Reference|Syntax]] (autogenerated) ==
 
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>startline</syntax>
+
<syntax type=“environment”>line</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==

Revision as of 19:46, 24 July 2020

\startline

Syntax (autogenerated)

\line{...}
{...}content


Syntax

\startline[ref] ... \stopline[ref]
[ref]

Description

The commands \startline and \stopline add a label to a range of lines inside a typing. This range can then be referred to using \inline, or \inlinerange, or directly with \in[lr:b:someref] and \in[lr:e:someref].

Example

% Ensure that the /BTEX.../ETEX escape is active inside \starttyping
\setuptyping[numbering=line,escape=yes]

\starttext

NB: numbered lines do not work on the wiki.

See \inline[line:single] and also \inline[line:range]. \crlf
See \inline{typeline}[line:single] and also \inline{typelines}[line:range].\crlf
See line~\inlinerange[line:single] and also lines~\inlinerange[line:range].\crlf

\starttyping
line 1/BTEX\someline[line:single]/ETEX
line 2/BTEX\startline[line:range]/ETEX
line 3
line 4/BTEX\stopline[line:range]/ETEX
\stoptyping

\stoptext

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: