ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: References to annotations broken, mkiv
Date: Wed, 12 Sep 2012 01:18:23 +0200	[thread overview]
Message-ID: <1DDC8ECA-746C-4778-80AC-0D0BAAEAC0EF@gmail.com> (raw)
In-Reply-To: <CAOY3_w5b2Q0dMkBJ_TyunT9=cu28rmun2R0wy7Uy4yKFx4S9ow@mail.gmail.com>


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
___________________________________________________________________________________


  reply	other threads:[~2012-09-11 23:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 15:17 Dominik Leopold Forkert
2012-09-11 23:18 ` Wolfgang Schuster [this message]
2012-09-12 11:44 ` Dominik Leopold Forkert

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=1DDC8ECA-746C-4778-80AC-0D0BAAEAC0EF@gmail.com \
    --to=wolfgang.schuster@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).