ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Sietse Brouwer <sbbrouwer@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Marking a textfragment for later reference
Date: Tue, 7 Aug 2012 12:47:06 +0200	[thread overview]
Message-ID: <CAF=dkzzrDyavkgBKO0VitGSGA3GOtj4C0dH4FGmCEn3qROqZQw@mail.gmail.com> (raw)
In-Reply-To: <905DD621-C648-4033-91CA-EC4A7ECB0FBF@gmail.com>

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
<blackstone.robert@gmail.com> wrote:
>
> On 7 aug. 2012,  Pontus Lurcock <pont@talvi.net>
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2012-08-07 10:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.24.1344331200.14247.ntg-context@ntg.nl>
2012-08-07  9:44 ` Robert Blackstone
2012-08-07 10:47   ` Sietse Brouwer [this message]
     [not found] <mailman.35.1344350527.14247.ntg-context@ntg.nl>
2012-08-08  7:48 ` Robert Blackstone
     [not found] <mailman.10.1344285220.14247.ntg-context@ntg.nl>
2012-08-07  7:42 ` Robert Blackstone
2012-08-07  8:03   ` Pontus Lurcock
2012-08-07 15:42   ` Wolfgang Schuster
     [not found] <mailman.7.1344276418.14247.ntg-context@ntg.nl>
2012-08-06 20:07 ` Robert Blackstone
     [not found] <mailman.12.1344199608.17520.ntg-context@ntg.nl>
2012-08-06  7:41 ` Robert Blackstone
2012-08-06 12:16   ` Wolfgang Schuster
     [not found] <mailman.1.1344177459.17520.ntg-context@ntg.nl>
2012-08-05 15:59 ` Robert Blackstone
2012-08-05 14:05 Robert Blackstone
2012-08-05 14:37 ` Wolfgang Schuster
2012-08-05 14:38 ` Marco Patzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF=dkzzrDyavkgBKO0VitGSGA3GOtj4C0dH4FGmCEn3qROqZQw@mail.gmail.com' \
    --to=sbbrouwer@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).