Debian Codegraph @

texmf-dist/source/latex/pict2e/pict2e.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2003-2020
4 % Rolf Niepraschk, [email protected]
5 % Hubert Gaesslein, [email protected]
6 % Josef Tkadlec, [email protected]
7 %
8 %
9 % This work may be distributed and/or modified under the
10 % conditions of the LaTeX Project Public License, either version 1.3
11 % of this license or (at your option) any later version.
12 % The latest version of this license is in
13 % http://www.latex-project.org/lppl.txt
14 % and version 1.3 or later is part of all distributions of LaTeX
15 % version 2003/12/01 or later.
16 %
17 % This work has the LPPL maintenance status "author-maintained".
18 %
19 % This work consists of all files listed in manifest.txt.
20 %
21 %
22 %<*package>
23 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
24 \ProvidesPackage{pict2e}[2020/09/30 v0.4b Improved picture commands (HjG,RN,JT)]
25 %</package>
26 %
27 %<*driver>
28 \listfiles
29 \setcounter{errorcontextlines}{5}
30 \documentclass{ltxdoc}
31 \usepackage{pict2e} % [pstarrows]
32 %%\usepackage[debug]{pict2e}
33 \IfFileExists{ebezier.sty}{\usepackage{ebezier}}{%
34 } % \providecommand*\cbezier{}
35 \usepackage{color}
36 \usepackage{graphicx}
37 \usepackage{array}
38 \usepackage[T1]{fontenc}
39 \usepackage{lmodern}
40 \usepackage{longtable}
41 \IfFileExists{geometry.sty}{%
42 \usepackage[left=\marginparwidth,textwidth=1.15\textwidth,%
43 top=20mm,bottom=30mm]{geometry}}{}
44 \IfFileExists{url.sty}{\usepackage{url}}
45 {\newcommand*\url[1]{\texttt{#1}}}
46 \usepackage{hypdoc}
47
48 %\OnlyDescription
49 \AlsoImplementation
50 \EnableCrossrefs
51 \CodelineIndex
52 \RecordChanges
53 \begin{document}
54 %%\tracingmacros\maxdimen
55 %%\tracingall \tracingonline0
56 %%\loggingall
57 \setlength\emergencystretch{3em}
58 \DocInput{pict2e.dtx}
59 \end{document}
60 %</driver>
61 % \fi
62 %
63 % \GetFileInfo{pict2e.sty}
64 % \def\docdate{2020/09/30}
65 %
66 % \CheckSum{2350}
67 %
68 % ^^A ========
69 %
70 % \CharacterTable
71 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
72 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
73 % Digits \0\1\2\3\4\5\6\7\8\9
74 % Exclamation \! Double quote \" Hash (number) \#
75 % Dollar \$ Percent \% Ampersand \&
76 % Acute accent \' Left paren \( Right paren \)
77 % Asterisk \* Plus \+ Comma \,
78 % Minus \- Point \. Solidus \/
79 % Colon \: Semicolon \; Less than \<
80 % Equals \= Greater than \> Question mark \?
81 % Commercial at \@ Left bracket \[ Backslash \\
82 % Right bracket \] Circumflex \^ Underscore \_
83 % Grave accent \` Left brace \{ Vertical bar \|
84 % Right brace \} Tilde \~}
85 %
86 %
87 % ^^A ========
88 %
89 % \makeatletter
90 % \@ifundefined{ifdeveloping}{\newif\ifdeveloping}{} ^^A false by default
91 % \makeatother
92 %
93 % ^^A ========
94 %
95 % \ifdeveloping ^^A Should be further refined
96 %
97 % \changes{v0.1a}{2003/07/18}{First version. New code for \cmd{\@sline}. (RN)}
98 % \changes{v0.1b}{2003/07/20}{New code for \cmd{\@circle} and \cmd{\@dot}
99 % added. (RN)}
100 % \changes{v0.1c}{2003/07/21}{More flexibility with sampling the graphic
101 % operators in token register (\cmd{\pIIe@GRAPH}). (RN)}
102 % \changes{v0.1c}{2003/07/21}{Code for \cmd{\@bezier} added. (RN)}
103 % \changes{v0.1d}{2003/07/22}{New code for \cmd{\cbezier}
104 % (package `ebezier'). (RN)}
105 % \changes{v0.1e}{2003/07/24}{New option ``debug''}
106 % \changes{v0.1f}{2003/08/17}{Changed mode numbers. (RN)}
107 % \changes{v0.1f}{2003/08/17}{\cmd{\pIIe@add@rcurveto} added. (RN)}
108 % \changes{v0.1f}{2003/08/17}{\cmd{\pIIe@add@XY} added. (RN)}
109 % \changes{v0.1g}{2003/08/23}{Changed code for \cmd{\pIIe@add@qcircle}.
110 % (HjG,RN)}
111 % \changes{v0.1g}{2003/08/23}{New code for \cmd{\@oval}. (HjG,RN)}
112 % \changes{v0.1i}{2003/08/28}{Translation, scaling, rotation added. (HjG,RN)}
113 % \changes{v0.1j}{2003/08/29}{Loads now `color.cfg' instead of `graphics.cfg'
114 % for system default driver (no more trouble with commands like
115 % \cmd{\DeclareGraphicsRule}) (RN)}
116 % \changes{v0.1j}{2003/08/29}{Driver specific code now in new files
117 % ``p2e-DRIVER.def''. (RN)}
118 % \changes{v0.1k}{2003/08/30}{\cmd{\pIIe@PTtoBP} removed. Scaling with
119 % PS/PDF code instead. (RN)}
120 % \changes{v0.1l}{2003/09/24}{First implementation of \cmd{\vector}. (RN,HjG)}
121 % \changes{v0.1m}{2003/09/26}{\cmd{\vector} complete (arctan version). (RN,HjG)}
122 % \changes{v0.1n}{2003/10/01}{Loads now the own configuration file `pict2e.cfg'
123 % instead of `color.cfg' (RN,HjG)}
124 % \changes{v0.1n}{2003/10/01}{New Option `hide' suppresses the ps or pdf output (RN)}
125 % \changes{v0.1o}{2003/10/17}{New implementation of opt. arg. to \cmd{\oval} (HjG,RN)}
126 % \changes{v0.1p}{2003/10/29}{Improve \cmd{\@sline} (HjG,RN)}
127 % \changes{v0.1p}{2003/10/29}{Some cleaning (HjG,RN)}
128 % \changes{v0.1p}{2003/10/29}{Rudimentary Documentation, translated to English (HjG,RN)}
129 % \changes{v0.1q}{2003/11/02}{Small fixes in documentation (HjG)}
130 % \changes{v0.1r}{2003/11/12}{Cleaning and revamping (RN,HjG)}
131 % \changes{v0.1r}{2003/11/12}{Rename commands: operators get `@op' suffix,
132 % drawing commands loose `@add' (RN,HjG)}
133 % \changes{v0.1s}{2003/11/13}{Avoid use of dimen registers
134 % \cmd{\@tempdima} and \cmd{\@tempdimb} in all but low level auxillary
135 % macros -- avoid potential pitfall (RN,HjG)}
136 % \changes{v0.1t}{2003/11/13}{Some code and documentation cleaning (RN)}
137 % \changes{v0.1u}{2003/11/18}{M-x delete-trailing-whitespace (HjG)}
138 % \changes{v0.1u}{2003/11/19}{Some cleaning and revamping (HjG)}
139 % \changes{v0.1u}{2003/11/20}{Finally, bring code snippets in a more
140 % meaningful order (HjG)}
141 % \changes{v0.1u}{2003/11/21}{Save many tokens by introducing ancillary macros (HjG)}
142 % \changes{v0.1v}{2003/11/21}{More cleaning and revamping (HjG)}
143 % \changes{v0.1v}{2003/11/22}{Return of ``cleaning and revamping'' (HjG)}
144 % \changes{v0.1w}{2003/11/25}{Son of ``cleaning and revamping'' (HjG)}
145 % \changes{v0.1w}{2003/11/25}{More documentation about usage (HjG)}
146 % \changes{v0.1w}{2003/11/27}{Small fixes (RN,HjG)}
147 % \changes{v0.1x}{2003/11/27}{Improve PSTricks-like arrows. (RN,HjG)}
148 % \changes{v0.1y}{2003/11/27}{Implement LaTeX-like arrows. (RN,HjG)}
149 % \changes{v0.1z}{2003/12/04}{Change \cmd{\cbezier}. (RN,HjG)}
150 % \changes{v0.2a}{2003/12/04}{Return of the son of ``cleaning and revamping'' (HjG)}
151 % \changes{v0.2a}{2003/12/05}{M-x delete-trailing-whitespace (HjG)}
152 % \changes{v0.2}{2003/12/11}{Minor changes. (RN,HjG)}
153 % \changes{v0.2b}{2003/12/13}{Merge v0.2a and v0.2 (HjG)}
154 % \changes{v0.2c}{2003/12/13}{Grandson of ``cleaning and revamping'' (HjG)}
155 % \changes{v0.2c}{2003/12/13}{Try new driver for \textsf{xdvi}---to no avail (HjG)}
156 % \changes{v0.2*}{2003/12/17}{Improve LaTeX-like arrows. (RN,HjG)}
157 % \changes{v0.2d}{2003/12/18}{Merge v0.2c and v0.2*. (HjG)}
158 % \changes{v0.2e}{2003/12/18}{Merge new figures created by RN. (HjG)}
159 % \changes{v0.2e}{2003/12/19}{Return of the grandson of ``cleaning and revamping'' (HjG)}
160 % \changes{v0.2f}{2003/12/19}{Cousin of ``cleaning and revamping'' (HjG)}
161 % \changes{v0.2f}{2003/12/20}{Return of the cousin of ``cleaning and revamping'' (HjG)}
162 % \changes{v0.2g}{2003/12/21}{Nephew of ``cleaning and revamping'' (HjG)}
163 % \changes{v0.2h}{2004/01/07}{Documentation and small code improvements (RN,HjG)}
164 % \changes{v0.2i}{2004/01/29}{Slope arguments for \cmd{\vector} restricted
165 % to values $\vert s \vert \le 1000$ (RN,HjG)}
166 % \changes{v0.2i*}{2004/02/11}{Final touches for release (RN)}
167 % \changes{v0.2j}{2004/02/19}{Final touches for release (HjG)}
168 % \changes{v0.2k}{2004/03/24}{Return of the nephew of ``cleaning and revamping'' (HjG)}
169 % \changes{v0.2k}{2004/03/26}{Better control for history entries
170 % while debugging (HjG)}
171 % \changes{v0.2l}{2004/04/08}{Added redefinition of \cmd{\line} (RN,HjG)}
172 % \changes{v0.2m}{2004/04/10}{Minor touches (HjG)}
173 % \changes{v0.2n}{2004/04/22}{Added lppl (RN,HjG)}
174 % \changes{v0.2o}{2004/06/25}{Fix two bugs (HjG)}
175 % \changes{v0.2o}{2004/06/25}{Numerous small fixes in documentation (HjG)}
176 % \changes{v0.2p}{2004/07/06}{Small fixes in documentation (HjG)}
177 % \changes{v0.2s}{2006/03/05}{Wrong PSTricks-like arrows corrected (RN)}
178 % \changes{v0.2t}{2008/05/11}{All lines by \cmd{\@sline},
179 % added \cmd{\arc}, \cmd{\Line}, \cmd{\polyline}, \cmd{\polygon},
180 % types of lines and their connections, path commands (JT)}
181 % \changes{v0.2u}{2008/06/29}{Also real slopes for lines and vectors. (JT)}
182 % \changes{v0.2v}{2008/07/19}{Improved internal division macro. (JT)}
183 % \changes{v0.2w}{2008/07/22}{Number of points in \cmd{\qbezier} not ignored. (JT)}
184 % \changes{v0.2x}{2009/08/05}{Support for xetex. (JT)}
185 % \changes{v0.2y}{2011/04/05}{Support for dvipdfmx. (JT)}
186 % \changes{v0.2z}{2014/01/12}{Conflict wit epic, eepic solved. (JT)}
187 % \changes{v0.3a}{2016/01/09}{Local line types, documentation fixes. (JT)}
188 % \changes{v0.3d}{2020/06/13}{\cmd{\@sline} renamed \cmd{\pIIe@sline} (RN)}
189 % \changes{v0.3e}{2020/06/20}{Added \cmd{\Vector}, \cmd{\polyvector}
190 % suggested by FMi (RN)}
191 % \changes{v0.4a}{2020/08/16}{Default lengths to match extended \LaTeX\ version}
192 % \fi
193 %
194 % \changes{v0.1a}{2003/07/18}{First version. (RN)}
195 % \changes{v0.2j}{2004/02/27}{First release to CTAN
196 % (2004/02/19 v0.2j). (LaTeX Team)}
197 % \changes{v0.2n}{2004/05/27}{Second release to CTAN
198 % (2004/04/22 v0.2n). (RN/HjG)}
199 % \changes{v0.2o}{2004/06/25}{Third release to CTAN
200 % (2004/06/25 v0.2o). (RN/HjG)}
201 % \changes{v0.2p}{2004/07/28}{Fourth release to CTAN
202 % (2004/07/28 v0.2p). (RN)}
203 % \changes{v0.2q}{2004/08/06}{Fourth release to CTAN
204 % (2004/08/06 v0.2q). (RN/HjG)}
205 % \changes{v0.2u}{2008/06/29}{Fifth release to CTAN
206 % (2008/06/29 v0.2u). (JT)}
207 % \changes{v0.2v}{2008/07/19}{Sixth release to CTAN
208 % (2008/07/19 v0.2v). (JT)}
209 % \changes{v0.2w}{2008/07/22}{Seventh release to CTAN
210 % (2008/07/19 v0.2w). (JT)}
211 % \changes{v0.2x}{2009/08/08}{Eigth release to CTAN
212 % (2009/08/08 v0.2x). (JT)}
213 % \changes{v0.2y}{2011/04/05}{Nineth release to CTAN
214 % (2011/04/05 v0.2y). (JT)}
215 % \changes{v0.2z}{2014/01/12}{10th release to CTAN
216 % (2011/04/05 v0.2z). (JT)}
217 % \changes{v0.3a}{2016/01/09}{11th release to CTAN
218 % (2016/01/09 v0.3a). (JT)}
219 % \changes{v0.3b}{2016/02/05}{12th release to CTAN
220 % (2016/02/05 v0.3b). (RN)}
221 %
222 % \DoNotIndex{\newcommand,\renewcommand,\newenvironment,\renewenvironment}
223 % \DoNotIndex{\providecommand,\def,\edef,\let,\gdef,\xdef,\global,\newtoks}
224 % \DoNotIndex{\RequirePackage,\DeclareOption,\ProcessOptions,\ExecuteOptions}
225 % \DoNotIndex{\input,\InputIfFileExists}
226 % \DoNotIndex{\@ifdefinable,\@ifundefined,\@percentchar}
227 % \DoNotIndex{\AtBeginDocument,\AtEndOfPackage}
228 % \DoNotIndex{\PackageError,\PackageWarning,\PackageWarningNoLine,\PackageInfo}
229 % \DoNotIndex{\MessageBreak,\typeout}
230 %
231 % \DoNotIndex{\z@,\z@skip,\p@,\@ne,\tw@,\thr@@,\@iv,\two@fourteen,\strip@pt}
232 % \DoNotIndex{\the,\if,\else,\or,\fi,\ifnum,\ifdim,\ifcase,\ifodd}
233 % \DoNotIndex{\advance,\multiply,\divide}
234 % \DoNotIndex{\@tfor,\do}
235 % \DoNotIndex{\csname,\endcsname,\begingroup,\endgroup}
236 % \DoNotIndex{\expandafter,\afterassignment,\noexpand}
237 %
238 % \changes{v0.1w}{2003/11/25}{Index use of temporary registers
239 % while debugging (HjG)}
240 % \changes{v0.2k}{2004/03/26}{Better control for indexing temporary
241 % registers while debugging (HjG)}
242 %^^A \ifdim0pt<\overfullrule\else
243 % \ifdeveloping\else
244 % \DoNotIndex{\@tempdima,\@tempdimb,\@tempdimc,\@tempcnta,\@tempcntb}
245 % \DoNotIndex{\@halfwidth,\@wholewidth,\unitlength}
246 % \DoNotIndex{\@clnwd,\@clnht,\@ovdx,\@ovdy,\@ovro,\@ovri,\@ovxx,\@ovyy}
247 % \DoNotIndex{\@xarg,\@xdim,\@yarg,\@ydim,\@linelen,\@dashdim,\dimen@}
248 % \fi
249 %
250 % \DoNotIndex{\reserved@a,\relax,\protect,\space}
251 % \DoNotIndex{\if@tempswa,\@tempswatrue,\@tempswafalse}
252 % \DoNotIndex{\if@ovt,\if@ovb,\if@ovl,\if@ovr}
253 % \DoNotIndex{\@ovttrue,\@ovbtrue,\@ovltrue,\@ovrtrue}
254 % \DoNotIndex{\@ovtfalse,\@ovbfalse,\@ovlfalse,\@ovrfalse}
255 %
256 % \DoNotIndex{\pdfcompresslevel}
257 %
258 % \DoNotIndex{\x,\y}
259 % ^^A \DoNotIndex{}
260 %
261 % \newcommand*\BigIndent{\hspace{.2\linewidth}}
262 % \renewcommand*\floatpagefraction{0.8}
263 %
264 % \newcommand*\PS{PostScript}
265 % \newcommand*\PSTricks{PSTricks}
266 % \newcommand*\PDF{PDF}
267 % \newcommand*\SL{Standard \LaTeX}
268 % ^^A stolen from pictex.tex
269 % \newcommand*\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC}
270 % \newcommand*\PiCTeX{\PiC\kern-.11em\TeX}
271 % \newcommand*\teTeX{te\kern-.11em\TeX}
272 % \newcommand*\TeXlive{\TeX live}
273 %
274 % \newenvironment*{ltxquote}{\quote\slshape}{\endquote}
275 %
276 % \changes{v0.2k}{2004/03/26}{Better control over funny pagestyle
277 % while debugging (HjG)}
278 % \changes{v0.2l}{2004/04/08}{Even better control over funny pagestyle
279 % while debugging (RN)}
280 % \ifdeveloping
281 % \makeatletter
282 %
283 % \newcommand*\isodattim{}
284 % \begingroup
285 % \count@\time
286 % \divide\count@ 60
287 % \count2=-\count@
288 % \multiply\count2 60
289 % \advance\count2 \time
290 % \xdef\isodattim{^^A
291 % \the\year-\two@digits{\the\month}-\two@digits{\the\day}^^A
292 % ~\two@digits{\the\count@}:\two@digits{\the\count2}}
293 % \endgroup
294 %
295 % \newcommand*\ps@myfootings{^^A cf. \ps@plain
296 % \let\@mkboth\@gobbletwo
297 % \let\@oddhead\@empty
298 % \let\@evenhead\@empty
299 % \def\@oddfoot{\reset@font
300 % \rlap{\textsf{\filename}~\fileversion~\filedate}^^A
301 % \hfil\thepage\hfil
302 % \llap{\TeX ed \texttt{\isodattim}}}^^A
303 % \def\@evenfoot{\reset@font
304 % \rlap{\TeX ed \texttt{\isodattim}}^^A
305 % \hfil\thepage\hfil
306 % \llap{\filedate~\fileversion~\textsf{\filename}}}^^A
307 % }
308 % \pagestyle{myfootings}
309 % \let\pagestyle\@gobble
310 % \let\thispagestyle\@gobble
311 %
312 % \makeatother
313 % \else
314 % \makeatletter
315 % ^^A \ifdim\overfullrule>\z@\else\let\ps@myfootings\ps@plain\fi
316 % \makeatother
317 % \fi
318 %
319 % \DeleteShortVerb{\|}
320 % \newcommand*\abs[1]{\ensuremath{|#1|}}
321 % \MakeShortVerb{\|}
322 %
323 % ^^A ========
324 %
325 % \newcommand*\OPOINT{^^A
326 % \begingroup
327 % \setlength\unitlength{.8pt}^^A
328 % \circle{5}^^A
329 % \endgroup
330 % }
331 % \newcommand*\FPOINT{^^A
332 % \begingroup
333 % \setlength\unitlength{.8pt}^^A
334 % \circle*{5}^^A
335 % \endgroup
336 % }
337 % \newcommand*\THICKLINES{\linethickness{1.4pt}}
338 % \newcommand*\CBEZIER[4]{^^A
339 % \cbezier(#1)(#2)(#3)(#4)^^A
340 % \put(#2){\FPOINT}\put(#3){\FPOINT}}
341 %
342 % \newcommand*\LINETEST[1][1]{^^A
343 % \setlength\unitlength{.007\linewidth}^^A
344 % \begin{minipage}{100\unitlength}
345 % \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
346 % \begin{picture}(100,100)^^A (-50,-50)^^A
347 % \put(0,0){\framebox(100,100){}}^^A
348 % \linethickness{2.6\unitlength}
349 % \put(0,0){\line(1,0){50}}^^A
350 % \put(0,0){\line(2,1){50}}^^A
351 % \put(0,0){\line(1,1){50}}^^A
352 % \put(0,0){\line(1,2){50}}^^A
353 % \put(0,0){\line(0,1){50}}^^A
354 % \ifnum #1>0
355 % \color{red}^^A
356 % \linethickness{3.8\unitlength}^^A
357 % \put(50,0){\line(966,259){25}}^^A 15 degrees
358 % \put(50,0){\line(866,500){25}}^^A 30 degrees
359 % \put(50,0){\line(707,707){25}}^^A 45 degrees
360 % \put(50,0){\line(500,866){25}}^^A 60 degrees
361 % \put(50,0){\line(259,966){25}}^^A 75 degrees
362 % \normalcolor^^A
363 % \fi
364 % \color{blue}^^A
365 % \thicklines
366 % \put(50,0){\line(4,2){50}}
367 % \put(50,0){\line(2,4){50}}
368 % ^^A \put(50,0){\line(5,5){50}}
369 % \end{picture}^^A
370 % \end{minipage}
371 % }
372 %
373 % \newcommand*\VECTORTEST[1][1]{^^A
374 % \setlength\unitlength{.007\linewidth}^^A
375 % \begin{minipage}{100\unitlength}
376 % \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
377 % \begin{picture}(100,100)(-50,-50)^^A
378 % \put(-50,-50){\framebox(100,100){}}^^A
379 % \thinlines
380 % \put(0,0){\vector(1,0){50}}^^A
381 % \thicklines
382 % \put(0,0){\vector(2,1){50}}^^A
383 % \linethickness{1.4pt}^^A
384 % \put(0,0){\vector(1,1){50}}^^A
385 % \linethickness{2.0pt}^^A
386 % \put(0,0){\vector(1,2){25}}^^A
387 % \ifnum #1>0
388 % \color{red}^^A
389 % \linethickness{2.6pt}^^A
390 % \put(0,0){\vector(259,966){13}}^^A 75 degrees
391 % \linethickness{3.8pt}^^A
392 % \put(0,0){\vector(-259,966){13}}^^A
393 % \normalcolor^^A
394 % \fi
395 % \linethickness{3.2pt}^^A
396 % \put(0,0){\vector(0,1){50}}^^A
397 % \linethickness{4.4pt}^^A
398 % \put(0,0){\vector(-1,1){50}}^^A
399 % \linethickness{5.0pt}^^A
400 % \put(0,0){\vector(-1,-1){50}}^^A
401 % \linethickness{8.0pt}^^A
402 % \put(0,0){\vector(1,-1){50}}^^A
403 % \thicklines^^A
404 % \thinlines^^A
405 % \put(1,-30){\line(1,0){10}}^^A
406 % \put(-1,-30){\line(-1,0){10}}^^A
407 % \put(0,-30){\vector(0,-1){0}}^^A
408 % \put(0,-30){\vector(1,1){0}}^^A
409 % \put(0,-30){\vector(-1,1){0}}^^A
410 % ^^A \put(0,15){\psline[linecolor=green,linewidth=8.0pt,unit=\unitlength]{->}(50,-50)}^^A
411 % \end{picture}^^A
412 % \end{minipage}
413 % }
414 %
415 % \newcommand*\CIRCLETEST[1][1]{^^A
416 % \setlength\unitlength{.007\linewidth}^^A
417 % \setlength\fboxsep{0pt}
418 % \fbox{^^A
419 % \begin{minipage}{118\unitlength}
420 % \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
421 % \begin{picture}(118,60)(-45,-30)^^A
422 % \linethickness{1.6pt}^^A
423 % \put(-30,0){\circle{15}}^^A
424 % \put(-20,0){\circle{20}}^^A
425 % \put(-10,0){\circle{25}}^^A
426 % \put(0,0){\circle{30}}^^A
427 % \put(10,0){\circle{35}}^^A
428 % \put(20,0){\circle{40}}^^A
429 % \put(30,0){\circle{45}}^^A
430 % \put(40,0){\circle{50}}^^A
431 % \end{picture}^^A
432 % \par
433 % \begin{picture}(118,35)(-45,-20)^^A
434 % \put(-20,0){\circle*{30}}^^A
435 % \put(-10,0){\circle*{25}}^^A
436 % \put(0,0){\circle*{20}}^^A
437 % \put(10,0){\circle*{15}}^^A
438 % \put(20,0){\circle*{12}}^^A
439 % \put(30,0){\circle*{9}}^^A
440 % \put(40,0){\circle*{6}}^^A
441 % \put(50,0){\circle*{3}}^^A
442 % \end{picture}^^A
443 % \end{minipage}}
444 % }
445 %
446 % \newcommand*\OVALTESTi[1][1]{^^A
447 % \setlength\unitlength{.007\linewidth}^^A
448 % \begin{minipage}{100\unitlength}
449 % \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
450 % \begin{picture}(100,80)^^A
451 % \put(0,0){\framebox(100,80){}}
452 % ^^A \linethickness{1\unitlength}
453 % \thicklines
454 % ^^A \color{blue}^^A
455 % \put(55,40){\oval[2](80,70)[r]}^^A
456 % \put(55,40){\oval[2](65,40)[r]}^^A
457 % \put(55,40){\oval[2](60,20)[r]}^^A
458 % \put(55,40){\oval[2](55,15)[r]}^^A
459 % \put(55,40){\oval[2](50,10)[r]}^^A
460 % \put(55,40){\oval[2](45,5)[r]}^^A
461 % \put(55,40){\oval[2](40,2)[r]}^^A
462 % ^^A \color{black}^^A
463 % \put(45,40){\oval(80,70)[l]}^^A
464 % \put(45,40){\oval(65,40)[l]}^^A
465 % \put(45,40){\oval(60,20)[l]}^^A
466 % \put(45,40){\oval(55,15)[l]}^^A
467 % \put(45,40){\oval(50,10)[l]}^^A
468 % \put(45,40){\oval(45,5)[l]}^^A
469 % \put(45,40){\oval(40,2)[l]}^^A
470 % \end{picture}^^A
471 % \end{minipage}
472 % }
473 %
474 % \newcommand*\OVALTESTii[1]{^^A
475 % \renewcommand*\maxovalrad{#1}^^A
476 % \setlength\unitlength{.0060\linewidth}^^A
477 % \noindent
478 % \begin{minipage}{155\unitlength}
479 % \begin{picture}(155,50)^^A
480 % \put(0,0){\framebox(155,50){}}^^A
481 % \put(0,0){^^A NE
482 % \setlength\unitlength{.5\unitlength}^^A
483 % \begin{picture}(100,100)(-50,-50)^^A
484 % \put(-50,-50){\framebox(100,100){}}^^A
485 % \put(0,0){\oval(80,80)}%
486 % \put(0,0){\makebox(0,0){2.5}}%
487 % \end{picture}^^A
488 % }^^A
489 % \put(55,0){^^A NW
490 % \setlength\unitlength{.4\unitlength}^^A
491 % \begin{picture}(100,100)(-50,-50)^^A
492 % \put(-50,-50){\framebox(100,100){}}^^A
493 % \put(0,0){\oval(80,80)}%
494 % \put(0,0){\makebox(0,0){2}}%
495 % \end{picture}^^A
496 % }^^A
497 % \put(100,0){^^A SW
498 % \setlength\unitlength{.3\unitlength}^^A
499 % \begin{picture}(100,100)(-50,-50)^^A
500 % \put(-50,-50){\framebox(100,100){}}^^A
501 % \put(0,0){\oval(80,80)}%
502 % \put(0,0){\makebox(0,0){1.5}}%
503 % \end{picture}^^A
504 % }^^A
505 % \put(135,0){^^A SE
506 % \setlength\unitlength{.2\unitlength}^^A
507 % \begin{picture}(100,100)(-50,-50)^^A
508 % \put(-50,-50){\framebox(100,100){}}^^A
509 % \put(0,0){\oval(80,80)}%
510 % \put(0,0){\makebox(0,0){1}}%
511 % \end{picture}^^A
512 % }^^A
513 % \end{picture}^^A
514 % \end{minipage}
515 % }
516 %
517 % \newcommand*\QBEZIERTEST[1][1]{^^A
518 % \setlength\unitlength{.007\linewidth}^^A
519 % \begin{minipage}{120\unitlength}
520 % \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
521 % \begin{picture}(120,100)^^A
522 % \put(0,0){\framebox(120,100){}}
523 % \qbezier[0](10,10)(40,90)(110,90)
524 % \put(10,10){\FPOINT}\put(40,90){\OPOINT}\put(110,90){\FPOINT}
525 % \color{green}^^A
526 % \qbezier[0](10,10)(20,90)(30,10)
527 % \put(10,10){\FPOINT}\put(20,90){\OPOINT}\put(30,10){\FPOINT}
528 % \end{picture}^^A
529 % \end{minipage}
530 % }
531 %
532 % \newcommand*\CBEZIERTEST[1][1]{^^A
533 % \setlength\unitlength{.01\linewidth}^^A
534 % \begin{minipage}{80\unitlength}
535 % \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
536 % \begin{picture}(80,80)(-40,-40)^^A
537 % \put(-40,-40){\framebox(80,80){}}
538 % \cbezier(-10,-10)(-30,30)(30,30)(30,-5)
539 % \cbezier(30,-5)(30,-30)(0,-35)(-20,-20)
540 % \put(-10,-10){\FPOINT}
541 % \put(-30,30){\OPOINT}\put(30,30){\OPOINT}
542 % \put(30,-5){\FPOINT}
543 % \put(30,-30){\OPOINT}\put(0,-35){\OPOINT}
544 % \put(-20,-20){\FPOINT}
545 % \color{green}^^A
546 % \cbezier(0,36)(24,36)(24,24)(0,0)
547 % \cbezier(0,0)(-24,-24)(-24,-36)(0,-36)
548 % \put(0,36){\FPOINT}
549 % \put(24,36){\OPOINT}\put(24,24){\OPOINT}
550 % \put(0,0){\FPOINT}
551 % \put(-24,-24){\OPOINT}\put(-24,-36){\OPOINT}
552 % \put(0,-36){\FPOINT}
553 % \end{picture}^^A
554 % \end{minipage}
555 % }
556 %
557 % \newcommand*\QCBEZIERTEST[1][1]{^^A
558 % \setlength\unitlength{.007\linewidth}^^A
559 % \begin{minipage}{100\unitlength}
560 % \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
561 % \begin{picture}(100,120)(-50,-60)^^A
562 % \put(-50,-60){\framebox(100,120){}}
563 % \color{green}^^A
564 % \qbezier[0](-40,-30)(-30,10)(0,10)
565 % \qbezier[0](0,10)(30,10)(40,50)
566 % \put(-40,-30){\FPOINT}\put(-30,10){\OPOINT}
567 % \put(0,10){\FPOINT}
568 % \put(30,10){\OPOINT}\put(40,50){\FPOINT}
569 % \color{black}^^A
570 % \cbezier[0](-40,-50)(-20,30)(20,-50)(40,30)
571 % \put(-40,-50){\FPOINT}\put(-20,30){\OPOINT}
572 % \put(20,-50){\OPOINT}\put(40,30){\FPOINT}
573 % \end{picture}^^A
574 % \end{minipage}
575 % }
576 %
577 % ^^A ========
578 %
579 % \newcommand*\Acknowledgements{%
580 % \section*{Acknowledgements}
581 % We would like to thank Michael Wichura for granting us permission to
582 % use his implementation of the algorithm for ``pythagorean addition''
583 % from his \PiCTeX\ package.
584 % Thanks go to Michael Vulis (MicroPress) for hints regarding a driver
585 % for the \textsf{V\TeX} system.
586 % Walter Schmidt has reviewed the documentation and code, and has
587 % tested the V\TeX\ driver.
588 % The members of the ``\TeX-Stamm\-tisch'' in Berlin, Germany, have
589 % been involved in the development of this package as our guinea pigs,
590 % i.e., alpha-testers;
591 % Jens-Uwe Morawski and Herbert Voss have also been helpful with many
592 % suggestions and discussions.
593 % Thanks to Claudio Beccari (\texttt{curve2e}) for some macros and testing.
594 % Thanks to Petr Ol\v{s}\'ak for some macros.
595 % \par
596 % Finally we thank the members of The \LaTeX\ Team for taking the time
597 % to evaluate our new implementation of the picture mode commands, and
598 % eventually accepting it as the ``official'' \textsf{pict2e} package,
599 % as well as providing the \texttt{README} file.
600 % \par
601 % }
602 %
603 % ^^A ========
604 %
605 % \title{The \textsf{pict2e} package\thanks{This document
606 % corresponds to \textsf{\filename} \fileversion,
607 % dated \filedate, documentation dated \docdate.}}
608 % \author{%
609 % Hubert G\"a{\ss}lein,
610 % Rolf Niepraschk\thanks{\texttt{[email protected]}}
611 % \,and
612 % Josef Tkadlec\thanks{\texttt{[email protected]}}}
613 %
614 % \date{\filedate}
615 %
616 % \maketitle
617 %
618 % \begin{abstract}
619 % This package was described in the 2nd edition of ``\LaTeX{}: A
620 % Document Preparation System'', but the \LaTeX{} project team
621 % declined to produce the package.
622 % For a long time, \LaTeX{} has included a ``pict2e package''
623 % that merely produced an apologetic error message.
624 %
625 % The new package extends the existing \LaTeX{} \texttt{picture}
626 % environment, using the familiar technique (cf.\ the
627 % \textsf{graphics} and \textsf{color} packages) of driver
628 % files.
629 % In the user-level part of this documentation there is a fair
630 % number of examples of use, showing where things are improved by
631 % comparison with the \SL\ \texttt{picture} environment.
632 % \end{abstract}
633 %
634 % \tableofcontents
635 %
636 % \listoffigures
637 %
638 % \section{Introduction}
639 %
640 % Here's a quote from the obsolete original official version of the
641 % \textsf{pict2e} package (1993--2003):
642 % \begin{ltxquote}
643 % The package \textsf{pict2e} that is mentioned in the 2nd edition of
644 % ``\LaTeX: A Document Preparation System'' has not yet been produced.
645 % It is unlikely that the \LaTeX3 Project Team will ever produce this
646 % package thus we would be very happy if someone else creates it.
647 % \end{ltxquote}
648 % Finally,
649 % \marginpar[\hfill\texttt{:-)}]{\texttt{:-)}}
650 % someone has produced a working implementation of the
651 % \textsf{pict2e} package.
652 %
653 % This package redefines some of the drawing commands of the \LaTeX\ %
654 % \textsf{picture} environment.
655 % Like the \textsf{graphics} and \textsf{color} packages, it uses
656 % driver files.
657 %
658 % ^^A Depending on the output format, we use \PS\ or \PDF\ Operators.
659 % Currently there are only back-ends for \PS\ and \PDF.
660 % (Other output formats may be added in the future.)
661 %
662 % \bigskip ^^A \pagebreak[2]
663 % \noindent
664 % Note/Warning:
665 % \begin{itemize}
666 % \item Documentation has been written somewhat ``hastily'' and may be
667 % inaccurate.
668 % \item
669 % The status of this package is currently somewhere between ``beta''
670 % and ``release'' \dots\
671 % Users and package programmers should \emph{not} rely on
672 % \emph{any} feature sported by the internal commands.
673 % (Especially, the internal control sequence names may change without
674 % notice in future versions of this package.)
675 % \end{itemize}
676 %
677 % \section{Usage}
678 %
679 % To use the \textsf{pict2e} package, you put a
680 % |\usepackage|\linebreak[0]\oarg{optionlist}\linebreak[0]|{pict2e}|
681 % instruction in the preamble of your document.
682 % Likewise, class or package writers just say
683 % |\RequirePackage|\linebreak[0]\oarg{optionlist}\linebreak[0]|{pict2e}|
684 % in an appropriate place in their class or package file.
685 % (Nothing unusual here.)
686 %
687 % \noindent
688 % Like the \textsf{graphics} and \textsf{color} packages, the
689 % \textsf{pict2e} package supports a
690 % configuration file (see Section~\ref{sec:cfg-file}).
691 %
692 % \subsection{Package options}
693 %
694 % \subsubsection{Driver options}
695 %
696 % \begin{minipage}{.55\textwidth}
697 % \begin{tabular}{@{}lc@{\qquad\qquad}lc@{}}
698 % driver & notes & driver & notes\\ \hline
699 % dvips & x & oztex & (x) \\
700 % xdvi & x & dvipsone & x? \\
701 % pdftex & x & dviwindo & x? \\
702 % vtex & x & dvipdf & x? \\
703 % dvipdfm & x & textures & x? \\
704 % dvipdfmx& x & pctexps & x? \\
705 % xetex & x & pctex32 & x? \\
706 % luatex ($>0.85$) & x & ~ & ~ \\ \hline
707 % ^^A emtex & --
708 % \end{tabular}
709 %
710 % \smallskip
711 % \noindent x\,=\,supported; (x)\,=\,supported but untested; \par
712 % \noindent x?\,=\,not yet implemented
713 % ^^A --\,=\,unlikely to be ever supported
714 % \end{minipage}
715 %
716 % \smallskip
717 % The driver options are (mostly) implemented by means of definition
718 % files (|p2e-|\meta{driver}\linebreak[0]|.def|).
719 % For details, see file \texttt{p2e-drivers.dtx}.
720 %
721 % \begin{em}
722 % Note:
723 % You should specify the same driver for \textsf{pict2e} you use with
724 % the \textsf{graphics/x} and \textsf{color} packages.
725 % Otherwise, things may go haywire.
726 % \par
727 % \end{em}
728 %
729 % \subsubsection{Other options}
730 %
731 % Currently, there are two options that allow you to choose between
732 % variants of the arrows-heads generated by the \cmd{\vector}
733 % command.
734 % See Figure~\ref{fig:vector:comparison}
735 % in Section~\ref{sec:usage:vector} for the difference.
736 %
737 % \noindent
738 % \begin{tabular}{@{}lp{.7\textwidth}@{}}
739 % option & meaning \\
740 % \hline
741 % ltxarrows & Draw \LaTeX\ style vectors (default). \\
742 % pstarrows & Draw \PSTricks\ style vectors. \\
743 % \hline
744 % \end{tabular}
745 %
746 % \subsubsection{Debugging options}
747 %
748 % These options are (mainly) for development and testing purposes.
749 %
750 % \noindent
751 % \begin{tabular}{@{}lp{.7\textwidth}@{}}
752 % option & meaning \\
753 % \hline
754 % original & Suppresses the new definitions. \\
755 % debug & Suppresses the compressing of pdf\TeX\ output;
756 % marks the \textsf{pict2e} generated code in the output
757 % files. \\
758 % hide & Suppresses all graphics output from \textsf{pict2e}. \\
759 % \hline
760 % \end{tabular}
761 %
762 % \subsection{Configuration file}
763 % \label{sec:cfg-file}
764 %
765 % Similar to the \textsf{graphics} and \textsf{color} packages,
766 % in most cases it is not necessary to give a driver option explicitly
767 % with the \cmd{\usepackage} (or \cmd{\RequirePackage}) command,
768 % if a suitable configuration file \texttt{pict2e.cfg} is present on your
769 % system (see the example file \texttt{pict2e-example.cfg}).
770 % On many systems it may be sufficient to copy
771 % \texttt{pict2e-example.cfg} to \texttt{pict2e.cfg};
772 % on others you might need to modify your copy to suit your system.
773 %
774 % \subsection{Details: Changes to user-level commands}
775 %
776 % This section describes the improvements of the new implementation of
777 % (some of) the \texttt{picture} commands.
778 % For details, look up ``\texttt{pict2e} package'' in the index of the
779 % \LaTeX\ manual~\cite{LAMPORT}.
780 %
781 % Here's a collection of quotes relevant to the \textsf{pict2e} package
782 % from the \LaTeX\ manual~\cite{LAMPORT}.
783 %
784 % ^^A Indicate Chapter/Section with these quotes ???
785 %
786 % From \cite[p.~118]{LAMPORT}:
787 % \begin{ltxquote}
788 % However, the \texttt{pict2e} package uses device-driver support to
789 % provide enhanced versions of these commands that remove some of
790 % their restrictions.
791 % The enhanced commands can draw straight lines and arrows of any
792 % slope, circles of any size, and lines (straight and curved) of any
793 % thickness.
794 % \end{ltxquote}
795 %
796 % From \cite[p.~179]{LAMPORT}:
797 % \begin{ltxquote}
798 % \begin{description}
799 % \item[\texttt{pict2e}]
800 % Defines enhanced versions of the \texttt{picture} environment
801 % commands that remove restrictions on the line slope, circle
802 % radius, and line thickness.
803 % \end{description}
804 % \end{ltxquote}
805 %
806 % From \cite[pp.~221--223]{LAMPORT}:
807 % \begin{ltxquote}
808 % \begin{description}
809 % \item[\cmd{\qbezier}]\mbox{}\\
810 % (With the \texttt{pict2e} package, there is no limit to the
811 % number of points plotted.)
812 % \item[\cmd{\line}\textrm{ and }\cmd{\vector}]
813 % Slopes $\abs x,\abs y \le 6 \mbox{ or } 4$, with no common
814 % divisor except $\pm1$:\\
815 % (These restrictions are eliminated by the \texttt{pict2e}
816 % package.)
817 % \item[\cmd{\line}\textrm{ and }\cmd{\vector}]
818 % Smallest horizontal extent of sloped lines and vectors that can
819 % be drawn:\\
820 % (This does not apply when the \texttt{pict2e} package is
821 % loaded.)
822 % \item[\cmd{\circle}\textrm{ and }\cmd{\circle*}]
823 % Largest circles and disks that can be drawn:\\
824 % (With the \texttt{pict2e} package, any size circle or disk can
825 % be drawn.)
826 % \item[\cmd{\oval}]
827 % \oarg{rad}:\\
828 % An explicit \emph{rad} argument can be used only with the
829 % \texttt{pict2e} package; the default value is the radius of the
830 % largest quarter-circle \LaTeX\ can draw without the
831 % \texttt{pict2e} package.
832 % \end{description}
833 % \end{ltxquote}
834 %
835 % \subsubsection{Line}
836 % \label{sec:usage:line}
837 %
838 % \DescribeMacro\line
839 % |\line|\parg{X,Y}\marg{LEN}\\
840 % In the \SL\ implementation the slope arguments \parg{X,Y} are
841 % restricted to integers in the range $-6 \le X,Y \le +6$, with no
842 % common divisors except $\pm 1$.
843 % (I.e., $X$ and $Y$ must be relatively prime.)
844 % Furthermore, only horizontal and vertical lines can assume arbitrary
845 % thickness;
846 % sloped lines are restricted to the widths given by
847 % the |\thinlines| and |\thicklines| declarations
848 % (i.e., 0.4pt and 0.8pt, respectively).
849 %
850 % From \cite[p.~222]{LAMPORT}:
851 % \begin{ltxquote}
852 % These restrictions are eliminated by the \texttt{pict2e} package.
853 % \end{ltxquote}
854 %
855 % However, to avoid overflow of \TeX's dimens, the slope arguments are real
856 % numbers in the range $-16383 \le X,Y \le +16383$. It is usually not a good
857 % idea to use slope arguments with the absolute value less then $10^{-4}$
858 % (the best accuracy is obtained if you use multiples of arguments such that
859 % you eliminate as much decimal parts as possible). The slope greater then
860 % 16384 cannot be obtained.
861 % ^^A ???
862 %
863 % Furthermore, unlike the \SL\ implementation, which silently converts
864 % the ``impossible'' slope to a vertical line extending in the upward
865 % direction ($(0,0) \mapsto (0,1)$), the \textsf{pict2e} package now
866 % treats this as an error.
867 % ^^A ???
868 %
869 % In the \SL\ implementation the horizontal extent of sloped lines
870 % must be at least 10\,pt.
871 % ^^A exactly or approximately ???
872 %
873 % From \cite[p.~222]{LAMPORT}:
874 % \begin{ltxquote}
875 % This does not apply when the \texttt{pict2e} package is loaded.
876 % \end{ltxquote}
877 %
878 % Figure~\ref{fig:line} shows the difference between the old and new
879 % implementations:
880 % The black lines in the left half of each picture all have slopes
881 % that conform to the restrictions of \SL.
882 % However, with the new implementation of \textsf{pict2e} sloped lines
883 % may assume any arbitrary width given by the |\linethickness|
884 % declaration.
885 % The right half demonstrates that now arbitrary slopes are possible.
886 %
887 % The blue lines represent ``illegal'' slopes specifications,
888 % i.e., with common divisors.
889 % Note the funny effect \SL\ produces in such cases.
890 % (In \LaTeX\ releases prior to 2003/12/01,
891 % some such ``illegal'' slopes might even lead to infinite loops!
892 % Cf.\ problem report latex/3570.)
893 %
894 % The new implementation imposes no restriction with respect to line
895 % thickness, minimal horizontal extent, and slope.
896 %
897 % The red lines correspond to angles of \(15^\circ\), \(30^\circ\),
898 % \(45^\circ\), \(60^\circ\), and \(75^\circ\), respectively.
899 % This was achieved by multiplying the sine and cosine of each angle
900 % by 1000 and rounding to the nearest integer, like this:
901 %\begin{verbatim}
902 % \put(50,0){\line(966,259){25}}
903 % \put(50,0){\line(866,500){25}}
904 % \put(50,0){\line(707,707){25}}
905 % \put(50,0){\line(500,866){25}}
906 % \put(50,0){\line(259,966){25}}
907 %\end{verbatim}
908 %
909 % \begin{figure}
910 % \noindent
911 % \begin{tabular}
912 % {@{}>{\centering}p{.5\textwidth}@{}
913 % >{\centering}p{.5\textwidth}@{}}
914 % \textbf{Original Commands} & \textbf{New Commands} \tabularnewline[1ex]
915 % \LINETEST[0] & \LINETEST
916 % \end{tabular}
917 % \caption{Line}
918 % \label{fig:line}
919 % \end{figure}
920 %
921 % \subsubsection{Vector}
922 % \label{sec:usage:vector}
923 %
924 % \DescribeMacro\vector
925 % |\vector|\parg{X,Y}\marg{LEN}\\
926 % In the \SL\ implementation the slope arguments \parg{X,Y} are
927 % restricted to integers in the range $-4 \le X,Y \le +4$, with no
928 % common divisors except $\pm 1$.
929 % (I.e., $X$ and $Y$ must be relatively prime.)
930 % Furthermore, arrow heads come only in two shapes, corresponding to
931 % the |\thinlines| and |\thicklines| declarations.
932 % (There's also a flaw: the lines will be printed over the arrow
933 % heads.
934 % ^^A pr/???
935 % See vertical vector in Figure~\ref{fig:vector}.)
936 %
937 % From \cite[p.~222]{LAMPORT}:
938 % \begin{ltxquote}
939 % These restrictions are eliminated by the \texttt{pict2e} package.
940 % \end{ltxquote}
941 %
942 % However, to avoid overflow of \TeX's dimen arithmetic, the current
943 % implementation restricts the slope arguments to real numbers in the range
944 % $-1000 \le X,Y \le +1000$, which should be enough. It is usually not a good
945 % idea to use slope arguments with the absolute value less then $10^{-4}$ (the
946 % best accuracy is obtained if you use multiples of arguments such that you
947 % eliminate as much decimal parts as possible). The slope greater then 16384
948 % cannot be obtained.
949 % ^^A ???
950 %
951 % Furthermore, unlike the \SL\ implementation, which silently converts
952 % the ``impossible'' slope to a vertical vector extending in the upward
953 % direction ($(0,0) \mapsto (0,1)$), the \textsf{pict2e} package now
954 % treats this as an error.
955 % ^^A ???
956 %
957 % In the \SL\ implementation the horizontal extent of sloped vectors
958 % must be at least 10\,pt.
959 % ^^A exactly or approximately ???
960 %
961 % From \cite[p.~222]{LAMPORT}:
962 % \begin{ltxquote}
963 % This does not apply when the \texttt{pict2e} package is loaded.
964 % \end{ltxquote}
965 %
966 % Figure~\ref{fig:vector} shows the difference between the old and new
967 % implementations:
968 % The black arrows all have ``legal'' slopes.
969 % The red arrows have slope arguments out of the range permitted by \SL.
970 % Slope arguments that are ``illegal'' in \SL\ produce results similar
971 % to those with the \cmd{\line} command (this has not been
972 % demonstrated here).
973 %
974 % The new implementation imposes no restriction with respect to line
975 % thickness, minimal horizontal extent, and slope.
976 %
977 % As with \SL, the arrow head will always be drawn.
978 % In particular, only the arrow head will be drawn, if the total length
979 % of the arrow is less than the length of the arrow head.
980 % ^^A \SL: only if =0 ???
981 % See right hand side of Figure~\ref{fig:vector:comparison}.
982 %
983 % \begin{figure}
984 % \noindent
985 % \begin{tabular}
986 % {@{}>{\centering}p{.5\textwidth}@{}
987 % >{\centering}p{.5\textwidth}@{}}
988 % \textbf{Original Commands} & \textbf{New Commands} \tabularnewline[1ex]
989 % \VECTORTEST[0] & \VECTORTEST[1]
990 % \end{tabular}
991 % \caption{Vector}
992 % \label{fig:vector}
993 % \end{figure}
994 %
995 % The current version of the \textsf{pict2e} package offers two
996 % variants for the shape of the arrow heads, controlled by package
997 % options.
998 % One variant tries to mimic the fonts used in the \SL\
999 % implementation (package option \textsf{ltxarrows}, the default;
1000 % see Figure~\ref{fig:vector:comparison}, top row),
1001 % though it is difficult to extrapolate from just two design sizes.
1002 % The other one is implemented like the arrows of the \PSTricks\
1003 % package~\cite{PSTRICKS} (package option \textsf{pstarrows};
1004 % see Figure~\ref{fig:vector:comparison}, bottom row).
1005 % ^^A See Figure~\ref{fig:vector:comparison}.
1006 %
1007 % \begin{figure}
1008 % \setlength\unitlength{.004\linewidth}^^A
1009 % \centering
1010 % \begin{picture}(200,100)
1011 % \put(0,0){\framebox(200,100){}}
1012 % \linethickness{12\unitlength}
1013 % \makeatletter \let\pIIe@vector=\pIIe@vector@pst \makeatother
1014 % \put(15,25){\vector(1,0){100}}
1015 % \put(185,25){\vector(1,0){0}}
1016 % \makeatletter \let\pIIe@vector=\pIIe@vector@ltx \makeatother
1017 % \put(15,75){\vector(1,0){100}}
1018 % \put(185,75){\vector(1,0){0}}
1019 % \end{picture}
1020 % \caption[Vector: shape variants of the arrow-heads]%
1021 % {Vector: shape variants of the arrow-heads.
1022 % Top: \LaTeX\ style vectors.
1023 % Bottom: \PSTricks\ style vectors.}
1024 % \label{fig:vector:comparison}
1025 % \end{figure}
1026 %
1027 % \subsubsection{Circle and Dot}
1028 % \label{sec:usage:circle+dot}
1029 %
1030 % \DescribeMacro\circle
1031 % \DescribeMacro{\circle*}
1032 % |\circle|\marg{DIAM}\\
1033 % |\circle*|\marg{DIAM}\\
1034 % The (hollow) circles and disks (filled circles) of the \SL\ ^^A
1035 % implementation had severe restrictions on the number of different
1036 % diameters and maximum diameters available.
1037 %
1038 % From \cite[p.~222]{LAMPORT}:
1039 % \begin{ltxquote}
1040 % With the \texttt{pict2e} package, any size circle or disk can be
1041 % drawn.
1042 % \end{ltxquote}
1043 %
1044 % \noindent
1045 % With the new implementation there are no more restrictions to the
1046 % diameter argument.
1047 % (However, negative
1048 % ^^A or zero
1049 % diameters are now trapped as an error.)
1050 %
1051 % Furthermore, hollow circles (like sloped lines) can now be drawn
1052 % with any line thickness.
1053 % Figure~\ref{fig:circle-dot} shows the difference.
1054 %
1055 % \begin{figure}
1056 % \noindent
1057 % \begin{tabular}
1058 % {@{}>{\centering}p{.5\textwidth}@{}
1059 % >{\centering}p{.5\textwidth}@{}}
1060 % \textbf{Original Commands} & \textbf{New Commands} \tabularnewline[1ex]
1061 % \CIRCLETEST[0] & \CIRCLETEST
1062 % \end{tabular}
1063 % \caption{Circle and Dot}
1064 % \label{fig:circle-dot}
1065 % \end{figure}
1066 %
1067 % \subsubsection{Oval}
1068 % \label{sec:usage:oval}
1069 %
1070 % \DescribeMacro\oval
1071 % |\oval|\oarg{rad}\parg{X,Y}\oarg{POS}\\
1072 % In the \SL\ implementation, the user has no control over the shape
1073 % of an oval besides its size, since its corners would always consist
1074 % of the ``quarter circles of the largest possible radius less than or
1075 % equal to \emph{rad}''~\cite[p.~223]{LAMPORT}.
1076 %
1077 % From \cite[p.~223]{LAMPORT}:
1078 % \begin{ltxquote}
1079 % An explicit \emph{rad} argument can be used only with the
1080 % \texttt{pict2e} package; the default value is the radius of the
1081 % largest quarter-circle \LaTeX\ can draw without the \texttt{pict2e}
1082 % package.
1083 % \end{ltxquote}
1084 %
1085 % This default value is 20\,pt, a length.
1086 % However, in an early reimplementation of the picture
1087 % commands~\cite{PSPICTURE}, there is such an optional argument too,
1088 % but it is given as a mere number, to be multiplied by |\unitlength|.
1089 %
1090 % Since both alternatives may make sense, we left the choice to the
1091 % user.
1092 % \ (See Figure~\ref{fig:oval:rad:2} for the differences.) \ ^^A
1093 % I.e., this implementation of \cmd{\oval} will ``auto-detect''
1094 % whether its \oarg{rad} argument is a length or a number.
1095 % \DescribeMacro\maxovalrad
1096 % Furthermore, the default value is not hard-wired either;
1097 % the user may access it under the moniker \cmd{\maxovalrad},
1098 % by the means of \cmd{\renewcommand*}.
1099 % (Names or values of length and counter registers may be given as
1100 % well, both as an explicit \oarg{rad} argument and when redefining
1101 % \cmd{\maxovalrad}.)
1102 %
1103 % (Both \oarg{rad} and the default value \cmd{\maxovalrad} are ignored
1104 % in ``standard \LaTeX\ mode'').
1105 %
1106 % The behaviour of |\oval| in the absence of the \oarg{rad} argument
1107 % is shown in Figure~\ref{fig:oval:rad:1}, left half of each picture.
1108 % Note that in the \SL\ implementation there is a minimum radius as
1109 % well (innermost ``salami'' is ``broken'').
1110 % In the right half of each picture, a \oarg{rad} argument has been
1111 % used: it has no effect with the original |\oval| command.
1112 %
1113 % \begin{figure}
1114 % \noindent
1115 % \begin{tabular}
1116 % {@{}>{\centering}p{.5\textwidth}@{}
1117 % >{\centering}p{.5\textwidth}@{}}
1118 % \textbf{Original Commands} & \textbf{New Commands}\tabularnewline[1ex]
1119 % \OVALTESTi[0] & \OVALTESTi
1120 % \end{tabular}
1121 % \caption{Oval: Radius argument for \cmd{\oval} vs.\ \cmd{\maxovalrad}}
1122 % \label{fig:oval:rad:1}
1123 % \end{figure}
1124 %
1125 % Both \oarg{rad} and \cmd{\maxovalrad} may be given as an explicit
1126 % (rigid) length (i.e., with unit) or as a number.
1127 % In the latter case the value is used as a factor to multiply by
1128 % \cmd{\unitlength}.
1129 % \ (A length or counter register will do as well, of course.)
1130 %
1131 % If a number is given, the rounded corners of an oval will scale
1132 % according to the current value of \cmd{\unitlength}.
1133 % (See Figure~\ref{fig:oval:rad:2}, first row.)
1134 %
1135 % If a length is specified, the rounded corners of an oval will be the
1136 % same regardless of the current value of \cmd{\unitlength}.
1137 % (See Figure~\ref{fig:oval:rad:2}, second row.)
1138 %
1139 % The default value is 20\,pt as specified for the \oarg{rad}
1140 % argument of \cmd{\oval} by the \LaTeX\ manual \cite[p.~223]{LAMPORT}.
1141 % (See Figure~\ref{fig:oval:rad:2}, third row.)
1142 %
1143 % \bigskip
1144 %
1145 % \begin{figure}
1146 % \centering
1147 % \noindent
1148 % \begin{tabular}{@{}c@{}}
1149 % \textbf{Original Commands},
1150 % \oarg{rad} or \cmd{\maxovalrad} ignored\\[1ex]
1151 % \OriginalPictureCmds\OVALTESTii{0}\tabularnewline[1ex]\tabularnewline
1152 % \textbf{New Commands},
1153 % \oarg{rad} or \cmd{\maxovalrad} depends on \cmd{\unitlength}\\[1ex]
1154 % \OVALTESTii{20}\tabularnewline[1ex]\tabularnewline
1155 % \textbf{New Commands},
1156 % \oarg{rad} or \cmd{\maxovalrad} a fixed length\\[1ex]
1157 % \OVALTESTii{10.44pt}
1158 % \end{tabular}
1159 % \caption[Oval: Radius argument for \cmd{\oval}: length vs.\ number]%
1160 % {Oval: Radius argument for \cmd{\oval}: length vs.\ number.
1161 % The number at the centre of each oval gives the relative value of
1162 % \texttt{\char`\\unitlength}.}
1163 % \label{fig:oval:rad:2}
1164 % \end{figure}
1165 %
1166 % \subsubsection{Bezier Curves}
1167 % \label{sec:usage:bezier-curves}
1168 %
1169 % \DescribeMacro\bezier
1170 % \DescribeMacro\qbezier
1171 % \DescribeMacro\cbezier
1172 % \DescribeMacro\qbeziermax
1173 % |\bezier|\marg{N}\parg{AX,AY}\parg{BX,BY}\parg{CX,CY}\\
1174 % |\qbezier|\oarg{N}\parg{AX,AY}\parg{BX,BY}\parg{CX,CY}\\
1175 % |\cbezier|\oarg{N}\parg{AX,AY}\parg{BX,BY}\parg{CX,CY}\parg{DX,DY}\\
1176 % In \SL, the \emph{N} argument specifies the number of points to
1177 % plot: $N+1$ for a positive integer $N$, appropriate number
1178 % (at most \cmd{\qbeziermax}) for $N=0$ or if
1179 % the optional argument is missing.
1180 % With \LaTeX\ versions prior to 2003/12/01, the quadratic Bezier
1181 % curves plotted by this package will not match those of the \SL\
1182 % implementation exactly, due to a bug in positioning the dots used to
1183 % produce a curve (cf.~latex/3566).
1184 %
1185 % \cmd{\bezier} is the obsolescent variant from the old
1186 % \textsf{bezier} package of vintage \LaTeX2.09.
1187 %
1188 % The |\cbezier| command draws a cubic Bezier curve;
1189 % see~\cite{EBEZIER}.
1190 % (This is not mentioned in \cite{LAMPORT} and has been added to the
1191 % package deliberately.)
1192 %
1193 % From \cite[p.~221--223]{LAMPORT}:
1194 % \begin{ltxquote}
1195 % With the \texttt{pict2e} package, there is no limit to the number
1196 % of points plotted.
1197 % \end{ltxquote}
1198 %
1199 % \noindent
1200 % More accurately, if the optional argument is absent or is 0,
1201 % the \textsf{pict2e} package uses primitive operators of the
1202 % output (back-end) format to draw a full curve.
1203 %
1204 % \begin{figure}
1205 % \noindent
1206 % \begin{tabular}
1207 % {@{}>{\centering}p{.5\textwidth}@{}
1208 % >{\centering}p{.5\textwidth}@{}}
1209 % \textbf{Original Commands} & \textbf{New Commands} \tabularnewline[1ex]
1210 % \QBEZIERTEST[0] & \QBEZIERTEST
1211 % \end{tabular}
1212 % \caption{Quadratic Bezier curves}
1213 % \label{fig:qbezier2}
1214 % \end{figure}
1215 %
1216 % \begin{figure}
1217 % \noindent
1218 % \begin{tabular}
1219 % {@{}>{\centering}p{.5\textwidth}@{}
1220 % >{\centering}p{.5\textwidth}@{}}
1221 % \textbf{Original Commands} & \textbf{New Commands} \tabularnewline[1ex]
1222 % \IfFileExists{ebezier.sty}{\CBEZIERTEST[0]}{%
1223 % \begin{slshape}^^A
1224 % Note:
1225 % Since the \textsf{ebezier} package is not installed on your system,
1226 % the `original' \cmd{\cbezier} command can't be used here.\par
1227 % \end{slshape}} & \CBEZIERTEST
1228 % \end{tabular}
1229 % \caption{Cubic Bezier curves}
1230 % \label{fig:cbezier}
1231 % \end{figure}
1232 %
1233 % \begin{figure}
1234 % \noindent
1235 % \begin{tabular}
1236 % {@{}>{\centering}p{.5\textwidth}@{}
1237 % >{\centering}p{.5\textwidth}@{}}
1238 % \textbf{Original Commands} & \textbf{New Commands} \tabularnewline[1ex]
1239 % \IfFileExists{ebezier.sty}{\QCBEZIERTEST[0]}{%
1240 % \begin{slshape}^^A
1241 % Note:
1242 % Since the \textsf{ebezier} package is not installed on your system,
1243 % the `original' \cmd{\cbezier} command can't be used here.\par
1244 % \end{slshape}} & \QCBEZIERTEST
1245 % \end{tabular}
1246 % \caption{Quadratic (green) and Cubic Bezier curves}
1247 % \label{fig:qcbezier}
1248 % \end{figure}
1249 %
1250 % \subsection{Extensions}
1251 %
1252 % This section desribe new commands that extend the possibilities of the
1253 % \texttt{picture} environment. It is not our aim to create a powerful
1254 % collection of macros (like \texttt{pstricks} or \texttt{tikz}). The main goal
1255 % of this package is to eliminate the limitations of the standard
1256 % \texttt{picture} commands. But this is done by \PS\ and \PDF\ operators
1257 % that might be easily used for user-level commands and hence significantly
1258 % improve the drawing possibilities.
1259 %
1260 % \subsubsection{Circle arcs}
1261 % \label{sec:usage:circle-arcs}
1262 %
1263 % \DescribeMacro\arc
1264 % \DescribeMacro{\arc*}
1265 % |\arc|\oarg{ANGLE1,ANGLE2}\marg{RAD}\\
1266 % |\arc*|\oarg{ANGLE1,ANGLE2}\marg{RAD}\\
1267 % These commands are generalizations of \cmd{\circle} and \cmd{\circle*}
1268 % commands except that the radius instead of the diameter is given. The
1269 % optional argument is a comma separated pair of angles given in degrees
1270 % (implicit value is $[0,360]$). The arc starts at the point given by
1271 % $ANGLE1$. If $ANGLE2$ is greater than $ANGLE1$ the arc is drawn in the
1272 % positive orientation (anticlockwise), if the $ANGLE2$ is smaller than
1273 % $ANGLE1$ the arc is drawn in the negative orientation (clockwise). The angle
1274 % of the arc is the absolute value the difference of $ANGLE1$ and $ANGLE2$.
1275 % Hence the pair $[-10,80]$ gives the same arc as $[80,-10]$ (a quarter of a
1276 % circle) while the pairs $[80,350]$ and $[350,80]$ give the complementary
1277 % arc.
1278 %
1279 % In fact, the arc is approximated by cubic Bezier curves with an inaccuracy
1280 % smaller than 0.0003 (it seems to be sufficiently good).
1281 %
1282 % If \cmd{\squarecap} is active then \cmd{\arc\marg{RAD}} produces a circle
1283 % with a square.
1284 %
1285 % An equivalent \cmd{\pIIearc} to \cmd{\arc} is defined to solve possible
1286 % conflicts with other packages.
1287 %
1288 % \subsubsection{Line, Vector, polyline, polyvector, and polygon}
1289 % \label{sec:usage:lines+polygons}
1290 %
1291 % \DescribeMacro\Line
1292 % \DescribeMacro\polyline
1293 % \DescribeMacro\Vector
1294 % \DescribeMacro\polyvector
1295 % \DescribeMacro\polygon
1296 % \DescribeMacro{\polygon*}
1297 % |\Line|\parg{X1,Y1}\parg{X2,Y2}\\
1298 % |\polyline|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
1299 % |\Vector|\parg{X1,Y1}\parg{X2,Y2}\\
1300 % |\polyvector|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
1301 % |\polygon|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
1302 % |\polygon*|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
1303 % A natural way how to describe a line segment is to give the coordinates of
1304 % the endpoints. The syntax of the \cmd{\line}/\cmd{\vector} is different
1305 % because
1306 % the lines in the standard \texttt{picture} environment are made from small
1307 % line segments of a limited number of slopes given in a font. However, this
1308 % package changes the \cmd{\line} command computing the coordinates of the
1309 % endpoints and using an internal macro for drawing a line segment with given
1310 % endpoints. Hence it would be crazy do not use this possibility directly.
1311 % This is done by the commands \cmd{\Line} and \cmd{\Vector}. The commands
1312 % \cmd{\polyline} and \cmd{\polyvector} draws a
1313 % stroken line/vector connecting points with given coordinates. The command
1314 % \cmd{\polygon} draws a polygon with given vertices, the star variant gives
1315 % filled polygon. At least two points should be given.
1316 %
1317 % These command need not be used within a \cmd{\put} command (if the
1318 % coordinates are absolute).
1319 %
1320 % \subsubsection{Path commands}
1321 % \label{sec:usage:path-commands}
1322 %
1323 % \DescribeMacro\moveto
1324 % \DescribeMacro\lineto
1325 % \DescribeMacro\curveto
1326 % \DescribeMacro\circlearc
1327 % |\moveto|\parg{X,Y}\\
1328 % |\lineto|\parg{X,Y}\\
1329 % |\curveto|\parg{X2,Y2}\parg{X3,Y3}\parg{X4,Y4}\\
1330 % |\circlearc|\oarg{N}\marg{X}\marg{Y}\marg{RAD}\marg{ANGLE1}\marg{ANGLE2}\\
1331 % These commands directly correspond to the \PS\ and \PDF\ path operators. You
1332 % start defining a path giving its initial point by \cmd{\moveto}. Then you
1333 % can consecutively add a line segment to a given point by \cmd{\lineto}, a
1334 % cubic Bezier curve by \cmd{\curveto} (two control points and the endpoint
1335 % are given) or an arc by \cmd{\circlearc} (mandatory parameters are
1336 % coordinates of the center, radius, initial and final angle).
1337 %
1338 % Drawing arcs is a bit more complicated. There is a special operator only in
1339 % \PS\ (not in \PDF) but also in \PS\ it is approximated by cubic Bezier
1340 % curves. Here we use common definition for \PS\ and \PDF. The arc is drawn
1341 % such that the initial point given by the initial angle is rotated by
1342 % $ANGLE2-ANGLE1$ (anticlockwise for positive value and clockwise for negative
1343 % value) after reducing this difference to the interval $[-720, 720]$.
1344 % Implicitely (the optional parameter $N=0$) before drawing an arc a
1345 % \cmd{\lineto} to the initial point of the arc is added. For $N=1$
1346 % \cmd{\moveto} instead of \cmd{\lineto} is executed---it is useful if you
1347 % start the path by an arc and do not want to compute and set the initial
1348 % point. For $N=2$ the \cmd{\lineto} before drawing the arc is omitted---it
1349 % leads to a bit shorter code for the path but you should be sure that the
1350 % already defined part of the path ends precisely at the initial point of the
1351 % arc.
1352 %
1353 % \DescribeMacro\closepath
1354 % \DescribeMacro\strokepath
1355 % \DescribeMacro\fillpath
1356 % The command \cmd{\closepath} is equivalent to \cmd{\lineto} to the initial
1357 % point of the path. After defining paths you might use either
1358 % \cmd{\strokepath} to draw them or, for closed paths, \cmd{\fillpath} to draw
1359 % an area bounded by them.
1360 %
1361 % The path construction need not be used within a \cmd{\put} command (if the
1362 % coordinates are absolute).
1363 %
1364 % \subsubsection{Ends of paths, joins of subpaths}
1365 % \label{sec:usage:ends-joins}
1366 %
1367 % \DescribeMacro\buttcap
1368 % \DescribeMacro\roundcap
1369 % \DescribeMacro\squarecap
1370 % The shape of ends of paths is controlled by the following commands:
1371 % \cmd{\buttcap} (implicit) define the end as a line segment, \cmd{\roundcap}
1372 % adds a halfdisc, \cmd{\squarecap} adds a halfsquare. While \cmd{\squarecap}
1373 % is ignored for the path with zero length, \cmd{\roundcap} places a disc to
1374 % the given point. These commands do not apply to \cmd{\vector} and to
1375 % closed paths (\cmd{\circle}, full \cmd{\oval},
1376 % parameter, path constructions ended by \cmd{\closepath}).
1377 %
1378 % \DescribeMacro\miterjoin
1379 % \DescribeMacro\roundjoin
1380 % \DescribeMacro\beveljoin
1381 % The shape of joins of subpaths is controlled by the following commands:
1382 % \cmd{\miterjoin} (implicit) might be defined in such a way that
1383 % ``boundaries'' of subpaths are prolonged until they intersect (it might be a
1384 % rather long distance for lines with a small angle between them);
1385 % \cmd{\roundjoin} corresponds to \cmd{\roundcap} for both subpaths;
1386 % \cmd{\beveljoin} adds a convex hull of terminal line segments of both
1387 % subpaths.
1388 %
1389 % \StopEventually{^^A
1390 % \Acknowledgements
1391 % ^^A \typeout{!!!
1392 % ^^A \ifx\Finale\relax \string\OnlyDescription
1393 % ^^A \else \string\AlsoImplementation \fi}^^A
1394 % ^^A Dirty Hack:
1395 % \ifx\Finale\relax ^^A \OnlyDescription
1396 % \begin{thebibliography}{9}
1397 % \raggedright
1398 %
1399 % \bibitem{LAMPORT} Leslie Lamport: \textit{\LaTeX\ -- A Document
1400 % Preparation System}, 2nd ed., 1994
1401 %
1402 % \bibitem{PSTRICKS} Timothy Van Zandt: \textit{The pstricks bundle.}
1403 % \texttt{CTAN:~graphics/pstricks/}, 1993, 1994, 2000
1404 %
1405 % \bibitem{PSPICTURE} David Carlisle: \textit{The pspicture package.}
1406 % \texttt{CTAN:~macros/latex/contrib/carlisle/}, 1992
1407 %
1408 % \bibitem{EBEZIER} Gerhard A. Bachmaier: \textit{The ebezier package.}
1409 % \texttt{CTAN:~macros/latex/contrib/ebezier/}, 2002
1410 %
1411 % \end{thebibliography}^^A
1412 %\else ^^A \AlsoImplementation
1413 % \begin{thebibliography}{9}
1414 % \raggedright
1415 %
1416 % \bibitem{LAMPORT} Leslie Lamport: \textit{\LaTeX\ -- A Document
1417 % Preparation System}, 2nd ed., 1994
1418 %
1419 % \bibitem{COMPANION} Michel Goossens, Frank Mittelbach, Alexander
1420 % Samarin: \textit{The \LaTeX\ Companion}, 1993
1421 %
1422 % \bibitem{EBEZIER} Gerhard A. Bachmaier: \textit{The ebezier package.}
1423 % \texttt{CTAN:~macros/latex/contrib/ebezier/}, 2002
1424 %
1425 % \bibitem{PICTEX} Michael Wichura: \textit{The PiC\TeX\ package.}
1426 % \texttt{CTAN:~graphics/pictex}, 1987
1427 %
1428 % \bibitem{PSPICTURE} David Carlisle: \textit{The pspicture package.}
1429 % \texttt{CTAN:~macros/latex/contrib/carlisle/}, 1992
1430 %
1431 % \bibitem{TRIG} David Carlisle: \textit{The trig package.}
1432 % \texttt{CTAN:~macros/latex/required/graphics/}, 1999
1433 %
1434 % \bibitem{PSPIC} Kresten Krab Thorup: \textit{The pspic package.}
1435 % \texttt{CTAN:~macros/latex209/contrib/misc/}, 1991
1436 %
1437 % \bibitem{PSTRICKS} Timothy Van Zandt: \textit{The pstricks bundle.}
1438 % \texttt{CTAN:~graphics/pstricks/}, 1993, 1994, 2000
1439 %
1440 % ^^A [email protected]
1441 %
1442 % \end{thebibliography}
1443 %
1444 % \PrintChanges
1445 % \PrintIndex
1446 %
1447 %\fi
1448 % } ^^A \StopEventually
1449 %
1450 % ^^A
1451 % \clearpage
1452 %
1453 % \section{Implementation}
1454 %
1455 % ^^A cite some of these packages !!! ???
1456 % Unlike other packages that have reimplemented or extended some of
1457 % the commands from \SL's \texttt{picture} environment,
1458 % we do not use special fonts,
1459 % nor draw arbitrary shapes by the means of myriads of small (point)
1460 % characters,
1461 % nor do we use sophisticated programming in some back-end
1462 % programming language.
1463 %
1464 % In its present state, this implementation supports just \PS\ and
1465 % \PDF\ as back-end formats.
1466 % It just calculates the necessary control points and uses primitive
1467 % path drawing operators.
1468 %
1469 % \begin{macrocode}
1470 %<*package>
1471 % \end{macrocode}
1472 %
1473 % \subsection{Initialisation}
1474 %
1475 % \begin{macro}{\Gin@codes}
1476 % First we save the catcodes of some characters, and set them to
1477 % fixed values whilst this file is being read.
1478 % \changes{v0.2o}{2004/06/25}
1479 % {Save and restore catcodes (HjG)}
1480 % (This is done in almost the same manner as in the \textsf{graphics}
1481 % and \textsf{color} packages. Alas, we don't need nor want to have
1482 % |*| as part of control sequence names, so we omit it here.)
1483 % \begin{macrocode}
1484 \edef\Gin@codes{%
1485 \catcode`\noexpand\^^A\the\catcode`\^^A\relax
1486 \catcode`\noexpand\"\the\catcode`\"\relax
1487 % \catcode`\noexpand\*\the\catcode`\*\relax
1488 \catcode`\noexpand\!\the\catcode`\!\relax
1489 \catcode`\noexpand\:\the\catcode`\:\relax}
1490 % \end{macrocode}
1491 %
1492 % \begin{macrocode}
1493 \catcode`\^^A=\catcode`\%
1494 \@makeother\"%
1495 % \catcode`\*=11
1496 \@makeother\!%
1497 \@makeother\:%
1498 % \end{macrocode}
1499 % \end{macro}
1500 %
1501 % \subsection{Preliminaries}
1502 %
1503 % \begin{macro}{\@defaultunitsset}
1504 % Command to accept a number or length expression.
1505 % Added to \LaTeX\ 2020-10-01 release but provided here for older releases.
1506 %
1507 % Set a length register, |#1|,
1508 % accepting number or an etex length expression, |#2|,
1509 % with default unit, |#3|.
1510 %
1511 % |#3| can be a literal unit such as |cm| or a length register such
1512 % as |\unitlength|.
1513 %
1514 % This is used in all |picture| commands that take picture coordinates.
1515 % So |\put(2,2)| as previously but now |\put(\textwidth-5cm,0.4\texteight)|
1516 % Note that you can only use expressions with lengths, |\put(1+2,0)| is not
1517 % supported.
1518 % \begin{macrocode}
1519 \def\@defaultunitsset#1#2#3{%
1520 \@defaultunits#1\dimexpr#2#3\relax\relax\@nnil}
1521 % \end{macrocode}
1522 % \end{macro}
1523 %
1524 % \begin{macro}{\pIIe@mode}
1525 % \begin{macro}{\pIIe@code}
1526 % \begin{macro}{\Gin@driver}
1527 % The first two of these commands determine how the \textsf{pict2e}
1528 % package works internally;
1529 % they should be defined properly by the
1530 % |p2e-|\meta{driver}\linebreak[0]|.def|
1531 % files.
1532 % (See file \texttt{p2e-drivers.dtx} for details and sample
1533 % implementations.)
1534 %
1535 % The latter command is well known from the \textsf{graphics} and
1536 % \textsf{color} packages from the \SL\ graphics bundle;
1537 % it should be set by a package option---most likely in a (system
1538 % dependent) configuration file \texttt{pict2e.cfg}.
1539 % (File \texttt{p2e-drivers.dtx} contains an example configuration
1540 % file suitable for the \teTeX\ and \TeXlive\ distributions;
1541 % it will be extracted as \texttt{pict2e-example.cfg}.)
1542 % \begin{macrocode}
1543 \newcommand*\pIIe@mode{-1}
1544 \newcommand*\pIIe@code[1]{}
1545 \providecommand*\Gin@driver{}
1546 % \end{macrocode}
1547 % \end{macro}
1548 % \end{macro}
1549 % \end{macro}
1550 %
1551 % \begin{macro}{\pIIe@tempa}
1552 % \begin{macro}{\pIIe@tempb}
1553 % \begin{macro}{\pIIe@tempc}
1554 % At times, we need some temporary storage bins.
1555 % However, we only use some macros and do not allocate any new
1556 % registers; the ``superfluous'' ones from the picture module of the
1557 % kernel (|ltpictur.dtx|) and the general scratch registers should
1558 % suffice.
1559 % ^^A (This leads to somewhat vulnerable code below!)
1560 % \begin{macrocode}
1561 \newcommand*\pIIe@tempa{}
1562 \newcommand*\pIIe@tempb{}
1563 \newcommand*\pIIe@tempc{}
1564 % \end{macrocode}
1565 % \end{macro}
1566 % \end{macro}
1567 % \end{macro}
1568 %
1569 % \subsection{Option processing}
1570 %
1571 % The driver options are not much of a surprise:
1572 % they are similar to those of the \textsf{graphics} and
1573 % \textsf{color} packages.
1574 % \changes{v0.3b}{2016/02/05}{New option `luatex' (RN)}
1575 % \begin{macrocode}
1576 \DeclareOption{dvips}{\def\Gin@driver{dvips.def}}
1577 \DeclareOption{xdvi}{\ExecuteOptions{dvips}}
1578 \DeclareOption{dvipdf}{\def\Gin@driver{dvipdf.def}}
1579 \DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfm.def}}
1580 \DeclareOption{dvipdfmx}{\def\Gin@driver{dvipdfmx.def}}
1581 \DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}}
1582 \DeclareOption{luatex}{\def\Gin@driver{luatex.def}}
1583 \DeclareOption{xetex}{\def\Gin@driver{xetex.def}}
1584 \DeclareOption{dvipsone}{\def\Gin@driver{dvipsone.def}}
1585 \DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
1586 \DeclareOption{oztex}{\ExecuteOptions{dvips}}
1587 \DeclareOption{textures}{\def\Gin@driver{textures.def}}
1588 \DeclareOption{pctexps}{\def\Gin@driver{pctexps.def}}
1589 \DeclareOption{pctex32}{\def\Gin@driver{pctex32.def}}
1590 \DeclareOption{vtex}{\def\Gin@driver{vtex.def}}
1591 % \end{macrocode}
1592 % Request ``original'' \LaTeX\ mode.
1593 % ^^A Emulation. To be implemented yet.
1594 % \begin{macrocode}
1595 \DeclareOption{original}{\def\pIIe@mode{0}}
1596 % \end{macrocode}
1597 %
1598 % \begin{macro}{\ifpIIe@pdfliteral@ok}
1599 % \begin{macro}{\pIIe@pdfliteral}
1600 % Check, whether if \cmd{\pIIe@pdfliteral} is given in the driver file or
1601 % \cmd{\pdfliteral} available directly.
1602 % \begin{macrocode}
1603 \newif\ifpIIe@pdfliteral@ok
1604 \pIIe@pdfliteral@oktrue
1605 \ifx\pIIe@pdfliteral\@undefined
1606 \ifx\pdfliteral\@undefined
1607 \pIIe@pdfliteral@okfalse
1608 \def\pIIe@pdfliteral#1{%
1609 \PackageWarning{pict2e}{pdfliteral not supported}%
1610 }%
1611 \else
1612 \let\pIIe@pdfliteral\pdfliteral
1613 \fi
1614 \fi
1615 % \end{macrocode}
1616 % \end{macro}
1617 % \end{macro}
1618 %
1619 % \begin{macro}{\pIIe@buttcap}
1620 % Do \cmd{\buttcap} only if available.
1621 % \begin{macrocode}
1622 \def\pIIe@buttcap{%
1623 \ifpIIe@pdfliteral@ok
1624 \buttcap
1625 \fi
1626 }
1627 % \end{macrocode}
1628 % \end{macro}
1629 % \begin{macro}{\pIIe@FAL}
1630 % \begin{macro}{\pIIe@FAW}
1631 % \begin{macro}{\pIIe@CAW}
1632 % \begin{macro}{\pIIe@FAI}
1633 % Some macros to parametrize the shape of the vector outline.
1634 % The following values are “hand optimized” with the aim of emulating
1635 % \LaTeX-style arrows. They also seem suitable for our \PSTricks-style arrows.
1636 % See Figures~\ref{fig:vector:ltx} and~\ref{fig:vector:pst}.
1637 % \changes{v0.1x}{2003/11/27}{Introduce ``inset''. (RN,HjG)}
1638 % \begin{macrocode}
1639 \newcommand*\pIIe@FAL{1.52}%
1640 \newcommand*\pIIe@FAW{3.2}%
1641 \newcommand*\pIIe@CAW{1.5pt}%
1642 \newcommand*\pIIe@FAI{0.25}%
1643 % \end{macrocode}
1644 % \end{macro}
1645 % \end{macro}
1646 % \end{macro}
1647 % \end{macro}
1648 % \begin{macro}{\ltxarrows}
1649 % \begin{macro}{\pstarrows}
1650 % The following user-level macros can be used to change the arrow style
1651 % (\LaTeX-style is the default).
1652 % \changes{v0.3d}{2020/06/13}{New user-level macros \cmd{\ltxarrows}
1653 % and \cmd{\pstarrows}. (RN)}
1654 % \begin{macrocode}
1655 \newcommand*\ltxarrows{%
1656 \let\pIIe@vector=\pIIe@vector@ltx
1657 }
1658 \newcommand*\pstarrows{%
1659 \let\pIIe@vector=\pIIe@vector@pst
1660 }
1661 % \end{macrocode}
1662 % \end{macro}
1663 % \end{macro}
1664 % \begin{macrocode}
1665 \DeclareOption{ltxarrows}{\AtEndOfPackage{\ltxarrows}}
1666 \DeclareOption{pstarrows}{\AtEndOfPackage{\pstarrows}}
1667 % \end{macrocode}
1668 %
1669 % \begin{macro}{\pIIe@debug@comment}
1670 % This makes debugging easier.
1671 % \begin{macrocode}
1672 \newcommand*\pIIe@debug@comment{}
1673 \DeclareOption{debug}{%
1674 \def\pIIe@debug@comment{^^J^^J\@percentchar\space >>> pict2e <<<^^J}%
1675 \begingroup
1676 \@ifundefined{pdfcompresslevel}{}{\global\pdfcompresslevel\z@}%
1677 \endgroup}
1678 % \end{macrocode}
1679 % \end{macro}
1680 % A special variant of debugging. (Obsolescent? Once used for
1681 % performance measurements: arctan vs.\ pyth-add versions of
1682 % \cmd{\vector}.)
1683 % \begin{macrocode}
1684 \DeclareOption{hide}{\AtEndOfPackage{%
1685 % \def\pIIe@code#1{}%
1686 \let\pIIe@code\@gobble
1687 }}
1688 % \end{macrocode}
1689 % Unknown options default to mode ``original.''
1690 % \begin{macrocode}
1691 \DeclareOption*{\ExecuteOptions{original}}
1692 % \end{macrocode}
1693 % By default, arrows are in the \LaTeX\ style.
1694 % \begin{macrocode}
1695 \ExecuteOptions{ltxarrows}
1696 % \end{macrocode}
1697 % Like the \textsf{graphics} and \textsf{color} packages, we support a
1698 % configuration file. (See file \texttt{p2e-drivers.dtx} for details
1699 % and an example.)
1700 % \begin{macrocode}
1701 \InputIfFileExists{pict2e.cfg}{}{}
1702 % \end{macrocode}
1703 % This now should make clear which ``mode'' and ``code'' we should use.
1704 % \begin{macrocode}
1705 \ProcessOptions\relax
1706 % \end{macrocode}
1707 %
1708 % \subsection{Output driver check}
1709 %
1710 % \begin{macrocode}
1711 \ifnum\pIIe@mode=\z@
1712 \PackageInfo{pict2e}{Package option `original' requested}
1713 \else
1714 % \end{macrocode}
1715 % This code fragment is more or less cloned from the
1716 % \textsf{graphics} and \textsf{color} packages.
1717 % \begin{macrocode}
1718 \if!\Gin@driver!
1719 \PackageError{pict2e}
1720 {No driver specified at all}
1721 {You should make a default driver option in a file\MessageBreak
1722 pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}}%
1723 \else
1724 \PackageInfo{pict2e}{Driver file: \Gin@driver}
1725 \@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
1726 \PackageInfo{pict2e}{Driver file for pict2e: p2e-\Gin@driver}
1727 \InputIfFileExists{p2e-\Gin@driver}{}{%
1728 \PackageError{pict2e}%
1729 {Driver file ``p2e-\Gin@driver'' not found}%
1730 {Q: Is the file properly installed? A: No!}}
1731 \fi
1732 \fi
1733 % \end{macrocode}
1734 %
1735 % \subsection{Mode check}
1736 %
1737 % For \PS\ and \PDF\ modes.
1738 % \begin{macrocode}
1739 \ifnum\pIIe@mode>\z@
1740 \ifnum\pIIe@mode<\thr@@
1741 \RequirePackage{trig}
1742 % \end{macrocode}
1743 %
1744 % \begin{macro}{\pIIe@oldline}
1745 % \begin{macro}{\pIIe@old@sline}
1746 % \begin{macro}{\pIIe@oldvector}
1747 % \begin{macro}{\pIIe@old@circle}
1748 % \begin{macro}{\pIIe@old@dot}
1749 % \begin{macro}{\pIIe@old@bezier}
1750 % \begin{macro}{\pIIe@old@cbezier}
1751 % \begin{macro}{\pIIe@oldoval}
1752 % \begin{macro}{\pIIe@old@oval}
1753 % Saved versions of some macros. (Or dummy definitions.)
1754 % \begin{macrocode}
1755 \let\pIIe@oldline\line
1756 \let\pIIe@old@sline\@sline
1757 \let\pIIe@oldvector\vector
1758 \let\pIIe@old@circle\@circle
1759 \let\pIIe@old@dot\@dot
1760 \let\pIIe@old@bezier\@bezier
1761 \AtBeginDocument{%
1762 \@ifundefined{@cbezier}{%
1763 \def\pIIe@old@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){}%
1764 }{\let\pIIe@old@cbezier\@cbezier}}
1765 \let\pIIe@oldoval\oval
1766 \let\pIIe@old@oval\@oval
1767 % \end{macrocode}
1768 % \end{macro}
1769 % \end{macro}
1770 % \end{macro}
1771 % \end{macro}
1772 % \end{macro}
1773 % \end{macro}
1774 % \end{macro}
1775 % \end{macro}
1776 % \end{macro}
1777 %
1778 % \begin{macro}{\OriginalPictureCmds}
1779 % Switches back to the original definitions;
1780 % for testing and demonstration purposes only.
1781 % \begin{macrocode}
1782 \newcommand*\OriginalPictureCmds{%
1783 \let\@sline\pIIe@old@sline
1784 \let\line\pIIe@oldline
1785 \let\vector\pIIe@oldvector
1786 \let\@circle\pIIe@old@circle
1787 \let\@dot\pIIe@old@dot
1788 \let\@bezier\pIIe@old@bezier
1789 \let\@cbezier\pIIe@old@cbezier
1790 \renewcommand*\oval[1][]{\pIIe@oldoval}%
1791 \let\@oval\pIIe@old@oval
1792 }
1793 % \end{macrocode}
1794 % \end{macro}
1795 % Overambitious drivers.
1796 % \begin{macrocode}
1797 \else
1798 \PackageError{pict2e}
1799 {Unsupported mode (\pIIe@mode) specified}
1800 {The driver you specified requested a mode\MessageBreak
1801 not supported by this version of this package}
1802 \fi
1803 % \end{macrocode}
1804 % Incapable drivers.
1805 % \begin{macrocode}
1806 \else
1807 \ifnum\pIIe@mode<\z@
1808 \PackageError{pict2e}
1809 {No suitable driver specified}
1810 {You should make a default driver option in a file\MessageBreak
1811 pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}}
1812 \fi
1813 \fi
1814 % \end{macrocode}
1815 % Big switch,\label{big-switch-begin}
1816 % completed near the end of the package
1817 % (see page~\pageref{big-switch-end}).
1818 % \begin{macrocode}
1819 \ifnum\pIIe@mode>\z@
1820 % \end{macrocode}
1821 %
1822 % \subsection{Graphics operators}
1823 %
1824 % The following definitions allow the \PS\ and \PDF\ operations below
1825 % to share some of the code.
1826 % \begin{macrocode}
1827 \ifcase\pIIe@mode\relax
1828 % \end{macrocode}
1829 %
1830 % \begin{macro}{\pIIe@moveto@op}
1831 % \begin{macro}{\pIIe@lineto@op}
1832 % \begin{macro}{\pIIe@setlinewidth@op}
1833 % \begin{macro}{\pIIe@stroke@op}
1834 % \begin{macro}{\pIIe@fill@op}
1835 % \begin{macro}{\pIIe@curveto@op}
1836 % \begin{macro}{\pIIe@concat@op}
1837 % \begin{macro}{\pIIe@closepath@op}
1838 % \PS
1839 % \begin{macrocode}
1840 \or
1841 \newcommand*\pIIe@moveto@op{moveto}
1842 \newcommand*\pIIe@lineto@op{lineto}
1843 \newcommand*\pIIe@setlinewidth@op{setlinewidth}
1844 \newcommand*\pIIe@stroke@op{stroke}
1845 \newcommand*\pIIe@fill@op{fill}
1846 \newcommand*\pIIe@curveto@op{curveto}
1847 \newcommand*\pIIe@concat@op{concat}
1848 \newcommand*\pIIe@closepath@op{closepath}
1849 % \end{macrocode}
1850 % \end{macro}
1851 % \end{macro}
1852 % \end{macro}
1853 % \end{macro}
1854 % \end{macro}
1855 % \end{macro}
1856 % \end{macro}
1857 % \end{macro}
1858 %
1859 % \begin{macro}{\pIIe@moveto@op}
1860 % \begin{macro}{\pIIe@lineto@op}
1861 % \begin{macro}{\pIIe@setlinewidth@op}
1862 % \begin{macro}{\pIIe@stroke@op}
1863 % \begin{macro}{\pIIe@fill@op}
1864 % \begin{macro}{\pIIe@curveto@op}
1865 % \begin{macro}{\pIIe@concat@op}
1866 % \begin{macro}{\pIIe@closepath@op}
1867 % \PDF
1868 % \begin{macrocode}
1869 \or
1870 \newcommand*\pIIe@moveto@op{m}
1871 \newcommand*\pIIe@lineto@op{l}
1872 \newcommand*\pIIe@setlinewidth@op{w}
1873 \newcommand*\pIIe@stroke@op{S}
1874 \newcommand*\pIIe@fill@op{f}
1875 \newcommand*\pIIe@curveto@op{c}
1876 \newcommand*\pIIe@concat@op{cm}
1877 \newcommand*\pIIe@closepath@op{h}
1878 % \end{macrocode}
1879 % \end{macro}
1880 % \end{macro}
1881 % \end{macro}
1882 % \end{macro}
1883 % \end{macro}
1884 % \end{macro}
1885 % \end{macro}
1886 % \end{macro}
1887 %
1888 % \noindent
1889 % (Currently, there are no other modes.)
1890 % \begin{macrocode}
1891 \fi
1892 % \end{macrocode}
1893 %
1894 % \subsection{Low-level operations}
1895 %
1896 % \subsubsection{Collecting the graphics instructions and handling the output}
1897 %
1898 % \begin{macro}{\pIIe@GRAPH}
1899 % \begin{macro}{\pIIe@addtoGraph}
1900 % \changes{v0.1h}{2003/08/27}{Added newline code (to be improved eventually).
1901 % (RN,HjG)}
1902 % We collect all \PS\slash\PDF\ output code for a single picture
1903 % object in a token register.
1904 % \begin{macrocode}
1905 \@ifdefinable\pIIe@GRAPH{\newtoks\pIIe@GRAPH}
1906 \newcommand*\pIIe@addtoGraph[1]{%
1907 \begingroup
1908 \edef\x{\the\pIIe@GRAPH\space#1}%
1909 \global\pIIe@GRAPH\expandafter{\x}%
1910 \endgroup}
1911 % \end{macrocode}
1912 % \end{macro}
1913 % \end{macro}
1914 %
1915 % \begin{macro}{\pIIe@fillGraph}
1916 % The path will either be filled \dots
1917 % \begin{macrocode}
1918 \newcommand*\pIIe@fillGraph{\begingroup \@tempswatrue\pIIe@drawGraph}
1919 % \end{macrocode}
1920 % \end{macro}
1921 %
1922 % \begin{macro}{\pIIe@strokeGraph}
1923 % \dots\ or stroked.
1924 % \begin{macrocode}
1925 \newcommand*\pIIe@strokeGraph{\begingroup \@tempswafalse\pIIe@drawGraph}
1926 % \end{macrocode}
1927 % \end{macro}
1928 %
1929 % \begin{macro}{\pIIe@drawGraph}
1930 % Common code.
1931 % When we are done with collecting the path of the picture object, we
1932 % output the contents of the token register.
1933 %
1934 % \changes{v0.1d}{2003/07/22}{``gsave/grestore'' added. (RN)}
1935 % \changes{v0.1g}{2003/08/23}{``gsave/grestore'' removed. (RN)}
1936 % \changes{v0.1i}{2003/08/28}{``gsave/grestore'' restored for PDF
1937 % (see `p2e-drivers.dtx'). (RN)}
1938 % \begin{macrocode}
1939 \newcommand*\pIIe@drawGraph{%
1940 \edef\x{\pIIe@debug@comment\space
1941 % \end{macrocode}
1942 % Instead of scaling individual coordinates, we scale the graph as a whole
1943 % (pt$\rightarrow$bp);
1944 % see Section~\ref{sec:implementation:transformations}.
1945 % \begin{macrocode}
1946 \pIIe@scale@PTtoBP}%
1947 \if@tempswa
1948 \edef\y{\pIIe@fill@op}%
1949 \else
1950 \edef\x{\x\space
1951 \strip@pt\@wholewidth\space\pIIe@setlinewidth@op
1952 \pIIe@linecap\pIIe@linejoin\space}%
1953 \edef\y{\pIIe@stroke@op}%
1954 \fi
1955 \expandafter\pIIe@code\expandafter{%
1956 \expandafter\x\the\pIIe@GRAPH\space\y}%
1957 % \end{macrocode}
1958 % \changes{v0.1u}{2003/11/19}{Clear current point after output (HjG)}
1959 % Clear the graph and the current point after output.
1960 % \begin{macrocode}
1961 \global\pIIe@GRAPH{}\xdef\pIIe@CPx{}\xdef\pIIe@CPy{}%
1962 \endgroup}
1963 % \end{macrocode}
1964 % \end{macro}
1965 %
1966 % \subsubsection{Auxilliary macros}
1967 %
1968 % The following macros save us a plethora of tokens in subsequent code.
1969 %
1970 % Note that since we are using \cmd{\@tempdima} and \cmd{\@tempdimb}
1971 % both here and in medium-level macros below, we must be careful not
1972 % to spoil their values.
1973 %
1974 % \begin{macro}{\pIIe@CPx}
1975 % \begin{macro}{\pIIe@CPy}
1976 % \begin{macro}{\pIIe@add@CP}
1977 % \changes{v0.1u}{2003/11/21}{%
1978 % Rename \cmd{\pIIe@add@XY} to \cmd{\pIIe@add@CP} (HjG)}
1979 % The lengths (coordinates) given as arguments will be stored as
1980 % ``real'' numbers using the common trick; i.e., they are put in
1981 % `dimen' registers, scaled by $2^{16}$.
1982 % At the same time, we remember the ``current point.''
1983 % (Not strictly necessary for \PS, but for some operations in \PDF,
1984 % e.g., \textsl{rcurveto} emulation.)
1985 % \begin{macrocode}
1986 \newcommand*\pIIe@CPx{} \newcommand*\pIIe@CPy{}
1987 \newcommand*\pIIe@add@CP[2]{%
1988 \begingroup
1989 \@tempdima#1\xdef\pIIe@CPx{\the\@tempdima}%
1990 \@tempdimb#2\xdef\pIIe@CPy{\the\@tempdimb}%
1991 \pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}%
1992 \endgroup}
1993 % \end{macrocode}
1994 % \end{macro}
1995 % \end{macro}
1996 % \end{macro}
1997 %
1998 % \begin{macro}{\pIIe@add@nums}
1999 % Similar, but does not set the ``current point.''
2000 % Values need not be coordinates (e.g., may be scaling factors, etc.).
2001 % \begin{macrocode}
2002 \newcommand*\pIIe@add@nums[2]{%
2003 \begingroup
2004 \@tempdima#1\relax
2005 \@tempdimb#2\relax
2006 \pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}%
2007 \endgroup}
2008 % \end{macrocode}
2009 % \end{macro}
2010 %
2011 % \begin{macro}{\pIIe@add@num}
2012 % Likewise, for a single argument.
2013 % \begin{macrocode}
2014 \newcommand*\pIIe@add@num[1]{%
2015 \begingroup
2016 \@tempdima#1\relax
2017 \pIIe@addtoGraph{\strip@pt\@tempdima}%
2018 \endgroup}
2019 % \end{macrocode}
2020 % \end{macro}
2021 %
2022 % \subsection{Medium-level operations}
2023 %
2024 % \subsubsection{Transformations}
2025 % \label{sec:implementation:transformations}
2026 %
2027 % Transformation operators; not all are currently used.
2028 % (Hence, some are untested.)
2029 %
2030 % \begin{macro}{\pIIe@PTtoBP}
2031 % Scaling factor, used below.
2032 % ``pt$\rightarrow$bp'' ($72 / 72.27 \approx 0.99626401$).
2033 % Note the trailing space!
2034 % (Don't delete it, it saves us some tokens.)
2035 % \begin{macrocode}
2036 \newcommand*\pIIe@PTtoBP{0.99626401 }
2037 % \end{macrocode}
2038 % \end{macro}
2039 %
2040 % \begin{macrocode}
2041 \ifcase\pIIe@mode\relax
2042 % \end{macrocode}
2043 %
2044 % \begin{macro}{\pIIe@concat}
2045 % \begin{macro}{\pIIe@translate}
2046 % \begin{macro}{\pIIe@rotate}
2047 % \begin{macro}{\pIIe@scale}
2048 % \begin{macro}{\pIIe@scale@PTtoBP}
2049 % \PS: Use some operators directly.
2050 % \begin{macrocode}
2051 \or
2052 \newcommand*\pIIe@concat[6]{%
2053 \begingroup
2054 \pIIe@addtoGraph{[}%
2055 \@tempdima#1\relax \@tempdimb#2\relax
2056 \pIIe@add@nums\@tempdima\@tempdimb
2057 \@tempdima#3\relax \@tempdimb#4\relax
2058 \pIIe@add@nums\@tempdima\@tempdimb
2059 \@tempdima#5\relax \@tempdimb#6\relax
2060 \pIIe@add@nums\@tempdima\@tempdimb
2061 \pIIe@addtoGraph{] \pIIe@concat@op}%
2062 \endgroup}
2063 \newcommand*\pIIe@translate[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{translate}}
2064 \newcommand*\pIIe@rotate[1]{\pIIe@add@num{#1}\pIIe@addtoGraph{rotate}}
2065 \newcommand*\pIIe@scale[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{scale}}
2066 \newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP \pIIe@PTtoBP scale}
2067 % \end{macrocode}
2068 % \end{macro}
2069 % \end{macro}
2070 % \end{macro}
2071 % \end{macro}
2072 % \end{macro}
2073 %
2074 % \begin{macro}{\pIIe@concat}
2075 % \begin{macro}{\pIIe@translate}
2076 % \begin{macro}{\pIIe@rotate}
2077 % \begin{macro}{\pIIe@scale}
2078 % \begin{macro}{\pIIe@scale@PTtoBP}
2079 % \PDF: Emulate. \mbox{\texttt{:-(}}
2080 % \begin{macrocode}
2081 \or
2082 \newcommand*\pIIe@concat[6]{%
2083 \begingroup
2084 \@tempdima#1\relax \@tempdimb#2\relax
2085 \pIIe@add@nums\@tempdima\@tempdimb
2086 \@tempdima#3\relax \@tempdimb#4\relax
2087 \pIIe@add@nums\@tempdima\@tempdimb
2088 \@tempdima#5\relax \@tempdimb#6\relax
2089 \pIIe@add@nums\@tempdima\@tempdimb
2090 \pIIe@addtoGraph\pIIe@concat@op
2091 \endgroup}
2092 \newcommand*\pIIe@translate[2]{\pIIe@concat\p@\z@\z@\p@{#1}{#2}}
2093 \newcommand*\pIIe@rotate[1]{%
2094 \begingroup
2095 \@tempdima#1\relax
2096 \edef\pIIe@tempa{\strip@pt\@tempdima}%
2097 \CalculateSin\pIIe@tempa
2098 \CalculateCos\pIIe@tempa
2099 \edef\pIIe@tempb{\UseSin\pIIe@tempa}%
2100 \edef\pIIe@tempc{\UseCos\pIIe@tempa}%
2101 \pIIe@concat{\pIIe@tempc\p@}{\pIIe@tempb\p@}%
2102 {-\pIIe@tempb\p@}{\pIIe@tempc\p@}\z@\z@
2103 \endgroup}
2104 \newcommand*\pIIe@scale[2]{\pIIe@concat{#1}\z@\z@{#2}\z@\z@}
2105 \newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP 0 0 \pIIe@PTtoBP 0 0 \pIIe@concat@op}
2106 % \end{macrocode}
2107 % \end{macro}
2108 % \end{macro}
2109 % \end{macro}
2110 % \end{macro}
2111 % \end{macro}
2112 %
2113 % \noindent
2114 % (Currently, there are no other modes.)
2115 % \begin{macrocode}
2116 \fi
2117 % \end{macrocode}
2118 %
2119 % \subsubsection{Path definitions}
2120 % \label{sec:implementation:path-definitions}
2121 %
2122 % \begin{macro}{\pIIe@moveto}
2123 % Simple things \dots
2124 % \begin{macrocode}
2125 \newcommand*\pIIe@moveto[2]{%
2126 \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@moveto@op}
2127 % \end{macrocode}
2128 % \end{macro}
2129 %
2130 % \begin{macro}{\pIIe@lineto}
2131 % \dots\ have to be defined, too.
2132 % \begin{macrocode}
2133 \newcommand*\pIIe@lineto[2]{%
2134 \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@lineto@op}
2135 % \end{macrocode}
2136 % \end{macro}
2137 %
2138 % \noindent
2139 % We'll use \cmd{\pIIe@rcurveto} to draw quarter circles.
2140 % (\cmd{\circle} and \cmd{\oval}).
2141 % \begin{macrocode}
2142 \ifcase\pIIe@mode\relax
2143 % \end{macrocode}
2144 %
2145 % \begin{macro}{\pIIe@rcurveto}
2146 % \PS:
2147 % Use the ``rcurveto'' operator directly.
2148 % \begin{macrocode}
2149 \or
2150 \newcommand*\pIIe@rcurveto[6]{%
2151 \begingroup
2152 \@tempdima#1\relax \@tempdimb#2\relax
2153 \pIIe@add@nums\@tempdima\@tempdimb
2154 \@tempdima#3\relax \@tempdimb#4\relax
2155 \pIIe@add@nums\@tempdima\@tempdimb
2156 \@tempdima#5\relax \@tempdimb#6\relax
2157 \pIIe@add@CP\@tempdima\@tempdimb
2158 \pIIe@addtoGraph{rcurveto}%
2159 \endgroup}
2160 % \end{macrocode}
2161 % \end{macro}
2162 %
2163 % \begin{macro}{\pIIe@rcurveto}
2164 % \PDF:
2165 % It's necessary to emulate the \PS\ operator ``rcurveto''.
2166 % For this, the ``current point'' must be known, i.e., all macros which
2167 % change the ``current point'' must set \cmd{\pIIe@CPx} and
2168 % \cmd{\pIIe@CPy}.
2169 % \begin{macrocode}
2170 \or
2171 \newcommand*\pIIe@rcurveto[6]{%
2172 \begingroup
2173 \@tempdima#1\advance\@tempdima\pIIe@CPx\relax
2174 \@tempdimb#2\advance\@tempdimb\pIIe@CPy\relax
2175 \pIIe@add@nums\@tempdima\@tempdimb
2176 \@tempdima#3\advance\@tempdima\pIIe@CPx\relax
2177 \@tempdimb#4\advance\@tempdimb\pIIe@CPy\relax
2178 \pIIe@add@nums\@tempdima\@tempdimb
2179 \@tempdima#5\advance\@tempdima\pIIe@CPx\relax
2180 \@tempdimb#6\advance\@tempdimb\pIIe@CPy\relax
2181 \pIIe@add@CP\@tempdima\@tempdimb
2182 \pIIe@addtoGraph\pIIe@curveto@op
2183 \endgroup}
2184 % \end{macrocode}
2185 % \end{macro}
2186 %
2187 % \noindent
2188 % (Currently, there are no other modes.)
2189 % \begin{macrocode}
2190 \fi
2191 % \end{macrocode}
2192 %
2193 % \begin{macro}{\pIIe@curveto}
2194 % This is currently only used for Bezier curves and for drawing the
2195 % heads of \LaTeX-like arrows.
2196 % Note: It's the same for \PS\ and \PDF.
2197 % \begin{macrocode}
2198 \newcommand*\pIIe@curveto[6]{%
2199 \begingroup
2200 \@tempdima#1\relax \@tempdimb#2\relax
2201 \pIIe@add@nums\@tempdima\@tempdimb
2202 \@tempdima#3\relax \@tempdimb#4\relax
2203 \pIIe@add@nums\@tempdima\@tempdimb
2204 \@tempdima#5\relax \@tempdimb#6\relax
2205 \pIIe@add@CP\@tempdima\@tempdimb
2206 \pIIe@addtoGraph\pIIe@curveto@op
2207 \endgroup}
2208 % \end{macrocode}
2209 % \end{macro}
2210 %
2211 % \begin{macro}{\pIIe@closepath}
2212 % \begin{macrocode}
2213 \newcommand*\pIIe@closepath{\pIIe@addtoGraph\pIIe@closepath@op}
2214 % \end{macrocode}
2215 % \end{macro}
2216 %
2217 % \subsection{``Pythagorean Addition'' and Division}
2218 %
2219 % \begin{macro}{\pIIe@pyth}
2220 % This algorithm is copied from the \PiCTeX\ package
2221 % \cite{PICTEX} by Michael Wichura, with his permission
2222 % ^^A (cite Email!?).
2223 %
2224 % Here is his description:
2225 % \begin{quote}
2226 % Suppose $x>0$, $y>0$.
2227 % Put $s = x+y$. Let $z = (x^2+y^2)^{1/2}$.
2228 % Then $z = s\times f$, where
2229 % \[
2230 % f = (t^2 + (1-t)^2)^{1/2} = ((1+\tau^2)/2)^{1/2}
2231 % \]
2232 % and $t = x/s$ and $\tau = 2(t-1/2)$.
2233 % \end{quote}
2234 % \changes{v0.2r}{2005/07/15}{Two wrong global assignments changed. (RN)}
2235 % \begin{macrocode}
2236 \newcommand*\pIIe@pyth[3]{%
2237 \begingroup
2238 \@tempdima=#1\relax
2239 % \end{macrocode}
2240 % $\cmd{\@tempdima}=\mathrm{abs}(x)$
2241 % \begin{macrocode}
2242 \ifnum\@tempdima<\z@\@tempdima=-\@tempdima\fi
2243 \@tempdimb=#2\relax
2244 % \end{macrocode}
2245 % $\cmd{\@tempdimb}=\mathrm{abs}(y)$
2246 % \begin{macrocode}
2247 \ifnum\@tempdimb<\z@\@tempdimb=-\@tempdimb\fi
2248 % \end{macrocode}
2249 % $\cmd{\@tempdimb} = s = \mathrm{abs}(x)+\mathrm{abs}(y)$
2250 % \begin{macrocode}
2251 \advance\@tempdimb\@tempdima
2252 \ifnum\@tempdimb=\z@
2253 % \end{macrocode}
2254 % $\cmd{\@tempdimc} = z = \sqrt{(x^2+y^2)}$
2255 % \begin{macrocode}
2256 \@tempdimc=\z@
2257 \else
2258 % \end{macrocode}
2259 % $\cmd{\@tempdima} = 8 \times\mathrm{abs}(x)$
2260 % \begin{macrocode}
2261 \multiply\@tempdima 8\relax
2262 % \end{macrocode}
2263 % $\cmd{\@tempdimc} = 8\,t = 8 \times\mathrm{abs}(x) / s$
2264 % \begin{macrocode}
2265 \pIIe@divide\@tempdima\@tempdimb\@tempdimc
2266 % \end{macrocode}
2267 % $\cmd{\@tempdimc} = 4\tau = (8\,t-4)$
2268 % \begin{macrocode}
2269 \advance\@tempdimc -4pt
2270 \multiply\@tempdimc 2
2271 \edef\pIIe@tempa{\strip@pt\@tempdimc}%
2272 % \end{macrocode}
2273 % $\cmd{\@tempdima} = (8\,\tau)^2$
2274 % \begin{macrocode}
2275 \@tempdima=\pIIe@tempa\@tempdimc
2276 % \end{macrocode}
2277 % $\cmd{\@tempdima} = [64+(8\,\tau)^2]/2 =(8\,f)^2$
2278 % \begin{macrocode}
2279 \advance\@tempdima 64pt
2280 \divide\@tempdima 2\relax
2281 % \end{macrocode}
2282 % initial guess at $\sqrt{(u)}$
2283 % \begin{macrocode}
2284 \@dashdim=7pt
2285 % \end{macrocode}
2286 % $\cmd{\@dashdim} = \sqrt{(u)}$
2287 % \begin{macrocode}
2288 \pIIe@@pyth\pIIe@@pyth\pIIe@@pyth
2289 \edef\pIIe@tempa{\strip@pt\@dashdim}%
2290 \@tempdimc=\pIIe@tempa\@tempdimb
2291 % \end{macrocode}
2292 % $\cmd{\@tempdimc} = z = (8\,f)\times s / 8$
2293 % \begin{macrocode}
2294 \global\divide\@tempdimc 8
2295 \fi
2296 \edef\x{\endgroup#3=\the\@tempdimc}%
2297 \x}
2298 % \end{macrocode}
2299 % \end{macro}
2300 %
2301 % \begin{macro}{\pIIe@@pyth}
2302 % $\cmd{\@dashdim} = g \leftarrow (g + u/g)/2$
2303 % \begin{macrocode}
2304 \newcommand*\pIIe@@pyth{%
2305 \pIIe@divide\@tempdima\@dashdim\@tempdimc
2306 \advance\@dashdim\@tempdimc
2307 \divide\@dashdim\tw@}
2308 % \end{macrocode}
2309 % \end{macro}
2310 %
2311 % \begin{macro}{\pIIe@divide}
2312 % The following macro for division is a slight modification of the macro from
2313 % \texttt{curve2e} by Claudio Beccari with his permission.
2314 % Real numbers are represented as dimens in \texttt{pt}.
2315 % \begin{macrocode}
2316 \newcommand*\pIIe@divide[3]{%
2317 % \end{macrocode}
2318 % All definitions inside a group.
2319 % \begin{macrocode}
2320 \begingroup
2321 \dimendef\Numer=254\relax \dimendef\Denom=252\relax
2322 \countdef\Num=254\relax \countdef\Den=252\relax
2323 \countdef\I=250\relax \countdef\Numb=248\relax
2324 \Numer #1\relax \Denom #2\relax
2325 % \end{macrocode}
2326 % Make numerator and denominator nonnegative, save sign.
2327 % \begin{macrocode}
2328 \ifdim\Denom<\z@ \Denom -\Denom \Numer=-\Numer \fi
2329 \ifdim\Numer<\z@ \def\sign{-}\Numer=-\Numer \else \def\sign{}\fi
2330 % \end{macrocode}
2331 % Use \cmd{\maxdimen} for $x/0$ (this should not appear).
2332 % \begin{macrocode}
2333 \ifdim\Denom=\z@
2334 \edef\Q{\strip@pt\maxdimen}%
2335 \PackageWarning{pict2e}%
2336 {Division by 0, \sign\strip@pt\maxdimen\space used}{}%
2337 \else
2338 % \end{macrocode}
2339 % Converse to integers and find integer part of the ratio. If it is too
2340 % large (dimension overflow), use \cmd{\maxdimen} otherwise find the
2341 % remainder and start the iteration process to find 6 digits of the decimal
2342 % expression.
2343 % \begin{macrocode}
2344 \Num=\Numer \Den=\Denom
2345 \Numb=\Num \divide\Numb\Den
2346 \ifnum\Numb>16383
2347 \edef\Q{\strip@pt\maxdimen}%
2348 \PackageWarning{pict2e}%
2349 {Division overflow, \sign\strip@pt\maxdimen\space used}{}%
2350 \else
2351 \edef\Q{\number\Numb.}%
2352 \multiply \Numb\Den \advance\Num -\Numb
2353 \I=6\relax
2354 \@whilenum \I>\z@ \do{\pIIe@@divide\advance\I\m@ne}%
2355 \fi
2356 \fi
2357 % \end{macrocode}
2358 % A useful trick to define \#3 outside the group without using \cmd{\global}
2359 % (if the macro is used inside another group.)
2360 % \begin{macrocode}
2361 \edef\tempend{\noexpand\endgroup\noexpand#3=\sign\Q\p@}%
2362 \tempend}
2363 % \end{macrocode}
2364 % \end{macro}
2365 %
2366 % \begin{macro}{\pIIe@@divide}
2367 % Iteration macro for finding decimal expression of the ratio. \cmd{\Num} is
2368 % the remainder of the previous division, \cmd{\Den} is the denominator (both
2369 % are integers).
2370 % \begin{macrocode}
2371 \def\pIIe@@divide{%
2372 % \end{macrocode}
2373 % Reduce both numerator and denominator if necessary to avoid overflow in
2374 % the next step.
2375 % \begin{macrocode}
2376 \@whilenum \Num>214748364 \do{\divide\Num\tw@ \divide\Den\tw@}%
2377 % \end{macrocode}
2378 % Find the next digit of the decimal expression.
2379 % \begin{macrocode}
2380 \multiply \Num 10
2381 \Numb=\Num \divide\Numb\Den
2382 \edef\Q{\Q\number\Numb}%
2383 % \end{macrocode}
2384 % Find the remainder.
2385 % \begin{macrocode}
2386 \multiply \Numb\Den \advance \Num -\Numb
2387 % \end{macrocode}
2388 % Stop the iteration if the remainder is zero.
2389 % \begin{macrocode}
2390 \ifnum\Num>\z@\else\I=0\fi}
2391 % \end{macrocode}
2392 % \end{macro}
2393 %
2394 % \subsection{High-level operations}
2395 %
2396 % \begin{macro}{\pIIe@checkslopeargs}
2397 % \changes{v0.3c}{2019/08/20}{\cmd{\edef} for parameters stored in macros --
2398 % suggested by Phelype Oleinik (RN)}
2399 % Common code for \cmd{\line} and \cmd{\vector}.
2400 % \begin{macrocode}
2401 \newcommand*\pIIe@checkslopeargsline[2]{%
2402 \pIIe@checkslopeargs{#1}{#2}{16383}}
2403 \newcommand*\pIIe@checkslopeargsvector[2]{%
2404 \pIIe@checkslopeargs{#1}{#2}{1000}}
2405 \newcommand*\pIIe@checkslopeargs[3]{%
2406 \edef\@tempa{#1}\expandafter\pIIe@checkslopearg\@tempa.:{#3}%
2407 \edef\@tempa{#2}\expandafter\pIIe@checkslopearg\@tempa.:{#3}%
2408 % \end{macrocode}
2409 % A bit incompatible with \SL: slope \((0,0)\) raises an error.
2410 % \begin{macrocode}
2411 \ifdim #1\p@=\z@ \ifdim #2\p@=\z@ \@badlinearg \fi\fi}
2412 \def\pIIe@checkslopearg #1.#2:#3{%
2413 \def\@tempa{#1}%
2414 \ifx\@tempa\empty\def\@tempa{0}\fi
2415 \ifx\@tempa\space\def\@tempa{0}\fi
2416 \ifnum\ifnum\@tempa<\z@-\fi\@tempa>#3 \@badlinearg \fi}
2417 \def\@badlinearg{\PackageError
2418 {pict2e}{Bad \protect\line\space or \protect\vector\space argument}{}}
2419 % \end{macrocode}
2420 % \end{macro}
2421 %
2422 % \subsubsection{Line}
2423 % \label{sec:implementation:line}
2424 %
2425 % \begin{macro}{\line}
2426 % \changes{v0.2l}{2004/04/08}{Macro added (RN/HjG)}
2427 % \cmd{\line}\parg{x,y}\marg{$l_x$}:
2428 % \changes{v0.2o}{2004/06/25}{Use \cmd{\pIIe@checkslopeargs} (HjG)}
2429 % \changes{v0.2t}{2008/05/11}{All lines by \cmd{\@sline} (JT)}
2430 % \begin{macrocode}
2431 \def\line(#1,#2)#3{%
2432 \begingroup
2433 \pIIe@checkslopeargsline{#1}{#2}%
2434 \@tempdima=#1pt\relax \@tempdimb=#2pt\relax
2435 \@defaultunitsset\@linelen{#3}\unitlength
2436 \ifdim\@linelen<\z@ \@badlinearg \else
2437 \pIIe@sline
2438 \pIIe@moveto\z@\z@
2439 \pIIe@lineto\@xdim\@ydim
2440 \pIIe@strokeGraph
2441 % \end{macrocode}
2442 % Simulated bounding box
2443 % \begin{macrocode}
2444 \box\@tempboxa
2445 \fi
2446 \endgroup}
2447 % \end{macrocode}
2448 % \end{macro}
2449 % \begin{macro}{\pIIe@sline}
2450 % Common code for \cmd{\line} and \cmd{\vector}.
2451 % \changes{v0.3d}{2020/06/13}{Simulated bounding boxes for \cmd{\line}
2452 % and \cmd{\vector} suggested by Donald Arseneau (RN)}
2453 % \begin{macrocode}
2454 \newcommand*\pIIe@sline{%
2455 % \end{macrocode}
2456 % Calculation of the endpoints \cmd{\@xdim}, \cmd{\@ydim}
2457 % (used for \cmd{\line} only).
2458 % \begin{macrocode}
2459 \ifdim\@tempdima=\z@
2460 \ifdim\@tempdimb<\z@\@linelen-\@linelen\fi
2461 \@ydim=\@linelen
2462 \@xdim=\z@
2463 \else
2464 \ifdim\@tempdima<\z@\@linelen-\@linelen\fi
2465 \ifdim\@tempdimb=\z@
2466 \@xdim=\@linelen
2467 \@ydim=\z@
2468 \else
2469 \pIIe@divide\@tempdimb\@tempdima\dimen@
2470 \@ydim=\strip@pt\dimen@\@linelen
2471 \@xdim=\@linelen
2472 \fi
2473 \fi
2474 % \end{macrocode}
2475 % Prepare a box that can be used as a bounding box for \cmd{\line} and
2476 % \cmd{\vector} to achieve the same behavior as standard \LaTeX\ outside
2477 % of a picture environment.
2478 % \begin{macrocode}
2479 \@ovxx=\ifnum\@xdim=\z@ \z@\else\@linelen\fi
2480 \@ovyy=\ifnum\@ydim<\z@ \z@\else\@ydim\fi
2481 \@ovdy=\ifnum\@ydim<\z@ -\@ydim\else\z@\fi
2482 \setbox\@tempboxa\hbox{%
2483 \vrule\@height \@ovyy \@depth \@ovdy \@width \z@
2484 \vrule\@height \z@ \@depth \z@ \@width \@ovxx}}
2485 % \end{macrocode}
2486 % \end{macro}
2487 % \subsubsection{Vector}
2488 % \label{sec:implementation:vector}
2489 %
2490 % \begin{macro}{\vector}
2491 % Unlike \cmd{\line}, \cmd{\vector} must be redefined, because
2492 % the kernel version checks for illegal slope arguments.
2493 %
2494 % \cmd{\vector}\parg{x,y}\marg{$l_x$}:
2495 % Instead of calculating \(\theta = \arctan \frac{y}{x}\), we use
2496 % ``pythagorean addition''~\cite{PICTEX}
2497 % to determine \(s=\sqrt{x^2+y^2}\) and to obtain the length
2498 % of the vector \(l = l_x \cdot \frac{s}{x}\)
2499 % and the values of \(\sin \theta = \frac{y}{s}\) and
2500 % \(\cos \theta = \frac{x}{s}\) for the rotation of the coordinate system.
2501 % ^^A (This is faster; is it more accurate?)
2502 % \changes{v0.2o}{2004/06/25}{Use \cmd{\pIIe@checkslopeargs} (HjG)}
2503 % \begin{macrocode}
2504 \def\vector(#1,#2)#3{%
2505 \begingroup
2506 \pIIe@checkslopeargsvector{#1}{#2}%
2507 \@tempdima=#1pt\relax \@tempdimb=#2pt\relax
2508 \@defaultunitsset\@linelen{#3}\unitlength
2509 \ifdim\@linelen<\z@ \@badlinearg \else
2510 \pIIe@sline
2511 \@defaultunitsset\@linelen{#3}\unitlength
2512 \pIIe@pyth{\@tempdima}{\@tempdimb}\dimen@
2513 \ifdim\@tempdima=\z@ \else
2514 \ifdim\@tempdimb=\z@ \else
2515 % \end{macrocode}
2516 % This calculation is only necessary, if the vector is actually
2517 % sloped.
2518 % \begin{macrocode}
2519 \pIIe@divide\dimen@{\@tempdima}\@xdim
2520 \@linelen\strip@pt\@xdim\@linelen
2521 \ifdim\@linelen<\z@\@linelen-\@linelen\fi
2522 \fi
2523 \fi
2524 % \end{macrocode}
2525 % \BigIndent $\sin\theta$ and $\cos\theta$
2526 % \begin{macrocode}
2527 \pIIe@divide{\@tempdimb}\dimen@\@ydim
2528 \pIIe@divide{\@tempdima}\dimen@\@xdim
2529 % \end{macrocode}
2530 % Rotate the following vector\slash arrow outlines by angle $\theta$:\par
2531 % \BigIndent
2532 % $\cos{\theta}$\quad$\sin{\theta}$\quad$-\sin{\theta}$\quad$\cos{\theta}$\quad $0\quad 0$
2533 % \begin{macrocode}
2534 \pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@
2535 % \end{macrocode}
2536 % Internal command to draw the outline of the vector\slash arrow.
2537 % \begin{macrocode}
2538 \pIIe@vector
2539 \pIIe@fillGraph
2540 % \end{macrocode}
2541 % Simulated bounding box
2542 % \begin{macrocode}
2543 \box\@tempboxa
2544 \fi
2545 \endgroup}
2546 % \end{macrocode}
2547 % \end{macro}
2548 %
2549 % \begin{macro}{\pIIe@vector}
2550 % \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
2551 % This command should be \cmd{\def}'ed or \cmd{\let} to a macro
2552 % that generates the vector's outline path.
2553 % Now initialized by package options, via |\AtEndOfPackage|.
2554 % \begin{macrocode}
2555 \newcommand*\pIIe@vector{}
2556 % \end{macrocode}
2557 % \end{macro}
2558 %
2559 %
2560 % \paragraph{\LaTeX\ version}
2561 %
2562 % The arrows drawn by the variant generated by the \textsf{ltxarrows}
2563 % package option are
2564 % modeled after those in the fonts used by the \SL\ version of the
2565 % picture commands (|ltpictur.dtx|).
2566 % ^^A line10 linew10
2567 % See Figure~\ref{fig:vector:ltx}.
2568 %
2569 % \begin{figure}
2570 % \setlength\unitlength{.0067\linewidth}\hfill
2571 % \makebox[0pt][r]{^^A
2572 % \begin{minipage}[c]{17em}^^A
2573 % \unboldmath\small
2574 % \setlength\arraycolsep{.5\arraycolsep}^^A
2575 % \begin{eqnarray*}
2576 % L & = & \cmd{\@linelen} \\
2577 % W & = & \cmd{\@wholewidth} = 2\times\cmd{\@halfwidth} \\
2578 % AW & = & \cmd{\pIIe@FAW}\times W + \cmd{\pIIe@CAW} \\
2579 % AL & = & \cmd{\pIIe@FAL}\times AW \\
2580 % IN & = & \cmd{\pIIe@FAI}\times AW / 2
2581 % \end{eqnarray*}
2582 % \end{minipage}}^^A
2583 % \hspace{\marginparsep}
2584 % \begin{minipage}[c]{105\unitlength}^^A
2585 % \rule{\linewidth}{0pt}
2586 % \begin{picture}(105,55)(0,-25)
2587 % \boldmath\bfseries
2588 % \THICKLINES
2589 % \put(100,0){\FPOINT} \put(101,-1){$P_1$}
2590 % ^^A \makeatletter
2591 % ^^A \pIIe@addtoGraph{^^J^^J\@percentchar\space >>> HUGO <<<^^J}^^A
2592 % ^^A \makeatother
2593 % \CBEZIER{100,0}{86.67,-1.67}{73.33,-8.33}{60,-20}^^A P1--P2
2594 % \put(60,-20){\FPOINT} \put(61,-23){$P_2$}
2595 % \put(60,-20){\line(0,1){10}}^^A P2--P3
2596 % \put(60,-10){\FPOINT} \put(61,-9){$P_3$}
2597 % \put(60,-10){\line(-1,0){60}}^^A P3--P4
2598 % \put(0,-10){\FPOINT} \put(1,-8){$P_4$}
2599 % \put(0,-10){\line(0,1){20}}^^A P4--P5
2600 % \put(0,10){\FPOINT} \put(1,6){$P_5$}
2601 % \put(0,10){\line(1,0){60}}^^A P5--P6
2602 % \put(60,10){\FPOINT} \put(61,7){$P_6$}
2603 % \put(60,10){\line(0,1){10}}^^A P6--P7
2604 % \put(60,20){\FPOINT} \put(61,21){$P_7$}
2605 % ^^A \makeatletter
2606 % ^^A \pIIe@addtoGraph{^^J^^J\@percentchar\space >>> HUGO <<<^^J}^^A
2607 % ^^A \makeatother
2608 % \CBEZIER{60,20}{73.33,8.33}{86.67,1.67}{100,0}^^A P7--P1
2609 % \thinlines
2610 % \put(100,0){\line(-2,-1){40}}^^A P1--P2
2611 % \put(60,20){\line(2,-1){40}}^^A P7--P1
2612 % ^^A
2613 % \put(93,-8){$P_a$}
2614 % \put(93,-6){\line(-3,2){6}}^^A
2615 % \put(80,-5){\OPOINT}
2616 % \put(73,-5){$P_m$}
2617 % \put(67,-8){$P_b$}
2618 % ^^A
2619 % \put(93,6){$P_d$}
2620 % \put(93,6){\line(-3,-2){6}}^^A
2621 % \put(80,5){\OPOINT}
2622 % \put(73,3){$P_n$}
2623 % \put(67,6){$P_c$}
2624 % ^^A
2625 % \put(-2,0){\line(1,0){4}}
2626 % \put(10,-7){\vector(-10,7){10}}\put(10,-8){$\,(0,0)$}
2627 % ^^A
2628 % \put(60,-20){\line(0,-1){5}}\put(100,0){\line(0,-1){25}}
2629 % \put(60,-25){\vector(1,0){40}}\put(100,-25){\vector(-1,0){40}}
2630 % \put(77,-24){$AL$}
2631 % ^^A
2632 % \put(0,10){\line(0,1){15}}\put(100,0){\line(0,1){25}}
2633 % \put(0,25){\vector(1,0){100}}\put(100,25){\vector(-1,0){100}}
2634 % \put(48,26){$L$}
2635 % ^^A
2636 % \put(60,-20){\line(-1,0){5}} \put(60,20){\line(-1,0){5}}
2637 % \put(55,-20){\vector(0,1){40}} \put(55,20){\vector(0,-1){40}}
2638 % \put(47,-2){$AW$}
2639 % ^^A
2640 % \put(25,-10){\vector(0,1){20}}\put(25,10){\vector(0,-1){20}}
2641 % \put(20,-2){$W$}
2642 % \put(80,-10){\line(1,0){5}} \put(80,-5){\line(1,0){5}}
2643 % \put(85,-7.5){\vector(0,-1){2.5}} \put(85,-7.5){\vector(0,1){2.5}}
2644 % \put(86,-10){$IN$}
2645 % \end{picture}
2646 % \end{minipage}
2647 % \caption[\LaTeX-like implementation of \cmd{\vector}]^^A
2648 % {Sketch of the path drawn by the \LaTeX-like implementation
2649 % of \cmd{\vector}. (Note: We are using the redefined macros of
2650 % \textsf{pict2e}!)}
2651 % \label{fig:vector:ltx}
2652 % \end{figure}
2653 %
2654 % \begin{macro}{\pIIe@vector@ltx}
2655 % \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
2656 % \changes{v0.1y}{2003/11/27}{First implementation. (RN,HjG)}
2657 % The arrow outline.
2658 % (Not yet quite the same as with \LaTeX's fonts.)
2659 %
2660 % Problem: Extrapolation.
2661 % There are only two design sizes (thicknesses) for \LaTeX's line
2662 % drawing fonts.
2663 % Where can we go from there?
2664 %
2665 % Note that only the arrow head will be drawn, if the length argument
2666 % of the \cmd{\vector} command is smaller than the calculated length
2667 % of the arrow head.
2668 % ^^A (Orig.\ \LaTeX: only, if length =~0!?)
2669 % \begin{macrocode}
2670 \newcommand*\pIIe@vector@ltx{%
2671 \@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax
2672 \@ovxx\pIIe@FAL\@ydim
2673 \@xdim\@linelen \advance\@xdim-\@ovxx
2674 \divide\@ydim\tw@
2675 \divide\@ovxx\tw@ \advance\@ovxx\@xdim
2676 \@ovyy\@ydim
2677 \divide\@ovyy\tw@ \advance\@ovyy-\pIIe@FAI\@ydim
2678 % \end{macrocode}
2679 % \noindent
2680 % \BigIndent $P_d = P_1 + 1/3 (P_n - P_1)$
2681 % \begin{macrocode}
2682 \pIIe@bezier@QtoC\@linelen\@ovxx\@ovro
2683 \pIIe@bezier@QtoC\z@\@ovyy\@ovri
2684 % \end{macrocode}
2685 % \BigIndent $P_c = P_7 + 1/3 (P_n - P_7)$
2686 % \begin{macrocode}
2687 \pIIe@bezier@QtoC\@xdim\@ovxx\@clnwd
2688 \pIIe@bezier@QtoC\@ydim\@ovyy\@clnht
2689 % \end{macrocode}
2690 % \BigIndent $P_1$
2691 % \begin{macrocode}
2692 \pIIe@moveto\@linelen\z@
2693 % \end{macrocode}
2694 % \BigIndent $P_a \quad P_b \quad P_2$
2695 % \begin{macrocode}
2696 \pIIe@curveto\@ovro{-\@ovri}\@clnwd{-\@clnht}\@xdim{-\@ydim}%
2697 \ifdim\@xdim>\z@
2698 % \end{macrocode}
2699 % \BigIndent $P_3$
2700 % \begin{macrocode}
2701 \pIIe@lineto\@xdim{-\@halfwidth}%
2702 % \end{macrocode}
2703 % \BigIndent $P_4$
2704 % \begin{macrocode}
2705 \pIIe@lineto\z@{-\@halfwidth}%
2706 % \end{macrocode}
2707 % \BigIndent $P_5$
2708 % \begin{macrocode}
2709 \pIIe@lineto\z@{\@halfwidth}%
2710 % \end{macrocode}
2711 % \BigIndent $P_6$
2712 % \begin{macrocode}
2713 \pIIe@lineto\@xdim{\@halfwidth}%
2714 \fi
2715 % \end{macrocode}
2716 % \BigIndent $P_7$
2717 % \begin{macrocode}
2718 \pIIe@lineto\@xdim\@ydim
2719 % \end{macrocode}
2720 % \BigIndent $P_c \quad P_d \quad P_1$
2721 % \begin{macrocode}
2722 \pIIe@curveto\@clnwd\@clnht\@ovro\@ovri\@linelen\z@}
2723 % \end{macrocode}
2724 % \end{macro}
2725 %
2726 % \paragraph{\PSTricks\ version}
2727 %
2728 % The arrows drawn by the variant generated by the \textsf{pstarrows}
2729 % package option are
2730 % modeled after those in the \textsf{pstricks} package~\cite{PSTRICKS}.
2731 % See Figure~\ref{fig:vector:pst}.
2732 %
2733 % \begin{figure}
2734 % \setlength\unitlength{.0067\linewidth}\hfill
2735 % \makebox[0pt][r]{^^A
2736 % \begin{minipage}[c]{17em}^^A
2737 % \unboldmath\small
2738 % \setlength\arraycolsep{.5\arraycolsep}^^A
2739 % \begin{eqnarray*}
2740 % L & = & \cmd{\@linelen} \\
2741 % W & = & \cmd{\@wholewidth} = 2\times\cmd{\@halfwidth} \\
2742 % AW & = & \cmd{\pIIe@FAW}\times W + \cmd{\pIIe@CAW} \\
2743 % AL & = & \cmd{\pIIe@FAL}\times AW \\
2744 % IN & = & \cmd{\pIIe@FAI}\times AL
2745 % \end{eqnarray*}
2746 % \end{minipage}}^^A
2747 % \hspace{\marginparsep}
2748 % \begin{minipage}[c]{105\unitlength}^^A
2749 % \rule{\linewidth}{0pt}
2750 % \begin{picture}(105,55)(0,-25)
2751 % \boldmath\bfseries
2752 % \THICKLINES
2753 % \put(100,0){\FPOINT} \put(101,-1){$P_1$}
2754 % \put(100,0){\line(-2,-1){40}}^^A P1--P2
2755 % \put(60,-20){\FPOINT} \put(61,-23){$P_2$}
2756 % \put(60,-20){\line(4,5){8}}^^A P2--P3
2757 % \put(68,-10){\FPOINT} \put(70,-11){$P_3$}
2758 % \put(68,-10){\line(-1,0){68}}^^A P3--P4
2759 % \put(0,-10){\FPOINT} \put(1,-8){$P_4$}
2760 % \put(0,-10){\line(0,1){20}}^^A P4--P5
2761 % \put(0,10){\FPOINT} \put(1,6){$P_5$}
2762 % \put(0,10){\line(1,0){68}}^^A P5--P6
2763 % \put(68,10){\FPOINT} \put(70,9){$P_6$}
2764 % \put(68,10){\line(-4,5){8}}^^A P6--P7
2765 % \put(60,20){\FPOINT} \put(61,21){$P_7$}
2766 % \put(60,20){\line(2,-1){40}}^^A P7--P1
2767 % \thinlines
2768 % \put(76,0){\FPOINT} \put(78,-1){$P_i$}
2769 % \put(68,-10){\line(4,5){8}}^^A P3--Pi
2770 % \put(68,10){\line(4,-5){8}}^^A P6--Pi
2771 % ^^A
2772 % \put(-2,0){\line(1,0){4}}
2773 % \put(10,-7){\vector(-10,7){10}}\put(10,-8){$\,(0,0)$}
2774 % ^^A
2775 % \put(60,-20){\line(0,-1){5}}\put(100,0){\line(0,-1){25}}
2776 % \put(60,-25){\vector(1,0){40}}\put(100,-25){\vector(-1,0){40}}
2777 % \put(77,-24){$AL$}
2778 % ^^A
2779 % \put(0,10){\line(0,1){15}}\put(100,0){\line(0,1){25}}
2780 % \put(0,25){\vector(1,0){100}}\put(100,25){\vector(-1,0){100}}
2781 % \put(48,26){$L$}
2782 % ^^A
2783 % \put(60,-20){\line(-1,0){5}} \put(60,20){\line(-1,0){5}}
2784 % \put(55,-20){\vector(0,1){40}} \put(55,20){\vector(0,-1){40}}
2785 % \put(47,-2){$AW$}
2786 % ^^A
2787 % \put(60,-20){\line(0,1){40}}
2788 % \put(60,0){\vector(1,0){15}}
2789 % \put(76,0){\vector(-1,0){16}}
2790 % \put(65,1){$IN$}
2791 % ^^A
2792 % \put(25,-10){\vector(0,1){20}}\put(25,10){\vector(0,-1){20}}
2793 % \put(20,-2){$W$}
2794 % \end{picture}
2795 % \end{minipage}
2796 % \caption[\PSTricks-like implementation of \cmd{\vector}]^^A
2797 % {Sketch of the path drawn by the \PSTricks-like implementation
2798 % of \cmd{\vector}. (Note: We are using the redefined macros of
2799 % \textsf{pict2e}!)}
2800 % \label{fig:vector:pst}
2801 % \end{figure}
2802 %
2803 % \begin{macro}{\pIIe@vector@pst}
2804 % \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
2805 % The arrow outline.
2806 % Note that only the arrowhead will be drawn, if the length argument
2807 % of the \cmd{\vector} command is smaller than the calculated length
2808 % of the arrow head.
2809 % ^^A (Orig.\ \LaTeX: only, if length =~0!?)
2810 % \begin{macrocode}
2811 \newcommand*\pIIe@vector@pst{%
2812 \@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax
2813 \@ovxx\pIIe@FAL\@ydim
2814 \@xdim\@linelen \advance\@xdim-\@ovxx
2815 \divide\@ydim\tw@
2816 \@ovyy\@ydim \advance\@ovyy-\@halfwidth
2817 \@ovdx\pIIe@FAI\@ovxx
2818 \pIIe@divide\@ovdx\@ydim\@tempdimc
2819 \@ovxx\strip@pt\@ovyy\@tempdimc
2820 \advance\@ovxx\@xdim
2821 \advance\@ovdx\@xdim
2822 % \end{macrocode}
2823 % \BigIndent $P_1$
2824 % \begin{macrocode}
2825 \pIIe@moveto\@linelen\z@
2826 % \end{macrocode}
2827 % \BigIndent $P_2$
2828 % \begin{macrocode}
2829 \pIIe@lineto\@xdim{-\@ydim}%
2830 \ifdim\@xdim>\z@
2831 % \end{macrocode}
2832 % \BigIndent $P_3$
2833 % \begin{macrocode}
2834 \pIIe@lineto\@ovxx{-\@halfwidth}%
2835 % \end{macrocode}
2836 % \BigIndent $P_4$
2837 % \begin{macrocode}
2838 \pIIe@lineto\z@{-\@halfwidth}%
2839 % \end{macrocode}
2840 % \BigIndent $P_5$
2841 % \begin{macrocode}
2842 \pIIe@lineto\z@{\@halfwidth}%
2843 % \end{macrocode}
2844 % \BigIndent $P_6$
2845 % \begin{macrocode}
2846 \pIIe@lineto\@ovxx{\@halfwidth}%
2847 \else
2848 % \end{macrocode}
2849 % \BigIndent $P_i$
2850 % \begin{macrocode}
2851 \pIIe@lineto\@ovdx\z@
2852 \fi
2853 % \end{macrocode}
2854 % \BigIndent $P_7$
2855 % \begin{macrocode}
2856 \pIIe@lineto\@xdim\@ydim
2857 % \end{macrocode}
2858 % \BigIndent $P_1$
2859 % \begin{macrocode}
2860 \pIIe@lineto\@linelen\z@}
2861 % \end{macrocode}
2862 % \end{macro}
2863 %
2864 % \subsubsection{Circle and Dot}
2865 % \label{sec:implementation:circle+dot}
2866 %
2867 % \begin{macro}{\@circle}
2868 % The circle will either be stroked \dots
2869 % \begin{macrocode}
2870 \def\@circle#1{\begingroup \@tempswafalse\pIIe@circ{#1}}
2871 % \end{macrocode}
2872 % \end{macro}
2873 %
2874 % \begin{macro}{\@dot}
2875 % \dots\ or filled.
2876 % \begin{macrocode}
2877 \def\@dot#1{\begingroup \@tempswatrue\pIIe@circ{#1}}
2878 % \end{macrocode}
2879 % \end{macro}
2880 %
2881 % \begin{macro}{\pIIe@circ}
2882 % Common code.
2883 % ^^A (Could\slash should be named \cmd{\@circ}!?)
2884 % \begin{macrocode}
2885 \newcommand*\pIIe@circ[1]{%
2886 % \end{macrocode}
2887 % We need the radius instead of the diameter.
2888 % Unlike \SL, we check for negative or zero diameter argument.
2889 % ^^A Useful: error check when calculating coordinates.
2890 % \changes{v0.2h}{2004/01/07}{Check for negative or zero diameter
2891 % argument (RN,HjG)}
2892 % \changes{v0.2n}{2004/04/22}{Allow zero diameter (RN/HjG)}
2893 % \begin{macrocode}
2894 \@defaultunitsset\pIIe@tempdima{#1}\unitlength
2895 \ifdim\pIIe@tempdima<\z@ \pIIe@badcircarg \fi
2896 \divide\pIIe@tempdima\tw@
2897 \pIIe@circle\pIIe@tempdima
2898 % \end{macrocode}
2899 % With the current state of affairs, we could use
2900 % \cmd{\pIIe@drawGraph} directly; but that would possibly be a case of
2901 % premature optimisation.
2902 % (Note to ourselves:
2903 % Use of the |@tempswa| switch both here and inside quarter-circle!
2904 % Hence a group is necessary there.)
2905 % \begin{macrocode}
2906 \if@tempswa \pIIe@fillGraph \else \buttcap \pIIe@strokeGraph \fi
2907 \endgroup}
2908 % \end{macrocode}
2909 % \end{macro}
2910 %
2911 % \begin{macro}{\pIIe@circle}
2912 % Approximate a full circle by four quarter circles, use the standard shape
2913 % of ends.
2914 % \changes{v0.1g}{2003/08/23}{Changed code (using%
2915 % \cmd{\pIIe@add@qcircle}). (HjG,RN)}
2916 % \changes{v0.3a}{2016/01/09}{Changed code, closepath seems to be necessary.}
2917 % \begin{macrocode}
2918 \newcommand*\pIIe@circle[1]{%
2919 \pIIe@qcircle[1]\z@{#1}\pIIe@qcircle \@ne{#1}%
2920 \pIIe@qcircle \tw@{#1}\pIIe@qcircle\thr@@{#1}\pIIe@closepath}
2921 % \end{macrocode}
2922 % \end{macro}
2923 %
2924 % \begin{macro}{\pIIe@qcircle}
2925 % \changes{v0.1u}{2003/11/21}{%
2926 % Change coding of quadrant number to match bit number in
2927 % \cmd{\pIIe@get@quadrants} (HjG)}
2928 % \changes{v0.1v}{2003/11/22}{Exchange \cmd{\@xdim} and \cmd{\@ydim} to
2929 % \cmd{\@ovri} and \cmd{\@ovro} (HjG)}
2930 % Approximate a quarter circle, using cubic Bezier splines.
2931 %
2932 % \begin{figure}
2933 % \setlength\unitlength{.0033\linewidth}\hfill
2934 % \begin{minipage}{125\unitlength}
2935 % \begin{picture}(125,122)(-13,-3)
2936 % \boldmath\bfseries
2937 % \thinlines
2938 % ^^A\put(-13,-3){\framebox(125,122){}}
2939 % \put(0,0){\OPOINT}\put(2,4){$(0,0)$}
2940 % \put(2,0){\vector(1,0){96}}\put(98,0){\vector(-1,0){96}}
2941 % \put(40,2){$radius$}
2942 % \put(0,2){\vector(0,1){96}}\put(0,98){\vector(0,-1){96}}
2943 % \put(-7,40){\rotatebox{90}{$radius$}}
2944 % \put(100,0){\FPOINT}\put(89,4){$P_0$}
2945 % \put(100,55){\OPOINT}\put(95,59){$P_1$}
2946 % \put(100,0){\line(1,0){10}}\put(102,55){\line(1,0){8}}
2947 % \put(110,0){\vector(0,1){55}}\put(110,55){\vector(0,-1){55}}
2948 % \put(104,2){{\footnotesize\rotatebox{90}{$0.5523\times radius$}}}
2949 % ^^A
2950 % \put(0,100){\line(0,1){10}}\put(55,102){\line(0,1){8}}
2951 % \put(0,110){\vector(1,0){55}}\put(55,110){\vector(-1,0){55}}
2952 % \put(2,112){{\footnotesize $0.5523\times radius$}}
2953 % ^^A
2954 % \put(55, 100){\OPOINT}\put(57,98){$P_2$}
2955 % \put(0,100){\FPOINT}\put(-12,98){$P_3$}
2956 % \THICKLINES
2957 % \cbezier(100,0)(100,55)(55,100)(0,100)
2958 % \end{picture}
2959 % \end{minipage}\hspace*{\fill}
2960 % \caption[Auxillary macro \cmd{\pIIe@qcircle}---draw a quarter circle]^^A
2961 % {Sketch of the quarter circle path drawn by \cmd{\pIIe@qcircle} (NE~quarter)}
2962 % \label{fig:qcircle}
2963 % \end{figure}
2964 %
2965 % \#1=Switch (0=no `moveto', 1=`moveto'),
2966 % \#2=Quadrant No., \#3=Radius.
2967 %
2968 % \begin{tabular}{l@{\qquad}l}
2969 % 0 = 1st Quadrant (NE) & 1 = 2nd Quadrant (NW) \\
2970 % 2 = 3rd Quadrant (SW) & 3 = 4th Quadrant (SE)
2971 % \end{tabular}
2972 %
2973 % \noindent
2974 % (\PS: We could use the \texttt{arc} operator!)
2975 %
2976 % $ 0.55228474983 = $``magic\ number'' (see~\cite{EBEZIER}).
2977 %
2978 % Sacrifice a save level (otherwise a private ``switch'' macro were
2979 % necessary!)
2980 % \begin{macrocode}
2981 \newcommand*\pIIe@qcircle[3][0]{%
2982 \begingroup
2983 \@ovro#3\relax \@ovri0.55228474983\@ovro
2984 \@tempdimc\@ovri \advance\@tempdimc-\@ovro
2985 \ifnum#1>\z@ \@tempswatrue \else \@tempswafalse \fi
2986 \ifcase#2\relax
2987 % \end{macrocode}
2988 % \BigIndent NE
2989 % \begin{macrocode}
2990 \pIIe@@qcircle\@ovro\z@\z@\@ovri\@tempdimc\@ovro{-\@ovro}\@ovro
2991 \or
2992 % \end{macrocode}
2993 % \BigIndent NW
2994 % \begin{macrocode}
2995 \pIIe@@qcircle\z@\@ovro{-\@ovri}\z@{-\@ovro}\@tempdimc{-\@ovro}{-\@ovro}%
2996 \or
2997 % \end{macrocode}
2998 % \BigIndent SW
2999 % \begin{macrocode}
3000 \pIIe@@qcircle{-\@ovro}\z@\z@{-\@ovri}{-\@tempdimc}{-\@ovro}\@ovro{-\@ovro}%
3001 \or
3002 % \end{macrocode}
3003 % \BigIndent SE
3004 % \begin{macrocode}
3005 \pIIe@@qcircle\z@{-\@ovro}\@ovri\z@\@ovro{-\@tempdimc}\@ovro\@ovro
3006 \fi
3007 \endgroup}
3008 % \end{macrocode}
3009 % \end{macro}
3010 %
3011 % \begin{macro}{\pIIe@@qcircle}
3012 % \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
3013 % Ancillary macro; saves us some tokens above.
3014 %
3015 % Note:
3016 % Use of |rcurveto| instead of |curveto| makes it possible (or at
3017 % least much easier) to re-use this macro for the rounded corners of
3018 % ovals.
3019 % \begin{macrocode}
3020 \newcommand*\pIIe@@qcircle[8]{%
3021 \if@tempswa\pIIe@moveto{#1}{#2}\fi \pIIe@rcurveto{#3}{#4}{#5}{#6}{#7}{#8}}
3022 % \end{macrocode}
3023 % \end{macro}
3024 %
3025 % \begin{macro}{\pIIe@badcircarg}
3026 % \changes{v0.2h}{2004/01/07}{New error message. (RN,HjG)}
3027 % Obvious cousin to |\@badlinearg| from the \LaTeX\ kernel.
3028 % \begin{macrocode}
3029 \newcommand*\pIIe@badcircarg{%
3030 \PackageError{pict2e}%
3031 {Illegal argument in \protect\circle(*), \protect\oval, \protect\arc(*) or
3032 \protect\circlearc.}%
3033 {The radius of a circle, dot, arc or oval corner must be greater than zero.}}%
3034 % \end{macrocode}
3035 % \end{macro}
3036 %
3037 % \subsubsection{Oval}
3038 % \label{sec:implementation:oval}
3039 %
3040 % \begin{macro}{\maxovalrad}
3041 % User level command, may be redefined by \cmd{\renewcommand*}.
3042 % It may be given as an explicit (rigid) length (i.e., with unit)
3043 % or as a number.
3044 % In the latter case it is used as a factor to be multiplied by
3045 % \cmd{\unitlength}.
3046 % \ (|dimen| and |count| registers should work, too.) \ ^^A
3047 % The default value is 20\,pt as specified for the \oarg{rad}
3048 % argument of \cmd{\oval} by the \LaTeX\ manual
3049 % \cite[p.~223]{LAMPORT}.
3050 % \begin{macrocode}
3051 \newcommand*\maxovalrad{20pt}
3052 % \end{macrocode}
3053 % \end{macro}
3054 %
3055 % \begin{macro}{\pIIe@defaultUL}
3056 % \begin{macro}{\pIIe@def@UL}
3057 % The aforementioned behaviour seems necessary, since
3058 % \cite[p.~223]{LAMPORT} does not specify explicitly whether the
3059 % \oarg{rad} argument should be given in terms of \cmd{\unitlength} or
3060 % as an absolute length.
3061 % This is now re-implemented in terms of \cmd{@defaultunitsset}.
3062 % \begin{macrocode}
3063 \newcommand*\pIIe@defaultUL[2]{%
3064 \@defaultunitsset\pIIe@tempdima{#2}\unitlength
3065 \edef#1{\the\pIIe@tempdima}}
3066 % \end{macrocode}
3067 % Hence, we could\slash should omit the unnecessary argument!?)
3068 % \changes{v0.2h}{2004/01/07}{Check for negative or zero radius
3069 % argument (RN,HjG)}
3070 % \changes{v0.2n}{2004/04/22}{Moved radius test to \cmd{\oval},
3071 % where it belongs (RN/HjG)}
3072 % \begin{macrocode}
3073 \newcommand*\pIIe@def@UL{}
3074 \def\pIIe@def@UL#1\relax#2#3{%
3075 % \if!#1!%
3076 % \def#2{#3}% \edef ?
3077 % \else
3078 % \edef#2{\strip@pt\dimen@}%
3079 % \fi
3080 \edef#2{\the\dimen@}}
3081 % \end{macrocode}
3082 % \end{macro}
3083 % \end{macro}
3084 %
3085 % \begin{macro}{\oval}
3086 % \begin{macro}{\pIIe@maxovalrad}
3087 % \begin{macro}{\pIIe@oval}
3088 % The variant of \cmd{\oval} defined here takes an additional optional
3089 % argument, which specifies the maximum radius of the rounded corners
3090 % (default = 20\,pt, as given above).
3091 % ^^A [Test: length or counter register as optional argument?]
3092 % Unlike \SL, we check for negative or zero radius argument.
3093 % \cmd{\pIIe@maxovalrad} is the internal variant of \cmd{\maxovalrad}.
3094 % \changes{v0.2n}{2004/04/22}{Moved radius test from \cmd{\pIIe@def@UL}
3095 % (RN/HjG)}
3096 % \changes{v0.2n}{2004/04/22}{Allow zero diameter (RN/HjG)}
3097 % \changes{v0.3d}{2020/06/13}{Allow spaces after the first optional Argument
3098 % suggested by FMi (RN)}
3099 % \begin{macrocode}
3100 \newcommand*\pIIe@maxovalrad{}
3101 \newcommand*\pIIe@oval{}
3102 \def\pIIe@oval#1(#2,#3){\@ifnextchar[{\@oval(#2,#3)}{\@oval(#2,#3)[]}}
3103 \renewcommand*\oval[1][\maxovalrad]{%
3104 \begingroup \pIIe@defaultUL\pIIe@maxovalrad{#1}%
3105 \ifdim\pIIe@maxovalrad<\z@ \pIIe@badcircarg \fi
3106 % \end{macrocode}
3107 % Can't close the group here, since arguments must be parsed.
3108 % \begin{macrocode}
3109 \pIIe@oval}
3110 % \end{macrocode}
3111 % \end{macro}
3112 % \end{macro}
3113 % \end{macro}
3114 %
3115 % \begin{macro}{\@oval}
3116 % (This is called in turn by the saved original.)
3117 % \begin{macrocode}
3118 \def\@oval(#1,#2)[#3]{%
3119 % \end{macrocode}
3120 % In analogy to circles, we need only half of the size value.
3121 % \begin{macrocode}
3122 \@defaultunitsset\pIIe@tempdima{#1}\unitlength \divide\pIIe@tempdima\tw@
3123 \@defaultunitsset\pIIe@tempdimb{#2}\unitlength \divide\pIIe@tempdimb\tw@
3124 \pIIe@tempdimc \ifdim\pIIe@tempdimb>\pIIe@tempdima \pIIe@tempdima \else \pIIe@tempdimb \fi
3125 \ifdim\pIIe@maxovalrad<\pIIe@tempdimc \pIIe@tempdimc\pIIe@maxovalrad\relax \fi
3126 % \end{macrocode}
3127 % Subtract the radius of the corners to get coordinates for the
3128 % straight line segments.
3129 % \begin{macrocode}
3130 \pIIe@tempdimd\pIIe@tempdima \advance\pIIe@tempdimd-\pIIe@tempdimc
3131 \pIIe@tempdime\pIIe@tempdimb \advance\pIIe@tempdime-\pIIe@tempdimc
3132 % \end{macrocode}
3133 % Determine which parts of the oval we have to draw.
3134 % \begin{macrocode}
3135 \pIIe@get@quadrants{#3}%
3136 % \end{macrocode}
3137 % For the whole oval remove use the standard shape of ends.
3138 % \begin{macrocode}
3139 \ifnum15=\@tempcnta \pIIe@buttcap \fi
3140 % \end{macrocode}
3141 % ``\verb+@tempswa+ = false'' means, that we have to suppress the `moveto'
3142 % in the following quadrant.
3143 % \begin{macrocode}
3144 \@tempswatrue
3145 % \end{macrocode}
3146 % The following isn't strictly necessary, but yields a single (unfragmented)
3147 % path even for \verb+[r]+ (right half of oval only).
3148 % Useful for future extensions.
3149 %
3150 % \noindent
3151 % Bits 3 and 0 set? (SE/NE)
3152 % \begin{macrocode}
3153 \ifnum9=\@tempcnta
3154 \pIIe@qoval\z@{-\pIIe@tempdimb}{\pIIe@tempdimd}{-\pIIe@tempdimb}%
3155 \thr@@\pIIe@tempdimc\pIIe@tempdima\z@
3156 % \end{macrocode}
3157 % Bit 0 set! (NE)
3158 % \begin{macrocode}
3159 \@tempcnta\@ne
3160 \fi
3161 % \end{macrocode}
3162 % Bit 0 set? (NE)
3163 % \begin{macrocode}
3164 \pIIe@qoval\pIIe@tempdima\z@\pIIe@tempdima\pIIe@tempdime%
3165 \z@\pIIe@tempdimc\z@\pIIe@tempdimb
3166 % \end{macrocode}
3167 % Bit 1 set? (NW)
3168 % \begin{macrocode}
3169 \pIIe@qoval\z@\pIIe@tempdimb{-\pIIe@tempdimd}\pIIe@tempdimb%
3170 \@ne\pIIe@tempdimc{-\pIIe@tempdima}\z@
3171 % \end{macrocode}
3172 % Bit 2 set? (SW)
3173 % \begin{macrocode}
3174 \pIIe@qoval{-\pIIe@tempdima}\z@{-\pIIe@tempdima}{-\pIIe@tempdime}%
3175 \tw@\pIIe@tempdimc\z@{-\pIIe@tempdimb}%
3176 % \end{macrocode}
3177 % Bit 3 set? (SE)
3178 % \begin{macrocode}
3179 \pIIe@qoval\z@{-\pIIe@tempdimb}{\pIIe@tempdimd}{-\pIIe@tempdimb}%
3180 \thr@@\pIIe@tempdimc\pIIe@tempdima\z@
3181 % \end{macrocode}
3182 % Now we've finished, draw the oval and finally close the group opened
3183 % by \cmd{\oval} above.
3184 % \begin{macrocode}
3185 \pIIe@strokeGraph
3186 \endgroup}
3187 % \end{macrocode}
3188 % \end{macro}
3189 %
3190 % \begin{macro}{\pIIe@qoval}
3191 % \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
3192 % \changes{v0.1w}{2003/11/25}{Rename \cmd{\pIIe@oval}
3193 % to \cmd{\pIIe@qoval} (HjG)}
3194 % Ancillary macro; saves us some tokens above.
3195 %
3196 % \noindent
3197 % (\PS: We could use the \texttt{arc} or \texttt{arcto} operator!)
3198 % \begin{macrocode}
3199 \newcommand*\pIIe@qoval[8]{%
3200 % \end{macrocode}
3201 % Bit set?
3202 % \begin{macrocode}
3203 \ifodd\@tempcnta
3204 \if@tempswa\pIIe@moveto{#1}{#2}\fi
3205 \pIIe@lineto{#3}{#4}\pIIe@qcircle{#5}{#6}\pIIe@lineto{#7}{#8}%
3206 \@tempswafalse
3207 \else
3208 \@tempswatrue
3209 \fi
3210 % \end{macrocode}
3211 % Shift by one bit.
3212 % \begin{macrocode}
3213 \divide\@tempcnta\tw@}
3214 % \end{macrocode}
3215 % \end{macro}
3216 %
3217 % \begin{macro}{\pIIe@get@quadrants}
3218 % \changes{v0.1t}{2003/11/13}{Rename \cmd{\pIIe@get@ovalquadrants} to
3219 % \cmd{\pIIe@get@quadrants} (RN)}
3220 % According to the parameter (\texttt{tlbr}) bits are set in
3221 % \cmd{\@tempcnta}:\par
3222 % \begin{tabular}{l@{\qquad}l}
3223 % 0 = 1st Quadrant (NE) & 1 = 2nd Quadrant (NW) \\
3224 % 2 = 3rd Quadrant (SW) & 3 = 4th Quadrant (SE)
3225 % \end{tabular}\par\noindent
3226 % (Cf.\ \cmd{\@oval} and \cmd{\@ovvert} in the \LaTeX\ kernel.)
3227 % We abuse \cmd{\@setfpsbit} from the float processing modules of the
3228 % kernel.
3229 % ^^A (Should this go to section low-level?)
3230 % \begin{macrocode}
3231 \newcommand*\pIIe@get@quadrants[1]{%
3232 \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@tempcnta\z@
3233 \@tfor\reserved@a:=#1\do{\csname @ov\reserved@a false\endcsname}%
3234 \if@ovr \if@ovb\@setfpsbit2\fi \if@ovt\@setfpsbit4\fi \fi
3235 \if@ovl \if@ovb\@setfpsbit1\fi \if@ovt\@setfpsbit8\fi \fi}
3236 % \end{macrocode}
3237 % \end{macro}
3238 % \subsubsection{Quadratic Bezier Curve}
3239 % \label{sec:implementation:bezier-curves}
3240 %
3241 % \begin{macro}{\@bezier}
3242 % \changes{v0.1u}{2003/11/21}{Change calculation of cubic bezier parameters
3243 % to use less tokens (HjG)}
3244 % \changes{v0.2o}{2004/06/25}
3245 % {Supply \cmd{\ignorespaces} to match kernel version (HjG)}
3246 % \changes{v0.2p}{2004/07/27}{\cmd{\@killglue} added. (RN)}
3247 %
3248 % If \#1=0 the primitive operators ot the (back-end) format are used.
3249 % The kernel version of \cmd{\@bezier} uses \cmd{\put} internally,
3250 % which features \cmd{\@killglue} and \cmd{\ignorespaces} commands
3251 % in turn (at the beginning and end, respectively).
3252 % Since we don't use \cmd{\put}, we have to add the latter commands
3253 % by hand.
3254 % \begin{macrocode}
3255 \def\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
3256 \ifnum #1=\z@
3257 % \end{macrocode}
3258 % \BigIndent $P_0=(\#2,\#3)$\quad$P_m=(\#4,\#5)$\quad$P_3=(\#6,\#7)$
3259 % \begin{macrocode}
3260 \@killglue
3261 \begingroup
3262 \@defaultunitsset\pIIe@tempdima{#2}\unitlength
3263 \@defaultunitsset\pIIe@tempdimb{#3}\unitlength
3264 \@defaultunitsset\pIIe@tempdimc{#4}\unitlength
3265 \@defaultunitsset\pIIe@tempdimd{#5}\unitlength
3266 \@defaultunitsset\pIIe@tempdime{#6}\unitlength
3267 \@defaultunitsset\pIIe@tempdimf{#7}\unitlength
3268 % \end{macrocode}
3269 % \noindent
3270 % \BigIndent $P_1 = P_m + 1/3 (P_0 - P_m)$
3271 % \begin{macrocode}
3272 \pIIe@bezier@QtoC\pIIe@tempdima\pIIe@tempdimc\@ovro
3273 \pIIe@bezier@QtoC\pIIe@tempdimb\pIIe@tempdimd\@ovri
3274 % \end{macrocode}
3275 % \BigIndent $P_2 = P_m + 1/3 (P_3 - P_m)$
3276 % \begin{macrocode}
3277 \pIIe@bezier@QtoC\pIIe@tempdime\pIIe@tempdimc\@clnwd
3278 \pIIe@bezier@QtoC\pIIe@tempdimf\pIIe@tempdimd\@clnht
3279 % \end{macrocode}
3280 % \BigIndent $(P_{0x},P_{0y})$
3281 % \begin{macrocode}
3282 \pIIe@moveto\pIIe@tempdima\pIIe@tempdimb
3283 % \end{macrocode}
3284 % \BigIndent $(P_{1x},P_{1y})$\quad$(P_{2x},P_{2y})$\quad$(P_{3x},P_{3y})$
3285 % \begin{macrocode}
3286 \pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\pIIe@tempdime\pIIe@tempdimf
3287 \pIIe@strokeGraph
3288 \endgroup
3289 \ignorespaces
3290 \else
3291 \pIIe@old@bezier{#1}(#2,#3)(#4,#5)(#6,#7)
3292 \fi}
3293 % \end{macrocode}
3294 % \end{macro}
3295 % \begin{macro}{\pIIe@bezier@QtoC}
3296 % \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
3297 % Ancillary macro; saves us some tokens above.
3298 %
3299 % \noindent
3300 % Transformation:
3301 % quadratic bezier parameters $\rightarrow$ cubic bezier parameters.
3302 %
3303 % \noindent
3304 % (Missing: Reference for mathematical formula. Or is this trivial?)
3305 % \begin{macrocode}
3306 \newcommand*\pIIe@bezier@QtoC[3]{%
3307 \@tempdimc#1\relax \advance\@tempdimc-#2\relax
3308 \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
3309 #3\@tempdimc}
3310 % \end{macrocode}
3311 % \end{macro}
3312 %
3313 % \subsubsection{Circle arcs}
3314 % \label{sec:implementation:circle-arcs}
3315 %
3316 % We need some auxiliary dimensions.
3317 % \changes{v0.4b}{2020/09/30}{More auxiliary dimensions}
3318 % \changes{v0.4b}{2020/09/30}{Use of fewer system dimension registers}
3319 % \begin{macrocode}
3320 \ifx\undefined\@arclen \newdimen\@arclen \fi
3321 \ifx\undefined\@arcrad \newdimen\@arcrad \fi
3322 \ifx\undefined\pIIe@tempdima \newdimen\pIIe@tempdima \fi
3323 \ifx\undefined\pIIe@tempdimb \newdimen\pIIe@tempdimb \fi
3324 \ifx\undefined\pIIe@tempdimc \newdimen\pIIe@tempdimc \fi
3325 \ifx\undefined\pIIe@tempdimd \newdimen\pIIe@tempdimd \fi
3326 \ifx\undefined\pIIe@tempdime \newdimen\pIIe@tempdime \fi
3327 \ifx\undefined\pIIe@tempdimf \newdimen\pIIe@tempdimf \fi
3328 % \end{macrocode}
3329 % \begin{macro}{\pIIe@arc}
3330 % \#1: 0 (implicit) if we connect arc with a current point, 1 if we start
3331 % drawing by this arc, 2 if we continue drawing. Other parameters:
3332 % coordinates of the center (dimensions), radius (dimension), initial and
3333 % final angle. If the final angle is greater then the initial angle, we
3334 % ``draw'' in the positive sense (anticlockwise) otherwise in the negative
3335 % sense (clockwise). First we check whether the radius is not negative and
3336 % reduce the rotation to the interval $[-720,720]$.
3337 % \begin{macrocode}
3338 \newcommand*\pIIe@arc[6][0]{%
3339 \@arcrad #4\relax
3340 \ifdim \@arcrad<\z@ \pIIe@badcircarg \else
3341 \@arclen #6\p@ \advance\@arclen -#5\p@
3342 \ifdim \@arclen<\z@ \def\sign{-}\else\def\sign{}\fi
3343 \ifdim \sign\@arclen>720\p@
3344 \PackageWarning {pict2e}{The arc angle is reduced to -720..720}%
3345 \@whiledim \sign\@arclen>720\p@ \do {\advance\@arclen-\sign360\p@}%
3346 \@tempdima #5\p@ \advance\@tempdima \@arclen
3347 \edef\@angleend{\strip@pt\@tempdima}%
3348 \pIIe@@arc{#1}{#2}{#3}{#4}{#5}{\@angleend}%
3349 \else
3350 \pIIe@@arc{#1}{#2}{#3}{#4}{#5}{#6}%
3351 \fi
3352 \fi}
3353 % \end{macrocode}
3354 % If the angle (its absolute value) is too large, the arc is recursively
3355 % divided into 2 parts until the angle is at most 90~degrees.
3356 % \begin{macrocode}
3357 \newcommand*\pIIe@@arc[6]{%
3358 \begingroup
3359 \ifdim \sign\@arclen>90\p@
3360 \divide\@arclen 2
3361 \@tempdima #5\p@ \advance\@tempdima \@arclen
3362 \edef\@anglemid{\strip@pt\@tempdima}%
3363 \def\@temp{\pIIe@@arc{#1}{#2}{#3}{#4}{#5}}%
3364 \expandafter\@temp\expandafter{\@anglemid}%
3365 \def\@temp{\pIIe@@arc{2}{#2}{#3}{#4}}%
3366 \expandafter\@temp\expandafter{\@anglemid}{#6}%
3367 \else
3368 % \end{macrocode}
3369 % We approximate the arc by a Bezier curve. First we calculate the
3370 % coordinates of the initial point:
3371 % \begin{macrocode}
3372 \CalculateSin{#5}\CalculateCos{#5}%
3373 \@tempdima\UseCos{#5}\@arcrad \advance\@tempdima #2\relax
3374 \@tempdimb\UseSin{#5}\@arcrad \advance\@tempdimb #3\relax
3375 % \end{macrocode}
3376 % The coordinates are added to the path if and how necessary:
3377 % \begin{macrocode}
3378 \ifcase #1\relax
3379 \pIIe@lineto\@tempdima\@tempdimb
3380 \or \pIIe@moveto\@tempdima\@tempdimb
3381 \or
3382 \else \PackageWarning {pict2e}%
3383 {Illegal obligatory argument in \protect\circlearc.}%
3384 \fi
3385 % \end{macrocode}
3386 % The distance of control points from the endpoints is $\frac 43 r \tan \frac
3387 % \varphi4$ ($\varphi$ is the angle and $r$ is the radius of the arc).
3388 % \begin{macrocode}
3389 \@tempdimc\@arclen \divide\@tempdimc\@iv
3390 \edef\@angle{\strip@pt\@tempdimc}\CalculateTan{\@angle}%
3391 \@linelen\UseTan{\@angle}\@arcrad \@linelen4\@linelen \divide\@linelen\thr@@
3392 % \end{macrocode}
3393 % Coordinates of the first control point, added to the path:
3394 % \begin{macrocode}
3395 \advance\@tempdima-\UseSin{#5}\@linelen
3396 \advance\@tempdimb \UseCos{#5}\@linelen
3397 \pIIe@add@nums\@tempdima\@tempdimb
3398 % \end{macrocode}
3399 % Coordinates of the endpoint:
3400 % \begin{macrocode}
3401 \CalculateSin{#6}\CalculateCos{#6}%
3402 \@tempdima \UseCos{#6}\@arcrad \advance\@tempdima #2\relax
3403 \@tempdimb \UseSin{#6}\@arcrad \advance\@tempdimb #3\relax
3404 % \end{macrocode}
3405 % Coordinates of the second control point:
3406 % \begin{macrocode}
3407 \@tempdimc \UseSin{#6}\@linelen \advance\@tempdimc \@tempdima
3408 \pIIe@tempdimd-\UseCos{#6}\@linelen \advance\pIIe@tempdimd \@tempdimb
3409 % \end{macrocode}
3410 % Adding the second control point and the endpoint to the path
3411 % \begin{macrocode}
3412 \pIIe@add@nums\@tempdimc\pIIe@tempdimd
3413 \pIIe@add@CP\@tempdima\@tempdimb
3414 \pIIe@addtoGraph\pIIe@curveto@op
3415 \fi
3416 \endgroup}
3417 % \end{macrocode}
3418 % \end{macro}
3419 % \begin{macro}{\arc}
3420 % The \cmd{\arc} command generalizes (except that the radius instead of the
3421 % diameter is used) the standard \cmd{\circle} adding as an
3422 % obligatory first parameter comma separated pair of angles (initial and
3423 % final). We start with \cmd{\pIIearc} to avoid conflicts with other
3424 % packages.
3425 % \begin{macrocode}
3426 \newcommand*\pIIearc
3427 {\@ifstar{\@tempswatrue\pIIe@arc@}{\@tempswafalse\pIIe@arc@}}
3428 \newcommand*\pIIe@arc@[2][0,360]{\pIIe@arc@@(#1){#2}}
3429 \def\pIIe@arc@@(#1,#2)#3{%
3430 \@defaultunitsset\pIIe@tempdima{#3}\unitlength
3431 \if@tempswa
3432 \pIIe@moveto\z@\z@
3433 \pIIe@arc{\z@}{\z@}{\pIIe@tempdima}{#1}{#2}%
3434 \pIIe@closepath\pIIe@fillGraph
3435 \else
3436 \pIIe@arc[1]{\z@}{\z@}{\pIIe@tempdima}{#1}{#2}%
3437 \pIIe@strokeGraph
3438 \fi}
3439 \ifx\undefined\arc
3440 \else
3441 \PackageWarning{pict2e}{\protect\arc\space redefined}%
3442 \fi
3443 \let\arc\pIIearc
3444 % \end{macrocode}
3445 % \end{macro}
3446 %
3447 % \subsubsection{Line, Vector, polyline, polyvector, and polygon}
3448 % \label{sec:implementation:polyline-polyvector}
3449 %
3450 % \changes{v0.3e}{2020/06/20}{Added \cmd{\Vector} and \cmd{\polyvector}
3451 % suggested by FMi. (RN)}
3452 % \begin{macro}{\Line}
3453 % \begin{macro}{\polyline}
3454 % \begin{macro}{\Vector}
3455 % \begin{macro}{\polyvector}
3456 % \begin{macro}{\polygon}
3457 % We use recursive macros for \cmd{\polyline}, \cmd{\polyvector}, and \cmd{\polygon}.
3458 % \begin{macrocode}
3459 \let\lp@r( \let\rp@r)
3460 \def\Line(#1,#2)(#3,#4){\polyline(#1,#2)(#3,#4)}
3461 \def\polyline(#1,#2){%
3462 \@killglue
3463 \@defaultunitsset\pIIe@tempdima{#1}\unitlength
3464 \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
3465 \pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
3466 \@ifnextchar\lp@r{\@polyline}{\PackageWarning{pict2e}%
3467 {Polygonal lines require at least two vertices!}%
3468 \ignorespaces}}
3469 \def\@polyline(#1,#2){%
3470 \@defaultunitsset\pIIe@tempdima{#1}\unitlength
3471 \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
3472 \pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}%
3473 \@ifnextchar\lp@r{\@polyline}{\pIIe@strokeGraph\ignorespaces}}
3474 \def\Vector(#1,#2)(#3,#4){\polyvector(#1,#2)(#3,#4)}
3475 \def\polyvector(#1,#2){%
3476 \@killglue
3477 \@ifnextchar\lp@r{\begingroup\@polyvector(#1,#2)}{%
3478 \PackageWarning{pict2e}%
3479 {Polygonal vectors require at least two vertices!}\ignorespaces}}
3480 \def\@polyvector(#1,#2)(#3,#4){%
3481 % \end{macrocode}
3482 % See the similar definition for \cmd{\vector} (\ref{sec:implementation:vector})
3483 % \begin{macrocode}
3484 \@defaultunitsset\pIIe@tempdima{#1}\unitlength
3485 \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
3486 \@defaultunitsset\pIIe@tempdimc{#3}\unitlength
3487 \@defaultunitsset\pIIe@tempdimd{#4}\unitlength
3488 \advance\pIIe@tempdimc-\pIIe@tempdima \advance\pIIe@tempdimd-\pIIe@tempdimb
3489 \ifdim\pIIe@tempdimc=\z@ \@linelen\pIIe@tempdimd \else
3490 \ifdim\pIIe@tempdimd=\z@ \@linelen\pIIe@tempdimc \else
3491 \pIIe@pyth\pIIe@tempdimc\pIIe@tempdimd\@linelen
3492 \fi
3493 \fi
3494 \ifdim\@linelen<\z@ \@linelen-\@linelen\fi
3495 \pIIe@divide{\pIIe@tempdimc}\@linelen\pIIe@tempdime
3496 \pIIe@divide{\pIIe@tempdimd}\@linelen\pIIe@tempdimf
3497 % \end{macrocode}
3498 % Note the shift to the previous point in addition to the rotation.
3499 % \begin{macrocode}
3500 \pIIe@concat\pIIe@tempdime\pIIe@tempdimf{-\pIIe@tempdimf}\pIIe@tempdime\pIIe@tempdima\pIIe@tempdimb
3501 \pIIe@vector \pIIe@fillGraph
3502 \@ifnextchar\lp@r{\@polyvector(#3,#4)}{\endgroup\ignorespaces}}
3503 \def\polygon{%
3504 \@killglue
3505 \@ifstar{\begingroup\@tempswatrue\@polygon}%
3506 {\begingroup\@tempswafalse\@polygon}}
3507 \def\@polygon(#1,#2){%
3508 \@defaultunitsset\pIIe@tempdima{#1}\unitlength
3509 \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
3510 \pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
3511 \@ifnextchar\lp@r{\@@polygon}{\PackageWarning{pict2e}%
3512 {Polygons require at least two vertices!}%
3513 \ignorespaces}}
3514 \def\@@polygon(#1,#2){%
3515 \@defaultunitsset\pIIe@tempdima{#1}\unitlength
3516 \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
3517 \pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}%
3518 \@ifnextchar\lp@r{\@@polygon}{\pIIe@closepath
3519 \if@tempswa\pIIe@fillGraph\else\pIIe@strokeGraph\fi
3520 \endgroup
3521 \ignorespaces}}
3522 % \end{macrocode}
3523 % \end{macro}
3524 % \end{macro}
3525 % \end{macro}
3526 % \end{macro}
3527 % \end{macro}
3528 %
3529 % \subsubsection{Path commands}
3530 % \label{sec:implementation:path-commands}
3531 %
3532 % \begin{macro}{\moveto}
3533 % \begin{macro}{\lineto}
3534 % \begin{macro}{\curveto}
3535 % \begin{macro}{\circlearc}
3536 % \begin{macro}{\closepath}
3537 % \begin{macro}{\strokepath}
3538 % \begin{macro}{\fillpath}
3539 % Direct access to path constructions in \PS\ and \PDF.
3540 % \begin{macrocode}
3541 \def\moveto(#1,#2){%
3542 \@killglue
3543 \@defaultunitsset\pIIe@tempdima{#1}\unitlength
3544 \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
3545 \pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
3546 \ignorespaces}
3547 \def\lineto(#1,#2){%
3548 \@killglue
3549 \@defaultunitsset\pIIe@tempdima{#1}\unitlength
3550 \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
3551 \pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}%
3552 \ignorespaces}
3553 \def\curveto(#1,#2)(#3,#4)(#5,#6){%
3554 \@killglue
3555 \@defaultunitsset\pIIe@tempdima{#1}\unitlength
3556 \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
3557 \@defaultunitsset\pIIe@tempdimc{#3}\unitlength
3558 \@defaultunitsset\pIIe@tempdimd{#4}\unitlength
3559 \@defaultunitsset\pIIe@tempdime{#5}\unitlength
3560 \@defaultunitsset\pIIe@tempdimf{#6}\unitlength
3561 \pIIe@curveto{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}%
3562 {\pIIe@tempdimd}{\pIIe@tempdime}{\pIIe@tempdimf}%
3563 \ignorespaces}
3564 \newcommand*\circlearc[6][0]{%
3565 \@killglue
3566 \@defaultunitsset\pIIe@tempdima{#2}\unitlength
3567 \@defaultunitsset\pIIe@tempdimb{#3}\unitlength
3568 \@defaultunitsset\pIIe@tempdimc{#4}\unitlength
3569 \pIIe@arc[#1]{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}{#5}{#6}%
3570 \ignorespaces}
3571 \def\closepath{\pIIe@closepath}
3572 \def\strokepath{\pIIe@strokeGraph}
3573 \def\fillpath{\pIIe@fillGraph}
3574 % \end{macrocode}
3575 % \end{macro}
3576 % \end{macro}
3577 % \end{macro}
3578 % \end{macro}
3579 % \end{macro}
3580 % \end{macro}
3581 % \end{macro}
3582 %
3583 % \subsubsection{Ends of paths, joins of subpaths}
3584 % \label{sec:implementation:ends-joins}
3585 %
3586 % \begin{macro}{\buttcap}
3587 % \begin{macro}{\roundcap}
3588 % \begin{macro}{\squarecap}
3589 % \begin{macro}{\miterjoin}
3590 % \begin{macro}{\roundjoin}
3591 % \begin{macro}{\beveljoin}
3592 % Ends of paths and joins of subpaths in \PS\ and \PDF.
3593 % \begin{macrocode}
3594 \ifcase\pIIe@mode\relax
3595 \or
3596 \newcommand*\pIIe@linecap@op{setlinecap}
3597 \newcommand*\pIIe@linejoin@op{setlinejoin}
3598 \or
3599 \newcommand*\pIIe@linecap@op{J}
3600 \newcommand*\pIIe@linejoin@op{j}
3601 \fi
3602 \def\pIIe@linecap{}
3603 \def\pIIe@linejoin{}
3604 \def\buttcap{\edef\pIIe@linecap{ 0 \pIIe@linecap@op}}
3605 \def\roundcap{\edef\pIIe@linecap{ 1 \pIIe@linecap@op}}
3606 \def\squarecap{\edef\pIIe@linecap{ 2 \pIIe@linecap@op}}
3607 \def\miterjoin{\edef\pIIe@linejoin{ 0 \pIIe@linejoin@op}}
3608 \def\roundjoin{\edef\pIIe@linejoin{ 1 \pIIe@linejoin@op}}
3609 \def\beveljoin{\edef\pIIe@linejoin{ 2 \pIIe@linejoin@op}}
3610 % \end{macrocode}
3611 % \end{macro}
3612 % \end{macro}
3613 % \end{macro}
3614 % \end{macro}
3615 % \end{macro}
3616 % \end{macro}
3617 %
3618 % \subsection{Commands from other packages}
3619 %
3620 % \subsubsection{Package \textsf{ebezier}}
3621 % \label{sec:implementation:ebezier}
3622 %
3623 % One feature from~\cite{EBEZIER}.
3624 %
3625 % \begin{macro}{\cbezier}
3626 % \begin{macro}{\@cbezier}
3627 % \changes{v0.2o}{2004/06/25}
3628 % {Supply \cmd{\ignorespaces} to match kernel version (HjG)}
3629 % \changes{v0.2p}{2004/07/27}{\cmd{\@killglue} added. (RN)}
3630 % \begin{macro}{\pIIe@@cbezier}
3631 % \#1, the maximum number of points to use, is simply ignored,
3632 % as well as \cmd{\qbeziermax}.
3633 %
3634 % Like the kernel version of \cmd{\@bezier},
3635 % the original version of \cmd{\@cbezier} uses \cmd{\put} internally,
3636 % which features \cmd{\@killglue} and \cmd{\ignorespaces} commands
3637 % in turn (at the beginning and end, respectively).
3638 % Since we don't use \cmd{\put}, we have to add the latter commands
3639 % by hand.
3640 %
3641 % ^^A (What about |\lbezier|?)
3642 %
3643 % \noindent
3644 % Original head of the macro:\par
3645 % \verb|\def\cbezier{\@ifnextchar [{\@cbezier}{\@cbezier[0]}}|\par
3646 % \noindent Changed analogous to the \LaTeX\ kernel's \cmd{\qbezier} and
3647 % \cmd{\bezier}:
3648 % \begin{macrocode}
3649 \AtBeginDocument{\@ifundefined{cbezier}{\newcommand}{\renewcommand}*%
3650 \cbezier[2][0]{\pIIe@@cbezier[#1]#2}%
3651 \@ifdefinable\pIIe@@cbezier{}%
3652 \def\pIIe@@cbezier#1)#2(#3)#4(#5)#6({\@cbezier#1)(#3)(#5)(}%
3653 \def\@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%
3654 \@killglue
3655 \@defaultunitsset\pIIe@tempdima{#2}\unitlength
3656 \@defaultunitsset\pIIe@tempdimb{#3}\unitlength
3657 \pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
3658 \@defaultunitsset\pIIe@tempdima{#4}\unitlength
3659 \@defaultunitsset\pIIe@tempdimb{#5}\unitlength
3660 \@defaultunitsset\pIIe@tempdimc{#6}\unitlength
3661 \@defaultunitsset\pIIe@tempdimd{#7}\unitlength
3662 \@defaultunitsset\pIIe@tempdime{#8}\unitlength
3663 \@defaultunitsset\pIIe@tempdimf{#9}\unitlength
3664 \pIIe@curveto{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}%
3665 {\pIIe@tempdimd}{\pIIe@tempdime}{\pIIe@tempdimf}%
3666 \pIIe@strokeGraph
3667 \ignorespaces}%
3668 }
3669 % \end{macrocode}
3670 % \end{macro}
3671 % \end{macro}
3672 % \end{macro}
3673 %
3674 % \subsubsection{Other packages}
3675 % \label{sec:implementation:others}
3676 %
3677 % Other macros from various packages may be included in future
3678 % versions of this package.
3679 % ^^A (Or in a sibling package \textsf{pict2x} or \textsf{pict2ext}.)
3680 %
3681 % \subsection{Mode `original'}
3682 %
3683 % ^^A Necessary? Useful?
3684 % ^^A \bigskip
3685 %
3686 % \noindent
3687 % Other branch of the big switch,\label{big-switch-end}
3688 % started near the beginning of the code
3689 % (see page~\pageref{big-switch-begin}).
3690 % \begin{macrocode}
3691 \else
3692 % \end{macrocode}
3693 %
3694 % \begin{macro}{\oval}
3695 % \begin{macro}{\maxovalrad}
3696 % \begin{macro}{\OriginalPictureCmds}
3697 % Gobble the new optional argument and continue with saved version.
3698 % \cmd{\maxovalrad} is there to avoid error messages in case the
3699 % user's document redefines it with \cmd{\renewcommand*}.
3700 % Likewise, \cmd{\OriginalPictureCmds} is only needed for test
3701 % documents.
3702 % \begin{macrocode}
3703 \renewcommand*\oval[1][]{\pIIe@oldoval}
3704 \newcommand*\maxovalrad{20pt}
3705 \newcommand*\OriginalPictureCmds{}
3706 \fi
3707 % \end{macrocode}
3708 % \end{macro}
3709 % \end{macro}
3710 % \end{macro}
3711 %
3712 % \subsection{Final clean-up}
3713 %
3714 % Restore Catcodes.
3715 % \begin{macrocode}
3716 \Gin@codes
3717 \let\Gin@codes\relax
3718 % \end{macrocode}
3719 %
3720 % \begin{macrocode}
3721 %</package>
3722 % \end{macrocode}
3723 %
3724 %
3725 % \ifdeveloping
3726 %
3727 % \section{Bugs}
3728 %
3729 % Das muss hier besser werden! Wie? longtable!?
3730 %
3731 % \bigskip
3732 % \noindent
3733 % \begin{tabular}{@{}rlccclp{30mm}@{}}
3734 % \hline
3735 % No. & Submitted by & Reported & V.no. & Fixed & Fixed by
3736 % & Remark \\
3737 % \hline
3738 % \hline
3739 % 1 & Volker Kiefel & 2004/05/29 & v0.2o & 2004/06/25 & HjG
3740 % & Trouble with language support; e.g., \texttt{german.sty}.
3741 % ($\mapsto$ Save and restore catcodes.) \\
3742 % \hline
3743 % 2 & Dwight Aplevich & 2004/06/04 & v0.2o & 2004/06/25 & HjG
3744 % & Cannot connect two |\cbezier| curves (second one displaced).
3745 % ($\mapsto$ Supply |\ignorespaces| in definition of bezier
3746 % commands.) \\
3747 % \hline
3748 % 3 & Alan G. Isaac & 2004/06/23 & v0.2o & 2004/06/25 & HjG
3749 % & Like \#2. \\
3750 % \hline
3751 % \end{tabular}
3752 %
3753 % \iffalse
3754 % \newenvironment{erratalist}
3755 % {\begin{longtable}{r>{\raggedright}p{2cm}l>{\raggedright}p{10cm}l}}
3756 % {\endgobble\end{longtable}}
3757 % \fi
3758 %
3759 % \bigskip
3760 % \noindent
3761 % \begin{longtable}{@{}r^^A No.
3762 % >{\raggedright}p{2cm}^^A Submitted
3763 % >{\raggedright}p{2cm}^^A Fixed
3764 % >{\raggedright}p{8.5cm}^^A Remark
3765 % @{}}
3766 % \hline
3767 % No. & Submitted & Fixed & Remark (Synopsis and Fix)
3768 % \tabularnewline \hline \hline
3769 % 1 & v0.2n? 2004/05/29 Volker Kiefel
3770 % & v0.2o 2004/06/25 HjG
3771 % & Trouble with language support; e.g., \texttt{german.sty}.
3772 % \\ ($\mapsto$ Save and restore catcodes.)
3773 % \tabularnewline \hline
3774 % 2 & v0.2n? 2004/06/04 Dwight Aplevich
3775 % & v0.2o 2004/06/25 HjG
3776 % & Cannot connect two |\cbezier| curves (second one displaced).
3777 % \\ ($\mapsto$ Supply |\ignorespaces| in definition of bezier
3778 % commands.)
3779 % \tabularnewline \hline
3780 % 3 & v0.2n? 2004/06/23 Alan G. Isaac
3781 % & v0.2o 2004/06/25 HjG
3782 % & Like \#2.
3783 % \tabularnewline \hline
3784 % \end{longtable}
3785 %
3786 % \bigskip
3787 % \noindent
3788 % \begin{tabular}{@{}r>{\raggedright}p{.6\textwidth}@{}}^^A tabularx? RN
3789 % \hline
3790 % \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
3791 % No. & 1 \\
3792 % Submitted by & Volker Kiefel \\
3793 % Reported & 2004/05/29 \\
3794 % Version & v0.2o \\
3795 % Fixed & 2004/06/25 \\
3796 % Fixed by & HjG
3797 % \end{tabular} &
3798 % Trouble with language support; e.g., \texttt{german.sty}.
3799 % ($\mapsto$\,Save and restore catcodes.)
3800 % \tabularnewline \hline
3801 % \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
3802 % No. & 2 \\
3803 % Submitted by & Dwight Aplevich \\
3804 % Reported & 2004/06/04 \\
3805 % Version & v0.2o \\
3806 % Fixed & 2004/06/25 \\
3807 % Fixed by & HjG
3808 % \end{tabular} &
3809 % Cannot connect two |\cbezier| curves (second one displaced).
3810 % ($\mapsto$ Supply |\ignorespaces| in definition of bezier
3811 % commands.)
3812 % \tabularnewline \hline
3813 % \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
3814 % No. & 3 \\
3815 % Submitted by & Alan G. Isaac \\
3816 % Reported & 2004/06/23 \\
3817 % Version & v0.2o \\
3818 % Fixed & 2004/06/25 \\
3819 % Fixed by & HjG
3820 % \end{tabular} &
3821 % Like \#2.
3822 % \tabularnewline \hline
3823 % \end{tabular}
3824 %
3825 % \bigskip
3826 % \noindent
3827 % \begin{longtable}{@{}rp{.6\textwidth}@{}}
3828 % \hline
3829 % \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
3830 % No. & 1 \\
3831 % Submitted by & Volker Kiefel \\
3832 % Reported & 2004/05/29 \\
3833 % Version & v0.2o \\
3834 % Fixed & 2004/06/25 \\
3835 % Fixed by & HjG
3836 % \end{tabular} &
3837 % Trouble with language support; e.g., \texttt{german.sty}.
3838 % ($\mapsto$\,Save and restore catcodes.)
3839 % \tabularnewline \hline
3840 % \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
3841 % No. & 2 \\
3842 % Submitted by & Dwight Aplevich \\
3843 % Reported & 2004/06/04 \\
3844 % Version & v0.2o \\
3845 % Fixed & 2004/06/25 \\
3846 % Fixed by & HjG
3847 % \end{tabular} &
3848 % Cannot connect two |\cbezier| curves (second one displaced).
3849 % ($\mapsto$ Supply |\ignorespaces| in definition of bezier
3850 % commands.)
3851 % \tabularnewline \hline
3852 % \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
3853 % No. & 3 \\
3854 % Submitted by & Alan G. Isaac \\
3855 % Reported & 2004/06/23 \\
3856 % Version & v0.2o \\
3857 % Fixed & 2004/06/25 \\
3858 % Fixed by & HjG
3859 % \end{tabular} &
3860 % Like \#2.
3861 % \tabularnewline \hline
3862 % \end{longtable}
3863 %
3864 % \fi
3865 %
3866 %
3867 % \Finale
3868 \endinput