summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ran_toks/examples/rt-cb.tex
blob: c8e20e4d171a9bdc0f6cb06a9182a203864f3d87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
\documentclass{article}
\usepackage{ran_toks}
\usepackage{collectbox}

\useLastAsSeed

\newbox\rtcollectbox

\parindent0pt


\begin{document}

In this file, a method of placing verbatim content in as a token argument of
\verb~\ranToks~ The key is to use the \textsf{collectbox} package, and collect
the verbatim content with \verb~\collectboxto~.

\def\cbCont{\def\myVerb{\usebox{\rtcollectbox}}}
\collectboxto{\rtcollectbox}{\cbCont}{\verb!$x^2+1$!}

%\ranToksOff
\ranToks{CB}
{%
    {Don-1}
    {Kira-2}
    {Alex-3}
    {Jim-4}
    {Rick-5}
    {\myVerb-6}
}

\useRanTok{1}, \useRanTok{2}, \useRanTok{3}, \useRanTok{4}, \useRanTok{5},
\useRanTok{6}%, \useRanTok{7}


\end{document}