summaryrefslogtreecommitdiff
path: root/usergrps/uktug/baskervi/6_2/spqr.sty
blob: 327593fa038a78e98848ea3e9558780caa27d022 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
\RequirePackage{pst-all}
\RequirePackage{fancyvrb}
\RequirePackage{shortvrb}
\RequirePackage{array,longtable}
%\endinput
\definecolor{wheat}{rgb}{.96, .87, .7}
\definecolor{lightblue}{rgb}{.68, .85, .9}
\definecolor{brown}{rgb}{.65, .16, .16}
\definecolor{pink}{rgb}{1, .75, .8}
\definecolor{palegreen}{rgb}{.6, .98, .6}
\definecolor{white}{rgb}{1, 1, 1 }
\catcode`\<=13
\def\Main#1{{\MainFont\string#1}}
\def\MainFont{\ttfamily\upshape}          % For macro definitions.
\def\ArgFont{\sffamily\mdseries\upshape}           % For meta arguments.
\def\OptArgFont{\sffamily\mdseries\itshape}  % For optional arguments.
\def<#1>{{\normalfont\itshape#1\/}}
% parameter descriptions are always in a table
\def\Par#1{\@ifnextchar({\@Par#1}{\@@Par#1()}}
\def\@Par#1=#2(#3){%
    {\normalfont #1}={\ArgFont#2}& #3}
% Short-cuts for coordinates:
\def\x#1{{\normalfont\itshape $x$#1\/}}
\def\y#1{{\normalfont\itshape $y$#1\/}}
\def\z#1{{\normalfont\itshape $z$#1\/}}
\def\c#1{(\x{#1},\kern 1pt\y{#1})}
\def\cAny{(\x{},\kern 1pt\y{})}
% In each case:
%  1. definition is delimited only by end-of-line.
%  2. {}, () and [] are literal, with contents set in \ArgFont
%  3. = and , are literal.
%  4. `foo' is for optional arguments.
%  5. <foo> is meta, as usual.
\begingroup
  \catcode`\<=1 \catcode`\>=2
  \catcode`\{=13 \catcode`\}=12
  \catcode`\[=13
  \gdef\@MD<%
    \catcode`\{=13 \catcode`\}=12 \catcode`\[=13
    \def{##1}<\{<\ArgFont ##1\/>\}>%
    \def[##1]<\string[<\ArgFont ##1\/>]>>
\endgroup
\begingroup
  \catcode`\(=13
  \catcode`\,=13
  \catcode`\==13
  \gdef\MacroDefCodes{%
    \@MD
    \catcode`\(13
    \catcode`\^^M12
    \catcode`\`13
    \catcode`\,13
    \catcode`\!1
    \catcode`\@2
    \def~{}%
    \def={{\fontshape{n}\selectfont\string=}}%
    \def,{{\fontshape{n}\selectfont\string,}}%
    \def(##1){\string({\ArgFont ##1})}}
\endgroup

\begingroup
  \catcode`\`=13 \gdef`#1'{{\OptArgFont #1}}
\endgroup

\begingroup
  \catcode`\^^M=12\relax%
  \gdef\GetMacroDef#1{\begingroup\MacroDefCodes\@GetMacroDef{#1}}%
  \gdef\@GetMacroDef#1#2^^M{#1{#2}\endgroup}%
\endgroup

% For listing macro definitions in a "description" environment:
\def\PSTCom{\GetMacroDef\@PSCom}
\def\@PSCom#1{\@@PSCom#1\@nil}
\def\@@PSCom#1\@nil{\MainFont\Main#1}
\def\PSTComOpt{\GetMacroDef\@PSTComOpt}
\def\@PSTComOpt#1{\@@PSComOpt#1\@nil}
\def\@@PSComOpt#1#2\@nil{\@PSCom{#1{\OptArgFont*[{\ArgFont settings}]}#2}}
\MakeShortVerb{\"}
\DeleteShortVerb{\|}
\def\PST{\textsf{PSTricks}}
\def\PS{\textsc{PostScript}}
\def\Special{{\normalfont\ttfamily\char'134special}}
\def\Lcs#1{{\normalfont\ttfamily\char'134#1}}
\def\Program#1{\emph{#1}}
\def\Lpack#1{\emph{#1}}
%----------- Zandtisms --------------------
\def\Usage#1{{\UsageFont\string#1}}
\def\MainFont{\fontfamily{\ttdefault}\fontseries{bc}\fontshape{n}\selectfont
\large}% For macro definitions.
\def\UsageFont{\fontfamily{\ttdefault}\fontseries{bc}\fontshape{n}\selectfont}
     % For in-line macro names.
\def\InlineFont{\ttfamily}             % For other in-line snipets of code.
\let\main\textbf
\let\usage\emph
% ---------- for array.sty --------------
\def\arraybackslash{\let\\=\@arraycr}
\newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
% ----------- harvard-style citations ------------------
\def\@cite#1#2{{#1\if@tempswa , #2\fi}}
\def\ETAL{{\em et al\/}}%

\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{; }\@ifundefined
        {b@\@citeb}{$\underline{\mbox{\@citeb}}$\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}%
% label for a bibliography citation not produced
 \def\@biblabel#1{\hfill}  

% with page or fig no
\def\Cite#1#2{\cite[#2]{#1}}%
% year only, with page or fig no
\def\Yearcite#1#2{\yearcite[#2]{#1}}%
\let\@internalcite\cite
\def\cite{\def\citename##1{##1}\@internalcite}%
% \yearcite gives only the date
\def\yearcite{\def\citename##1{}\@internalcite}%
%
\def\endPSExample{%
  \EndExample
\VerbatimInput[gobble=0,fontsize=\small,
%      frame=topline,
framerule=1.5pt]{\EXdir\theeps@counter}%
\begin{center}
    \ifgrid\vskip 8pt \fi
    \expandafter\pspicture\PictureSize
    \ifgrid\usergrid\else\relax\fi
    \input{\EXdir\theeps@counter}
    \endpspicture
    \ifgrid\vskip 8pt \fi
        \EndRuleExample
\end{center}
 }%
\renewenvironment{example**}%
{\def\Write@Ex##1{}\BeginExample}%
{%
\EndExample
\VerbatimInput[gobble=0,fontsize=\small,
      %frame=topline,
framerule=1.5pt]{\EXdir\theeps@counter}%
\begin{center}
\input{\EXdir\theeps@counter}
        \EndRuleExample
\end{center}
}
\def\Lenv#1{\texttt{#1}}
\newcolumntype{H}[1]{>{\raggedright\hangindent=.5em\arraybackslash}p{#1}}
\def\Figword{Fig.~}
\input{spqr2.sty}
\catcode`\<=12
\endinput