summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/dcpic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-02 21:47:19 +0000
committerKarl Berry <karl@freefriends.org>2013-05-02 21:47:19 +0000
commitec14d89f021dfd980cdfa7d093dff1030c8abc1f (patch)
tree19af02b6b0c13ceb30a7bf286b80cc153816c6d8 /Master/texmf-dist/tex/generic/dcpic
parent7c33bd298b907ca27ef2ffb207f127054fa08e71 (diff)
dcpic (2may13)
git-svn-id: svn://tug.org/texlive/trunk@30206 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/dcpic')
-rw-r--r--Master/texmf-dist/tex/generic/dcpic/dcpic.sty818
-rw-r--r--Master/texmf-dist/tex/generic/dcpic/europroc.cls332
2 files changed, 758 insertions, 392 deletions
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}