Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file: -- http://anggtwu.net/LUA/DednatPreamble1.lua.html -- http://anggtwu.net/LUA/DednatPreamble1.lua -- (find-angg "LUA/DednatPreamble1.lua") -- Author: Eduardo Ochs <eduardoochs@gmail.com> -- -- (defun e () (interactive) (find-angg "LUA/DednatPreamble1.lua")) -- -- This is a rewrite of: -- (find-dn6 "preamble6.lua") -- for Dednat7. -- «.preamble0» (to "preamble0") -- «.preamble1» (to "preamble1") -- «preamble0» (to ".preamble0") -- LaTeX needs to run these commands BEFORE the "\begin{document}". -- For some reason, doing "\directlua{output(preamble0)}" doesn't -- work; the obvious workaround is to include them in the .tex file -- explicitly. preamble0 = [==[ \usepackage{proof} % For derivation trees ("%:" lines) \input diagxy % For 2D diagrams ("%D" lines) \xyoption{curve} % For the ".curve=" feature in 2D diagrams ]==] -- «preamble1» (to ".preamble1") -- These commands can be run either before of after "\begin{document}". -- Usage: "\directlua{output(preamble1)}". -- See: (find-LATEX "edrxdnt.tex" "diagxy") -- (find-LATEX "edrx15.sty" "picture-cells") preamble1 = [==[ % Dednat6's "preamble1": % \def\diagxyto{\ifnextchar/{\toop}{\toop/>/}} \def\to {\rightarrow} % \def\defded#1#2{\expandafter\def\csname ded-#1\endcsname{#2}} \def\ifdedundefined#1{\expandafter\ifx\csname ded-#1\endcsname\relax} \def\ded#1{\ifdedundefined{#1} \errmessage{UNDEFINED DEDUCTION: #1} \else \csname ded-#1\endcsname \fi } \def\defdiag#1#2{\expandafter\def\csname diag-#1\endcsname{\bfig#2\efig}} \def\defdiagprep#1#2#3{\expandafter\def\csname diag-#1\endcsname{{#2\bfig#3\efig}}} \def\ifdiagundefined#1{\expandafter\ifx\csname diag-#1\endcsname\relax} \def\diag#1{\ifdiagundefined{#1} \errmessage{UNDEFINED DIAGRAM: #1} \else \csname diag-#1\endcsname \fi } % \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax} \ifundefined {celllower} \newlength {\celllower} \fi \ifundefined {lcelllower} \newlength{\lcelllower} \fi \def\cellfont{} \def\lcellfont{} \def\cell #1{\lower\celllower\hbox to 0pt{\hss\cellfont${#1}$\hss}} \def\lcell#1{\lower\celllower\hbox to 0pt {\lcellfont${#1}$\hss}} % \def\expr#1{\directlua{output(tostring(#1))}} \def\eval#1{\directlua{#1}} \def\pu{\directlua{pu()}} % % End of preamble1. ]==] dednat7preamble = function () output(preamble1) end --[[ * (eepitch-lua51) * (eepitch-kill) * (eepitch-lua51) dofile "DednatPreamble1.lua" dofile "Output1.lua" dofile "DeleteComments3.lua" = deletecomments(preamble1) dednat7preamble() --]] -- Local Variables: -- coding: utf-8-unix -- End: