Debian Codegraph @

texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.tex

raw
1 \catcode`\@=11
2
3 \input pdfmsym
4 \pdfmsymsetscalefactor{10}
5
6
7 \let\@xp=\expandafter
8 \font\scten = cmcsc10
9
10 \def\fakebold#1{\pdf@literal{2 Tr .2 w}#1\pdf@literal{0 Tr 1 w}}
11 \def\scalebox[#1]#2{{\setbox0=\hbox{#2}\hbox to#1\wd0{\pdf@literal{q #1 0 0 #1 0 0 cm}\rlap{#2}\pdf@literal{Q}\hfil}}}
12 \def\begincenter{\bgroup\leftskip=0pt plus 1fill \rightskip=\leftskip}
13 \def\endcenter{\par\egroup}
14
15 \def\fbox#1{\vbox{\hrule\hbox{\vrule$#1$\vrule}\hrule}}
16
17 \def\flip#1{{\setbox0=\hbox{#1}\kern\wd0\pdf@literal{q -1 0 0 1 0 0 cm}\rlap{#1}\pdf@literal{Q}}}
18
19 \font\sevenrm = cmr7
20 \def\MatheX{Math\kern-.1ex\lower .6ex\hbox {E}\kern -.125emX}
21 \def\xetex{X\kern-.125em\lower.5ex\hbox{\flip{E}}\kern-.1667em\TeX}
22 \def\LaTeX{L\kern-.36em{\setbox0=\hbox{T}\vbox to\ht0{\hbox{\sevenrm A}\vss}}\kern-.15em\TeX}
23
24 \def\fontuse{\afterassignment\@@ \font\@@}
25 \def\scalefont{\fontuse \curr@font scaled }
26
27 %\def\title#1{\leavevmode\vskip.1\vsize\centerline{\fontuse cmcsc10 scaled 5000 \fakebold{#1}}\bigskip}
28 \def\title#1{\leavevmode\vskip.1\vsize\centerline{\scalebox[8]{\fakebold{#1}}}\bigskip}
29
30 \newcount\c@section
31 \newcount\c@subsection
32 \def\section#1{\bigskip\advance\c@section by 1 \c@subsection=0 \hbox{\fontuse cmbx10 scaled 2000 \the\c@section. #1}\par\bigskip}
33 \def\subsection#1{\medskip\advance\c@subsection by 1 \hbox{\fontuse cmbx10 scaled 1500 \the\c@section.\the\c@subsection. #1}\par\medskip}
34
35 \chardef\fslash=`\/
36 {\catcode`\^^M=\active%
37 \gdef\begincode{%
38 \bgroup\everypar={}%
39 \medskip%
40 \setbox0=\vbox\bgroup%
41 \global\dimen69=0pt%
42 \tt%
43 \catcode`\^^M=\active%
44 \def^^M{\egroup\ifnum\wd1>\dimen69 \global\dimen69=\wd1\fi\copy1\setbox1=\hbox\bgroup}%
45 \catcode`\ =\active%
46 \catcode`\{=12%
47 \catcode`\}=12%
48 \catcode`\/=0%
49 \catcode`\$=12%
50 \catcode`\\=12%
51 \catcode`\#=12%
52 \catcode`\%=12 \setbox1=\hbox\bgroup}}
53 \def\endcode{%
54 \egroup\egroup%
55 \hfil\hbox to \dimen69{\box0}\hfil\par%
56 \medskip%
57 %\let\@par=\par%
58 \egroup%
59 }
60
61 \def\icode{\bgroup\tt%
62 \catcode`\ =\active%
63 \catcode`\/=0%
64 \catcode`\{=12%
65 \catcode`\}=12%
66 \catcode`\$=12%
67 \catcode`\\=12%
68 }
69 \def\eicode{\egroup}
70
71 {\catcode`\<=\active
72 \gdef\macrousage{\bgroup\setbox0=\hbox\bgroup\tt%
73 \catcode`\ =\active%
74 \catcode`\/=0%
75 \catcode`\{=12%
76 \catcode`\}=12%
77 \catcode`\$=12%
78 \catcode`\\=12%
79 \catcode`\<=\active%
80 \def<##1>{$\langle${\it ##1}$\rangle$}%
81 }}
82 \def\emacrousage{\egroup\par\smallskip\centerline{\box0}\egroup\par\smallskip}
83 \def\emacrousageB{\egroup\box0\egroup}
84
85 \def\macroname#1{{\tt\string#1}}
86
87 \chardef\lbrace="7B
88 \chardef\rbrace="7D
89
90 \def\macroexp#1{\par\smallskip\bgroup\leftskip=1cm\leavevmode\kern-1cm\macrousage \scantokens{#1}\emacrousageB:}
91 \def\emacroexp{\par\egroup\smallskip}
92
93 \def\showcase#1#2{{\openup3\jot\halign{\tt\hskip 1cm\string##\hfil&\quad\hfil##\cr
94 \omit\tt\string#1: & $\displaystyle#1$\cr\noalign{\kern3pt\hrule\kern3pt}
95 \displaystyle & $\displaystyle #2$\cr
96 \textstyle & $\textstyle #2$\cr
97 \scriptstyle & $\scriptstyle #2$\cr
98 \scriptscriptstyle & $\scriptscriptstyle #2$\cr}
99 }}
100
101 \def\showcasevecc#1#2#3{\hbox to\hsize{\hss\vbox{\tabskip=5pt\openup3\jot%
102 \halign{\tt\hskip 1cm\string##\tabskip=0pt\hfil&&\quad##\hfil&\quad\hfil##\tabskip=5pt\cr
103 \omit\tt\string#1: & \tt\string#1 & \tt\expandafter\string\csname short\m@strip#1\endcsname%
104 \cr\noalign{\kern3pt\hrule\kern3pt}
105 \displaystyle & $\displaystyle #1{#2}$ & $\displaystyle \csname short\m@strip#1\endcsname{#3}$ \cr
106 \textstyle & $\textstyle #1{#2}$ & $\textstyle \csname short\m@strip#1\endcsname{#3}$ \cr
107 \scriptstyle & $\scriptstyle #1{#2}$ & $\scriptstyle \csname short\m@strip#1\endcsname{#3}$ \cr
108 \scriptscriptstyle & $\scriptscriptstyle #1{#2}$ & $\scriptscriptstyle \csname short\m@strip#1\endcsname{#3}$ \cr}
109 }\hss}\bigskip}
110
111 \def\showcaseveccs#1#2#3#4{\showcasevecc{#1}{#3}{#4}\showcasevecc{#2}{#3}{#4}}
112
113 \def\showcasearrow#1#2#3#4{\hbox to\hsize{\hss\vbox{\tabskip=0pt\openup3\jot
114 \halign{\tt\hskip 1cm\string##\tabskip=0pt\hfil&\quad##\hfil&\quad\hfil##\hfil\quad&\quad\hfil##\tabskip=5pt\cr
115 \omit\tt\string#1: & \tt\string#1 & \tt\expandafter\string\csname long\m@strip#1\endcsname &
116 \tt\expandafter\string\csname x\m@strip#1\endcsname\cr\noalign{\kern3pt\hrule\kern3pt}
117 \displaystyle & $\displaystyle #2$ & $\displaystyle #3$ & $\displaystyle #4$\cr
118 \textstyle & $\textstyle #2$ & $\textstyle #3$ & $\textstyle #4$\cr
119 \scriptstyle & $\scriptstyle #2$ & $\scriptstyle #3$ & $\scriptstyle #4$\cr
120 \scriptscriptstyle & $\scriptscriptstyle #2$ & $\scriptscriptstyle #3$ & $\scriptscriptstyle #4$\cr}
121 }\hss}\bigskip}
122
123 \def\showcaseaccent#1#2{{\openup3\jot\halign{\tt\hskip 1cm\string##\hfil&\quad\hfil##\cr
124 \omit\tt\string#1: & \cr\noalign{\kern3pt\hrule\kern3pt}
125 \displaystyle & $\displaystyle #2$\cr
126 \textstyle & $\textstyle #2$\cr
127 \scriptstyle & $\scriptstyle #2$\cr
128 \scriptscriptstyle & $\scriptscriptstyle #2$\cr}
129 }}
130
131 \parindent=0pt
132 \parskip=3pt
133 \hoffset=\dimexpr 2cm - 1in \relax
134 \advance\hsize by -2\hoffset
135 \voffset=2\hoffset
136 \advance\vsize by -2\voffset
137
138 \nopagenumbers
139 \title{\pdfMsym}
140 \unskip
141 {\setbox0=\hbox{\fakebold{\pdfMsym}}\centerline{\hbox to8\wd0{\hfil\it version \pdfMsymversion}}}
142 \centerline{\it S. Lurp}
143 \centerline{\tt [email protected]}
144 \centerline{\it\pdfMsymupdate}
145
146 \bigskip
147 \hbox to \hsize{\hfil\vbox{\hsize=.7\hsize
148 \hrule
149 \smallskip
150 \begincenter
151 The \pdfMsym{} package (the {\scten pdf} Math Symbols package) was created as an extension to the math macros provided by \TeX{} and \LaTeX{}.
152 It provides more obscure symbols not found in popular preexisting and reimpliments macros which were viewed as flawed.
153
154 A big part of the package was implemented through \macroname\pdfliteral s and other {\scten pdf} primitives.
155 So the \pdfMsym{} package is intended for use with {\scten pdf}\TeX, Lua\TeX, \xetex, and their \LaTeX{} counterparts.
156 Unfortunately, some macros are not supported by \xetex.
157 \endcenter
158 \smallskip
159 \hrule
160 }\hfil}
161
162 \vfill\eject
163
164 \footline={\hfil\folio\hfil}
165 \section{An Introduction to \scalebox[2]{\fakebold\pdfMsym}}
166
167 The main motivator for creating \pdfMsym{} was \TeX's poor implementation of the \macroname\overrightarrow{} macro which many
168 times yields unsavory results.
169 For example \icode \overrightarrow{\rm ABC}/eicode{} yields:
170
171 $$ \overrightarrow{\rm ABC} $$
172
173 As you can see, the arrow overlaps with the {\tt ABC} which is undesirable.
174 This can be fixed by altering the \macroname\rightarrow{} macro, but I decided to make a more versatile alternative:
175 the \pdfMsym{} alternative \macroname\vecc{}:
176
177 $$ \vecc{\hbox{ABC}} $$
178
179 Along with a few other features, \pdfMsym{} provides a simple interface for creating your own style of arrows.
180
181 \pdfMsym{} requires the current font size in order to properly scale its symbols, which must be provided after
182 {\tt\string\input}ing {\tt pdfmsym.tex}.
183 This can be done with the \macroname\pdfmsymsetscalefactor{} macro.
184 If your font is 12pt then you can load \pdfMsym{} like so:
185
186 \begincode
187 \input pdfmsym
188 \pdfmsymsetscalefactor{12}
189 /endcode\par
190
191 It is {\it imperative} that you set the scale factor after loading {\tt pdfmsym} as otherwise almost none of the macros will
192 work.
193
194 \section{The Predefined Symbols}
195
196 This section will simply be an exhaustive list of all the predefined symbols \pdfMsym{} provides.
197
198 \subsection{Math Symbols}
199
200 {\tabskip=10pt plus 5pt minus 5pt\openup3\jot\halign to \hsize{{\hsize=.45\hsize#}\hfil&\hfil{\hsize=.45\hsize#}\cr
201 \vbox{\showcase\dwedge{A\dwedge B}} & \vbox{\showcase\bigdwedge{A\dwedge\bigdwedge_{n=1}^N B_n}}\cr
202 \vbox{\showcase\circwedge{A\circwedge B}} & \vbox{\showcase\bigcircwedge{A\circwedge\bigcircwedge_{k=1}^n A_k}}\cr
203 \noalign{\vfill\eject}
204 \vbox{\showcase\dcup{A\dcup B}} & \vbox{\showcase\bigdcup{A\dcup\bigdcup_{n=1}^N B_n}}\cr
205 \vbox{\showcase\aint{f(x) + \aint_a^b g(x)\, dx}} & \vbox{\showcase\divs{n\divs m}}\cr
206 \vbox{\showcase\ndivs{n\ndivs m}} & \vbox{\showcase\bigforall{P: \bigforall_{x\in X}Q(x)}}\cr
207 \vbox{\showcase\bigexists{P: \bigexists_{x\in X}Q(x)}} & \cr}}
208
209 \bigskip
210 \pdfMsym{} also provides arbitrary length closed loop integrals via
211 \macrousage \oiNint{<N>} /emacrousage
212 which creates an $N$ dimensional closed loop integral.
213 Similarly \macroname\biNint{} creates a similar integral sign but rectangular instead of elliptical.
214 Finally there is also \macroname\iNint{} which simply creates multiple integrals (this may be desirable instead of manually doing so since it properly set limits both with \macroname\limits{} and
215 \macroname\nolimits).
216
217 \line{\hfil$\displaystyle\oiNint{5}_A^B\quad{\textstyle\oiNint{5}_A^B}\hfil\iNint{5}_{A}^{B}\quad{\textstyle\iNint{5}_A^B}\hfil\biNint{3}_{A}^{B}\quad{\textstyle\biNint{3}_A^B}$\hfil}
218
219 Additionally, \macroname\lightning{} is provided as a textmode command and renders \lightning.
220
221 \subsection{Vector Symbols}
222
223 Each vector comes as a pair: the normal form and the short form.
224 The normal form is meant to cover longer material while the short form covers shorter material.
225
226 \bigskip
227 \showcaseveccs\vecc\undervecc{\rm ABC}a
228 \showcasevecc\lvecc{\rm ABC}a
229 \showcasevecc\underlvecc{\rm ABC}a
230 \showcaseveccs\straightvecc\understraightvecc{\rm ABC}a
231 \vfill\eject
232 \showcaseveccs\straightlvecc\understraightlvecc{\rm ABC}a
233 \showcaseveccs\overrightharp\underrightharp{\rm ABC}a
234 \showcaseveccs\overleftharp\underleftharp{\rm ABC}a
235 \showcaseveccs\overleftrightvecc\underleftrightvecc{\rm ABC}a
236 \showcaseveccs\overleftrightharp\underleftrightharp{\rm ABC}a
237 \showcaseveccs\overrightleftharp\underrightleftharp{\rm ABC}a
238
239 \unless\ifx\pdfxform\undefined
240 The \macroname\constvec{} macro has the following usage:
241 \macrousage \constvec<vector macro>{<material>} /emacrousage
242 And it centers the {\tt vector macro} above {\tt material} as if it had the same height as {\tt x}, cropping anything above
243 that height.
244 So for example \icode \constvec\vecc{abc}/eicode{} yields $\constvec\vecc{abc}$.
245 This macro cannot be used in \xetex.
246 \fi
247 \subsection{Arrow Symbols}
248
249 Each arrow comes as a triplet: the normal form, the long form, and the extendable form.
250 The extendable form is similar to \macroname\xrightarrow{} and friends, an extendable arrow has the following use:
251 \macrousage \xarrow{<top material>}[<bottom material>] /emacrousage
252 And creates an extended arrow to fit both the top and bottom material.
253
254 \bigskip
255 \showcasearrow\varrightarrow{A\varrightarrow B}{A\longvarrightarrow B}{A\xvarrightarrow{ABC}[abc] B}
256 \showcasearrow\varleftarrow{A\varleftarrow B}{A\longvarleftarrow B}{A\xvarleftarrow{ABC}[abc] B}
257 \showcasearrow\varrightharp{A\varrightharp B}{A\longvarrightharp B}{A\xvarrightharp{ABC}[abc] B}
258 \showcasearrow\varleftharp{A\varleftharp B}{A\longvarleftharp B}{A\xvarleftharp{ABC}[abc] B}
259 \showcasearrow\varleftrightarrow{A\varleftrightarrow B}{A\longvarleftrightarrow B}{A\xvarleftrightarrow{ABC}[abc] B}
260 \showcasearrow\varleftrightharp{A\varleftrightharp B}{A\longvarleftrightharp B}{A\xvarleftrightharp{ABC}[abc] B}
261 \showcasearrow\varrightleftharp{A\varrightleftharp B}{A\longvarrightleftharp B}{A\xvarrightleftharp{ABC}[abc] B}
262 \showcasearrow\varmapsto{A\varmapsto B}{A\longvarmapsto B}{A\xvarmapsto{ABC}[abc] B}
263 \showcasearrow\varmapsfrom{A\varmapsfrom B}{A\longvarmapsfrom B}{A\xvarmapsfrom{ABC}[abc] B}
264 \showcasearrow\varuphookrightarrow{A\varuphookrightarrow B}{A\longvaruphookrightarrow B}{A\xvaruphookrightarrow{ABC}[abc] B}
265 \showcasearrow\varuphookleftarrow{A\varuphookleftarrow B}{A\longvaruphookleftarrow B}{A\xvaruphookleftarrow{ABC}[abc] B}
266 \showcasearrow\vardownhookrightarrow{A\vardownhookrightarrow B}{A\longvardownhookrightarrow B}{A\xvardownhookrightarrow{ABC}[abc] B}
267 \showcasearrow\vardownhookleftarrow{A\vardownhookleftarrow B}{A\longvardownhookleftarrow B}{A\xvardownhookleftarrow{ABC}[abc] B}
268 \showcasearrow\vardoublerightarrow{A\vardoublerightarrow B}{A\longvardoublerightarrow B}{A\xvardoublerightarrow{ABC}[abc] B}
269 \showcasearrow\vardoubleleftarrow{A\vardoubleleftarrow B}{A\longvardoubleleftarrow B}{A\xvardoubleleftarrow{ABC}[abc] B}
270 \showcasearrow\varcirclerightarrow{A\varcirclerightarrow B}{A\longvarcirclerightarrow B}{A\xvarcirclerightarrow{ABC}[abc] B}
271 \showcasearrow\varcircleleftarrow{A\varcircleleftarrow B}{A\longvarcircleleftarrow B}{A\xvarcircleleftarrow{ABC}[abc] B}
272
273 As well as single-stroke arrows, \pdfMsym{} provides double stroke arrows which are analogous to single stroke arrows and have
274 an identical usage.
275
276 \bigskip
277 \showcasearrow\varRightarrow{A\varRightarrow B}{A\longvarRightarrow B}{A\xvarRightarrow{ABC}[abc] B}
278 \showcasearrow\varLeftarrow{A\varLeftarrow B}{A\longvarLeftarrow B}{A\xvarLeftarrow{ABC}[abc] B}
279 \showcasearrow\varCirclerightarrow{A\varCirclerightarrow B}{A\longvarCirclerightarrow B}{A\xvarCirclerightarrow{ABC}[abc] B}
280 \showcasearrow\varCircleleftarrow{A\varCircleleftarrow B}{A\longvarCircleleftarrow B}{A\xvarCircleleftarrow{ABC}[abc] B}
281 \showcasearrow\varSquarerightarrow{A\varSquarerightarrow B}{A\longvarSquarerightarrow B}{A\xvarSquarerightarrow{ABC}[abc] B}
282 \showcasearrow\varSquareleftarrow{A\varSquareleftarrow B}{A\longvarSquareleftarrow B}{A\xvarSquareleftarrow{ABC}[abc] B}
283 \showcasearrow\varRibbonrightarrow{A\varRibbonrightarrow B}{A\longvarRibbonrightarrow B}{A\xvarRibbonrightarrow{ABC}[abc] B}
284 \showcasearrow\varRibbonleftarrow{A\varRibbonleftarrow B}{A\longvarRibbonleftarrow B}{A\xvarRibbonleftarrow{ABC}[abc] B}
285 \showcasearrow\squaredarrow{A\squaredarrow B}{A\longsquaredarrow B}{A\xsquaredarrow{ABC}[abc] B}
286 \showcasearrow\roundedarrow{A\roundedarrow B}{A\longroundedarrow B}{A\xroundedarrow{ABC}[abc] B}
287 \showcasearrow\varrightarrows{A\varrightarrows B}{A\longvarrightarrows B}{A\xvarrightarrows{ABC}[abc] B}
288 \showcasearrow\varleftarrows{A\varleftarrows B}{A\longvarleftarrows B}{A\xvarleftarrows{ABC}[abc] B}
289 \showcasearrow\varrightleftarrows{A\varrightleftarrows B}{A\longvarrightleftarrows B}{A\xvarrightleftarrows{ABC}[abc] B}
290 \showcasearrow\varleftrightarrows{A\varleftrightarrows B}{A\longvarleftrightarrows B}{A\xvarleftrightarrows{ABC}[abc] B}
291
292 \pdfMsym{} doesn't stop at two, but it also provides triple stroke arrows which have the same usage as the other two types
293 of arrows:
294
295 \bigskip
296 \showcasearrow\varRrightarrow{A\varRrightarrow B}{A\longvarRrightarrow B}{A\xvarRrightarrow{ABC}[abc] B}
297 \showcasearrow\varLleftarrow{A\varLleftarrow B}{A\longvarLleftarrow B}{A\xvarLleftarrow{ABC}[abc] B}
298 \showcasearrow\varLleftRrightarrow{A\varLleftRrightarrow B}{A\longvarLleftRrightarrow B}{A\xvarLleftRrightarrow{ABC}[abc] B}
299
300 \vfill\eject
301 \subsection{Wide Accents}
302 Wide accents provide variants to the commonly used accents like \macroname\widehat{} and \macroname\widetilde.
303 Unlike these accents, \pdfMsym's wide accents can grow arbitrarily large.
304
305 \bigskip
306 {\tabskip=20pt plus 10pt minus 5pt\halign{{\hsize=.45\hsize#}\hfil&\hfil{\hsize=.45\hsize#}\cr
307 \vbox{\showcaseaccent\varwidehat{\varwidehat{ABC}+D}} & \vbox{\showcaseaccent\varwidecheck{\varwidecheck{ABC}+D}}\cr}}
308 \bigskip
309 \hbox to\hsize{\hfil\vbox{\tabskip=20pt plus 10pt minus 5pt\showcaseaccent\varwidetilde{\varwidetilde{ABC}+D}}\hfil}
310
311 \unless\ifx\pdfxform\undefined
312 \subsection{Extendable Operators}
313 Extendible operators extend to the width of the material in their limits.
314 These operators should only be used in display mode, since they use the display modes of the operators.
315 They are \macroname\suum{} and \macroname\prood{}:
316
317 $$ \suum_{\hbox{abcdef}}^{\hbox{ABCDEF}} \qquad \prood_{\hbox{abcdef}}^{\hbox{ABCDEF}} $$
318
319 These are not available in \xetex.
320 \fi
321
322 \vfill\penalty-10000
323 \section{Defining Your Own Symbols}
324
325 The following section outlines the interface which \pdfMsym{} utilizes to create its symbols.
326 Some of the macros require knowledge of {\scten pdf}'s native graphics operators, which is not explained here.
327 For resources on that, consult Adobe's {\scten pdf} Reference, chapter $4$ (Graphics).
328
329 \subsection{The Macros}
330
331 \macroexp{\@linehead@type{<pdf code>}{<width>}} This creates a ``linehead'' which is used to cap lines, like
332 \macroname\@rarrow{} ($\@rarrow{.4}{2.5}$).
333 {\it pdf code} is the actual code used to draw the symbol, and it should be noted that all necessary transformations to the
334 linehead are done by \macroname\@linehead@type{} and should not be included in the code.
335 This includes the setting of the width and transforming the coordinate system.
336 The {\it width} is the width of the drawing of the {\it pdf code}.
337
338 This macro actually accepts more parameters, but they're used internally and therefore aren't necessary to explain.
339 Therefore the only use this macro should be for is defining line heads.
340 For example, the definition of \macroname\@rarrow{} is:
341 \begincode
342 \def\@rarrow {\@linehead@type{0 0 m 2 0 l 1 0 0 1 0 1.5 c 2 0 m 1 0 0 -1 0 -1.5 c S}{2}}
343 /endcode
344
345 The following is a table of all the predefined lineheads (scaled for visibility):
346
347 \def\fsclh#1{\macroname#1&#1{.4}{1.5}}
348 \def\sclh#1{&\macroname#1&#1{.4}{1.5}}
349 \quitvmode\hbox to\dimexpr\hsize-\leftskip\relax{\hfil\vbox{\pdfmsymsetscalefactor{20}\everycr{\noalign{\hrule}}
350 \halign{\vrule\kern.1cm\strut#\hfil\tabskip=.25cm&\hfil#\hfil\kern.1cm\vrule\tabskip=0pt&&\kern.1cm#\hfil\tabskip=.25cm&\hfil#\hfil\kern.1cm\vrule\tabskip=0pt\cr
351 \fsclh\@rarrow \sclh\@larrow \sclh\@rharp \sclh\@lharp\cr
352 \fsclh\@rdharp \sclh\@ldharp \sclh\@linecap \sclh\@mapcap\cr
353 \fsclh\@mapsfromcap \sclh\@rsarrow \sclh\@lsarrow \sclh\@backuphook\cr
354 \fsclh\@frontuphook \sclh\@backdownhook \sclh\@frontdownhook \sclh\@doublerarrow\cr
355 \fsclh\@doublelarrow \sclh\@Rarrow \sclh\@Larrow \sclh\@Linecap\cr
356 \fsclh\@Rightcirclecap \sclh\@Leftcirclecap \sclh\@Rightsquarecap \sclh\@Leftsquarecap\cr
357 \omit\vrule height10pt depth4pt\kern.1cm\fsclh\@Rightribboncap \sclh\@Leftribboncap \sclh\@BigLinecap \sclh\@Rightarrows\cr
358 \omit\vrule height10pt depth4pt\kern.1cm\fsclh\@Leftarrows \sclh\@Rightunderarrow \sclh\@Leftunderarrow \sclh\@Rightoverarrow\cr
359 \omit\vrule height10pt depth4pt\kern.1cm\fsclh\@Leftoverarrow \sclh\@TripleLinecap \sclh\@TripleRarrow \sclh\@TripleLarrow \cr
360 }}\hfil}
361 \emacroexp
362
363 \macroexp{\@vecc@def{<vector name>}<left cap><right cap>} This creates a vector macro, like \macroname\vecc.
364 This creates both the normal and short variations of the vector.
365 For example, the definition of the {\tt vecc} vectors is:
366 \begincode
367 \@vecc@def{vecc}\@linecap\@rarrow
368 /endcode
369 \emacroexp
370
371 \macroexp{\@undervecc@def{<vector name>}<left cap><right cap>} This creates an under-vector macro, like \macroname\undervecc.
372 This creates both the normal and short variations of the vector.
373 For example, the definition of the {\tt undervecc} vectors is:
374 \begincode
375 \@undervecc@def{undervecc}\@linecap\@rarrow
376 /endcode
377 \emacroexp
378
379 \macroexp{\@arrow@def{<arrow name>}<left cap><right cap>} This creates an arrow macro, like \macroname\varrightarrow.
380 This creates the normal, long, and extendable versions of the arrow.
381 For example, the definition of the {\it varrightarrow} vectors is:
382 \begincode
383 \@arrow@def{varrightarrow}\@linecap\@rarrow
384 /endcode
385 \emacroexp
386
387 \macroexp{\@Arrow@def{<arrow name>}<left cap><right cap>{<height displacement>}} This creates a double-stroked arrow, like
388 \macroname\varRightarrow.
389 This macro creates the normal, long, and extendable versions of the arrow.
390 {\it height displacement} is half the difference in height between the two strokes (the difference of height between one stroke
391 and the center).
392 For the default double stroke linecaps \pdfMsym{} defines, this should be $1$.
393 For example, the definition of \macroname\varRightarrow{} is:
394 \begincode
395 \@Arrow@def{varRightarrow}\@Linecap\@Rarrow{1}
396 /endcode
397 \emacroexp
398
399 \macroexp{\@multi@Arrow@def{<arrow name>}{<number strokes>}<left cap><right cap>{<height displacement>}} This creates an arrow
400 with any number of strokes according to {\tt number strokes}.
401 Doing \macroname\@multi@Arrow@def{} with $1$ or $2$ strokes is equivalent to \macroname\@arrow@def{} or \macroname\@Arrow@def{},
402 respectively.
403 Similar to above, {\it height displacement} is half the difference between two adjacent strokes.
404 For example, the definition of \macroname\varRrightarrow{} is:
405 \begincode
406 \@multi@Arrow@def{varRrightarrow}{3}\@TripleLinecap\@TripleRarrow{1}
407 /endcode
408 \emacroexp
409
410 \macroexp{\@arrow@type<left cap><right cap>{<length>}} This draws a single-stroke arrow whose caps are {\it left cap} and
411 {\it right cap} respectively and whose length is {\tt length}.
412 This is used by \macroname\@arrow@def{}, for example \macroname\varrightarrow{} is defined to be
413 \begincode
414 \@arrow@type\@linecap\@rarrow{\arrow@len}
415 /endcode
416 \emacroexp
417
418 \macroexp{\@Arrow@type<left cap><right cap>{<length>}{<height displacement>}} This draws a double-stroke arrow, the parameters
419 have the same usage as in \macroname\@Arrow@def.
420 This is used by \macroname\@Arrow@def, for example \macroname\varRightarrow{} is defined to be:
421 \begincode
422 \@Arrow@type\@Linecap\@Rarrow{\Arrow@len}{1}
423 /endcode
424 \emacroexp
425
426 \macroexp{\@multi@Arrow@type{<number strokes>}<left cap><right cap>{<length>}{<height displacement>}} This draws an \penalty-10 arrow with a
427 specified number of strokes.
428 The usage of the parameters is identical to theirs in\hfill\penalty-1000 \macroname\@multi@Arrow@def.
429 This is used by \macroname\@multi@Arrow@def, for example \macroname\varRrightarrow{} is defined to be:
430 \message{MEANING: \meaning\varRrightarrow}
431 \begincode
432 \@multi@Arrow@type{3}\@TripleLinecap\@TripleRarrow{\Arrow@len}{1.5}
433 /endcode
434 \emacroexp
435
436 \macroexp{\@wide@accent{<pdf code>}} This creates a wide accent, like \macroname\varwidecheck.
437 The width of the drawing by the {\it pdf code} should be $1$, and it should be filled not stroked (since the accent is
438 transformed to stretch over the material beneath it).
439 Again this macro should only be used to define wide accents.
440 For example, the definition of \macroname\varwidecheck{} is:
441 \begincode
442 \def\varwidecheck{\@wide@accent{0 1.3 m .5 -.4 l 1 1.3 l 1 1.6 l .5 .3 l 0 1.6 l f}}
443 /endcode
444 \emacroexp
445
446 \macroexp{\pdf@drawing@macro{<name>}{<pdf code>}{<width>}{<height>}{<depth>}{<horizontal skew>}} This creates a text mode
447 symbol like \macroname\lightning.
448 It is important that the {\it pdf code} fits inside the box created by {\it width, height,\/} and {\it depth} since the
449 drawing is placed inside of an XForm and so anything outside the box will be cropped.
450 The {\it horizontal skew} can be used to shift the symbol so that it fits horizontally inside the box.
451 For example, the definition of \macroname\lightning{} is:
452 \begincode
453 \pdf@drawing@macro{lightning} % The lightning symbol is drawn upright
454 {.86603 -.5 .5 .86603 0 0 cm % and rotated 30 degrees
455 1 J 1 j .6 w
456 -3 10 m -3 4.133975 l 0 5.866025 l 0 0 l -1.125 1.5 l 0 0 l 1.125 1.5 l S}
457 {4.2pt}{10.5pt}{.5pt}{.9pt}
458 /endcode
459 \emacroexp
460
461 \macroexp{\pdf@drawing@math@macro{<name>}{<pdf code>}{<width>}{<height>}{<depth>}{<skew>}<style scaling>} This creates a math
462 mode symbol like \macroname\divs.
463 The first few parameters are identical in use as \macroname\pdf@drawing@macro's, and {\it style scaling} is used to set the
464 scaling for the symbol in different math styles.
465 {\it style scaling} should be three groups: the first group is the scaling used in textstyle, the second in scriptstyle, and
466 the third in scriptscriptstyle.
467 Each of these scalings should consist of two components: the fractional scaling and the decimal scaling.
468 So for example if we'd like to scale it by $0.6$ the scaling would be \icode {{6 /fslash 10}{0.6}}/eicode.
469 This is necessary since \macroname\dimexpr{} doesn't play with decimals nicely, but \macroname\pdfliteral{} requires them.
470 For example, the definition of \macroname\divs{} is:
471 \begincode
472 \pdf@drawing@math@macro{@divs}
473 {1.3 w 1 j
474 2.5 1 0 .1 re
475 2.5 5 0 .1 re
476 2.5 9 0 .1 re B}
477 {5.4pt}{10pt}{0pt}{.2pt}
478 {{1}{1}}{{7 /fslash 10}{.7}}{{11 /fslash 20}{.55}}
479 \def\divs{\mathrel{\@divs}} % Make divs a relation
480 /endcode
481 \emacroexp
482
483 \macroexp{\putsym{<main symbol>}{<secondary symbol>}} This centers the {\it secondary symbol} over the {\it main symbol}, and
484 can be used to create symbols like \macroname\aint.
485 Note that doing this creates a symbol which acts like an Ord on the left side and whatever type of atom {\it main symbol} is
486 on the right (glue-wise).
487 So it may be necessary to add some math atom ``hackery'' around the \macroname\putsym{} in order to get the target glue.
488 For example, the definition of \macroname\aint{} is:
489 \begincode
490 \def\aint{\mathop{}\mathclose{}\putsym\int-}
491 /endcode
492 The \icode \mathop{}\mathclose{}/eicode{} makes it act like an Op on the left (the \macroname\mathclose{} removes any glue
493 added on the right of the \macroname\mathop).
494 Usually the definition is simpler, but this is slightly more complicated since \macroname\int{} has specially placed limits.
495 Another example, this time the definition of \macroname\bigdcup{} is:
496 \begincode
497 \def\bigdcup{\mathop{\putsym\bigcup\cdot}}
498 /endcode
499 \emacroexp
500
501 \macroexp{\@skewedlim@op{<operator>}{<sup1>}{<sub1>}{<sup2>}{<sub2>}{<sup3>}{<sub3>}{<default limit>}}
502 This creates a large math operator with skewed limits, like \macroname\int.
503 {\it operator} should be a math operator, {\it sup1} and {\it sub1} are the skews of the superscript and subscript of the
504 operator, respectively under \macroname\nolimits.
505 Similarly {\it sup2} and {\it sub2} are the skews for \macroname\limits, and {\it sup3} and {\it sub3} are the
506 skews for the default limit (if this is not followed by \macroname\limits{} or \macroname\nolimits) which is given by
507 {\it default limit}.
508
509 For example, \macroname\@oiNint{} is defined to be a macro which creates the shape of \macroname\oiNint{} (see below), and
510 \macroname\oiNint{} is defined as
511 \begincode
512 \def\oiNint#1{\@skewedlim@op{\mathop{\@oiNint{#1}}}{-4}{6}{-10}{10}{-4}{6}\nolimits}
513 /endcode
514 \emacroexp
515
516 \macroexp{\putexsym{<symbol>}<left cap><right cap>{<height displacement>}{<skew>}} This draws a double stroked drawing on top of
517 {\it symbol} whose caps are {\it left cap} and {\it right cap} with a height displacement (the half the space between strokes) of
518 {\it height displacement}.
519 {\it skew} alters the space between the end of {\it symbol} and where the double stroked drawing is drawn.
520 For example, \macroname\@oiNint, which gives the shape of \macroname\oiNint, is defined as
521 \begincode
522 \def\@oiNint#1{\putexsym{\iNint{#1}}\@BigLeftcirclecap\@BigRightcirclecap{2.5}{4}}
523 /endcode
524 \macroname\iNint{} is a macro
525 \macrousage \iNint{<N>} /emacrousage
526 which prints {\it N} integrals with a kern \macroname\iNint@kern@{} between each one.
527 \emacroexp
528
529 \unless\ifx\pdfxform\undefined
530 \macroexp{\@wide@operator{<name>}<operator>{<first cut>}{<second cut>}} This creates an extendable operator of {\it operator}
531 whose name is {\it name}, like \macroname\suum.
532 {\it first cut} is a decimal value which is where on the width of {\it operator} to make the first slice, and similar for
533 {\it second cut}.
534 The extendable part of the new operator is the area between the two cuts.
535 For example, the definition of \macroname\suum{} is:
536 \begincode
537 \@wide@operator{suum}\sum{.52}{.6}
538 /endcode
539 You can see where the slices are for a wide operator using the \macroname\@show@slices{} macro, for example
540 \begincode
541 \@show@slices{suum}
542 /endcode
543 gives:
544 $$ \@show@slices{suum} $$
545 These macros are not available for \xetex.
546 \emacroexp
547 \fi
548
549 \subsection{The Dimensions}
550 For fine-tuning of symbols, it may be useful to familiarize oneself with the various dimensions \pdfMsym{} utilizes for various
551 purposes throught its symbol definitions.
552 Dimensions are all defined as macros, and are all dimensionless.
553 If a dimension is defined as $1$ then it corresponds to $1$ in $10$pt font.
554
555 {\everycr{\noalign{\kern10pt}}\halign{\tt\vtop{\hsize=.175\hsize#}\hfil\tabskip=.05\hsize&\hfil\vtop{\hsize=.75\hsize#}\tabskip=0pt\cr
556 \string\@font@scale & The amount of scaling relative to $10$pt, this is defined via \macroname\pdfmsymsetscalefactor.\cr
557 \string\vecc@w & The height of the arrows, similarly there is \macroname\vecc@hw{} which must be equal to half of \macroname\vecc@w.\cr
558 \string\vecc@skew & \pdfMsym{} leaves a space of \macroname\vecc@skew{} between the ends of material and the endpoints of
559 the vector on top or below the material.\cr
560 \string\vecc@X@s\par\string\vecc@X@sf & \macroname\vecc@X@s{} is the ratio of the scaling factor (as a decimal) of the
561 {\tt X} math style ({\tt X} can be {\tt displaystyle}, {\tt textstyle}, etc.).
562 Similarly \macroname\vecc@X@sf{} should be numerically equivalent to \macroname\vecc@X@s{} but written as a fraction.
563 \pdfMsym{} scales (many, but not all, see \macroname\exsym@X@s{} and \macroname\exsym@X@sf) math macros according to these values.\cr
564 \string\vecc@skip & The amount of space between material and the vector symbol above or below it.\cr
565 \string\arrow@skip & The math kerning to be used around an arrow.
566 \macroname\arrow@skip{} must be defined as glue, eg \icode \mkern1mu/eicode.\cr
567 \string\arrow@len & The length of an arrow defined by \macroname\@arrow@def.
568 \macroname\arrow@len{} is a unit, for example \pdfMsym{} defines it as {\tt 6}.
569 This length does not include the lengths of the arrow caps.\cr
570 \string\long@arrow@len & The length of a long arrow defined by \macroname\@arrow@def.\cr
571 \string\Arrow@len & The length of a double stroked arrow defined by \macroname\@Arrow@def.\cr
572 \string\long@Arrow@len & The length of a long double stroked arrow defined by \macroname\@Arrow@def.\cr
573 \string\xarrow@buffer & The amount of extra arrow to add between the caps of an extendable arrow and when the above/below material begins.\cr
574 \string\accent@skew & Analogous to \macroname\vecc@skew{} but for extendable accents.\cr
575 \string\accent@raise & Analogous to \macroname\vecc@skip{} but for extendable accents.\cr
576 \string\exsym@X@s\par\string\exsym@X@sf & Analogous to \macroname\vecc@X@s{} and \macroname\vecc@X@sf{} but used by \macroname\putexsym.\cr
577 \string\iNint@kern@ & The amount of kerning to put between integral signs in \macroname\iNint.
578 This must be given as glue, eg. \icode \mkern-10mu\mathchoice{\mkern-5mu}{}{}{}/eicode.\cr
579 }}
580
581 \end