Comprehensive TeX Archive Network

Direc­tory tex-archive/macros/latex/contrib/ran_toks


The rantoks Pack­age Author: D. P. Story Dated: 2016/02/06 Ver­sion: v1.0e

This short pack­age, with min­i­mal re­quire­ments, de­fines macros for ran­dom­iz­ing a list of to­kens. There are two ap­proaches:

1.  \ranToks{myList}{ {One}{Two}{Three}{Four}{Five} }: Here the token
    list occurs as the argument of the \ranToks command. myList is the
    name of this list. The tokens can be anything that \TeX accepts as
    a macro argument, this excludes \verb, for example.
2.  Another construct writes verbatim to the disk, so the tokens can
    be of arbitrary size, and include \verb and the verbatim
    environment, for example,
    The inline answer is \verb!x^3!
    This is my stuff, leave it alone!
    The verbatim listing is
    ... (missing stuff)

To ac­tu­ally see the ran­dom­ized list, use the useRanTok{num} com­mand: For myList, we would write useRanTok{1}, useRanTok{2}, useRanTok{3}, useRanTok{4}, and {useRanTok{5}} to ob­tain a ran­dom list­ing of the to­kens in the myList list.

For user of AeB or eqexam, the lat­ter struc­ture can be used to ran­dom­ize the or­der of the ques­tions on a quiz or exam.

If the rantoks.sty file is not pro­vided in the dis­tri­bu­tion, then tex (not la­tex) the file rantoks.dtx.


Now, I must get back to my re­tire­ment.

dps 2016/02/08


Name Notes


Name Size Date Notes
README.md 1600 2016-02-08 08:27
ran_toks.dtx 16935 2016-02-08 08:18

Down­load the con­tents of this pack­age in one zip archive (87.8k).

ran_toks – Ran­domise to­ken strings

The pack­age pro­vides means of ran­domis­ing lists of to­kens, or lists of chunks of to­kens. Two mech­a­nisms for defin­ing chunks are pro­vided:

  • the macro \ranToks com­mand ac­cepts an ar­gu­ment con­tain­ing to­kens to be ran­domised; and
  • the \bRTVToks/\eRTVToks com­mands de­limit a col­lec­tion of to­kens for ran­domis­ing; each group in­side a rtVw con­sti­tutes one of these (typ­i­cally larger) to­ken sets.

Pack­age De­tailsran_toks
Li­censeThe LaTeX Project Public Li­cense 1
Copy­right2012 D. P. Story
Main­tainerDon­ald P. Story
Con­tained inTeX Live as ran_toks
MiKTeX as ran_toks
Topics sup­port for de­vel­op­ment of (La)TeX macros
Guest Book Sitemap Contact Contact Author