From: "Mikael P. Sundqvist" <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Get "right" numbers using blocks and enumerations
Date: Thu, 1 Sep 2016 21:18:09 +0200 [thread overview]
Message-ID: <CAHy-LL9X=NC0hahNnm6_+=eq8ox+pb4xGn85DNqMELoUQv1i0A@mail.gmail.com> (raw)
Hi,
I'm trying to use blocks for answers in a text, but cannot get the
numbering to work as I want. I have read about \processblocks at the
wiki (http://wiki.contextgarden.net/Command/processblocks), but I'm
not sure that is my cure. I probably miss something easy...
The problem is probably easiest shown by an example:
%%%
\defineblock[A]
\hideblocks[A]
\defineenumeration[A][
text=A,
prefix=yes,
prefixsegments=chapter,
way=bychapter,
]
\starttext
\chapter{First chapter}
\beginA
\startA
My first answer in the first chapter.
\stopA
\endA
\beginA
\startA
My second answer in the first chapter.
\stopA
\endA
\chapter{Second chapter}
\beginA
\startA
My first answer in the second chapter.
\stopA
\endA
\beginA
\startA
My second answer in the second chapter.
\stopA
\endA
\chapter{Answers}
\useblocks[A]
\stoptext
%%%
I get, in the Answer chapter
A 3.1, A 3.2, A 3.3 and A 3.4.
What I want to have in the answer chapter is
A 1.1, A 1.2, A 2.1 and A 2.2.
(to follow the numbering in the chapters where the blocks were defined).
Is it possible? What have I missed?
Related: Is there a better way to set answers to questions? (Perhaps
not having to write both the \begin... \start... \stop... \end... for
every question?
/Mikael
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2016-09-01 19:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 19:18 Mikael P. Sundqvist [this message]
2016-09-06 19:29 ` Wolfgang Schuster
2016-09-06 19:52 ` Mikael P. Sundqvist
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='CAHy-LL9X=NC0hahNnm6_+=eq8ox+pb4xGn85DNqMELoUQv1i0A@mail.gmail.com' \
--to=mickep@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).