ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* References to annotations broken, mkiv
@ 2012-09-11 15:17 Dominik Leopold Forkert
  2012-09-11 23:18 ` Wolfgang Schuster
  2012-09-12 11:44 ` Dominik Leopold Forkert
  0 siblings, 2 replies; 3+ messages in thread
From: Dominik Leopold Forkert @ 2012-09-11 15:17 UTC (permalink / raw)
  To: ntg-context

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 2    blabla

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
___________________________________________________________________________________


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

* Re: References to annotations broken, mkiv
  2012-09-11 15:17 References to annotations broken, mkiv Dominik Leopold Forkert
@ 2012-09-11 23:18 ` Wolfgang Schuster
  2012-09-12 11:44 ` Dominik Leopold Forkert
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2012-09-11 23:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 11.09.2012 um 17:17 schrieb Dominik Leopold Forkert <Dominik.Forkert@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 2    blabla
> 
> 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
___________________________________________________________________________________


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

* Re: References to annotations broken, mkiv
  2012-09-11 15:17 References to annotations broken, mkiv Dominik Leopold Forkert
  2012-09-11 23:18 ` Wolfgang Schuster
@ 2012-09-12 11:44 ` Dominik Leopold Forkert
  1 sibling, 0 replies; 3+ messages in thread
From: Dominik Leopold Forkert @ 2012-09-12 11:44 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________


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

end of thread, other threads:[~2012-09-12 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-11 15:17 References to annotations broken, mkiv Dominik Leopold Forkert
2012-09-11 23:18 ` Wolfgang Schuster
2012-09-12 11:44 ` Dominik Leopold Forkert

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