ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Section/head with separate numbering and references
@ 2012-10-25 19:16 Jason Brown
  0 siblings, 0 replies; only message in thread
From: Jason Brown @ 2012-10-25 19:16 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1553 bytes --]

Hello,

I'm working on a document with both chapter/section numbering, and a 'topic' whose numbers are sequential across the entire document.  I found a solution to enable this from a 2003 thread in the archives ("Creating list with separate numbering", 15 April 2003), but I can't seem to get references to work.  I've looked through the archives, read The TeXbook, and browsed the ConTeXt source but can't quite figure out how to make this work.

I'm using 
ConTeXt  ver: 2011.05.18 18:04 MKII  fmt: 2011.7.3  int: english/english

Example below:
-----------------------------------
% "topic" numbering
\definehead
[Topic]
[subsection]
\setuphead
[Topic]
[ownnumber=yes,number=yes,numberstyle=normal,numbercolor=darkgray,textstyle=\it,alternative=inmargin,header=empty,inbetween=,after=]
% use a label text
\setuplabeltext[Topic=\S]
% increment and feed
\newcounter\TopicNumber
\def\topic[#1]#2
{\doglobal\increment\TopicNumber
\Topic{\TopicNumber}{#2}}



\starttext

\section{Tufte}
\input tufte

\topic[topic:SomeTopic]{Some topic.}  Here we will discuss a particular topic.

\topic[topic:AnotherTopic]{Another topic.}  Let's expand on the previous topic.

\topic[topic:AGreatTopic]{A great topic.}  I can go on like this all day.



\section{Another Tufte}
\input tufte

\topic[topic:SomeOtherTopic]{Some other topic.} Recall in \in{\S}[topic:AnotherTopic] that we extended blah blah from \in{\S}[topic:SomeTopic] and noted that...


\stoptext
-----------------------------------

Thanks,
Jason


[-- Attachment #1.2: Type: text/html, Size: 5357 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] only message in thread

only message in thread, other threads:[~2012-10-25 19:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-25 19:16 Section/head with separate numbering and references Jason Brown

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