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
___