Debian Codegraph @

texmf-dist/doc/latex/lisp-on-tex/examples/showfont.tex

raw
1 \documentclass{article}
2 \usepackage{lisp-on-tex}
3 \newcount\hoge \hoge\endlinechar
4 \endlinechar=-1
5 \read16 to\tmp
6 \endlinechar=\hoge
7 \global\font\testfont="\tmp"
8 \lispinterp{
9 (\define \foldl (\lambda (\func \init \list)
10 (\lispif (\= \list ())
11 \init
12 (\foldl \func (\func \init (\car \list)) (\cdr \list)))))
13 (\define \createtoken (\lambda (\code)
14 (\concat '\iffontchar\testfont' (\concat (\intTOstring \code) 't\else f\fi' ))))
15 (\define \MAX :"30000)}
16 \begin{document}
17 \noindent
18 \lispinterp{
19 (\letrec ((\count :0)
20 (\loop (\lambda ()
21 (\lispif (\< \MAX \count) ()
22 (\begin
23 (\lispif (\= 't' (\expand (\createtoken \count)))
24 (\texprint (\group (\concat '\testfont\char' (\intTOstring \count))))
25 ())
26 (\texprint '\hskip0pt plus1pt')
27 (\immediatewrite)
28 (\setB \count (\+ \count :1))
29 (\loop))))))
30 (\loop))
31 }
32 \end{document}