summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/acromemory/examples/dinos/myDinos_files.tex
blob: 427b0dfd02c67bf417f6590197c2947a95e69cc1 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
% This files needs to be compiled with lualatex or xelatex. In the case of
% MiniPics-LilDino, a type1 font, xelatex works, but lualatex does not.
\documentclass{article}
\usepackage{multido}
\usepackage{shellesc}

\newcommand\amBaseName{myDinos}

\pagestyle{empty}
\parindent0pt

\newcount\myCnt \myCnt=97
\def\thiscolor{red}

\begin{document}

\newwrite \wrtfiles
\long\def\IR#1{\immediate\write\wrtfiles{#1}}

% Create \amBaseName_01.tex, \amBaseName_02.tex, etc
\multido{\i=1+1}{10}{%
\ifnum\i<10\relax\edef\x{0\i}\else\edef\x{\i}\fi
\immediate\openout\wrtfiles \amBaseName_\x.tex
\ifodd\i\string\relax
  \gdef\thiscolor{red}\else
  \gdef\thiscolor{blue}\fi
\IR{%
\string\documentclass{article}^^J%
\string\usepackage{web}^^J%
\string\usepackage{multido}^^J%
\string\usepackage{fontspec}^^J%
\string\usepackage{anyfontsize}^^J%
\string\setmainfont[Mapping=tex-text]{MiniPics-LilDinos}^^J%
\string\let\string\WriteBookmarks\string\relax^^J%
\string\margins{0pt}{0pt}{0pt}{0pt}^^J%
\string\screensize{2in}{2in}^^J%
\string\pagestyle{empty}^^J%
\string\parindent0pt^^J%
\string\begin{document}^^J%
  \string\fontsize{72}{72}\string\selectfont^^J%
  \string\begin{minipage}[c][2in][c]{2in}^^J%
  \string\begin{center}^^J%
  \string\textcolor{\thiscolor}{\string\char\the\myCnt}^^J%
  \string\end{center}^^J%
  \string\end{minipage}^^J%
\string\end{document}
}
    \immediate\closeout\wrtfiles
    \global\advance\myCnt1\relax
}

% Now compile each of this TEX file using xelatex. Use
% xelatex here because it successfully uses the MiniPics-LilDinos
% font. For a different font, perhaps lualatex can be use.
\multido{\i=1+1}{10}{%
  \ifnum\i<10\relax\edef\x{0\i}\else\edef\x{\i}\fi
  \ShellEscape{xelatex \amBaseName_\x.tex}
}

% Copy \amBaseName_01.pdf to \amBaseName.pdf, it will be use
% to measure the size of a typical tile.
\ShellEscape{copy \amBaseName_01.pdf \amBaseName.pdf}

% Convert \amBaseName_01.pdf to \amBaseName.eps, it will be used
% to measure the size of a typical tile for the dvips -> distiller workflow.
\ShellEscape{pdftops -eps \amBaseName_01.pdf \amBaseName.eps}

See separate files just created.

\end{document}