From 35a5ddb9c4a7ab6239bc84741df4cbd8cf8e2ac9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 31 Dec 2009 01:44:07 +0000 Subject: dcpic update (27dec09) git-svn-id: svn://tug.org/texlive/trunk@16547 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/dcpic/README | 9 + Master/texmf-dist/doc/generic/dcpic/README.TEXLIVE | 7 + Master/texmf-dist/doc/generic/dcpic/examples.tex | 751 +++++++++++ Master/texmf-dist/doc/latex/dcpic/README | 9 - Master/texmf-dist/doc/latex/dcpic/README.TEXLIVE | 7 - Master/texmf-dist/doc/latex/dcpic/examples.tex | 754 ----------- Master/texmf-dist/doc/latex/dcpic/gpl.txt | 340 ----- Master/texmf-dist/tex/generic/dcpic/dcpic.sty | 1378 ++++++++++++++++++++ Master/texmf-dist/tex/latex/dcpic/dcpic.sty | 1247 ------------------ 9 files changed, 2145 insertions(+), 2357 deletions(-) create mode 100644 Master/texmf-dist/doc/generic/dcpic/README create mode 100644 Master/texmf-dist/doc/generic/dcpic/README.TEXLIVE create mode 100644 Master/texmf-dist/doc/generic/dcpic/examples.tex delete mode 100644 Master/texmf-dist/doc/latex/dcpic/README delete mode 100644 Master/texmf-dist/doc/latex/dcpic/README.TEXLIVE delete mode 100644 Master/texmf-dist/doc/latex/dcpic/examples.tex delete mode 100644 Master/texmf-dist/doc/latex/dcpic/gpl.txt create mode 100644 Master/texmf-dist/tex/generic/dcpic/dcpic.sty delete mode 100644 Master/texmf-dist/tex/latex/dcpic/dcpic.sty (limited to 'Master') diff --git a/Master/texmf-dist/doc/generic/dcpic/README b/Master/texmf-dist/doc/generic/dcpic/README new file mode 100644 index 00000000000..34e8945af01 --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/README @@ -0,0 +1,9 @@ +DCpic is a package of TeX macros for graph modeling (e.g. +commutative diagrams) in a (La)TeX or ConTeXt document. +Its distinguishing features are: the use of PiCTeX a +powerful graphical engine, and a simple specification +syntax. A graph is described in terms of its objects and +its edges. The objects are textual elements and the edges +can have various straight or curved forms. + +It is under the LaTeX Project Public License \ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/dcpic/README.TEXLIVE b/Master/texmf-dist/doc/generic/dcpic/README.TEXLIVE new file mode 100644 index 00000000000..d1305078773 --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/README.TEXLIVE @@ -0,0 +1,7 @@ +The following files have been removed in the TeX Live installation of +the current package, typically due to duplication, lack of space, or +missing source code. You can find these files on CTAN. If questions or +concerns, email tex-live@tug.org. + + manPT_dcpic.pdf + man_dcpic.pdf diff --git a/Master/texmf-dist/doc/generic/dcpic/examples.tex b/Master/texmf-dist/doc/generic/dcpic/examples.tex new file mode 100644 index 00000000000..9590cb0da59 --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/examples.tex @@ -0,0 +1,751 @@ +\documentclass[a4paper]{article} +\usepackage{pictexwd,dcpic} + + +\voffset=-2cm +\hoffset=-1cm +\addtolength{\textwidth}{2cm} +\addtolength{\textheight}{4cm} + +\newcommand{\barraA}{\vrule height2em width0em depth0em} +\newcommand{\barraB}{\vrule height1.6em width0em depth0em} + + + + +\begin{document} + +\begin{center} + DCpic - Examples +\end{center} + + +\paragraph{Commutative Diagrams --- Curved arrows.} + +A rectangular curve with rounded corners is easy to specify and should +cater for most needs. With this in mind we give the following tip to +the user: to specify a rectangular, with rounded corners, curve we +choose the points which give us the {\em expanded chess-horse + movement}, that is, $(x,y)$, $(x\pm4,y\mp1)$, $(x\mp1,y\pm4)$, or +$(x,y)$,$(x\pm1,y\mp4)$, $(x\mp4,y\pm1)$, those sets of points will give us +the four corners of the rectangle; to form the whole line it is only +necessary to add an odd number of points joining the two (or more) +corners. + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[2] +\cmor((10,20)(6,21)(5,25)) \pup(5,15){$x$} +\enddc +\end{verbatim} +} + +$$ +\begindc{\commdiag}[3] +\cmor((10,20)(6,21)(5,25)) \pup(5,15){$x$} +\enddc +$$ + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[3] +\obj(10,15){$A$} +\obj(40,15)[Al]{$A$} +\obj(25,15){$B$} +\mor{$A$}{$B$}{$f$} +\mor{$B$}{Al}{$g$} +\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) \pup(25,3){$id_A$} +\enddc +\end{verbatim} +} + +$$ +\begindc{\commdiag}[3] +\obj(10,15){$A$} +\obj(40,15)[Al]{$A$} +\obj(25,15){$B$} +\mor{$A$}{$B$}{$f$} +\mor{$B$}{Al}{$g$} +\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) \pup(25,3){$id_A$} +\enddc +$$ + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[3] +\obj(14,11){$A$} +\obj(39,11){$B$} +\mor(14,12)(39,12){$f$} +\mor(39,10)(14,10){$g$} +\cmor((10,10)(6,11)(5,15)(6,19)(10,20)(14,19)(15,15)) \pdown(2,20){$id_A$} +\cmor((40,7)(41,3)(45,2)(49,3)(50,7)(49,11)(45,12)) \pleft(54,3){$id_B$} +\enddc +\end{verbatim} +} + +$$ +\begindc{\commdiag}[3] +\obj(14,11){$A$} +\obj(39,11){$B$} +\mor(14,12)(39,12){$f$} +\mor(39,10)(14,10){$g$} +\cmor((10,10)(6,11)(5,15)(6,19)(10,20)(14,19)(15,15)) \pdown(2,20){$id_A$} +\cmor((40,7)(41,3)(45,2)(49,3)(50,7)(49,11)(45,12)) \pleft(54,3){$id_B$} +\enddc +$$ + + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[3] +\obj(10,18){$A$} +\obj(40,18){$B$} +\cmor((10,20)(15,25)(20,20)(25,15)(30,20)(35,25)(40,20)) +\pdown(25,12){$f$}[2] +\cmor((10,15)(15,10)(20,15)(25,20)(30,15)(35,10)(40,15)) +\pup(25,22){$g$}[2] +\enddc +\end{verbatim} +} + +$$ +\begindc{\commdiag}[3] +\obj(10,18){$A$} +\obj(40,18){$B$} +\cmor((10,20)(15,25)(20,20)(25,15)(30,20)(35,25)(40,20)) +\pdown(25,12){$f$}[2] +\cmor((10,15)(15,10)(20,15)(25,20)(30,15)(35,10)(40,15)) +\pup(25,22){$g$}[2] +\enddc +$$ + + +\vfill +\pagebreak + + +\paragraph{Commutative Diagrams --- Size Adjusting.} With the new +version (v4.0) two new features are introduced, relative specification +{\tt $\backslash$mor\{objA\}\{objB\}} instead of {\tt $\backslash$mor(1,3)(4,5)}, and the arrows now +automatically adjust their size to the object's box size. + + + +{\scriptsize +\begin{verbatim} +\begindc{\commdiag} +\obj(1,3)[objSum]{$\displaystyle \sum_{k=2}^n \left\lfloor\frac{\phi(k)}{k-1}\right\rfloor}$} +\obj(4,5)[objB]{$B$} +\obj(4,3)[objA]{$A$} +\obj(4,1)[objBp]{$B$} +\mor{objSum}{objB}{$f$} +\mor{objB}{objA}{$g$} +\mor{objSum}{objA}{$f\circ g$}[\atright,\solidarrow] +\mor{objSum}{objBp}{$f$}[\atright,\solidarrow] +\mor{objA}{objBp}{$g$}[\atright,\solidarrow] +\enddc +\end{verbatim} +} + +$$ +\begindc{\commdiag} +\obj(1,3)[objSum]{$\displaystyle \sum_{k=2}^n \left\lfloor\frac{\phi(k)}{k-1}\right\rfloor$} +\obj(4,5)[objB]{$B$} +\obj(4,3)[objA]{$A$} +\obj(4,1)[objBp]{$B$} +\mor{objSum}{objB}{$f$} +\mor{objB}{objA}{$g$} +\mor{objSum}{objA}{$f\circ g$}[\atright,\solidarrow] +\mor{objSum}{objBp}{$f$}[\atright,\solidarrow] +\mor{objA}{objBp}{$g$}[\atright,\solidarrow] +\enddc +$$ + + +{\scriptsize +\begin{verbatim} +\begindc{\commdiag} +\obj(10,10)[A]{$OOOOOO$}\obj(15,10)[Aa]{$XXXX$}\obj(14,11)[Ab]{$XXXX$} +\obj(13,12)[Ac]{$XXXX$}\obj(12,13)[Ad]{$XXXX$}\obj(11,14)[Ae]{$XXXX$} +\obj(10,15)[Af]{$XXXX$}\obj(9,14)[Ag]{$BBBB$}\obj(8,13)[Ah]{$XXXX$} +\obj(7,12)[Ai]{$XXXX$}\obj(6,11)[Aj]{$XXXX$}\obj(5,10)[Ak]{$XXXX$} +\obj(6,9)[Al]{$XXXX$}\obj(7,8)[Am]{$XXXX$}\obj(8,7)[An]{$BBBB$} +\obj(9,6)[Ao]{$CCCC$}\obj(10,5)[Ap]{$DDDD$}\obj(11,6)[Aq]{$EEEE$} +\obj(12,7)[Ar]{$EEEE$}\obj(13,8)[As]{$EEEE$}\obj(14,9)[At]{$EEEE$} +\mor{A}{Aa}{$a1$}\mor{A}{Ab}{$a2$}\mor{A}{Ac}{$a3$}\mor{A}{Ad}{$a4$} +\mor{A}{Ae}{$a5$}\mor{A}{Af}{$a6$}\mor{A}{Ag}{$a7$}\mor{A}{Ah}{$a8$} +\mor{A}{Ai}{$a9$}\mor{A}{Aj}{$a10$}\mor{A}{Ak}{$a11$}\mor{A}{Al}{$a12$} +\mor{A}{Am}{$a13$}\mor{A}{An}{$a14$}\mor{A}{Ao}{$a15$}\mor{A}{Ap}{$a16$} +\mor{A}{Aq}{$a17$}\mor{A}{Ar}{$a18$}\mor{A}{As}{$a19$}\mor{A}{At}{$a20$} +\enddc +\end{verbatim} +} + +$$ +\begindc{\commdiag}[29] +\obj(10,10)[A]{$OOOOOO$}\obj(15,10)[Aa]{$XXXX$}\obj(14,11)[Ab]{$XXXX$} +\obj(13,12)[Ac]{$XXXX$}\obj(12,13)[Ad]{$XXXX$}\obj(11,14)[Ae]{$XXXX$} +\obj(10,15)[Af]{$XXXX$}\obj(9,14)[Ag]{$BBBB$}\obj(8,13)[Ah]{$XXXX$} +\obj(7,12)[Ai]{$XXXX$}\obj(6,11)[Aj]{$XXXX$}\obj(5,10)[Ak]{$XXXX$} +\obj(6,9)[Al]{$XXXX$}\obj(7,8)[Am]{$XXXX$}\obj(8,7)[An]{$BBBB$} +\obj(9,6)[Ao]{$CCCC$}\obj(10,5)[Ap]{$DDDD$}\obj(11,6)[Aq]{$EEEE$} +\obj(12,7)[Ar]{$EEEE$}\obj(13,8)[As]{$EEEE$}\obj(14,9)[At]{$EEEE$} +\mor{A}{Aa}{$a1$}\mor{A}{Ab}{$a2$}\mor{A}{Ac}{$a3$}\mor{A}{Ad}{$a4$} +\mor{A}{Ae}{$a5$}\mor{A}{Af}{$a6$}\mor{A}{Ag}{$a7$}\mor{A}{Ah}{$a8$} +\mor{A}{Ai}{$a9$}\mor{A}{Aj}{$a10$}\mor{A}{Ak}{$a11$}\mor{A}{Al}{$a12$} +\mor{A}{Am}{$a13$}\mor{A}{An}{$a14$}\mor{A}{Ao}{$a15$}\mor{A}{Ap}{$a16$} +\mor{A}{Aq}{$a17$}\mor{A}{Ar}{$a18$}\mor{A}{As}{$a19$}\mor{A}{At}{$a20$} +\enddc +$$ + +\vfill +\pagebreak + + +\paragraph{Commutative Diagrams --- A Complex Diagram} + +{\scriptsize +\begin{verbatim} +\begindc{\commdiag}[35] +\obj(1,1)[Gr]{$G$} +\obj(3,1)[Grstar]{$G_{r^*}$} +\obj(5,1)[H]{$H$} +\obj(2,2)[SigmaG]{$\Sigma^G$} +\obj(6,2)[SigmaH]{$\Sigma^H$} +\obj(1,3)[Lm]{$L_m$} +\obj(3,3)[Krm]{$K_{r,m}$} +\obj(5,3)[Rmstar]{$R_{m^*}$} +\obj(1,5)[L]{$L$} +\obj(3,5)[Lr]{$L_r$} +\obj(5,5)[R]{$R$} +\obj(2,6)[SigmaL]{$\Sigma^L$} +\obj(6,6)[SigmaR]{$\Sigma^R$} +\mor{Gr}{SigmaG}{$\lambda^G$} +\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] +\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] +\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dashArrow] +\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] +\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] +\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] +\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] +\mor{Krm}{Rmstar}{$r$} +\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] +\mor{Krm}{Grstar}{$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{$m^*$} +\mor{L}{SigmaL}{$\lambda^L$} +\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] +\mor{Lr}{R}{$r$} +\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaR}{$\varphi^r$} +\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} +\enddc +\end{verbatim} +} + +$$ +\begindc{\commdiag}[35] +\obj(1,1)[Gr]{$G$} +\obj(3,1)[Grstar]{$G_{r^*}$} +\obj(5,1)[H]{$H$} +\obj(2,2)[SigmaG]{$\Sigma^G$} +\obj(6,2)[SigmaH]{$\Sigma^H$} +\obj(1,3)[Lm]{$L_m$} +\obj(3,3)[Krm]{$K_{r,m}$} +\obj(5,3)[Rmstar]{$R_{m^*}$} +\obj(1,5)[L]{$L$} +\obj(3,5)[Lr]{$L_r$} +\obj(5,5)[R]{$R$} +\obj(2,6)[SigmaL]{$\Sigma^L$} +\obj(6,6)[SigmaR]{$\Sigma^R$} +\mor{Gr}{SigmaG}{$\lambda^G$} +\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] +\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] +\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dashArrow] +\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] +\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] +\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] +\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] +\mor{Krm}{Rmstar}{$r$} +\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] +\mor{Krm}{Grstar}{$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{$m^*$} +\mor{L}{SigmaL}{$\lambda^L$} +\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] +\mor{Lr}{R}{$r$} +\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaR}{$\varphi^r$} +\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} +\enddc +$$ + +\vfill +\pagebreak + + +\vfill +\pagebreak + +{\scriptsize +\begin{verbatim} +\begindc{\commdiag}[4] +\obj(10,10){$G$}[Gr] +\obj(30,10){$G_{r^*}$}[Grstar] +\obj(50,10){$H$}[H] +\obj(20,20){$\Sigma^G$}[SigmaG] +\obj(60,20){$\Sigma^H$}[SigmaH] +\obj(10,30){$L_m$}[Lm] +\obj(30,30){$K_{r,m}$}[Krm] +\obj(50,30){$R_{m^*}$}[Rmstar] +\obj(10,50){$L$}[L] +\obj(30,50){$L_r$}[Lr] +\obj(50,50){$R$}[R] +\obj(20,60){$\Sigma^L$}[SigmaL] +\obj(60,60){$\Sigma^R$}[SigmaR] +\mor{Gr}{SigmaG}{$\lambda^G$} +\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] +\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] +\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dashArrow] +\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] +\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] +\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] +\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] +\mor{Krm}{Rmstar}{$r$} +\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] +\mor{Krm}{Grstar}{$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{$m^*$} +\mor{L}{SigmaL}{$\lambda^L$} +\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] +\mor{Lr}{R}{$r$} +\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaR}{$\varphi^r$} +\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} +\cmor((10,7)(11,3)(15,2)(40,2)(65,2)(69,3)(70,7)(70,10)(70,14)(69,18)(65,19)) +\pleft(75,10){$\varphi^{r^*}\lambda^G$} +\cmor((10,53)(10,58)(10,63)(11,67)(15,68)(45,68)(65,68)(69,67)(70,63)(70,44)(70,25)(69,21)(65,20)) +\pleft(76,40){$\varphi^{m^*}\varphi^r\lambda^L$} +\enddc +\end{verbatim} +} + +$$ +\begindc{\commdiag}[4] +\obj(10,10)[Gr]{$G$} +\obj(30,10)[Grstar]{$G_{r^*}$} +\obj(50,10)[H]{$H$} +\obj(20,20)[SigmaG]{$\Sigma^G$} +\obj(60,20)[SigmaH]{$\Sigma^H$} +\obj(10,30)[Lm]{$L_m$} +\obj(30,30)[Krm]{$K_{r,m}$} +\obj(50,30)[Rmstar]{$R_{m^*}$} +\obj(10,50)[L]{$L$} +\obj(30,50)[Lr]{$L_r$} +\obj(50,50)[R]{$R$} +\obj(20,60)[SigmaL]{$\Sigma^L$} +\obj(60,60)[SigmaR]{$\Sigma^R$} +\mor{Gr}{SigmaG}{$\lambda^G$} +\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] +\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] +\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dashArrow] +\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] +\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] +\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] +\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] +\mor{Krm}{Rmstar}{$r$} +\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] +\mor{Krm}{Grstar}{$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{$m^*$} +\mor{L}{SigmaL}{$\lambda^L$} +\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] +\mor{Lr}{R}{$r$} +\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaR}{$\varphi^r$} +\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} +\cmor((10,7)(11,3)(15,2)(40,2)(65,2)(69,3)(70,7)(70,10)(70,14)(69,18)(65,19)) +\pleft(75,10){$\varphi^{r^*}\lambda^G$} +\cmor((10,53)(10,58)(10,63)(11,67)(15,68)(45,68)(65,68)(69,67)(70,63)(70,44)(70,25)(69,21)(65,20)) \pleft(76,40){$\varphi^{m^*}\varphi^r\lambda^L$} +\enddc +$$ + +\vfill +\pagebreak + +{\scriptsize +\begin{verbatim} +\begindc{\commdiag}[4] +\obj(10,10)[Gr]{$G$} +\obj(30,10)[Grstar]{$G_{r^*}$} +\obj(50,10)[H]{$H$} +\obj(20,20)[SigmaG]{$\Sigma^G$} +\obj(60,20)[SigmaH]{$\Sigma^H$} +\obj(10,30)[Lm]{$L_m$} +\obj(30,30)[Krm]{$K_{r,m}$} +\obj(50,30)[Rmstar]{$R_{m^*}$} +\obj(10,50)[L]{$L$} +\obj(30,50)[Lr]{$L_r$} +\obj(50,50)[R]{$R$} +\obj(20,60)[SigmaL]{$\Sigma^L$} +\obj(60,60)[SigmaR]{$\Sigma^R$} +\mor{Gr}{SigmaG}{$\lambda^G$} +\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] +\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] +\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dashArrow] +\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] +\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] +\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] +\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] +\mor{Krm}{Rmstar}{$r$} +\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] +\mor{Krm}{Grstar}{$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{$m^*$} +\mor{L}{SigmaL}{$\lambda^L$} +\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] +\mor{Lr}{R}{$r$} +\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaR}{$\varphi^r$} +\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} +\cmor((10,7)(11,3)(15,2)(33,2)(53,2)(56,3)(61,8)(66,13)(69,16)(69,18)(65,19)) +\pleft(75,10){$\varphi^{r^*}\lambda^G$} +\cmor((10,53)(10,54)(10,55)(11,59)(15,64)(19,67)(23,68)(44,68)(65,68)(69,67)(70,63)(70,44)(70,25)(69,21)(65,20)) +\pleft(76,40){$\varphi^{m^*}\varphi^r\lambda^L$} +\enddc +\end{verbatim} +} + +$$ +\begindc{\commdiag}[4] +\obj(10,10)[Gr]{$G$} +\obj(30,10)[Grstar]{$G_{r^*}$} +\obj(50,10)[H]{$H$} +\obj(20,20)[SigmaG]{$\Sigma^G$} +\obj(60,20)[SigmaH]{$\Sigma^H$} +\obj(10,30)[Lm]{$L_m$} +\obj(30,30)[Krm]{$K_{r,m}$} +\obj(50,30)[Rmstar]{$R_{m^*}$} +\obj(10,50)[L]{$L$} +\obj(30,50)[Lr]{$L_r$} +\obj(50,50)[R]{$R$} +\obj(20,60)[SigmaL]{$\Sigma^L$} +\obj(60,60)[SigmaR]{$\Sigma^R$} +\mor{Gr}{SigmaG}{$\lambda^G$} +\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] +\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] +\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dashArrow] +\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] +\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] +\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] +\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] +\mor{Krm}{Rmstar}{$r$} +\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] +\mor{Krm}{Grstar}{$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{$m^*$} +\mor{L}{SigmaL}{$\lambda^L$} +\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] +\mor{Lr}{R}{$r$} +\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] +\mor{SigmaL}{SigmaR}{$\varphi^r$} +\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} +\cmor((10,7)(11,3)(15,2)(33,2)(53,2)(56,3)(61,8)(66,13)(69,16)(69,18)(65,19)) +\pleft(75,10){$\varphi^{r^*}\lambda^G$} +\cmor((10,53)(10,54)(10,55)(11,59)(15,64)(19,67)(23,68)(44,68)(65,68)(69,67)(70,63)(70,44)(70,25)(69,21)(65,20)) +\pleft(76,40){$\varphi^{m^*}\varphi^r\lambda^L$} +\enddc +$$ + +\vfill +\pagebreak + +\paragraph{Undirected Graphs --- Magnification factor,} the +magnification factor gives us the capability of adapting the size of +the graph to the available space, without having to redesign the +graph, for example the specification of the next two graphs differs +only in the magnification factor: 20 for the first; and 16 for the +second. + +\begin{center} + \begin{tabular}{cc} + \begindc{\undigraph}[20] + \obj(1,1)[1]{} + \obj(3,2)[2]{} + \obj(5,1)[3]{} + \obj(3,4)[4]{} + \mor{1}{2}{} + \mor{1}{3}{} + \mor{2}{3}{} + \mor{4}{1}{} + \mor{4}{3}{} + \mor{2}{4}{} + \enddc &\qquad + \begindc{\undigraph}[16] + \obj(1,1)[1]{} + \obj(3,2)[2]{} + \obj(5,1)[3]{} + \obj(3,4)[4]{} + \mor{1}{2}{} + \mor{1}{3}{} + \mor{2}{3}{} + \mor{4}{1}{} + \mor{4}{3}{} + \mor{2}{4}{} + \enddc + \end{tabular} +\end{center} + +{\scriptsize +\begin{verbatim} + \begindc{\undigraph}[20] \begindc{\undigraph}[16] + \obj(1,1)[1]{} \obj(1,1)[1]{} + \obj(3,2)[2]{} \obj(3,2)[2]{} + \obj(5,1)[3]{} \obj(5,1)[3]{} + \obj(3,4)[4]{} \obj(3,4)[4]{} + \mor{1}{2}{} \mor{1}{2}{} + \mor{1}{3}{} \mor{1}{3}{} + \mor{2}{3}{} \mor{2}{3}{} + \mor{4}{1}{} \mor{4}{1}{} + \mor{4}{3}{} \mor{4}{3}{} + \mor{2}{4}{} \mor{2}{4}{} + \enddc \enddc +\end{verbatim}} + +\paragraph{Undirected Graphs --- ``Around the World''} + +$$ +\begindc{\undigraph}[7] +\obj(6,4){18}[\south] +\obj(18,4){17}[\south] +\obj(8,7){11}[\west] +\obj(12,8){12}[\south] +\obj(16,7){13}[\east] +\obj(8,11){10}[\west] +\obj(10,12){6}[\northwest] +\obj(12,10){5} +\obj(14,12){4}[\northeast] +\obj(16,11){14}[\east] +\obj(2,16){19} +\obj(6,15){9} +\obj(9,16){8} +\obj(11,14){7} +\obj(13,14){3} +\obj(15,16){2} +\obj(18,15){15} +\obj(22,16){16} +\obj(12,19){1}[\northeast] +\obj(12,22){20} +\mor{18}{17}{}\mor{18}{11}{}\mor{18}{19}{} +\mor{11}{12}{}\mor{11}{10}{}\mor{12}{13}{} +\mor{12}{5}{}\mor{10}{6}{}\mor{10}{9}{} +\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}{} +\mor{13}{14}{}\mor{9}{19}{}\mor{9}{8}{} +\mor{6}{7}{}\mor{4}{3}{}\mor{4}{14}{} +\mor{19}{20}{}\mor{8}{1}{}\mor{8}{7}{} +\mor{7}{3}{}\mor{3}{2}{}\mor{2}{1}{} +\mor{2}{15}{}\mor{14}{15}{}\mor{17}{16}{} +\mor{16}{20}{}\mor{1}{20}{}\mor{15}{16}{} +\enddc +$$ +{\scriptsize +\begin{verbatim} +\begindc{\undigraph}[7] +\obj(6,4){18}[\south] +\obj(18,4){17}[\south] +\obj(8,7){11}[\west] +\obj(12,8){12}[\south] +\obj(16,7){13}[\east] +\obj(8,11){10}[\west] +\obj(10,12){6}[\northwest] +\obj(12,10){5} +\obj(14,12){4}[\northeast] +\obj(16,11){14}[\east] +\obj(2,16){19} +\obj(6,15){9} +\obj(9,16){8} +\obj(11,14){7} +\obj(13,14){3} +\obj(15,16){2} +\obj(18,15){15} +\obj(22,16){16} +\obj(12,19){1}[\northeast] +\obj(12,22){20} +\mor{18}{17}{}\mor{18}{11}{}\mor{18}{19}{} +\mor{11}{12}{}\mor{11}{10}{}\mor{12}{13}{} +\mor{12}{5}{}\mor{10}{6}{}\mor{10}{9}{} +\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}{} +\mor{13}{14}{}\mor{9}{19}{}\mor{9}{8}{} +\mor{6}{7}{}\mor{4}{3}{}\mor{4}{14}{} +\mor{19}{20}{}\mor{8}{1}{}\mor{8}{7}{} +\mor{7}{3}{}\mor{3}{2}{}\mor{2}{1}{} +\mor{2}{15}{}\mor{14}{15}{}\mor{17}{16}{} +\mor{16}{20}{}\mor{1}{20}{}\mor{15}{16}{} +\enddc +\end{verbatim}} + +\vfill +\pagebreak + + +\paragraph{Directed Graphs} + +$$ +\begindc{\digraph}[25] +\obj(1,5){A}[\west] +\obj(1,3){B}[\west] +\obj(1,1){C}[\west] +\obj(5,5){E}[\east] +\obj(5,3){F}[\east] +\obj(5,1){G}[\east] +\mor{A}{E}{5} +\mor{A}{F}{3} +\mor{B}{F}{6}[\atright,\solidarrow] +\mor{C}{E}{1} +\mor{C}{F}{5} +\mor{C}{G}{7} +\enddc +$$ + + +{\scriptsize +\begin{verbatim} +\begindc{\digraph}[25] +\obj(1,5){A}[\west] +\obj(1,3){B}[\west] +\obj(1,1){C}[\west] +\obj(5,5){E}[\east] +\obj(5,3){F}[\east] +\obj(5,1){G}[\east] +\mor{A}{E}{5} +\mor{A}{F}{3} +\mor{B}{F}{6}[\atright,\solidarrow] +\mor{C}{E}{1} +\mor{C}{F}{5} +\mor{C}{G}{7} +\enddc +\end{verbatim} +} + +\paragraph{Circled Directed Graphs} + +$$ +\begindc{\cdigraph}[20] +\obj(6,6){18}[1] +\obj(12,6){17}[1] +\mor{18}{17}{} +\enddc +$$ + +{\scriptsize +\begin{verbatim} +\begindc{\cdigraph}[20] +\obj(6,6){18}[1] +\obj(12,6){17}[1] +\mor{18}{17}{} +\enddc +\end{verbatim} +} + +\paragraph{Circled Undirected Graphs} + +Some fine adjustment is nedeeded in some lines. + +$$\small +\begindc{\cundigraph}[11] +\obj(6,4){18}[\south]\obj(18,4){17}[\south] +\obj(8,7){11}[\west]\obj(12,8){12}[\south] +\obj(16,7){13}[\east]\obj(8,11){10}[\west] +\obj(10,12)[6]{6}[\south]\obj(12,10)[5]{5}[\east] +\obj(14,12){4}[\northeast]\obj(16,11){14}[\east] +\obj(2,16){19}[\west]\obj(6,15){9} +\obj(9,16){8}\obj(11,14){7}[\west] +\obj(13,14){3}\obj(15,16){2} +\obj(18,15){15}\obj(22,16){16}[\east] +\obj(12,19){1}[\west]\obj(12,22){20}[\north] +\mor{18}{17}[7,7]{}\mor{18}{11}{}\mor{18}{19}{}\mor{11}{12}{} +\mor{11}{10}{}\mor{12}{13}{}\mor{12}{5}{}\mor{10}{6}{} +\mor{10}{9}{}\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}[8,6]{} +\mor{13}{14}{}\mor{9}{19}{}\mor{9}{8}{}\mor{6}{7}{} +\mor{4}{3}{}\mor{4}{14}{}\mor{19}{20}{}\mor{8}{1}{} +\mor{8}{7}{}\mor{7}{3}{}\mor{3}{2}{}\mor{2}{1}{} +\mor{2}{15}{}\mor{14}{15}{}\mor{17}{16}{}\mor{16}{20}{} +\mor{1}{20}{}\mor{15}{16}{} +\enddc +$$ + +{\scriptsize +\begin{verbatim} +\begindc{\cundigraph}[13] +\obj(6,4){18}[\south]\obj(18,4){17}[\south] +\obj(8,7){11}[\west]\obj(12,8){12}[\south] +\obj(16,7){13}[\east]\obj(8,11){10}[\west] +\obj(10,12)[6]{6}[\south]\obj(12,10)[5]{5}[\east] +\obj(14,12){4}[\northeast]\obj(16,11){14}[\east] +\obj(2,16){19}[\west]\obj(6,15){9} +\obj(9,16){8}\obj(11,14){7}[\west] +\obj(13,14){3}\obj(15,16){2} +\obj(18,15){15}\obj(22,16){16}[\east] +\obj(12,19){1}[\west]\obj(12,22){20}[\north] +\mor{18}{17}[7,7]{}\mor{18}{11}{}\mor{18}{19}{}\mor{11}{12}{} +\mor{11}{10}{}\mor{12}{13}{}\mor{12}{5}{}\mor{10}{6}{} +\mor{10}{9}{}\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}[8,6]{} +\mor{13}{14}{}\mor{9}{19}{}\mor{9}{8}{}\mor{6}{7}{} +\mor{4}{3}{}\mor{4}{14}{}\mor{19}{20}{}\mor{8}{1}{} +\mor{8}{7}{}\mor{7}{3}{}\mor{3}{2}{}\mor{2}{1}{} +\mor{2}{15}{}\mor{14}{15}{}\mor{17}{16}{}\mor{16}{20}{} +\mor{1}{20}{}\mor{15}{16}{} +\enddc +\end{verbatim} +} + +\paragraph{New arrows and Lines in v4.1} + +\paragraph{Surjective arrow} + + +$$ +\begindc{\commdiag}[3] +\obj(10,15){$A$} +\obj(40,15)[Al]{$A$} +\obj(25,15){$B$} +\obj(40,5){$A^\prime$} +\mor{$A$}{$B$}{$f$}[\atleft,\surjectivearrow] +\mor{$B$}{Al}{$g$}[\atleft,\surjectivearrow] +\mor{$B$}{$A^\prime$}{$g^\prime$}[\atright,\surjectivearrow] +\enddc +$$ + +\paragraph{Dashed and Dotted lines} + + +$$ +\begindc{\commdiag}[3] +\obj(10,20){$A$} +\obj(40,30)[Al]{$A$} +\obj(25,30){$B$} +\obj(40,40){$A^\prime$} +\obj(40,10)[Ald]{$A$} +\obj(25,10)[Bd]{$B$} +\obj(40,0)[Apd]{$A^\prime$} +\mor{$A$}{$B$}{}[\atleft,\dashline] +\mor{$B$}{Al}{}[\atleft,\dashline] +\mor{$B$}{$A^\prime$}{}[\atright,\dashline] +\mor{$A$}{Bd}{}[\atleft,\dotline] +\mor{Bd}{Ald}{}[\atleft,\dotline] +\mor{Bd}{Apd}{}[\atright,\dotline] +\enddc +$$ + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/latex/dcpic/README b/Master/texmf-dist/doc/latex/dcpic/README deleted file mode 100644 index 34e8945af01..00000000000 --- a/Master/texmf-dist/doc/latex/dcpic/README +++ /dev/null @@ -1,9 +0,0 @@ -DCpic is a package of TeX macros for graph modeling (e.g. -commutative diagrams) in a (La)TeX or ConTeXt document. -Its distinguishing features are: the use of PiCTeX a -powerful graphical engine, and a simple specification -syntax. A graph is described in terms of its objects and -its edges. The objects are textual elements and the edges -can have various straight or curved forms. - -It is under the LaTeX Project Public License \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/dcpic/README.TEXLIVE b/Master/texmf-dist/doc/latex/dcpic/README.TEXLIVE deleted file mode 100644 index 54936b3ccf1..00000000000 --- a/Master/texmf-dist/doc/latex/dcpic/README.TEXLIVE +++ /dev/null @@ -1,7 +0,0 @@ -The following files have been removed in the TeX Live installation of -the current package, typically due to duplication, lack of space, or -missing source code. You can find these files on CTAN. If questions or -concerns, email tex-live.org. - - manPT_dcpic.pdf - man_dcpic.pdf diff --git a/Master/texmf-dist/doc/latex/dcpic/examples.tex b/Master/texmf-dist/doc/latex/dcpic/examples.tex deleted file mode 100644 index a24dcbb5ee1..00000000000 --- a/Master/texmf-dist/doc/latex/dcpic/examples.tex +++ /dev/null @@ -1,754 +0,0 @@ -% $Id: examples.tex,v 1.3 2007/12/13 17:20:09 pedro Exp pedro $ -\documentclass[a4paper]{article} -\usepackage{pictexwd,dcpic} -\usepackage{rcs} - - -\voffset=-2cm -\hoffset=-1cm -\addtolength{\textwidth}{2cm} -\addtolength{\textheight}{4cm} - -\newcommand{\barraA}{\vrule height2em width0em depth0em} -\newcommand{\barraB}{\vrule height1.6em width0em depth0em} - - - - -\begin{document} -\RCS $Revision: 1.3 $ - -\begin{center} - DCpic - Examples (Version \RCSRevision) -\end{center} - - -\paragraph{Commutative Diagrams --- Curved arrows.} - -A rectangular curve with rounded corners is easy to specify and should -cater for most needs. With this in mind we give the following tip to -the user: to specify a rectangular, with rounded corners, curve we -choose the points which give us the {\em expanded chess-horse - movement}, that is, $(x,y)$, $(x\pm4,y\mp1)$, $(x\mp1,y\pm4)$, or -$(x,y)$,$(x\pm1,y\mp4)$, $(x\mp4,y\pm1)$, those sets of points will give us -the four corners of the rectangle; to form the whole line it is only -necessary to add an odd number of points joining the two (or more) -corners. - -{\footnotesize -\begin{verbatim} -\begindc{\commdiag}[2] -\cmor((10,20)(6,21)(5,25)) \pup(5,15){$x$} -\enddc -\end{verbatim} -} - -$$ -\begindc{\commdiag}[3] -\cmor((10,20)(6,21)(5,25)) \pup(5,15){$x$} -\enddc -$$ - -{\footnotesize -\begin{verbatim} -\begindc{\commdiag}[3] -\obj(10,15){$A$} -\obj(40,15)[Al]{$A$} -\obj(25,15){$B$} -\mor{$A$}{$B$}{$f$} -\mor{$B$}{Al}{$g$} -\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) \pup(25,3){$id_A$} -\enddc -\end{verbatim} -} - -$$ -\begindc{\commdiag}[3] -\obj(10,15){$A$} -\obj(40,15)[Al]{$A$} -\obj(25,15){$B$} -\mor{$A$}{$B$}{$f$} -\mor{$B$}{Al}{$g$} -\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) \pup(25,3){$id_A$} -\enddc -$$ - -{\footnotesize -\begin{verbatim} -\begindc{\commdiag}[3] -\obj(14,11){$A$} -\obj(39,11){$B$} -\mor(14,12)(39,12){$f$} -\mor(39,10)(14,10){$g$} -\cmor((10,10)(6,11)(5,15)(6,19)(10,20)(14,19)(15,15)) \pdown(2,20){$id_A$} -\cmor((40,7)(41,3)(45,2)(49,3)(50,7)(49,11)(45,12)) \pleft(54,3){$id_B$} -\enddc -\end{verbatim} -} - -$$ -\begindc{\commdiag}[3] -\obj(14,11){$A$} -\obj(39,11){$B$} -\mor(14,12)(39,12){$f$} -\mor(39,10)(14,10){$g$} -\cmor((10,10)(6,11)(5,15)(6,19)(10,20)(14,19)(15,15)) \pdown(2,20){$id_A$} -\cmor((40,7)(41,3)(45,2)(49,3)(50,7)(49,11)(45,12)) \pleft(54,3){$id_B$} -\enddc -$$ - - -{\footnotesize -\begin{verbatim} -\begindc{\commdiag}[3] -\obj(10,18){$A$} -\obj(40,18){$B$} -\cmor((10,20)(15,25)(20,20)(25,15)(30,20)(35,25)(40,20)) -\pdown(25,12){$f$}[2] -\cmor((10,15)(15,10)(20,15)(25,20)(30,15)(35,10)(40,15)) -\pup(25,22){$g$}[2] -\enddc -\end{verbatim} -} - -$$ -\begindc{\commdiag}[3] -\obj(10,18){$A$} -\obj(40,18){$B$} -\cmor((10,20)(15,25)(20,20)(25,15)(30,20)(35,25)(40,20)) -\pdown(25,12){$f$}[2] -\cmor((10,15)(15,10)(20,15)(25,20)(30,15)(35,10)(40,15)) -\pup(25,22){$g$}[2] -\enddc -$$ - - -\vfill -\pagebreak - - -\paragraph{Commutative Diagrams --- Size Adjusting.} With the new -version (v4.0) two new features are introduced, relative specification -{\tt $\backslash$mor\{objA\}\{objB\}} instead of {\tt $\backslash$mor(1,3)(4,5)}, and the arrows now -automatically adjust their size to the object's box size. - - - -{\scriptsize -\begin{verbatim} -\begindc{\commdiag} -\obj(1,3)[objSum]{$\displaystyle \sum_{k=2}^n \left\lfloor\frac{\phi(k)}{k-1}\right\rfloor}$} -\obj(4,5)[objB]{$B$} -\obj(4,3)[objA]{$A$} -\obj(4,1)[objBp]{$B$} -\mor{objSum}{objB}{$f$} -\mor{objB}{objA}{$g$} -\mor{objSum}{objA}{$f\circ g$}[\atright,\solidarrow] -\mor{objSum}{objBp}{$f$}[\atright,\solidarrow] -\mor{objA}{objBp}{$g$}[\atright,\solidarrow] -\enddc -\end{verbatim} -} - -$$ -\begindc{\commdiag} -\obj(1,3)[objSum]{$\displaystyle \sum_{k=2}^n \left\lfloor\frac{\phi(k)}{k-1}\right\rfloor$} -\obj(4,5)[objB]{$B$} -\obj(4,3)[objA]{$A$} -\obj(4,1)[objBp]{$B$} -\mor{objSum}{objB}{$f$} -\mor{objB}{objA}{$g$} -\mor{objSum}{objA}{$f\circ g$}[\atright,\solidarrow] -\mor{objSum}{objBp}{$f$}[\atright,\solidarrow] -\mor{objA}{objBp}{$g$}[\atright,\solidarrow] -\enddc -$$ - - -{\scriptsize -\begin{verbatim} -\begindc{\commdiag} -\obj(10,10)[A]{$OOOOOO$}\obj(15,10)[Aa]{$XXXX$}\obj(14,11)[Ab]{$XXXX$} -\obj(13,12)[Ac]{$XXXX$}\obj(12,13)[Ad]{$XXXX$}\obj(11,14)[Ae]{$XXXX$} -\obj(10,15)[Af]{$XXXX$}\obj(9,14)[Ag]{$BBBB$}\obj(8,13)[Ah]{$XXXX$} -\obj(7,12)[Ai]{$XXXX$}\obj(6,11)[Aj]{$XXXX$}\obj(5,10)[Ak]{$XXXX$} -\obj(6,9)[Al]{$XXXX$}\obj(7,8)[Am]{$XXXX$}\obj(8,7)[An]{$BBBB$} -\obj(9,6)[Ao]{$CCCC$}\obj(10,5)[Ap]{$DDDD$}\obj(11,6)[Aq]{$EEEE$} -\obj(12,7)[Ar]{$EEEE$}\obj(13,8)[As]{$EEEE$}\obj(14,9)[At]{$EEEE$} -\mor{A}{Aa}{$a1$}\mor{A}{Ab}{$a2$}\mor{A}{Ac}{$a3$}\mor{A}{Ad}{$a4$} -\mor{A}{Ae}{$a5$}\mor{A}{Af}{$a6$}\mor{A}{Ag}{$a7$}\mor{A}{Ah}{$a8$} -\mor{A}{Ai}{$a9$}\mor{A}{Aj}{$a10$}\mor{A}{Ak}{$a11$}\mor{A}{Al}{$a12$} -\mor{A}{Am}{$a13$}\mor{A}{An}{$a14$}\mor{A}{Ao}{$a15$}\mor{A}{Ap}{$a16$} -\mor{A}{Aq}{$a17$}\mor{A}{Ar}{$a18$}\mor{A}{As}{$a19$}\mor{A}{At}{$a20$} -\enddc -\end{verbatim} -} - -$$ -\begindc{\commdiag}[29] -\obj(10,10)[A]{$OOOOOO$}\obj(15,10)[Aa]{$XXXX$}\obj(14,11)[Ab]{$XXXX$} -\obj(13,12)[Ac]{$XXXX$}\obj(12,13)[Ad]{$XXXX$}\obj(11,14)[Ae]{$XXXX$} -\obj(10,15)[Af]{$XXXX$}\obj(9,14)[Ag]{$BBBB$}\obj(8,13)[Ah]{$XXXX$} -\obj(7,12)[Ai]{$XXXX$}\obj(6,11)[Aj]{$XXXX$}\obj(5,10)[Ak]{$XXXX$} -\obj(6,9)[Al]{$XXXX$}\obj(7,8)[Am]{$XXXX$}\obj(8,7)[An]{$BBBB$} -\obj(9,6)[Ao]{$CCCC$}\obj(10,5)[Ap]{$DDDD$}\obj(11,6)[Aq]{$EEEE$} -\obj(12,7)[Ar]{$EEEE$}\obj(13,8)[As]{$EEEE$}\obj(14,9)[At]{$EEEE$} -\mor{A}{Aa}{$a1$}\mor{A}{Ab}{$a2$}\mor{A}{Ac}{$a3$}\mor{A}{Ad}{$a4$} -\mor{A}{Ae}{$a5$}\mor{A}{Af}{$a6$}\mor{A}{Ag}{$a7$}\mor{A}{Ah}{$a8$} -\mor{A}{Ai}{$a9$}\mor{A}{Aj}{$a10$}\mor{A}{Ak}{$a11$}\mor{A}{Al}{$a12$} -\mor{A}{Am}{$a13$}\mor{A}{An}{$a14$}\mor{A}{Ao}{$a15$}\mor{A}{Ap}{$a16$} -\mor{A}{Aq}{$a17$}\mor{A}{Ar}{$a18$}\mor{A}{As}{$a19$}\mor{A}{At}{$a20$} -\enddc -$$ - -\vfill -\pagebreak - - -\paragraph{Commutative Diagrams --- A Complex Diagram} - -{\scriptsize -\begin{verbatim} -\begindc{\commdiag}[35] -\obj(1,1)[Gr]{$G$} -\obj(3,1)[Grstar]{$G_{r^*}$} -\obj(5,1)[H]{$H$} -\obj(2,2)[SigmaG]{$\Sigma^G$} -\obj(6,2)[SigmaH]{$\Sigma^H$} -\obj(1,3)[Lm]{$L_m$} -\obj(3,3)[Krm]{$K_{r,m}$} -\obj(5,3)[Rmstar]{$R_{m^*}$} -\obj(1,5)[L]{$L$} -\obj(3,5)[Lr]{$L_r$} -\obj(5,5)[R]{$R$} -\obj(2,6)[SigmaL]{$\Sigma^L$} -\obj(6,6)[SigmaR]{$\Sigma^R$} -\mor{Gr}{SigmaG}{$\lambda^G$} -\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] -\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] -\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dasharrow] -\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] -\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] -\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] -\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] -\mor{Krm}{Rmstar}{$r$} -\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] -\mor{Krm}{Grstar}{$m$} -\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] -\mor{Rmstar}{H}{$m^*$} -\mor{L}{SigmaL}{$\lambda^L$} -\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] -\mor{Lr}{R}{$r$} -\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaR}{$\varphi^r$} -\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} -\enddc -\end{verbatim} -} - -$$ -\begindc{\commdiag}[35] -\obj(1,1)[Gr]{$G$} -\obj(3,1)[Grstar]{$G_{r^*}$} -\obj(5,1)[H]{$H$} -\obj(2,2)[SigmaG]{$\Sigma^G$} -\obj(6,2)[SigmaH]{$\Sigma^H$} -\obj(1,3)[Lm]{$L_m$} -\obj(3,3)[Krm]{$K_{r,m}$} -\obj(5,3)[Rmstar]{$R_{m^*}$} -\obj(1,5)[L]{$L$} -\obj(3,5)[Lr]{$L_r$} -\obj(5,5)[R]{$R$} -\obj(2,6)[SigmaL]{$\Sigma^L$} -\obj(6,6)[SigmaR]{$\Sigma^R$} -\mor{Gr}{SigmaG}{$\lambda^G$} -\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] -\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] -\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dasharrow] -\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] -\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] -\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] -\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] -\mor{Krm}{Rmstar}{$r$} -\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] -\mor{Krm}{Grstar}{$m$} -\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] -\mor{Rmstar}{H}{$m^*$} -\mor{L}{SigmaL}{$\lambda^L$} -\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] -\mor{Lr}{R}{$r$} -\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaR}{$\varphi^r$} -\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} -\enddc -$$ - -\vfill -\pagebreak - - -\vfill -\pagebreak - -{\scriptsize -\begin{verbatim} -\begindc{\commdiag}[4] -\obj(10,10){$G$}[Gr] -\obj(30,10){$G_{r^*}$}[Grstar] -\obj(50,10){$H$}[H] -\obj(20,20){$\Sigma^G$}[SigmaG] -\obj(60,20){$\Sigma^H$}[SigmaH] -\obj(10,30){$L_m$}[Lm] -\obj(30,30){$K_{r,m}$}[Krm] -\obj(50,30){$R_{m^*}$}[Rmstar] -\obj(10,50){$L$}[L] -\obj(30,50){$L_r$}[Lr] -\obj(50,50){$R$}[R] -\obj(20,60){$\Sigma^L$}[SigmaL] -\obj(60,60){$\Sigma^R$}[SigmaR] -\mor{Gr}{SigmaG}{$\lambda^G$} -\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] -\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] -\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dasharrow] -\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] -\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] -\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] -\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] -\mor{Krm}{Rmstar}{$r$} -\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] -\mor{Krm}{Grstar}{$m$} -\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] -\mor{Rmstar}{H}{$m^*$} -\mor{L}{SigmaL}{$\lambda^L$} -\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] -\mor{Lr}{R}{$r$} -\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaR}{$\varphi^r$} -\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} -\cmor((10,7)(11,3)(15,2)(40,2)(65,2)(69,3)(70,7)(70,10)(70,14)(69,18)(65,19)) -\pleft(75,10){$\varphi^{r^*}\lambda^G$} -\cmor((10,53)(10,58)(10,63)(11,67)(15,68)(45,68)(65,68)(69,67)(70,63)(70,44)(70,25)(69,21)(65,20)) -\pleft(76,40){$\varphi^{m^*}\varphi^r\lambda^L$} -\enddc -\end{verbatim} -} - -$$ -\begindc{\commdiag}[4] -\obj(10,10)[Gr]{$G$} -\obj(30,10)[Grstar]{$G_{r^*}$} -\obj(50,10)[H]{$H$} -\obj(20,20)[SigmaG]{$\Sigma^G$} -\obj(60,20)[SigmaH]{$\Sigma^H$} -\obj(10,30)[Lm]{$L_m$} -\obj(30,30)[Krm]{$K_{r,m}$} -\obj(50,30)[Rmstar]{$R_{m^*}$} -\obj(10,50)[L]{$L$} -\obj(30,50)[Lr]{$L_r$} -\obj(50,50)[R]{$R$} -\obj(20,60)[SigmaL]{$\Sigma^L$} -\obj(60,60)[SigmaR]{$\Sigma^R$} -\mor{Gr}{SigmaG}{$\lambda^G$} -\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] -\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] -\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dasharrow] -\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] -\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] -\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] -\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] -\mor{Krm}{Rmstar}{$r$} -\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] -\mor{Krm}{Grstar}{$m$} -\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] -\mor{Rmstar}{H}{$m^*$} -\mor{L}{SigmaL}{$\lambda^L$} -\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] -\mor{Lr}{R}{$r$} -\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaR}{$\varphi^r$} -\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} -\cmor((10,7)(11,3)(15,2)(40,2)(65,2)(69,3)(70,7)(70,10)(70,14)(69,18)(65,19)) -\pleft(75,10){$\varphi^{r^*}\lambda^G$} -\cmor((10,53)(10,58)(10,63)(11,67)(15,68)(45,68)(65,68)(69,67)(70,63)(70,44)(70,25)(69,21)(65,20)) \pleft(76,40){$\varphi^{m^*}\varphi^r\lambda^L$} -\enddc -$$ - -\vfill -\pagebreak - -{\scriptsize -\begin{verbatim} -\begindc{\commdiag}[4] -\obj(10,10)[Gr]{$G$} -\obj(30,10)[Grstar]{$G_{r^*}$} -\obj(50,10)[H]{$H$} -\obj(20,20)[SigmaG]{$\Sigma^G$} -\obj(60,20)[SigmaH]{$\Sigma^H$} -\obj(10,30)[Lm]{$L_m$} -\obj(30,30)[Krm]{$K_{r,m}$} -\obj(50,30)[Rmstar]{$R_{m^*}$} -\obj(10,50)[L]{$L$} -\obj(30,50)[Lr]{$L_r$} -\obj(50,50)[R]{$R$} -\obj(20,60)[SigmaL]{$\Sigma^L$} -\obj(60,60)[SigmaR]{$\Sigma^R$} -\mor{Gr}{SigmaG}{$\lambda^G$} -\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] -\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] -\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dasharrow] -\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] -\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] -\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] -\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] -\mor{Krm}{Rmstar}{$r$} -\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] -\mor{Krm}{Grstar}{$m$} -\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] -\mor{Rmstar}{H}{$m^*$} -\mor{L}{SigmaL}{$\lambda^L$} -\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] -\mor{Lr}{R}{$r$} -\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaR}{$\varphi^r$} -\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} -\cmor((10,7)(11,3)(15,2)(33,2)(53,2)(56,3)(61,8)(66,13)(69,16)(69,18)(65,19)) -\pleft(75,10){$\varphi^{r^*}\lambda^G$} -\cmor((10,53)(10,54)(10,55)(11,59)(15,64)(19,67)(23,68)(44,68)(65,68)(69,67)(70,63)(70,44)(70,25)(69,21)(65,20)) -\pleft(76,40){$\varphi^{m^*}\varphi^r\lambda^L$} -\enddc -\end{verbatim} -} - -$$ -\begindc{\commdiag}[4] -\obj(10,10)[Gr]{$G$} -\obj(30,10)[Grstar]{$G_{r^*}$} -\obj(50,10)[H]{$H$} -\obj(20,20)[SigmaG]{$\Sigma^G$} -\obj(60,20)[SigmaH]{$\Sigma^H$} -\obj(10,30)[Lm]{$L_m$} -\obj(30,30)[Krm]{$K_{r,m}$} -\obj(50,30)[Rmstar]{$R_{m^*}$} -\obj(10,50)[L]{$L$} -\obj(30,50)[Lr]{$L_r$} -\obj(50,50)[R]{$R$} -\obj(20,60)[SigmaL]{$\Sigma^L$} -\obj(60,60)[SigmaR]{$\Sigma^R$} -\mor{Gr}{SigmaG}{$\lambda^G$} -\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] -\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] -\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dasharrow] -\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] -\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] -\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] -\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] -\mor{Krm}{Rmstar}{$r$} -\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] -\mor{Krm}{Grstar}{$m$} -\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] -\mor{Rmstar}{H}{$m^*$} -\mor{L}{SigmaL}{$\lambda^L$} -\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] -\mor{Lr}{R}{$r$} -\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] -\mor{SigmaL}{SigmaR}{$\varphi^r$} -\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} -\cmor((10,7)(11,3)(15,2)(33,2)(53,2)(56,3)(61,8)(66,13)(69,16)(69,18)(65,19)) -\pleft(75,10){$\varphi^{r^*}\lambda^G$} -\cmor((10,53)(10,54)(10,55)(11,59)(15,64)(19,67)(23,68)(44,68)(65,68)(69,67)(70,63)(70,44)(70,25)(69,21)(65,20)) -\pleft(76,40){$\varphi^{m^*}\varphi^r\lambda^L$} -\enddc -$$ - -\vfill -\pagebreak - -\paragraph{Undirected Graphs --- Magnification factor,} the -magnification factor gives us the capability of adapting the size of -the graph to the available space, without having to redesign the -graph, for example the specification of the next two graphs differs -only in the magnification factor: 20 for the first; and 16 for the -second. - -\begin{center} - \begin{tabular}{cc} - \begindc{\undigraph}[20] - \obj(1,1)[1]{} - \obj(3,2)[2]{} - \obj(5,1)[3]{} - \obj(3,4)[4]{} - \mor{1}{2}{} - \mor{1}{3}{} - \mor{2}{3}{} - \mor{4}{1}{} - \mor{4}{3}{} - \mor{2}{4}{} - \enddc &\qquad - \begindc{\undigraph}[16] - \obj(1,1)[1]{} - \obj(3,2)[2]{} - \obj(5,1)[3]{} - \obj(3,4)[4]{} - \mor{1}{2}{} - \mor{1}{3}{} - \mor{2}{3}{} - \mor{4}{1}{} - \mor{4}{3}{} - \mor{2}{4}{} - \enddc - \end{tabular} -\end{center} - -{\scriptsize -\begin{verbatim} - \begindc{\undigraph}[20] \begindc{\undigraph}[16] - \obj(1,1)[1]{} \obj(1,1)[1]{} - \obj(3,2)[2]{} \obj(3,2)[2]{} - \obj(5,1)[3]{} \obj(5,1)[3]{} - \obj(3,4)[4]{} \obj(3,4)[4]{} - \mor{1}{2}{} \mor{1}{2}{} - \mor{1}{3}{} \mor{1}{3}{} - \mor{2}{3}{} \mor{2}{3}{} - \mor{4}{1}{} \mor{4}{1}{} - \mor{4}{3}{} \mor{4}{3}{} - \mor{2}{4}{} \mor{2}{4}{} - \enddc \enddc -\end{verbatim}} - -\paragraph{Undirected Graphs --- ``Around the World''} - -$$ -\begindc{\undigraph}[7] -\obj(6,4){18}[\south] -\obj(18,4){17}[\south] -\obj(8,7){11}[\west] -\obj(12,8){12}[\south] -\obj(16,7){13}[\east] -\obj(8,11){10}[\west] -\obj(10,12){6}[\northwest] -\obj(12,10){5} -\obj(14,12){4}[\northeast] -\obj(16,11){14}[\east] -\obj(2,16){19} -\obj(6,15){9} -\obj(9,16){8} -\obj(11,14){7} -\obj(13,14){3} -\obj(15,16){2} -\obj(18,15){15} -\obj(22,16){16} -\obj(12,19){1}[\northeast] -\obj(12,22){20} -\mor{18}{17}{}\mor{18}{11}{}\mor{18}{19}{} -\mor{11}{12}{}\mor{11}{10}{}\mor{12}{13}{} -\mor{12}{5}{}\mor{10}{6}{}\mor{10}{9}{} -\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}{} -\mor{13}{14}{}\mor{9}{19}{}\mor{9}{8}{} -\mor{6}{7}{}\mor{4}{3}{}\mor{4}{14}{} -\mor{19}{20}{}\mor{8}{1}{}\mor{8}{7}{} -\mor{7}{3}{}\mor{3}{2}{}\mor{2}{1}{} -\mor{2}{15}{}\mor{14}{15}{}\mor{17}{16}{} -\mor{16}{20}{}\mor{1}{20}{}\mor{15}{16}{} -\enddc -$$ -{\scriptsize -\begin{verbatim} -\begindc{\undigraph}[7] -\obj(6,4){18}[\south] -\obj(18,4){17}[\south] -\obj(8,7){11}[\west] -\obj(12,8){12}[\south] -\obj(16,7){13}[\east] -\obj(8,11){10}[\west] -\obj(10,12){6}[\northwest] -\obj(12,10){5} -\obj(14,12){4}[\northeast] -\obj(16,11){14}[\east] -\obj(2,16){19} -\obj(6,15){9} -\obj(9,16){8} -\obj(11,14){7} -\obj(13,14){3} -\obj(15,16){2} -\obj(18,15){15} -\obj(22,16){16} -\obj(12,19){1}[\northeast] -\obj(12,22){20} -\mor{18}{17}{}\mor{18}{11}{}\mor{18}{19}{} -\mor{11}{12}{}\mor{11}{10}{}\mor{12}{13}{} -\mor{12}{5}{}\mor{10}{6}{}\mor{10}{9}{} -\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}{} -\mor{13}{14}{}\mor{9}{19}{}\mor{9}{8}{} -\mor{6}{7}{}\mor{4}{3}{}\mor{4}{14}{} -\mor{19}{20}{}\mor{8}{1}{}\mor{8}{7}{} -\mor{7}{3}{}\mor{3}{2}{}\mor{2}{1}{} -\mor{2}{15}{}\mor{14}{15}{}\mor{17}{16}{} -\mor{16}{20}{}\mor{1}{20}{}\mor{15}{16}{} -\enddc -\end{verbatim}} - -\vfill -\pagebreak - - -\paragraph{Directed Graphs} - -$$ -\begindc{\digraph}[25] -\obj(1,5){A}[\west] -\obj(1,3){B}[\west] -\obj(1,1){C}[\west] -\obj(5,5){E}[\east] -\obj(5,3){F}[\east] -\obj(5,1){G}[\east] -\mor{A}{E}{5} -\mor{A}{F}{3} -\mor{B}{F}{6}[\atright,\solidarrow] -\mor{C}{E}{1} -\mor{C}{F}{5} -\mor{C}{G}{7} -\enddc -$$ - - -{\scriptsize -\begin{verbatim} -\begindc{\digraph}[25] -\obj(1,5){A}[\west] -\obj(1,3){B}[\west] -\obj(1,1){C}[\west] -\obj(5,5){E}[\east] -\obj(5,3){F}[\east] -\obj(5,1){G}[\east] -\mor{A}{E}{5} -\mor{A}{F}{3} -\mor{B}{F}{6}[\atright,\solidarrow] -\mor{C}{E}{1} -\mor{C}{F}{5} -\mor{C}{G}{7} -\enddc -\end{verbatim} -} - -\paragraph{Circled Directed Graphs} - -$$ -\begindc{\cdigraph}[20] -\obj(6,6){18}[1] -\obj(12,6){17}[1] -\mor{18}{17}{} -\enddc -$$ - -{\scriptsize -\begin{verbatim} -\begindc{\cdigraph}[20] -\obj(6,6){18}[1] -\obj(12,6){17}[1] -\mor{18}{17}{} -\enddc -\end{verbatim} -} - -\paragraph{Circled Undirected Graphs} - -Some fine adjustment is nedeeded in some lines. - -$$\small -\begindc{\cundigraph}[11] -\obj(6,4){18}[\south]\obj(18,4){17}[\south] -\obj(8,7){11}[\west]\obj(12,8){12}[\south] -\obj(16,7){13}[\east]\obj(8,11){10}[\west] -\obj(10,12)[6]{6}[\south]\obj(12,10)[5]{5}[\east] -\obj(14,12){4}[\northeast]\obj(16,11){14}[\east] -\obj(2,16){19}[\west]\obj(6,15){9} -\obj(9,16){8}\obj(11,14){7}[\west] -\obj(13,14){3}\obj(15,16){2} -\obj(18,15){15}\obj(22,16){16}[\east] -\obj(12,19){1}[\west]\obj(12,22){20}[\north] -\mor{18}{17}[7,7]{}\mor{18}{11}{}\mor{18}{19}{}\mor{11}{12}{} -\mor{11}{10}{}\mor{12}{13}{}\mor{12}{5}{}\mor{10}{6}{} -\mor{10}{9}{}\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}[8,6]{} -\mor{13}{14}{}\mor{9}{19}{}\mor{9}{8}{}\mor{6}{7}{} -\mor{4}{3}{}\mor{4}{14}{}\mor{19}{20}{}\mor{8}{1}{} -\mor{8}{7}{}\mor{7}{3}{}\mor{3}{2}{}\mor{2}{1}{} -\mor{2}{15}{}\mor{14}{15}{}\mor{17}{16}{}\mor{16}{20}{} -\mor{1}{20}{}\mor{15}{16}{} -\enddc -$$ - -{\scriptsize -\begin{verbatim} -\begindc{\cundigraph}[13] -\obj(6,4){18}[\south]\obj(18,4){17}[\south] -\obj(8,7){11}[\west]\obj(12,8){12}[\south] -\obj(16,7){13}[\east]\obj(8,11){10}[\west] -\obj(10,12)[6]{6}[\south]\obj(12,10)[5]{5}[\east] -\obj(14,12){4}[\northeast]\obj(16,11){14}[\east] -\obj(2,16){19}[\west]\obj(6,15){9} -\obj(9,16){8}\obj(11,14){7}[\west] -\obj(13,14){3}\obj(15,16){2} -\obj(18,15){15}\obj(22,16){16}[\east] -\obj(12,19){1}[\west]\obj(12,22){20}[\north] -\mor{18}{17}[7,7]{}\mor{18}{11}{}\mor{18}{19}{}\mor{11}{12}{} -\mor{11}{10}{}\mor{12}{13}{}\mor{12}{5}{}\mor{10}{6}{} -\mor{10}{9}{}\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}[8,6]{} -\mor{13}{14}{}\mor{9}{19}{}\mor{9}{8}{}\mor{6}{7}{} -\mor{4}{3}{}\mor{4}{14}{}\mor{19}{20}{}\mor{8}{1}{} -\mor{8}{7}{}\mor{7}{3}{}\mor{3}{2}{}\mor{2}{1}{} -\mor{2}{15}{}\mor{14}{15}{}\mor{17}{16}{}\mor{16}{20}{} -\mor{1}{20}{}\mor{15}{16}{} -\enddc -\end{verbatim} -} - -\paragraph{New arrows and Lines in v4.1} - -\paragraph{Surjective arrow} - - -$$ -\begindc{\commdiag}[3] -\obj(10,15){$A$} -\obj(40,15)[Al]{$A$} -\obj(25,15){$B$} -\obj(40,5){$A^\prime$} -\mor{$A$}{$B$}{$f$}[\atleft,\surjectivearrow] -\mor{$B$}{Al}{$g$}[\atleft,\surjectivearrow] -\mor{$B$}{$A^\prime$}{$g^\prime$}[\atright,\surjectivearrow] -\enddc -$$ - -\paragraph{Dashed and Dotted lines} - - -$$ -\begindc{\commdiag}[3] -\obj(10,20){$A$} -\obj(40,30)[Al]{$A$} -\obj(25,30){$B$} -\obj(40,40){$A^\prime$} -\obj(40,10)[Ald]{$A$} -\obj(25,10)[Bd]{$B$} -\obj(40,0)[Apd]{$A^\prime$} -\mor{$A$}{$B$}{}[\atleft,\dashline] -\mor{$B$}{Al}{}[\atleft,\dashline] -\mor{$B$}{$A^\prime$}{}[\atright,\dashline] -\mor{$A$}{Bd}{}[\atleft,\dotline] -\mor{Bd}{Ald}{}[\atleft,\dotline] -\mor{Bd}{Apd}{}[\atright,\dotline] -\enddc -$$ - -\end{document} - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/Master/texmf-dist/doc/latex/dcpic/gpl.txt b/Master/texmf-dist/doc/latex/dcpic/gpl.txt deleted file mode 100644 index 486449cc3a4..00000000000 --- a/Master/texmf-dist/doc/latex/dcpic/gpl.txt +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/Master/texmf-dist/tex/generic/dcpic/dcpic.sty b/Master/texmf-dist/tex/generic/dcpic/dcpic.sty new file mode 100644 index 00000000000..4c1ef123710 --- /dev/null +++ b/Master/texmf-dist/tex/generic/dcpic/dcpic.sty @@ -0,0 +1,1378 @@ +%% DC-PiCTeX +%% Copyright (c) 1990-2009 Pedro Quaresma, Coimbra, Portugal +%% 11/1990 (version 1.0); +%% 10/1991 (version 1.1); +%% 9/1993 (version 1.2); +%% 3/1995 (version 1.3); +%% 7/1996 (version 2.1); +%% 5/2001 (version 3.0); +%% 11/2001 (version 3.1); +%% 1/2002 (version 3.2) +%% 5/2002 (version 4.0); +%% 3/2003 (version 4.1); +%% 12/2004 (version 4.1.1) +%% 3/2007 (version 4.2) +%% 5/2008 (version 4.2.1) +%% 8/2008 (version 4.3) +%% 12/2008 (version 4.3.1) +%% 12/2009 (version 4.3.2) + +\immediate\write10{Package DCpic 2009/12/22 v4.3.2} + +\ProvidesPackage{dcpic}[2009/12/22 v4.3.2] + +%% Version X.Y.Z +%% X - major versions +%% Y - minor versions +%% Z - bug corrections +%% +%% Copyright (c) 1990-2009 Pedro Quaresma +%% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Pedro Quaresma (pedro@mat.uc.pt). +% +% This work consists of the files dcpic.sty. +%% +%% Coimbra, 22 de Dezembro de 2009 (2009/12/22) +%% Pedro Quaresma de Almeida +%% +%% DCpic is a package of \TeX\ macros for graph modelling in a +%% (La)\TeX\ or Con\TeX t document. Its distinguishing features are: +%% the use of \PiCTeX\ a powerful graphical engine, and a simple +%% specification syntax. A graph is described in terms of its objects +%% and its edges. The objects are textual elements and the edges can +%% have various straight or curved forms. +%% +%% +%% A graph in DCpic is a "picture" in \PiCTeX, in which we place our +%% {\em objects} and {\em morphisms} (edges). The user's commands in +%% DCpic are: {\tt begindc} and {\tt enddc} which establishe the +%% coordinate system where the objects will by placed; {\tt obj}, the +%% command which defines the place and the contents of each object; +%% {\tt mor}, and {\tt cmor}, the commands which define the +%% morphisms, linear and curved edges, and its labels. +%% +%% Example: +%% \begindc{\commdiag}[3] +%% \obj(10,15){$A$} +%% \obj(25,15){$B$} +%% \obj(40,15){$C$} +%% \mor{$A$}{$B$}{$f$} +%% \mor{$B$}{$C$}{$g$} +%% \cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) +%% \pup(25,3){$g\circ f$} +%% \enddc +%% +%% NOTES: +%% all the numeric values should be integer values. +%% +%% Available commands: +%% +%% The environment: +%% \begindc{#1}[#2] +%% #1 - Graph type +%% 0 = "commdiag" (commutative diagram) +%% 1 = "digraph" (direct graph) +%% 2 = "undigraph" (undirect graph) +%% 3 = "cdigraph" with incircled objects +%% 4 = "cundigraph" with incircled objects +%% (optional) #2 - magnification factor (default value, 30) +%% +%% \enddc +%% +%% Objects: +%% \obj(#1,#2)[#3]{#4}[#5] +%% #1 and #2 - coordenates +%% (optional) #3 - Label, to be used in the morphims command, if not +%% present the #4 will be used to that purpose +%% #4 - Object contents +%% (optional) #5 - placement of the object (default value \north) +%% 0="\pcent", center +%% 1="\north", north +%% 2="\northeast", northeast +%% 3="\east", east +%% 4="\southeast", southeast +%% 5="\south", south +%% 6="\southwest", southwest +%% 7="\west", west +%% 8="\northwest", northwest +%% !!! Note !!! +%% if you omit the #3 argument (label) and the #4 argument is a +%% complex LaTeX command this can cause this command to crash. In +%% this case you must specify a label (the empty label [], if you do +%% needed it it for nothing). +%% +%% Morphims (linear edges). This commando has to two major variants +%% i) Starting and Ending objects specification +%% \mor{#1}{#2}[#5,#6]{#7}[#8,#9] +%% +%% As you can see this first form is (intencionaly) badly formed, the +%% arguments #3 and #4 are missing (the actual command is correctly +%% formed). +%% +%% #1 - The starting object reference +%% #2 - The ending object reference +%% +%% from this two we will obtain the objects coordinates, and also the +%% dimensions of the enclosing box. +%% +%% The objects box dimensions are used to do an automatic adjustment of +%% the edge width. +%% +%% from #1 we obtain (x,y), (#1,#2) in the second form +%% from #2 we obtain (x',y'), (#3,#4) in the second form +%% +%% this values will be passed to the command second form +%% +%%ii) Two points coordinates specification +%% \mor(#1,#2)(#3,#4)[#5,#6]{#7}[#8,#9] +%% +%% Now we can describe all the arguments +%% +%% #1 and #2 - coordinates (beginning) +%% #3 and #4 - coordinates (ending) +%%(optional)#5,#6 - correction factors (defaul values, 10 and 10) +%% #5 - actual beginning of the edge +%% #6 - actual ending of the edge +%% #7 - text (morphism label) +%%(optional)#8,#9 +%% #8 - label placement +%% 1 = "\atright", at right, default value +%% -1 = "\atleft", at left +%% #9 - edge type +%% 0 = "\solidarrow", default edge +%% 1 = "\dashArrow" +%% 2 = "\solidline" +%% 3 = "\dashline" +%% 4 = "\dotline" +%% 5 = "\injectionarrow" --- old value 3 +%% 6 = "\aplicationarrow" --- old value 4 +%% 7 = "\surjectivearrow" --- old value 5 +%% 8 = "\equalline" (thanks to Ruben Debeerst), +%% 9 = "\doublearrow" +%% 10 = "\doubleopposite" +%% 11 = "nullarrow" (to allow adding labels to existing arrows) +%% +%% Notes: the equalline "arrow" does not provide a second label. +%% +%% Curved Morphisms (quadratic edges): +%% \cmor(#1) #2(#3,#4){#5}[#6] +%% #1 - list of points (odd number) +%% #2 - tip direction +%% 0 = "\pup", pointing up +%% 1 = "\pdown", pointing down +%% 2 = "\pright", pointing right +%% 3 = "\pleft", pointing left +%% #3 and #4 - coordenates of the label +%% #5 - morphism label +%%(optional)#6 - edge type +%% 0 ="\solidarrow", default value +%% 1 = "\dashArrow" +%% 2 = "\solidline" +%% +%% Notes: insert a space after the command. +%% the space after the list of points is mandatory +%% +%% Exemples: +%%\documentclass[a4paper,11pt]{article} +%%\usepackage{dcpic,pictexwd} +%% +%%\begin{document} +%%\begindc[3] +%%\obj(14,11){$A$} +%%\obj(39,11){$B$} +%%\mor(14,12)(39,12){$f$}%[\atright,\solidarrow] +%%\mor(39,10)(14,10){$g$}%[\atright,\solidarrow] +%%\cmor((10,10)(6,11)(5,15)(6,19)(10,20)(14,19)(15,15)) +%% \pdown(2,20){$id_A$} +%%\cmor((40,7)(41,3)(45,2)(49,3)(50,7)(49,11)(45,12)) +%% \pleft(54,3){$id_B$} +%%\enddc +%% +%%\begindc{\commdiag}[3] +%%\obj(10,15)[A]{$A$} +%%\obj(40,15)[Aa]{$A$} +%%\obj(25,15)[B]{$B$} +%%\mor{A}{B}{$f$}%[\atright,\solidarrow] +%%\mor{B}{Aa}{$g$}%[\atright,\solidarrow] +%%\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) +%% \pup(25,3){$id_A$} +%%\enddc +%% +%%\newcommand{\barraA}{\vrule height2em width0em depth0em} +%%\newcommand{\barraB}{\vrule height1.6em width0em depth0em} +%%\begindc{\commdiag}[35] +%%\obj(1,1)[Gr]{$G$} +%%\obj(3,1)[Grstar]{$G_{r^*}$} +%%\obj(5,1)[H]{$H$} +%%\obj(2,2)[SigmaG]{$\Sigma^G$} +%%\obj(6,2)[SigmaH]{$\Sigma^H$} +%%\obj(1,3)[Lm]{$L_m$} +%%\obj(3,3)[Krm]{$K_{r,m}$} +%%\obj(5,3)[Rmstar]{$R_{m^*}$} +%%\obj(1,5)[L]{$L$} +%%\obj(3,5)[Lr]{$L_r$} +%%\obj(5,5)[R]{$R$} +%%\obj(2,6)[SigmaL]{$\Sigma^L$} +%%\obj(6,6)[SigmaR]{$\Sigma^R$} +%%\mor{Gr}{SigmaG}{$\lambda^G$} +%%\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] +%%\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] +%%\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dashArrow] +%%\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] +%%\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] +%%\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] +%%\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] +%%\mor{Krm}{Rmstar}{$r$} +%%\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] +%%\mor{Krm}{Grstar}{$m$} +%%\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +%%\mor{Rmstar}{H}{$m^*$} +%%\mor{L}{SigmaL}{$\lambda^L$} +%%\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] +%%\mor{Lr}{R}{$r$} +%%\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] +%%\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] +%%\mor{SigmaL}{SigmaR}{$\varphi^r$} +%%\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} +%%\enddc +%% +%%\end{document} +%%-----------------//------------- +%% Modifications (9/1993) +%% argument "distance" between de tip of the arrow and the objects +%% became optional; a new option for the "arrows" (option 3) +%% +%% 2/3/1995 (version 1.3) +%% adds "the aplication arrow" (option 4); the distance between +%% the label and the "arrow" is now a fixed value (10 units). +%% 15/7/1996 (version 2.1) +%% The comand "\mor" has a new sintax. The 5th and 6th +%% parameters are now the distance between the two objects and +%% the arrow tips. The 7th parameter is the label. The 8th e 9th +%% parameters (label position and type of arrow) are now optional +%% +%% 5/2001 (version 3.0) +%% Implementation of the comand "\cmor" based on the quadratic +%% curver comand of PiCTeX +%% +%% 11/2001 (version 3.1) +%% Changes on the tips of the arrow to became more LaTeX style +%% (after a conversation on EuroTeX 2001). +%% +%% 1/2002 (version 3.2) +%% Modifica{\c c}{\~a}o dos comandos "obj" e "mor" de forma a introduzir +%% a especifica{\c c}{\~a}o l{\'o}gica dos morfismos, isto {\'e}, passa-se a +%% dizer qual {\'e} o objecto de partida e/ou o objecto de chegada +%% em vez de ter de especificar o morfismo em termos de +%% coordenadas. +%% Por outro lado o tamanho das setas passa a ser ajustado +%% automaticamente em rela{\c c}{\~a}o ao tamanho dos objectos. +%% +%% 5/2002 (version 4.0) +%% Modificação dos comandos "begindc" e "obj" +%% !!! Modificação da sintaxe destes comandos !!! +%% O comando "begindc" passou a ter um argumento (obrigatório) +%% que nos permite especificar o tipo de grafo que estamos a +%% querer especificar: +%% "commdiag" (0), para diagramas comutativos +%% "digraph" (1), para grafos orientados +%% "undigraph" (2), para grafos não orientados +%% O comando "obj" modificou a sua sintaxe passou a ter um (após +%% a especificação das coordenadas, um argumento opcional, um +%% argumento obrigatório, e um argumento opcional. O primeiro +%% argumento opcional dá-nos a etiqueta que serve como +%% referência para a especificação dos morfismos, na sua +%% ausência usa-se o argumento obrigatório para esse efeito, o +%% argumento obrigatório dá-nos o "conteúdo" do objecto, nos +%% diagramas comutativos é centrado no ponto dado pelas +%% coordenadas sendo o argumento seguinte simplesmente ignorado, +%% nos grafos o "conteúdo" é colocado numa posição a norte, a +%% noroeste, a este, ..., sendo que a posição concreta é +%% especificada pelo último dos argumentos deste comando, o +%% valor por omissão é o "norte". +%% +%% 3/2003 (version 4.1) +%% Responding to a request of Jon Barker I +%% create a new type of arrow, the surjective arrow. +%% For now only horizontal and vertical versions, other angles +%% are poorly rendered. +%% 12/2004 (version 4.1.1) +%% New version for the surjective arrows, solve the problems +%% with the first implementation of this option. +%% 3/2007 (version 4.2) +%% Adds the "providespackage" directive that was missing. +%% Adds dashed lines, and dotted lines. +%% 5/2008 (version 4.2.1) +%% Deleting some counters, trying to avoid the problem "running +%% out of counters", that occurs because of the use of PiCTeX +%% and DCpic (only two...) +%% 8/2008 (version 4.3) +%% Thanks to Ruben Debeerst (debeerst@mathematik.uni-kassel.de), +%% he added a new arrow "equalline". After that I +%% decided to add: the doublearrow; the doublearrow with +%% opposite directions; the null arrow. This last can be used as +%% a simple form of adding new labels. +%%12/2008 (version 4.3.1) +%% The comand \id is internalised (\!id), it should be that way +%% from the begining because it is not to be used from the +%% outside. +%% The comand \dasharrow was changed to \dashArrow to avoid a +%% clash with the AMS command with the same name. +%%12/2009 (version 4.3.2) +%% There is a conflict between dcpic.sty and hyperref in current +%% texlive-2009 due to the one letter macro \d (thanks Thorsten +%% S ). +%% The \d changed to \deuc (Euclidian Distance). The \x and \y +%% changed to \xO \yO +%%-----------------//------------- + +\catcode`!=11 % ***** THIS MUST NEVER BE OMITTED (See PiCTeX) + +\newcount\aux% +\newcount\auxa% +\newcount\auxb% +\newcount\xO% +\newcount\yO% +\newcount\xl% +\newcount\yl% +\newcount\deuc% +\newcount\dnm% +\newcount\xa% +\newcount\xb% +\newcount\xmed% +\newcount\xc% +\newcount\xd% +\newcount\xe +\newcount\xf +\newcount\ya% +\newcount\yb% +\newcount\ymed% +\newcount\yc% +\newcount\yd +\newcount\ye +\newcount\yf +%% "global variables" +\newcount\expansao% +\newcount\tipografo% version 4.0 +\newcount\distanciaobjmor% version 4.0 +\newcount\tipoarco% version 4.0 +%\newif\ifarredondada% version 4.0 (initial value "false") +\newif\ifpara% +%% version 3.2 +\newbox\caixa% +\newbox\caixaaux% +\newif\ifnvazia% +\newif\ifvazia% +\newif\ifcompara% +\newif\ifdiferentes% +\newcount\xaux% +\newcount\yaux% +\newcount\guardaauxa% +\newcount\alt% +\newcount\larg% +\newcount\prof% +%% for the triming +\newcount\auxqx +\newcount\auxqy +\newif\ifajusta% +\newif\ifajustadist +\def\objPartida{}% +\def\objChegada{}% +\def\objNulo{}% + + +%% +%% Stack specification +%% + +%% +%% Emtpy stack +%% +\def\!vazia{:} + +%% +%% Is Empty? : Stack -> Bool +%% +%% nvazia - True if Not Empy +%% vazia - True if Empty +\def\!pilhanvazia#1{\let\arg=#1% +\if:\arg\ \nvaziafalse\vaziatrue \else \nvaziatrue\vaziafalse\fi} + +%% +%% Push : Elems x Stack -> Stack +%% +\def\!coloca#1#2{\edef\pilha{#1.#2}} + +%% +%% Top : Stack -> Elems +%% +%% the empty stack is not taken care +%% the element is "kept" ("guardado") +\def\!guarda(#1)(#2,#3)(#4,#5,#6){\def\!id{#1}% +\xaux=#2% +\yaux=#3% +\alt=#4% +\larg=#5% +\prof=#6% +} + +\def\!topaux#1.#2:{\!guarda#1} +\def\!topo#1{\expandafter\!topaux#1} + +%% +%% Pop : Stack -> Stack +%% +%% the empty stack is not taken care +\def\!popaux#1.#2:{\def\pilha{#2:}} +\def\!retira#1{\expandafter\!popaux#1} + +%% +%% Compares words : Word x Word -> Bool +%% +%% compara - True if equal +%% diferentes - True if not equal +\def\!comparaaux#1#2{\let\argA=#1\let\argB=#2% +\ifx\argA\argB\comparatrue\diferentesfalse\else\comparafalse\diferentestrue\fi} + +\def\!compara#1#2{\!comparaaux{#1}{#2}} + +%% Private Macro +%% Absolute Value) +%% \absoluto{n}{absn} +%% input +%% n - integer +%% output +%% absn - |n| +\def\!absoluto#1#2{\aux=#1% + \ifnum \aux > 0 + #2=\aux + \else + \multiply \aux by -1 + #2=\aux + \fi} + + +%% Name definitions for edge types and directions +\def\solidarrow{0} +\def\dashArrow{1} +\def\solidline{2} +\def\dashline{3} +\def\dotline{4} +\def\injectionarrow{5} +\def\aplicationarrow{6} +\def\surjectivearrow{7} +\def\equalline{8} +\def\doublearrow{9} +\def\doubleopposite{10} +\def\nullarrow{11} + +%% Name definitions for edge label placement +\def\atright{-1} +\def\atleft{1} +%% Tip direction for curved edges +\def\pup{0} +\def\pdown{1} +\def\pright{2} +\def\pleft{3} +%% Type of graph +\def\commdiag{0} +\def\digraph{1} +\def\undigraph{2} +\def\cdigraph{3} +\def\cundigraph{4} +%% Positioning of labels in graphs +\def\pcent{0} +\def\north{1} +\def\northeast{2} +\def\east{3} +\def\southeast{4} +\def\south{5} +\def\southwest{6} +\def\west{7} +\def\northwest{8} + + + +%%Comando Interno +%% Ajusta a dist{\^a}ncia entre as setas e os objectos em fun{\c c}{\~a}o das +%% dimens{\~o}es destes {\'u}ltimos +%% \ajusta{x}{xl}{y}{yl}{d}{Objecto} +%% entrada +%% (x,y) e (xl,yl), coordenadas dos pontos de {\'\i}nicio e fim da seta +%% d, dist{\^a}ncia especificada pelo utilizador ou 10 (valor por +%% omiss{\~a}o), Objecto d{\'a}-nos a refer{\^e}ncia do objecto ao qual se est{\'a} a +%% efectuar o ajuste. +%% sa{\'\i}da +%% d, dist{\^a}ncia alterada. +%% +%% A dist{\^a}ncia alterada {\'e} o maior valor entre 10 e as dimens{\~o}es +%% apropriadas da caixa que cont{\^e}m o objecto. +%% Se o utilizador especificar um valor essa especifica{\c c}{\~a}o +%% n{\~a}o {\'e} alterada. +%% +%% Se a seta {\'e} horizontal usa-se o valor da largura +%% Se a seta {\'e} vertical usa-se: +%% o valor da altura se a seta est{\'a} no 1o ou 2o quadrante +%% o valor da profundidade se a seta est{\'a} no 3o ou 4o quadrante +%% Se a seta {\'e} {\'o}bliqua vai-se escolher o valor conforme: +%% de 315 a 45 graus usa-se a largura +%% de 45 a 135 graus usa-se a altura +%% de 135 a 225 graus usa-se a largura +%% de 225 a 315 graus usa-se a profundidade +\def\!ajusta#1#2#3#4#5#6{\aux=#5% + \let\auxobj=#6% + \ifcase \tipografo % diagramas comutativos + \ifnum\number\aux=10 + \ajustadisttrue % se o valor é o valor por omissão ajusta + \else + \ajustadistfalse % caso contrário não ajusta + \fi + \else % grafos (dirigidos, não dirigidos, com molduras) + \ajustadistfalse +% \or % grafos não dirigidos +% \ajustadistfalse +% \else % grafos dirigidos com molduras circulares nos objectos +% \ifnum\number\aux=8 +% \ajustadisttrue % se o valor é o valor por omissão ajusta +% \else +% \ajustadistfalse % caso contrário não ajusta +% \fi + \fi + \ifajustadist +% \tiny Vou ajustar %%% +% \ifnum\number\aux=10% verificar se s{\~a}o os valores por omiss{\~a}o + \let\pilhaaux=\pilha% + \loop% + \!topo{\pilha}% + \!retira{\pilha}% + \!compara{\!id}{\auxobj}% + \ifcompara\nvaziafalse \else\!pilhanvazia\pilha \fi% + \ifnvazia% + \repeat% +%% rep{\~o}e os valores na pilha + \let\pilha=\pilhaaux% + \ifvazia% + \ifdiferentes% +%% +%% N{\~a}o {\'e} poss{\'\i}vel efectuar o ajuste dado o utilizador n{\~a}o ter +%% especificado uma etiqueta para o objecto em quest{\~a}o. {\'E} dado o +%% valor de 10, igual ao valor por omiss{\~a}o. +%% + \larg=1310720% n{\~a}o faz o ajuste + \prof=655360% + \alt=655360% + \fi% + \fi% + \divide\larg by 131072 + \divide\prof by 65536 + \divide\alt by 65536 + \ifnum\number\yO=\number\yl +%% Caso 1 -- seta horizontal +%% +%% divide-se por 131072 para se obter metade da largura da caixa em +%% pontos (pt), isto dado que o texto est{\'a} centrado na caixa. Soma-se +%% mais tr{\^e}s, que constitue um ajuste imp{\'\i}rico. + \advance\larg by 3 + \ifnum\number\larg>\aux + #5=\larg + \fi + \else + \ifnum\number\xO=\number\xl + \ifnum\number\yl>\number\yO +%% Caso 2.1 -- seta vertical de cima para baixa +%% + \ifnum\number\alt>\aux + #5=\alt + \fi + \else +%% Caso 2.2 -- seta vertical de baixo para cima +%% +%% divide-se por 65536 para se obter a altura da caixa em pt. O ajuste +%% de 5 foi obtido imp{\'\i}ricamente + \advance\prof by 5 + \ifnum\number\prof>\aux + #5=\prof + \fi + \fi + \else +%% Caso 3 -- seta obl{\'\i}qua +%% Caso 3.1 de 315o a 45o; |x-xl|>|y-yl| e +%% Caso 3.3 de 135o a 225o; |x-xl|>|y-yl|; Largura + \auxqx=\xO + \advance\auxqx by -\xl + \!absoluto{\auxqx}{\auxqx}% + \auxqy=\yO + \advance\auxqy by -\yl + \!absoluto{\auxqy}{\auxqy}% + \ifnum\auxqx>\auxqy + \ifnum\larg<10 + \larg=10 + \fi + \advance\larg by 3 + #5=\larg + \else +%% Caso 3.2 de 45o a 135o; |x-xl|<|y-yl| e y>0; Largura + \ifnum\yl>\yO + \ifnum\larg<10 + \larg=10 + \fi + \advance\alt by 6 + #5=\alt + \else +%% Caso 3.4 de 225o a 315o; |x-xl|<|y-yl| e y<0; Profundidade + \advance\prof by 11 + #5=\prof + \fi + \fi + \fi + \fi +\fi} % o ramo "else" {\'e} omisso + + +%%Comando Interno +%% C{\'a}lculo da Raiz Quadrada +%% raiz{n}{m} +%% entrada +%% n - natural +%% sa{\'\i}da +%% n - natural +%% m - maior natural contido na raiz quadrada de n +\def\!raiz#1#2{\auxa=#1% + \auxb=1% + \loop + \aux=\auxb% + \advance \aux by 1% + \multiply \aux by \aux% + \ifnum \aux < \auxa% + \advance \auxb by 1% + \paratrue% + \else\ifnum \aux=\auxa% + \advance \auxb by 1% + \paratrue% + \else\parafalse% + \fi + \fi + \ifpara% + \repeat +#2=\auxb} + +%%Private Macro +%% Find the starting and ending points of the "arrow" and also the +%% label position (one coordinate at a time) +%% +%% ucoord{x1}{x2}{x3}{x4}{x5}{x6}{+|- 1} +%% Input +%% x1,x2,x3,x4,x5 +%% Output +%% x6 +%% +%% x2 - x1 +%% x6 = x3 +|- ------- x4 +%% x5 +\def\!ucoord#1#2#3#4#5#6#7{\aux=#2% + \advance \aux by -#1% + \multiply \aux by #4% + \divide \aux by #5% + \ifnum #7 = -1 \multiply \aux by -1 \fi% + \advance \aux by #3% +#6=\aux} + +%%Private Macro +%% Euclidean distance between two points +%% +%% quadrado{n}{m}{l} +%% Input +%% n - natural number +%% m - natural number +%% Output +%% l = (n-m)*(n-m) +\def\!quadrado#1#2#3{\aux=#1% + \advance \aux by -#2% + \multiply \aux by \aux% +#3=\aux} + +%%Comando Interno +%% C{\'a}lculo auxiliar para determinar a dist{\^a}ncia entre o nome do +%% morfismo e a seta. +%% entrada +%% (x,y), (x',y') e o nome do morfismo +%% sa{\'\i}da +%% dnm - dist{\^a}ncia do nome ao morfismo respectivo devidamente +%% compensada pelo tamanho do objecto +%% Observa{\c c}{\~o}es +%% A compensa{\c c}{\~a}o s{\'o} est{\'a} a ser feita para setas +%% horizontais e verticais. As obl{\'\i}quas s{\~a}o tratadas de +%% outra forma. +%% algoritmo +%% caixa0 <- nome do morfismo +%% se x-xl = 0 entao {recta vertical} +%% aux <- largura da caixa0 +%% dnm <- convers{\~a}o-sp-pt(aux)/2+3 +%% sen{\~a}o {recta n{\~a}o vertical} +%% se y-yl = 0 entao {recta horizontal} +%% aux <- altura+profundidade da caixa0 +%% dnm <- convers{\~a}o-sp-pt(aux)/2+3 +%% sen{\~a}o {recta obl{\'\i}qua} +%% dnm <- 3 +%% fimse +%% fimse +%% fimalgoritmo +\def\!distnomemor#1#2#3#4#5#6{\setbox0=\hbox{#5}% + \aux=#1 + \advance \aux by -#3 + \ifnum \aux=0 + \aux=\wd0 \divide \aux by 131072 + \advance \aux by 3 + #6=\aux + \else + \aux=#2 + \advance \aux by -#4 + \ifnum \aux=0 + \aux=\ht0 \advance \aux by \dp0 \divide \aux by 131072 + \advance \aux by 3 + #6=\aux% + \else + #6=3 + \fi + \fi +} + + +%% +%% O ambiente "begindc...enddc" +%% +\def\begindc#1{\!ifnextchar[{\!begindc{#1}}{\!begindc{#1}[30]}} +\def\!begindc#1[#2]{\beginpicture + \let\pilha=\!vazia + \setcoordinatesystem units <1pt,1pt> + \expansao=#2 + \ifcase #1 + \distanciaobjmor=10 + \tipoarco=0 % arrow + \tipografo=0 % commutative diagram + \or + \distanciaobjmor=2 + \tipoarco=0 % arrow + \tipografo=1 % directed graph + \or + \distanciaobjmor=1 + \tipoarco=2 % line + \tipografo=2 % undirected graph + \or + \distanciaobjmor=8 + \tipoarco=0 % arrow + \tipografo=3 % directed graph +% \arredondadotrue % objectos com molduras circulares + \or + \distanciaobjmor=8 + \tipoarco=2 % line + \tipografo=4 % undirected graph +% \arredondadotrue % objectos com molduras circulares + \fi} + +\def\enddc{\endpicture} + + +%% Public macro: "mor" +%% +%% +%% Funtion to built the "arrow" between two points +%% +%% The points that are uses to built all the elements of the "arrows" +%% are: +%% +%% (xc,yc) +%% o +%% | +%% o------o---------o---------o------o +%%(x,y) (xa,ya) (xm,ym) (xb,yb)(xl,yl) +%% +%% auxa - distance between (x,y) and (xa,ya), 10pt by default +%% auxb - distance between (xl,yl) and (xb,yb), 10pt by default +%% +\def\mor{% + \!ifnextchar({\!morxy}{\!morObjA}} +\def\!morxy(#1,#2){% + \!ifnextchar({\!morxyl{#1}{#2}}{\!morObjB{#1}{#2}}} +\def\!morxyl#1#2(#3,#4){% + \!ifnextchar[{\!mora{#1}{#2}{#3}{#4}}{\!mora{#1}{#2}{#3}{#4}[\number\distanciaobjmor,\number\distanciaobjmor]}}% +\def\!morObjA#1{% + \let\pilhaaux=\pilha% + \def\objPartida{#1}% + \loop% + \!topo\pilha% + \!retira\pilha% + \!compara{\!id}{\objPartida}% + \ifcompara \nvaziafalse \else \!pilhanvazia\pilha \fi% + \ifnvazia% + \repeat% + \ifvazia% + \ifdiferentes% +%% +%% error message and ficticious parameters +%% + Error: Incorrect label specification% + \xaux=1% + \yaux=1% + \fi% + \fi% + \let\pilha=\pilhaaux% + \!ifnextchar({\!morxyl{\number\xaux}{\number\yaux}}{\!morObjB{\number\xaux}{\number\yaux}}} +\def\!morObjB#1#2#3{% + \xO=#1 + \yO=#2 + \def\objChegada{#3}% + \let\pilhaaux=\pilha% + \loop + \!topo\pilha % + \!retira\pilha% + \!compara{\!id}{\objChegada}% + \ifcompara \nvaziafalse \else \!pilhanvazia\pilha \fi + \ifnvazia + \repeat + \ifvazia + \ifdiferentes% +%% +%% error message and ficticious parameters +%% + Error: Incorrect label specification + \xaux=\xO% + \advance\xaux by \xO% + \yaux=\yO% + \advance\yaux by \yO% + \fi + \fi + \let\pilha=\pilhaaux + \!ifnextchar[{\!mora{\number\xO}{\number\yO}{\number\xaux}{\number\yaux}}{\!mora{\number\xO}{\number\yO}{\number\xaux}{\number\yaux}[\number\distanciaobjmor,\number\distanciaobjmor]}} +\def\!mora#1#2#3#4[#5,#6]#7{% + \!ifnextchar[{\!morb{#1}{#2}{#3}{#4}{#5}{#6}{#7}}{\!morb{#1}{#2}{#3}{#4}{#5}{#6}{#7}[1,\number\tipoarco] }} +\def\!morb#1#2#3#4#5#6#7[#8,#9]{\xO=#1% + \yO=#2% + \xl=#3% + \yl=#4% + \multiply \xO by \expansao% + \multiply \yO by \expansao% + \multiply \xl by \expansao% + \multiply \yl by \expansao% +%% +%% Euclidean distance between two points +%% d = \sqrt((x-xl)^2+(y-yl)^2) +%% + \!quadrado{\number\xO}{\number\xl}{\auxa}% + \!quadrado{\number\yO}{\number\yl}{\auxb}% + \deuc=\auxa% + \advance \deuc by \auxb% + \!raiz{\deuc}{\deuc}% +%% +%% the point (xa,ya) is at a distance #5 (default value 10) from the +%% point (x,y) +%% +%% como existem dois pontos em considera{\c c}{\~a}o, o ponto de partida e o +%% ponto de chegada, vai sei necess{\'a}rio recuperar de novo os seus +%% valores por pesquisa na pilha + \auxa=#5 + \!compara{\objNulo}{\objPartida}% + \ifdiferentes% S{\'o} vai fazer o ajuste quando {\'e} necess{\'a}rio + \!ajusta{\xO}{\xl}{\yO}{\yl}{\auxa}{\objPartida}% + \ajustatrue + \def\objPartida{}% re-inicializar o valor do Objecto de Partida + \fi +%% vai guardar o valor de auxa (ap{\'o}s ajuste) para ser usado no caso +%% dos morfismos de injec{\c c}{\~a}o. + \guardaauxa=\auxa +%% + \!ucoord{\number\xO}{\number\xl}{\number\xO}{\auxa}{\number\deuc}{\xa}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\yO}{\auxa}{\number\deuc}{\ya}{1}% +%% auxa vai ter o valor da dist{\^a}ncia entre os objectos menos a +%% dist{\^a}ncia da seta ao objecto (10 por omiss{\~a}o) + \auxa=\deuc% +%% +%% the point (xb,yb) is at a distance #6 (default value 10) from the +%% point (xl,yl) +%% + \auxb=#6 + \!compara{\objNulo}{\objChegada}% + \ifdiferentes% S{\'o} vai fazer o ajuste quando {\'e} necess{\'a}rio +% Vou ajustar + \!ajusta{\xO}{\xl}{\yO}{\yl}{\auxb}{\objChegada}% + \def\objChegada{}% re-inicializar o valor do Objecto de Chegada + \fi + \advance \auxa by -\auxb% + \!ucoord{\number\xO}{\number\xl}{\number\xO}{\number\auxa}{\number\deuc}{\xb}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\yO}{\number\auxa}{\number\deuc}{\yb}{1}% + \xmed=\xa% + \advance \xmed by \xb% + \divide \xmed by 2 + \ymed=\ya% + \advance \ymed by \yb% + \divide \ymed by 2 +%% +%% find the coordinates of the label position: (xc,yc) +%% +%% after this the values of xmed and ymed are no longer important +%% + \!distnomemor{\number\xO}{\number\yO}{\number\xl}{\number\yl}{#7}{\dnm}% + \!ucoord{\number\yO}{\number\yl}{\number\xmed}{\number\dnm}{\number\deuc}{\xc}{-#8}% + \!ucoord{\number\xO}{\number\xl}{\number\ymed}{\number\dnm}{\number\deuc}{\yc}{#8}% +%% +%% draw the "arrow" +%% +\ifcase #9 % 0=solid arrow + \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} +\or % 1=dashed arrow + \setdashes + \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} + \setsolid +\or % 2=solid line + \setlinear + \plot {\xa} {\ya} {\xb} {\yb} / +\or % 3=dashed line + \setdashes + \setlinear + \plot {\xa} {\ya} {\xb} {\yb} / + \setsolid +\or % 4=dotted line + \setdots + \setlinear + \plot {\xa} {\ya} {\xb} {\yb} / + \setsolid +\or % 5=injective arrow +%% C{\'a}lculos auxiliares +%% +%% 3 units, the radius for the tail of the arrow +%% +%% repor o valor de auxa + \auxa=\guardaauxa +%% dar a compensa{\c c}{\~a}o para o "rabo" + \advance \auxa by 3% +%% +%% Note: the values of (xa,ya) will be modified, they will be +%% "pushed" further away from (x,y) in order to acomodate the tail +%% of the "arrow" +%% +%% find the point (xd,yd), the center of a 3pt circle +%% + \!ucoord{\number\xO}{\number\xl}{\number\xO}{\number\auxa}{\number\deuc}{\xa}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\yO}{\number\auxa}{\number\deuc}{\ya}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\xa}{3}{\number\deuc}{\xd}{-1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{3}{\number\deuc}{\yd}{1}% +%% building the "arrow" + \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} +%% and its "tail" + \circulararc -180 degrees from {\xa} {\ya} center at {\xd} {\yd} +\or % 6=maps "arrow" ("|-->") + \auxa=3 +%% +%% Note: the values of xmed and ymed will be modified +%% +%% find the two points that defines the tail of the arrow (segment +%% (xmed,ymed)(xd,yd)) + \!ucoord{\number\yO}{\number\yl}{\number\xa}{\number\auxa}{\number\deuc}{\xmed}{-1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{\number\auxa}{\number\deuc}{\ymed}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\xa}{\number\auxa}{\number\deuc}{\xd}{1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{\number\auxa}{\number\deuc}{\yd}{-1}% +%% building the "arrow" + \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} +%% and its "tail" + \setlinear + \plot {\xmed} {\ymed} {\xd} {\yd} / +\or % 7=surjective arrow ("-->>") +%% building arrow with the first tip + \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} +%% and the second tip + \setlinear + \arrow <6pt> [0,.72] from {\xa} {\ya} to {\xb} {\yb} +\or % 8=equalline +%% by Ruben Debeerst: equal-line +%% +%% sets the separation (distance) between the two parallel lines, if +%% horizontal or vertical 1pt is enough, if not 2pt +\auxa=2 +\ifnum\number\yO=\number\yl +\auxa=1 +\fi +\ifnum\number\xO=\number\xl +\auxa=1 +\fi +%% the two parallel lines will be given by (xmed,ymed)(xd,yd), and +%% (xe,ye)(xf,yf) + \!ucoord{\number\yO}{\number\yl}{\number\xa}{\number\auxa}{\number\deuc}{\xmed}{-1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{\number\auxa}{\number\deuc}{\ymed}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\xa}{\number\auxa}{\number\deuc}{\xd}{1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{\number\auxa}{\number\deuc}{\yd}{-1}% + + \!ucoord{\number\yO}{\number\yl}{\number\xb}{\number\auxa}{\number\deuc}{\xe}{-1}% + \!ucoord{\number\xO}{\number\xl}{\number\yb}{\number\auxa}{\number\deuc}{\ye}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\xb}{\number\auxa}{\number\deuc}{\xf}{1}% + \!ucoord{\number\xO}{\number\xl}{\number\yb}{\number\auxa}{\number\deuc}{\yf}{-1}% + \setlinear + \plot {\xmed} {\ymed} {\xe} {\ye} / + \plot {\xd} {\yd} {\xf} {\yf} / +\or % 9=double arrow +%% +%% sets the separation (distance) between the two parallel lines, if +%% horizontal or vertical 2pt is enough, if not 3pt. The extra space +%% is needed because of the arrow tip. +\auxa=3 +\ifnum\number\yO=\number\yl +\auxa=2 +\fi +\ifnum\number\xO=\number\xl +\auxa=2 +\fi +%% the two parallel lines will be given by (xmed,ymed)(xd,yd), and +%% (xe,ye)(xf,yf) + \!ucoord{\number\yO}{\number\yl}{\number\xa}{\number\auxa}{\number\deuc}{\xmed}{-1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{\number\auxa}{\number\deuc}{\ymed}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\xa}{\number\auxa}{\number\deuc}{\xd}{1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{\number\auxa}{\number\deuc}{\yd}{-1}% + + \!ucoord{\number\yO}{\number\yl}{\number\xb}{\number\auxa}{\number\deuc}{\xe}{-1}% + \!ucoord{\number\xO}{\number\xl}{\number\yb}{\number\auxa}{\number\deuc}{\ye}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\xb}{\number\auxa}{\number\deuc}{\xf}{1}% + \!ucoord{\number\xO}{\number\xl}{\number\yb}{\number\auxa}{\number\deuc}{\yf}{-1}% + \arrow <4pt> [.2,1.1] from {\xmed} {\ymed} to {\xe} {\ye} + \arrow <4pt> [.2,1.1] from {\xd} {\yd} to {\xf} {\yf} +\or % 10=double arrow, opposite directions +%% +%% sets the separation (distance) between the two parallel lines, if +%% horizontal or vertical 2pt is enough, if not 3pt. The extra space +%% is needed because of the arrow tip. +\auxa=3 +\ifnum\number\yO=\number\yl +\auxa=2 +\fi +\ifnum\number\xO=\number\xl +\auxa=2 +\fi +%% the two parallel lines will be given by (xmed,ymed)(xd,yd), and +%% (xe,ye)(xf,yf) + \!ucoord{\number\yO}{\number\yl}{\number\xa}{\number\auxa}{\number\deuc}{\xmed}{-1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{\number\auxa}{\number\deuc}{\ymed}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\xa}{\number\auxa}{\number\deuc}{\xd}{1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{\number\auxa}{\number\deuc}{\yd}{-1}% + + \!ucoord{\number\yO}{\number\yl}{\number\xb}{\number\auxa}{\number\deuc}{\xe}{-1}% + \!ucoord{\number\xO}{\number\xl}{\number\yb}{\number\auxa}{\number\deuc}{\ye}{1}% + \!ucoord{\number\yO}{\number\yl}{\number\xb}{\number\auxa}{\number\deuc}{\xf}{1}% + \!ucoord{\number\xO}{\number\xl}{\number\yb}{\number\auxa}{\number\deuc}{\yf}{-1}% + \arrow <4pt> [.2,1.1] from {\xmed} {\ymed} to {\xe} {\ye} + \arrow <4pt> [.2,1.1] from {\xf} {\yf} to {\xd} {\yd} +\or % 11=null arrow (no arrow, only a label) +%% +%% does not draw the arrow, it allows to put two labels in one "arrow" +%% +\fi +%% The label positioning. +%% Se os morfismos s{\~a}o horizontais ou verticais constro{\'\i} uma caixa +%% centrada no ponto pr{\'e}viamente calculado. Se as setas s{\~a}o +%% obl{\'\i}quas coloca a caixa de forma a n{\~a}o colidir com o morfismo +%% tendo em aten{\c c}{\~a}o o quadrante assim como a posi{\c c}{\~a}o +%% relativa do morfismo e do respectivo nome. +\auxa=\xl +\advance \auxa by -\xO% +\ifnum \auxa=0 + \put {#7} at {\xc} {\yc} +\else + \auxb=\yl + \advance \auxb by -\yO% + \ifnum \auxb=0 \put {#7} at {\xc} {\yc} + \else + \ifnum \auxa > 0 + \ifnum \auxb > 0 + \ifnum #8=1 + \put {#7} [rb] at {\xc} {\yc} + \else + \put {#7} [lt] at {\xc} {\yc} + \fi + \else + \ifnum #8=1 + \put {#7} [lb] at {\xc} {\yc} + \else + \put {#7} [rt] at {\xc} {\yc} + \fi + \fi + \else + \ifnum \auxb > 0 + \ifnum #8=1 + \put {#7} [rt] at {\xc} {\yc} + \else + \put {#7} [lb] at {\xc} {\yc} + \fi + \else + \ifnum #8=1 + \put {#7} [lt] at {\xc} {\yc} + \else + \put {#7} [rb] at {\xc} {\yc} + \fi + \fi + \fi + \fi +\fi +} + +%% +%% Comando para construir a "seta" curvilinea entre dois objectos +%% +%% \cmor(){} +%% +%% Em primeiro lugar {\'e} necess{\'a}rio modificar o comando plot de forma a +%% que a sintaxe de utiliza{\c c}{\~a}o do novo comando seja coerente com a +%% sintaxe dos restantes comandos +%% +\def\modifplot(#1{\!modifqcurve #1} +\def\!modifqcurve(#1,#2){\xO=#1% + \yO=#2% + \multiply \xO by \expansao% + \multiply \yO by \expansao% + \!start (\xO,\yO) + \!modifQjoin} +\def\!modifQjoin(#1,#2)(#3,#4){\xO=#1% + \yO=#2% + \xl=#3% + \yl=#4% + \multiply \xO by \expansao% + \multiply \yO by \expansao% + \multiply \xl by \expansao% + \multiply \yl by \expansao% + \!qjoin (\xO,\yO) (\xl,\yl) % \!qjoin is defined in QUADRATIC + \!ifnextchar){\!fim}{\!modifQjoin}} +\def\!fim){\ignorespaces} + +%% +%% O comando para desenhar a seta vai receber a lista de pontos da qual +%% retira o {\'u}ltimo par de pontos, dependente da escolha dada pelo +%% utilizador a seta vai ser desenhada para cima, para baixo, para a +%% direita ou para a esquerda +%% +\def\setaxy(#1{\!pontosxy #1} +\def\!pontosxy(#1,#2){% + \!maispontosxy} +\def\!maispontosxy(#1,#2)(#3,#4){% + \!ifnextchar){\!fimxy#3,#4}{\!maispontosxy}} +\def\!fimxy#1,#2){\xO=#1% + \yO=#2 + \multiply \xO by \expansao + \multiply \yO by \expansao + \xl=\xO% + \yl=\yO% + \aux=1% + \multiply \aux by \auxa% + \advance\xl by \aux% + \aux=1% + \multiply \aux by \auxb% + \advance\yl by \aux% + \arrow <4pt> [.2,1.1] from {\xO} {\yO} to {\xl} {\yl}} + + +%% +%% Temos agora a defini{\c c}{\~a}o do comando "cmor" +%% +\def\cmor#1 #2(#3,#4)#5{% + \!ifnextchar[{\!cmora{#1}{#2}{#3}{#4}{#5}}{\!cmora{#1}{#2}{#3}{#4}{#5}[0] }} +\def\!cmora#1#2#3#4#5[#6]{% + \ifcase #2% para cima "\pup" (pointing up) + \auxa=0% x mant{\^e}m-se + \auxb=1% o y "sobe" + \or% para baixo "\pdown" (pointing down) + \auxa=0% x mant{\^e}m-se + \auxb=-1% o y "desce" + \or% para a direita "\pright" (pointing right) + \auxa=1% o x move-se para a direita + \auxb=0% o y mant{\^e}m-se + \or% para a esquerda "\pleft" (pointing left) + \auxa=-1% o x move-se para a esquerda + \auxb=0% o y mant{\^e}m-se + \fi % constru{\c c}{\~a}o do arco + \ifcase #6 % arco (com seta) s{\'o}lido + \modifplot#1% Desenhar o arco + % constru{\c c}{\~a}o da seta + \setaxy#1 + \or % arco (com seta) a tracejado + \setdashes + \modifplot#1% Desenhar o arco + \setaxy#1 + \setsolid + \or % arco sem seta + \modifplot#1% Desenhar o arco + \fi % seta de injec{\c c}{\~a}o +%% coloca{\c c}{\~a}o da etiqueta do morfismo + \xO=#3% + \yO=#4% + \multiply \xO by \expansao% + \multiply \yO by \expansao% + \put {#5} at {\xO} {\yO}} + +%% +%% Comando para construir os Objectos +%% \obj(x,y){}[] +%% +\def\obj(#1,#2){% + \!ifnextchar[{\!obja{#1}{#2}}{\!obja{#1}{#2}[Nulo]}} +\def\!obja#1#2[#3]#4{% + \!ifnextchar[{\!objb{#1}{#2}{#3}{#4}}{\!objb{#1}{#2}{#3}{#4}[1]}} +\def\!objb#1#2#3#4[#5]{% + \xO=#1% + \yO=#2% + \def\!pinta{\normalsize$\bullet$}% para definir o tamanho normal das pintas + \def\!nulo{Nulo}% + \def\!arg{#3}% + \!compara{\!arg}{\!nulo}% + \ifcompara\def\!arg{#4}\fi% + \multiply \xO by \expansao% + \multiply \yO by \expansao% + \setbox\caixa=\hbox{#4}% + \!coloca{(\!arg)(#1,#2)(\number\ht\caixa,\number\wd\caixa,\number\dp\caixa)}{\pilha}% + \auxa=\wd\caixa \divide \auxa by 131072 + \advance \auxa by 5 + \auxb=\ht\caixa + \advance \auxb by \number\dp\caixa + \divide \auxb by 131072 + \advance \auxb by 5 +%(\number\auxa, +%\number\auxb) +% \aux=\ht\caixa \divide \auxa by 131072 +% \advance \auxa by 5 +% \auxb=\dp\caixa \divide \auxb by 131072 +% \advance \auxb by 8 + \ifcase \tipografo % diagramas comutativos + \put{#4} at {\xO} {\yO} + \or % grafos dirigidos + \ifcase #5 % c=0 + \put{#4} at {\xO} {\yO} + \or % n=1 + \put{\!pinta} at {\xO} {\yO} + \advance \yO by \number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % ne=2 + \put{\!pinta} at {\xO} {\yO} + \advance \auxa by -2 % para fazer o ajuste (imperfeito) + \advance \auxb by -2 % ao raio da circunferencia de centro (x,y) + \advance \xO by \number\auxa % width+5 + \advance \yO by \number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % e=3 + \put{\!pinta} at {\xO} {\yO} + \advance \xO by \number\auxa % width+5 + \put{#4} at {\xO} {\yO} + \or % se=4 + \put{\!pinta} at {\xO} {\yO} + \advance \auxa by -2 % para fazer o ajuste (imperfeito) + \advance \auxb by -2 % ao raio da circunferencia de centro (x,y) + \advance \xO by \number\auxa % width+5 + \advance \yO by -\number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % s=5 + \put{\!pinta} at {\xO} {\yO} + \advance \yO by -\number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % sw=6 + \put{\!pinta} at {\xO} {\yO} + \advance \auxa by -2 % para fazer o ajuste (imperfeito) + \advance \auxb by -2 % ao raio da circunferencia de centro (x,y) + \advance \xO by -\number\auxa % width+5 + \advance \yO by -\number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % w=7 + \put{\!pinta} at {\xO} {\yO} + \advance \xO by -\number\auxa % width+5 + \put{#4} at {\xO} {\yO} + \or % nw=8 + \put{\!pinta} at {\xO} {\yO} + \advance \auxa by -2 % para fazer o ajuste (imperfeito) + \advance \auxb by -2 % ao raio da circunferencia de centro (x,y) + \advance \xO by -\number\auxa % width+5 + \advance \yO by \number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \fi + \or % grafos nao dirigidos + \ifcase #5 % c=0 + \put{#4} at {\xO} {\yO} + \or % n=1 + \put{\!pinta} at {\xO} {\yO} + \advance \yO by \number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % ne=2 + \put{\!pinta} at {\xO} {\yO} + \advance \auxa by -2 % para fazer o ajuste (imperfeito) + \advance \auxb by -2 % ao raio da circunferencia de centro (x,y) + \advance \xO by \number\auxa % width+5 + \advance \yO by \number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % e=3 + \put{\!pinta} at {\xO} {\yO} + \advance \xO by \number\auxa % width+5 + \put{#4} at {\xO} {\yO} + \or % se=4 + \put{\!pinta} at {\xO} {\yO} + \advance \auxa by -2 % ver acima + \advance \auxb by -2 + \advance \xO by \number\auxa % width+5 + \advance \yO by -\number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % s=5 + \put{\!pinta} at {\xO} {\yO} + \advance \yO by -\number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % sw=6 + \put{\!pinta} at {\xO} {\yO} + \advance \auxa by -2 % ver acima + \advance \auxb by -2 + \advance \xO by -\number\auxa % width+5 + \advance \yO by -\number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \or % w=7 + \put{\!pinta} at {\xO} {\yO} + \advance \xO by -\number\auxa % width+5 + \put{#4} at {\xO} {\yO} + \or % nw=8 + \put{\!pinta} at {\xO} {\yO} + \advance \auxa by -2 % ver acima + \advance \auxb by -2 + \advance \xO by -\number\auxa % width+5 + \advance \yO by \number\auxb % height+depth+5 + \put{#4} at {\xO} {\yO} + \fi +% \or % grafos dirigidos com molduras circulares nos objectos +% \advance \auxa by 4 +% \put{\circle{\auxa}} [Bl] at {\xO} {\yO} +% \put{#4} at {\xO} {\yO} +% \or % grafos não dirigidos com molduras circulares nos objectos + \else % grafos com molduras circulares nos objectos + \ifnum\auxa<\auxb % determina a maior das dimensões + \aux=\auxb + \else + \aux=\auxa + \fi +% se a largura da caixa é menor do que 1em então o tamanho +% tamanho é ajustado para esse valor mínimo + \ifdim\wd\caixa<1em + \dimen99 = 1em + \aux=\dimen99 \divide \aux by 131072 + \advance \aux by 5 + \fi + \advance\aux by -2 %folga entre o objecto e a moldura + \multiply\aux by 2 % + \ifnum\aux<30 + \put{\circle{\aux}} [Bl] at {\xO} {\yO} + \else + \multiply\auxa by 2 + \multiply\auxb by 2 + \put{\oval(\auxa,\auxb)} [Bl] at {\xO} {\yO} + \fi + \put{#4} at {\xO} {\yO} + \fi +} + + +\catcode`!=12 % ***** THIS MUST NEVER BE OMITTED (see PiCTeX) diff --git a/Master/texmf-dist/tex/latex/dcpic/dcpic.sty b/Master/texmf-dist/tex/latex/dcpic/dcpic.sty deleted file mode 100644 index 9a613845837..00000000000 --- a/Master/texmf-dist/tex/latex/dcpic/dcpic.sty +++ /dev/null @@ -1,1247 +0,0 @@ -% $Id: dcpic.sty,v 1.31 2007/12/13 17:34:57 pedro Exp pedro $ -%% DC-PiCTeX -%% Copyright (c) 1990-2007 Pedro Quaresma de Almeida, Coimbra -%% 11/1990 (version 1.0); -%% 10/1991 (version 1.1); -%% 9/1993 (version 1.2); -%% 3/1995 (version 1.3); -%% 7/1996 (version 2.1); -%% 5/2001 (version 3.0); -%% 11/2001 (version 3.1); -%% 1/2002 (version 3.2) -%% 5/2002 (version 4.0); -%% 3/2003 (version 4.1); -%% 12/2004 (version 4.1.1) -%% 3/2007 (version 4.1.2) - -\immediate\write10{Package DCpic 2007/03/01 v4.1.2} - -\ProvidesPackage{dcpic}[2007/03/01 v4.1.2] - -%% Version X.Y.Z -%% X - major versions -%% Y - minor versions -%% Z - bug corrections -%% -%% Copyright (c) 1990-2007 Pedro Quaresma -%% The DCpic package is free software; you can redistribute it and/or -%% modify it under the terms of the GNU General Public License as -%% published by the Free Software Foundation; either version 2 of the -%% License, or (at your option) any later version. -%% -%% The DCpic package is distributed in the hope that it will be -%% useful, but WITHOUT ANY WARRANTY; without even the implied warranty -%% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%% General Public License for more details. -%% -%% You should have received a copy of the GNU General Public License -%% along with this package; if not, write to the Free Software -%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -%% -%% -%% Coimbra, 13 de Dezembro de 2007 -%% Pedro Quaresma de Almeida -%% -%% DCpic is a package of \TeX\ macros for graph modelling in a -%% (La)\TeX\ or Con\TeX t document. Its distinguishing features are: -%% the use of \PiCTeX\ a powerful graphical engine, and a simple -%% specification syntax. A graph is described in terms of its objects -%% and its edges. The objects are textual elements and the edges can -%% have various straight or curved forms. -%% -%% -%% A graph in DCpic is a "picture" in \PiCTeX, in which we place our -%% {\em objects} and {\em morphisms} (edges). The user's commands in -%% DCpic are: {\tt begindc} and {\tt enddc} which establishe the -%% coordinate system where the objects will by placed; {\tt obj}, the -%% command which defines the place and the contents of each object; -%% {\tt mor}, and {\tt cmor}, the commands which define the -%% morphisms, linear and curved edges, and its labels. -%% -%% Example: -%% \begindc{\commdiag}[3] -%% \obj(10,15){$A$} -%% \obj(25,15){$B$} -%% \obj(40,15){$C$} -%% \mor{$A$}{$B$}{$f$} -%% \mor{$B$}{$C$}{$g$} -%% \cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) -%% \pup(25,3){$g\circ f$} -%% \enddc -%% -%% NOTES: -%% all the numeric values should be integer values. -%% -%% Available commands: -%% -%% The environment: -%% \begindc{#1}[#2] -%% #1 - Graph type -%% 0 = "commdiag" (commutative diagram) -%% 1 = "digraph" (direct graph) -%% 2 = "undigraph" (undirect graph) -%% 3 = "cdigraph" with incircled objects -%% 4 = "cundigraph" with incircled objects -%% (optional) #2 - magnification factor (default value, 30) -%% -%% \enddc -%% -%% Objects: -%% \obj(#1,#2)[#3]{#4}[#5] -%% #1 and #2 - coordenates -%% (optional) #3 - Label, to be used in the morphims command, if not -%% present the #4 will be used to that purpose -%% #4 - Object contents -%% (optional) #5 - placement of the object (default value \north) -%% 0="\pcent", center -%% 1="\north", north -%% 2="\northeast", northeast -%% 3="\east", east -%% 4="\southeast", southeast -%% 5="\south", south -%% 6="\southwest", southwest -%% 7="\west", west -%% 8="\northwest", northwest -%% !!! Note !!! -%% if you omit the #3 argument (label) and the #4 argument is a -%% complex LaTeX command this can cause this command to crash. In -%% this case you must specify a label (the empty label [], if you do -%% needed it it for nothing). -%% -%% Morphims (linear edges). This commando has to two major variants -%% i) Starting and Ending objects specification -%% \mor{#1}{#2}[#5,#6]{#7}[#8,#9] -%% -%% As you can see this first form is (intencionaly) badly formed, the -%% arguments #3 and #4 are missing (the actual command is correctly -%% formed). -%% -%% #1 - The starting object reference -%% #2 - The ending object reference -%% -%% from this two we will obtain the objects coordinates, and also the -%% dimensions of the enclosing box. -%% -%% The objects box dimensions are used to do an automatic adjustment of -%% the edge width. -%% -%% from #1 we obtain (x,y), (#1,#2) in the second form -%% from #2 we obtain (x',y'), (#3,#4) in the second form -%% -%% this values will be passed to the command second form -%% -%%ii) Two points coordinates specification -%% \mor(#1,#2)(#3,#4)[#5,#6]{#7}[#8,#9] -%% -%% Now we can describe all the arguments -%% -%% #1 and #2 - coordinates (beginning) -%% #3 and #4 - coordinates (ending) -%%(optional)#5,#6 - correction factors (defaul values, 10 and 10) -%% #5 - actual beginning of the edge -%% #6 - actual ending of the edge -%% #7 - text (morphism label) -%%(optional)#8,#9 -%% #8 - label placement -%% 1 = \atright, at right, default value -%% -1 = \atleft, at left -%% #9 - edge type -%% 0 = "\solidarrow", default edge -%% 1 = "\dasharrow" -%% 2 = "\solidline" -%% 3 = "\dashline" -%% 4 = "\dotline" -%% 5 = "\injectionarrow" --- old value 3 -%% 6 = "\aplicationarrow" --- old value 4 -%% 7 = "\surjectivearrow" --- old value 5 -%% -%% Note: insert a space after the command. -%% -%% Curved Morphisms (quadratic edges): -%% \cmor(#1) #2(#3,#4){#5}[#6] -%% #1 - list of points (odd number) -%% #2 - tip direction -%% 0 = "\pup", pointing up -%% 1 = "\pdown", pointing down -%% 2 = "\pright", pointing right -%% 3 = "\pleft", pointing left -%% #3 and #4 - coordenates of the label -%% #5 - morphism label -%%(optional)#6 - edge type -%% 0 ="\solidarrow", default value -%% 1 = "\dasharrow" -%% 2 = "\solidline" -%% -%% Notes: insert a space after the command. -%% the space after the list of points is mandatory -%% -%% Exemples: -%%\documentclass[a4paper,11pt]{article} -%%\usepackage{dcpic,pictexwd} -%% -%%\begin{document} -%%\begindc[3] -%%\obj(14,11){$A$} -%%\obj(39,11){$B$} -%%\mor(14,12)(39,12){$f$}%[\atright,\solidarrow] -%%\mor(39,10)(14,10){$g$}%[\atright,\solidarrow] -%%\cmor((10,10)(6,11)(5,15)(6,19)(10,20)(14,19)(15,15)) -%% \pdown(2,20){$id_A$} -%%\cmor((40,7)(41,3)(45,2)(49,3)(50,7)(49,11)(45,12)) -%% \pleft(54,3){$id_B$} -%%\enddc -%% -%%\begindc{\commdiag}[3] -%%\obj(10,15)[A]{$A$} -%%\obj(40,15)[Aa]{$A$} -%%\obj(25,15)[B]{$B$} -%%\mor{A}{B}{$f$}%[\atright,\solidarrow] -%%\mor{B}{Aa}{$g$}%[\atright,\solidarrow] -%%\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) -%% \pup(25,3){$id_A$} -%%\enddc -%% -%%\newcommand{\barraA}{\vrule height2em width0em depth0em} -%%\newcommand{\barraB}{\vrule height1.6em width0em depth0em} -%%\begindc{\commdiag}[35] -%%\obj(1,1)[Gr]{$G$} -%%\obj(3,1)[Grstar]{$G_{r^*}$} -%%\obj(5,1)[H]{$H$} -%%\obj(2,2)[SigmaG]{$\Sigma^G$} -%%\obj(6,2)[SigmaH]{$\Sigma^H$} -%%\obj(1,3)[Lm]{$L_m$} -%%\obj(3,3)[Krm]{$K_{r,m}$} -%%\obj(5,3)[Rmstar]{$R_{m^*}$} -%%\obj(1,5)[L]{$L$} -%%\obj(3,5)[Lr]{$L_r$} -%%\obj(5,5)[R]{$R$} -%%\obj(2,6)[SigmaL]{$\Sigma^L$} -%%\obj(6,6)[SigmaR]{$\Sigma^R$} -%%\mor{Gr}{SigmaG}{$\lambda^G$} -%%\mor{Grstar}{Gr}{$i_5$}[\atleft,\aplicationarrow] -%%\mor{Grstar}{H}{$r^*$}[\atright,\solidarrow] -%%\mor{H}{SigmaH}{$\lambda^H$}[\atright,\dasharrow] -%%\mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] -%%\mor{Lm}{Gr}{$m$}[\atright,\solidarrow] -%%\mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] -%%\mor{Krm}{Lm}{$i_3\quad$}[\atright,\aplicationarrow] -%%\mor{Krm}{Rmstar}{$r$} -%%\mor{Krm}{Lr}{$i_4$}[\atright,\aplicationarrow] -%%\mor{Krm}{Grstar}{$m$} -%%\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] -%%\mor{Rmstar}{H}{$m^*$} -%%\mor{L}{SigmaL}{$\lambda^L$} -%%\mor{Lr}{L}{$i_1\quad$}[\atright,\aplicationarrow] -%%\mor{Lr}{R}{$r$} -%%\mor{R}{SigmaR}{$\lambda^R$}[\atright,\solidarrow] -%%\mor{SigmaL}{SigmaG}{$\varphi^m$}[\atright,\solidarrow] -%%\mor{SigmaL}{SigmaR}{$\varphi^r$} -%%\mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} -%%\enddc -%% -%%\end{document} -%%-----------------//------------- -%% Modifica{\c c}{\~o}es (9/1993) -%% argumento "dist{\^a}ncia entre as extremidades da seta e os -%% objectos" passou a ser opcional; uma nova op{\c c}{\~a}o para as -%% "setas" (op{\c c}{\~a}o 3). -%% -%% 2/3/1995 (vers{\~a}o 1.3) -%% foi acrescentado o tipo de seta de aplica{\c c}{\~a}o -%% (op{\c c}{\~a}o 4) a dist{\^a}ncia da etiqueta {\`a} seta respectiva -%% passou a ser fixa (10 unidades de medida). -%% 15/7/1996 (vers{\~a}o 2.1) -%% O comando "\mor" passou a ter uma sintaxe distinta. Os -%% par{\^a}metros 5 e 6 passaram a ser a dist{\^a}ncia entre os -%% objectos e os extremos da seta o par{\^a}metro 7 {\'e} o nome do -%% morfismo e os par{\^a}metros 8 e 9, coloca{\c c}{\~a}o do morfismo -%% e tipo de morfismo passaram a ser opcionais. -%% -%% 5/2001 (vers{\~a}o 3.0) -%% Implementa{\c c}{\~a}o do comando "\cmor" baseado no comando -%% de desenho de curvas quadr{\'a}ticas pelo PiCTeX -%% -%% 11/2001 (vers{\~a}o 3.1) -%% Modifica{\c c}{\~a}o das pontas das setas de forma a estas ficarem -%% semelhantes {\`a}s setas (s{\'\i}mbolos) dos TeX. -%% -%% 1/2002 (vers{\~a}o 3.2) -%% Modifica{\c c}{\~a}o dos comandos "obj" e "mor" de forma a introduzir -%% a especifica{\c c}{\~a}o l{\'o}gica dos morfismos, isto {\'e}, passa-se a -%% dizer qual {\'e} o objecto de partida e/ou o objecto de chegada -%% em vez de ter de especificar o morfismo em termos de -%% coordenadas. -%% Por outro lado o tamanho das setas passa a ser ajustado -%% automaticamente em rela{\c c}{\~a}o ao tamanho dos objectos. -%% -%% 5/2002 (versão 4.0) -%% Modificação dos comandos "begindc" e "obj" -%% !!! Modificação da sintaxe destes comandos !!! -%% O comando "begindc" passou a ter um argumento (obrigatório) -%% que nos permite especificar o tipo de grafo que estamos a -%% querer especificar: -%% "commdiag" (0), para diagramas comutativos -%% "digraph" (1), para grafos orientados -%% "undigraph" (2), para grafos não orientados -%% O comando "obj" modificou a sua sintaxe passou a ter um (após -%% a especificação das coordenadas, um argumento opcional, um -%% argumento obrigatório, e um argumento opcional. O primeiro -%% argumento opcional dá-nos a etiqueta que serve como -%% referência para a especificação dos morfismos, na sua -%% ausência usa-se o argumento obrigatório para esse efeito, o -%% argumento obrigatório dá-nos o "conteúdo" do objecto, nos -%% diagramas comutativos é centrado no ponto dado pelas -%% coordenadas sendo o argumento seguinte simplesmente ignorado, -%% nos grafos o "conteúdo" é colocado numa posição a norte, a -%% noroeste, a este, ..., sendo que a posição concreta é -%% especificada pelo último dos argumentos deste comando, o -%% valor por omissão é o "norte". -%% -%% 3/2003 (versão 4.1) -%% A pedido de Jon Barker criei um novo tipo -%% de seta, a seta de sobrejecção. -%% Para já a dupla seta só fica bem nas setas horizontais ou -%% verticais. -%% 12/2004 (versão 4.1.1) -%% Nova versão das setas de sobrejecção que corrigue -%% completamente os problemas da solução anterior. -%% 3/2007 (versão 4.1.2) -%% Acrescenta linhas a tracejado e a ponteado -%%-----------------//------------- - -\catcode`!=11 % ***** THIS MUST NEVER BE OMITTED (Ver PiCTeX) - -\newcount\aux% -\newcount\auxa% -\newcount\auxb% -\newcount\m% -\newcount\n% -\newcount\x% -\newcount\y% -\newcount\xl% -\newcount\yl% -\newcount\d% -\newcount\dnm% -\newcount\xa% -\newcount\xb% -\newcount\xmed% -\newcount\xc% -\newcount\xd% -\newcount\ya% -\newcount\yb% -\newcount\ymed% -\newcount\yc% -\newcount\yd -%% "variáveis globais" -\newcount\expansao% -\newcount\tipografo% versão 4.0 -\newcount\distanciaobjmor% versão 4.0 -\newcount\tipoarco% versão 4.0 -%\newif\ifarredondada% versão 4.0 (valor inicial "false") -\newif\ifpara% -%% version 3.2 -\newbox\caixa% -\newbox\caixaaux% -\newif\ifnvazia% -\newif\ifvazia% -\newif\ifcompara% -\newif\ifdiferentes% -\newcount\xaux% -\newcount\yaux% -\newcount\guardaauxa% -\newcount\alt% -\newcount\larg% -\newcount\prof% -%% para os ajustes -\newcount\auxqx -\newcount\auxqy -\newif\ifajusta% -\newif\ifajustadist -\def\objPartida{}% -\def\objChegada{}% -\def\objNulo{}% - - -%% -%% Stack specification -%% - -%% -%% Emtpy stack -%% -\def\!vazia{:} - -%% -%% Is Empty? : Stack -> Bool -%% -%% nvazia - True if Not Empy -%% vazia - True if Empty -\def\!pilhanvazia#1{\let\arg=#1% -\if:\arg\ \nvaziafalse\vaziatrue \else \nvaziatrue\vaziafalse\fi} - -%% -%% Push : Elems x Stack -> Stack -%% -\def\!coloca#1#2{\edef\pilha{#1.#2}} - -%% -%% Top : Stack -> Elems -%% -%% the empty stack is not taken care -%% the element is "kept" ("guardado") -\def\!guarda(#1)(#2,#3)(#4,#5,#6){\def\id{#1}% -\xaux=#2% -\yaux=#3% -\alt=#4% -\larg=#5% -\prof=#6% -} - -\def\!topaux#1.#2:{\!guarda#1} -\def\!topo#1{\expandafter\!topaux#1} - -%% -%% Pop : Stack -> Stack -%% -%% the empty stack is not taken care -\def\!popaux#1.#2:{\def\pilha{#2:}} -\def\!retira#1{\expandafter\!popaux#1} - -%% -%% Compares words : Word x Word -> Bool -%% -%% compara - True if equal -%% diferentes - True if not equal -\def\!comparaaux#1#2{\let\argA=#1\let\argB=#2% -\ifx\argA\argB\comparatrue\diferentesfalse\else\comparafalse\diferentestrue\fi} - -\def\!compara#1#2{\!comparaaux{#1}{#2}} - -%%Comando Interno -%% Valor absoluto (absolute value) -%% \absoluto{n}{absn} -%% entrada -%% n - natural -%% sa{\'\i}da -%% absn - o valor absoluto de n -\def\!absoluto#1#2{\n=#1% - \ifnum \n > 0 - #2=\n - \else - \multiply \n by -1 - #2=\n - \fi} - - -%% Name definitions for edge types and directions -\def\solidarrow{0} -\def\dasharrow{1} -\def\solidline{2} -\def\dashline{3} -\def\dotline{4} -\def\injectionarrow{5} -\def\aplicationarrow{6} -\def\surjectivearrow{7} -%% Name definitions for edge label placement -\def\atright{-1} -\def\atleft{1} -%% Tip direction for curved edges -\def\pup{0} -\def\pdown{1} -\def\pright{2} -\def\pleft{3} -%% Type of graph -\def\commdiag{0} -\def\digraph{1} -\def\undigraph{2} -\def\cdigraph{3} -\def\cundigraph{4} -%% Posicionamento da etiquetas nos grafos -\def\pcent{0} -\def\north{1} -\def\northeast{2} -\def\east{3} -\def\southeast{4} -\def\south{5} -\def\southwest{6} -\def\west{7} -\def\northwest{8} - - - -%%Comando Interno -%% Ajusta a dist{\^a}ncia entre as setas e os objectos em fun{\c c}{\~a}o das -%% dimens{\~o}es destes {\'u}ltimos -%% \ajusta{x}{xl}{y}{yl}{d}{Objecto} -%% entrada -%% (x,y) e (xl,yl), coordenadas dos pontos de {\'\i}nicio e fim da seta -%% d, dist{\^a}ncia especificada pelo utilizador ou 10 (valor por -%% omiss{\~a}o), Objecto d{\'a}-nos a refer{\^e}ncia do objecto ao qual se est{\'a} a -%% efectuar o ajuste. -%% sa{\'\i}da -%% d, dist{\^a}ncia alterada. -%% -%% A dist{\^a}ncia alterada {\'e} o maior valor entre 10 e as dimens{\~o}es -%% apropriadas da caixa que cont{\^e}m o objecto. -%% Se o utilizador especificar um valor essa especifica{\c c}{\~a}o -%% n{\~a}o {\'e} alterada. -%% -%% Se a seta {\'e} horizontal usa-se o valor da largura -%% Se a seta {\'e} vertical usa-se: -%% o valor da altura se a seta est{\'a} no 1o ou 2o quadrante -%% o valor da profundidade se a seta est{\'a} no 3o ou 4o quadrante -%% Se a seta {\'e} {\'o}bliqua vai-se escolher o valor conforme: -%% de 315 a 45 graus usa-se a largura -%% de 45 a 135 graus usa-se a altura -%% de 135 a 225 graus usa-se a largura -%% de 225 a 315 graus usa-se a profundidade -\def\!ajusta#1#2#3#4#5#6{\aux=#5% - \let\auxobj=#6% - \ifcase \tipografo % diagramas comutativos - \ifnum\number\aux=10 - \ajustadisttrue % se o valor é o valor por omissão ajusta - \else - \ajustadistfalse % caso contrário não ajusta - \fi - \else % grafos (dirigidos, não dirigidos, com molduras) - \ajustadistfalse -% \or % grafos não dirigidos -% \ajustadistfalse -% \else % grafos dirigidos com molduras circulares nos objectos -% \ifnum\number\aux=8 -% \ajustadisttrue % se o valor é o valor por omissão ajusta -% \else -% \ajustadistfalse % caso contrário não ajusta -% \fi - \fi - \ifajustadist -% \tiny Vou ajustar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% \ifnum\number\aux=10% verificar se s{\~a}o os valores por omiss{\~a}o - \let\pilhaaux=\pilha% - \loop% - \!topo{\pilha}% - \!retira{\pilha}% - \!compara{\id}{\auxobj}% - \ifcompara\nvaziafalse \else\!pilhanvazia\pilha \fi% - \ifnvazia% - \repeat% -%% rep{\~o}e os valores na pilha - \let\pilha=\pilhaaux% - \ifvazia% - \ifdiferentes% -%% -%% N{\~a}o {\'e} poss{\'\i}vel efectuar o ajuste dado o utilizador n{\~a}o ter -%% especificado uma etiqueta para o objecto em quest{\~a}o. {\'E} dado o -%% valor de 10, igual ao valor por omiss{\~a}o. -%% - \larg=1310720% n{\~a}o faz o ajuste - \prof=655360% - \alt=655360% - \fi% - \fi% - \divide\larg by 131072 - \divide\prof by 65536 - \divide\alt by 65536 - \ifnum\number\y=\number\yl -%% Caso 1 -- seta horizontal -%% -%% divide-se por 131072 para se obter metade da largura da caixa em -%% pontos (pt), isto dado que o texto est{\'a} centrado na caixa. Soma-se -%% mais tr{\^e}s, que constitue um ajuste imp{\'\i}rico. - \advance\larg by 3 - \ifnum\number\larg>\aux - #5=\larg - \fi - \else - \ifnum\number\x=\number\xl - \ifnum\number\yl>\number\y -%% Caso 2.1 -- seta vertical de cima para baixa -%% - \ifnum\number\alt>\aux - #5=\alt - \fi - \else -%% Caso 2.2 -- seta vertical de baixo para cima -%% -%% divide-se por 65536 para se obter a altura da caixa em pt. O ajuste -%% de 5 foi obtido imp{\'\i}ricamente - \advance\prof by 5 - \ifnum\number\prof>\aux - #5=\prof - \fi - \fi - \else -%% Caso 3 -- seta obl{\'\i}qua -%% Caso 3.1 de 315o a 45o; |x-xl|>|y-yl| e -%% Caso 3.3 de 135o a 225o; |x-xl|>|y-yl|; Largura - \auxqx=\x - \advance\auxqx by -\xl - \!absoluto{\auxqx}{\auxqx}% - \auxqy=\y - \advance\auxqy by -\yl - \!absoluto{\auxqy}{\auxqy}% - \ifnum\auxqx>\auxqy - \ifnum\larg<10 - \larg=10 - \fi - \advance\larg by 3 - #5=\larg - \else -%% Caso 3.2 de 45o a 135o; |x-xl|<|y-yl| e y>0; Largura - \ifnum\yl>\y - \ifnum\larg<10 - \larg=10 - \fi - \advance\alt by 6 - #5=\alt - \else -%% Caso 3.4 de 225o a 315o; |x-xl|<|y-yl| e y<0; Profundidade - \advance\prof by 11 - #5=\prof - \fi - \fi - \fi - \fi -\fi} % o ramo "else" {\'e} omisso - - -%%Comando Interno -%% C{\'a}lculo da Raiz Quadrada -%% raiz{n}{m} -%% entrada -%% n - natural -%% sa{\'\i}da -%% n - natural -%% m - maior natural contido na raiz quadrada de n -\def\!raiz#1#2{\n=#1% - \m=1% - \loop - \aux=\m% - \advance \aux by 1% - \multiply \aux by \aux% - \ifnum \aux < \n% - \advance \m by 1% - \paratrue% - \else\ifnum \aux=\n% - \advance \m by 1% - \paratrue% - \else\parafalse% - \fi - \fi - \ifpara% - \repeat -#2=\m} - -%%Comando Interno -%% Calcula os pontos de -%% come{\c c}o da "seta" -%% fim da "seta" -%% coloca{\c c}{\~a}o do s{\'\i}mbolo -%% -%% ucoord{x1}{x2}{x3}{x4}{x5}{x6}{+|- 1} -%% entrada -%% x1,x2,x3,x4,x5 -%% sa{\'\i}da -%% x6 -%% -%% x2 - x1 -%% x6 = x3 +|- ------- x4 -%% x5 -\def\!ucoord#1#2#3#4#5#6#7{\aux=#2% - \advance \aux by -#1% - \multiply \aux by #4% - \divide \aux by #5% - \ifnum #7 = -1 \multiply \aux by -1 \fi% - \advance \aux by #3% -#6=\aux} - -%%Comando Interno -%% C{\'a}lculo do Quadrado da Dist{\^a}ncia Euclidiana entre dois pontos -%% quadrado{n}{m}{l} -%% entrada -%% n - natural -%% m - natural -%% sa{\'\i}da -%% l = (n-m)*(n-m) -\def\!quadrado#1#2#3{\aux=#1% - \advance \aux by -#2% - \multiply \aux by \aux% -#3=\aux} - -%%Comando Interno -%% C{\'a}lculo auxiliar para determinar a dist{\^a}ncia entre o nome do -%% morfismo e a seta. -%% entrada -%% (x,y), (x',y') e o nome do morfismo -%% sa{\'\i}da -%% dnm - dist{\^a}ncia do nome ao morfismo respectivo devidamente -%% compensada pelo tamanho do objecto -%% Observa{\c c}{\~o}es -%% A compensa{\c c}{\~a}o s{\'o} est{\'a} a ser feita para setas -%% horizontais e verticais. As obl{\'\i}quas s{\~a}o tratadas de -%% outra forma. -%% algoritmo -%% caixa0 <- nome do morfismo -%% se x-xl = 0 entao {recta vertical} -%% aux <- largura da caixa0 -%% dnm <- convers{\~a}o-sp-pt(aux)/2+3 -%% sen{\~a}o {recta n{\~a}o vertical} -%% se y-yl = 0 entao {recta horizontal} -%% aux <- altura+profundidade da caixa0 -%% dnm <- convers{\~a}o-sp-pt(aux)/2+3 -%% sen{\~a}o {recta obl{\'\i}qua} -%% dnm <- 3 -%% fimse -%% fimse -%% fimalgoritmo -\def\!distnomemor#1#2#3#4#5#6{\setbox0=\hbox{#5}% - \aux=#1 - \advance \aux by -#3 - \ifnum \aux=0 - \aux=\wd0 \divide \aux by 131072 - \advance \aux by 3 - #6=\aux - \else - \aux=#2 - \advance \aux by -#4 - \ifnum \aux=0 - \aux=\ht0 \advance \aux by \dp0 \divide \aux by 131072 - \advance \aux by 3 - #6=\aux% - \else - #6=3 - \fi - \fi -} - - -%% -%% O ambiente "begindc...enddc" -%% -\def\begindc#1{\!ifnextchar[{\!begindc{#1}}{\!begindc{#1}[30]}} -\def\!begindc#1[#2]{\beginpicture - \let\pilha=\!vazia - \setcoordinatesystem units <1pt,1pt> - \expansao=#2 - \ifcase #1 - \distanciaobjmor=10 - \tipoarco=0 % seta - \tipografo=0 % diagrama comutativo - \or - \distanciaobjmor=2 - \tipoarco=0 % seta - \tipografo=1 % grafo orientado - \or - \distanciaobjmor=1 - \tipoarco=2 % linha - \tipografo=2 % grafo não orientado - \or - \distanciaobjmor=8 - \tipoarco=0 % seta - \tipografo=3 % grafo orientado -% \arredondadotrue % objectos com molduras circulares - \or - \distanciaobjmor=8 - \tipoarco=2 % linha - \tipografo=4 % grafo não orientado -% \arredondadotrue % objectos com molduras circulares - \fi} - -\def\enddc{\endpicture} - - -%% -%% Comando para construir a "seta" entre dois objectos -%% -%% Os pontos definidores da seta e da etiqueta respectiva s{\~a}o: -%% -%% (xd,yd) -%% o -%% | -%% o------o---------o---------o------o -%%(x,y) (xa,ya) (xm,ym) (xb,yb)(xl,yl) -%% -\def\mor{% - \!ifnextchar({\!morxy}{\!morObjA}} -\def\!morxy(#1,#2){% - \!ifnextchar({\!morxyl{#1}{#2}}{\!morObjB{#1}{#2}}} -\def\!morxyl#1#2(#3,#4){% - \!ifnextchar[{\!mora{#1}{#2}{#3}{#4}}{\!mora{#1}{#2}{#3}{#4}[\number\distanciaobjmor,\number\distanciaobjmor]}}% -\def\!morObjA#1{% - \let\pilhaaux=\pilha% - \def\objPartida{#1}% - \loop% - \!topo\pilha% - \!retira\pilha% - \!compara{\id}{\objPartida}% - \ifcompara \nvaziafalse \else \!pilhanvazia\pilha \fi% - \ifnvazia% - \repeat% - \ifvazia% - \ifdiferentes% -%% -%% Mensagem de erro e atribui{\c c}{\~a}o de valores fict{\'\i}cios aos -%% argumentos dos comandos que se seguem. -%% - Error: Incorrect label specification% - \xaux=1% - \yaux=1% - \fi% - \fi% - \let\pilha=\pilhaaux% - \!ifnextchar({\!morxyl{\number\xaux}{\number\yaux}}{\!morObjB{\number\xaux}{\number\yaux}}} -\def\!morObjB#1#2#3{% - \x=#1 - \y=#2 - \def\objChegada{#3}% - \let\pilhaaux=\pilha% - \loop - \!topo\pilha % - \!retira\pilha% - \!compara{\id}{\objChegada}% - \ifcompara \nvaziafalse \else \!pilhanvazia\pilha \fi - \ifnvazia - \repeat - \ifvazia - \ifdiferentes% -%% -%% Mensagem de erro e atribui{\c c}{\~a}o de valores fict{\'\i}cios aos -%% argumentos dos comandos que se seguem. -%% - Error: Incorrect label specification - \xaux=\x% - \advance\xaux by \x% - \yaux=\y% - \advance\yaux by \y% - \fi - \fi - \let\pilha=\pilhaaux - \!ifnextchar[{\!mora{\number\x}{\number\y}{\number\xaux}{\number\yaux}}{\!mora{\number\x}{\number\y}{\number\xaux}{\number\yaux}[\number\distanciaobjmor,\number\distanciaobjmor]}} -\def\!mora#1#2#3#4[#5,#6]#7{% - \!ifnextchar[{\!morb{#1}{#2}{#3}{#4}{#5}{#6}{#7}}{\!morb{#1}{#2}{#3}{#4}{#5}{#6}{#7}[1,\number\tipoarco] }} -\def\!morb#1#2#3#4#5#6#7[#8,#9]{\x=#1% - \y=#2% - \xl=#3% - \yl=#4% - \multiply \x by \expansao% - \multiply \y by \expansao% - \multiply \xl by \expansao% - \multiply \yl by \expansao% -%% -%% calcular a dist{\^a}ncia Euclidiana entre dois pontos -%% d = \sqrt((x-xl)^2+(y-yl)^2) -%% - \!quadrado{\number\x}{\number\xl}{\auxa}% - \!quadrado{\number\y}{\number\yl}{\auxb}% - \d=\auxa% - \advance \d by \auxb% - \!raiz{\d}{\d}% -%% -%% o ponto (xa,ya) est{\'a} {\`a} dist{\^a}ncia #5 (valor por omiss{\~a}o 10) do ponto -%% (x,y) -%% -%% como existem dois pontos em considera{\c c}{\~a}o, o ponto de partida e o -%% ponto de chegada, vai sei necess{\'a}rio recuperar de novo os seus -%% valores por pesquisa na pilha - \auxa=#5 - \!compara{\objNulo}{\objPartida}% - \ifdiferentes% S{\'o} vai fazer o ajuste quando {\'e} necess{\'a}rio - \!ajusta{\x}{\xl}{\y}{\yl}{\auxa}{\objPartida}% - \ajustatrue - \def\objPartida{}% re-inicializar o valor do Objecto de Partida - \fi -%% vai guardar o valor de auxa (ap{\'o}s ajuste) para ser usado no caso -%% dos morfismos de injec{\c c}{\~a}o. - \guardaauxa=\auxa -%% - \!ucoord{\number\x}{\number\xl}{\number\x}{\auxa}{\number\d}{\xa}{1}% - \!ucoord{\number\y}{\number\yl}{\number\y}{\auxa}{\number\d}{\ya}{1}% -%% auxa vai ter o valor da dist{\^a}ncia entre os objectos menos a -%% dist{\^a}ncia da seta ao objecto (10 por omiss{\~a}o) - \auxa=\d% -%% -%% o ponto (xb,yb) est{\'a} {\`a} dist{\^a}ncia #6 (valor por omiss{\~a}o 10) do ponto -%% (xl,yl) -%% - \auxb=#6 - \!compara{\objNulo}{\objChegada}% - \ifdiferentes% S{\'o} vai fazer o ajuste quando {\'e} necess{\'a}rio -% Vou ajustar - \!ajusta{\x}{\xl}{\y}{\yl}{\auxb}{\objChegada}% - \def\objChegada{}% re-inicializar o valor do Objecto de Chegada - \fi - \advance \auxa by -\auxb% - \!ucoord{\number\x}{\number\xl}{\number\x}{\number\auxa}{\number\d}{\xb}{1}% - \!ucoord{\number\y}{\number\yl}{\number\y}{\number\auxa}{\number\d}{\yb}{1}% - \xmed=\xa% - \advance \xmed by \xb% - \divide \xmed by 2 - \ymed=\ya% - \advance \ymed by \yb% - \divide \ymed by 2 -%% -%% - \!distnomemor{\number\x}{\number\y}{\number\xl}{\number\yl}{#7}{\dnm}% - \!ucoord{\number\y}{\number\yl}{\number\xmed}{\number\dnm}{\number\d}{\xc}{-#8}% - \!ucoord{\number\x}{\number\xl}{\number\ymed}{\number\dnm}{\number\d}{\yc}{#8}% -\ifcase #9 % Seta S{\'o}lida - \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} -\or % Seta a Tracejado - \setdashes - \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} - \setsolid -\or % Linha S{\'o}lida - \setlinear - \plot {\xa} {\ya} {\xb} {\yb} / -\or % Linha Tracejado - \setdashes - \setlinear - \plot {\xa} {\ya} {\xb} {\yb} / - \setsolid -\or % Linha a Ponteado - \setdots - \setlinear - \plot {\xa} {\ya} {\xb} {\yb} / - \setsolid -\or % Seta de Injec{\c c}{\~a}o -%% C{\'a}lculos auxiliares -%% -%% 3 valor para o raio do "rabo" da "seta" -%% -%% repor o valor de auxa - \auxa=\guardaauxa -%% dar a compensa{\c c}{\~a}o para o "rabo" - \advance \auxa by 3% -%% -%% IMPORTANTE os valores de xa e ya v{\~a}o ser alterados -%% - \!ucoord{\number\x}{\number\xl}{\number\x}{\number\auxa}{\number\d}{\xa}{1}% - \!ucoord{\number\y}{\number\yl}{\number\y}{\number\auxa}{\number\d}{\ya}{1}% - \!ucoord{\number\y}{\number\yl}{\number\xa}{3}{\number\d}{\xd}{-1}% - \!ucoord{\number\x}{\number\xl}{\number\ya}{3}{\number\d}{\yd}{1}% -%% Constru{\c c}{\~a}o da "seta" - \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} -%% e do seu "rabo" - \circulararc -180 degrees from {\xa} {\ya} center at {\xd} {\yd} -\or % Seta de Aplica{\c c}{\~a}o ("|-->") - \auxa=3% valor para o meio-segmento do "rabo" da "seta" -%% c{\'a}lculo dos pontos (xmed,ymed) e (xd,yd) para o segmento de recta que -%% define o "rabo" da seta - \!ucoord{\number\y}{\number\yl}{\number\xa}{\number\auxa}{\number\d}{\xmed}{-1}% - \!ucoord{\number\x}{\number\xl}{\number\ya}{\number\auxa}{\number\d}{\ymed}{1}% - \!ucoord{\number\y}{\number\yl}{\number\xa}{\number\auxa}{\number\d}{\xd}{1}% - \!ucoord{\number\x}{\number\xl}{\number\ya}{\number\auxa}{\number\d}{\yd}{-1}% -%% Constru{\c c}{\~a}o da "seta" - \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} -%% e do seu "rabo" - \setlinear - \plot {\xmed} {\ymed} {\xd} {\yd} / -\or % Seta de Sobrejec{\c c}{\~a}o ("-->>") - \arrow <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} -%% e da segunda "seta" - \setlinear - \arrow <6pt> [0,.72] from {\xa} {\ya} to {\xb} {\yb} -\fi -%% Coloca{\c c}{\~a}o do nome do morfismo. -%% Se os morfismos s{\~a}o horizontais ou verticais constro{\'\i} uma caixa -%% centrada no ponto pr{\'e}viamente calculado. Se as setas s{\~a}o -%% obl{\'\i}quas coloca a caixa de forma a n{\~a}o colidir com o morfismo -%% tendo em aten{\c c}{\~a}o o quadrante assim como a posi{\c c}{\~a}o -%% relativa do morfismo e do respectivo nome. -\auxa=\xl -\advance \auxa by -\x% -\ifnum \auxa=0 - \put {#7} at {\xc} {\yc} -\else - \auxb=\yl - \advance \auxb by -\y% - \ifnum \auxb=0 \put {#7} at {\xc} {\yc} - \else - \ifnum \auxa > 0 - \ifnum \auxb > 0 - \ifnum #8=1 - \put {#7} [rb] at {\xc} {\yc} - \else - \put {#7} [lt] at {\xc} {\yc} - \fi - \else - \ifnum #8=1 - \put {#7} [lb] at {\xc} {\yc} - \else - \put {#7} [rt] at {\xc} {\yc} - \fi - \fi - \else - \ifnum \auxb > 0 - \ifnum #8=1 - \put {#7} [rt] at {\xc} {\yc} - \else - \put {#7} [lb] at {\xc} {\yc} - \fi - \else - \ifnum #8=1 - \put {#7} [lt] at {\xc} {\yc} - \else - \put {#7} [rb] at {\xc} {\yc} - \fi - \fi - \fi - \fi -\fi -} - -%% -%% Comando para construir a "seta" curvilinea entre dois objectos -%% -%% \cmor(){} -%% -%% Em primeiro lugar {\'e} necess{\'a}rio modificar o comando plot de forma a -%% que a sintaxe de utiliza{\c c}{\~a}o do novo comando seja coerente com a -%% sintaxe dos restantes comandos -%% -\def\modifplot(#1{\!modifqcurve #1} -\def\!modifqcurve(#1,#2){\x=#1% - \y=#2% - \multiply \x by \expansao% - \multiply \y by \expansao% - \!start (\x,\y) - \!modifQjoin} -\def\!modifQjoin(#1,#2)(#3,#4){\x=#1% - \y=#2% - \xl=#3% - \yl=#4% - \multiply \x by \expansao% - \multiply \y by \expansao% - \multiply \xl by \expansao% - \multiply \yl by \expansao% - \!qjoin (\x,\y) (\xl,\yl) % \!qjoin is defined in QUADRATIC - \!ifnextchar){\!fim}{\!modifQjoin}} -\def\!fim){\ignorespaces} - -%% -%% O comando para desenhar a seta vai receber a lista de pontos da qual -%% retira o {\'u}ltimo par de pontos, dependente da escolha dada pelo -%% utilizador a seta vai ser desenhada para cima, para baixo, para a -%% direita ou para a esquerda -%% -\def\setaxy(#1{\!pontosxy #1} -\def\!pontosxy(#1,#2){% - \!maispontosxy} -\def\!maispontosxy(#1,#2)(#3,#4){% - \!ifnextchar){\!fimxy#3,#4}{\!maispontosxy}} -\def\!fimxy#1,#2){\x=#1% - \y=#2 - \multiply \x by \expansao - \multiply \y by \expansao - \xl=\x% - \yl=\y% - \aux=1% - \multiply \aux by \auxa% - \advance\xl by \aux% - \aux=1% - \multiply \aux by \auxb% - \advance\yl by \aux% - \arrow <4pt> [.2,1.1] from {\x} {\y} to {\xl} {\yl}} - - -%% -%% Temos agora a defini{\c c}{\~a}o do comando "cmor" -%% -\def\cmor#1 #2(#3,#4)#5{% - \!ifnextchar[{\!cmora{#1}{#2}{#3}{#4}{#5}}{\!cmora{#1}{#2}{#3}{#4}{#5}[0] }} -\def\!cmora#1#2#3#4#5[#6]{% - \ifcase #2% para cima "\pup" (pointing up) - \auxa=0% x mant{\^e}m-se - \auxb=1% o y "sobe" - \or% para baixo "\pdown" (pointing down) - \auxa=0% x mant{\^e}m-se - \auxb=-1% o y "desce" - \or% para a direita "\pright" (pointing right) - \auxa=1% o x move-se para a direita - \auxb=0% o y mant{\^e}m-se - \or% para a esquerda "\pleft" (pointing left) - \auxa=-1% o x move-se para a esquerda - \auxb=0% o y mant{\^e}m-se - \fi % constru{\c c}{\~a}o do arco - \ifcase #6 % arco (com seta) s{\'o}lido - \modifplot#1% Desenhar o arco - % constru{\c c}{\~a}o da seta - \setaxy#1 - \or % arco (com seta) a tracejado - \setdashes - \modifplot#1% Desenhar o arco - \setaxy#1 - \setsolid - \or % arco sem seta - \modifplot#1% Desenhar o arco - \fi % seta de injec{\c c}{\~a}o -%% coloca{\c c}{\~a}o da etiqueta do morfismo - \x=#3% - \y=#4% - \multiply \x by \expansao% - \multiply \y by \expansao% - \put {#5} at {\x} {\y}} - -%% -%% Comando para construir os Objectos -%% \obj(x,y){}[] -%% -\def\obj(#1,#2){% - \!ifnextchar[{\!obja{#1}{#2}}{\!obja{#1}{#2}[Nulo]}} -\def\!obja#1#2[#3]#4{% - \!ifnextchar[{\!objb{#1}{#2}{#3}{#4}}{\!objb{#1}{#2}{#3}{#4}[1]}} -\def\!objb#1#2#3#4[#5]{% - \x=#1% - \y=#2% - \def\!pinta{\normalsize$\bullet$}% para definir o tamanho normal das pintas - \def\!nulo{Nulo}% - \def\!arg{#3}% - \!compara{\!arg}{\!nulo}% - \ifcompara\def\!arg{#4}\fi% - \multiply \x by \expansao% - \multiply \y by \expansao% - \setbox\caixa=\hbox{#4}% - \!coloca{(\!arg)(#1,#2)(\number\ht\caixa,\number\wd\caixa,\number\dp\caixa)}{\pilha}% - \auxa=\wd\caixa \divide \auxa by 131072 - \advance \auxa by 5 - \auxb=\ht\caixa - \advance \auxb by \number\dp\caixa - \divide \auxb by 131072 - \advance \auxb by 5 -%(\number\auxa, -%\number\auxb) -% \aux=\ht\caixa \divide \auxa by 131072 -% \advance \auxa by 5 -% \auxb=\dp\caixa \divide \auxb by 131072 -% \advance \auxb by 8 - \ifcase \tipografo % diagramas comutativos - \put{#4} at {\x} {\y} - \or % grafos dirigidos - \ifcase #5 % c=0 - \put{#4} at {\x} {\y} - \or % n=1 - \put{\!pinta} at {\x} {\y} - \advance \y by \number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % ne=2 - \put{\!pinta} at {\x} {\y} - \advance \auxa by -2 % para fazer o ajuste (imperfeito) - \advance \auxb by -2 % ao raio da circunferência de centro (x,y) - \advance \x by \number\auxa % width+5 - \advance \y by \number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % e=3 - \put{\!pinta} at {\x} {\y} - \advance \x by \number\auxa % width+5 - \put{#4} at {\x} {\y} - \or % se=4 - \put{\!pinta} at {\x} {\y} - \advance \auxa by -2 % para fazer o ajuste (imperfeito) - \advance \auxb by -2 % ao raio da circunferência de centro (x,y) - \advance \x by \number\auxa % width+5 - \advance \y by -\number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % s=5 - \put{\!pinta} at {\x} {\y} - \advance \y by -\number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % sw=6 - \put{\!pinta} at {\x} {\y} - \advance \auxa by -2 % para fazer o ajuste (imperfeito) - \advance \auxb by -2 % ao raio da circunferência de centro (x,y) - \advance \x by -\number\auxa % width+5 - \advance \y by -\number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % w=7 - \put{\!pinta} at {\x} {\y} - \advance \x by -\number\auxa % width+5 - \put{#4} at {\x} {\y} - \or % nw=8 - \put{\!pinta} at {\x} {\y} - \advance \auxa by -2 % para fazer o ajuste (imperfeito) - \advance \auxb by -2 % ao raio da circunferência de centro (x,y) - \advance \x by -\number\auxa % width+5 - \advance \y by \number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \fi - \or % grafos não dirigidos - \ifcase #5 % c=0 - \put{#4} at {\x} {\y} - \or % n=1 - \put{\!pinta} at {\x} {\y} - \advance \y by \number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % ne=2 - \put{\!pinta} at {\x} {\y} - \advance \auxa by -2 % para fazer o ajuste (imperfeito) - \advance \auxb by -2 % ao raio da circunferência de centro (x,y) - \advance \x by \number\auxa % width+5 - \advance \y by \number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % e=3 - \put{\!pinta} at {\x} {\y} - \advance \x by \number\auxa % width+5 - \put{#4} at {\x} {\y} - \or % se=4 - \put{\!pinta} at {\x} {\y} - \advance \auxa by -2 % ver acima - \advance \auxb by -2 - \advance \x by \number\auxa % width+5 - \advance \y by -\number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % s=5 - \put{\!pinta} at {\x} {\y} - \advance \y by -\number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % sw=6 - \put{\!pinta} at {\x} {\y} - \advance \auxa by -2 % ver acima - \advance \auxb by -2 - \advance \x by -\number\auxa % width+5 - \advance \y by -\number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \or % w=7 - \put{\!pinta} at {\x} {\y} - \advance \x by -\number\auxa % width+5 - \put{#4} at {\x} {\y} - \or % nw=8 - \put{\!pinta} at {\x} {\y} - \advance \auxa by -2 % ver acima - \advance \auxb by -2 - \advance \x by -\number\auxa % width+5 - \advance \y by \number\auxb % height+depth+5 - \put{#4} at {\x} {\y} - \fi -% \or % grafos dirigidos com molduras circulares nos objectos -% \advance \auxa by 4 -% \put{\circle{\auxa}} [Bl] at {\x} {\y} -% \put{#4} at {\x} {\y} -% \or % grafos não dirigidos com molduras circulares nos objectos - \else % grafos com molduras circulares nos objectos - \ifnum\auxa<\auxb % determina a maior das dimensões - \aux=\auxb - \else - \aux=\auxa - \fi -% se a largura da caixa é menor do que 1em então o tamanho -% tamanho é ajustado para esse valor mínimo - \ifdim\wd\caixa<1em - \dimen99 = 1em - \aux=\dimen99 \divide \aux by 131072 - \advance \aux by 5 - \fi - \advance\aux by -2 %folga entre o objecto e a moldura - \multiply\aux by 2 % - \ifnum\aux<30 - \put{\circle{\aux}} [Bl] at {\x} {\y} - \else - \multiply\auxa by 2 - \multiply\auxb by 2 - \put{\oval(\auxa,\auxb)} [Bl] at {\x} {\y} - \fi - \put{#4} at {\x} {\y} - \fi -} - - -\catcode`!=12 % ***** THIS MUST NEVER BE OMITTED (Ver PiCTeX) -- cgit v1.2.3