Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
% 2.tex: examples of using dednat6 to make diagrams.
% See: http://angg.twu.net/dednat6/tests/2.tex.html
%      http://angg.twu.net/dednat6/tests/2.tex
%      http://angg.twu.net/dednat6/tests/2.pdf
%
% (defun c () (interactive) (find-sh "lualatex 2.tex"))
% (defun c () (interactive) (find-sh "lualatex --output-format=dvi 2.tex"))
% (defun d () (interactive) (find-xpdfpage "2.pdf"))
% (defun d () (interactive) (find-xdvipage "2.dvi"))
% (defun e () (interactive) (find-dn6 "tests/2.tex"))

\documentclass[oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{luacode}
\usepackage[colorlinks]{hyperref}

\catcode`\^^J=10
\directlua{dednat6dir = "../"}
\directlua{dofile(dednat6dir.."dednat6.lua")}
\directlua{texfile(tex.jobname)}
\directlua{quiet()}
\directlua{verbose()}

\usepackage{proof}   % For derivation trees ("%:" lines)
\input diagxy        % For 2D diagrams ("%D" lines)
\xyoption{curve}     % For the ".curve=" feature in 2D diagrams

\directlua{output(preamble1)}  % (find-dn6 "preamble6.lua")

\def\pu{\directlua{pu()}}
\pu

\begin{document}



% (find-fline "~/tmp/lucatelli_diagrams.jpg")

\def\Id{\mathrm{Id}}
\def\aa{\alpha}
\def\AW{\mathcal{A}W}
\def\AX{\mathcal{A}X}
\def\AY{\mathcal{A}Y}
\def\BW{\mathcal{B}W}
\def\BX{\mathcal{B}X}
\def\BY{\mathcal{B}Y}
\def\A {\mathcal{A}}
\def\B {\mathcal{B}}

%L forths["<="] = function () pusharrow("<=") end

%D diagram Lucatelli-assoc
%D 2Dx     100    +40    +40 +25  +30    +40    +40
%D 2D  100 A1 --> A2 --> A3       B1 --> B2 --> B3
%D 2D      |      |       |       |      |       |
%D 2D      |      |  <=   |       |      |       |
%D 2D      |      v       v       |      |       |
%D 2D  +40 |  <=  A5 --> A6  {=}  |  <=  |  <=   |
%D 2D      |      |       |       |      |       |
%D 2D      |      |  <=   |       |      |       |
%D 2D      v      v       v       v      v       v
%D 2D  +40 A7 --> A8 --> A9       B7 --> B8 --> B9
%D 2D
%D ren  A1 A2 A3    B1 B2 B3   =>   \AW \AW \BW   \AW \BW \BW
%D ren     A5 A6               =>       \AX \BX
%D ren  A7 A8 A9    B7 B8 B9   =>   \AY \AY \BY   \AY \BY \BY
%D
%D (( A1 A2 -> .plabel= a \Id_{\AW}   A2 A3 -> .plabel= a \aa_W
%D                                    A5 A6 -> .plabel= b \aa_X 
%D    A7 A8 -> .plabel= b \Id_{\AY}   A8 A9 -> .plabel= b \aa_Y 
%D
%D    A2 A5 -> .plabel= l \A(f)       A3 A6 -> .plabel= r \B(f)
%D    A1 A7 -> .plabel= l \A(gf)
%D    A5 A8 -> .plabel= l \A(g)       A6 A9 -> .plabel= r \B(g) 
%D
%D    A2 A6 harrownodes nil 20 nil <=  .plabel= a a_{f}
%D    A1 A8 harrownodes nil 20 nil <=  .plabel= a a_{gf}
%D    A5 A9 harrownodes nil 20 nil <=  .plabel= a a_{g}
%D
%D    {=} place
%D 
%D    B1 B2 -> .plabel= a \aa_W       B2 B3 -> .plabel= a \Id_{\BW}
%D    B7 B8 -> .plabel= b \aa_Y       B8 B9 -> .plabel= b \Id_{\BY}
%D
%D    B1 B7 -> .plabel= l \A(gf)
%D    B2 B8 -> .plabel= m \B(gf)
%D    B3 B9 -> .plabel= r \B(g)\B(f)
%D
%D    B1 B8 harrownodes nil 20 nil <=  .plabel= a \aa_{gf}
%D    B2 B9 harrownodes nil 20 nil <=  .plabel= a   b_{gf}
%D
%D ))
%D enddiagram
%D
$$\pu \diag{Lucatelli-assoc}$$



% Quick and dirty ports of hackish extensions from dednat4, just to
% make "_|" (that draws a pullback symbol) work.

%L -- From: (find-dn4 "dednat4.lua" "diag-forth-parser" "dofs")
%L dofs = function (str, pos)
%L     local oldp = p
%L     p = {text=str, pos=(pos or 0)}
%L     while 1 do
%L       p.word = getword()
%L       if not p.word then p = oldp; return end
%L       p.wordpos = p.stuffpos
%L       dof(p.word)
%L     end
%L   end
%L 
%L forths["\n"] = function () end
%L forths["#"] = getrestofline
%L macro = function (str) return function () dofs(str) end end
%L
%L -- From: (find-dn4 "experimental.lua" "relplace")
%L forths["relplace"] = function ()
%L     local x, y = ds[1].x, ds[1].y
%L     local dx, dy = getwordasluaexpr(), getwordasluaexpr()
%L     local TeX = getword()
%L     storearrow(DxyPlace {{x=x+dx, y=y+dy, TeX=TeX}})
%L     print(arrows)
%L   end
%L forths["_|"] = macro "relplace 7 7 \\pbsymbol{7}"

%% From: (find-LATEX "edrx15.sty" "pbsymbol")
\def\pbsymbol#1{%
  \begin{picture}(#1,#1)
    \put(0,0){\line(1,0){#1}}
    \put(#1,#1){\line(0,-1){#1}}
  \end{picture}}





%D diagram LCCC-BCC
%D 2Dx         100     +30        +25      +30
%D 2D  100   {}d ===============> c,d{}		 
%D 2D          - /\               - ^		 
%D 2D          |  \\   |->        | |\BCC		 
%D 2D          v   \\             v -		 
%D 2D  +20  {}c,d <=\\=========== c,d{}{}		 
%D 2D           /\   \\             /\		 
%D 2D  +10       \\    d ===============> c,d{{}}	 
%D 2D             \\   -              \\   -	 
%D 2D              \\  |       <-|     \\  |\id	 
%D 2D               \\ v                \\ v	 
%D 2D  +20            c,d <============== c,d{{}}{}
%D 2D                                              
%D 2D  +10     a,b,c |----------> a,b		 
%D 2D              -  _|              -		 
%D 2D               \                  \		 
%D 2D                v                  v		 
%D 2D  +35            a,c |--------------> a	 
%D 2D                                              
%D ((  {}d      c,d{}		 # 0   1
%D    {}c,d     c,d{}{}	         # 2   3 
%D           d        c,d{{}}    #   4   5
%D          c,d       c,d{{}}{}  #   6   7
%D    @ 0 @ 1 =>
%D    @ 0 @ 2 |-> @ 1 @ 3 |-> sl_ .plabel= l \natural
%D                @ 1 @ 3 <-| sl^ .plabel= r \mathrm{BCC}
%D            @ 0 @ 3 harrownodes nil 20 nil |->
%D    @ 2 @ 3 <=
%D    @ 0 @ 4 <=  @ 2 @ 6 <=  @ 3 @ 7 <=
%D    @ 0 @ 2 midpoint @ 4 @ 6 midpoint dharrownodes nil 14 nil <-|
%D    @ 4 @ 5 =>  @ 4 @ 6 |-> @ 5 @ 7 |-> .plabel= r \mathrm{id}
%D            @ 4 @ 7 harrownodes nil 20 nil <-|
%D    @ 6 @ 7 <=
%D ))
%D (( a,b,c     a,b		 
%D          a,c     a	 
%D    @ 0 @ 1 |->  @ 0 @ 2 |->  @ 1 @ 3 |->  @ 2 @ 3 |->
%D    @ 0 relplace 15 7 \pbsymbol{7}
%D )) 
%D enddiagram
$$\pu \diag{LCCC-BCC}$$







\end{document}


% Local Variables:
% coding: utf-8-unix
% ee-anchor-format: "«%s»"
% End: