ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Michael Green <merely.ridiculous@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: References to annotations
Date: Wed, 5 Oct 2011 10:50:34 -0700	[thread overview]
Message-ID: <CF1DDC76-A3A1-46E7-8ADA-BAF40943710C@gmail.com> (raw)

I'm getting two unexpected results from references to annotations:

1. The numbering is different: \placeannotationnumber starts at 1, \in[ref] starts at 0

2. \atpage sometimes gives the page number and sometimes yields something surprising: "as we show below" (or above). That's nifty, but unexpected.

Thank you.

Michael

---- Example -----------------------------------------------------

\usemodule[annotation]

\defineannotation[Arg][alternative=command,number=yes,command=\ArgCommand,text=Argument]

\define[2]\ArgCommand{
  \startitemize[n]
    \placeannotationcontent
  \stopitemize
  \placeannotationtext\ \placeannotationnumber\ \placeannotationtitle
}

\starttext
\startArg[title=An OK Argument,reference=OK]
\item All men are mortal.
\item Socrates is a man.
\item Therefore, Socrates isn’t going to make it.
\stopArg

References to the first argument: \in{argument}[OK], \atpage[OK]

References to the second argument: \in{argument}[NotOK], \atpage[NotOK]

\page

\startArg[title=A Bad Argument,reference=NotOK]
\item Someone I don’t know called me.
\item Barack Obama is someone I don’t know.
\item Therefore, Barack Obama called me.
\stopArg

References to the second argument: \in{argument}[NotOK], \atpage[NotOK]

References to the first argument: \in{argument}[OK], \atpage[OK]

\stoptext

---------------------------------------------------------------------

---- Results ----------------------------------------------------

[page 1]

1. All men are mortal.
2. Socrates is a man.
3. Therefore, Socrates isn’t going to make it.
Argument 1 An OK Argument

References to the first argument: argument 0, at page 1
References to the second argument: argument 1, as we show below

[page 2]

1. Someone I don’t know called me.
2. Barack Obama is someone I don’t know.
3. Therefore, Barack Obama called me.
Argument 2 A Bad Argument

References to the second argument: argument 1, at page 2
References to the first argument: argument 0, as we show above
---------------------------------------------------------------------
___________________________________________________________________________________
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:[~2011-10-05 17:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 17:50 Michael Green [this message]
2011-10-05 18:51 ` Wolfgang Schuster
2011-10-06  1:10 Michael Green
2011-10-06  7:10 ` Wolfgang Schuster
2011-10-07 19:01 Michael Green

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=CF1DDC76-A3A1-46E7-8ADA-BAF40943710C@gmail.com \
    --to=merely.ridiculous@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).