man pages are hard, and i suck. move the examples to the examples section, and help the reader by grouping each program or each inverse pair in its own paragraph Reference: /n/atom/patch/applied/manrune Date: Wed Apr 22 07:06:54 CES 2015 Signed-off-by: quanstro@quanstro.net --- /sys/man/1/rune Wed Apr 22 07:05:54 2015 +++ /sys/man/1/rune Wed Apr 22 07:05:55 2015 @@ -1,6 +1,6 @@ .TH RUNE 1 .SH NAME -block, case, compose, decompose, fold, type, uconv, unfold \- rune transformations +block, case, compose, decompose, fold, surrogate, type, uconv, unfold, unsurrogate \- rune transformations .SH SYNOPSIS .B rune/block .I rune ... @@ -32,6 +32,11 @@ .I file ... ] .br +.B rune/surrogate +[ +.I file ... +] +.br .B rune/type [-x] [ .I file ... @@ -54,16 +59,23 @@ .I re ... ] .br +.B rune/unsurrogate +[ +.I file ... +] .SH DESCRIPTION These programs provide transformations on runes. +.PP .I Block converts from rune to the containing Unicode block name. +.PP If there exists a case conversion from the given rune, .I case converts to the specified case. The .B ltu flags convert to lower, title and upper case, respectively. The default is lower case. +.PP If there exists an equivalent precombined codepoint, .I compose combines base codepoints with any following combining @@ -77,6 +89,7 @@ .B "\\\\U" escapes, suitable for conversion with .IR uconv . +.PP .I Fold converts codepoints to their base codepoint, esentially stripping combining characters while @@ -86,6 +99,7 @@ Both accept .B -i which makes the conversion case insensitive. +.PP .I Type prints the codepoint then the type classes of each given rune, which may be any of @@ -99,11 +113,7 @@ Upper- and lowercase append the type with a string consisting of a colon, the corresponding lower- or upper case rune and the codepoint in parenthesis. Digit values are followed by a colon -and the corresponding digit value. For example -.IP -.EX - 03b1 alpha lower:Α(0391) -.EE +and the corresponding digit value. .PP .I Uconv converts @@ -115,19 +125,34 @@ flag, it is assumed that the escapes are terminated by non-numbers so the number of digits is not checked while .I -n -sets the default width. For example, one could simulate -the output of -.IR unicode -(see -.IR ascii (1)) -with +sets the default width. +.PP +.I Surrogate +converts runes outside the Basic Plane to surrogate pairs while +runes in the Basic Plane are unchanged; +.I unsurrogate +is its inverse. Surrogate pairs are not used within the system. +.SH EXAMPLES +Generate the first 10 Greek letters .IP .EX awk 'BEGIN{for(i=945; i<955; i++)printf "\\\\u%.4x", i}' | rune/uconv +.EE +.PP +Find alternate spellings of “naïve” in the dictionary +.IP +.EX grep `{rune/unfold naïve} /lib/words .EE .PP +Show the type of +.L a +.IP +.EX + 03b1 alpha lower:Α(0391) +.EE + .SH FILES .TP .B /lib/unicode