Re: [NTG-context] References to annotations broken, mkiv

2012-09-12 Thread Dominik Leopold Forkert
Thanks again for the excellent help!

Dominik
___
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
___


[NTG-context] References to annotations broken, mkiv

2012-09-11 Thread Dominik Leopold Forkert
Hello,

the recent update of the Annotation module (2012.09.05), mkiv broke
the references to annotations for me:

\usemodule[annotation]
\defineannotation[definition][text=Definition,number=yes]

\starttext
\definition[reference=def1]{blabla}
In \in{Definition}[def1]  ...
\stoptext

In the example above the rather strange output is:
Definition 2blabla

In Definition 1 ...


In addition, I do not know how to correctly get the annotation counter
displayed in a 'bychapter'-style. I tried:

\usemodule[annotation]
\definenumber[DefinitionCounter][prefix=yes,way=bysection]
\defineannotation[definition][text=Definition,number=yes,counter=DefinitionCounter]

\starttext
\chapter{A chapter}
\section{A section}
Counter: \getnumber[DefinitionCounter]
\definition[reference=def1]{blabla}

Counter: \getnumber[DefinitionCounter]

In \in{Definition}[def1] blabla ...
\stoptext

Again the behavior of the counter is really weird. Now I get
Definition 1.1.2 blabla, but \in[def1] just shows 1 instead of
1.1.2.

I sincerely hope for clarification!


Best regards,

Dominik
___
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
___


Re: [NTG-context] References to annotations broken, mkiv

2012-09-11 Thread Wolfgang Schuster

Am 11.09.2012 um 17:17 schrieb Dominik Leopold Forkert 
dominik.fork...@gmail.com:

 Hello,
 
 the recent update of the Annotation module (2012.09.05), mkiv broke
 the references to annotations for me:
 
 \usemodule[annotation]
 \defineannotation[definition][text=Definition,number=yes]
 
 \starttext
 \definition[reference=def1]{blabla}
 In \in{Definition}[def1]  ...
 \stoptext
 
 In the example above the rather strange output is:
 Definition 2blabla
 
 In Definition 1 ...
 
 
 In addition, I do not know how to correctly get the annotation counter
 displayed in a 'bychapter'-style. I tried:
 
 \usemodule[annotation]
 \definenumber[DefinitionCounter][prefix=yes,way=bysection]
 \defineannotation[definition][text=Definition,number=yes,counter=DefinitionCounter]
 
 \starttext
 \chapter{A chapter}
 \section{A section}
 Counter: \getnumber[DefinitionCounter]
 \definition[reference=def1]{blabla}
 
 Counter: \getnumber[DefinitionCounter]
 
 In \in{Definition}[def1] blabla ...
 \stoptext
 
 Again the behavior of the counter is really weird. Now I get
 Definition 1.1.2 blabla, but \in[def1] just shows 1 instead of
 1.1.2.
 
 I sincerely hope for clarification!

I uploaded a new version where I fixed the counter bug for the annotation 
command
and also the output of the reference-output.

There is also no need to create a new counter because each annotation has it’s 
own
counter with the same name as the environment/command but to change the way
how it is displayed you have to use \setupannotation.

\usemodule[annotation]

\defineannotation[definition][text=Definition,number=yes]

\setupannotation[definition][prefix=yes,way=bychapter,prefixsegments=chapter]

\starttext

\chapter{A chapter}
\section{A section}

\definition[reference=definition:1]{blabla}

Counter: 
\rawcountervalue[definition]/\convertedcounter[definition][prefix=yes,prefixsegments=chapter]

In \in{Definition}[definition:1] blabla ...

\stoptext

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
___


Re: [NTG-context] References to annotations

2011-10-07 Thread Michael Green
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
___


Re: [NTG-context] References to annotations

2011-10-06 Thread Wolfgang Schuster

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
___


[NTG-context] References to annotations

2011-10-05 Thread 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

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
___


Re: [NTG-context] References to annotations

2011-10-05 Thread Wolfgang Schuster

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
___


Re: [NTG-context] References to annotations

2011-10-05 Thread 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 



___
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
___