n file
virtual://buffer.module.1: ! You can't use `macro parameter character #'
in horizontal mode
l.79 local someline = (#
line < 3 and "") or
sub(line,4.
enting 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=5,
&g
,
]
\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}\par
C
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=5,
method=page,
]
\def\Lab#1{%
\pagereference[#1]%
\pagereference[column:#1]%
\someline[#1]%
}
\def\Ref#1{
page
and
consistent naming of commands in ConTeXt, why this is not so in the
case of references. For example, to refer 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
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 use \i
Besides, I am wondering, regarding the generally very regular and consistent
>> naming of commands in ConTeXt, why this is not so in the case of references.
>> For example, to refer to a page, I need \pagereference (for the target) and
>> \at (for the reference); to refer to a l
Many thanks for your response, but unfortunately it does not solve my
problem. In your solution, var in TestVarB is the identifier of the
reference, which is "1", but I need the value of the reference, that is,
the number of the line where the \someline command is being called,
wh
% The line
reference is not expanded before being passed to
Lua.\getbuffer[testtext]\someline[1]LABEL 1 \stoplinenumbering\stoptext|||
\TestLua just passes the argument to the Lua command TestVar, which
prints it to stdout and returns it to TeX. The pdf result looks good at
first glance, showing
passed to
Lua.\getbuffer[testtext]\someline[1]LABEL 1 \stoplinenumbering\stoptext|||
\TestLua just passes the argument to the Lua command TestVar, which
prints it to stdout and returns it to TeX. The pdf result looks good at
first glance, showing the correct values as expected, but in stdout we
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 command for
naming of commands in ConTeXt, why this is not so in the case
of references. For example, to refer 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
, in
pretty colors? I can't remember.
Cheers,
Sietse
% Converting every letter into a rectangle.
\def\somecharacter#1%
{\setbox0=\hbox{#1}%
\blackrule[width=\wd0,height=\ht0,depth=\dp0]}
\def\someline%
{\noindent \processtokens\somecharacter\somecharacter\relax\space
{The height
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]; refer
{line}{lr:b:1}{conversion=numbers}{1}
\mksomelinereference ... }{\the \linerefcounter }}
\endgroup
\mkstartlinereference ...wstartlinereference {#1}}
\ignorespaces
\someline [#1
}}
\endgroup
\mkstartlinereference ...wstartlinereference {#1}}
\ignorespaces
\someline [#1]-\mkstartlinereference {#1}
\mkstoplinereference {#1}
l.10 ...ical{labore et dolore magna aliquyam
] 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:range]/ETEX
line 6
\stoptyping
\stoptext
Wolfgang
Thanks Wolgang, this looks pretty nice. Unfortunately I get
kind of inconvenient that I get such
a misleading error message.
I added some stuff regarding this thread to the wiki.
http://wiki.contextgarden.net/Verbatim_text#Referencing_line_numbers
http://wiki.contextgarden.net/Reference/en/inline
http://wiki.contextgarden.net/Reference/en/someline
http
.
\starttyping
This line is so interesting.
\stoptyping
\stoptext
MkIV:
\setuptyping[numbering=line,escape=yes]
\starttext
In the following typing, \inline[line:intyping] is really interesting.
\starttyping
line 1
line 2
line 3/BTEX\someline[line:intyping]/ETEX
line 4
\stoptyping
\stoptext
Wolfgang
}{}[line:intyping] is really interesting.
\starttyping
This line is so interesting.
\stoptyping
\stoptext
MkIV:
\setuptyping[numbering=line,escape=yes]
\starttext
In the following typing, \inline[line:intyping] is really interesting.
\starttyping
line 1
line 2
line 3/BTEX\someline[line:intyping]/ETEX
\startline[line:range]/ETEX
line 3/BTEX\someline[line:single]/ETEX
line 4
line 5/BTEX\stopline[line:range]/ETEX
line 6
\stoptyping
\stoptext
Wolfgang
___
If your question is of interest to others as well, please add an entry
not help.
\starttext
\startlinenumbering
\someline[a]We thrive in information--thick worlds because of our
marvelous and everyday ca-pacity to select, …\someline[b]
\stoplinenumbering
\inline[a] or \inline[b]
\stoptext
should work ok in beta
Hi!
I could compile the following document (part of it givne here):
==
\starttext
\startlinenumbering
Thus, I came to the conclusion that the designer of a new system
must not only be the implementer and first large--scale user;\someline[here]
the designer should also write
Hello Hans.
With the current beta referencing lines is broken again. It used to
work yesterday.
Here is a test file and the error message:
\starttext
\startlinenumbering
\input tufte \someline[lin:b]
\startline[lin:a]
\input tufte
\stopline[lin:a]
\stoplinenumbering
\inline[lin:b
Am 17.10.2009 um 22:29 schrieb Andreas Harder:
Hi all,
now that \inline[ref] etc. work—whereas in the case of \someline
[ref] \inline[ref] always jumps to the else-branch of its definition
and outputs the same line twice—I tried, obviously naive, to realize
the following functionality
Hi all,
now that \inline[ref] etc. work—whereas in the case of \someline[ref]
\inline[ref] always jumps to the else-branch of its definition and
outputs the same line twice—I tried, obviously naive, to realize the
following functionality (attachment).
test-linenumbering4.tex
Description
wrong with the \mksomelinereference command
and 'ctxlua' with it's argument appears in the text.
\starttext
\startlinenumbering
Thus, I came to the conclusion that the designer of a new system
must not only be the implementer and first large--scale user;\someline
[here]
the designer should also
\someline[reference]
\somewhere{text}{text}[reference]
\sort[text]{text}
\space
\splitfloat[settings]{text}{text}
# \splitstring
# \SR
# \start \stop
# \start \stop
\startalignment[width|left|right|middle|inner|outer|wide|broad|height|bottom|line|reset|hanging|nothanging|hyphenated|nothyphenated
2004-06-02 15:38:17.454329753 +0200
@@ -2129,7 +2129,7 @@
if (($BBoxFound) ((substr $SomeLine,0,1) ne %))
{ last }
if ($BBoxFound2)
- { if ($SomeLine =~ /^%%BoundingBox:/io)
+ { if ($SomeLine =~ /^%%BoundingBox:(?!\s
29 matches
Mail list logo