ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Referencing line numbers inside a typing
@ 2010-10-26  8:30 Stefan Müller
  2010-10-26 13:31 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Müller @ 2010-10-26  8:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi list,

is there a (preferably easy) way to reference line numbers inside a 
typing? Minimal (not working) example:

\setuptyping[numbering=line]
\starttext
In the following typing, \in{line}{}[line:intyping] is really interesting.
\starttyping
This line is so interesting.
\stoptyping
\stoptext

Thanks,
Stefan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Referencing line numbers inside a typing
  2010-10-26  8:30 Referencing line numbers inside a typing Stefan Müller
@ 2010-10-26 13:31 ` Wolfgang Schuster
  2010-10-26 18:47   ` Stefan Müller
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2010-10-26 13:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 26.10.2010 um 10:30 schrieb Stefan Müller:

> Hi list,
> 
> is there a (preferably easy) way to reference line numbers inside a typing? Minimal (not working) example:
> 
> \setuptyping[numbering=line]
> \starttext
> In the following typing, \in{line}{}[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
line 4
\stoptyping
\stoptext

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Referencing line numbers inside a typing
  2010-10-26 13:31 ` Wolfgang Schuster
@ 2010-10-26 18:47   ` Stefan Müller
  2010-10-26 19:12     ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Müller @ 2010-10-26 18:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users



On 26.10.2010 15:31, Wolfgang Schuster wrote:
>
> Am 26.10.2010 um 10:30 schrieb Stefan Müller:
>
>> Hi list,
>>
>> is there a (preferably easy) way to reference line numbers inside a typing? Minimal (not working) example:
>>
>> \setuptyping[numbering=line]
>> \starttext
>> In the following typing, \in{line}{}[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
> line 4
> \stoptyping
> \stoptext
>
> Wolfgang

One more question before wikifying: Is there a way to prevent the prefix 
"line"? I want to say something like "In lines 3 to 13".

Thanks,
Stefan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Referencing line numbers inside a typing
  2010-10-26 18:47   ` Stefan Müller
@ 2010-10-26 19:12     ` Wolfgang Schuster
  2010-10-27  9:34       ` Stefan Müller
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2010-10-26 19:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 26.10.2010 um 20:47 schrieb Stefan Müller:

> One more question before wikifying: Is there a way to prevent the prefix "line"? I want to say something like "In lines 3 to 13".


The texts „line“ and „lines“ are set with \setuplabeltext but you can see alternative texts with \inline{...}[<ref>].

\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].

\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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Referencing line numbers inside a typing
  2010-10-26 19:12     ` Wolfgang Schuster
@ 2010-10-27  9:34       ` Stefan Müller
  2010-10-27 14:52         ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Müller @ 2010-10-27  9:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am Dienstag 26 Oktober 2010, 21:12:01 schrieb Wolfgang Schuster:
> Am 26.10.2010 um 20:47 schrieb Stefan Müller:
> > One more question before wikifying: Is there a way to prevent the prefix
> > "line"? I want to say something like "In lines 3 to 13".
> 
> The texts „line“ and „lines“ are set with \setuplabeltext but you can see
> alternative texts with \inline{...}[<ref>].
> 
> \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].
> 
> \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 the following 
error when running your example (ConTeXt  ver: 2010.10.22 16:46 MKIV  fmt: 
2010.10.27  int: english/english):

references      : unknown reference [][lr:b:line:single]
references      : unknown reference [][lr:b:line:range]

Any ideas?

Stefan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Referencing line numbers inside a typing
  2010-10-27  9:34       ` Stefan Müller
@ 2010-10-27 14:52         ` Wolfgang Schuster
  2010-10-27 22:14           ` Stefan Müller
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2010-10-27 14:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 27.10.2010 um 11:34 schrieb Stefan Müller:

> Thanks Wolgang, this looks pretty nice. Unfortunately I get the following 
> error when running your example (ConTeXt  ver: 2010.10.22 16:46 MKIV  fmt: 
> 2010.10.27  int: english/english):
> 
> references      : unknown reference [][lr:b:line:single]
> references      : unknown reference [][lr:b:line:range]
> 
> Any ideas?

Works for me with the same context version.

Do you use 'texexec' or 'context' to process the file?

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Referencing line numbers inside a typing
  2010-10-27 14:52         ` Wolfgang Schuster
@ 2010-10-27 22:14           ` Stefan Müller
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Müller @ 2010-10-27 22:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am Mittwoch 27 Oktober 2010, 16:52:07 schrieb Wolfgang Schuster:
> Am 27.10.2010 um 11:34 schrieb Stefan Müller:
> > Thanks Wolgang, this looks pretty nice. Unfortunately I get the following
> > error when running your example (ConTeXt  ver: 2010.10.22 16:46 MKIV 
> > fmt: 2010.10.27  int: english/english):
> > 
> > references      : unknown reference [][lr:b:line:single]
> > references      : unknown reference [][lr:b:line:range]
> > 
> > Any ideas?
> 
> Works for me with the same context version.
> 
> Do you use 'texexec' or 'context' to process the file?
> 
> Wolfgang

My mistake. I forgot \stoptext. It seems 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://wiki.contextgarden.net/Reference/en/startline
http://wiki.contextgarden.net/Reference/en/inlinerange

I hope that helps others.

Best wishes,
Stefan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-27 22:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-26  8:30 Referencing line numbers inside a typing Stefan Müller
2010-10-26 13:31 ` Wolfgang Schuster
2010-10-26 18:47   ` Stefan Müller
2010-10-26 19:12     ` Wolfgang Schuster
2010-10-27  9:34       ` Stefan Müller
2010-10-27 14:52         ` Wolfgang Schuster
2010-10-27 22:14           ` Stefan Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).