Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
% A demo of how to use dednat6 to generate code that does not need lualatex.
% This file:
%   http://angg.twu.net/LATEX/2018dednat6-no-lua.tex.html
%   http://angg.twu.net/LATEX/2018dednat6-no-lua.tex
%                (find-LATEX "2018dednat6-no-lua.tex")
% See: http://angg.twu.net/dednat6.html#no-lua
%
%
% This file can be texed in the usual way, i.e., with:
%
%   lualatex 2018dednat6-no-lua.tex
%
% and every time you do that it will create (or overwrite) a file
% "2018dednat6-no-lua.dnt" on the disk - due to the call to
% "write_dnt_file()" at the end. Once you have that .dnt file you can
% compile it with pdflatex instead of with lualatex, like this:
%
%   pdflatex 2018dednat6-no-lua.tex
%
% the "\ifluatex" block below will recognize that you don't have Lua
% and will load the "\defdiag"s and "\defded"s from .dnt file and make
% all calls to "\pu" no-ops.
%
% Note that to compile this with "lualatex 2018dednat6-no-lua.tex" we
% need these files:
%
%   2018dednat6-no-lua.tex
%   dednat6load.lua
%   dednat6/*             (<- lots of Lua files)
%
% and to compile it with "pdflatex 2018dednat6-no-lua.tex" we only
% need these ones:
%
%   2018dednat6-no-lua.tex
%   2018dednat6-no-lua.dnt
%
%
% Some emacs/eev-isms. You don't need to understand this.
% See: (find-eev-quick-intro "7.4. Commands with very short names")
%      http://angg.twu.net/eev-intros/find-eev-quick-intro.html#7.4
% (defun c () (interactive) (find-LATEXsh "lualatex -record 2018dednat6-no-lua.tex"))
% (defun c () (interactive) (find-LATEXsh "pdflatex -record 2018dednat6-no-lua.tex"))
% (defun d () (interactive) (find-xpdfpage "~/LATEX/2018dednat6-no-lua.pdf"))
% (defun e () (interactive) (find-LATEX "2018dednat6-no-lua.tex"))
% (defun u () (interactive) (find-latex-upload-links "2018dednat6-no-lua"))
%   (find-pdf-page "~/LATEX/2018dednat6-no-lua.pdf")
% http://angg.twu.net/LATEX/2018dednat6-no-lua.pdf
%
%
\documentclass[oneside]{book}
\usepackage{ifluatex}
\usepackage{proof}   % For derivation trees ("%:" lines)
\input diagxy        % For 2D diagrams ("%D" lines)
\xyoption{curve}     % For the ".curve=" feature in 2D diagrams
\begin{document}

\ifluatex
  \catcode`\^^J=10
  \directlua{dofile "dednat6load.lua"}
\else
  \input\jobname.dnt
  \def\pu{}
\fi

A tree:
%
%L addabbrevs("->", "\\to ")
%
%:  [a]^1  a->b
%:  -----------
%:       b       b->c
%:       ------------
%:            c
%:          ----1
%:          a->c
%:
%:          ^comp
%:
\pu
$$\ded{comp}$$



\def\catA{\mathbf{A}}
\def\catB{\mathbf{B}}

A diagram:
%
%D diagram adj
%D 2Dx     100     +25
%D 2D  100 LA <--| A
%D 2D      |       |
%D 2D      |  <->  |
%D 2D      v       v
%D 2D  +25 B |--> RB  
%D 2D
%D 2D  +15 \catB \catA
%D 2D
%D (( LA A <-|
%D    LA B -> A RB ->
%D    B RB |->
%D    LA RB harrownodes nil 20 nil <->
%D    \catB \catA <- sl^ .plabel= a L
%D    \catB \catA -> sl_ .plabel= b R
%D ))
%D enddiagram
%D
$$\pu
  \diag{adj}
$$


%L write_dnt_file()
\pu


\end{document}

% Local Variables:
% coding: utf-8-unix
% End: