Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
% A somewhat minimal "main" LaTeX file for dednat4 -
% the "\input ee.tex" line below loads a "dednat4 block"
% saved from Emacs - though it may also be produced in other
% ways; for example, by simply copying the "eedemo1.tex" or
% "eedemo2.tex" files to "ee.tex", as is done in the "demo"
% target of the Makefile:
%   (find-dn4 "Makefile" "demos")
% Note that before the:
%   \input ee.tex
% comes an:
%   \input tmp.dnt
% The tmp.dnt is produced from the ee.tex file by running
% something like this:
%   cd ~/usrc/dednat4/demos/
%   cp edrxmain.tex tmp.tex
%   ../dednat4 tmp.tex
% and the "tmp.tex" - that is a copy of this file - contains
% a line like this one,
%   %L processfile "ee.tex"
% that tells dednat4 to process the "ee.tex" file, and to get
% the trees and diagrams from it...
%
% Note that before the "\input tmp.dnt" and "\input ee.tex"
% we set the \documentclass, do several \usepackages to load
% standard packages, and then there comes this:
%   \input edrxglyphs.tex       % (find-dn4file "examples/edrxglyphs.tex")
%   \input edrxarrows.tex       % (find-dn4file "examples/edrxarrows.tex")
%   \input edrxdefs.tex         % (find-dn4file "examples/edrxdefs.tex")
%   \input edrxdnt.tex          % (find-dn4file "examples/edrxdnt.tex")
%   \input edrxheadfoot.tex     % (find-dn4file "examples/edrxheadfoot.tex")
%   \input edrxdednat.tex       % (find-dn4file "examples/edrxdednat.tex")
% In a _real_ minimal "main" LaTeX file only the "\input edrxdnt.tex"
% would be needed (or rather, only its "\def"s!), but I include
% the other ones because they make it easier for me to write
% interesting examples - and because at this point no one else
% cares anyway...

% (find-angg ".emacs" "dednat4")
% (find-angg "dednat4/examples/edrxmain.tex")
% (find-angg "LATEX/tmp.tex")
% 2009sep16

\documentclass[oneside]{book}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{stmaryrd}
\usepackage{array}

% \usepackage{bbm}
% (find-fline "/usr/share/texmf-tetex/tex/latex/bbm/bbm.sty")
% \DeclareMathAlphabet{\mathbbm}{U}{bbm}{m}{n}
% \SetMathAlphabet     \mathbbm{bold}{U}{bbm}{bx}{n}
% \DeclareMathAlphabet{\mathbbmss}{U}{bbmss}{m}{n}
% \SetMathAlphabet     \mathbbmss{bold}{U}{bbmss}{bx}{n}
% \DeclareMathAlphabet{\mathbbmtt}{U}{bbmtt}{m}{n}

\input edrxglyphs.tex           % (find-dn4file "examples/edrxglyphs.tex")
\input edrxarrows.tex           % (find-dn4file "examples/edrxarrows.tex")
\input edrxdefs.tex             % (find-dn4file "examples/edrxdefs.tex")
\input edrxdnt.tex              % (find-dn4file "examples/edrxdnt.tex")
\input edrxheadfoot.tex         % (find-dn4file "examples/edrxheadfoot.tex")
\input edrxdednat.tex           % (find-dn4file "examples/edrxdednat.tex")

\begin{document}

%L standardabbrevs()            -- (find-dn4file "dednat4.lua")
%L require "experimental.lua"   -- (find-dn4file "experimental.lua")
%L processfile "edrxdednat.tex" -- (find-dn4file "edrxdednat.tex")
%L processfile "ee.tex"
\input tmp.dnt
\input ee.tex

\end{document}


;;

(defun eedn4 (s e)
  "Write the region between S and E to ~/LATEX/ee.tex and write
an e-script to $EE; then running `ee' in a shell will run
dednat4.lua and then latex on ~/LATEX/tmp.tex (tmp.tex is a
wrapper around ee.tex) and display the resulting DVI file."
  (interactive "r")
  (ee-write s e "" "" "~/dednat4/ee.tex")
  (eev "cd ~/dednat4/ &&
        cp -v edrxmain.tex tmp.tex &&
        ./dednat4.lua tmp.tex &&
        latex tmp.tex &&
        rexdvi tmp.dvi"))

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