Warning: this is an htmlized version!
The original is here, 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. # An introduction to eev can be found here: # # (find-eev-quick-intro) # http://angg.twu.net/eev-intros/find-eev-quick-intro.html # # 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/>. # ####### # «.mailing-list» (to "mailing-list") # «.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") # «.hole» (to "hole") # «.mixing-xypic-code» (to "mixing-xypic-code") # «.a-few-samples» (to "a-few-samples") # «.xyoption-curve» (to "xyoption-curve") # «.xyrefer-syntax» (to "xyrefer-syntax") # «.question-about-cs» (to "question-about-cs") # «.question-about-cs-list» (to "question-about-cs-list") # «.question-about-cs-ross» (to "question-about-cs-ross") # «.logo» (to "logo") # «.how-diagxy-calls-xypic» (to "how-diagxy-calls-xypic") 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") ##### # # The XyPic mailing list # 2018dec28 # ##### # «mailing-list» (to ".mailing-list") # https://www.tug.org/mailman/listinfo/xy-pic # https://tug.org/pipermail/xy-pic/ # https://mail.google.com/mail/ca/u/0/#search/from%3Axy-pic/FMfcgxvxBFtWHprqqFMPjvwcGkjSbqzm ##### # # 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 #* ##### # # \hole # 2019jan19 # ##### # «hole» (to ".hole") # (find-xyreferpage 41 "\\hole") # (find-xyrefertext 41 "\\hole") # (find-xyreferpage 76 "\\hole") # (find-xyrefertext 76 "\\hole") # (find-xyreferpage 77 "\\hole") # (find-xyrefertext 77 "\\hole") # (find-xyguidepage 3 "1.5 Breaks") # (find-xyguidetext 3 "1.5 Breaks") # (find-xyguidepage 3 "A\\ar[r]|f&B") # (find-xyguidetext 3 "A\\ar[r]|f&B") # (find-xyguidepage 3 "\\hole") # (find-xyguidetext 3 "\\hole") # (find-xyguidepage 3 "A\\ar[r]|\\hole & B") # (find-xyguidetext 3 "A\\ar[r]|\\hole & B") # (find-tlfile "texmf-dist/tex/generic/xypic/") # (find-tlfile "texmf-dist/tex/generic/xypic/xyarrow.tex" "\\xydef@\\hole") # (xrs "<arrow>") # (find-xysourcepage (+ 10 306) "3.3 Arrow and Path feature") # (find-xysourcetext (+ 10 306) "3.3 Arrow and Path feature") # (find-xysourcepage (+ 10 319) "\\hole") # (find-xysourcetext (+ 10 319) "\\hole") ##### # # The code in the section "5.6. Mixing XY-pic code" in barrdoc.pdf # 2019jan09 # ##### # «mixing-xypic-code» (to ".mixing-xypic-code") # (find-barrdocpage 28 "5.6 Mixing XY-pic code") # (find-barrdoctext 28 "5.6 Mixing XY-pic code") # (find-LATEXfile "tmp.tex") \POS(1500,1000)*+!!<0ex,.75ex>{T_{n-1}} \ar@{-}|!{(1000,500);(1500,500)}\hole(1167,334)% \POS(1167,334)\ar|!{(1000,500);(1000,0)}\hole_<>(.6){h_{n-1}} (500,0)*+!!<0ex,.75ex>{S_n} %: 0ex .75ex %: ------- ------- %: < <dimen> , <dimen> > %: --------------------- %: 1500 1000 ! <vector> %: -------- -------- --------------- %: ( <factor> , <factor> ) + <empty> ! <modifier> <object> %: ----------------------- ------- ------ ---------- ------------------- %: <vector> <addop> <size> <modifier> <object> %: ------- --------------- ------------------------ %: <coord> <modifier> <object> %: ------- -------------------------------------- %: <pos> * <object> %: ---------------- %: \POS <coord> %: ------------ %: <command> %: % (find-dn6 "heads6.lua" "tree-head") % (find-dn6file "treetex.lua" "TreeNode.__index.TeX_deftree =") # E-mail from Ross: % https://mail.google.com/mail/ca/u/0/#search/ross.moore%40mq.edu.au/FQRgRdjfHNHmgrNgtgGHzQMmDvvJvZblSBmwLgpsz Eduardo, try this coding. It give better quality output. See my 3 commented changes. $$\bfig % \square(1500,500)/>`>`>`@{>}^<>(.2){r_{n-1}}/[T_{n-1}`T_{n-2}`R_{n-1} % `R_{n-2}; t_{n-1}``\sigma_{n-2}`] % \square(1500,0)/`>`>`>/[R_{n-1}`R_{n-2}`S_{n-1}`S_{n-2}; % `f_{n-1}`f_{n-2}`s_{n-1}] % \morphism|b|[\tilde S_{n+1}`S_n;\tilde s_{n+1}] % \square(1000,500)/>`>`>`>/[\tilde T_n`T_{n-1}`\tilde % R_n`{R_{n-1}};\tilde t_n`\tilde \sigma_n`\sigma_{n-1}`] % \square(1000,0)/>`>``>/[\tilde R_n`R_{n-1}`\tilde S_n`{S_{n-1}};\tilde r_n\quad ```\tilde s_n] % \square(500,0)/>`>``>/[R_n`{R_n}`{S_n}`{S_{n}}; \hat r_n`f_n`\tilde f_n`\hat s_n] \POS(1500,1000)*+!!<0ex,.75ex>i{T_{n-1}}%%%% i = invisible \ar@{-}|!{(1000,500);(1500,500)}\hole(1167,334)% \POS(1167,334)\ar|!{(1000,500);(1000,0)}\hole_<>(.6){h_{n-1}} (500,0)*+!!<0ex,.75ex>i{S_n}%%%% i = invisible \morphism(2000,1000)/@{>}|\hole^<>(.8){h_{n-2}}/<-500,-1000>[T_{n-2}`S_{n-1};] \efig $$ ##### # # "A few samples": the shape {@{>}@`{c,(3000,0),(2700,2800),p}} in barrdoc.pdf # 2018dec26 # ##### # «a-few-samples» (to ".a-few-samples") # (find-angg ".emacs" "diagxy") # (find-barrdocpage 33 "5.9 A few samples") # (find-barrdoctext 33 "5.9 A few samples") # (find-barrdocpage 35 "c,(3000,0)") # (find-barrdoctext 35 "c,(3000,0)") # (find-xyreferpage 22 "Figure 7: Syntax for curves") # (find-xyrefertext 22 "Figure 7: Syntax for curves") $$\bfig \morphism(2400,0)|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/<-1200,2800>[A`B;ab] \morphism(0,0)|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/<400,200>[C`D;cd] \morphism(0,0)|l|/{@{>}@`{c,(1000,0),(600,200),p}}/<400,200>[C`D;cd] \efig $$ \end{document} ##### # # \xyoption{curve} # 2018dec31 # ##### # «xyoption-curve» (to ".xyoption-curve") # (find-LATEX "2018dednat6-extras.tex" "barr") % If I try to use "\usepackage{xy}" instead of "\input diagxy", like this, % % \usepackage[barr,pdf]{xy} % \usepackage[barr]{xy} % % I get this error: % % ! Package xypdf Error: pdfTeX version 1.40.0 or higher is needed % for the xypdf package with PDF output. % See the xypdf package documentation for explanation. % % See: % % https://tex.stackexchange.com/questions/328602/lualatex-and-xypic ##### # # Quick links to the syntax tables in xyrefer.pdf # 2019jan18 # ##### # «xyrefer-syntax» (to ".xyrefer-syntax") # (find-angg ".emacs.papers" "xyrefer-syntax") # (setq last-kbd-macro (kbd "C-a M-\\ < <delete> C-e M-\\ DEL > C-a <down>")) # (setq last-kbd-macro (kbd "C-a C-y C-e \") C-a <down>")) ##### # # A question about <cs> # 2019jan18 # ##### # «question-about-cs» (to ".question-about-cs") # (find-LATEX "2019xysyntax.tex") # «question-about-cs-list» (to ".question-about-cs-list") # Version sent to the mailing list # https://tug.org/pipermail/xy-pic/2019-January/date.html # https://tug.org/pipermail/xy-pic/2019-January/000807.html # Subj: Doubts about syntax: can <cs> and <pos> expand to <empty>? Hi List, I am trying to draw syntax/parse trees for some XyPic code that I found in the diagxy manual, but there are some things that don't make sense to me yet. I tried to parse this code myself, \POS(1500,1000)*+!!<0ex,.75ex>{T_{n-1}} \ar@{-}|!{(1000,500);(1500,500)}\hole(1167,334) \POS(1167,334) \ar|!{(1000,500);(1000,0)}\hole_<>(.6){h_{n-1}} (500,0)*+!!<0ex,.75ex>{S_n} but I only managed to write parse trees for its second line if both <cs> and <pos> can expand to <empty>... My trees are here, http://angg.twu.net/LATEX/2019xysyntax.pdf (PDF) http://angg.twu.net/LATEX/2019xysyntax.zip (source) and if anyone want to look at the source code for that, try: rm -rfv /tmp/2019xysyntax.zip rm -rfv /tmp/edrx-latex/ cd /tmp/ wget http://angg.twu.net/LATEX/2019xysyntax.zip mkdir /tmp/edrx-latex/ unzip -d /tmp/edrx-latex/ /tmp/2019xysyntax.zip cd /tmp/edrx-latex/ lualatex 2019xysyntax.tex I think you'll be amused by the way that the syntax trees are drawn in the source, using ascii art in comment blocks. These comments are parsed by Dednat6, that is included in the .zip; Dednat6 is a front-end for diagxy and proof.sty, and diagxy in its turn is a front-end for XyPic. The main links for Dednat6 are: http://angg.twu.net/LATEX/2018tugboat-rev1.pdf (TUGBoat article) http://angg.twu.net/LATEX/2018dednat6-extras.pdf (extra features/docs) http://angg.twu.net/dednat6.zip (zip file) http://angg.twu.net/dednat6.html (home page) http://tug.org/pipermail/luatex/2019-January/007034.html (a question) Cheers & thanks in advance =), Eduardo Ochs http://angg.twu.net/ http://angg.twu.net/math-b.html # «question-about-cs-ross» (to ".question-about-cs-ross") # https://mail.google.com/mail/ca/u/0/#sent/KtbxLvgstSnSRVQhljDtkSSlWhwwnPdzgB # https://community.mimecast.com/docs/DOC-1369#554 Email rejected due to security policies Doubts about the XyPic syntax Hi Ross! Sorry for the delay - I started writing this with a much, much uglier syntax just after the TUG2018 conference, then my notebook was stolen (!!!), then I got very busy, then I decided to clean up Dednat6 and release it in a decent form before going back to learning XyPic syntax... Anyway, I'm trying to learn XyPic by taking some examples, drawing syntax/parse trees for them, and only then modifying the examples and writing XyPic code myself. Can you help me clean up this? I think my doubts are clearly marked - I don't what a <cs> is, and I don't know how, and if, a <pos> can be an empty string... My plans for after solving these details include announcing these notes on the XyPic mailing list and including this material in the Dednat6 docs, both as an example of how to change the syntax for trees and as tricks for understanding XyPic code. The PDF with notes, doubts, etc is here: http://angg.twu.net/LATEX/2019xysyntax.pdf (PDF) http://angg.twu.net/LATEX/2019xysyntax.zip (source) You can download and compile the source with: rm -rfv /tmp/2019xysyntax.zip rm -rfv /tmp/edrx-latex/ cd /tmp/ wget http://angg.twu.net/LATEX/2019xysyntax.zip mkdir /tmp/edrx-latex/ unzip -d /tmp/edrx-latex/ /tmp/2019xysyntax.zip cd /tmp/edrx-latex/ lualatex 2019xysyntax.tex I think you'll like the way that the syntax trees are drawn in ascii art (that is parsed by Dednat6). Btw, the current main links for Dednat6 are: http://angg.twu.net/LATEX/2018tugboat-rev1.pdf (TUGBoat article) http://angg.twu.net/LATEX/2018dednat6-extras.pdf (extra features/docs) http://angg.twu.net/dednat6.zip (zip file) http://angg.twu.net/dednat6.html (home page) http://tug.org/pipermail/luatex/2019-January/007034.html (a question) Cheers =) Eduardo Ochs P.S.: I have texlive2018 here and I am starting to try to read the relevant sections in xysource.pdf. ##### # # The XyPic logo: \Xy-pic # 2019jan18 # ##### # «logo» (to ".logo") # (find-tlsh "find * | sort | grep xypic") # (find-sh "locate xypic") ##### # # How diagxy calls xypic # 2019feb03 # ##### # «how-diagxy-calls-xypic» (to ".how-diagxy-calls-xypic") # (find-es "diagxy" "how-diagxy-calls-xypic") ##### # # 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 https://www.math.arizona.edu/~swig/documentation/xypic/Xypic.pdf http://tug.org/pracjourn/2006-4/blaga/blaga.pdf https://tex.stackexchange.com/questions/328602/lualatex-and-xypic # Local Variables: # coding: utf-8-unix # End: