2 ms·
From http://www.tldp.org/HOWTO/Assembly-HOWTO/external.html http://www.tldp.org/HOWTO/Assembly-HOWTO/external.html: About m4 macro-processor: "However, its dis
by heinrichhartman 10y ago
From http://www.tldp.org/HOWTO/Assembly-HOWTO/external.html http://www.tldp.org/HOWTO/Assembly-HOWTO/external.html:
About m4 macro-processor: "However, its disfunctional quoting and unquoting semantics force you to use explicit continuation-passing tail-recursive macro style if you want to do advanced macro programming (which is remindful of TeX -- BTW, has anyone tried to use TeX as a macroprocessor for anything else than typesetting ?)."
This is a great point! The TeX Macro language is so much better than M4 quoting syntax. I'd love to have it available for e.g. writing blog-posts in HTML or coding.
It seems that the tex macroprocessor can not be used independently of latex, which is a pitty. There are m4 clones with TeX-like syntax (e.g. http://www.nongnu.org/t4/ http://www.nongnu.org/t4/) - but none of those seems to be used much.
To see what's possible with just assembly and macros see Tannenbaums paper: https://www.computer.org/csdl/trans/ts/1976/02/01702350.pdf https://www.computer.org/csdl/trans/ts/1976/02/01702350.pdf
- groovy2shoes 10y agoI'm a fan of TeX2page[1] for converting (La)TeX to HTML. There are also similar TeX/Scribe-inspired markup processors. Scribble[2] comes to mind, and Chibi Scheme[3] even comes with a very lightweight, very configurable "Scribble" processor in the form of `chibi-doc`. Chibi's flavor is a little more similar to TeX (using '\' as the leader rather than '@', for example), if that's important to you. [1]: https://ds26gte.github.io/tex2page/index.html https://ds26gte.github.io/tex2page/index.html [2]: https://docs.racket-lang.org/scribble/index.html https://docs.racket-lang.org/scribble/index.html [3]: http://synthcode.com/wiki/chibi-scheme http://synthcode.com/wiki/chibi-scheme And here's Chibi's own manual written in it: https://github.com/ashinn/chibi-scheme/blob/master/doc/chibi.scrbl https://github.com/ashinn/chibi-scheme/blob/master/doc/chibi... I think it would be freakishly easy to adapt chibi-doc into a general text preprocessor rather than an HTML generator, and honestly I've thought about it before. I may just do it yet :)
- heinrichhartman 10y agoWow, tex2page looks really great. I'll might setup a JEKYLL workflow for using it to write blog posts. LaTeX doc semantics are so much better than Markdown / HTML. Also I can see a LISP style macro processor being super awesome. Let me know if you are going to adapt chibi-doc that way.