Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts about XYpic.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/xypic.e>
#           or at <http://angg.twu.net/e/xypic.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.xypic-docs»		(to "xypic-docs")
# «.bigtex»		(to "bigtex")
# «.xypic-demos»	(to "xypic-demos")
# «.xymatrix-and-xy»	(to "xymatrix-and-xy")
# «.renata»		(to "renata")
# «.diagxy»		(to "diagxy")
# «.diagxydemo0»	(to "diagxydemo0")
# «.two-and-three»	(to "two-and-three")
# «.nodes-and-arrows»	(to "nodes-and-arrows")
# «.diagxy-space-bug»	(to "diagxy-space-bug")
# «.absdiagxy»		(to "absdiagxy")
# «.color-arrows»	(to "color-arrows")
# «.pgf»		(to "pgf")
# «.eepitch-dednat4»	(to "eepitch-dednat4")
# «.dednat41-test»	(to "dednat41-test")
# «.dednat41-demo1»	(to "dednat41-demo1")
# «.prisms»		(to "prisms")




These blocks were moved to dednat.e:
  «eepitch-dednat4»	(to ".eepitch-dednat4")
 			(find-es "dednat" "eepitch-dednat4")
  «dednat41-test»	(to ".dednat41-test")
			(find-es "dednat" "dednat41-test")
  «dednat41-demo1»	(to ".dednat41-demo1")
			(find-es "dednat" "dednat41-demo1")




#####
#
# XYpic docs and .fmt
# 2001apr14
#
#####

# «xypic-docs»  (to ".xypic-docs")
#*
gv   /usr/share/doc/texmf/generic/xypic/xyrefer.ps.gz &
gv   /usr/share/doc/texmf/generic/xypic/xyguide.ps.gz &
rexdvi /usr/share/texmf/source/generic/xypic/doc/xyrefer.dvi &
rexdvi /usr/share/texmf/source/generic/xypic/doc/xyguide.dvi &

# (find-fline "/usr/share/texmf/source/generic/xypic/src/")
# (find-xypicfile "")
#*
rm -Rv /tmp/xypic/
mkdir  /tmp/xypic/
cd /usr/share/texmf/source/generic/xypic/src/
cp -iv * /tmp/xypic/
cd /tmp/xypic/

cd /tmp/xypic/
expect -c '
  spawn make xylatex.fmt
  interact -o -nobuffer {? } {send \r}
' |& tee ~/o

ln -s /usr/bin/tex xylatex

#*
cd /tmp/xypic/
latex xyrefer.man

#*




#####
#
# Making .fmts for bigger TeXes, to typeset the xypic manuals
# 2001apr14
#
#####

# «bigtex»  (to ".bigtex")
# (find-es "tex" "portug-hyph")
# (find-fline "/tmp/xypic/MAKE" "extra high memory")
# (find-fline "/etc/texmf/texmf.cnf" "% Memory.")
# (find-fline "/var/lib/texmf/web2c/texmf.cnf" "% Memory.")

#*
cd /etc/texmf/
if [ ! -e texmf.cnf.orig ] ; then cp -iv texmf.cnf texmf.cnf.orig ; fi
patch -p0 texmf.cnf <<'%%%'
378,379c378,379
< extra_mem_top = 0    % extra high memory for chars, tokens, etc.
< extra_mem_bot = 0    % extra low memory for boxes, glue, breakpoints, etc.
---
> extra_mem_top = 400000 % extra high memory for chars, tokens, etc.
> extra_mem_bot = 400000 % extra low memory for boxes, glue, breakpoints, etc.
%%%

# (find-node "(web2c)Path searching" "texmf.cnf")
# (find-fline "/usr/bin/texconfig" "init)")
# (find-angg ".zshrc" "unsetall")
# _unsetall
# /usr/bin/texconfig init |& tee ~/o
# /usr/bin/texconfig formats |& tee ~/o
fmtutil --all |& tee ~/o
# (find-fline "~/o")

#*
cd /etc/texmf/
mv -v texmf.cnf.orig texmf.cnf

#*




#####
#
# xypic demos
# 2001aug13
#
#####

# «xypic-demos»  (to ".xypic-demos")
# (find-angg ".zshrc" "xydemo")
#*
xydemo <<'%%%'
  (3,0)*{A} ; (20,6)*+{B}*\cir{} **\dir{-}
  ? *_!/3pt/\dir{)} *_!/7pt/\dir{:}
  ?>* \dir{>}
%%%

#*
# (find-xypicfile "xyrefer.man")
xydemo '[curve,frame]' <<'%%%'
    *[o]=<40pt>\hbox{Round}="o"*\frm{oo},
    +<5em,-5em>@+,
    (46,11)*+\hbox{Square}="s"  *\frm{-,},
    -<5em,-5em>@+,
 "o";"s" **{} ?*+\hbox{Bend}="b"*\frm{.},
 "o";"s"."b" **\crvs{-},
 "o"."b";"s" **\crvs{-} ?>*\dir{>}
%%%

#*
# (find-xypicfile "xyrefer.man")
# (find-xypicfile "xy.doc" "^[connect] using <object>")
xydemo '[curve,frame]' <<'%%%'
    *[o]=<40pt>\hbox{Round}="o"*\frm{oo},
    +<5em,-5em>@+,
    (46,11)*+\hbox{Square}="s"*\frm{-},
    -<5em,-5em>@+,
 "o";"s" **{} ?*+\hbox{Bend}="b"*\frm{.},
 "o";"s"."b" **\crvs{-},
 "o"."b";"s" **\crvs{-} ?>*\dir{>}
%%%

#*



#####
#
# \xymatrix and \xy
# 2001aug13
#
#####

# «xymatrix-and-xy»  (to ".xymatrix-and-xy")
# (find-xyreferpage 47 "24 - Matrix feature")
# (find-xypicfile "xymatrix.doc" "This option implements")
# (find-angg ".zshrc" "xydemo")

# (find-xyreferpage 24 "Frame and Bracket extension")
# (find-xypicfile "xyframe.doc" "will frame the~$c$ object;")

# (find-xyreferpage 15 "5 - Decorations")
# (find-xyreferpage 16 "<decor>ations: \\drop")
# (find-xypicfile "xy.doc" "??w![<decor>]")
#   (find-xyreferpage 6 "2.4 - Decorations")
#   (find-xypicfile "xy.doc" "\\subsection{Decorations}")

# (find-xyreferpage 18 "6.2 - Circle segments")
# (find-xypicfile "xy.doc" "\\xy*\\cir<4pt>{}\\endxy")

# (find-xyreferpage 8  "<pos> -> <pos> * <object>")
# (find-xyreferpage 49 "* <object> <pos> <decor>")
# (find-xyreferpage 78 "INDEX")

#*
xydemo '[frame,matrix]' <<'%%%'
  \xymatrix{A&B\\C&D}   % \xyverbose
  \drop\frm{-}
  \drop\cir<8pt>{}
%%%
#*


# Minhas dúvidas sobre placement e labels são respondidas no xyrefer,
# pp.8--11 (na 11, a nota 3p).

# (find-xypicfile "xy.doc" "\\section{Positions}")




#####
#
# diagrama da Renata
# 2008nov11
#
#####

# «renata»  (to ".renata")
%*
% (eedn4a-bounded)
\def\alert#1{\red{#1}}

\xyoption{knot}

\[
\xy
%nodes
(0,30)*+{\mbox{\alert{Renata de Freitas}}}="r";
(0,20)*+{\mbox{\alert{Paulo Veloso}}}="v";
(0,10)*+{\mbox{\alert{\emph{Sheila Veloso}}}}="s";
(0,0)*+{\mbox{\alert{Petrucio Viana}}}="p";
(60,25)*+{\mbox{\sc im/uff}}="uff";
(60,15)*+{\mbox{\sc pesc/ufrj}}="pesc";
(60,5)*+{\mbox{\sc desc/uerj}}="desc";
%arcs
{\ar "r"; "uff"};
{\ar "p"; "uff"};
{\ar "s"; "desc"};
{\ar "v"; "pesc"};
\endxy
\]
%*





#####
#
# diagxy
# 2002feb10 / 2005jul08
#
#####

# «diagxy»  (to ".diagxy")
# (find-angg ".emacs" "diagxy")
# http://www.tug.org/TUGboat/Articles/tb26-3/tb84barr.pdf
#
# 2013feb01:
# http://www.dante.de/CTAN/help/Catalogue/entries/diagxy.html
# http://mirror.ctan.org/macros/generic/diagrams/barr.zip
#
# http://www.ctan.org/tex-archive/help/Catalogue/entries/diagxy.html
# http://www.ctan.org/tex-archive/macros/generic/diagrams/barr/
#*
anonftp ftp://ftp.math.mcgill.ca/pub/barr/
psne ftp://ftp.math.mcgill.ca/pub/barr/diagxy.zip

#*
# (find-fline "$S/ftp/ftp.math.mcgill.ca/pub/barr/diagxy.zip")
# (code-c-d       "diagxy" "~/usrc/diagxy/")
# (code-dvi       "diagxy" "~/usrc/diagxy/diaxydoc.dvi")
# (code-pdftotext "diagxy" "~/usrc/diagxy/diaxydoc.pdf")
# (find-diagxypage 25)
# (find-diagxyfile "diaxydoc.tex" "subsection{Inline macros}")
# (find-diagxytext)
# (find-man "1 unzip")
#
rm -Rv ~/usrc/diagxy/
mkdir  ~/usrc/diagxy/
cd     ~/usrc/diagxy/
# unzip -a $S/ftp/ftp.math.mcgill.ca/pub/barr/diagxy.zip
unzip -a $S/http/mirror.ctan.org/macros/generic/diagrams/barr.zip
mv -v barr/* .
touch    diaxydoc.ind
latex    diaxydoc.tex
latex    diaxydoc.tex
pdflatex diaxydoc.tex

cp -v ~/usrc/diagxy/diagxy.tex   ~/LATEX/
cp -v ~/usrc/diagxy/diaxydoc.dvi ~/LATEX/
cp -v ~/usrc/diagxy/diaxydoc.pdf ~/LATEX/

#*
# «diagxydemo0»  (to ".diagxydemo0")
# (find-fline "$usr_src/diagxy/diaxydoc.tex" "learn mainly by example")
# (find-diagxypage 10)
# (find-angg ".zshrc" "xydemo")
# (find-angg ".zshrc" "diagxydemo")

cat > ~/LATEX/diagxydemo.tex <<'%%%'
\documentclass{book}
\input diagxy
\xyoption{curve}
\begin{document}
$\bfig
\morphism[A`B;f]
\morphism(0,300)[A`B;f]
\morphism(0,600)|m|[A`B;f]
\morphism(0,900)/<-/[A`B;f]
\morphism(900,500)<0,-500>[A`B;f]
\morphism(1200,0)<0,500>[A`B;f]
\efig$
\end{document}
%%%
(cd ~/LATEX/; latex diagxydemo.tex && rexdvi diagxydemo.dvi)

#*




#####
#
# diagxy demos
# 2002feb10
#
#####

#*
# (find-fline "$usr_src/diagxy/diaxydoc.tex" "learn mainly by example")
# (find-diagxyfile "diaxydoc.tex" "learn mainly by example")
# (find-diagxyfile "diaxydoc.tex" "The basic syntax is built around")
# (find-diagxyfile "diagxy.tex" "\\def\\morphism")
diagxydemo <<'%%%'
\morphism[A`B;f]
\morphism(0,300)[A`B;f]
\morphism(0,600)|m|[A`B;f]
\morphism(0,900)/<-/[A`B;f]
\morphism(900,500)<0,-500>[A`B;f]
\morphism(1200,0)<0,500>[A`B;f]
%%%
#*
# (find-diagxyfile "diaxydoc.tex" "\\square.  macro:")
# (find-diagxyfile "diagxy.tex" "\\def\\square")

diagxydemo <<'%%%'
\square/<=`->`->`=>/[a \to b`a`c`b,c;```]
%%%

#*
# (find-diagxyfile "diagxy.tex" "\\def\\Squarepppp" "\\def\\Squarepppp")
# 175 is 500*0.35
# 250 is 500*0.5
# 150 is 500*0.3

diagxydemo0 <<'%%%'
\par $\bfig \square/<=`->`->`=>/[a \to b`a`c`b,c;```]
            \morphism(175,250)/<->/<150,0>[`;]
      \efig$
\par $\bfig \square/<=`->`->`@3{->}/[a \to b`a`c`b,c;```]
            \morphism(175,250)/<->/<150,0>[`;]
      \efig$
\par $\bfig \square/<=`->`->`@3{->}/<400,400>[a \to b`a`c`b,c;```]
            \morphism(100,200)/<->/<200,0>[`;]
      \efig$
\par $\bfig \Square/<=`->`->`@3{->}/[a \to b`a`c`b,c;```]
      \efig$
\par $\bfig \Square/<=`->`->`@3{.>}/[a \to b`a`c`b,c;```]
      \efig$
%%%

#*
# (find-diagxyfile "diagxy.tex" "\\def\\morphism")
diagxydemo0 <<'%%%'
$\bfig \morphismpppp(100,100)|a|/->/<200,100>[a`b;f]
       \morphismpppp(120,120)|a|/->/<220,120>[c`d;g]
 \efig$
%%%

#*



#####
#
# Some real diagrams
# 2002feb16
#
#####

#*
diagxydemo0 <<'%%%'
If we have $a \to b$,
%
$$
  \bfig \square(0,-700)/<=`->`->`@3{->}/<700,500>[(x \to b)`(x \to a)`
					  (y \to b)`((a,y)|_b \to a);```]
        \morphism(100,-450)/<->/<500,0>[`;]
  \efig
  %
  \qquad
  %
  \bfig
  \morphism(0,0)/{@{>}@/_2.5em/}/<0,-1000>[x`a;]
  % \morphism(0,0)/.>/<0,-500>[x`(a,y)|_b;]
  \morphism(0,0)<500,-1000>[x`b;]
  % \morphism(0,0)/.>/<500,-500>[x`y;]
  % \morphism(50,-300)/<->/<200,0>[`;]
  \morphism(0,-500)<500,0>[(a,y)|_b`y;]
  \morphism(0,-500)<0,-500>[(a,y)|_b`a;]
  \morphism(500,-500)<0,-500>[y`b;]
  \morphism(0,-1000)<500,0>[a`b;]
  \morphism(-150,-300)/=>/<250,0>[`;]
  \morphism(450,-750)/@3{->}/<-400,0>[`;]
  \efig
  %
  \qquad
  %
  \bfig
  \morphism(0,0)/{@{>}@/_2.5em/}/<0,-1000>[x`a;]
  \morphism(0,0)/.>/<0,-500>[x`(a,y)|_b;]
  % \morphism(0,0)<500,-1000>[x`b;]
  \morphism(0,0)/.>/<500,-500>[x`y;]
  \morphism(50,-300)/<->/<200,0>[`;]
  \morphism(0,-500)<500,0>[(a,y)|_b`y;]
  \morphism(0,-500)<0,-500>[(a,y)|_b`a;]
  \morphism(500,-500)<0,-500>[y`b;]
  \morphism(0,-1000)<500,0>[a`b;]
  % \morphism(-150,-300)/=>/<250,0>[`;]
  % \morphism(450,-750)/@3{->}/<-400,0>[`;]
\efig
$$

$$
  \bfig \square(0,-700)/<=`->`->`@3{->}/<700,500>[(w' \to a)`(w \to b)`
					  (x \to a)`(x \to b);```]
        \morphism(100,-450)/<->/<500,0>[`;]
  \efig
  \qquad
  \bfig \square(0,-700)/<=`->`->`@3{->}/<700,500>[(b,a|_b,w|_b)`(w \to b)`
					  (x \to a)`(x \to b);```]
        \morphism(100,-450)/<->/<500,0>[`;]
  \efig
  \qquad
  \bfig \square(0,-700)/<=`->`->`@3{->}/<700,500>[((a,w)|_b \to a)`(w \to b)`
					  (x \to a)`(x \to b);```]
        \morphism(100,-450)/<->/<500,0>[`;]
  \efig
$$

Hello

% /{@{>}@/^1em/}/

%%%

#*



#####
#
# \two and \three in diagxy
# 2008mar06
#
#####

# «two-and-three»  (to ".two-and-three")
# (find-diagxytext "\\two/<-`->/")
# (find-diagxyfile "")
# (find-diagxyfile "diagxy.tex" "\\def\\twopppp")
# (find-diagxyfile "diagxy.tex" "\\def\\threeppppp")
# (find-dn4 "examples/edrxdnt.tex" "diagxy")
# (find-dn4 "examples/edrxdnt.tex" "diagxy" "\\def\\diagxyto")
%*
% (eedn4-51-bounded)

$$A  \diagxyto/<-/
  B  \diagxyto^f
  C  \diagxyto/ >->/<500>_g
  D  \diagxyto/<-< /^f_g
  E
$$
$$A  \two/<-`->/<100>
  B  \two^f
  C  \two/ >->` >->/_g
  D  \two/<-< `<-< /^f_g
  E
$$
$$A  \threepppp/>`<-`>/<400>^{d^0}|{s^0}_{d^1}
  B  \three<100>
  C  \three/->>`<-< `->>/
  D
$$

%*




#####
#
# diagxy: nodes and arrows
# 2009jun21
#
#####

# «nodes-and-arrows»  (to ".nodes-and-arrows")
# (find-es "diagxy" "nodes-and-arrows")
# (find-diagxypage 18 "4.1     Nodes and arrows")
# (find-diagxytext    "4.1     Nodes and arrows")
# (find-diagxytext)
# (find-diagxyfile "diaxydoc.tex" "subsection{Nodes and arrows}")
%*
% (eedn4a-bounded)

$$\bfig
  \node a(0,0)[A\otimes B]
  \node 3b(700,300)[A'\otimes B']
  \node @(0,-500)[A''\otimes B'']
  \node xyzzy(500,0)[C\otimes D]
  \arrow/->>/[a`3b;f]
  \arrow|l|[a`@;g]
  \arrow|b|/<-/[xyzzy`@;i\otimes j]
  \efig
$$

%*
%*
% (eedn4a-bounded)
% (find-sh0 "cd ~/LATEX/ && dvips  -D 300 -P pk -o tmp.ps tmp.dvi")
% (find-sh0 "cd ~/LATEX/ && dvired -D 300 -P pk -o tmp.ps tmp.dvi")
% (find-pspage "~/LATEX/tmp.ps")

\def\myunit{300}
\def\myhunit{\myunit}
\def\mydiagL#1#2#3#4{%
  \bfig
  \node ne(\myhunit,\myunit)[#1]
  \node sw(0,0)[#2]
  \node se(\myunit,0)[#3]
  \arrow|l|/|->/[ne`se;#4]
  \arrow/=>/[sw`se;]
  \efig%
}
\def\mydiagV#1#2{%
  \bfig
  \node a(0,\myunit)[#1]
  \node b(0,0)[#2]
  \arrow|l|/|->/[a`b;]
  \efig%
}
\def\mynat#1#2#3#4#5#6#7#8{
  \left(\mydiagL{#1}{#2}{#3}{#6}\right)
  #7
  ( #4 \tnto
    ( \left(\mydiagV{#2}{#4}\right)
      #8
      \left(\mydiagV{#1}{#5}\right)
    )
  )
}
\def\mynaty#1#2#3#4#5#6#7{
  \left(\mydiagV{#1}{#2}\right)
  {\diagxyto/<->/<200>\;}
  ( #3 \tnto
    ( \left(\mydiagV{#4}{#5}\right)
      {\diagxyto/|->/<150>}
      \left(\mydiagV{#6}{#7}\right)
    )
  )
}
\def\mynata#1#2#3#4#5{
  \mynat{#1}{#2}{#3}{#4}{#5} {}
    {\diagxyto/<->/<200>\;} {\diagxyto/|->/<150>}
}
\def\mynatu#1#2#3#4#5{
  \mynat{#1}{#2}{#3}{#4}{#5} {(u)}
    {\diagxyto/<->/<200>\;} {\two/|->`<-|/<175>^\natural_{(u)}}
}

% $$\mydiagL ABCL
%   \left(\mydiagL abcl\right)
%   \left(\mydiagV ab\right)
% $$

\thinmtos

$$\mynatu {a}{b}{b^R}{c}{c^R}$$
$$\mynatu {*}{a}{a^R}{b}{b^R}$$
$$\mynatu {*}{b}{b^R}{c}{c^R}$$
$$\mynata {*}{b}{(a\mto b)}{c}{(a \mto c)}$$
$$\mynaty {a}{b}{c}{b}{c}{a}{c}12$$


$$\mynatu {a}{a^L}{a^{LR}}{b}{b^R}$$



% (/ 375 25)

%*

\defdiag{??}{    % (find-fline "ee.tex" 7)
  \morphism(375,0)/|->/<0,-375>[{*}`{a^R};{}]
  \morphism(0,-375)/=>/<375,0>[{a}`{a^R};{}]
}


%*
% (eedn4a-bounded)
% (find-sh0 "cd ~/LATEX/ && dvips  -D 300 -P pk -o tmp.ps tmp.dvi")
% (find-sh0 "cd ~/LATEX/ && dvired -D 300 -P pk -o tmp.ps tmp.dvi")
% (find-pspage "~/LATEX/tmp.ps")


%D diagram ??
%D 2Dx     100    +25
%D 2D  100        *
%D 2D
%D 2D  +25 a ==> a^R
%D 2D
%D (( * a^R |-> a a^R =>
%D
%D ))
%D enddiagram
%D
$$\diag{??}$$


%*







#####
#
# diagxy bug
# 2002jul15
#
#####

# «diagxy-space-bug»  (to ".diagxy-space-bug")
#*
cd ~/LATEX/
cat > tmp.tex <<'---'
\documentclass{book}
\usepackage{amsmath}
\input diagxy
\begin{document}
\def\mydmap[#1`#2;#3]{\begin{pmatrix}#1\\ \downarrow\\#2\end{pmatrix}}
$$
  \bfig
  \morphism(0,0)/=>/<200,200>[{\mydmap[a`b;]} `{\mydmap[c`d;]} ;\Sigma]
  %                                          ^here            ^and here
  \efig
$$
\end{document}
---
latex tmp.tex
rexdvi tmp.dvi

#*
# Try to remove the spaces in the "here"s; you'll get errors.




#####
#
# absdiagxy
# 2008jul01
#
#####

# «absdiagxy»  (to ".absdiagxy")
# Inspired diagxy's "\node" feature.
# (find-diagxypage 18)
# (find-diagxypage 30)
# http://www.math.kent.edu/~gzeibig/
# http://www.math.kent.edu/~gzeibig/absdiagxy.html
# http://www.math.kent.edu/~gzeibig/absdiagxy/absdiagxy.zip
# http://www.math.kent.edu/~gzeibig/absdiagxy/absdiagxydoc.pdf
#*
rm -Rv ~/usrc/absdiagxy/
mkdir  ~/usrc/absdiagxy/
cd     ~/usrc/absdiagxy/
unzip $S/http/www.math.kent.edu/~gzeibig/absdiagxy/absdiagxy.zip
unzip $S/ftp/ftp.math.mcgill.ca/pub/barr/diagxy.zip diagxy.tex

latex absdiagxydoc.tex
# Ooops, "! TeX capacity exceeded, sorry [main memory size=1000000]"...

#*
# (code-c-d "absdiagxy" "~/usrc/absdiagxy/")
# (code-ps        "absdiagxydoc" "$S/http/www.math.kent.edu/~gzeibig/absdiagxy/absdiagxydoc.pdf")
# (code-pdftotext "absdiagxydoc" "$S/http/www.math.kent.edu/~gzeibig/absdiagxy/absdiagxydoc.pdf")
# (find-absdiagxyfile "")
# (find-absdiagxydocpage 1)
# (find-absdiagxydocpage 11 "A larger example")
# (find-absdiagxydoctext)




#####
#
# coloring arrows with diagxy
# 2008jul01
#
#####

# «color-arrows»  (to ".color-arrows")
%*
% (eedn4a-bounded)

\def\colora#1{{\color{red}#1}}
\def\colorb#1{{\color{yellow}#1}}
\def\colorc#1{{\color{green}#1}}
\def\colord#1{{\color{cyan}#1}}
\def\colore#1{{\color{blue}#1}}
\def\colorf#1{{\color{magenta}#1}}

\def\mycolor#1#2{\begingroup\color{#1}#2\endgroup}

\colora{a}\colorb{b}\colorc{c}\colord{d}\colore{e}\colorf{f}

$$\bfig
  \node a(0,0)[\text{AB}]
  \node 3b(700,300)[A'\otimes B']
  \node @(0,-500)[A''\otimes B'']
  \node xyzzy(500,0)[C\otimes D]
  \arrow/->>/[a`3b;f]
  \arrow|l|[a`@;g]
  \arrow|b|/<-/[xyzzy`@;i\otimes j]
  \efig
$$

\def\colorpush#1#2#3{\special{color push rgb #1 #2 #3}}
\def\colorpop{\special{color pop}}

a

$$\bfig
 \node    red(500,0)[{\color{red}\text{red}}]
 \node  green(0,375)[{\color{green}\text{green}}]
 \node blue(500,375)[{\color{blue}\text{blue}}]
 \begingroup\color{yellow}
   \arrow/<->/[red`green;]
 \endgroup
 \begingroup\color{magenta}
   \arrow/<->/[red`blue;]
 \endgroup
 \begingroup\color{cyan}
   \arrow/<->/[green`blue;]
 \endgroup
 \efig
$$

b

%*



#####
#
# arithmetic (just trying to learn how to do)
# 2002feb11
#
#####

# (find-fline "/usr/share/texmf/tex/generic/xypic/")

# (find-diagxyfile "diagxy.tex" "\\def\\morphism")
# (find-knuthfile "tex/texbook.tex")
# (find-knuthfile "tex/texbook.tex" "^{arithmetic}")
# (find-texbookpage (+ 11 118))

# (find-fline "/usr/share/texmf/tex/plain/base/plain.tex")
# (find-fline "/usr/share/texmf/tex/plain/base/plain.tex" "\\def\\newcount")
# (find-texbookpage (+ 11 458))
# \def\domorphism(#1,#2)|#3|/#4/<#5,#6>[#7`#8;#9]{%

#*
# Trying to multiply, divide and add:
diagxydemo0 <<'%%%'
% (find-texbookpage (+ 11 464) "Index")
% (find-knuthfile "tex/texbook.tex" "\\multiply")
% (find-knuthfile "tex/texbook.tex" "getlength")
% (find-knuthfile "tex/texbook.tex" "\\bull ^|\\expandafter|")
\def\length#1{{\count0=0 \getlength#1\end \number\count0}}
\def\getlength#1{\ifx#1\end \let\next=\relax
  \else\advance\count0 by1 \let\next=\getlength\fi \next}

% \getlength{123} \getlength{{123}}

\def\multdiv#1#2#3%
  {{\topw=#1 \multiply\topw by #2 \divide\topw by #3 \the\topw}}
\def\multdivadd#1#2#3#4%
  {{\topw=#1 \multiply\topw by #2 \divide\topw by #3 \advance\topw by #4
    \the\topw%
  }}
\def\myadd#1#2%
  {{\topw=#1 \the\topw}}

{\topw=1000
 \multdiv{\the\topw}{6}{20}
 \multdiv{\the\topw}{7}{20}
 \multdivadd{\the\topw}{7}{20}{\the\topw}
 \myadd{\the\topw}{222}
}

{\topw=1000
 % \topw=\divide\topw by 20
 \multiply\topw by 7
 \the\topw
 \multiply\topw by 6
 \the\topw
}
%%%

#*
# (find-fline "/usr/share/texmf/tex/latex/base/")
# (find-angg "LATEX/edrx.sty" "showboxdims")
cd ~/tmp/
cat > $EEG <<'---'
\def\a{222}\show\a
i\def\a{{222}}\show\a
i\expandafter\def\b\a
i\end
---
eeg tex

#*





#####
#
# PGF/Tikz (by Till Tantau)
# 2007jul30
#
#####

# «pgf»  (to ".pgf")
# (find-es "diagrams" "tikz")
# (find-angg ".emacs.papers" "pgf")
# (find-sh "locate pgfmanual")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/pgf/
mkdir  ~/usrc/pgf/
zcat /usr/share/doc/texmf/pgf/pgfmanual.pdf.gz > ~/usrc/pgf/pgfmanual.pdf

(code-xpdf      "pgfmanual" "~/usrc/pgf/pgfmanual.pdf")
(code-pdftotext "pgfmanual" "~/usrc/pgf/pgfmanual.pdf")
;; (find-pgfmanualpage      1  "Contents")
;; (find-pgfmanualpage (+ 1 1) "Index")
;; (find-pgfmanualtext "")

# http://ufpr.dl.sourceforge.net/sourceforge/pgf/pgf-1.18.tar.gz
#*
rm -Rv ~/usrc/pgf-1.18/
tar -C ~/usrc/ -xvzf \
  $S/http/ufpr.dl.sourceforge.net/sourceforge/pgf/pgf-1.18.tar.gz
cd     ~/usrc/pgf-1.18/

#*
# (code-c-d "pgf"    "~/usrc/pgf-1.18/")
# (code-c-d "pgfdoc" "~/usrc/pgf-1.18/doc/generic/pgf/")
# (find-pgffile "")
# http://www.ctan.org/tex-archive/graphics/pgf/doc/generic/pgf/version-for-pdftex/en/pgfmanual.pdf
# (code-ps   "pgfmanual" "~/usrc/pgf-1.18/doc/generic/pgf/version-for-pdftex/en/pgfmanual.pdf")
# (code-xpdf "pgfmanual" "~/usrc/pgf-1.18/doc/generic/pgf/version-for-pdftex/en/pgfmanual.pdf")
# (find-pgfmanualpage 1)
# (find-pgfmanualpage 14)
# (find-pgffile "doc/generic/pgf/text-en/pgfmanual-en-introduction.tex" "\\fill[orange]")
# (find-pgffile "doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex" "Setting up the Environment")
# (find-pgffile "latex/pgf/basiclayer/")

# (find-pgfmanualpage 54)
# (find-status   "pgf")
# (find-vldifile "pgf.list")
# (find-udfile   "pgf/")
#*
rm -Rv /tmp/pgf/
mkdir  /tmp/pgf/
cd     /tmp/pgf/
cat > a.tex <<'%%%'
\documentclass{article} % say
\usepackage{tikz}
\begin{document}
We are working on
\begin{tikzpicture}
  \draw (-1.5,0) -- (1.5,0);
  \draw (0,-1.5) -- (0,1.5);
\end{tikzpicture}.
\end{document}
%%%
pdflatex a.tex

#*

;;*
;; (ee-once (eeeval-bounded))

(defun eetikz0 (s &optional e)
  (interactive "r")
  (ee-write s e "\
  \\documentclass{book}
  \\usepackage{tikz}
  \\usetikzlibrary{arrows,snakes,backgrounds}
  \\begin{document}\n"
  "
  \\end{document}\n"
  "/tmp/eetikz.tex"))

(defun eetikz (s &optional e)
  (interactive "r")
  (eetikz0 s e)
  (eev "cd /tmp/ && pdflatex /tmp/eetikz.tex && regv eetikz.pdf"))

(eeb-define 'eetikz-bounded 'eetikz 'ee-delimiter-percent nil t t)

;;*

%*
% (eetikz-bounded)
% (find-pgfmanualpage 42)
% (find-pgfdocfile "text-en/pgfmanual-en-tutorial-nodes.tex" 828)
\begin{tikzpicture}
\draw (-1.5,0) -- (1.5,0);
\draw (0,-1.5) -- (0,1.5);
\end{tikzpicture}

%*
% (eetikz-bounded)
% (find-pgfmanualpage 42)
% (find-pgfdocfile "text-en/pgfmanual-en-tutorial-nodes.tex" 828)
\begin{tikzpicture}
\tikzstyle{place}=[circle,draw=blue!50,fill=blue!20,thick,
                   inner sep=0pt,minimum size=6mm]
\tikzstyle{transition}=[rectangle,draw=black!50,fill=black!20,thick,
                        inner sep=0pt,minimum size=4mm]
\tikzstyle{pre}=[<-,shorten <=1pt,>=stealth',semithick]  
\tikzstyle{post}=[->,shorten >=1pt,>=stealth',semithick]  
\begin{tikzpicture}[bend angle=45]
  \node[place]      (waiting)                            {};
  \node[place]      (critical)       [below of=waiting]  {};   
  \node[place]      (semaphore)      [below of=critical] {};   

  \node[transition] (leave critical) [right of=critical] {}
    edge [pre]                                 (critical)
    edge [post,bend right] node[auto,swap] {2} (waiting)
    edge [pre, bend left]                      (semaphore);
  \node[transition] (enter critical) [left of=critical]  {}
    edge [post]                                (critical)
    edge [pre, bend left]                      (waiting)
    edge [post,bend right]                     (semaphore);
\end{tikzpicture}
%*

# (find-pgffile "doc/generic/pgf/text-en/")
# (find-pgffile "doc/generic/pgf/macros/pgfmanual-en-macros.tex")

# http://www.ctan.org/tex-archive/help/Catalogue/entries/pgf.html
# http://www.fauskes.net/nb/pgftikzexamples/
# http://www.fauskes.net/media/pgftikzexamples/download/pgftikzexamples.zip

# http://udrepper.livejournal.com/19751.html
# http://people.redhat.com/drepper/cpumemory.pdf
# (brxpdfl "http://people.redhat.com/drepper/cpumemory.pdf")

# Latest version:
# http://www.ctan.org/pkg/pgf
# http://ctan.tche.br/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf




#####
#
# Ellis Cooper's message about "prisms"
# 2009nov02
#
#####

# «prisms»  (to ".prisms")
# (find-angg ".zshrc" "xydemo")
# http://article.gmane.org/gmane.science.mathematics.categories/5211
#*
# (eev-bounded)

cd /tmp/
cat > /tmp/xydemo.tex <<'%%%'
\documentclass{book}
\usepackage[frame,matrix,knot]{xy}
\begin{document}

Dear categorists,

I cannot resist wondering whether it has been observed that (almost)
everything is a prism, including the Subject, and there is a
generalization of category theory beyond homsets with merely two
parameters. I have omitted a lot of labels because anyone on this
list can fill them in, and I have omitted prisms for identity
diagrams for the same reason. Dotted arrows are induced, outer
squares commute. (By "semi-adjoint" I mean the family of set maps in
either of the two directions in the usual bifunctor definition of adjoint.)

Composition
\xymatrix{ &a\ar[dl]_f\ar@{..>}[dd]^{gf}\\a'\ar[dr]_g&\\&a''}

Functor prism
\xymatrix{
a\ar@{..>}[rr]^{gf}\ar@{|->}[ddd]\ar[dr]_f&&a''\ar@{|->}[ddd]\\
&a'\ar[ur]_g\ar@{|->}[d]&\\
&Fa'\ar[dr]_{Fg}&\\
Fa\ar[ur]_{Ff}\ar@{..>}[rr]_{Fgf}&&Fa''\\
}

Natural Transformation prism
\xymatrix{
Fa\ar[rr]^{\eta_a}\ar@{..>}[ddd]_{Ff}&&Ga\ar@{..>}[ddd]^{Gf}\\
&a\ar@{|->}[ul]\ar@{|->}[ur]\ar[d]^f&\\
&a'\ar@{|->}[dl]\ar@{|->}[dr]&\\
Fa'\ar[rr]_{\eta_{a'}}&&Ga'\\
}

Semi-adjoint prism
\xymatrix{
(Fa\:Gb)\ar[rr]\ar@{..>}[ddd]&&(Ka\:Lb)\ar@{..>}[ddd]\\
&(a\:b)\ar@{|->}[ul]\ar@{|->}[ur]\ar[d]&\\
&(a'\:b')\ar@{|->}[dl]\ar@{|->}[dr]&\\
(Fa'\:Gb')\ar[rr]&&(Ka'\:Lb')
}

Generalized associativity prism
\xymatrix{
(a_1\cdots
a_n)\ar@{..>}[rr]^{(hg)f}\ar[dr]_f\ar[ddd]_1&&(a'''_1\cdots a'''_n)\ar[ddd]^1\\
&(a'_1 \cdots a'_n)\ar@{..>}[ur]_{hg}\ar[d]^g&\\
&(a''_1\cdots a''_n)\ar[dr]_h&\\
(a_1\cdots a_n)\ar@{..>}[ur]_{gf}\ar@{..>}[rr]_{h(gf)}&&(a'''_1\cdots a'''_n)
}

Generalized semi-adjoint
\xymatrix{
(F_1a_1\cdots F_na_n)\ar[rr]\ar@{..>}[ddd]&&(G_1a_1\cdots
G_na_n)\ar@{..>}[ddd]\\
&(a_1\cdots a_n)\ar@{|->}[ul]\ar@{|->}[ur]\ar[d]&\\
&(a'_1\cdots a'_n)\ar@{|->}[dl]\ar@{|->}[dr]\\
(F_1a'_1\cdots F_na'_n)\ar[rr]&&(G_1a'_1\cdots G_na'_n)
}

\end{document}
%%%

cd /tmp/; latex xydemo.tex && rexdvi xydemo.dvi

#*





#####
#
# xygraph
# 2008jul12
#
#####






# LaTeX for Logicians: http://www.phil.cam.ac.uk/teaching_staff/Smith/LaTeX/

http://www.tug.org/pracjourn/2007-3/wholeissue/wholeissue.pdf











#  Local Variables:
#  coding:               raw-text-unix
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: