[NTG-context] right item marks for associative questions?

Damien Thiriet damien at thiriet.web4me.fr
Fri Apr 15 10:54:03 CEST 2022


> 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 


More information about the ntg-context mailing list