mplementing this, but I am afraid it does not work properly, at
>> least not if there are several targets following one after another.
>>
>> Consider this example:
>>
>>
>> \setupcolumns[
>> n=2,
>> ]
>> \setuplinenumbering[
>> step=
=page,
]
\def\Lab#1{%
\pagereference[#1]%
\pagereference[column:#1]%
\someline[#1]%
}
\def\Ref#1{
page \at[#1],
column
\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},
line \inlinerange[#1].
}
\starttext
\startcolumns
\startlinenumbering
REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\
page \at[#1],
column \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},
line \inlinerange[#1].
}
\starttext
\startcolumns
\startlinenumbering
REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\par
C: \Ref{C}\par
D: \Ref{D}\par
E: \Ref{E}\par
F: \Ref{F}\par
\input lorem
TARGETS:
\Lab{A} A,
\
want it to automatically add the word
"line" or something else before the number, otherwise I have to use
\inlinerange. It took me some time to find that out. Wouldn't it be
easier to have just one command for the target and another one for
the reference, and everything else, as c
efer
to a page, I need \pagereference (for the target) and \at (for the reference); to refer
to a line, I need \someline (for the target) and \inline (for the reference), but only if
I want it to automatically add the word "line" or something else before the
number, otherwise I have to
o a line, I need \someline (for the
>> target) and \inline (for the reference), but only if I want it to
>> automatically add the word "line" or something else before the number,
>> otherwise I have to use \inlinerange. It took me some time to find that out.
>> Wo
On 9/4/2019 7:37 PM, Oliver von Criegern wrote:
Dear list members,
I want to process cross-references in ConTeXt/LuaTeX, that is, to do
some calculations in Lua with the page and line numbers returned by the
\at and \inlinerange commands.
But this does not work, as these commands are
Dear list members,
I want to process cross-references in ConTeXt/LuaTeX, that is, to do
some calculations in Lua with the page and line numbers returned by the
\at and \inlinerange commands.
But this does not work, as these commands are obviously not being
expanded before they are passed to
ne, I need \someline (for the target) and \inline (for the
reference), but only if I want it to automatically add the word "line"
or something else before the number, otherwise I have to use
\inlinerange. It took me some time to find that out. Wouldn't it be
easier to have just one co
it to automatically add the word "line" or something else before
the number, otherwise I have to use \inlinerange. It took me some time
to find that out. Wouldn't it be easier to have just one command for the
target and another one for the reference, and everything else, as
counte
e and refer to it later in text: \someline[tag]; refer
back with \inline[tag] or \inlinerange[tag] (the former has a spurious
space before the number). The low-level backreferences are
\in[lr:b:tag] and \in[lr:e:tag]; see page-lin.mkiv
(d) ditto for line ranges: \startlines[tag] ... \stoplines[tag];
e_numbers
http://wiki.contextgarden.net/Reference/en/inline
http://wiki.contextgarden.net/Reference/en/someline
http://wiki.contextgarden.net/Reference/en/startline
http://wiki.contextgarden.net/Reference/en/inlinerange
I hope that helps others.
Best wishes,
Stefan
___
[line:single] and also \inline{typelines}[line:range].
>
> See line~\inlinerange[line:single] and also lines~\inlinerange[line:range].
>
> \starttyping
> line 1
> line 2/BTEX\startline[line:range]/ETEX
> line 3/BTEX\someline[line:single]/ETEX
> line 4
> line 5/BTEX\stopline[line:ran
rnative texts with \inline{...}[].
\setuptyping[numbering=line,escape=yes]
\starttext
See \inline[line:single] and also \inline[line:range].
See \inline{typeline}[line:single] and also \inline{typelines}[line:range].
See line~\inlinerange[line:single] and also lines~\inlinerange[line:range].
\star
14 matches
Mail list logo