ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* What is the ConTeXt way to handle this \vbox trick?
@ 2021-05-08 20:05 Idris Samawi Hamid ادريس سماوي حامد
  2021-05-09 11:04 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2021-05-08 20:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Dear gang,

Consider the following MWE (for a sequential multiple-choice exam), using  
some old and ugly TeX code:

=======
\setupbodyfont[schola]
\noheaderandfooterlines
\setupwhitespace[big]

\def\CHOICE#1#2{\leavevmode\vbox{\tabskip=0pt\everycr={}
                 \halign{\strut\hfil##\hfil\cr#1\cr#2\cr}}}

\starttext
(Religion * Biology * Cosmology * Physics) is part of the subject matter  
of World Philosophies.

(Religion * Biology * Cosmology * Physics) is part of the subject matter  
of World Philosophies.

(\CHOICE{1}{Religion}\ * \CHOICE{X}{Biology} *
\CHOICE{2}{Cosmology}\ * \CHOICE{X}{Physics}) is part of the subject  
matter of World Philosophies.
\stoptext
=======

Result is attached. Question:

What is the most elegant ConTeXt way to get the same result as the above  
code, with equal or better control? Thank you in advance.

Best wishes
Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

[-- Attachment #2: choice-mwe.pdf --]
[-- Type: application/pdf, Size: 8901 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2021-05-09 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 20:05 What is the ConTeXt way to handle this \vbox trick? Idris Samawi Hamid ادريس سماوي حامد
2021-05-09 11:04 ` Hans Hagen

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