From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85888 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: setuphead for in-paragraph head ? Date: Sat, 11 Jan 2014 10:12:03 +0100 Message-ID: <7528AB5C-EF48-4393-869C-8DD3AA6D8C38@gmail.com> References: <52CEB6B4.7070308@gyza.cz> <133B935F-59FF-4C57-9A37-00B42BCAB67F@gmail.com> <3BA99063-FA3F-449B-B022-1A2109B25A59@gmail.com> <8E7ED7B8-29C0-4865-B7A8-DD1BD09709E3@gmail.com> <759FE779-328A-4726-8D77-779D83EA097E@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: multipart/mixed; boundary="===============1834193701==" X-Trace: ger.gmane.org 1389431525 29404 80.91.229.3 (11 Jan 2014 09:12:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Jan 2014 09:12:05 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 11 10:12:14 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W1uc0-0008TU-H4 for gctc-ntg-context-518@m.gmane.org; Sat, 11 Jan 2014 10:12:12 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C316B101E9; Sat, 11 Jan 2014 10:12:11 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZGmyxVtR8qaU; Sat, 11 Jan 2014 10:12:10 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 6763B101E2; Sat, 11 Jan 2014 10:12:10 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 74AAC101E2 for ; Sat, 11 Jan 2014 10:12:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GwHgCIpZcWQY for ; Sat, 11 Jan 2014 10:12:07 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 82517101DE for ; Sat, 11 Jan 2014 10:12:07 +0100 (CET) Original-Received: from mail-bk0-x235.google.com (mail-bk0-x235.google.com [IPv6:2a00:1450:4008:c01::235]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s0B9C5tP030684 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sat, 11 Jan 2014 10:12:05 +0100 Original-Received: by mail-bk0-f53.google.com with SMTP id na10so1862204bkb.26 for ; Sat, 11 Jan 2014 01:12:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=QSTkmGEqxf3w2W/EDQxT6v5IT7L481cs2pUiIPGn0k0=; b=jiA8UnkNeLun3j8FpKruLi1sFvykMiQsdwtXltQ3DBj/Cg1o1G1+rJF3BakaeOJSsf kwRfbjy3+FCHla2wmNDku4cNE7+IC51eFS0kFGE+vjOwjqSN0yNiAaS8vJLOs/NDzxH6 WIWA0fpRONTYNsUMEeAnrigMH7AjQHw8CufY/2wwEe8yZw2/YB3g8Qq0vOBCuYC0r6c2 PDrON8yJmxoNMxk2XS+/oKU+ZBx3bCpW1rUoFoc9TVvqeDhsI81xNIk4ykyxHzx3AomS 4NSTYVNhjtbSUBuP2NtpPwvkmUq8k/aXjxmmBsWVN93eBHh1Lv4fjL43r8mkcWkCD1Sw llfQ== X-Received: by 10.204.239.9 with SMTP id ku9mr4526235bkb.36.1389431525854; Sat, 11 Jan 2014 01:12:05 -0800 (PST) Original-Received: from keima.localdomain (x2f24fdf.dyn.telefonica.de. [2.242.79.223]) by mx.google.com with ESMTPSA id tf11sm9657842bkb.17.2014.01.11.01.12.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 Jan 2014 01:12:04 -0800 (PST) In-Reply-To: <759FE779-328A-4726-8D77-779D83EA097E@gmail.com> X-Mailer: Apple Mail (2.1827) X-Bayes-Prob: 0.9946 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4008:c01::235; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07Lcxc5it - e46a97035277 - 20140111 X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85888 Archived-At: --===============1834193701== Content-Type: multipart/alternative; boundary="Apple-Mail=_B43779B7-180D-48FE-9196-96234F907F22" --Apple-Mail=_B43779B7-180D-48FE-9196-96234F907F22 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 11.01.2014 um 00:36 schrieb Otared Kavian : > Hi Wolfgang, >=20 > In mkiv, even using \startanswer, \stopanswer (and the same syntax = with questions and hints) the blocks mechanism seems to be broken. > The error message is still the following: >=20 > \dostopnormalblock ...meter \c!after \par \egroup=20 > =20 > ...fact that $2\times 5 =3D 10$. \dostopnormalblock=20 > \dostartnormalblock = {hint}... > \dodowithpar ...dler \v!construction \endcsname #1 > \csname = \??constructionsto... >=20 > When I understand a little bit more about that mechanism I=92ll do = other testings and eventually ask Hans about what has been changed = regarding blocks. You have to convert the question, hint and answer environment. What the block environment does is to save the content from the begin to = the end block and hides it when you use \hideblocks[=85]. To output the = content of the environments you can use \useblocks[=85]. \defineblock[question] \defineblock[hint] \defineblock[answer] = \defineenumeration[question][alternative=3Dhanging,text=3D{Question},stopp= er=3D{.}] \defineenumeration[hint] [alternative=3Dhanging,text=3D{Hint for = question},stopper=3D{.}] \defineenumeration[answer] [alternative=3Dhanging,text=3D{Answer to = question},stopper=3D{.}] \keepblocks[question] \hideblocks[hint] \hideblocks[answer] \starttext \section{Questions} \beginquestion \startquestion Compute $4\times 5$. \stopquestion \beginhint \starthint Use the fact that $2\times 5 =3D 10$. \stophint \endhint \beginanswer \startanswer $20$. \stopanswer \endanswer \endquestion \beginquestion \startquestion What is the value of $100 / 10$? \stopquestion \beginhint \starthint Remember that $10\times 10 =3D 100$. \stophint \endhint \beginanswer \startanswer $10$ \stopanswer \endanswer \endquestion \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext Wolfgang --Apple-Mail=_B43779B7-180D-48FE-9196-96234F907F22 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
Am 11.01.2014 um 00:36 schrieb Otared = Kavian <otared@gmail.com>:

Hi = Wolfgang,

In mkiv, even using \startanswer, = \stopanswer (and the same syntax with questions and hints) the blocks = mechanism seems to be broken.
The error message is still the = following:

\dostopnormalblock ...meter = \c!after \par \egroup 
       =                     =                     =    
<argument> ...fact that $2\times 5 =3D 10$. = \dostopnormalblock 
            =                     =                   = \dostartnormalblock {hint}...
\dodowithpar ...dler \v!construction = \endcsname #1
              =                     =                 \csname = \??constructionsto...

When I understand a = little bit more about that mechanism I=92ll do other testings and = eventually ask Hans about what has been changed regarding = blocks.

You have to convert the = question, hint and answer environment.

What the = block environment does is to save the content from the begin to the end = block and hides it when you use \hideblocks[=85]. To output the content = of the environments you can use = \useblocks[=85].


\defineblock= [question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question][alternative=3Dhanging,t= ext=3D{Question},stopper=3D{.}]
\defineenumeration[hint] =    [alternative=3Dhanging,text=3D{Hint for = question},stopper=3D{.}]
\defineenumeration[answer] =  [alternative=3Dhanging,text=3D{Answer to = question},stopper=3D{.}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}
<= br>
\beginquestion

\startquestion
=
  Compute $4\times = 5$.
\stopquestion

\beginhint
= \starthint
  Use the fact that $2\times 5 =3D = 10$.
\stophint
\endhint

\begi= nanswer
\startanswer
  = $20$.
\stopanswer
\endanswer

= \endquestion

\beginquestion

<= div>\startquestion
  What is the value of $100 / = 10$?
\stopquestion

\beginhint
\starthint
Remember that $10\times 10 =3D = 100$.
\stophint
\endhint

\beg= inanswer
\startanswer
$10$
\stopanswer
=
\endanswer

\endquestion

=
\section{Hints}

\useblocks[hint]
<= br>
\section{Answers}

\useblocks[answer= ]

\stoptext

Wolfgang

= --Apple-Mail=_B43779B7-180D-48FE-9196-96234F907F22-- --===============1834193701== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1834193701==--