beta-0.89.2
[luatex.git] / source / texk / texlive / tl_scripts / allcm.sh
blob945c7c88457752359bf98fcec700de8aa4951e93
1 #!/bin/sh
3 test -f /bin/sh5 && test -z "$RUNNING_SH5" \
4 && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
5 && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; }
6 unset RUNNING_SH5
8 test -f /bin/bsh && test -z "$RUNNING_BSH" \
9 && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
10 && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
11 unset RUNNING_BSH
13 # hack around a bug in zsh:
14 test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
16 progname=`basename $0`
17 tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
19 case "$progname" in
20 allec)
21 encoding=T1;;
23 encoding=OT1;;
24 esac
26 case "$1" in
27 -r)
28 DVIPS=dvired
29 shift
32 DVIPS=dvips
34 esac
36 body()
38 cat <<-'eof'
39 \pagestyle{empty}
40 \parindent0in
41 \hfuzz=\maxdimen
42 \hbadness=10000
43 \textheight9.5in
44 \textwidth6.5in
45 \newcommand{\myformula}{\sum a_{b_{c_d}} = c}
46 \newcommand{\mytext}{text $\mathcal{\myformula}\mathrm{\myformula}
47 \mathbf{\myformula}\mathsf{\myformula}\mathtt{\myformula}
48 \mathnormal{\myformula}\mathit{\myformula}$}
50 \newcommand{\TestSizes}{{%
51 \tiny \mytext\scriptsize \mytext\footnotesize \mytext\small \mytext
52 \normalsize \mytext
53 \large \mytext\Large \mytext\LARGE \mytext\huge \mytext\Huge \mytext}}
54 \newcommand{\TestRM}{rm-family: {\rmfamily\TestSizes}\newline}
55 \newcommand{\TestSF}{sf-family: {\sffamily\TestSizes}\newline}
56 \newcommand{\TestTT}{tt-family: {\ttfamily\TestSizes}\newline}
57 \newcommand{\TestFamilies}{\TestRM\TestSF\TestTT\newline}
58 \newcommand{\TestMD}{md-series: {\mdseries\TestFamilies}}
59 \newcommand{\TestBF}{bf-series: {\bfseries\TestFamilies}}
60 \newcommand{\TestSeries}{\TestBF\TestMD\par}
61 \newcommand{\TestUP}{up-shape: {\upshape\TestSeries}\par}
62 \newcommand{\TestIT}{it-shape: {\itshape\TestSeries}\par}
63 \newcommand{\TestSL}{sl-shape: {\slshape\TestSeries}\par}
64 \newcommand{\TestSC}{sc-shape: {\scshape\TestSeries}\par}
65 \newcommand{\TestShapes}{\TestUP\TestIT\TestSL\TestSC}
66 \begin{document}
67 \TestShapes
68 \end{document}
69 eof
72 head()
74 echo '\documentclass['$1'pt]{article}'
75 echo '\usepackage['$encoding']{fontenc}'
78 # before we create the tmpdir, set trap for cleanup
79 trap '
80 rm -rf $tmpdir
81 exit 1
82 ' 1 2 3 7 13 15
84 (umask 077; mkdir "$tmpdir") || {
85 echo "$progname: failed to create temp directory." >&2
86 exit 1
89 cd $tmpdir || exit 1
90 echo >&2
91 echo "---------------------------------------------------------------------" >&2
92 echo ">>>>>>>>>>> Generating testfiles for 10pt, 11pt and 12pt. <<<<<<<<<<" >&2
93 echo "---------------------------------------------------------------------" >&2
94 head 10 > allcm10.tex
95 head 11 > allcm11.tex
96 head 12 > allcm12.tex
97 body >> allcm10.tex
98 body >> allcm11.tex
99 body >> allcm12.tex
101 echo >&2
102 echo "---------------------------------------------------------------------" >&2
103 echo ">>>>>>>>>>> Calling latex... <<<<<<<<<<" >&2
104 echo "---------------------------------------------------------------------" >&2
105 latex allcm10 >/dev/null
106 latex allcm11 >/dev/null
107 latex allcm12 >/dev/null
109 echo >&2
110 echo "---------------------------------------------------------------------" >&2
111 echo ">>>>>>>>>>> Now, calling $DVIPS to make missing fonts... <<<<<<<<<<" >&2
112 echo "---------------------------------------------------------------------" >&2
113 $DVIPS ${1+"$@"} -V -f allcm10 > /dev/null
114 $DVIPS ${1+"$@"} -V -f allcm11 > /dev/null
115 $DVIPS ${1+"$@"} -V -f allcm12 > /dev/null
117 cd /
118 rm -rf $tmpdir