Debian Codegraph @

texmf-dist/doc/latex/ran_toks/examples/rt-cb.tex

raw
1 \documentclass{article}
2 \usepackage{ran_toks}
3 \usepackage{collectbox}
4
5 \useLastAsSeed
6
7 \newbox\rtcollectbox
8
9 \parindent0pt
10
11
12 \begin{document}
13
14 In this file, a method of placing verbatim content in as a token argument of
15 \verb~\ranToks~ The key is to use the \textsf{collectbox} package, and collect
16 the verbatim content with \verb~\collectboxto~.
17
18 \def\cbCont{\def\myVerb{\usebox{\rtcollectbox}}}
19 \collectboxto{\rtcollectbox}{\cbCont}{\verb!$x^2+1$!}
20
21 %\ranToksOff
22 \ranToks{CB}
23 {%
24 {Don-1}
25 {Kira-2}
26 {Alex-3}
27 {Jim-4}
28 {Rick-5}
29 {\myVerb-6}
30 }
31
32 \useRanTok{1}, \useRanTok{2}, \useRanTok{3}, \useRanTok{4}, \useRanTok{5},
33 \useRanTok{6}%, \useRanTok{7}
34
35
36 \end{document}