ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* reference to \starttyping
@ 2006-12-09  0:42 andrea valle
  2006-12-09  1:42 ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: andrea valle @ 2006-12-09  0:42 UTC (permalink / raw)


Hi to all,

I'm typesetting a manual for a programming language. I'm inserting long 
excerpts from code and I have my nice line numbers as explained by the 
wiki.
Code is inserted using \startcode\stopcode mechanism (I have two type 
of starttyping).
I cannot understand how to refer to these code blocks. I mean, I need 
to have something like this: "in the code at page xxx, ...".
I guess it's simple but seems I cannot solve.

Many thanks

-a-

Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
andrea.valle@unito.it

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

* Re: reference to \starttyping
  2006-12-09  0:42 reference to \starttyping andrea valle
@ 2006-12-09  1:42 ` Aditya Mahajan
  2006-12-09 13:28   ` andrea valle
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2006-12-09  1:42 UTC (permalink / raw)


On Sat, 9 Dec 2006, andrea valle wrote:

> Hi to all,
>
> I'm typesetting a manual for a programming language. I'm inserting long
> excerpts from code and I have my nice line numbers as explained by the
> wiki.
> Code is inserted using \startcode\stopcode mechanism (I have two type
> of starttyping).
> I cannot understand how to refer to these code blocks. I mean, I need
> to have something like this: "in the code at page xxx, ...".
> I guess it's simple but seems I cannot solve.

Add \pagereference[tag] before (or include it as part of the macro) 
\startcode. Then you can refer to it by \at[tag]

There is also \textreference and \reference. From core-ref.tex

%D This module deals with referencing. In \CONTEXT\ referencing
%D is one of the core features, although at a first glance
%D probably nobody will notice. This is good, because
%D referencing should be as hidden as possible.
%D
%D In paper documents, referencing comes down to cross
%D referencing, but in their interactive counterparts, is also
%D involves navigation. Many features implemented here are
%D therefore closely related to navigation.
%D
%D Many \CONTEXT\ commands can optionally be fed with a
%D reference. Such a reference, when called upon, returns the
%D number of a figure, table, chapter etc, a piece of text, or
%D a pagenumber.
%D
%D There are three ways of defining a reference:
%D
%D \starttyping
%D \pagereference[here]
%D \textreference[here]{some text}
%D \stoptyping
%D
%D the third alternative combines them in:
%D
%D \starttyping
%D \reference[here]{some text}
%D \stoptyping


HTH,
Aditya

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

* Re: reference to \starttyping
  2006-12-09  1:42 ` Aditya Mahajan
@ 2006-12-09 13:28   ` andrea valle
  2006-12-09 19:08     ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: andrea valle @ 2006-12-09 13:28 UTC (permalink / raw)


AH! Thanks, I had already tried it but it seemed not work. But it was 
me: \setuppagenumbering[state=stop]. with 
\setuppagenumbering[state=start] works perfectly.

Best

-a-




On 9 Dec 2006, at 02:42, Aditya Mahajan wrote:

> \pagereference[tag]
Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
andrea.valle@unito.it

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

* Re: reference to \starttyping
  2006-12-09 13:28   ` andrea valle
@ 2006-12-09 19:08     ` Aditya Mahajan
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2006-12-09 19:08 UTC (permalink / raw)


On Sat, 9 Dec 2006, andrea valle wrote:

> AH! Thanks, I had already tried it but it seemed not work. But it was
> me: \setuppagenumbering[state=stop].

You can use \setuppagenumbering[location=] to get rid of the page 
number.

Aditya

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

end of thread, other threads:[~2006-12-09 19:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-09  0:42 reference to \starttyping andrea valle
2006-12-09  1:42 ` Aditya Mahajan
2006-12-09 13:28   ` andrea valle
2006-12-09 19:08     ` Aditya Mahajan

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).