Re: [NTG-context] Marking a textfragment for later reference
On 7 aug. 2012, Pontus Lurcock
On Tue 07 Aug 2012, Robert Blackstone wrote:
Here follows my minimal example. I reasoned that the identifier [topica] might act as a label, or an anchor, or whatever the correct ConTeXt name is, for a reference. ---------------------------------------------------------------------------
\definedelimitedtext[topica] \setupdelimitedtext[topica][left=,right=] %maybe superfluous? I do not need a layout different from the rest of the text. \starttext
Some text.
\starttopica Some text to explain a certain topic, called topica. \stoptopica
Some more text about topica. (See discussion on \at{page}[topica])
\stoptext
--------------------------------------------------------------------------- To avoid any misunderstanding: this is no longer a problem since I have been given excellent advice. But it intrigues me. Why can some identifiers, for example of figures, be used for internal references and others not?
In this case, I'd say it's because you're defining a delimited text style which can be used in multiple places. Your document could have five hundred \starttopica...\stoptopica blocks on different pages. A figure identifier, on the other hand, is meant to be unique.
Pont
Hi Pont, Thanks for your comment. I realized this. There would of course be only one "\starttopica...\stoptopica block" in my text. If I would like to use delimited texts in this manner for several different topics, I would simply give them different names. Each topic its own name, like [topicb], [topicc], etc. Like you would do if you wanted to use slightly different types of blockquote in your document. So my question: "Why can some identifiers, for example of figures, be used for internal references and others not?" remains unanswered. Best regards, Robert
Hi Robert,
So my question: "Why can some identifiers, for example of figures, be used for internal references and others not?" remains unanswered.
That would be because there are
* names, for creating a named variant of some command
* and labels, which are used for cross-references,
and I think you are calling them both identifiers. (Not sure I'm using
the official terms, or if there are any.)
Some examples below, I hope they'll clarify things. I never had any
problems confusing labels and names myself, so I'm not sure how to
explain what was obvious to me, but perhaps this will help:
Names occur when you're defining things; Labels occur when you're
placing things.
As for why you can't do
\definedelimitedtext[AA]
\startAA[mylabel]
bla
\stopAA
I guess that was never baked in. Probably because quotations are not
really numbered objects, and so not obvious candidates for having
their own labels.
Cheers,
Sietse
%%%%%%% Example: label %%%%%
\placefigure
[here]
[fig:myfig] % label: used to refer to the figure
{caption}{figure}
%%%%%%% Example: command like \startNAME %%%%%
\definedelimitedtext
[smallquote] % name
[style=small]
\startsmallquote % our own named environment
bla bla bla
\stopsmallquote
%%%%% Example: names and labels %%%%%
\useexternalfigure
[littlecow] % define a named picture
[cow.pdf]
[width=1cm]
\placefigure
[here]
[fig:littlecow] % a label for the figure float
{Kleine, kleine koe}
{\externalfigure[littlecow]} % invoking a named picture
--
Sietse Brouwer -- sbbrouwer@gmail.com -- +31 6 13.456.848
Verlengde Wassenaarseweg 4a -- 2342 BG Oegstgeest -- the Netherlands
MSN: sietse@gawab.com -- ICQ: 341232104
On Tue, Aug 7, 2012 at 11:44 AM, Robert Blackstone
On 7 aug. 2012, Pontus Lurcock
wrote On Tue 07 Aug 2012, Robert Blackstone wrote:
Here follows my minimal example. I reasoned that the identifier [topica] might act as a label, or an anchor, or whatever the correct ConTeXt name is, for a reference. ---------------------------------------------------------------------------
\definedelimitedtext[topica] \setupdelimitedtext[topica][left=,right=] %maybe superfluous? I do not need a layout different from the rest of the text. \starttext
Some text.
\starttopica Some text to explain a certain topic, called topica. \stoptopica
Some more text about topica. (See discussion on \at{page}[topica])
\stoptext
--------------------------------------------------------------------------- To avoid any misunderstanding: this is no longer a problem since I have been given excellent advice. But it intrigues me. Why can some identifiers, for example of figures, be used for internal references and others not?
In this case, I'd say it's because you're defining a delimited text style which can be used in multiple places. Your document could have five hundred \starttopica...\stoptopica blocks on different pages. A figure identifier, on the other hand, is meant to be unique.
Pont
Hi Pont, Thanks for your comment. I realized this. There would of course be only one "\starttopica...\stoptopica block" in my text. If I would like to use delimited texts in this manner for several different topics, I would simply give them different names. Each topic its own name, like [topicb], [topicc], etc. Like you would do if you wanted to use slightly different types of blockquote in your document. So my question: "Why can some identifiers, for example of figures, be used for internal references and others not?" remains unanswered. Best regards, Robert
___________________________________________________________________________________ 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 ___________________________________________________________________________________
participants (2)
-
Robert Blackstone
-
Sietse Brouwer