Debian Codegraph @

texmf-dist/doc/latex/hepnames/mkmacrotables

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 ## For each package...
4 for package in hepnicenames heppennames; do
5 echoscip-shell system . . echo. "Processing package $package"
6
7 ## Make the macro list document fragment
8 TMP=macrolist-$$.tmp
9 > $TMP
10 echoscip-shell system . . echo. "\begin{multicols}{2}{" >> $TMP
11 echoscip-shell system . . echo. "\begin{itemize}" >> $TMP
12 catscip-shell system . . cat. ${package}.sty | egrepscip-shell system . . egrep. "^\\\DeclareRobustCommand|^%\\\DeclareRobustCommand" | while read line; do
13 item=$( echoscip-shell system . . echo. $line | sedscip-shell system . . sed. -e s/'^%'// -e s/"DeclareRobustCommand{\([^}]\+\)}[^%]*"/"\1"/g -e s/'%.*'//g )
14 if [[ -z $item ]]; then continue; fi
15 description=$( echoscip-shell system . . echo. $line | sedscip-shell system . . sed. -e s/'^.*DeclareRobustCommand[^%]*'//g -e s/'%%.*'//g -e s/'^%\ *'//g )
16 if [[ -n $description ]]; then description="$description\newline"; fi
17 echoscip-shell system . . echo. "\item ${description} \texcmd{$(echoscip-shell system . . echo. $item | sedscip-shell system . . sed. -e s/'\ .*'/''/g)} \$\Rightarrow\$ \\${item}" >> $TMP
18 done
19 echoscip-shell system . . echo. "\end{itemize}" >> $TMP
20 echoscip-shell system . . echo. "}\end{multicols}" >> $TMP
21
22 ## Make the LaTeX files
23 PKGOUT=${package}-macros.tex
24 echoscip-shell system . . echo. "Making $PKGOUT"
25 catscip-shell system . . cat. $TMP > $PKGOUT
26
27 for style in it rm; do
28 PKGOUT=${package}-${style}.tex
29 echoscip-shell system . . echo. "Making $PKGOUT"
30 > $PKGOUT
31 if [[ "$style" = "rm" ]]; then pkgopts=""; else pkgopts="[italic]"; fi
32 SECTIONCMD="\section"
33 echoscip-shell system . . echo. "\documentclass[12pt]{article}" >> $PKGOUT
34 echoscip-shell system . . echo. "\usepackage${pkgopts}{${package}}" >> $PKGOUT
35 echoscip-shell system . . echo. "\usepackage{a4wide,multicol,setspace,color}" >> $PKGOUT
36 echoscip-shell system . . echo. "\title{Testing \\textsf{${package}}}" >> $PKGOUT
37 echoscip-shell system . . echo. "\author{Generated by \texttt{$USER}}" >> $PKGOUT
38 echoscip-shell system . . echo. "\onehalfspacing" >> $PKGOUT
39 echoscip-shell system . . echo. '\newcommand{\texcmd}[1]{\textcolor{red}{\texttt{\char`\\#1}}}' >> $PKGOUT
40 echoscip-shell system . . echo. "\newcommand{\texenv}[1]{\textcolor{red}{\texttt{#1}}}" >> $PKGOUT
41 echoscip-shell system . . echo. "\newcommand{\texopt}[1]{\textcolor{purple}{\texttt{#1}}}" >> $PKGOUT
42 echoscip-shell system . . echo. "\newcommand{\texopts}[1]{\textcolor{purple}{\texttt{[#1]}}}" >> $PKGOUT
43 echoscip-shell system . . echo. "\newcommand{\texarg}[1]{\textcolor{violet}{\texttt{#1}}}" >> $PKGOUT
44 echoscip-shell system . . echo. "\newcommand{\texargs}[1]{\textcolor{violet}{\texttt{\{#1\}}}}" >> $PKGOUT
45 echoscip-shell system . . echo. "\newcommand{\texpkg}[1]{\texttt{#1}}" >> $PKGOUT
46 echoscip-shell system . . echo. "\newcommand{\texcls}[1]{\texttt{#1}}" >> $PKGOUT
47 echoscip-shell system . . echo. "\newcommand{\gen}[1]{\ensuremath{\braket{#1}}}" >> $PKGOUT
48 echoscip-shell system . . echo. >> $PKGOUT
49 echoscip-shell system . . echo. "\begin{document}" >> $PKGOUT
50 echoscip-shell system . . echo. "\maketitle" >> $PKGOUT
51 echoscip-shell system . . echo. >> $PKGOUT
52 echoscip-shell system . . echo. "$SECTIONCMD{Normal font}" >> $PKGOUT
53 catscip-shell system . . cat. $TMP >> $PKGOUT
54 echoscip-shell system . . echo. "\clearpage" >> $PKGOUT
55 echoscip-shell system . . echo. >> $PKGOUT
56 echoscip-shell system . . echo. "$SECTIONCMD{Bold font}" >> $PKGOUT
57 echoscip-shell system . . echo. "\textbf{" >> $PKGOUT
58 catscip-shell system . . cat. $TMP >> $PKGOUT
59 echoscip-shell system . . echo. "}" >> $PKGOUT
60 echoscip-shell system . . echo. "\clearpage" >> $PKGOUT
61 echoscip-shell system . . echo. >> $PKGOUT
62 echoscip-shell system . . echo. "$SECTIONCMD{Italic font}" >> $PKGOUT
63 echoscip-shell system . . echo. "\textit{" >> $PKGOUT
64 catscip-shell system . . cat. $TMP >> $PKGOUT
65 echoscip-shell system . . echo. "}" >> $PKGOUT
66 echoscip-shell system . . echo. "\clearpage" >> $PKGOUT
67 echoscip-shell system . . echo. >> $PKGOUT
68 echoscip-shell system . . echo. "$SECTIONCMD{Bold italic font}" >> $PKGOUT
69 echoscip-shell system . . echo. "\textbf{\textit{" >> $PKGOUT
70 catscip-shell system . . cat. $TMP >> $PKGOUT
71 echoscip-shell system . . echo. "}}" >> $PKGOUT
72 echoscip-shell system . . echo. >> $PKGOUT
73 echoscip-shell system . . echo. "$SECTIONCMD{Sans font}" >> $PKGOUT
74 echoscip-shell system . . echo. "\textsf{" >> $PKGOUT
75 catscip-shell system . . cat. $TMP >> $PKGOUT
76 echoscip-shell system . . echo. "}" >> $PKGOUT
77 echoscip-shell system . . echo. "\clearpage" >> $PKGOUT
78 echoscip-shell system . . echo. >> $PKGOUT
79 echoscip-shell system . . echo. "$SECTIONCMD{Bold sans font}" >> $PKGOUT
80 echoscip-shell system . . echo. "\textsf{\textbf{" >> $PKGOUT
81 catscip-shell system . . cat. $TMP >> $PKGOUT
82 echoscip-shell system . . echo. "}}" >> $PKGOUT
83 echoscip-shell system . . echo. "\clearpage" >> $PKGOUT
84 echoscip-shell system . . echo. >> $PKGOUT
85 echoscip-shell system . . echo. "$SECTIONCMD{Italic sans font}" >> $PKGOUT
86 echoscip-shell system . . echo. "\textsf{\textit{" >> $PKGOUT
87 catscip-shell system . . cat. $TMP >> $PKGOUT
88 echoscip-shell system . . echo. "}}" >> $PKGOUT
89 echoscip-shell system . . echo. "\clearpage" >> $PKGOUT
90 echoscip-shell system . . echo. >> $PKGOUT
91 echoscip-shell system . . echo. "$SECTIONCMD{Bold italic sans font}" >> $PKGOUT
92 echoscip-shell system . . echo. "\textsf{\textbf{\textit{" >> $PKGOUT
93 catscip-shell system . . cat. $TMP >> $PKGOUT
94 echoscip-shell system . . echo. "}}}" >> $PKGOUT
95 echoscip-shell system . . echo. >> $PKGOUT
96 echoscip-shell system . . echo. "\end{document}" >> $PKGOUT
97 done
98 rmscip-shell system . . rm. -f $TMP
99
100 done