blob: 31200d9796a30d7c5779b1a2188219a8acd55fa9 (
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
|
\documentclass{article}
\usepackage{lisp-on-tex}
\newcount\hoge \hoge\endlinechar
\endlinechar=-1
\read16 to\tmp
\endlinechar=\hoge
\global\font\testfont="\tmp"
\lispinterp{
(\define \foldl (\lambda (\func \init \list)
(\lispif (\= \list ())
\init
(\foldl \func (\func \init (\car \list)) (\cdr \list)))))
(\define \createtoken (\lambda (\code)
(\concat '\iffontchar\testfont' (\concat (\intTOstring \code) 't\else f\fi' ))))
(\define \MAX :"30000)}
\begin{document}
\noindent
\lispinterp{
(\letrec ((\count :0)
(\loop (\lambda ()
(\lispif (\< \MAX \count) ()
(\begin
(\lispif (\= 't' (\expand (\createtoken \count)))
(\texprint (\group (\concat '\testfont\char' (\intTOstring \count))))
())
(\texprint '\hskip0pt plus1pt')
(\immediatewrite)
(\setB \count (\+ \count :1))
(\loop))))))
(\loop))
}
\end{document}
|