ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* References to annotations
@ 2011-10-05 17:50 Michael Green
  2011-10-05 18:51 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Green @ 2011-10-05 17:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: References to annotations
  2011-10-05 17:50 References to annotations Michael Green
@ 2011-10-05 18:51 ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2011-10-05 18:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 05.10.2011 um 19:50 schrieb Michael Green:

> I'm getting two unexpected results from references to annotations:
> 
> 1. The numbering is different: \placeannotationnumber starts at 1, \in[ref] starts at 0

Fixed.

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

Use \at{page}[<reference>].

Wolfgang
___________________________________________________________________________________
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] 5+ messages in thread

* Re: References to annotations
@ 2011-10-07 19:01 Michael Green
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Green @ 2011-10-07 19:01 UTC (permalink / raw)
  To: ntg-context

Thank you again!

> You need the following mode setting:
> 
> \usemodule[letter]
> 
> \startletter
> 
> \startnotmode[*trialtypesetting]
> \placetable[here][]{title}
> \starttable[|l|]
> \NC That?s all \NC\MR
> \stoptable
> \stopnotmode
> 
> \stopletter
___________________________________________________________________________________
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] 5+ messages in thread

* Re: References to annotations
  2011-10-06  1:10 Michael Green
@ 2011-10-06  7:10 ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2011-10-06  7:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 06.10.2011 um 03:10 schrieb Michael Green:

> That works. Thank you very much!
> 
> Coincidentally, I found a similar issue with the letter module. The table in the example below will be numbered "Table 2"
> 
> \usemodule[letter]
> 
> \starttext
> 
> \startletter
> 
> \placetable[here][]{title}
> \starttable[|l|]
> \NC That’s all \NC\MR
> \stoptable
> 
> \stopletter
> \stoptext 


You need the following mode setting:

\usemodule[letter]

\startletter

\startnotmode[*trialtypesetting]
\placetable[here][]{title}
\starttable[|l|]
\NC That’s all \NC\MR
\stoptable
\stopnotmode

\stopletter

Wolfgang
___________________________________________________________________________________
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] 5+ messages in thread

* Re: References to annotations
@ 2011-10-06  1:10 Michael Green
  2011-10-06  7:10 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Green @ 2011-10-06  1:10 UTC (permalink / raw)
  To: ntg-context

That works. Thank you very much!

Coincidentally, I found a similar issue with the letter module. The table in the example below will be numbered "Table 2"

\usemodule[letter]

\starttext

\startletter

\placetable[here][]{title}
\starttable[|l|]
\NC That’s all \NC\MR
\stoptable

\stopletter
\stoptext 



___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2011-10-07 19:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-05 17:50 References to annotations Michael Green
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

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