From d5727a5964c859359c0b6e4fcf5b4e91ec8f4569 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 12 Jan 2021 22:06:56 -0500 Subject: Move hilex out of hilex directory --- bin/man1/hilex.1 | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 bin/man1/hilex.1 (limited to 'bin/man1') diff --git a/bin/man1/hilex.1 b/bin/man1/hilex.1 new file mode 100644 index 00000000..858c8565 --- /dev/null +++ b/bin/man1/hilex.1 @@ -0,0 +1,177 @@ +.Dd January 12, 2021 +.Dt HILEX 1 +.Os +. +.Sh NAME +.Nm hilex +.Nd syntax highlighter +. +.Sh SYNOPSIS +.Nm +.Op Fl t +.Op Fl f Ar format +.Op Fl l Ar lexer +.Op Fl n Ar name +.Op Fl o Ar opts +.Op Ar file +. +.Sh DESCRIPTION +The +.Nm +utility +syntax highlights +the contents of +.Ar file +or standard input +and formats it on standard output. +. +.Pp +The arguments are as follows: +.Bl -tag -width "-f format" +.It Fl f Ar format +Set the output format. +See +.Sx Output Formats . +The default format is +.Cm ansi . +. +.It Fl l Ar lexer +Set the input lexer. +See +.Sx Input Lexers . +The default input lexer is inferred from +.Ar name . +. +.It Fl n Ar name +Set the name used to infer the input lexer. +The default is the final component of +.Ar file . +. +.It Fl o Ar opts +Set output format options. +.Ar opts +is a comma-separated list of options. +Options for each output format are documented in +.Sx Output Formats . +. +.It Fl t +Default to the +.Cm text +input lexer if one cannot be inferred. +.El +. +.Ss Output Formats +.Bl -tag -width Ds +.It Cm ansi +Output ANSI terminal control sequences. +. +.It Cm html +Output HTML +.Sy +elements +within a +.Sy
+element.
+Each element has the classes
+.Sy hilex
+and one of the following:
+.Sy Operator ,
+.Sy Number ,
+.Sy Keyword ,
+.Sy Identifier ,
+.Sy Macro ,
+.Sy Comment ,
+.Sy String ,
+.Sy StringEscape ,
+.Sy StringFormat ,
+.Sy Interpolation .
+.
+.Pp
+The options are as follows:
+.Bl -tag -width "title=..."
+.It Cm style Ns = Ns Ar url
+With
+.Cm document ,
+output a
+.Sy 
+element for the external stylesheet
+.Ar url .
+If unset,
+output default styles in a
+.Sy