ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: <kitz@inradius.net>
To: ntg-context@ntg.nl
Subject: \defineparagraphs
Date: Fri, 08 Jul 2016 07:53:24 -0400	[thread overview]
Message-ID: <51175.1467978804@inradius.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]

The code below works with context2016.02.15, but fails with context2016.05.19.

Itemize within the defined paragraph (Mypar) no longer puts the thinrule in the margin (see the third question.) The \ansblank command seems to the second part of Mypar is 
the margin?  Pdf of the success and fail attached.

Thanks! John


\defineparagraphs[Mypar][n=2]
 \setupparagraphs[Mypar][1][width=0.5\textwidth] 

% label subquestions (a, b, c, etc) with answerblanks
\defineconversionset[myitemize][n,a][n]

% define the answerblank in right margin
\define\ansblank
  {\inright{\simplealignedbox{2em}{flushleft}{\convertedcounter[itemgroup:itemize][numberconversionset=myitemize,numberstopper=.]}\thinrule}\ignorespaces}

% \define\noblank
\define\noblank
  {\inright{~}}

% put them together to toggle printing of the answerblank
\define\blankon{\setupitemgroup [itemize] [style=bold,command=\ansblank]}
\define\blankoff{\setupitemgroup [itemize] [style=bold,command=\noblank]}

\starttext
\showframe
\startitemize[n]
\blankon
\item First question.
\blankoff
\item Second question has two parts.
  \startitemize[a]
  \blankon
  \item subquestion a
  \item subquestion b
  \stopitemize
\blankon
\startMypar
\item Third question refers to graphic at right. 
\Mypar
<A graphic/MPcode goes herer>
\stopMypar
\item Final question.
\stopitemize
\stoptext






[-- Attachment #2: mwe2016.02.15.pdf --]
[-- Type: application/octet-stream, Size: 10323 bytes --]

[-- Attachment #3: mwe2016.05.19.pdf --]
[-- Type: application/octet-stream, Size: 10415 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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:[~2016-07-08 11:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08 11:53 kitz [this message]
2016-07-08 13:20 ` \defineparagraphs Wolfgang Schuster
2016-07-09 12:48   ` \defineparagraphs John Kitzmiller
2016-07-09 15:10     ` \defineparagraphs Wolfgang Schuster

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=51175.1467978804@inradius.net \
    --to=kitz@inradius.net \
    --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).