#* This is an attempt at a clean-slate implementation of the "mark" scripts. But this one will first generate LaTeX output THIS DOCUMENT FORMAT This is a document format I have used in many code and booklet files. HISTORY A 21 April 2021 Script begun *# read; ![:space:] { whilenot [:space:]; put; clear; add "word*"; push; .reparse } [\n] { put; clear; add "nl*"; push; .reparse } [\r\t ] { clear; .restart } parse> # ------------- # 1 token pop; "nl*" { nop; } "word*" { clear; get; # no numbers in headings! [A-Z] { clear; add "uuword*"; push; .reparse } clear; add "word*"; } pop; # ------------- # 2 tokens # ellide text "word*word*","text*word*" { clear; get; add " "; ++; get; --; put; clear; add "text*"; push; .reparse } # ellide upper case text "uuword*uuword*","uutext*uuword*" { clear; get; add " "; ++; get; --; put; clear; add "uutext*"; push; .reparse } # ellide multiple newlines "nl*nl*" { clear; get; ++; get; --; put; clear; add "nl*"; push; .reparse } pop; # ------------- # 3 tokens # top level headings, all upper case on the line in the source document "nl*uutext*nl*","nl*uuword*nl*" { clear; add 'heading('; ++; get; --; add ")"; put; print; clear; # transfer nl value ++; ++; get; --; put; clear; --; add "heading*nl*"; push; push; .reparse } push; push; push;