Warning: this is an htmlized version!
The original is across this link,
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"))


\documentclass[oneside,12pt]{article}
\usepackage[colorlinks,urlcolor=DarkRed]{hyperref}
\usepackage[x11names,svgnames]{xcolor}
%\usepackage{color}
%\usepackage{colorweb}
\begin{document}

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




\catcode`\^^J=10
\directlua{dofile "dednat6/minimalcore.lua"}  % (find-dednat6 "dednat6/minimalcore.lua")
\directlua{texfile0(status.filename)}
\def\pu{\directlua{pu()}}

% A trivial test:

%L output("Hello!")
\pu

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

\bigskip

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 ]])
\pu

% 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 }

%N FOO
%N BOO
\pu



\bigskip

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

\url{https://tug.org/TUGboat/tb39-3/tb123ochs-dednat.pdf}



\end{document}





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