summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/barr
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-09-27 21:27:13 +0000
committerKarl Berry <karl@freefriends.org>2015-09-27 21:27:13 +0000
commitc66cf7e6ffaf1b7a6db25c8828d69b4b9a8577fb (patch)
treeb171fd3f53b4d628efbe00e639e559168ff0e366 /Master/texmf-dist/doc/generic/barr
parent54b0136e19f5dcf13f1972fb375e0c1c17bdbe40 (diff)
barr (diagxy) (27sep15)
git-svn-id: svn://tug.org/texlive/trunk@38479 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/barr')
-rw-r--r--Master/texmf-dist/doc/generic/barr/README8
-rw-r--r--Master/texmf-dist/doc/generic/barr/diaxydoc.pdfbin311807 -> 398133 bytes
-rw-r--r--Master/texmf-dist/doc/generic/barr/diaxydoc.tex283
3 files changed, 288 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/generic/barr/README b/Master/texmf-dist/doc/generic/barr/README
new file mode 100644
index 00000000000..b9e97959136
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/barr/README
@@ -0,0 +1,8 @@
+This is a set of macros that are a front end to xy-pic that make it
+(relatively) easy to use it to set the kind of diagrams that are
+especially interesting to category theorists. There are two modes of
+macros: the first kind uses shapes such as squares and various triangles
+that fit together like Lego blocks; the second sets the nodes on an
+xy-grid and labels them and then sets arrows between the nodes. All the
+arrow types of xy are allowed in either mode. For the latest upgrade
+(if any) look at http://www.math.mcgill.ca/barr/papers/.
diff --git a/Master/texmf-dist/doc/generic/barr/diaxydoc.pdf b/Master/texmf-dist/doc/generic/barr/diaxydoc.pdf
index 73b67127c46..4552b61b667 100644
--- a/Master/texmf-dist/doc/generic/barr/diaxydoc.pdf
+++ b/Master/texmf-dist/doc/generic/barr/diaxydoc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/barr/diaxydoc.tex b/Master/texmf-dist/doc/generic/barr/diaxydoc.tex
index 9574ef2ea31..fdd013ba21f 100644
--- a/Master/texmf-dist/doc/generic/barr/diaxydoc.tex
+++ b/Master/texmf-dist/doc/generic/barr/diaxydoc.tex
@@ -1,4 +1,5 @@
\documentclass[12pt]{article}
+\usepackage[ocgcolorlinks=true,allcolors=blue]{hyperref}
\input diagxy
\textwidth 6in
\oddsidemargin 0pt
@@ -6,9 +7,9 @@
\begin{document}
\def\xypic{\hbox{\rm\Xy-pic}}
-\title{A new diagram package (Version \thedate)}
+\title{A new diagram package (Version 2015-09-26)}
\author{Michael Barr\\Dept of Math and Stats, McGill University
-\\barr@barrs.org}
+\\barr@math.mcgill.ca}
\date{}
\maketitle
\tableofcontents
@@ -67,6 +68,16 @@ are only for the purpose of putting a right, resp. left, arrow to the
right of or under \verb+\lim+. They will go under in a display or if
you follow \verb+\lim+ by \verb+\limits+.
+Note (2015-09-27) The details of handling \verb.\node. and \verb.\arrow.
+have been changed so that \verb.\node. lays down ink by itself and
+\verb.\arrow. no longer adds the nodes. There are two reasons for this
+change. Someone wrote me complaining that when a node was put in twice
+the regisration was not perfect. I could not see it, but I made the
+change and it satisfied him. Much more importantly, it allows a node to
+appear that has no arrow to or from it. This makes it possible to work
+well with the \verb.\uncover. macro in beamer (see ``Use with beamer''
+below).
+
\section{Why another diagram package?}
This started when a user of my old package, diagram, wrote to ask me if
@@ -627,7 +638,8 @@ that places that object anywhere. I have changed the name from
\index{\backslash put}\verb.\put.. The syntax is
\verb.\place(x,y)[object]. that places the object at \verb.(x,y)..
There is also an optional parameter that can be used to add any of
-\xypic's positioning parameters. For example
+\xypic's positioning parameters: L, R, D, U, CL, CR, CD, CU, C, LD, RD,
+LU, RU. For example
\verb.\place[L](x,y)[object]. will left align the object. The default
is to center align it.
Here is an example that uses a construction that is undocumented here,
@@ -824,6 +836,39 @@ string.
An example of a large diagram done this way appears in~
+\subsubsection{Use with beamer}
+ The way to get a diagram gradually grow within a slide is illustrated
+with the following code. Unfortunately, it cannot be displayed here for
+the document class has to be beamer, but you can see what is going on by
+compiling:
+
+\begin{verbatim}
+\documentclass{beamer}
+\pdfoutput1
+\input diagxy
+\begin{document}
+
+\begin{frame}
+ $$\bfig
+ \node 1(0,500)[A]
+ \node 2(500,500)[B]
+ \node 3(0,0)[C]
+ \node 4(500,0)[D]
+ \uncover<2,4>{\arrow[1`2;]}%
+ \uncover<3->{\arrow[1`3;]}%
+ \uncover<4>{\arrow[2`4;]}%
+ \uncover<5>{\arrow[3`4;]}%
+ \efig$$
+
+\end{frame}
+\end{document}
+\end{verbatim}
+Note that the \% at the end of the uncover lines are needed. I do not
+have any explanation, but the arrows get offset without them. This is
+odd because, generally speaking, extra spaces and even blank lines get
+ignored inside math displays.
+
+
\subsection{Complex diagrams}\label{complex}
In homological algebra one often has a $3\times3$ diagram, with or
without 0's on the margins. There is a macro to do that:
@@ -1288,6 +1333,236 @@ it comes down to a matter of preference.
\def\Lab[#1]{{\backslash\hbox{\texttt#1}}}
+\subsection{A few samples.}
+ These come from a paper that is being converted from MS-Word and are
+very complicated. The first shows two ways of doing the same thing.
+Notable are the use of Bezier curves as well as curved arrows. I now
+feel that the use of the node/arrow feature may be better, for complex
+diagrams, than the use of set shapes. Here is the same diagram set in
+each way. Compare the codes. (This is from a real paper,
+incidentally.)
+
+ $$\bfig
+ \def\f{\bar f}
+ \def\g{\bar g}
+ \def\h{\bar h}
+ \let\t\tau
+ \square(0,2400)/>`<-`<-`/<1200,400>[(\h(\g\f))\t_A`((\h\g)\f)\t_A`
+\h((\g\f)\t_A)`(\h\g(\f\t_A));```]
+ \morphism(0,2400)<600,0>[\h((\g\f)\t_A)`\h(\g(\f\t_A));]
+ \square(600,2000)/>`<-`<-`>/<600,400>[\h(\g(\f\t_A))`(\h\g(\f\t_A))
+`\h(\g(\t_Bf))`(\h\g)(\t_Bf);`\h(\g\t_f)`(\h\g)\t_f`]
+ \morphism(1200,2000)<600,0>[(\h\g)(\t_Bf)`((\h\g)\t_B)f;]
+ \square(600,1600)/`>`<-`>/<1200,400>[\h(\g(\t_Bf))`((\h\g)\t_B)f`
+\h((\g\t_B)f)`(\h(\g\t_B))f;```]
+\square(600,1200)|xllx|/>`<-`<-`>/<1200,400>[\h((\g\t_B)f)`
+(\h(\g\t_B))f`\h((\t_Cg)f)`(\h(\t_Cg))f;`\h(\t_gf)`(\h\t_g)f`]
+ \square(600,800)/>`<-`<-`/<1200,400>[\h((\t_Cg)f)`(\h(\t_Cg))f`
+\h(\t_C(gf))`\h(\t_C(gf));```]
+ \morphism(600,800)<600,0>[\h(\t_C(gf))`(\h\t_C)(gf);]
+ \morphism(1200,800)<600,0>[(\h\t_C)(gf)`\h(\t_C(gf));]
+ \square(1200,400)/>`<-`<-`>/<600,400>[(\h\t_C)(gf)`\h(\t_C(gf))`
+(\t_Dh)(gf)`((\t_Dh)g)f;`\t_h(gf)`(\t_hg)f`]
+ \morphism(1800,400)/<-/<600,0>[((\t_Dh)g)f`\t_D(hg)f;]
+ \square(1200,0)/`<-`<-`<-/<1200,400>[(\t_Dh)(gf)`\t_D(hg)f`
+\t_D(h(gf))`\t_D((hg)f);```]
+ \morphism(2400,400)/{@{>}@/^-15pt/}/<-600,1600>[\t_D(hg)f`
+((\h\g)\t_B)f;\t_{hg}f]
+ \morphism(600,800)|l|/{@{>}@/^15pt/}/<-600,1600>[\h(\t_C(gf))`
+\h((\g\f)\t_A);\h(\t_{gf})]
+ \morphism(1200,0)/{@{>}@`{c,(-300,0),(-600,2400),p}}/<-1200,2800>[
+\t_D(h(gf))`(\h(\g\f))\t_A;\t_h(gf)]
+ \morphism(2400,0)|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/<-1200,2800>[
+\t_D((hg)f)`((\h\g)\f)\tau_A;\t_{(hg)f}]
+ \efig$$
+
+$$\bfig
+ \def\f{\bar f}
+ \def\g{\bar g}
+ \def\h{\bar h}
+ \let\t\tau
+ \node 11(0,2800)[(\h(\g\f))\t_A]
+ \node 13(1200,2800)[((\h\g)\f)\t_A]
+ \node 21(0,2400)[\h((\g\f)\t_A)]
+ \node 22(600,2400)[\h(\g\f\t_A)]
+ \node 23(1200,2400)[(\h\g(\f\t_A))]
+ \node 32(600,2000)[\h(\g(\t_Bf))]
+ \node 33(1200,2000)[(\h\g)(\t_Bf)]
+ \node 34(1800,2000)[((\h\g)\t_B)f]
+ \node 42(600,1600)[\h((\g\t_B)f)]
+ \node 44(1800,1600)[(\h(\g\t_B))f]
+ \node 52(600,1200)[\h((\t_C)g)f]
+ \node 54(1800,1200)[(\h(\t_Cg))f]
+ \node 62(600,800)[\h(\t_C(gf))]
+ \node 63(1200,800)[(\h\t_C)(gf)]
+ \node 64(1800,800)[\h(\t_C(gf))]
+ \node 73(1200,400)[(\t_Dh)(gf)]
+ \node 74(1800,400)[((\t_D)h)g]
+ \node 75(2400,400)[(\t_D(hg))f]
+ \node 83(1200,0)[\t_D(h(gf))]
+ \node 85(2400,0)[\t_D((hg)f)]
+ \arrow[11`13;]
+ \arrow[21`11;]
+ \arrow[21`22;]
+ \arrow[22`23;]
+ \arrow[23`13;]
+ \arrow[32`22;\h(\g\t_f)]
+ \arrow[32`33;]
+ \arrow[33`23;(\h\g)\t_f]
+ \arrow[33`34;]
+ \arrow[42`44;]
+ \arrow[42`32;]
+ \arrow[44`34;]
+ \arrow[52`42;\h(\t_gf)]
+ \arrow[52`54;]
+ \arrow[54`44;(\h\t_g)f]
+ \arrow[62`52;]
+ \arrow[62`63;]
+ \arrow[63`64;]
+ \arrow[73`63;\t_h(gf)]
+ \arrow[73`74;]
+ \arrow[74`64;\t_{(hg)f}]
+ \arrow[74`75;]
+ \arrow[83`73;]
+ \arrow[83`85;]
+ \arrow[85`75;]
+ \arrow|r|/{@{>}@/_15pt/}/[75`34;\t_{hg}f]
+ \arrow|l|/{@{>}@/^15pt/}/[62`21;\h(\t_C(gf))]
+ \arrow|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/[85`13;\t_{hg}f]
+ \arrow|r|/{@{>}@`{c,(-300,0),(-600,2400),p}}/[83`11;\t_{h(fg)}]
+\efig$$
+
+Here are the codes:
+
+
+\begin{verbatim}
+
+
+ $$\bfig
+ \def\f{\bar f}
+ \def\g{\bar g}
+ \def\h{\bar h}
+ \let\t\tau
+ \square(0,2400)/>`<-`<-`/<1200,400>[(\h(\g\f))\t_A`((\h\g)\f)\t_A`
+\h((\g\f)\t_A)`(\h\g(\f\t_A));```]
+ \morphism(0,2400)<600,0>[\h((\g\f)\t_A)`\h(\g(\f\t_A));]
+ \square(600,2000)/>`<-`<-`>/<600,400>[\h(\g(\f\t_A))`(\h\g(\f\t_A))
+`\h(\g(\t_Bf))`(\h\g)(\t_Bf);`\h(\g\t_f)`(\h\g)\t_f`]
+ \morphism(1200,2000)<600,0>[(\h\g)(\t_Bf)`((\h\g)\t_B)f;]
+ \square(600,1600)/`>`<-`>/<1200,400>[\h(\g(\t_Bf))`((\h\g)\t_B)f`
+\h((\g\t_B)f)`(\h(\g\t_B))f;```]
+\square(600,1200)|xllx|/>`<-`<-`>/<1200,400>[\h((\g\t_B)f)`
+(\h(\g\t_B))f`\h((\t_Cg)f)`(\h(\t_Cg))f;`\h(\t_gf)`(\h\t_g)f`]
+ \square(600,800)/>`<-`<-`/<1200,400>[\h((\t_Cg)f)`(\h(\t_Cg))f`
+\h(\t_C(gf))`\h(\t_C(gf));```]
+ \morphism(600,800)<600,0>[\h(\t_C(gf))`(\h\t_C)(gf);]
+ \morphism(1200,800)<600,0>[(\h\t_C)(gf)`\h(\t_C(gf));]
+ \square(1200,400)/>`<-`<-`>/<600,400>[(\h\t_C)(gf)`\h(\t_C(gf))`
+(\t_Dh)(gf)`((\t_Dh)g)f;`\t_h(gf)`(\t_hg)f`]
+ \morphism(1800,400)/<-/<600,0>[((\t_Dh)g)f`\t_D(hg)f;]
+ \square(1200,0)/`<-`<-`<-/<1200,400>[(\t_Dh)(gf)`\t_D(hg)f`
+\t_D(h(gf))`\t_D((hg)f);```]
+ \morphism(2400,400)/{@{>}@/^-15pt/}/<-600,1600>[\t_D(hg)f`
+((\h\g)\t_B)f;\t_{hg}f]
+ \morphism(600,800)|l|/{@{>}@/^15pt/}/<-600,1600>[\h(\t_C(gf))`
+\h((\g\f)\t_A);\h(\t_{gf})]
+ \morphism(1200,0)/{@{>}@`{c,(-300,0),(-600,2400),p}}/<-1200,2800>[
+\t_D(h(gf))`(\h(\g\f))\t_A;\t_h(gf)]
+ \morphism(2400,0)|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/<-1200,2800>[
+\t_D((hg)f)`((\h\g)\f)\tau_A;\t_{(hg)f}]
+ \efig$$
+
+$$\bfig
+ \def\f{\bar f}
+ \def\g{\bar g}
+ \def\h{\bar h}
+ \let\t\tau
+ \node 11(0,2800)[(\h(\g\f))\t_A]
+ \node 13(1200,2800)[((\h\g)\f)\t_A]
+ \node 21(0,2400)[\h((\g\f)\t_A)]
+ \node 22(600,2400)[\h(\g\f\t_A)]
+ \node 23(1200,2400)[(\h\g(\f\t_A))]
+ \node 32(600,2000)[\h(\g(\t_Bf))]
+ \node 33(1200,2000)[(\h\g)(\t_Bf)]
+ \node 34(1800,2000)[((\h\g)\t_B)f]
+ \node 42(600,1600)[\h((\g\t_B)f)]
+ \node 44(1800,1600)[(\h(\g\t_B))f]
+ \node 52(600,1200)[\h((\t_C)g)f]
+ \node 54(1800,1200)[(\h(\t_Cg))f]
+ \node 62(600,800)[\h(\t_C(gf))]
+ \node 63(1200,800)[(\h\t_C)(gf)]
+ \node 64(1800,800)[\h(\t_C(gf))]
+ \node 73(1200,400)[(\t_Dh)(gf)]
+ \node 74(1800,400)[((\t_D)h)g]
+ \node 75(2400,400)[(\t_D(hg))f]
+ \node 83(1200,0)[\t_D(h(gf))]
+ \node 85(2400,0)[\t_D((hg)f)]
+ \arrow[11`13;]
+ \arrow[21`11;]
+ \arrow[21`22;]
+ \arrow[22`23;]
+ \arrow[23`13;]
+ \arrow[32`22;\h(\g\t_f)]
+ \arrow[32`33;]
+ \arrow[33`23;(\h\g)\t_f]
+ \arrow[33`34;]
+ \arrow[42`44;]
+ \arrow[42`32;]
+ \arrow[44`34;]
+ \arrow[52`42;\h(\t_gf)]
+ \arrow[52`54;]
+ \arrow[54`44;(\h\t_g)f]
+ \arrow[62`52;]
+ \arrow[62`63;]
+ \arrow[63`64;]
+ \arrow[73`63;\t_h(gf)]
+ \arrow[73`74;]
+ \arrow[74`64;\t_{(hg)f}]
+ \arrow[74`75;]
+ \arrow[83`73;]
+ \arrow[83`85;]
+ \arrow[85`75;]
+ \arrow|r|/{@{>}@/_15pt/}/[75`34;\t_{hg}f]
+ \arrow|l|/{@{>}@/^15pt/}/[62`21;\h(\t_C(gf))]
+ \arrow|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/[85`13;\t_{hg}f]
+ \arrow|r|/{@{>}@`{c,(-300,0),(-600,2400),p}}/[83`11;\t_{h(fg)}]
+\efig$$
+\end{verbatim}
+
+The following is a really ugly diagram that is really hard to make look
+good. Possibly all four diagonal arrows should be curved, with less
+curve but in opposite directions. Note the fact that double labels are
+permitted (though in this case, the second is \hole) and that - is a
+synonym for (.5) in the label positioning spec. This also features
+sliding arrows.
+ $$\bfig
+ \node 1(1000,800)[Y]
+ \node 21(0,0)[X]
+ \node 22(2000,0)[Z]
+ \node aa(300,400)[]
+ \node ab(450,400)[]
+ \node ba(1550,400)[]
+ \node bb(1700,400)[]
+ \arrow|a|/{@{>}@/^20pt/}/[21`1;f]
+ \arrow|b|[21`1;g]
+ \arrow[aa`ab;\beta]
+ \arrow[bb`ba;\delta]
+ \arrow|b|[1`22;i]
+ \arrow|a|/{@{>}@/^20pt/}/[1`22;h]
+ \arrow/{@{>}@/^15pt/@<5pt>^(.4)k}/[21`22;]
+ \arrow/{@{>}@/^15pt/@<5pt>^(.4)k}/[21`22;]
+ \arrow/{@{>}@<5pt>|(.4)j|(.5)\hole}/[21`22;]
+ \arrow/{@{>}@<-10pt>|(.4){hf}|-\hole}/[21`22;]
+ \arrow/{@{>}@/_15pt/@<-10pt>_(0.4){ig}}/[21`22;]
+ \node c(1000,150)[]
+ \node f(1000,-200)[]
+ \arrow|l|[f`c;t]
+ \node d(1100,25)[]
+ \node e(1100,-75)[]
+ \arrow|r|[e`d;s]
+ \efig$$
+
+
\section{A few comparisons with {\tt xymatrix}}
We give here a few diagrams to contrast the predefined shapes of
@@ -1503,6 +1778,8 @@ digit, must be placed inbraces.
\end{document}
+Color example:
+ $$\xy *[blue]{A} \ar@[red]@{->}^[green]{f}(20,0) *[magenta]{B}\endxy$$