Re: Mixing quiz questions

Giovanni Piredda <[email protected]>
Newsgroups gmane.editors.texmacs.user
Message-ID <[email protected]>
There is a hint on how to do it by Max Gubinelli in 
http://forum.texmacs.cn/t/include-a-texmacs-file-in-my-master-document-and-edit-it-directly/889/11 
and more hints in the following posts.

I started from it to compose a document with exercises extracted 
randomly from several lists, one per list, but I have not found all of 
the software that I wrote and used to do it.

Here are test macros that I wrote for assembling a document; I find them 
rather chaotic but I hope they help :-) In the next few days I might 
find a bit of time to sort out the software and write a sensible draft, 
but I do not promise it.

<assign|item-list-1|<tuple|a|b|c|d|e>>

<assign|item-list-2|<tuple|a|b|c|d|e>>

<assign|item-list-3|<tuple|a|b|c|d|e>>

<assign|item-list-4|<tuple|a|b|c|d|e>>

<assign|rand|<macro|n|<extern|(lambda (n) (stree-\<gtr\>tree (random
(string-\<gtr\>number (tree-\<gtr\>stree n)))))|<arg|n>>>>

<assign|content|<macro|lst|<quasiquote|<look-up|<arg|lst>|<rand|<length|<arg|lst>>>>>>>

<assign|doc-tuple|<xmacro|args|<arg|args|<extern|(stree-\<gtr\>tree (random
3))>>>>

<assign|random-list|<\macro>
   <\enumerate>
     <item><content|<value|item-list-1>>

     <item><content|<value|item-list-2>>

     <item><content|<value|item-list-3>>

     <item><content|<value|item-list-4>>
   </enumerate>
</macro>>



On 05/11/23 12:12, David Latreyte wrote:
> Hello,
>
> I'm currently creating my quizzes with the esami package in LaTeX (the only thing I can't yet do with TeXmacs). The latter allows me to randomly mix the suggested answers for each question, when I create the pdf, and even allows me to write several similar questions that are chosen randomly.
> I've started writing a script in Python (I don't know Scheme well enough) that manipulates texmacs files (which isn't very clean) but before going any further I'd like to know if this work has already been done.
>
> Thank you.
> Bye
> ————
> David Latreyte
> [email protected]
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.