Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
% A test for minimalcore.lua.
% This file: http://angg.twu.net/dednat6/demo-core.tex.html
%            http://angg.twu.net/dednat6/demo-core.tex
%                         (find-dednat6 "demo-core.tex")
%    Output: http://angg.twu.net/dednat6/demo-core.pdf
%       See: http://angg.twu.net/dednat6.html
%            http://angg.twu.net/dednat6.html#hacking
%            http://angg.twu.net/dednat6/dednat6/minimalcore.lua.html
%                         (find-dednat6 "dednat6/minimalcore.lua")
% This comment block contains some emacs/eev-isms.
% You don't need to understand them.
% 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-dednat6sh "lualatex -record demo-core.tex"))
% (defun d () (interactive) (find-pdf-page         "~/dednat6/demo-core.pdf"))
% (defun d () (interactive) (find-pdftools-page    "~/dednat6/demo-core.pdf"))
% (defun e () (interactive) (find-dednat6 "demo-core.tex"))
% (defun l () (interactive) (find-dednat6 "dednat6/minimalcore.lua"))
% (defun u () (interactive) (find-latex-upload-links "demo-core"))


\title{Dednat6: a demo of minimalcore.lua}
\author{Eduardo Ochs}
\date{June 6, 2020}

\directlua{dofile "dednat6/minimalcore.lua"}  % (find-dednat6 "dednat6/minimalcore.lua")

% A trivial test:

%L output("Hello!")

If you want to study the source code of dednat6 and learn how to add
your own extensions, start by this.


Some tests (see the source!):

% Now the non-trivial things!!!
% This block reveals a bug!!! Uuugh!!! See:
% https://tug.org/pipermail/luatex/2020-June/007364.html
%L tex.print([[
%L \begin{verbatim}
%L foo
%L   poo
%L     boo
%L \end{verbatim}
%L ]])

% It is easy to add new heads.
% Here is an example:
%L registerhead "%N" {
%L   name   = "lua",
%L   action = function ()
%L       local i,j,body = tf:getblockstr()
%L       output(body)
%L       for n=i,j do output(n..": "..texlines:nohead(n)) end
%L     end,
%L }



You will need to understand the sections 3 and 4 of the TUGBoat article:



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