ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Damien Thiriet via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Damien Thiriet <damien@thiriet.web4me.fr>
Subject: Re: right item marks for associative questions?
Date: Fri, 15 Apr 2022 10:54:03 +0200	[thread overview]
Message-ID: <Ylkyq2I3HQ1+dM+P@valencay.home> (raw)

> You can use different alignment settings to move the bullet points to
> the right side of your lists.

Thank you Wolfgang, this is exactly what I need.
One more question: I am typesetting those questions in lua,
because lua vectors were more convenient for reading the whole 
but I am not sure how should I pass the righttoleft option.
I read the cld manual and my guess is I should use function() 
but looks like I lack some understanding of context proceeding.


This is what I did so far


\startluacode 
   userdata = userdata or {}
   function ListeAleatoireGauche(t)
      context.startitemize {"8","packed","random"}
         for k=1,#t do
            context.startitem()
               context.lefttoright(t[k])
            context.stopitem()
         end
      context.stopitemize()
   end
   function ListeAleatoireDroite(t)
      context.startitemize {"8","packed","random"}
         for k=1,#t do
            context.startitem()
               context(t[k])
            context.stopitem()
         end
      context.stopitemize()
   end

   function QCMAssociatif(t,u)
      context.startxtable {"frame=no","columndistance=3cm"}
         context.startxrow()
            context.startxcell()
               ListeAleatoireGauche(t)
            context.stopxcell()
            context.startxcell()
               ListeAleatoireDroite(u)
            context.stopxcell()
         context.stopxrow()
      context.stopxtable()
   end
\stopluacode
\starttext
\startluacode 
Author = {"Nietzsche","God"}
Quote = {"God is dead","Nietzsche is Dead"}
QCMAssociatif (Author,Quote)
\stoptext


Damien Thiriet 
___________________________________________________________________________________
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
___________________________________________________________________________________

             reply	other threads:[~2022-04-15  8:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-15  8:54 Damien Thiriet via ntg-context [this message]
2022-04-15 12:52 ` śrīrāma via ntg-context
  -- strict thread matches above, loose matches on Subject: below --
2022-04-12 18:46 Damien Thiriet via ntg-context
2022-04-12 19:58 ` Wolfgang Schuster via ntg-context
2022-04-11 18:46 Damien Thiriet via ntg-context
2022-04-11 20:18 ` Pablo Rodriguez via ntg-context
2022-04-11 22:04 ` Jeong Dal via ntg-context
2022-04-12  5:48 ` śrīrāma via ntg-context

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=Ylkyq2I3HQ1+dM+P@valencay.home \
    --to=ntg-context@ntg.nl \
    --cc=damien@thiriet.web4me.fr \
    /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).