aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-07-31 14:44:23 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-07-31 14:44:23 +0200
commit171e7a112b85c103358bf9e45f60a35c71d298c3 (patch)
tree44f5d81215eebdde1205b5e58adf0054ff1d928b /README.md
parent5db9a7cbae982a68e99f80f77abebef6a873e6b4 (diff)
downloadgroff-tools-171e7a112b85c103358bf9e45f60a35c71d298c3.tar.gz
added Lua-based HIGHLIGHT macro and groff-ms.outlang for ms macros
* the highlight.sno and highlight.lua macros are considerde deprecated in favor of pygments-groff.py.
Diffstat (limited to 'README.md')
-rw-r--r--README.md23
1 files changed, 18 insertions, 5 deletions
diff --git a/README.md b/README.md
index bfb27ec..73a9fe1 100644
--- a/README.md
+++ b/README.md
@@ -23,19 +23,20 @@ To build the sample `select-from.ebnf`, type something like:
cat samples/select-from.ebnf | ./ebnf.sno | pic | groff -Tps >select-from.ps
-## HIGHLIGHT
+## HIGHLIGHT (SNOBOL4)
`highlight.sno` is a small preprocessor written in [CSNOBOL4](http://www.snobol4.org/csnobol4/)
that processes blocks of source code embedded in your Groff document with
[GNU Source-highlight](http://www.gnu.org/software/src-highlite/) to produce
syntax highlighted text.
-The output is formatted according to `groff.outlang` which currently only works with
-the [mom macros](http://www.schaffter.ca/mom/).
+The output is formatted according to `groff.outlang`.
+Versions for the [mom macros](http://www.schaffter.ca/mom/) (`groff-mom.outlang`) and
+for the classic ms macros (`groff-ms.outlang`) are provided.
-Example:
+Example (mom):
-```
+```groff
.QUOTE
.CODE
.HIGHLIGHT c
@@ -51,6 +52,18 @@ int main(int argc, char **argv)
.QUOTE OFF
```
+## HIGHLIGHT (Lua)
+
+`highlight.lua` is a reimplementation of `highlight.sno` in Lua 5.2 and may work
+better on some operating systems.
+
+In addition to the aforementioned syntax, the Lua version allows you to specify a filename after
+the language identifier to process an external file:
+
+```groff
+.HIGHLIGHT c hello.c
+```
+
## UML
`uml.sno` is a small preprocessor (again requires CSNOBOL4) that