diff options
-rw-r--r-- | Master/texmf-dist/doc/generic/dcpic/README.TEXLIVE | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/dcpic/eurotex2001.pdf | bin | 0 -> 197271 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/dcpic/eurotex2001.tex | 916 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/dcpic/examples.pdf | bin | 0 -> 221190 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/dcpic/examples.tex | 395 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/dcpic/manDCPiC.pdf | bin | 0 -> 287676 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/dcpic/manDCPiC.tex | 723 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/dcpic/manDCPiCpt.pdf | bin | 0 -> 297287 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/dcpic/manDCPiCpt.tex | 846 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/dcpic/dcpic.sty | 818 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/dcpic/europroc.cls | 332 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkginfo | 2 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 3 |
13 files changed, 3456 insertions, 587 deletions
diff --git a/Master/texmf-dist/doc/generic/dcpic/README.TEXLIVE b/Master/texmf-dist/doc/generic/dcpic/README.TEXLIVE deleted file mode 100644 index d6367106ff5..00000000000 --- a/Master/texmf-dist/doc/generic/dcpic/README.TEXLIVE +++ /dev/null @@ -1,8 +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 at - http://mirror.ctan.org/macros/generic/diagrams/dcpic -If questions or concerns, email tex-live@tug.org. - - manPT_dcpic.pdf - man_dcpic.pdf diff --git a/Master/texmf-dist/doc/generic/dcpic/eurotex2001.pdf b/Master/texmf-dist/doc/generic/dcpic/eurotex2001.pdf Binary files differnew file mode 100644 index 00000000000..b115f62a5eb --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/eurotex2001.pdf diff --git a/Master/texmf-dist/doc/generic/dcpic/eurotex2001.tex b/Master/texmf-dist/doc/generic/dcpic/eurotex2001.tex new file mode 100644 index 00000000000..4b54ad718c1 --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/eurotex2001.tex @@ -0,0 +1,916 @@ +% $Id: eurotex2001-pqa-article.tex,v 1.9 2001/11/12 09:53:59 pedro Exp pedro $ +\documentclass{europroc} +\usepackage[dvips]{graphicx} +\usepackage{dcpic,pictex} +\usepackage{calrsfs} +\usepackage{dsfont} +\usepackage{alltt} + + + +\begin{document} + +\title[DCpic]{DCpic, Commutative Diagrams in a (La)\TeX\ Document} +\author[Pedro Quaresma]{Pedro Quaresma\thanks{This work was partially +supported by the Portuguese Ministry of Science and Technology (MCT), +under the programme PRAXIS XXI.}\\ CISUC\\ Departamento de +Matem{\'a}tica, Universidade de Coimbra\\ 3001-454 COIMBRA, PORTUGAL} + + +\maketitle + +\begin{abstract} + DCpic is a package of \TeX\ macros for graphing Commutative Diagrams + 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 commutative diagram is described in + terms of its objects and its arrows. The objects are + textual elements and the arrows can have various straight or curved + forms. + + We describe the syntax and semantics of the user's commands, and + present many examples of their use. +\end{abstract} + +\keywords{Commutative Diagrams, (La)\TeX, \PiCTeX} + +\section{Introduction} + +\initial{3}{C}{\scshape ommutative Diagrams} (Diagramas Comutativos, +in Portuguese), are a kind of graphs which are widely used in Category +Theory~\cite{Herrlich73,MacLane71,Pierce98}, not only as a concise and +convenient notation but also for ``arrow chasing'', a powerful tool +for mathematical thought. For example, the fact that in a Category we +have arrow composition is easily expressed by the following +commutative diagram. + +$$ +\begindc{\commdiag}[30] +\obj(10,15){$A$} +\obj(25,15){$B$} +\obj(40,15){$C$} +\mor(10,15)(25,15){$f$} +\mor(25,15)(40,15){$g$} +\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) +\pup(25,3){$g\circ f$} +\enddc +$$ + +The word commutative means that the result from going throught the +path $f$ plus $g$ is equal to the result from going throught the path +$g\circ f$. Most of the graphs used in Category Theory are digraphs which +we can specify in terms of its objects, and its arrows. + +The (La)\TeX\ approach to typesetting can be characterized as +``logical design''~\cite{Knuth86,Lamport94,Otten99}, but commutative +diagrams are pieces of ``visual design'', and that, in our opinion is +the {\em piece de resistance} of commutative diagrams package +implementation in (La)\TeX. In a commutative diagrams package a user +seeks the simplest notation, a logical notation, with the most +powerful graphical engine possible, the visual part. The DCpic +package, along with the package by John +Reynolds~\cite{Feruglio94,Reynolds87}, has the simplest notation off +all the commutative diagrams packages described in the Feruglio +article~\cite{Feruglio94}. In terms of graphical capabilities the +\PiCTeX~\cite{Wichura87} package provides us with the best +\TeX-graphics engine, that is, without going to {\em Postscript} +specials. + +The DCpic package depends only of \PiCTeX\ and \TeX, +which means that you can use it in all formats that are based on these +two. We have tested DCpic with \LaTeX, \TeX\ plain, pdf\LaTeX, +pdf\TeX~\cite{Thanh99}, and Con\TeX t~\cite{Otten99}; we are confident +that it can be used under many other formats. + +The present version (3.1) of DCpic package is available in CTAN and in +the author's Web-page\footnote{http://www.mat.uc.pt/{\~{}}pedro/LaTeX/}. + + +\section{Constructing Commutative Diagrams} + +DCpic depends on \PiCTeX, thus you must include an apropriate command +to load \PiCTeX\ and DCpic in your document, +e.g. ``{\tt $\backslash$usepackage\{dcpic,pictex\}}'', in a \LaTeX\ document. + +A commutative diagram in DCpic is a ``picture'' in \PiCTeX, in which +we place our {\em objects} and {\em morphisms} (arrows). 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 arrows, and its labels. + +Now we will describe each of these commands in greater detail. + +\subsection{The Diagram Environment} + +The command {\tt begindc}, establishes a Cartesian coordinate system +with 1pt units, + +\begin{alltt} + \(\backslash\)begindc[{\em<magnification factor>}] \dots \(\backslash\)enddc +\end{alltt} +such a small unit gives us a good control over the placement of the +graphical objects, but in most of the diagrams not involving curved +arrows such a ``fine grain'' is not desirable, so the optional +argument specifies a magnifying factor $m\in\mathds{N}$, with a default +value of 30. The advantage of this decision is twofold: we can define +the ``grain'' of the diagram, and we can adjust the size of the +diagram to the available space. +\begin{itemize} +\item a ``course grain'' diagram is specified almost as a table, with +the numbers giving us the lines and the columns were the objects will +be placed, the following diagram has the default magnification factor: + +\begin{center} + \begin{tabular}{cc} + \begindc{\commdiag}[300] + \obj(1,1){$A$} + \obj(3,1){$B$} + \obj(3,3){$C$} + \mor(1,1)(3,1){$f$}[\atright,\solidarrow] + \mor(1,1)(3,3){$g$} + \mor(3,1)(3,3){$h$}[\atright,\solidarrow] + \enddc &\tt + \begin{tabular}[b]{l} + $\backslash$begindc\{$\backslash$commdiag\}\\ + $\backslash$obj(1,1)\{\$A\$\}\\ + $\backslash$obj(3,1)\{\$B\$\}\\ + $\backslash$obj(3,3)\{\$C\$\}\\ + $\backslash$mor(1,1)(3,1)\{\$f\$\}[$\backslash$atright,$\backslash$solidarrow]\\ + $\backslash$mor(1,1)(3,3)\{\$g\$\}\\ + $\backslash$mor(3,1)(3,3)\{\$h\$\}[$\backslash$atright,$\backslash$solidarrow]\\ + $\backslash$enddc + \end{tabular} + \end{tabular} +\end{center} +\item a ``fine grain'' diagram is a bit harder to design but it gives +us a better control over the objects placement, the following diagram +has a magnification factor of three, this gives us the capability of +drawing the arrows $f$ and $f^\prime$ very close together: +\begin{center} + \begin{tabular}{cc} + \begindc{\commdiag}[30] + \obj(10,10){$A$} + \obj(30,10){$B$} + \obj(30,30){$C$} + \mor(10,9)(30,9){$f$}[\atright,\solidarrow] + \mor(10,11)(30,11){$f^\prime$} + \mor(10,10)(30,30){$g$} + \mor(30,10)(30,30){$h$}[\atright,\solidarrow] + \enddc &\tt + \begin{tabular}[b]{l} + $\backslash$begindc\{$\backslash$commdiag\}[30]\\ + $\backslash$obj(10,10)\{\$A\$\}\\ + $\backslash$obj(30,10)\{\$B\$\}\\ + $\backslash$obj(30,30)\{\$C\$\}\\ + $\backslash$mor(10,9)(30,9)\{\$f\$\}[$\backslash$atright,$\backslash$solidarrow]\\ + $\backslash$mor(10,11)(30,11)\{\$f{\^{}}$\backslash$prime\$\}\\ + $\backslash$mor(10,10)(30,30)\{\$g\$\}\\ + $\backslash$mor(30,10)(30,30)\{\$h\$\}[$\backslash$atright,$\backslash$solidarrow]\\ + $\backslash$enddc + \end{tabular} + \end{tabular} +\end{center} +\item the magnification factor gives us the capability of adapting the + size of the diagram to the available space, without having to + redesign the diagram, for example the specification of the + next two diagrams differs only in the magnification factor: 30 for + the first; and 25 for the second. +\begin{center} + \begin{tabular}{cc} + \begindc{\commdiag}[300] + \obj(1,1){$A$} + \obj(3,1){$B$} + \obj(3,3){$C$} + \mor(1,1)(3,1){$f$}[\atright,\solidarrow] + \mor(1,1)(3,3){$g$} + \mor(3,1)(3,3){$h$}[\atright,\solidarrow] + \enddc & + \begindc{\commdiag}[250] + \obj(1,1){$A$} + \obj(3,1){$B$} + \obj(3,3){$C$} + \mor(1,1)(3,1){$f$}[\atright,\solidarrow] + \mor(1,1)(3,3){$g$} + \mor(3,1)(3,3){$h$}[\atright,\solidarrow] + \enddc + \end{tabular} +\end{center} +\end{itemize} + +Note that the magnification factor does not interfere with the size of +the objects, but only with the size of the diagram as a whole. + +After establishing our ``drawing board'' we can begin placing our +``objects'' on it, we have three commands to do so, the {\tt obj}, +{\tt mor}, and {\tt cmor}, for objects, morphisms, and ``curved'' +morphisms respectively. + + +\subsection{Objects} + +Each object has a place and a content + +\begin{alltt} + \(\backslash\)obj({\em<x>},{\em<y>})\{{\em<contents>}\} +\end{alltt} +the $x$ and $y$, integer values, will be multiplied by the magnifying +factor. The {\em contents} will be put in the centre of an ``hbox'' +expanding to both sides of $(m\times x,m\times y)$. + + +\subsection{Linear Arrows} + + +Each linear arrow will have as mandatory arguments two pairs of +coordinates, the beginning and the ending points, and a label, + +{\small\begin{alltt} +\(\backslash\)mor({\em<x1>},{\em<y1>})({\em<x2>},{\em<y2>})[{\em<d1>},{\em<d2>}]\{{\em<label>}\}[{\em<label placement>},{\em<arrow type>}] +\end{alltt}}% +\noindent the other arguments are opcional. The two pairs of coordinates should +coincide with the coordinates of two objects in the diagram, but no +verification of this fact is made. The line connecting the two points +is constructed in the following way: the beginning is given by a point +10pt away from the point $(m\times x_1,m\times y_1)$, likewise the end point is +10 points away from $(m\times x_2,m\times y_2)$. If the ``arrow type'' specifies +that, a tail, and a pointer (arrow) will be added. If the arrow is +horizontal (vertical) the label is placed in a ``hbox'' with centre +point, $(x_l,y_l)$, at a distance of 10 points plus a correction +factor depending of the ``hbox'' width (height) from the middle point +of the arrow. If the arrow is obliquos the point $(x_l,y_l)$, at a +distance of 10 points from the middle point of the arrow, will be the +bottom-right corner or the top-left corner of the ``hbox'' containing +the label, depending of the angle of the arrow, and the label +placement. In all cases the position of the +``hbox'' is such that the contents of it will not interfere with the +line. + +The distance from the point $(m\times x_1,m\times y_1)$ to the actual beginning of the +arrow may be modified by the user with the specification of $d_1$, the +same thing happens for the arrow actual ending in which case the +user-value will be $d_2$. The specification of $d_1$ and $d_2$ is +optional. + +The placement of the label, to the left (default value), or to the +right, and the type of the arrow: a solid arrow (default value), a +dashed arrow, a line, an injection arrow, or an application arrow, are +the last optional arguments of this command. + + +\subsection{Quadratic Arrows} + +The command that draws curved lines in DCpic uses the {\tt +setquadratic} command of \PiCTeX, this will imply a quadratic +curve specified by an odd-number of points, + +{\small\begin{alltt} + \(\backslash\)cmor({\em<list of points>}){\textvisiblespace}{\em<arrow direction>}({\em<x>},{\em<y>})\{{\em<label>}\}[{\em<arrow type>}] +\end{alltt}} +\noindent the space after the list of points is mandatory. After drawing the +curved line we must put the tip of the arrow on it, at present it is +only possible to choose from: up, down, left, or right pointing arrow, +and we must explicitly specify what type we want. The next thing to +draw it is the arrow label, the placement of that label is determined +by the $x$, and $y$ values which give us the coordinates, after being +magnified, of the centre of the ``hbox'' that will contain the label +itself. + +The arrow type is an optional argument, its default value is a solid +arrow, the other possible values are a dashed arrow and a line, in +this last case the arrow tip is omitted. The arrow type values are a +subset of those of the {\tt mor} command. + +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. + + +\section{Examples} + +We now present some examples that give an idea of the DCpic package +capabilities. We will present here the diagrams, and in the appendix +the code which produced such diagrams. + +\subsection{The Easy Ones} + +The diagrams presented in this section are very easy to specify in the +DCpic syntax, just a couple of objects and the arrows joining them. + +\begin{description} +\item[Push-out and Exponentials:] + + +$$ +\begindc{\commdiag}[260] +\obj(1,1){$Z$} +\obj(1,3){$X$} +\obj(3,1){$Y$} +\obj(3,3){$P$} +\obj(5,5){$P^\prime$} +\mor(1,1)(1,3){$f$} +\mor(1,1)(3,1){$g$}[\atright,\solidarrow] +\mor(1,3)(3,3){$r$}[\atright,\solidarrow] +\mor(3,1)(3,3){$s$} +\mor(1,3)(5,5){$r^\prime$} +\mor(3,1)(5,5){$s^\prime$}[\atright,\solidarrow] +\mor(3,3)(5,5){$h$}[\atright,\dashArrow] +\enddc +\qquad +\begindc{\commdiag}[350] +\obj(1,3)[A]{$Z^Y\times Y$} +\obj(3,3)[B]{$Z$} +\obj(3,1)[C]{$X\times{}Y$} +\obj(4,1)[D]{$X$} +\obj(4,3)[E]{$Z^Y$} +\mor{A}{B}{$ev$} +\mor{C}{A}{$f\times{}\mathrm{id}$} +\mor{C}{B}{$\overline{f}$}[\atright,\dashArrow] +\mor{D}{E}{$f$}[\atright,\solidarrow] +\enddc +$$ + +\item[Function Restriction and the {\em CafeOBJ\/} +Cube~\cite{Diaconescu98}] + +%\footnotetext{R. Diaconescu and K. Futatsugi, The CafeOBJ Report, +%World Scientific, 1998} + +$$ +\begindc{\commdiag}[280] +\obj(1,1){$X$} +\obj(1,3){$X^\prime$} +\obj(4,1){$Y$} +\obj(4,3){$Y^\prime$} +\mor(1,1)(4,1){$f$} +\mor(1,3)(1,1){}[\atright,\injectionarrow] +\mor(4,3)(4,1){}[\atright,\injectionarrow] +\mor(1,3)(4,3){$g=f|^{Y^\prime}_{X^\prime}$} +\enddc +\qquad +\begindc{\commdiag}[170] +\obj(1,1){MSA} +\obj(5,1){RWL} +\obj(3,3){OSA} +\obj(7,3){OSRWL} +\obj(1,4){HSA} +\obj(5,4){HSRWL} +\obj(3,6){HOSA} +\obj(7,6){HOSRWL} +\mor{MSA}{RWL}{} +\mor{MSA}{HSA}{} +\mor{MSA}{OSA}{} +\mor{RWL}{HSRWL}{} +\mor{RWL}{OSRWL}{} +\mor{OSA}{HOSA}{} +\mor{OSA}{OSRWL}{} +\mor{OSRWL}{HOSRWL}{} +\mor{HSA}{HSRWL}{} +\mor{HSA}{HOSA}{} +\mor{HOSA}{HOSRWL}{} +\mor{HSRWL}{HOSRWL}{} +\enddc +$$ +\end{description} + +\subsection{The Not so Easy} + +The diagrams presented in this section are a bit harder to specify. We +have curved arrows, and also double arrows. The construction of the +former was already explained. The double arrow (and triple, and \dots) +is made with two distinct arrows drawn close to each other in a +diagram with a very ``fine grain'', that is, using a magnifying factor +of just 2 or 3. + +All the diagrams were made completely within DCpic. + +\begin{description} +\item[Equaliser, and a 3-Category:] + +$$ +\begindc{\commdiag}[20] +\obj(1,1){$Z$} +\obj(1,36){$\overline{ X}$} +\obj(36,36){$X$} +\obj(52,36){$Y$} +\mor(1,1)(1,36){$\overline{ h}$}[\atleft,\dashArrow] +\mor(1,1)(36,36){$h$}[\atright,\solidarrow] +\mor(1,36)(36,36){$e$} +\mor(36,37)(52,37)[80,80]{$f$} +\mor(36,35)(52,35)[80,80]{$g$}[\atright,\solidarrow] +\enddc +\qquad +\begindc{\commdiag}[30] +\obj(14,11){$A$} +\obj(39,11){$C$} +\obj(26,35){$B$} +\mor(14,11)(39,11){$h$}[\atright,\solidarrow] +\mor(14,11)(26,35){$f$} +\mor(26,35)(39,11){$g$} +\cmor((11,10)(10,10)(9,10)(5,11)(4,15)(5,19)(9,20)(13,19)(14,15)) + \pdown(1,20){$id_A$} +\cmor((42,10)(43,10)(44,10)(48,11)(49,15)(48,19)(44,20)(40,19)(39,15)) + \pdown(52,20){$id_C$} +\cmor((26,39)(27,43)(31,44)(35,43)(36,39)(35,36)(31,35)) + \pleft(40,40){$id_B$} +\enddc +$$ + + +\item[Isomorfisms:] + +$$ +\begindc{\commdiag}[30] +\obj(10,15){$A$} +\obj(40,15){$A$} +\obj(25,15){$B$} +\mor(10,15)(25,15){$f$} +\mor(25,15)(40,15){$g$} +\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) \pup(25,3){$id_A$} +\obj(55,15){$B$} +\obj(85,15){$B$} +\obj(70,15){$A$} +\mor(55,15)(70,15){$g$} +\mor(70,15)(85,15){$f$} +\cmor((55,11)(56,7)(60,6)(70,6)(80,6)(84,7)(85,11)) \pup(70,3){$id_B$} +\enddc +$$ + + +\item[Godement's ``five'' rules~\cite{Herrlich73}:] +%\footnotetext{H. Herrlich and G. Strecker, Category Theory, Allyn and +%Bacon Inc, 1973} + +$$ +\begindc{\commdiag}[70] +\obj(12,10)[A]{$\mathcal{A}$} +\obj(19,10)[B]{$\mathcal{B}$} +\obj(26,10)[C]{$\mathcal{C}$} +\obj(34,10)[D]{$\mathcal{D}$} +\obj(41,10)[E]{$\mathcal{E}$} +\obj(48,10)[F]{$\mathcal{F}$} +\mor(12,10)(19,10){$L$} +\mor(19,10)(26,10){$K$} +\mor(26,10)(34,10){$V\qquad\ $} +\mor(26,12)(34,12){$U$} +\mor(26,12)(34,12){$\downarrow\xi$}[\atright,\solidarrow] +\mor(26,8)(34,8){$\downarrow\eta$} +\mor(26,8)(34,8){$W$}[\atright,\solidarrow] +\mor(34,11)(41,11){$F$} +\mor(34,9)(41,9){$\downarrow\mu$} +\mor(34,9)(41,9){$H$}[\atright,\solidarrow] +\mor(41,10)(48,10){$G$} +\enddc +$$ +\end{description} + +\subsection{The others \dots} + +It was already stated that some kinds of arrows are not supported in +DCpic, e.g., $\Rightarrow$, but we can put a \PiCTeX\ command inside a DCpic +diagram, so we can produce a diagram like the one that we will show +now. Its complete specification within DCpic is not possible, at least +for the moment. + +\begin{description} +\item[Lax coproduct~\cite{Abramsky92}] + +$$ +\begindc{\commdiag}[30] +\obj(10,50){$A$} +\obj(50,50){$A\oplus B$} +\obj(90,50){$B$} +\obj(50,10){$C$} +\obj(50,37){$[\sigma,\tau]$} +\mor(10,50)(50,10){$f$}[\atright,\solidarrow] +\mor(10,50)(50,50)[100,160]{$inl$} +\mor(90,50)(50,50)[100,160]{$inr$}[\atright,\solidarrow] +\mor(90,50)(50,10){$g$} +\cmor((480,460)(440,300)(480,140)) \pdown(40,40){}[\solidline] +\cmor((520,460)(560,300)(520,140)) \pdown(60,42){$[f,g]$}[\solidline] +\arrow <6pt> [.2,.4] from 143 44 to 144 42 +\arrow <6pt> [.2,.4] from 157 44 to 156 42 +\setlinear +% primeira implica{\c c}{\~a}o (simples) +\plot 160 100 141 91 / +\plot 160 104 140 94 / +\arrow <8pt> [.4,.8] from 137 91 to 135 90 +% segunda implica{\c c}{\~a}o (quebrada) +\plot 123 66 168 90 / +\plot 122 69 168 94 / +\plot 168 90 203 90 / +\plot 168 94 203 94 / +\arrow <8pt> [.4,.8] from 207 92 to 208 92 +\arrow <8pt> [.4,.8] from 120 66 to 118 65 +\obj(39,27)[inlfg]{\small $inl_{f,g}$} +\obj(63,34)[inrfg]{\small $inr_{f,g}$} +% terceira implica{\c c}{\~a}o (quebrada) +\plot 132 55 136 60 / +\plot 132 59 136 64 / +\plot 136 60 173 60 / +\plot 136 64 173 64 / +\arrow <8pt> [.4,.8] from 178 62 to 179 62 +\arrow <8pt> [.4,.8] from 130 55 to 129 54 +\obj(45,17){$\sigma$} +\obj(50,18){$\tau$} +\enddc +$$ +%\footnotetext{Handbook of Logic in Computer Science, Volume 1, Clarendon +%Press, Oxford, 1992, pg. 511} + +\end{description} + +\section{DCpic compared} + +If one took the Feruglio article~\cite{Feruglio94} about typesetting +commutative diagrams in (La)\TeX\ we can say that: + +\begin{itemize} +\item the graphical capabilities of DCpic are among the + best. Excluding packages which use Postscript specials the DCpic + package is the best among available packages. +\item the specification syntax is one of the simplest, the package by + John Reynolds has a very similar syntax. +\end{itemize} + +We did not try to take any measure of computational performance. + +The following diagram is one of the test-diagrams used by Feruglio, as +we can see DCpic performs very well, drawing the complete diagram +based on a very simple specification. + +\newcommand{\barraA}{\vrule height2em width0em depth0em} +\newcommand{\barraB}{\vrule height1.6em width0em depth0em} + +\centerline{ +\begindc{\commdiag}[350] +\obj(1,1){$G$} +\obj(3,1){$G_{r^*}$} +\obj(5,1){$H$} +\obj(2,2){$\Sigma^G$} +\obj(6,2){$\Sigma^H$} +\obj(1,3){$L_m$} +\obj(3,3){$K_{r,m}$} +\obj(5,3){$R_{m^*}$} +\obj(1,5){$L$} +\obj(3,5){$L_r$} +\obj(5,5){$R$} +\obj(2,6){$\Sigma^L$} +\obj(6,6){$\Sigma^R$} +\mor(1,1)(2,2){$\lambda^G$} +\mor(3,1)(1,1){$i_5$}[\atleft,\aplicationarrow] +\mor(3,1)(5,1){$r^*$}[\atright,\solidarrow] +\mor(5,1)(6,2){$\lambda^H$}[\atright,\dashArrow] +\mor(2,2)(6,2){$\varphi^{r^*}$}[\atright,\solidarrow] +\mor(1,3)(1,1){$m$}[\atright,\solidarrow] +\mor(1,3)(1,5){$i_2$}[\atleft,\aplicationarrow] +\mor(3,3)(1,3)[140,100]{$i_3\quad$}[\atright,\aplicationarrow] +\mor(3,3)(5,3)[140,100]{$r$} +\mor(3,3)(3,5){$i_4$}[\atright,\aplicationarrow] +\mor(3,3)(3,1){$\stackrel{\displaystyle m}{\barraB}$} +\mor(5,3)(5,5){$i_6$}[\atright,\aplicationarrow] +\mor(5,3)(5,1){$\stackrel{\displaystyle m^*}{\barraA}$} +\mor(1,5)(2,6){$\lambda^L$} +\mor(3,5)(1,5){$i_1\quad$}[\atright,\aplicationarrow] +\mor(3,5)(5,5){$r$} +\mor(5,5)(6,6){$\lambda^R$}[\atright,\solidarrow] +\mor(2,6)(2,2){$\varphi^m$}[\atright,\solidarrow] +\mor(2,6)(6,6){$\varphi^r$} +\mor(6,6)(6,2){$\varphi^{m^*}$} +\enddc +} + + +\section{Conclusions} + +We think that DCpic performs well in the ``commutative diagrams +arena'', it is easy to use, with its commands we can produce +the most usual types of commutative diagrams, and if we accept the use +of \PiCTeX\ commands, we are capable of producing any kind of +diagram. It is also a (La)\TeX -only package, that is, the file +produced by DCpic does not contain any Postscript special, neither +any special font, which in terms of portability is an advantage. + +The author and his colleagues in the Mathematics Department of Coimbra +University have been using the (now) old version (2.1) of DCpic for +some time with much success, some of the missing capabilities of the +older version were incorporated in the new version (3.1), and the +missing capabilities of the new version will be taken care in future +versions. + +%\bibliographystyle{plain} + +%\bibliography{pedro} + +\newcommand{\noopsort}[1]{} \newcommand{\singleletter}[1]{#1} +\begin{thebibliography}{10} + +\bibitem{Abramsky92} +S.~Abramsky, Dov Gabbay, and T.~Maibaum, editors. +\newblock {\em Handbook of Logic in Computer Science}, volume~1 of {\em Oxford + Science Publications}. +\newblock Claredon Press, Oxford, 1992. + +\bibitem{Diaconescu98} +R{\~a}zvan Diaconescu and Kokichi Futatsugi. +\newblock {\em CafeOBJ Report: The Language, Proof Techniques, and + Methodologies for Object-Oriented Algebraic Specification}, volume~6 of {\em + AMAST series in Computing}. +\newblock World Scientific, 1998. + +\bibitem{Feruglio94} +{Gabriel Valiente} Feruglio. +\newblock Typesetting commutative diagrams. +\newblock {\em TUGboat}, 15(4):466--484, 1994. + +\bibitem{Herrlich73} +Horst Herrlich and George Strecker. +\newblock {\em Category Theory}. +\newblock Allyn and Bacon Inc., 1973. + +\bibitem{Knuth86} +Donald~E. Knuth. +\newblock {\em The TeXbook}. +\newblock Addison-Wesley Publishing Company, Reading,Massachusetts, 1986. + +\bibitem{Lamport94} +Leslie Lamport. +\newblock {\em {\LaTeX}: A Document Preparation System}. +\newblock Addison-Wesley Publishing Company, Reading, Massachusetts, 2nd + edition, 1994. + +\bibitem{MacLane71} +S.~MacLane. +\newblock {\em Categories for the Working Mathematician}. +\newblock Springer-Verlag, New York, 1971. + +\bibitem{Otten99} +Ton Otten and Hans Hagen. +\newblock {\em Con\TeX t an excursion}. +\newblock Pragma ADE, Hasselt, 1999. + +\bibitem{Pierce98} +Benjamin Pierce. +\newblock {\em Basic Category Theory for Computer Scientists}. +\newblock Foundations of Computing. The MIT Press, London, England, 1998. + +\bibitem{Reynolds87} +John Reynolds. +\newblock {\em User's Manual for Diagram Macros}. +\newblock http://www.cs.cmu.edu/{\~{}}jcr/, 1987. +\newblock {\tt diagmac.doc}. + +\bibitem{Thanh99} +{H\`{a}n Th{$\acute{\hat{\mathrm e}}$}} Th\`{a}nh, Sebastian Rahtz, and Hans + Hagen. +\newblock {\em The pdfTeX manual}, 1999. + +\bibitem{Wichura87} +Michael Wichura. +\newblock {\em The {\PiCTeX} Manual}. +\newblock M. Pfeffer \& Co., New York, 1987. + +\end{thebibliography} + +\section{Appendix: The DCpic Specifications} + +\begin{description} + +\item[Push-out:] {\ } + +{\footnotesize +\begin{verbatim} + \begindc{\commdiag}[260] + \obj(1,1){$Z$} + \obj(1,3){$X$} + \obj(3,1){$Y$} + \obj(3,3){$P$} + \obj(5,5){$P^\prime$} + \mor(1,1)(1,3){$f$} + \mor(1,1)(3,1){$g$}[\atright,\solidarrow] + \mor(1,3)(3,3){$r$}[\atright,\solidarrow] + \mor(3,1)(3,3){$s$} + \mor(1,3)(5,5){$r^\prime$} + \mor(3,1)(5,5){$s^\prime$}[\atright,\solidarrow] + \mor(3,3)(5,5){$h$}[\atright,\dashArrow] + \enddc +\end{verbatim} +} + + +\item[Exponentials:] {\ } + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[300] +\obj(1,3){$Z^Y\times Y$} +\obj(3,3){$Z$} +\obj(3,1){$X\times{}Y$} +\obj(4,1){$X$} +\obj(4,3){$Z^Y$} +\mor(1,3)(3,3)[20,10]{$ev$} +\mor(3,1)(1,3){$f\times{}\mathrm{id}$} +\mor(3,1)(3,3){$\overline{f}$}[\atright,\dashArrow] +\mor(4,1)(4,3){$f$}[\atright,\solidarrow] +\enddc +\end{verbatim} +} + +\item[Function Restriction:] {\ } + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[280] +\obj(1,1){$X$} +\obj(1,3){$X^\prime$} +\obj(3,1){$Y$} +\obj(3,3){$Y^\prime$} +\mor(1,1)(3,1){$f$} +\mor(1,3)(1,1){}[\atright,\injectionarrow] +\mor(3,3)(3,1){}[\atright,\injectionarrow] +\mor(1,3)(3,3){$g=f|^{Y^\prime}_{X^\prime}$} +\enddc +\end{verbatim} +} + +\item[{\em CafeOBJ\/} Cube:] {\ } + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[170] +\obj(1,1){MSA} +\obj(5,1){RWL} +\obj(3,3){OSA} +\obj(7,3){OSRWL} +\obj(1,4){HSA} +\obj(5,4){HSRWL} +\obj(3,6){HOSA} +\obj(7,6){HOSRWL} +\mor(1,1)(5,1)[15,15]{} +\mor(1,1)(1,4){} +\mor(1,1)(3,3){} +\mor(5,1)(5,4){} +\mor(5,1)(7,3){} +\mor(3,3)(3,6){} +\mor(3,3)(7,3)[15,22]{} +\mor(7,3)(7,6){} +\mor(1,4)(5,4)[15,22]{} +\mor(1,4)(3,6){} +\mor(3,6)(7,6)[17,26]{} +\mor(5,4)(7,6){} +\enddc +\end{verbatim} +} + + +\item[Equaliser:] {\ } + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[20] +\obj(1,1){$Z$} +\obj(1,36){$\overline{ X}$} +\obj(36,36){$X$} +\obj(52,36){$Y$} +\mor(1,1)(1,36){$\overline{ h}$}[\atleft,\dashArrow] +\mor(1,1)(36,36){$h$}[\atright,\solidarrow] +\mor(1,36)(36,36){$e$} +\mor(36,37)(52,37)[8,8]{$f$} +\mor(36,35)(52,35)[8,8]{$g$}[\atright,\solidarrow] +\enddc +\end{verbatim} +} + + +\item[A 3-Category:] {\ } + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[30] +\obj(14,11){$A$} +\obj(39,11){$C$} +\obj(26,35){$B$} +\mor(14,11)(39,11){$h$}[\atright,\solidarrow] +\mor(14,11)(26,35){$f$} +\mor(26,35)(39,11){$g$} +\cmor((11,10)(10,10)(9,10)(5,11)(4,15)(5,19)(9,20)(13,19)(14,15)) + \pdown(1,20){$id_A$} +\cmor((42,10)(43,10)(44,10)(48,11)(49,15)(48,19)(44,20)(40,19)(39,15)) + \pdown(52,20){$id_C$} +\cmor((26,39)(27,43)(31,44)(35,43)(36,39)(35,36)(31,35)) \pleft(40,40){$id_B$} +\enddc +\end{verbatim} +} + +\item[Isomorfisms:] {\ } + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[30] +\obj(10,15){$A$} +\obj(40,15){$A$} +\obj(25,15){$B$} +\mor(10,15)(25,15){$f$} +\mor(25,15)(40,15){$g$} +\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) \pup(25,3){$id_A$} +\obj(55,15){$B$} +\obj(85,15){$B$} +\obj(70,15){$A$} +\mor(55,15)(70,15){$g$} +\mor(70,15)(85,15){$f$} +\cmor((55,11)(56,7)(60,6)(70,6)(80,6)(84,7)(85,11)) \pup(70,3){$id_B$} +\enddc +\end{verbatim} +} + + + +\item[Godement's ``five'' rules:] {\ } + +{\footnotesize +\begin{verbatim} +\begindc{\commdiag}[70] +\obj(12,10){$\mathcal{A}$} +\obj(19,10){$\mathcal{B}$} +\obj(26,10){$\mathcal{C}$} +\obj(34,10){$\mathcal{D}$} +\obj(41,10){$\mathcal{E}$} +\obj(48,10){$\mathcal{F}$} +\mor(12,10)(19,10){$L$} +\mor(19,10)(26,10){$K$} +\mor(26,10)(34,10){$V\qquad\ $} +\mor(26,12)(34,12){$U$} +\mor(26,12)(34,12){$\downarrow\xi$}[\atright,\solidarrow] +\mor(26,8)(34,8){$\downarrow\eta$} +\mor(26,8)(34,8){$W$}[\atright,\solidarrow] +\mor(34,11)(41,11){$F$} +\mor(34,9)(41,9){$\downarrow\mu$} +\mor(34,9)(41,9){$H$}[\atright,\solidarrow] +\mor(41,10)(48,10){$G$} +\enddc +\end{verbatim} +} + +\item[Lax coproduct:] Guess how. + +\item[DCpic and the others:] {\ } + +{\footnotesize +\begin{verbatim} + +\begindc{\commdiag}[350] +\obj(1,1){$G$} +\obj(3,1){$G_{r^*}$} +\obj(5,1){$H$} +\obj(2,2){$\Sigma^G$} +\obj(6,2){$\Sigma^H$} +\obj(1,3){$L_m$} +\obj(3,3){$K_{r,m}$} +\obj(5,3){$R_{m^*}$} +\obj(1,5){$L$} +\obj(3,5){$L_r$} +\obj(5,5){$R$} +\obj(2,6){$\Sigma^L$} +\obj(6,6){$\Sigma^R$} +\mor(1,1)(2,2){$\lambda^G$} +\mor(3,1)(1,1){$i_5$}[\atleft,\aplicationarrow] +\mor(3,1)(5,1){$r^*$}[\atright,\solidarrow] +\mor(5,1)(6,2){$\lambda^H$}[\atright,\dashArrow] +\mor(2,2)(6,2){$\varphi^{r^*}$}[\atright,\solidarrow] +\mor(1,3)(1,1){$m$}[\atright,\solidarrow] +\mor(1,3)(1,5){$i_2$}[\atleft,\aplicationarrow] +\mor(3,3)(1,3)[140,100]{$i_3\quad$}[\atright,\aplicationarrow] +\mor(3,3)(5,3)[140,100]{$r$} +\mor(3,3)(3,5){$i_4$}[\atright,\aplicationarrow] +\mor(3,3)(3,1){$\stackrel{\displaystyle m}{\barraB}$} +\mor(5,3)(5,5){$i_6$}[\atright,\aplicationarrow] +\mor(5,3)(5,1){$\stackrel{\displaystyle m^*}{\barraA}$} +\mor(1,5)(2,6){$\lambda^L$} +\mor(3,5)(1,5){$i_1\quad$}[\atright,\aplicationarrow] +\mor(3,5)(5,5){$r$} +\mor(5,5)(6,6){$\lambda^R$}[\atright,\solidarrow] +\mor(2,6)(2,2){$\varphi^m$}[\atright,\solidarrow] +\mor(2,6)(6,6){$\varphi^r$} +\mor(6,6)(6,2){$\varphi^{m^*}$} +\enddc +\end{verbatim} +} + +\end{description} + + +\end{document} + + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/generic/dcpic/examples.pdf b/Master/texmf-dist/doc/generic/dcpic/examples.pdf Binary files differnew file mode 100644 index 00000000000..48b8781577c --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/examples.pdf diff --git a/Master/texmf-dist/doc/generic/dcpic/examples.tex b/Master/texmf-dist/doc/generic/dcpic/examples.tex index 9590cb0da59..cf74991a03f 100644 --- a/Master/texmf-dist/doc/generic/dcpic/examples.tex +++ b/Master/texmf-dist/doc/generic/dcpic/examples.tex @@ -1,26 +1,44 @@ -\documentclass[a4paper]{article} +\documentclass[12pt,a4paper]{article} \usepackage{pictexwd,dcpic} +\usepackage{listings} +\usepackage{a4wide} +\usepackage{svn-multi} +\svnidlong +{$HeadURL: svn+ssh://gentzen.mat.uc.pt/var/lib/svn/DCPiC/CTAN5.0/examples.tex $} +{$LastChangedDate: 2013-05-01 19:49:49 +0100 (Qua, 01 Mai 2013) $} +{$LastChangedRevision: 15 $} +{$LastChangedBy: pedro $} + +\svnid{$Id: manDCPiC.tex 11 2013-04-20 23:01:43Z pedro $} \voffset=-2cm -\hoffset=-1cm -\addtolength{\textwidth}{2cm} +%\hoffset=-1cm +%\addtolength{\textwidth}{2cm} \addtolength{\textheight}{4cm} \newcommand{\barraA}{\vrule height2em width0em depth0em} \newcommand{\barraB}{\vrule height1.6em width0em depth0em} - +\newcommand{\docver}{\svnyear/\svnmonth/\svnday\ (v\svnrev)} \begin{document} + +% definição da linguagem de programação +\lstset{language=TeX, + frame = single, + morekeywords={begindc,enddc,cmor,pup,commdiag,undigraph,digraph,cdigraph,cundigraph,obj,mor,pleft,pup,pdown,pright,north,northeast,east,southeast,south,southwest,west,northwest,atright,atleft,solidarrow,dashArrow,dotArrow,solidline,dashline,dotline,injectionarrow,aplicationarrow,surjectivearrow,equalline,doublearrow,doubleopposite,nullarrow}, + basicstyle=\tiny} + \begin{center} - DCpic - Examples + \huge\bf DCpic - Examples - \docver \end{center} +\section{Commutative Diagrams} -\paragraph{Commutative Diagrams --- Curved arrows.} +\subsection{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 @@ -32,62 +50,58 @@ 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] +\begin{lstlisting} +\begindc{\commdiag} \cmor((10,20)(6,21)(5,25)) \pup(5,15){$x$} \enddc -\end{verbatim} -} +\end{lstlisting} + +{\ } $$ -\begindc{\commdiag}[3] +\begindc{\commdiag} \cmor((10,20)(6,21)(5,25)) \pup(5,15){$x$} \enddc $$ -{\footnotesize -\begin{verbatim} -\begindc{\commdiag}[3] + + +\begin{lstlisting} +\begindc{\commdiag} \obj(10,15){$A$} \obj(40,15)[Al]{$A$} \obj(25,15){$B$} -\mor{$A$}{$B$}{$f$} -\mor{$B$}{Al}{$g$} +\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} -} +\end{lstlisting} $$ -\begindc{\commdiag}[3] +\begindc{\commdiag} \obj(10,15){$A$} \obj(40,15)[Al]{$A$} \obj(25,15){$B$} -\mor{$A$}{$B$}{$f$} +\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] +\begin{lstlisting} +\begindc{\commdiag} \obj(14,11){$A$} \obj(39,11){$B$} -\mor(14,12)(39,12){$f$} -\mor(39,10)(14,10){$g$} +\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} -} +\end{lstlisting} $$ -\begindc{\commdiag}[3] +\begindc{\commdiag} \obj(14,11){$A$} \obj(39,11){$B$} -\mor(14,12)(39,12){$f$} +\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$} @@ -95,9 +109,8 @@ $$ $$ -{\footnotesize -\begin{verbatim} -\begindc{\commdiag}[3] +\begin{lstlisting} +\begindc{\commdiag} \obj(10,18){$A$} \obj(40,18){$B$} \cmor((10,20)(15,25)(20,20)(25,15)(30,20)(35,25)(40,20)) @@ -105,11 +118,10 @@ $$ \cmor((10,15)(15,10)(20,15)(25,20)(30,15)(35,10)(40,15)) \pup(25,22){$g$}[2] \enddc -\end{verbatim} -} +\end{lstlisting} $$ -\begindc{\commdiag}[3] +\begindc{\commdiag} \obj(10,18){$A$} \obj(40,18){$B$} \cmor((10,20)(15,25)(20,20)(25,15)(30,20)(35,25)(40,20)) @@ -124,17 +136,18 @@ $$ \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. +\subsection{Size Adjusting} +In version 4 (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}$} + +\begin{lstlisting}[basicstyle=\tiny] +\begindc{\commdiag}[300] +\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$} @@ -144,11 +157,10 @@ automatically adjust their size to the object's box size. \mor{objSum}{objBp}{$f$}[\atright,\solidarrow] \mor{objA}{objBp}{$g$}[\atright,\solidarrow] \enddc -\end{verbatim} -} +\end{lstlisting} $$ -\begindc{\commdiag} +\begindc{\commdiag}[300] \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$} @@ -162,9 +174,8 @@ $$ $$ -{\scriptsize -\begin{verbatim} -\begindc{\commdiag} +\begin{lstlisting} +\begindc{\commdiag}[250] \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$} @@ -178,11 +189,10 @@ $$ \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} -} +\end{lstlisting} $$ -\begindc{\commdiag}[29] +\begindc{\commdiag}[250] \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$} @@ -202,11 +212,10 @@ $$ \pagebreak -\paragraph{Commutative Diagrams --- A Complex Diagram} +\subsection{A Complex Diagram} {\ } -{\scriptsize -\begin{verbatim} -\begindc{\commdiag}[35] +\begin{lstlisting} +\begindc{\commdiag}[350] \obj(1,1)[Gr]{$G$} \obj(3,1)[Grstar]{$G_{r^*}$} \obj(5,1)[H]{$H$} @@ -241,11 +250,10 @@ $$ \mor{SigmaL}{SigmaR}{$\varphi^r$} \mor{SigmaR}{SigmaH}{$\varphi^{m^*}$} \enddc -\end{verbatim} -} +\end{lstlisting} $$ -\begindc{\commdiag}[35] +\begindc{\commdiag}[350] \obj(1,1)[Gr]{$G$} \obj(3,1)[Grstar]{$G_{r^*}$} \obj(5,1)[H]{$H$} @@ -262,7 +270,7 @@ $$ \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{H}{SigmaH}{$\lambda^H$}[\atright,\solidarrow] %dashArrow] \mor{SigmaG}{SigmaH}{$\varphi^{r^*}$}[\atright,\solidarrow] \mor{Lm}{Gr}{$m$}[\atright,\solidarrow] \mor{Lm}{L}{$i_2$}[\atleft,\aplicationarrow] @@ -285,13 +293,8 @@ $$ \vfill \pagebreak - -\vfill -\pagebreak - -{\scriptsize -\begin{verbatim} -\begindc{\commdiag}[4] +\begin{lstlisting}[basicstyle=\tiny] +\begindc{\commdiag}[40] \obj(10,10){$G$}[Gr] \obj(30,10){$G_{r^*}$}[Grstar] \obj(50,10){$H$}[H] @@ -330,11 +333,12 @@ $$ \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} -} +\end{lstlisting} + +{\ } $$ -\begindc{\commdiag}[4] +\begindc{\commdiag}[40] \obj(10,10)[Gr]{$G$} \obj(30,10)[Grstar]{$G_{r^*}$} \obj(50,10)[H]{$H$} @@ -377,9 +381,8 @@ $$ \vfill \pagebreak -{\scriptsize -\begin{verbatim} -\begindc{\commdiag}[4] +\begin{lstlisting}[basicstyle=\tiny] +\begindc{\commdiag}[40] \obj(10,10)[Gr]{$G$} \obj(30,10)[Grstar]{$G_{r^*}$} \obj(50,10)[H]{$H$} @@ -415,14 +418,16 @@ $$ \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)) +\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} -} +\end{lstlisting} + +{\ } $$ -\begindc{\commdiag}[4] +\begindc{\commdiag}[40] \obj(10,10)[Gr]{$G$} \obj(30,10)[Grstar]{$G_{r^*}$} \obj(50,10)[H]{$H$} @@ -466,16 +471,19 @@ $$ \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 +\section{Graphs} + +\subsection{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 +only in the magnification factor: 200 for the first; and 160 for the second. \begin{center} \begin{tabular}{cc} - \begindc{\undigraph}[20] + \begindc{\undigraph}[200] \obj(1,1)[1]{} \obj(3,2)[2]{} \obj(5,1)[3]{} @@ -487,7 +495,7 @@ second. \mor{4}{3}{} \mor{2}{4}{} \enddc &\qquad - \begindc{\undigraph}[16] + \begindc{\undigraph}[160] \obj(1,1)[1]{} \obj(3,2)[2]{} \obj(5,1)[3]{} @@ -502,9 +510,8 @@ second. \end{tabular} \end{center} -{\scriptsize -\begin{verbatim} - \begindc{\undigraph}[20] \begindc{\undigraph}[16] +\begin{lstlisting} + \begindc{\undigraph}[200] \begindc{\undigraph}[160] \obj(1,1)[1]{} \obj(1,1)[1]{} \obj(3,2)[2]{} \obj(3,2)[2]{} \obj(5,1)[3]{} \obj(5,1)[3]{} @@ -516,12 +523,12 @@ second. \mor{4}{3}{} \mor{4}{3}{} \mor{2}{4}{} \mor{2}{4}{} \enddc \enddc -\end{verbatim}} +\end{lstlisting} -\paragraph{Undirected Graphs --- ``Around the World''} +\subsection{Undirected Graphs --- ``Around the World''} $$ -\begindc{\undigraph}[7] +\begindc{\undigraph}[70] \obj(6,4){18}[\south] \obj(18,4){17}[\south] \obj(8,7){11}[\west] @@ -534,18 +541,20 @@ $$ \obj(16,11){14}[\east] \obj(2,16){19} \obj(6,15){9} -\obj(9,16){8} -\obj(11,14){7} +\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{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{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}{} @@ -554,9 +563,8 @@ $$ \mor{16}{20}{}\mor{1}{20}{}\mor{15}{16}{} \enddc $$ -{\scriptsize -\begin{verbatim} -\begindc{\undigraph}[7] +\begin{lstlisting} +\begindc{\undigraph}[70] \obj(6,4){18}[\south] \obj(18,4){17}[\south] \obj(8,7){11}[\west] @@ -567,37 +575,26 @@ $$ \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(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}{} +\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}} +\end{lstlisting} \vfill \pagebreak -\paragraph{Directed Graphs} +\subsection{Directed Graphs} $$ -\begindc{\digraph}[25] +\begindc{\digraph}[250] \obj(1,5){A}[\west] \obj(1,3){B}[\west] \obj(1,1){C}[\west] @@ -614,52 +611,51 @@ $$ $$ -{\scriptsize -\begin{verbatim} -\begindc{\digraph}[25] +\begin{lstlisting} +\begindc{\digraph}[250] \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{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} +\mor{C}{E}{1} \mor{C}{F}{5} \mor{C}{G}{7} \enddc -\end{verbatim} -} +\end{lstlisting} -\paragraph{Circled Directed Graphs} +\subsection{Circled Directed Graphs} $$ -\begindc{\cdigraph}[20] -\obj(6,6){18}[1] -\obj(12,6){17}[1] -\mor{18}{17}{} +\begindc{\cdigraph}[200] +\obj(6,6)[A]{1800000} +\obj(12,6){17} +\obj(10,9){16} +\mor{A}{17}[240,90]{} +\mor{16}{17}[90,90]{} +\mor{16}{A}[95,125]{} \enddc $$ -{\scriptsize -\begin{verbatim} -\begindc{\cdigraph}[20] -\obj(6,6){18}[1] -\obj(12,6){17}[1] -\mor{18}{17}{} +\begin{lstlisting} +\begindc{\cdigraph}[200] +\obj(6,6)[A]{1800000} +\obj(12,6){17} +\obj(10,9){16} +\mor{A}{17}[240,90]{} +\mor{16}{17}[90,90]{} +\mor{16}{A}[95,125]{} \enddc -\end{verbatim} -} +\end{lstlisting} -\paragraph{Circled Undirected Graphs} +\subsection{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] +$$ +\begindc{\cundigraph}[130] +\obj(6,4)[A]{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] @@ -669,9 +665,9 @@ $$\small \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{A}{17}[80,80]{}\mor{A}{11}{}\mor{A}{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{10}{9}{}\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}[80,80]{} \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}{} @@ -680,10 +676,10 @@ $$\small \enddc $$ -{\scriptsize -\begin{verbatim} -\begindc{\cundigraph}[13] -\obj(6,4){18}[\south]\obj(18,4){17}[\south] + +\begin{lstlisting} +\begindc{\cundigraph}[130] +\obj(6,4)[A]{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] @@ -693,55 +689,84 @@ $$ \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{A}{17}[80,80]{}\mor{A}{11}{}\mor{A}{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{10}{9}{}\mor{5}{6}{}\mor{5}{4}{}\mor{13}{17}[80,80]{} \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} +\end{lstlisting} +\section{New Arrows and Lines in v4 and v5} +\subsection{Dashed, Dotted Lines, Dotted Arrows, Equaline, \ldots} $$ -\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] +\begindc{\commdiag}[250] +\obj(10,10)[A]{$OOOOOO$} +\obj(15,10)[A0]{$A_0$} +\obj(14,11)[A1]{$A_1$} +\obj(13,12)[A2]{$A_2$} +\obj(12,13)[A3]{$A_3$} +\obj(10,14)[A4]{$A_4$} +\obj(9,13)[A5]{$A_5$} +\obj(8,12)[A6]{$A_6$} +\obj(7,11)[A7]{$A_7$} +\obj(6,10)[A8]{$A_8$} +\obj(7,9)[A9]{$A_9$} +\obj(9,8)[A10]{$A_{10}$} +\obj(12,8)[A11]{$A_{11}$} +\mor{A}{A0}{$a_0$}[\atright,\solidarrow] +\mor{A}{A1}{$a_1$}[\atright,\dashArrow] +\mor{A}{A2}{$a_2$}[\atright,\dotArrow] +\mor{A}{A3}{$a_3$}[\atright,\solidline] +\mor{A}{A4}{$a_4$}[\atright,\dashline] +\mor{A}{A5}{$a_5$}[\atleft,\dotline] +\mor{A}{A6}{$a_6$}[\atleft,\injectionarrow] +\mor{A}{A7}{$a_7$}[\atleft,\aplicationarrow] +\mor{A}{A8}{$a_8$}[\atleft,\surjectivearrow] +\mor{A}{A9}{$a_9$}[\atleft,\equalline] +\mor{A}{A10}{$a_{10}$}[\atleft,\doublearrow] +\mor{A}{A11}{$a_{11}$}[\atleft,\doubleopposite] +\mor{A}{A11}{$a_{12}$}[\atright,\nullarrow] \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] +\begin{lstlisting} +\begindc{\commdiag}[250] +\obj(10,10)[A]{$OOOOOO$} +\obj(15,10)[A0]{$A_0$} +\obj(14,11)[A1]{$A_1$} +\obj(13,12)[A2]{$A_2$} +\obj(12,13)[A3]{$A_3$} +\obj(10,14)[A4]{$A_4$} +\obj(9,13)[A5]{$A_5$} +\obj(8,12)[A6]{$A_6$} +\obj(7,11)[A7]{$A_7$} +\obj(6,10)[A8]{$A_8$} +\obj(7,9)[A9]{$A_9$} +\obj(9,8)[A10]{$A_{10}$} +\obj(12,8)[A11]{$A_{11}$} +\mor{A}{A0}{$a_0$}[\atright,\solidarrow] +\mor{A}{A1}{$a_1$}[\atright,\dashArrow] +\mor{A}{A2}{$a_2$}[\atright,\dotArrow] +\mor{A}{A3}{$a_3$}[\atright,\solidline] +\mor{A}{A4}{$a_4$}[\atright,\dashline] +\mor{A}{A5}{$a_5$}[\atleft,\dotline] +\mor{A}{A6}{$a_6$}[\atleft,\injectionarrow] +\mor{A}{A7}{$a_7$}[\atleft,\aplicationarrow] +\mor{A}{A8}{$a_8$}[\atleft,\surjectivearrow] +\mor{A}{A9}{$a_9$}[\atleft,\equalline] +\mor{A}{A10}{$a_{10}$}[\atleft,\doublearrow] +\mor{A}{A11}{$a_{11}$}[\atleft,\doubleopposite] +\mor{A}{A11}{$a_{12}$}[\atright,\nullarrow] \enddc -$$ +\end{lstlisting} + + \end{document} diff --git a/Master/texmf-dist/doc/generic/dcpic/manDCPiC.pdf b/Master/texmf-dist/doc/generic/dcpic/manDCPiC.pdf Binary files differnew file mode 100644 index 00000000000..92d8cbdf8fa --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/manDCPiC.pdf diff --git a/Master/texmf-dist/doc/generic/dcpic/manDCPiC.tex b/Master/texmf-dist/doc/generic/dcpic/manDCPiC.tex new file mode 100644 index 00000000000..d621bf8ce94 --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/manDCPiC.tex @@ -0,0 +1,723 @@ +% $Id: manDCPiC.tex 12 2013-04-21 15:22:57Z pedro $ +\documentclass[11pt]{article} +\usepackage{dcpic,pictex} +\usepackage{verbatim} +\usepackage{url} +\usepackage{svn-multi} +\usepackage{listings} +\usepackage{a4wide} + +\svnidlong +{$HeadURL: svn+ssh://gentzen.mat.uc.pt/var/lib/svn/DCPiC/CTAN5.0/manDCPiC.tex $} +{$LastChangedDate: 2013-05-01 19:49:49 +0100 (Qua, 01 Mai 2013) $} +{$LastChangedRevision: 15 $} +{$LastChangedBy: pedro $} + +\svnid{$Id: manDCPiC.tex 12 2013-04-21 15:22:57Z pedro $} + +\newcommand{\docversion}{\svnyear/\svnmonth/\svnday\ (v\svnrev)} + +\def\dcpicversion{v5.0.0} + +\lstset{language=TeX, + frame = single, + morekeywords={begindc,enddc,cmor,pup,commdiag,undigraph,digraph,cdigraph,cundigraph,obj,mor,pleft,pup,pdown,pright,north,northeast,east,southeast,south,southwest,west,northwest,atright,atleft,solidarrow,dashArrow,dotArrow,solidline,dashline,dotline,injectionarrow,aplicationarrow,surjectivearrow,equalline,doublearrow,doubleopposite,nullarrow}, + basicstyle=\scriptsize} + + +\begin{document} + +\title{DCpic \dcpicversion\\ +\docversion} +\author{Pedro Quaresma\\ CISUC/Mathematics Department, + University of Coimbra\\ 3001-454 COIMBRA, PORTUGAL\\ {\tt + pedro@mat.uc.pt}\quad phone: +351-239~791~170\quad fax: + +351-239~832~568} +\date{2013/05/01} + +% Esta defini\c c\~ao \'e \'util para a convers\~ao LaTeX2HTML +%\def\PiCTeX{PiC\TeX} + +\maketitle + +\vfill +\begin{quotation} +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, examples.tex, +manDCPiC.tex, manDCPiCpt.tex +\end{quotation} + +\vspace*{2cm} +\noindent Coimbra, 2013/05/01\\ +Pedro Quaresma + +\pagebreak +\section{History} + + +\begin{description} +\item[11/1990 - Version 1.0] +\item[10/1991 - Version 1.1] +\item[9/1993 - Version 1.2:] the distance from the arrow end + points and the objects became a fixed number (10units), the distance + arguments became optional. A new option for the arrows was introduced. +\item[3/1995 - Version 1.3:] the distance from the arrow to its + label became fixed in 10units. A new option for the arrows was introduced. +\item[7/1996 - Version 2.1:] a new syntax for the ``{\tt mor}'' + command was introduced. +\item[5/2001 - Version 3.0:] implementation of the command {\tt cmor} + for curved arrows. +\item[11/2001 - Version{\~a}o 3.1:] the arrow's tips became more \TeX-like. +\item[1/2002 - Version 3.2:] introduction of the ``Logical + specification of diagrams'', the commands ``{\tt obj}'' and + ``{\tt mor}'' were modified accordingly. +\item[5/2002 - Version 4.0:] {\bf new syntax, non-compatible with past + versions}. The commands {\tt begindc}, {\tt obj}, and {\tt mor} + were modified. +\item[3/2003 - Version 4.1:] new kind of arrows, ``surjective + arrows'', was added. The drawing of the double tip only works well + in the vertical, or horizontal case. +\item[12/2004 - Version 4.1.1:] new version for the drawing of + surjective arrows, it solves the previous problem with it. +\item[3/2007 - version 4.2:] adds the ``providespackage'' directive + that was missing. Adds dashed lines, and dotted lines. +\item[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...) +\item[8/2008 - version 4.3:] thanks to Ruben Debeerst + (\url{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. +\item[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. +\item[12/2009 - version 4.3.2:] there was a conflict between dcpic.sty + and hyperref in current texlive-2009 due to the one letter macro + ``$\backslash$d'' (thanks to Thorsten S + \url{<thorsten.schwander@gmail.com>}). The ``d'' changed to + ``deuc'' (Euclidian Distance). The ``x'' and ``y'' changed to ``xO'' + ``yO'' +\item[4/2013 - version 4.4.0:] thanks to Xingliang Liang + \url{<jkl9543@gmail.com>}. He added a new arrow ``dotarrow''. +\item[5/2013 - version 5.0:] {\bf new unit for the coordinate system}, + 1/10th of the previous one. This allow a better implementation of + the double line arrows and also a more fine specification of the + diagrams/graphs (Thanks to Antonio de Nicola + \url{<adenicola@mat.uc.pt>}). +\end{description} + + +\section{Introduction} + +DCpic is a package of \TeX~\cite{Knuth86} macros for graph modelling +in a (La)\TeX~\cite{Lamport94} or Con\TeX t~\cite{Otten99} +document. Its distinguishing features are: the use of +\PiCTeX~\cite{Wichura92} 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~\cite{Harary72} 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 establish +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. + +Until version 3.2 DCpic ``Commutative Diagrams in \PiCTeX'' was +dedicated to commutative diagrams~\cite{Pierce98} (``{\bf D}iagramas +{\bf C}omutativos'' in Portuguese) drawing, that is the reason for the +name ``obj'' (objects) and ``mor'' (morphism) for the nodes and edges. + +%\pagebreak[3] +Example: +\begin{lstlisting} + \begindc{\commdiag} + \obj(10,10){$A$} + \obj(30,10){$B$} + \obj(30,30){$C$} + \mor{$A$}{$B$}{$f$}[\atright,\solidarrow] + \mor{$B$}{$C$}{$g$}[\atright,\solidarrow] + \mor{$A$}{$C$}{$h$} + \enddc +\end{lstlisting} + +$$ + \begindc{\commdiag} + \obj(10,10){$A$} + \obj(30,10){$B$} + \obj(30,30){$C$} + \mor{$A$}{$B$}{$f$}[\atright,\solidarrow] + \mor{$B$}{$C$}{$g$}[\atright,\solidarrow] + \mor{$A$}{$C$}{$h$} + \enddc +$$ + +{\bf Note:} all the numeric values should be integer values. + + +\section{Description} + + +\subsection{Available Commands} + + +\begin{description} +\item[The environment:] {\ } + +\begin{verbatim} + \begindc{#1}[#2] + #1 - Graph type + 0 = "commdiag", commutative diagram + 1 = "digraph", direct graph + 2 = "undigraph", undirect graph + 3 = "cdigraph", direct graph with incircled objects + 4 = "cundigraph", undirect graph with incircled objects + (optional) #2 - magnification factor (default value, 300) + \enddc +\end{verbatim} + +\item[Objects:] {\ } + +\begin{verbatim} + \obj(#1,#2)[#3]{#4}[#5] + #1 and #2 - coordinates + (optional) #3 - Label, to be used in the morphims command, if not + present the #4 will be used for 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 +\end{verbatim} + + {\bf Note:} if you omit the \#3 argument (label), and the \#4 argument + is a complex (and long) \LaTeX\ command, then this command can + crash. In this case you must specify a label (the empty label [], if + you do not intend to use the label). + +\item[Morphism (linear edges).] This commando has two major + variants: + \begin{enumerate} + \item Starting and Ending objects specification +\begin{verbatim} + \mor{#1}{#2}[#5,#6]{#7}[#8,#9] +\end{verbatim} + + As you can see this first form is (intentionally) 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^\prime,y^\prime)$, (\#3,\#4) in the second form + + this values will be passed to the command second form + + \item Two points coordinates specification +\begin{verbatim} + \mor(#1,#2)(#3,#4)[#5,#6]{#7}[#8,#9] +\end{verbatim} + \end{enumerate} + + Now we can describe all the arguments +\begin{verbatim} + #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 value + 1 = "\dashArrow" + 2 = "\dotArrow + 3 = "\solidline" + 4 = "\dashline" + 5 = "\dotline" + 6 = "\injectionarrow" + 7 = "\aplicationarrow" + 8 = "\surjectivearrow" + 9 = "\equalline" + 10 = "\doublearrow" + 11 = "\doubleopposite" + 12 = "\nullarrow" (to allow adding labels to existing arrows) +\end{verbatim} + + {\bf Note:} insert a space after the command. + + +\item[Curved Morphisms (quadratic edges):] {\ }\\ +\begin{verbatim} + \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" +\end{verbatim} + + {\bf Notes:} Insert a space after the command. The space after the + list of points is mandatory. + +\end{description} + + +\section{Examples} + + +\subsection{Different Types of Lines/Arrows} + +\begin{lstlisting} +\begindc{\commdiag}[250] +\obj(10,10)[A]{$OOOOOO$} +\obj(15,10)[A0]{$A_0$} +\obj(14,11)[A1]{$A_1$} +\obj(13,12)[A2]{$A_2$} +\obj(12,13)[A3]{$A_3$} +\obj(10,14)[A4]{$A_4$} +\obj(9,13)[A5]{$A_5$} +\obj(8,12)[A6]{$A_6$} +\obj(7,11)[A7]{$A_7$} +\obj(6,10)[A8]{$A_8$} +\obj(7,9)[A9]{$A_9$} +\obj(9,8)[A10]{$A_{10}$} +\obj(12,8)[A11]{$A_{11}$} +\mor{A}{A0}{$a_0$}[\atright,\solidarrow] +\mor{A}{A1}{$a_1$}[\atright,\dashArrow] +\mor{A}{A2}{$a_2$}[\atright,\dotArrow] +\mor{A}{A3}{$a_3$}[\atright,\solidline] +\mor{A}{A4}{$a_4$}[\atright,\dashline] +\mor{A}{A5}{$a_5$}[\atleft,\dotline] +\mor{A}{A6}{$a_6$}[\atleft,\injectionarrow] +\mor{A}{A7}{$a_7$}[\atleft,\aplicationarrow] +\mor{A}{A8}{$a_8$}[\atleft,\surjectivearrow] +\mor{A}{A9}{$a_9$}[\atleft,\equalline] +\mor{A}{A10}{$a_{10}$}[\atleft,\doublearrow] +\mor{A}{A11}{$a_{11}$}[\atleft,\doubleopposite] +\mor{A}{A11}{$a_{12}$}[\atright,\nullarrow] +\enddc +\end{lstlisting} + +$$ +\begindc{\commdiag}[250] +\obj(10,10)[A]{$OOOOOO$} +\obj(15,10)[A0]{$A_0$} +\obj(14,11)[A1]{$A_1$} +\obj(13,12)[A2]{$A_2$} +\obj(12,13)[A3]{$A_3$} +\obj(10,14)[A4]{$A_4$} +\obj(9,13)[A5]{$A_5$} +\obj(8,12)[A6]{$A_6$} +\obj(7,11)[A7]{$A_7$} +\obj(6,10)[A8]{$A_8$} +\obj(7,9)[A9]{$A_9$} +\obj(9,8)[A10]{$A_{10}$} +\obj(12,8)[A11]{$A_{11}$} +\mor{A}{A0}{$a_0$}[\atright,\solidarrow] +\mor{A}{A1}{$a_1$}[\atright,\dashArrow] +\mor{A}{A2}{$a_2$}[\atright,\dotArrow] +\mor{A}{A3}{$a_3$}[\atright,\solidline] +\mor{A}{A4}{$a_4$}[\atright,\dashline] +\mor{A}{A5}{$a_5$}[\atleft,\dotline] +\mor{A}{A6}{$a_6$}[\atleft,\injectionarrow] +\mor{A}{A7}{$a_7$}[\atleft,\aplicationarrow] +\mor{A}{A8}{$a_8$}[\atleft,\surjectivearrow] +\mor{A}{A9}{$a_9$}[\atleft,\equalline] +\mor{A}{A10}{$a_{10}$}[\atleft,\doublearrow] +\mor{A}{A11}{$a_{11}$}[\atleft,\doubleopposite] +\mor{A}{A11}{$a_{12}$}[\atright,\nullarrow] +\enddc +$$ + + +\subsection{Diagrams with Curved Edges, Double Arrows, \ldots } + + +\paragraph{Curved edges} {\ } + + +\begin{lstlisting} +\begindc{0} +\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 + +\begindc{\commdiag} +\obj(10,15)[A]{$A$} +\obj(40,15)[Aa]{$A$} +\obj(25,15)[B]{$B$} +\mor{A}{B}{$f$} +\mor{B}{Aa}{$g$} +\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) + \pup(25,3){$id_A$} +\enddc +\end{lstlisting} + + +$$ +\begindc{0} +\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 +\qquad +\begindc{\commdiag} +\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 +$$ + +\paragraph{Double Arrows and Natural Transformations} {\ } + +\begin{lstlisting} +\begindc{\commdiag} +\obj(5,5){$A$} +\obj(20,5){$B$} +\mor(5,4)(20,4){$f$}[\atright,\solidarrow] +\mor(5,6)(20,6){$g$} +\enddc + +\begindc{\commdiag} +\obj(5,5){$A$} +\obj(9,5){$B$} +\mor(5,6)(9,6){$\downarrow\sigma$}[\atright,\solidarrow] +\mor{$A$}{$B$}{} +\mor(5,4)(9,4){$\downarrow\tau$} +\enddc +\end{lstlisting} + + + +$$ +\begindc{\commdiag} +\obj(5,5){$A$} +\obj(20,5){$B$} +\mor(5,4)(20,4){$f$}[\atright,\solidarrow] +\mor(5,6)(20,6){$g$} +\enddc +\qquad\qquad\qquad +\begindc{\commdiag}[140] +\obj(5,5){$A$} +\obj(9,5){$B$} +\mor(5,6)(9,6){$\downarrow\sigma$}[\atright,\solidarrow] +\mor{$A$}{$B$}{} +\mor(5,4)(9,4){$\downarrow\tau$} +\enddc +$$ + + + + + + +\subsection{A Complex Diagram} + +The following diagram is one of the test-diagrams used by +Feruglio~\cite{Feruglio94}, as we can see DCpic performs very well, +drawing the complete diagram based on a very simple specification. + +\begin{lstlisting} +\newcommand{\barraA}{\vrule height2em width0em depth0em} +\newcommand{\barraB}{\vrule height1.6em width0em depth0em} +\begindc{\commdiag}[350] +\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^*}$}[\atleft,\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}{\barraA$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{\barraB$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{lstlisting} + +\newcommand{\barraA}{\vrule height2em width0em depth0em} +\newcommand{\barraB}{\vrule height1.6em width0em depth0em} +$$\begindc{\commdiag}[350] +\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^*}$}[\atleft,\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}{\barraA$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{\barraB$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 +$$ + + + +\subsection{``Around the Word''~\cite{Harary72}} + +\begin{lstlisting} +\begindc{\undigraph}[70] +\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{lstlisting} + + +$$ +\begindc{\undigraph}[70] +\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 +$$ + +\subsection{Incircled Objects} + + +\begin{lstlisting} +\begindc{\cdigraph}[250] +\obj(1,5){A} +\obj(1,4){B} +\obj(1,1){C} +\obj(5,5){E} +\obj(5,3){F} +\obj(5,1){G} +\mor{A}{E}[80,80]{5} +\mor{A}{F}[80,80]{3} +\mor{B}{F}[80,80]{6}[\atright,\solidarrow] +\mor{B}{E}[80,80]{1} +\mor{C}{F}[80,80]{5} +\mor{C}{G}[80,80]{7} +\enddc +\end{lstlisting} + + +$$ +\begindc{\cdigraph}[250] +\obj(1,5){A} +\obj(1,4){B} +\obj(1,1){C} +\obj(5,5){E} +\obj(5,3){F} +\obj(5,1){G} +\mor{A}{E}[80,80]{5} +\mor{A}{F}[80,80]{3} +\mor{B}{F}[80,80]{6}[\atright,\solidarrow] +\mor{B}{E}[80,80]{1} +\mor{C}{F}[80,80]{5} +\mor{C}{G}[80,80]{7} +\enddc +$$ + +\newcommand{\noopsort}[1]{} \newcommand{\singleletter}[1]{#1} +\begin{thebibliography}{10} + +\bibitem{Feruglio94} +Feruglio, {Gabriel Valiente}. +\newblock Typesetting commutative diagrams. +\newblock {\em TUGboat}, 15(4):466--484, 1994. + +\bibitem{Harary72} +Harary, Frank. 1972. +\newblock {\em Graph Theory}. +\newblock Reading, Massachusetts: Addison-Wesley. + +\bibitem{Knuth86} +Knuth, Donald~E. +\newblock {\em The TeXbook}. +\newblock Addison-Wesley Publishing Company, Reading,Massachusetts, 1986. + +\bibitem{Lamport94} + Lamport, Leslie. +\newblock {\em {\LaTeX}: A Document Preparation System}. +\newblock Addison-Wesley Publishing Company, Reading, Massachusetts, 2nd + edition, 1994. + +\bibitem{Otten99} +Otten, Ton and Hagen, Hans . +\newblock {\em Con\TeX t an excursion}. +\newblock Pragma ADE, Hasselt, 1999. + +\bibitem{Pierce98} + Pierce, Benjamin. +\newblock {\em Basic Category Theory for Computer Scientists}. +\newblock Foundations of Computing. The MIT Press, London, England, 1998. + +\bibitem{Wichura92} + Wichura, Michael. +\newblock {\em The {\PiCTeX} Manual}. +\newblock Personal \TeX\ Inc, 12 Madrona Avenue, Mill Valley, CA +94941 - USA, 3rd edition, March 1992 + +\end{thebibliography} + + +\section{The Code} + +{\scriptsize +\verbatiminput{dcpic.sty} +} + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/generic/dcpic/manDCPiCpt.pdf b/Master/texmf-dist/doc/generic/dcpic/manDCPiCpt.pdf Binary files differnew file mode 100644 index 00000000000..7952f91565d --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/manDCPiCpt.pdf diff --git a/Master/texmf-dist/doc/generic/dcpic/manDCPiCpt.tex b/Master/texmf-dist/doc/generic/dcpic/manDCPiCpt.tex new file mode 100644 index 00000000000..01e86498105 --- /dev/null +++ b/Master/texmf-dist/doc/generic/dcpic/manDCPiCpt.tex @@ -0,0 +1,846 @@ +% $Id: manDCPiCpt.tex 13 2013-04-21 15:28:45Z pedro $ +\documentclass[a4paper,11pt]{article} +\usepackage{a4wide} +\usepackage[portuguese]{babel} +\usepackage{ae} % Virtual fonts for PDF-files with T1 encoded CMR-fonts. +\usepackage[T1]{fontenc} +\usepackage[utf8x]{inputenc} +\usepackage{dcpic,pictex} +\usepackage{alltt} +\usepackage{verbatim} +\usepackage{longtable} +\usepackage{svn-multi} +\usepackage{listings} +\usepackage{url} + +\svnidlong +{$HeadURL: svn+ssh://gentzen.mat.uc.pt/var/lib/svn/DCPiC/CTAN5.0/manDCPiCpt.tex $} +{$LastChangedDate: 2013-05-01 19:49:49 +0100 (Qua, 01 Mai 2013) $} +{$LastChangedRevision: 15 $} +{$LastChangedBy: pedro $} + +\svnid{$Id: manDCPiCpt.tex 13 2013-04-21 15:28:45Z pedro $} + +\newcommand{\docversion}{\svnyear/\svnmonth/\svnday\ (v\svnrev)} + +\def\dcpicversion{v5.0.0} + +\lstset{language=TeX, + frame = single, + morekeywords={begindc,enddc,cmor,pup,commdiag,undigraph,digraph,cdigraph,cundigraph,obj,mor,pleft,pup,pdown,pright,north,northeast,east,southeast,south,southwest,west,northwest,atright,atleft,solidarrow,dashArrow,dotArrow,solidline,dashline,dotline,injectionarrow,aplicationarrow,surjectivearrow,equalline,doublearrow,doubleopposite,nullarrow}, + basicstyle=\scriptsize} + + +\title{DCpic (5.0) --- Manual de Utilização\\ +\docversion} + +\author{Pedro Quaresma\\ CISUC/Departamento de Matemática, + Universidade de Coimbra\\ 3001-454 COIMBRA, PORTUGAL\\ + \url{pedro@mat.uc.pt}\quad phone: +351-239~791~137\quad fax: + +351-239~832~568} + +\date{2013/05/01} + +\begin{document} + +\maketitle + +\begin{abstract} + O {\em DCpic\/} é um conjunto de comandos para a escrita de grafos, + para tal desenvolveu-se um conjunto de comandos, com uma sintaxe + simples, que permite a construção de quase todo o tipo de grafos. + + Originalmente o {\em DCpic\/} ({\bf D}iagramas {\bf C}omutativos + utilizando o {\bf PiC}TeX) foi concebido para a construção de + diagramas comutativos tal como são usados em Teoria das + Categorias~\cite{Herrlich73,Pierce98}, temos então grafos etiquetados + e com elementos nos nós. A partir da versão 4.0 o conjunto de + comandos foi alterada de forma a considerar-se também a construção de + grafos dirigidos, e grafos não dirigidos. A forma de os especificar + recorre à colocação dos diferentes objectos (nós e arestas) num dado + referencial ortonormado, + + O {\em DCpic} está baseado no \PiCTeX\ necessitando deste para poder + ser usado. +\end{abstract} + +\vfill +\begin{quotation} +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 (\url{pedro@mat.uc.pt}). + +This work consists of the files dcpic.sty. +\end{quotation} + +\vspace*{2cm} +\noindent Coimbra, 2013/04/21\\ +Pedro Quaresma + +\pagebreak +\section{Hist\'oria} + +\begin{description} +\item[11/1990 - versão 1.0] +\item[10/1991 - versão 1.1] +\item[9/1993 - versão 1.2:] argumento ``distância entre as + extremidades da seta e os objectos'' passou a ser opcional; uma nova + opção para as ``setas'' (opção 3). +\item[2/3/1995 - versão 1.3:] foi acrescentado o tipo de seta de + aplicação (opção 4) a distância da etiqueta + à seta respectiva passou a ser fixa (10 unidades de medida). + +\item[15/7/1996 - vers\~ao 2.1:] o comando {\tt mor} passou a ter uma + sintaxe distinta. Os parâmetros 5 e 6 passaram a ser a + distância entre os objectos e os extremos da seta o + parâmetro 7 é o nome do morfismo e os parâmetros 8 e 9, + colocação do morfismo e tipo de morfismo passaram a ser + opcionais. + +\item[5/2001 - versão 3.0:] implementação do comando + {\tt cmor} baseado no comando de desenho de curvas quadráticas pelo + \PiCTeX. + +\item[11/2001 - versão 3.1:] modificação das pontas das + setas de forma a estas ficarem semelhantes às setas + (símbolos) dos TeX. + +\item[1/2002 - versão 3.2:] modificação dos comandos {\tt obj} + e {\tt mor} de forma a introduzir a especificação lógica + dos morfismos, isto é, passa-se a dizer qual é 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ção ao + tamanho dos objectos. + +\item[5/2002 - vers\~ao 4.0:] {\bf vers\~ao incompatível com as + anteriores}. Modificação dos comandos {\tt begindc} e {\tt obj}. O + primeiro passou a ter um argumento (obrigat\'orio) que nos + permite especificar o tipo de grafo que estamos a querer + especificar: + \begin{itemize} + \item {\tt commdiag} (0), para diagramas comutativos; + \item {\tt digraph} (1), para grafos orientados; + \item {\tt undigraph} (2), para grafos n\~ao orientados. + \end{itemize} + + O comando {\tt obj} modificou a sua sintaxe passou a ter um (após a + especifica\c c\~ao das coordenadas, um argumento opcional, um argumento + obrigat\'orio, e um argumento opcional. O primeiro argumento opcional + d\'a-nos a etiqueta que serve como refer\^encia para a especifica\c c\~ao dos + morfismos, na sua aus\^encia usa-se o argumento obrigat\'orio para esse + efeito, o argumento obrigat\'orio d\'a-nos o ``conte\'udo'' do objecto, nos + diagramas comutativos \'e centrado no ponto dado pelas coordenadas + sendo o argumento seguinte simplesmente ignorado, nos grafos o + ``conte\'udo'' \'e colocado numa posi\c c\~ao a norte, a noroeste, a este, \ldots, + sendo que a posi\c c\~ao concreta \'e especificada pelo \'ultimo dos + argumentos deste comando, o valor por omiss\~ao \'e o {\tt norte}. + +\item[3/2003 - vers\~ao 4.1:] a pedido de Jon Barker \url{<jeb1@soton.ac.uk>} + criei um novo tipo de seta, a seta de sobrejec\c c\~ao. Para j\'a a dupla + seta s\'o fica bem nas setas horizontais ou verticais. + +\item[12/2004 - vers\~ao 4.1.1:] nova vers\~ao das setas de sobrejec\c c\~ao que + corrigue completamente os problemas da solu\c c\~ao anterior. + +\item[3/2007 - vers\~ao 4.2:] acrescenta a directiva + ``providespackage''. Acrescenta linhas a ponteado e a tracejado. + +\item[5/2008 - vers\~ao 4.2.1:] apaga alguns contadores para tentar + diminuir o excessivo uso dos mesmos por parte do PiCTeX. + +\item[8/2008 - vers\~ao 4.3:] gra\c cas a Ruben Debeerst + \url{<debeerst@mathematik.uni-kassel.de>}, acrescentei uma nova + ``seta'' a ``equalline''. Ap\'os isso decidi tamb\'em acrescentar + setas duplas, com o mesmo ou diferentes sentidos. Acrescentou-se + também a seta nula, isto é, sem representação gráfica, a qual pode + ser usada para acrescentar etiquetas a outras ``setas''. + +\item[12/2008 - version 4.3.1:] para evitar conflitos com outros + pacotes o comando ``id'' \'e internalizado. O comando ``dasharrow'' \'e + modificado para ``dashArrow'' para evitar um conflito com o AMSTeX. + +\item[12/2009 - version 4.3.2:] para evitar um conflito com o pacote + ``hyperref'' mudou-se o contador ``d'' para ``deuc'', aproveitei e + mudei os contadores ``x'' e ``y'' para ``xO'' e ``yO'' + +\item[4/2013 - version 4.4.0:] graças a Xingliang Liang + \url{jkl9543@gmail.com>} acrescentou-se uma nova seta ``dotarrow''. + +\item[4/2013 - version 5.0:] {\bf uma nova unidade para o sistema de + coordenadas}, 1/10 da anterior. Esta nova unidade permite + corriguir um problema com a construção das setas duplas, além de + permitir uma especificação mais fina dos diagramas. +\end{description} + +\section{Introdução} + +O conjunto de comandos {\em DCpic} é um conjunto de comandos +\TeX~\cite{Knuth86} dedicado à escrita de diagramas tal como são +usados em Teoria das Categorias~\cite{Herrlich73,Pierce98}, assim como +de grafos dirigidos e não dirigidos~\cite{Harary72}. + +Pretendeu-se com a sua escrita ter uma forma simples de especificar +grafos, fazendo-o através da especificação de um conjunto de +``objectos'' (nós do grafo) colocados num dado referencial +ortonormado, e através de um conjuntos de morfismos (arestas) que os +são posicionados explicitamente no referido referencial, ou então, +a são posição é dada especificando qual é o seu nó de +partida e qual é o seu nó de chegada. + +O gráfico em si é construído recorrendo aos comandos gráficos +do \PiCTeX. + +\section{Utilização} + +Antes de mais é necessário carregar os dois conjuntos de comandos +acima referidos, no caso de um documento \LaTeX~\cite{Lamport94} isso +pode ser feito com o seguinte comando (no preâmbulo). + +\begin{verbatim} +\usepackage{dcpic,pictex} +\end{verbatim} + +Nos outros formatos ter-se-á de usar um comando equivalente. Após +isso os diagramas podem ser escritos através dos comandos +disponibilizados pelo {\em DCpic}. Por exemplo, os comandos: + + +\begin{lstlisting} +\begindc{\commdiag}[200] + \obj(1,4){$A^B$} + \obj(1,1){$C$} + \obj(3,4){$A$} + \obj(3,1){$C\times{}B$} + \obj(6,4){$A^B\times{}B$} + \mor{$C$}{$A^B$}{$f$} + \mor{$C\times{}B$}{$A$}{$\bar f$}[\atleft,\dashArrow] + \mor{$A^B\times{}B$}{$A$}{$ev$}[\atright,\solidarrow] + \mor{$C\times{}B$}{$A^B\times{}B$}{$f\times{}id$}[\atright,\solidarrow] +\enddc +\end{lstlisting} + +produzem o seguinte diagrama: + +$$ +\begindc{\commdiag}[200] + \obj(1,4){$A^B$} + \obj(1,1){$C$} + \obj(3,4){$A$} + \obj(3,1){$C\times{}B$} + \obj(6,4){$A^B\times{}B$} + \mor{$C$}{$A^B$}{$f$} + \mor{$C\times{}B$}{$A$}{$\bar f$}[\atleft,\dashArrow] + \mor{$A^B\times{}B$}{$A$}{$ev$}[\atright,\solidarrow] + \mor{$C\times{}B$}{$A^B\times{}B$}{$f\times{}id$}[\atright,\solidarrow] +\enddc +$$ + +O meio ambiente {\tt begindc}, {\tt enddc} permite-nos construir um +grafo por colocação dos objectos num referencial ortonormado tendo +a origem em (0,0). As arestas (morfismos) vão ligar pares de nós +(objectos) entre si. + +\section{Comandos Disponíveis} + +De seguida apresenta-se a descrição dos comandos, a sua sintaxe e +a sua funcionalidade. Os argumentos entre parêntesis rectos são +opcionais. + +\begin{description} +\item[\tt $\backslash$begindc\{\#1\}[\#2\mbox{]}] -- entrada no ambiente de + escrita de grafos: + + \begin{tabular}{r@{ -- }l} + {\tt \#1} & tipo de grafo\\ + \multicolumn{2}{l}{\quad $0\equiv\backslash$commdiag, diagrama comutativo;}\\ + \multicolumn{2}{l}{\quad $1\equiv\backslash$digraph, grafo orientado;}\\ + \multicolumn{2}{l}{\quad $2\equiv\backslash$undigraph, grafo não orientado;}\\ + \multicolumn{2}{l}{\quad $3\equiv\backslash$cdigraph, grafo orientado, com + objectos circunscritos;}\\ + \multicolumn{2}{l}{\quad $4\equiv\backslash$cundigraph, grafo não orientado, + com objectos circunscritos.}\\ + {\tt \#2} & factor de escala (opcional)\\ + \multicolumn{2}{l}{\quad valor por omissão: 300} + \end{tabular} + +\item[\tt $\backslash$enddc] -- saída do meio ambiente para a + escrita de grafos. + +\item[{\tt $\backslash$obj(\#1,\#2)[\#3]\{\#4\}[\#5]}:] comando de colocação + dos nós (objectos). + + \begin{tabular}{r@{ -- }l} + {\tt \#1} e {\tt \#2}& coordenadas do centro da caixa que vai + conter o texto\\ + {\tt \#3} & etiqueta para identificar o objecto (opcional)\\ + {\tt \#4} & texto (conte{\'u}do do nó)\\ + {\tt \#5} & colocação relativa do objecto (opcional)\\ + \multicolumn{2}{l}{\qquad\quad $0\doteq\backslash$pcent, centrado}\\ + \multicolumn{2}{l}{\qquad\quad $1\doteq\backslash$north, norte}\\ + \multicolumn{2}{l}{\qquad\quad $2\doteq\backslash$northeast, nordeste}\\ + \multicolumn{2}{l}{\qquad\quad $3\doteq\backslash$east, este}\\ + \multicolumn{2}{l}{\qquad\quad $4\doteq\backslash$southeast, sudeste}\\ + \multicolumn{2}{l}{\qquad\quad $5\doteq\backslash$south, sul}\\ + \multicolumn{2}{l}{\qquad\quad $6\doteq\backslash$southwest, sudoeste}\\ + \multicolumn{2}{l}{\qquad\quad $7\doteq\backslash$west, oeste}\\ + \multicolumn{2}{l}{\qquad\quad $8\doteq\backslash$northwest, noroeste} + \end{tabular} + +A etiqueta explícita-se quando não é possível usar o objecto como +forma de identificação do nó, por exemplo num dado grafo não orientado +os nós podem não ter conteúdo e como tal serem todos iguais em termos +de identificação: + +Em alguns casos, por exemplo comandos dos \LaTeX\ complexos, pode ser +necessário explicitar o argumento {\tt \#3} mesmo que seja através da +etiqueta vazia {\tt []}. Esse especificar da etiqueta vazia torna-se +necessário para que o mecanismo interno do DCpic de comunicação entre +comandos (pilhas) não se baralhe e entre num ciclo infinito. + + +$$ +\begindc{\undigraph}[200] +\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 +$$ +foi produzido por: +\begin{lstlisting} +\begindc{\undigraph}[200] +\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{lstlisting} + + +O parâmetro referente à colocação do objecto só é relevante quando se +pensa na identificação dos nós num dado grafo orientado (ou não), por +exemplo o grafo ``Around the Word''~\cite{Harary72}: + +$$ +\begindc{\undigraph}[70] +\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 +$$ +foi produzido por +\begin{lstlisting} +\begindc{\undigraph}[70] +\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{lstlisting} + + + +\item[{\tt $\backslash$mor\{\#1\}\{\#2\}[\#5,\#6]\{\#7\}[\#8,\#9]}:] + Comando de colocação da seta (morfismo) de ligação de dois objectos + -- Primeira variante. + + A numeração errada dos argumentos é aqui feita propositadamente, + aquando da explicação da segunda variante deste comando + compreender-se-á o porquê desta opção de escrita. + + \begin{longtable}{r@{ -- }p{32em}} + {\tt \#1} & referência do nó de partida\\ + {\tt \#2} & referência do nó de chegada\\ + {\tt \#5} e {\tt \#6} & distância do centro dos objectos às + extremidades inicial e final respectivamente da seta. Valores por + omissão: 10, 10 (para diagramas) 2, 2 (para os grafos)\\ + {\tt \#7} & texto, ``nome'' do morfismo\\ + {\tt \#8} & colocação do nome do morfismo em relação à seta. Valor + por omissão, $\backslash$atleft. \\ + \multicolumn{2}{l}{\hspace*{4.5em} 1 $\doteq\backslash$atright, à direita}\\ + \multicolumn{2}{l}{\hspace*{4.5em} -1 $\doteq\backslash$atleft, à esquerda}\\ + {\tt \#9} & tipo da seta. Valor por omissão, $\backslash$solidarrow.\\ + \multicolumn{2}{l}{\hspace*{4.5em} 0 $\doteq\backslash$solidarrow, seta sólida} \\ + \multicolumn{2}{l}{\hspace*{4.5em} 1 $\doteq\backslash$dashArrow, seta tracejada} \\ + \multicolumn{2}{l}{\hspace*{4.5em} 2 $\doteq\backslash$dotArrow, seta ponteada} \\ + \multicolumn{2}{l}{\hspace*{4.5em} 3 $\doteq\backslash$solidline, linha sólida} \\ + \multicolumn{2}{l}{\hspace*{4.5em} 4 $\doteq\backslash$dashline, linha a tracejado} \\ + \multicolumn{2}{l}{\hspace*{4.5em} 5 $\doteq\backslash$dotline, linha a ponteado} \\ + \multicolumn{2}{l}{\hspace*{4.5em} 6 $\doteq\backslash$injectionarrow, seta de + injecção. Valor anterior 3 (vers\~ao $<$ 4.2) } \\ + \multicolumn{2}{l}{\hspace*{4.5em} 7 $\doteq\backslash$aplicationarrow, seta de + aplicação. Valor anterior 4 (vers\~ao $<$ 4.2) } \\ + \multicolumn{2}{l}{\hspace*{4.5em} 8 $\doteq\backslash$surjectivearrow, seta de + função sobrejectiva. Valor anterior 5 (vers\~ao $<$ 4.2) }\\ + \multicolumn{2}{l}{\hspace*{4.5em} 9 $\doteq\backslash$equalline, linha dupla}\\ + \multicolumn{2}{l}{\hspace*{4.5em} 10 + $\doteq\backslash$doublearrow, seta dupla}\\ + \multicolumn{2}{l}{\hspace*{4.5em} 11 + $\doteq\backslash$doubleopposite, seta dupla em sentidos opostos}\\ + \multicolumn{2}{l}{\hspace*{4.5em} 12 + $\doteq\backslash$nullarrow, seta nula, serve o propósito de + acrescentar etiquetas as outras ``setas''.}\\ + \end{longtable} + +\item[{\tt $\backslash$mor(\#1,\#2)(\#3,\#4)[\#5,\#6]\{\#7\}[\#8,\#9]}:] + Comando de colocação da seta (morfismo) de ligação de dois objectos + -- Segunda variante. + + \begin{longtable}{r@{ -- }p{32em}} + {\tt \#1} e {\tt \#2} & coordenadas do nó de partida\\ + {\tt \#3} e {\tt \#4} & coordenadas do nó de chegada\\ + \end{longtable} + + Todos os outros argumentos têm o significado já explicado (por + isso a numeração errada). É de notar que para a primeira variante é + feito o cálculo das coordenadas dos nós de forma automática e depois + são passados esses valores para a segunda variante do comando. + + +\item[{\tt $\backslash$cmor(\#1) \#2(\#3,\#4)\{\#5\}[\#6]}] comando para a + especificação de setas curvas. O algoritmo de construção das setas é + o do \PiCTeX\ o que implica que se está a especificar uma linha + quadrática através de um número ímpar de pontos. + + \begin{tabular}{c@{---}l} + {\tt \#1} & lista de pontos, em número ímpar \\ + {\tt \#2} & direccionamento da seta \\ + \multicolumn{2}{l}{\qquad 0 $\doteq\backslash$pup, apontar para cima}\\ + \multicolumn{2}{l}{\qquad 1 $\doteq \backslash$pdown, apontar para + baixo}\\ + \multicolumn{2}{l}{\qquad 2 $\doteq \backslash$pright, apontar para a + direita}\\ + \multicolumn{2}{l}{\qquad 3 $\doteq \backslash$pleft, apontar para a + esquerda}\\ + {\tt \#3} & abcissa do morfismo\\ + {\tt \#4} & ordenada do morfismo\\ + {\tt \#5} & morfismo\\ + {\tt \#6} & tipo de ``seta'', valor por omissão: 0, seta + sólida.\\ + \multicolumn{2}{l}{\hspace*{4.5em} Os restantes valores poss\'\i veis + s\~ao os descritos na variante anterior.}\\ + + \end{tabular} + + O comando {\tt cmor} no caso em que não tem o último parâmetro opcional + tem de ser seguido por um espaço. O espaço antes do direccionamento + da seta é obrigatório. + + No caso de se ter o valor 2 (``$\backslash$solidline'') o valor para o + direccionamento da seta não é tipo em conta, no entanto dado se + tratar de um do parâmetro obrigatório é necessário dar-lhe um valor +\end{description} + + +\section{Alguns Exemplos} + + +\subsection{Setas Duplas, Transformações Naturais, \ldots} + +É de notar que alguns casos aparentemente omissos na actual versão +podem perfeitamente ser construídos através de uma utilização +imaginativa dos actuais comandos. Por exemplo os seguintes diagramas: + +$$ +\begindc{\commdiag}[30] +\obj(5,5){$A$} +\obj(20,5){$B$} +\mor{$A$}{$B$}{$f$}[\atright,\doublearrow] +\mor{$A$}{$B$}{$g$}[\atleft,\nullarrow] +\enddc +\qquad\qquad\qquad +\begindc{\commdiag}[140] +\obj(5,5){$A$} +\obj(9,5){$B$} +\mor(5,6)(9,6){$\downarrow\sigma$}[\atright,\solidarrow] +\mor{$A$}{$B$}{} +\mor(5,4)(9,4){$\downarrow\tau$} +\enddc +$$ + +Podem ser construídos com a actual versão. Eis como: + + +\begin{lstlisting} +\begindc{\commdiag}[30] +\obj(5,5){$A$} +\obj(20,5){$B$} +\mor{$A$}{$B$}{$f$}[\atright,\doublearrow] +\mor{$A$}{$B$}{$g$}[\atleft,\nullarrow] + +\begindc{\commdiag}[14] +\obj(5,5){$A$} +\obj(9,5){$B$} +\mor(5,6)(9,6){$\downarrow\sigma$}[\atright,\solidarrow] +\mor{$A$}{$B$}{} +\mor(5,4)(9,4){$\downarrow\tau$} +\enddc +\end{lstlisting} + + +\subsection{Grafos Orientados com Objectos Circunscritos} + + +$$ +\begindc{\cdigraph}[250] +\obj(1,5){A} +\obj(1,4){B} +\obj(1,1){C} +\obj(5,5){E} +\obj(5,3){F} +\obj(5,1){G} +\mor{A}{E}[80,80]{5} +\mor{A}{F}[80,80]{3} +\mor{B}{F}[80,80]{6}[\atright,\solidarrow] +\mor{B}{E}[80,80]{1} +\mor{C}{F}[80,80]{5} +\mor{C}{G}[80,80]{7} +\enddc +$$ + +Foi produzido através dos seguintes comandos: + + +\begin{lstlisting} +\begindc{\commdiag}[250] +\obj(1,5){A} +\obj(1,4){B} +\obj(1,1){C} +\obj(5,5){E} +\obj(5,3){F} +\obj(5,1){G} +\mor{A}{E}[80,80]{5} +\mor{A}{F}[80,80]{3} +\mor{B}{F}[80,80]{6}[\atright,\solidarrow] +\mor{B}{E}[80,80]{1} +\mor{C}{F}[80,80]{5} +\mor{C}{G}[80,80]{7} +\enddc +\end{lstlisting} + +\subsection{Diferentes Tipos de Setas/Linhas} + + +\begin{lstlisting} +\begindc{\commdiag}[250] +\obj(10,10)[A]{$OOOOOO$} +\obj(15,10)[A0]{$A_0$} +\obj(14,11)[A1]{$A_1$} +\obj(13,12)[A2]{$A_2$} +\obj(12,13)[A3]{$A_3$} +\obj(10,14)[A4]{$A_4$} +\obj(9,13)[A5]{$A_5$} +\obj(8,12)[A6]{$A_6$} +\obj(7,11)[A7]{$A_7$} +\obj(6,10)[A8]{$A_8$} +\obj(7,9)[A9]{$A_9$} +\obj(9,8)[A10]{$A_{10}$} +\obj(12,8)[A11]{$A_{11}$} +\mor{A}{A0}{$a_0$}[\atright,\solidarrow] +\mor{A}{A1}{$a_1$}[\atright,\dashArrow] +\mor{A}{A2}{$a_2$}[\atright,\dotArrow] +\mor{A}{A3}{$a_3$}[\atright,\solidline] +\mor{A}{A4}{$a_4$}[\atright,\dashline] +\mor{A}{A5}{$a_5$}[\atleft,\dotline] +\mor{A}{A6}{$a_6$}[\atleft,\injectionarrow] +\mor{A}{A7}{$a_7$}[\atleft,\aplicationarrow] +\mor{A}{A8}{$a_8$}[\atleft,\surjectivearrow] +\mor{A}{A9}{$a_9$}[\atleft,\equalline] +\mor{A}{A10}{$a_{10}$}[\atleft,\doublearrow] +\mor{A}{A11}{$a_{11}$}[\atleft,\doubleopposite] +\mor{A}{A11}{$a_{12}$}[\atright,\nullarrow] +\enddc +\end{lstlisting} + +$$ +\begindc{\commdiag}[250] +\obj(10,10)[A]{$OOOOOO$} +\obj(15,10)[A0]{$A_0$} +\obj(14,11)[A1]{$A_1$} +\obj(13,12)[A2]{$A_2$} +\obj(12,13)[A3]{$A_3$} +\obj(10,14)[A4]{$A_4$} +\obj(9,13)[A5]{$A_5$} +\obj(8,12)[A6]{$A_6$} +\obj(7,11)[A7]{$A_7$} +\obj(6,10)[A8]{$A_8$} +\obj(7,9)[A9]{$A_9$} +\obj(9,8)[A10]{$A_{10}$} +\obj(12,8)[A11]{$A_{11}$} +\mor{A}{A0}{$a_0$}[\atright,\solidarrow] +\mor{A}{A1}{$a_1$}[\atright,\dashArrow] +\mor{A}{A2}{$a_2$}[\atright,\dotArrow] +\mor{A}{A3}{$a_3$}[\atright,\solidline] +\mor{A}{A4}{$a_4$}[\atright,\dashline] +\mor{A}{A5}{$a_5$}[\atleft,\dotline] +\mor{A}{A6}{$a_6$}[\atleft,\injectionarrow] +\mor{A}{A7}{$a_7$}[\atleft,\aplicationarrow] +\mor{A}{A8}{$a_8$}[\atleft,\surjectivearrow] +\mor{A}{A9}{$a_9$}[\atleft,\equalline] +\mor{A}{A10}{$a_{10}$}[\atleft,\doublearrow] +\mor{A}{A11}{$a_{11}$}[\atleft,\doubleopposite] +\mor{A}{A11}{$a_{12}$}[\atright,\nullarrow] +\enddc +$$ + +\subsection{Diagramas com Setas Curvas} + + + +\begin{lstlisting} +\begindc{\commdiag}[30] +\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 + +\begindc{\commdiag}[30] +\obj(10,15)[A]{$A$} +\obj(40,15)[Aa]{$A$} +\obj(25,15)[B]{$B$} +\mor{A}{B}{$f$} +\mor{B}{Aa}{$g$} +\cmor((10,11)(11,7)(15,6)(25,6)(35,6)(39,7)(40,11)) + \pup(25,3){$id_A$} +\enddc +\end{lstlisting} + +$$ +\begindc{\commdiag}[30] +\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 +\qquad +\begindc{\commdiag}[30] +\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 +$$ + +\subsection{Um Exemplo Complexo} + +O diagrama seguinte foi proposto por Feruglio~\cite{Feruglio94} como +um caso de teste. Como \'e poss\'\i vel ver o DCpic produz o diagrama +correctamente a partir de uma especifica\c c\~ao simples. + + +\begin{lstlisting} +\newcommand{\barraA}{\vrule height2em width0em depth0em} +\newcommand{\barraB}{\vrule height1.6em width0em depth0em} +\begindc{\commdiag}[350] +\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^*}$}[\atleft,\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}{\barraA$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{\barraB$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{lstlisting} + +\newcommand{\barraA}{\vrule height2em width0em depth0em} +\newcommand{\barraB}{\vrule height1.6em width0em depth0em} +$$\begindc{\commdiag}[350] +\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^*}$}[\atleft,\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}{\barraA$m$} +\mor{Rmstar}{R}{$i_6$}[\atright,\aplicationarrow] +\mor{Rmstar}{H}{\barraB$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 +$$ + + +%\bibliographystyle{plain} +%\bibliography{pedro} + +\newcommand{\noopsort}[1]{} \newcommand{\singleletter}[1]{#1} +\begin{thebibliography}{1} + +\bibitem{Feruglio94} +{Gabriel Valiente} Feruglio. +\newblock Typesetting commutative diagrams. +\newblock {\em TUGboat}, 15(4):466--484, 1994. + +\bibitem{Harary72} +Frank Harary. +\newblock {\em Graph Theory}. +\newblock Addison-Wesley, Reading, Massachusetts, 1972. + +\bibitem{Herrlich73} +Horst Herrlich and George Strecker. +\newblock {\em Category Theory}. +\newblock Allyn and Bacon Inc., 1973. + +\bibitem{Knuth86} +Donald~E. Knuth. +\newblock {\em The {\TeX}book}. +\newblock Addison-Wesley Publishing Company, Reading, Massachusetts, 1986. + +\bibitem{Lamport94} +Leslie Lamport. +\newblock {\em {\LaTeX}: A Document Preparation System}. +\newblock Addison-Wesley Publishing Company, Reading,Massachusetts, 2nd + edition, 1994. + +\bibitem{Pierce98} +Benjamin Pierce. +\newblock {\em Basic Category Theory for Computer Scientists}. +\newblock Foundations of Computing. The MIT Press, London, England, 1998. + +\end{thebibliography} + +\appendix +\section{O Código} + +{\scriptsize +\verbatiminput{dcpic.sty}} + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/tex/generic/dcpic/dcpic.sty b/Master/texmf-dist/tex/generic/dcpic/dcpic.sty index 4c1ef123710..d6b4709a261 100644 --- a/Master/texmf-dist/tex/generic/dcpic/dcpic.sty +++ b/Master/texmf-dist/tex/generic/dcpic/dcpic.sty @@ -1,5 +1,5 @@ %% DC-PiCTeX -%% Copyright (c) 1990-2009 Pedro Quaresma, Coimbra, Portugal +%% Copyright (c) 1990-2013 Pedro Quaresma, University of Coimbra, Portugal %% 11/1990 (version 1.0); %% 10/1991 (version 1.1); %% 9/1993 (version 1.2); @@ -16,17 +16,19 @@ %% 8/2008 (version 4.3) %% 12/2008 (version 4.3.1) %% 12/2009 (version 4.3.2) +%% 4/2013 (version 4.4.0) +%% 5/2013 (version 5.0) -\immediate\write10{Package DCpic 2009/12/22 v4.3.2} +\immediate\write10{Package DCpic 2013/05/01 v5.0} -\ProvidesPackage{dcpic}[2009/12/22 v4.3.2] +\ProvidesPackage{dcpic}[2013/05/01 v5.0] %% Version X.Y.Z %% X - major versions %% Y - minor versions %% Z - bug corrections %% -%% Copyright (c) 1990-2009 Pedro Quaresma <pedro@mat.uc.pt> +%% Copyright (c) 1990-2013 Pedro Quaresma <pedro@mat.uc.pt> %% % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -42,8 +44,8 @@ % % This work consists of the files dcpic.sty. %% -%% Coimbra, 22 de Dezembro de 2009 (2009/12/22) -%% Pedro Quaresma de Almeida +%% Coimbra, 1st of May, 2013 (2013/05/01) +%% Pedro Quaresma %% %% DCpic is a package of \TeX\ macros for graph modelling in a %% (La)\TeX\ or Con\TeX t document. Its distinguishing features are: @@ -62,7 +64,7 @@ %% morphisms, linear and curved edges, and its labels. %% %% Example: -%% \begindc{\commdiag}[3] +%% \begindc{\commdiag}[30] %% \obj(10,15){$A$} %% \obj(25,15){$B$} %% \obj(40,15){$C$} @@ -85,7 +87,7 @@ %% 2 = "undigraph" (undirect graph) %% 3 = "cdigraph" with incircled objects %% 4 = "cundigraph" with incircled objects -%% (optional) #2 - magnification factor (default value, 30) +%% (optional) #2 - magnification factor (default value, 300) %% %% \enddc %% @@ -140,27 +142,28 @@ %% %% #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 +%%(optional)#5,#6 - correction factors (defaul values, 100 and 100 (10pt)) +%% #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 +%% #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) +%% 2 = "\dotArrow (thanks to Xingliang Liang <jkl9543@gmail.com>) +%% 3 = "\solidline" +%% 4 = "\dashline" +%% 5 = "\dotline" +%% 6 = "\injectionarrow" +%% 7 = "\aplicationarrow" +%% 8 = "\surjectivearrow" +%% 9 = "\equalline" (thanks to Ruben Debeerst <debeerst@mathematik.uni-kassel.de>) +%% 10 = "\doublearrow" +%% 11 = "\doubleopposite" +%% 12 = "\nullarrow" (to allow adding labels to existing arrows) %% %% Notes: the equalline "arrow" does not provide a second label. %% @@ -182,71 +185,71 @@ %% 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} +%% Examples: +%% \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 @@ -254,7 +257,7 @@ %% %% 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). +%% the label and the "arrow" is now a fixed value (100 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 @@ -270,36 +273,28 @@ %% (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. +%% Modification of the commands "obj" and "mor" in such a way +%% that allows the logical specification of the morphisms, that +%% is, it is now possible to specify the starting object and the +%% ending object instead of specify the coordinates. +%% +%% The length of the arrows is automatically trimmed to the +%% objects' size. %% %% 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". +%% New syntax for the commands "begindc" e "obj" +%% !!! New syntax !!! +%% The command "begindc" now have an obligatory argument, this +%% argument allows the specification of the graph type +%% "commdiag" (0), commutative diagrams +%% "digraph" (1), directed graphs +%% "undigraph" (2), undirected graphs +%% The command "obj" has a new syntax: after the coordinates +%% specification, an optional argument specifying a label, an +%% obligatory argument given the "value" of the object and the +%% final optional argument used in the graphs to set the +%% relative position of the "value" to the "dot" defining the +%% objects position, the default value is "north". %% %% 3/2003 (version 4.1) %% Responding to a request of Jon Barker <jeb1@soton.ac.uk> I @@ -334,6 +329,16 @@ %% S <thorsten.schwander@gmail.com>). %% The \d changed to \deuc (Euclidian Distance). The \x and \y %% changed to \xO \yO +%% 4/2013 (version 4.4.0) +%% Thanks to Xingliang Liang <jkl9543@gmail.com>. He added a new +%% arrow "dotarrow". +%% 5/2013 (version 5.0) +%% The base scale of the graph has changed from 1pt to .1pt to +%% solve a problem with the implementation of the oblique +%% equalline (Thanks to Antonio de Nicola). +%% The LaTeX circle and oval commands where replaced by the +%% PiCTeX circulararc and ellipticalarc commands to avoid +%% differences in scales. %%-----------------//------------- \catcode`!=11 % ***** THIS MUST NEVER BE OMITTED (See PiCTeX) @@ -366,7 +371,6 @@ \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% @@ -390,7 +394,6 @@ \def\objChegada{}% \def\objNulo{}% - %% %% Stack specification %% @@ -461,20 +464,20 @@ #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} +\def\dotArrow{2} +\def\solidline{3} +\def\dashline{4} +\def\dotline{5} +\def\injectionarrow{6} +\def\aplicationarrow{7} +\def\surjectivearrow{8} +\def\equalline{9} +\def\doublearrow{10} +\def\doubleopposite{11} +\def\nullarrow{12} %% Name definitions for edge label placement \def\atright{-1} @@ -501,56 +504,43 @@ \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. +%%Private Macro +%% Adjust the distance between the arrows and the objects regarding +%% the dimensions of the objects. +%% +%% \ajusta{x}{xl}{y}{yl}{d}{Object} (ajusta = adjust) +%% +%% Input +%% (x,y) e (xl,yl) - start, end coordinates of arrow +%% d - distance specified by the user (default value, 100) +%% Objecto - reference of the object pointed by the arrow +%% Output +%% d - adjusted distance %% -%% 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 +%% The adjusted distance is the greatest value between 100 and the +%% object's box dimensions. If the user specify a value this is not +%% altered. +%% +%% If the arrow is horizontal the length is used. +%% If the arrow is vertical the height is used for arrows in the 1st +%% or 2nd quadrante, or the depth if the arrow is in the 3rd or 4th +%% quadrante. If the arrow is oblique the value is chosen accordingly: +%% from 315 to 45 degrees length is used +%% from 45 to 135 degrees height is used +%% from 135 to 225 degrees length is used +%% from 225 to 315 degrees depth is used \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 + \ifcase \tipografo % commutative diagrams + \ifnum\number\aux=100 + \ajustadisttrue % if needed, adjust \else - \ajustadistfalse % caso contrário não ajusta + \ajustadistfalse % if not, keeps unchanged \fi - \else % grafos (dirigidos, não dirigidos, com molduras) + \else % graphs (directed, undirected, with frames) \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}% @@ -559,55 +549,54 @@ \ifcompara\nvaziafalse \else\!pilhanvazia\pilha \fi% \ifnvazia% \repeat% -%% rep{\~o}e os valores na pilha +%% push the values into the stack \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. +%% It is not possible to make de adjustment given the fact that the +%% user did not provide a label for the object in question. We set a +%% value equal to the default value (100) %% - \larg=1310720% n{\~a}o faz o ajuste - \prof=655360% - \alt=655360% + \larg=131072% these values are for unit of .1pt + \prof=65536% + \alt=65536% \fi% \fi% - \divide\larg by 131072 - \divide\prof by 65536 - \divide\alt by 65536 + \divide\larg by 13107% these values are for unit of .1pt + \divide\prof by 6553% + \divide\alt by 6553% \ifnum\number\yO=\number\yl -%% Caso 1 -- seta horizontal +%% Case 1 -- horizontal arrow %% -%% 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 +%% with the division by 13107 we get half the size of the box, for a +%% centered text, the adding of 30 is an empirical adjustment. + \advance\larg by 30 \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 +%% Case 2.1 -- vertical arrow, down direction %% \ifnum\number\alt>\aux #5=\alt \fi \else -%% Caso 2.2 -- seta vertical de baixo para cima +%% Case 2.2 -- vertical arrow, up direction %% -%% 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 +%% with the division by 6553 we get the box height. The adjustment +%% of 50 is an empirical adjustment. + \advance\prof by 50 \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 +%% Case 3 -- oblique arrow +%% Case 3.1 --- from 315o to 45o; |x-xl|>|y-yl| +%% Case 3.3 --- from 135o to 225o; |x-xl|>|y-yl|; Length \auxqx=\xO \advance\auxqx by -\xl \!absoluto{\auxqx}{\auxqx}% @@ -615,38 +604,37 @@ \advance\auxqy by -\yl \!absoluto{\auxqy}{\auxqy}% \ifnum\auxqx>\auxqy - \ifnum\larg<10 - \larg=10 + \ifnum\larg<100 + \larg=100 \fi - \advance\larg by 3 + \advance\larg by 30 #5=\larg \else -%% Caso 3.2 de 45o a 135o; |x-xl|<|y-yl| e y>0; Largura +%% Case 3.2 --- from 45o to 135o; |x-xl|<|y-yl| e y>0; Length \ifnum\yl>\yO - \ifnum\larg<10 - \larg=10 + \ifnum\larg<100 + \larg=100 \fi - \advance\alt by 6 + \advance\alt by 60 #5=\alt \else -%% Caso 3.4 de 225o a 315o; |x-xl|<|y-yl| e y<0; Profundidade - \advance\prof by 11 +%% Case 3.4 -- from 225o to 315o; |x-xl|<|y-yl| e y<0; Depth + \advance\prof by 110 #5=\prof \fi \fi \fi \fi -\fi} % o ramo "else" {\'e} omisso - +\fi} % the branch else is missing -%%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 +%%Private Macro +%% Square root +%% raiz{n}{m} (raiz = root) +%% -> +%% n - natural number +%% <- +%% n - natural number +%% m - greatest natural number less then the square root of n \def\!raiz#1#2{\auxa=#1% \auxb=1% \loop @@ -690,6 +678,8 @@ %%Private Macro %% Euclidean distance between two points %% +%% quadrado = square +%% %% quadrado{n}{m}{l} %% Input %% n - natural number @@ -701,90 +691,142 @@ \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} +%%Private Macro +%% Euclidean distance between arrows and its tags +%% +%% Input +%% (x,y), (x',y') morphism's name (tag) +%% Output +%% dnm - distance between an arrow and its tags +%% (with a trim given by the tag's size +%% Observations +%% The trimming is for horizontal and vertical arrows +%% only. Oblique arrows are dealt in a different way +%% +%% Algorithm +%% caixa0 <- morfism name +%% if x-xl = 0 then {vertical arrow} +%% aux <- caixa0 width +%% dnm <- converstion-sp-pt(aux)/2+3 +%% else {non-vertical arrow} +%% if y-yl = 0 then {horizontal arrow} +%% aux <- caixa0 height+depth +%% dnm <- converstion-sp-pt(aux)/2+3 +%% else {oblique arrow} %% dnm <- 3 -%% fimse -%% fimse -%% fimalgoritmo +%% endif +%% endif +%% endalgorithm \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 + \aux=\wd0 \divide \aux by 13107%2 + \advance \aux by 30 #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 + \aux=\ht0 \advance \aux by \dp0 \divide \aux by 13107%2 + \advance \aux by 30 #6=\aux% \else - #6=3 + #6=30 \fi \fi } - %% -%% O ambiente "begindc...enddc" +%% The environment "begindc...enddc" %% \def\begindc#1{\!ifnextchar[{\!begindc{#1}}{\!begindc{#1}[30]}} \def\!begindc#1[#2]{\beginpicture \let\pilha=\!vazia - \setcoordinatesystem units <1pt,1pt> + \setcoordinatesystem units <.1pt,.1pt> \expansao=#2 \ifcase #1 - \distanciaobjmor=10 + \distanciaobjmor=100 \tipoarco=0 % arrow \tipografo=0 % commutative diagram \or - \distanciaobjmor=2 + \distanciaobjmor=20 \tipoarco=0 % arrow \tipografo=1 % directed graph \or - \distanciaobjmor=1 - \tipoarco=2 % line + \distanciaobjmor=10 + \tipoarco=3 % line \tipografo=2 % undirected graph \or - \distanciaobjmor=8 + \distanciaobjmor=80 \tipoarco=0 % arrow \tipografo=3 % directed graph -% \arredondadotrue % objectos com molduras circulares \or - \distanciaobjmor=8 - \tipoarco=2 % line + \distanciaobjmor=80 + \tipoarco=3 % line \tipografo=4 % undirected graph -% \arredondadotrue % objectos com molduras circulares \fi} \def\enddc{\endpicture} +\def\drawarrowhead <#1> [#2,#3]{% + \!ifnextchar<{\!drawarrowhead{#1}{#2}{#3}}{\!drawarrowhead{#1}{#2}{#3}<\!zpt,\!zpt> }} -%% Public macro: "mor" +% Xingliang Liang <jkl9543@gmail.com> +% ** \!ljoin (XCOORD,YCOORD) +% ** Draws a straight line starting at the last point specified +% ** by the most recent \!start, \!ljoin, or \!qjoin, and +% ** ending at (XCOORD,YCOORD). +\def\!ljoindummy (#1,#2){% + \advance\!intervalno by 1 + \!xE=\!M{#1}\!xunit \!yE=\!M{#2}\!yunit + \!rotateaboutpivot\!xE\!yE + \!xdiff=\!xE \advance \!xdiff by -\!xS%** xdiff = xE - xS + \!ydiff=\!yE \advance \!ydiff by -\!yS%** ydiff = yE - yS + \!Pythag\!xdiff\!ydiff\!arclength% ** arclength = sqrt(xdiff**2+ydiff**2) + \global\advance \totalarclength by \!arclength% + %\!drawlinearsegment% ** set by dashpat to \!linearsolid or \!lineardashed + \!xS=\!xE \!yS=\!yE% ** shift ending points to starting points + \ignorespaces} + +%% +%% \!drawarrowhead{4pt}{DimC}{DimD} <xshift,yshift> from {\xa} {\ya} to {\xb} {\yb} %% +\def\!drawarrowhead#1#2#3<#4,#5> from #6 #7 to #8 #9 {% +% +% ** convert to dimensions + \!xloc=\!M{#8}\!xunit + \!yloc=\!M{#9}\!yunit + \!dxpos=\!xloc \!dimenA=\!M{#6}\!xunit \advance \!dxpos -\!dimenA + \!dypos=\!yloc \!dimenA=\!M{#7}\!yunit \advance \!dypos -\!dimenA + \let\!MAH=\!M% ** save current c/d mode + \!setdimenmode% ** go into dimension mode +% + \!xshift=#4\relax \!yshift=#5\relax% ** pick up shift + \!reverserotateonly\!xshift\!yshift% ** back rotate shift + \advance\!xshift\!xloc \advance\!yshift\!yloc +% +% ** draw shaft of arrow + \!xS=-\!dxpos \advance\!xS\!xshift + \!yS=-\!dypos \advance\!yS\!yshift + \!start (\!xS,\!yS) + \!ljoindummy (\!xshift,\!yshift) +% +% ** find 32*cosine and 32*sine of angle of rotation + \!Pythag\!dxpos\!dypos\!arclength + \!divide\!dxpos\!arclength\!dxpos + \!dxpos=32\!dxpos \!removept\!dxpos\!!cos + \!divide\!dypos\!arclength\!dypos + \!dypos=32\!dypos \!removept\!dypos\!!sin +% +% ** construct arrowhead + \!halfhead{#1}{#2}{#3}% ** draw half of arrow head + \!halfhead{#1}{-#2}{-#3}% ** draw other half +% + \let\!M=\!MAH% ** restore old c/d mode + \ignorespaces} + +%% Public macro: "mor" %% %% Funtion to built the "arrow" between two points %% @@ -874,38 +916,37 @@ \advance \deuc by \auxb% \!raiz{\deuc}{\deuc}% %% -%% the point (xa,ya) is at a distance #5 (default value 10) from the +%% the point (xa,ya) is at a distance #5 (default value 100) 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 +%% given the fact that we have two points (start,end) we need to +%% recover their value searching the stack \auxa=#5 \!compara{\objNulo}{\objPartida}% - \ifdiferentes% S{\'o} vai fazer o ajuste quando {\'e} necess{\'a}rio + \ifdiferentes% adjusting only when needed \!ajusta{\xO}{\xl}{\yO}{\yl}{\auxa}{\objPartida}% \ajustatrue - \def\objPartida{}% re-inicializar o valor do Objecto de Partida + \def\objPartida{}% reset the value of the starting object \fi -%% vai guardar o valor de auxa (ap{\'o}s ajuste) para ser usado no caso -%% dos morfismos de injec{\c c}{\~a}o. +%% save the value of aux (after adjustment) to be used in the case of +%% an injective morphism \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 has the value of the distance between the objects minus the +%% distance between the arrow and the objects (100 default value) \auxa=\deuc% %% -%% the point (xb,yb) is at a distance #6 (default value 10) from the +%% the point (xb,yb) is at a distance #6 (default value 100) from the %% point (xl,yl) %% \auxb=#6 \!compara{\objNulo}{\objChegada}% - \ifdiferentes% S{\'o} vai fazer o ajuste quando {\'e} necess{\'a}rio -% Vou ajustar + \ifdiferentes% adjusting only when needed +% adjustment \!ajusta{\xO}{\xl}{\yO}{\yl}{\auxb}{\objChegada}% - \def\objChegada{}% re-inicializar o valor do Objecto de Chegada + \def\objChegada{}% reset the value of the end object \fi \advance \auxa by -\auxb% \!ucoord{\number\xO}{\number\xl}{\number\xO}{\number\auxa}{\number\deuc}{\xb}{1}% @@ -930,48 +971,54 @@ \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 + \setdashes <2pt> + \plot {\xa} {\ya} {\xb} {\yb} / + \setsolid% + \drawarrowhead <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} +\or % 2=dotted arrow (Xingliang Liang <jkl9543@gmail.com> - 4.4.0) + \setdots <2pt> + \plot {\xa} {\ya} {\xb} {\yb} / + \setsolid% + \drawarrowhead <4pt> [.2,1.1] from {\xa} {\ya} to {\xb} {\yb} +\or % 3=solid line \setlinear \plot {\xa} {\ya} {\xb} {\yb} / -\or % 3=dashed line - \setdashes +\or % 4=dashed line + \setdashes <2pt> \setlinear \plot {\xa} {\ya} {\xb} {\yb} / \setsolid -\or % 4=dotted line - \setdots +\or % 5=dotted line + \setdots <2pt> \setlinear \plot {\xa} {\ya} {\xb} {\yb} / \setsolid -\or % 5=injective arrow -%% C{\'a}lculos auxiliares +\or % 6=injective arrow %% -%% 3 units, the radius for the tail of the arrow +%% 30 units, the radius for the tail of the arrow %% -%% repor o valor de auxa +%% recover the value of auxa \auxa=\guardaauxa -%% dar a compensa{\c c}{\~a}o para o "rabo" - \advance \auxa by 3% +%% makes an adjustment to cope with the tail of the arrow, giving +%% space to the semi-circle + \advance \auxa by 30% %% %% 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 +%% find the point (xd,yd), the center of a 2pt (20*0.1) 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}% + \!ucoord{\number\yO}{\number\yl}{\number\xa}{20}{\number\deuc}{\xd}{-1}% + \!ucoord{\number\xO}{\number\xl}{\number\ya}{20}{\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 +\or % 7=maps "arrow" ("|-->") + \auxa=20 % %% %% Note: the values of xmed and ymed will be modified %% @@ -986,23 +1033,23 @@ %% and its "tail" \setlinear \plot {\xmed} {\ymed} {\xd} {\yd} / -\or % 7=surjective arrow ("-->>") +\or % 8=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 +\or % 9=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 +%% horizontal or vertical 1pt (10*0.1) is enough, if not 1.1pt (11*0.1) +\auxa=11 \ifnum\number\yO=\number\yl -\auxa=1 +\auxa=10 \fi \ifnum\number\xO=\number\xl -\auxa=1 +\auxa=10 \fi %% the two parallel lines will be given by (xmed,ymed)(xd,yd), and %% (xe,ye)(xf,yf) @@ -1018,17 +1065,17 @@ \setlinear \plot {\xmed} {\ymed} {\xe} {\ye} / \plot {\xd} {\yd} {\xf} {\yf} / -\or % 9=double arrow -%% +\or % 10=double arrow +%% %% sets the separation (distance) between the two parallel lines, if -%% horizontal or vertical 2pt is enough, if not 3pt. The extra space +%% horizontal or vertical 2pt is enough, if not 2.5pt. The extra space %% is needed because of the arrow tip. -\auxa=3 +\auxa=25 \ifnum\number\yO=\number\yl -\auxa=2 +\auxa=20 \fi \ifnum\number\xO=\number\xl -\auxa=2 +\auxa=20 \fi %% the two parallel lines will be given by (xmed,ymed)(xd,yd), and %% (xe,ye)(xf,yf) @@ -1046,14 +1093,14 @@ \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 +%% horizontal or vertical 2pt is enough, if not 2.5pt. The extra space %% is needed because of the arrow tip. -\auxa=3 +\auxa=22 \ifnum\number\yO=\number\yl -\auxa=2 +\auxa=20 \fi \ifnum\number\xO=\number\xl -\auxa=2 +\auxa=20 \fi %% the two parallel lines will be given by (xmed,ymed)(xd,yd), and %% (xe,ye)(xf,yf) @@ -1074,11 +1121,11 @@ %% \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. +%% If the arrows are horizontal or verticals the box is built centered +%% in the object center. If the arrows are oblique the box is built in +%% such a way to avoid the arrow label, having in account the +%% quadrante and the relative position of the arrow and the +%% corresponding label \auxa=\xl \advance \auxa by -\xO% \ifnum \auxa=0 @@ -1122,13 +1169,12 @@ } %% -%% Comando para construir a "seta" curvilinea entre dois objectos +%% Curved arrow command %% -%% \cmor(<lista de pontos (n. impar)>){<etiqueta>} +%% \cmor(<list of points (n. odd)>){<label>} %% -%% 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 +%% The plot must be changed in such a way that its syntax is coherent +%% with the other commands %% \def\modifplot(#1{\!modifqcurve #1} \def\!modifqcurve(#1,#2){\xO=#1% @@ -1145,15 +1191,14 @@ \multiply \yO by \expansao% \multiply \xl by \expansao% \multiply \yl by \expansao% - \!qjoin (\xO,\yO) (\xl,\yl) % \!qjoin is defined in QUADRATIC + \!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 +%% The command to draw the arrow tip receives the list of points, get +%% from it the last pair of points and depending of the user choice +%% the arrow tip is drawn. %% \def\setaxy(#1{\!pontosxy #1} \def\!pontosxy(#1,#2){% @@ -1176,37 +1221,37 @@ %% -%% Temos agora a defini{\c c}{\~a}o do comando "cmor" +%% The definition of the command "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 + \ifcase #2% "\pup" (pointing up) + \auxa=0% x do not change + \auxb=1% y "up" + \or% \pdown" (pointing down) + \auxa=0% x do not change + \auxb=-1% y "down" + \or% "\pright" (pointing right) + \auxa=1% x "right" + \auxb=0% y do not change + \or% "\pleft" (pointing left) + \auxa=-1% x "left" + \auxb=0% y do not change + \fi % the line + \ifcase #6 % arrow solid + \modifplot#1% draw the line + % and the arrow tip \setaxy#1 - \or % arco (com seta) a tracejado + \or % arrow (with tip) dashed \setdashes - \modifplot#1% Desenhar o arco + \modifplot#1% draw the line \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 + \or % arrow (without tip) + \modifplot#1% draw the line + \fi % injection morphism +%% label \xO=#3% \yO=#4% \multiply \xO by \expansao% @@ -1214,8 +1259,8 @@ \put {#5} at {\xO} {\yO}} %% -%% Comando para construir os Objectos -%% \obj(x,y){<texto>}[<etiqueta>] +%% Command to build the objects +%% \obj(x,y){<text>}[<label>] %% \def\obj(#1,#2){% \!ifnextchar[{\!obja{#1}{#2}}{\!obja{#1}{#2}[Nulo]}} @@ -1224,7 +1269,7 @@ \def\!objb#1#2#3#4[#5]{% \xO=#1% \yO=#2% - \def\!pinta{\normalsize$\bullet$}% para definir o tamanho normal das pintas + \def\!pinta{\normalsize$\bullet$}% sets the normal size of the bullet \def\!nulo{Nulo}% \def\!arg{#3}% \!compara{\!arg}{\!nulo}% @@ -1233,22 +1278,16 @@ \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 + \auxa=\wd\caixa \divide \auxa by 13107%2 + \advance \auxa by 50 \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 + \divide \auxb by 13107%2 + \advance \auxb by 50 + \ifcase \tipografo % commutative diagrams \put{#4} at {\xO} {\yO} - \or % grafos dirigidos - \ifcase #5 % c=0 + \or % directed graphs + \ifcase #5 % c=0, placement of the object (c=center) \put{#4} at {\xO} {\yO} \or % n=1 \put{\!pinta} at {\xO} {\yO} @@ -1278,8 +1317,8 @@ \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 \auxa by -20 % adjusting to the radius of the circle + \advance \auxb by -20 % with center in (x,y) \advance \xO by -\number\auxa % width+5 \advance \yO by -\number\auxb % height+depth+5 \put{#4} at {\xO} {\yO} @@ -1289,13 +1328,13 @@ \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 \auxa by -20 % adjusting to the radius of the circle + \advance \auxb by -20 % with center in (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 + \or % undirect graphs \ifcase #5 % c=0 \put{#4} at {\xO} {\yO} \or % n=1 @@ -1304,8 +1343,8 @@ \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 \auxa by -20 % adjusting to the radius of the circle + \advance \auxb by -20 % with center in (x,y) \advance \xO by \number\auxa % width+5 \advance \yO by \number\auxb % height+depth+5 \put{#4} at {\xO} {\yO} @@ -1315,8 +1354,8 @@ \put{#4} at {\xO} {\yO} \or % se=4 \put{\!pinta} at {\xO} {\yO} - \advance \auxa by -2 % ver acima - \advance \auxb by -2 + \advance \auxa by -20 % see above + \advance \auxb by -20 \advance \xO by \number\auxa % width+5 \advance \yO by -\number\auxb % height+depth+5 \put{#4} at {\xO} {\yO} @@ -1326,8 +1365,8 @@ \put{#4} at {\xO} {\yO} \or % sw=6 \put{\!pinta} at {\xO} {\yO} - \advance \auxa by -2 % ver acima - \advance \auxb by -2 + \advance \auxa by -20 % see above + \advance \auxb by -20 \advance \xO by -\number\auxa % width+5 \advance \yO by -\number\auxb % height+depth+5 \put{#4} at {\xO} {\yO} @@ -1337,38 +1376,33 @@ \put{#4} at {\xO} {\yO} \or % nw=8 \put{\!pinta} at {\xO} {\yO} - \advance \auxa by -2 % ver acima - \advance \auxb by -2 + \advance \auxa by -20 % see above + \advance \auxb by -20 \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 + \else % graphs with circular frames + \ifnum\auxa<\auxb % set aux to be the greatest dimension \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 +% if the length of the box is less then 1em, the size of the circle is +% adjust in order not to be less then 10pt \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} + \dimen99 = 10pt + \aux=\dimen99 + \divide \aux by 13107 + \advance \aux by 50 + \fi + \advance\aux by -20 + \xl=\xO + \advance\xl by \aux + \ifnum\aux<120 % gives (more or less) three digits + \circulararc 360 degrees from {\xl} {\yO} center at {\xO} {\yO} \else - \multiply\auxa by 2 - \multiply\auxb by 2 - \put{\oval(\auxa,\auxb)} [Bl] at {\xO} {\yO} + \ellipticalarc axes ratio {\auxa}:{\auxb} 360 degrees from {\xl} {\yO} center at {\xO} {\yO} \fi \put{#4} at {\xO} {\yO} \fi diff --git a/Master/texmf-dist/tex/generic/dcpic/europroc.cls b/Master/texmf-dist/tex/generic/dcpic/europroc.cls new file mode 100644 index 00000000000..9a17e0a23e7 --- /dev/null +++ b/Master/texmf-dist/tex/generic/dcpic/europroc.cls @@ -0,0 +1,332 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% LaTeX classfile for EuroTeX 2001 proceedings +% +% Copyright 2001 NTG / MAPS +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% provide for pdftex + +\newif\ifpdf +\ifx \pdfoutput \undefined + \pdffalse +\else + \ifnum \pdfoutput=1 + \pdftrue + \pdfhorigin=1in + \pdfvorigin=1in + \else + \pdffalse + \fi +\fi +\paperwidth=21cm +\paperheight=29.7cm +\ifpdf + \pdfpagewidth=21cm + \pdfpageheight=29.7cm +\fi + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% option processing and class loading + +\let\pagetopbot\null +\def\paget@pb@t{% + \smash{\rlap{% + \rule[-3cm]{\paperwidth}{.4pt}}}% + \smash{\rlap{% + \rule[23.5cm]{\paperwidth}{.4pt}}}% +} +\DeclareOption{pagebounds}{\AtBeginDocument{\let\pagetopbot=\paget@pb@t}} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} +\ProcessOptions\relax +\LoadClass[twoside,a4paper,10pt]{article} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% general typography + +\parindent=1em + +% dropcaps +\newdimen\dropht +\newdimen\dropwd +\newcount\dropct +\newcount\dropctm +\long\def\initial#1#2{% + \dropct=#1 + \dropctm=#1\advance\dropctm-1% + \dropht=\dropctm\baselineskip + \advance\dropht1ex + \advance\dropht1pt + \sbox\@tempboxa{\resizebox{!}{\dropht}{#2}}% + \hangindent=\wd\@tempboxa + \advance\hangindent2pt + \hangafter=-\dropct + \noindent + \llap{\vbox{\null\vskip\dropct\baselineskip + \box\@tempboxa\vskip-\dropct\baselineskip\null + }}% +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% logos + +\def\logo#1{\mbox{\textsc{#1}}} +\def\eurotex{\logo{eurotex}} +\let\Eurotex\eurotex +\let\EuroTex\eurotex +\let\EuroTeX\eurotex +\let\euroTeX\eurotex +\let\euroTex\eurotex +\def\LaTeX{\logo{latex}} +\def\LaTeXe{\logo{latex}2$\epsilon$} +\def\Context{\logo{context}} +\let\ConTeXt\Context +\let\conTeXt\Context +\let\context\Context + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% page layout + +% copied/adapted from size10.clo +\newdimen\le@ding\le@ding=12pt +\topmargin=.5in +\headheight=\le@ding +\headsep=26pt +\topskip=10pt +\textheight=44\baselineskip +\advance\textheight\topskip +\textwidth=31pc +\oddsidemargin=.5\paperwidth +\advance\oddsidemargin-.5\textwidth +\advance\oddsidemargin-1in +\let\evensidemargin\oddsidemargin + +\raggedbottom + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% page styles + +% \pagetopbot defined at start of file +\def\ps@empty{% + \let\@oddhead\@empty\let\@evenhead\@empty + \def\@oddfoot{% + \null\hskip-\oddsidemargin + \null\hskip-1in + \pagetopbot\hfil\null}% + \def\@evenfoot{% + \null\hskip-\evensidemargin + \null\hskip-1in + \pagetopbot\hfil\null}% +} +\let\ps@plain\ps@empty +\def\ps@headings{% + \let\@mkboth\@gobbletwo + \def\@oddhead{% + \reset@font\hfil{\scshape\rightmark}\hfil\llap{\thepage}}% + \def\@evenhead{% + \reset@font\rlap{\thepage}\hfil{\scshape\leftmark}\hfil}% + \def\@oddfoot{% + \null\hskip-\oddsidemargin + \null\hskip-1in + \pagetopbot\hfil\null}% + \def\@evenfoot{% + \null\hskip-\evensidemargin + \null\hskip-1in + \pagetopbot\hfil\null}% +% \let\@evenfoot\@empty\let\@oddfoot\@empty +} +\pagestyle{headings} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% maketitle + +\renewcommand\date[1]{\relax} +\renewcommand\author[2][\@empty]{% + \gdef\@author{#2}\xdef\r@nauthor{\lowercase{#1}}% + \ifx\r@nauthor \@empty + \xdef \r@nauthor{\lowercase{#2}}% + \fi +} +\renewcommand\title[2][\@empty]{% + \gdef\@title{#2}\xdef\r@ntitle{\lowercase{#1}}% + \ifx\r@ntitle \@empty + \xdef \r@ntitle{\lowercase{#2}}% + \fi +} +\def\titleornament{% + \fontfamily{cmr}\fontencoding{OMS}\itshape + \char125\quad \char125\quad \char125% +} +%\def\titleornament{% +% \fontfamily{pzd}\fontencoding{U}\small\selectfont F F F% +%} +\def\@maketitle{% + \newpage + \markboth{\lowercase{\r@nauthor}}{\lowercase{\@title}}% + \null + \reset@font + \vskip\baselineskip + \begin{center} + \reset@font + \vskip.7\baselineskip + {\titleornament\par} + \vskip1.3\baselineskip + \let\footnote\thanks + {\LARGE \itshape \@title \par}% + \vskip.5\baselineskip + {\scshape \@author} + \end{center} + \vskip2\baselineskip +} +\renewenvironment{abstract}{% + \begin{center} + \rightskip=1em plus 1fil + \leftskip=\rightskip\small + {\scshape abstract.} +}{\par\end{center}} +\newcommand\keywords[1]{{% + \rightskip=\parindent\leftskip=\parindent\small + \begin{center} + {\scshape keywords:} #1 + \end{center}}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% sectioning + +\setcounter{secnumdepth}{-10} + +% parameters \@startsection: +% 1 name, 2 level, 3 indent, 4 beforeskip, 5 afterskip, 6 style +% beforeskip <0 -> no indent after +% afterskip <0 -> run-in head +\renewcommand{\section}{% + \@startsection{section}{1}{\z@}% + {-2.0\le@ding}{.5\le@ding}{\normalsize\sc\centering}% +} +\renewcommand{\subsection}{% + \@startsection{subsection}{2}{\z@}% + {-.8\le@ding}{1sp}{\large\itshape}% +} +\renewcommand{\subsubsection}{% + \@startsection{subsubsection}{3}{\z@}% + {-.4\le@ding}{-.5em}{\scshape}% +} +\def\appendixname{appendix} + +\def\midornament{% + \begin{center} + \vskip.5\le@ding + \rule{10pc}{.4pt}\\[-10pt] + \rule{6pc}{.2pt}\par + \vskip.5\le@ding + \end{center}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% enumerate/itemize/description + +\leftmargini=1.5em +\leftmarginii=1.25em +\leftmarginiii=1em +\def\enumerate{% + \ifnum \@enumdepth >\thr@@\@toodeep\else + \advance\@enumdepth\@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \expandafter + \list + \csname label\@enumctr\endcsname + {\usecounter\@enumctr\def\makelabel##1{\rlap{##1}}}% + \fi} +\let\endenumerate =\endlist +\def\itemize{% + \ifnum \@itemdepth >\thr@@\@toodeep\else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter + \list + \csname\@itemitem\endcsname + {\def\makelabel##1{\rlap{##1}}}% + \fi} +\def\@listi{\leftmargin\leftmargini + \labelwidth0pt\labelsep\leftmargin + \parsep 0pt + \topsep 3\p@ + \itemsep3\p@} +\let\@listI\@listi +\@listi +\def\@listii {\leftmargin\leftmarginii + \labelwidth0pt\labelsep\leftmargin + \topsep 3\p@ + \parsep 0\p@ + \itemsep \parsep} +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth0pt\labelsep\leftmargin + \topsep 2\p@ + \parsep \z@ + \partopsep \p@ + \itemsep \topsep} + +%\renewcommand\labelitemi{% +% {\fontfamily{pzd}\fontencoding{U}\selectfont\char226}% +%} +\renewcommand\labelitemi{% + {\fontfamily{cmr}\fontencoding{OMS}\itshape\char5}% +} +\renewcommand\labelenumii{{\itshape\theenumii})} +\renewcommand*\descriptionlabel[1]{% + \hspace\labelsep\normalfont\itshape #1% +} + +\renewenvironment{quotation} + {\list{}{\rightmargin \leftmargin + \listparindent1.5em + \parsep \z@ \@plus\p@}% + \item\relax} + {\endlist} +\renewenvironment{quote} + {\list{}{\rightmargin\leftmargin}% + \item\relax} + {\endlist} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% footnotes + +\let\footnoterule\relax + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% tabulars + +\arrayrulewidth.2pt + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% floats and captions + +\renewenvironment{figure} + {\@float{figure}\begin{center}\footnotesize} + {\par\end{center}\end@float} +\renewenvironment{figure*} + {\@dblfloat{figure}\begin{center}\footnotesize} + {\par\end{center}\end@dblfloat} +\renewenvironment{table} + {\@float{table}\begin{center}\footnotesize} + {\par\end{center}\end@float} +\renewenvironment{table*} + {\@dblfloat{table}\begin{center}\footnotesize} + {\par\end{center}\end@dblfloat} +\def\mystrut{\rule[-.3\baselineskip]{0pt}{\baselineskip}} +\long\def\@makecaption#1#2{% + \vskip\abovecaptionskip\footnotesize + \sbox\@tempboxa{\mystrut\scshape #1: #2}% + \ifdim \wd\@tempboxa >\hsize + \mystrut\scshape #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip} +\renewcommand\figurename{figure} +\renewcommand\tablename{table} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% bibliography + +\def\refname{references} diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index 37f61d0b549..e19bc87b1ef 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -27,7 +27,7 @@ sub main { # special packages from latex-tds project; used by prepare() $amslatex_tds_pkgs = "amscls|amsmath|amsrefs"; # from amslatex.tds $latex_tds_pkgs = $amslatex_tds_pkgs; - $latex_tds_pkgs .= "|babel|cyrillic|graphics|latex|psnfss|tools"; # latex + $latex_tds_pkgs .= "|cyrillic|graphics|latex|psnfss|tools"; # latex $latex_tds_pkgs .= "|latex-tds|amsfonts|knuth"; # other $latex_tds_dir = "$CTAN/macros/latex/contrib/latex-tds"; # (amstex handled from the original.) diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index df3c4d36e00..40c5377a45f 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -305,6 +305,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'dfgproposal', "die 'skipping, replaced by proposal'", 'diagmac', "die 'skipping, for latex 2.09 and we have diagmac2'", 'diagnose', "&MAKEflatten", + 'diagrams', "die 'skipping, use specific package name'", 'diagxy', "die 'skipping, use barr'", 'dictsym', "&MAKEunzipandflatten", 'disser', "&MAKEdisser", @@ -982,6 +983,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'translator', "die 'skipping, now part of beamer'", # 'tree-dvips', "die 'skipping, noinfo license, latex 2.09'", 'treesvr', "die 'skipping, await request, 1995'", + 'turkish', "die 'skipping, await request, 1989'", 'turkishintro',"die 'skipping, nosource'", 'turnstile', "&MAKEflatten", 'turnthepage', "&MAKEflatten", @@ -2480,7 +2482,6 @@ $standardclean = '\.head|\.tmp|\.dvi|\.log|\.out|\.aux|\.toc|\.lof|\.lot' 'bbcard' => 'bbcard.tpm', # old TL infra 'chessboard' => 'chessboard.pdf', # no source 'chessfss' => 'chessfonts_gallery.pdf|chessfss.pdf', # no source - 'dcpic' => '.*\.pdf', # no source 'dfgproposal' => '1_02.*\.pdf', # nonfree specs 'din1505' => '(leitbild3|normpatsoft).pdf', # no source 'ecclesiastic' => 'ecclesiastic-sample.pdf', # no source |