From a31d04fa23c8df71a11ee5889e6103272ac3a36e Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Mon, 11 Oct 2021 15:40:36 +0100 Subject: [PATCH] doc: ctlseq: improve text formatting in CSI and SGR sections Using underlining for parameters allows the angle brackets to be removed while still keeping a visual separation between literals and parameters. The removes any uncertainty about whether the angle brackets are part of the sequence or not. It also mirrors the formatting used further down in the document. --- doc/foot-ctlseqs.7.scd | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/foot-ctlseqs.7.scd b/doc/foot-ctlseqs.7.scd index 6505470c..37d72011 100644 --- a/doc/foot-ctlseqs.7.scd +++ b/doc/foot-ctlseqs.7.scd @@ -128,13 +128,13 @@ equivalent to 8-bit C1 controls. # CSI -All sequences begin with *\\E[*, sometimes abbreviated _CSI_. Spaces +All sequences begin with *\\E[*, sometimes abbreviated "CSI". Spaces are used in the sequence strings to make them easier to read, but are -not actually part of the string. I.e. *\\E[ 1 m* is really *\\E[1m*. +not actually part of the string (i.e. *\\E[ 1 m* is really *\\E[1m*). ## SGR -All SGR sequences are in the form *\\E[ m*, where _N_ is a decimal +All SGR sequences are in the form *\\E[* _N_ *m*, where _N_ is a decimal number - the _parameter_. Multiple parameters can be combined in a single CSI sequence by separating them with semicolons: *\\E[ 1;2;3 m*. @@ -197,14 +197,14 @@ parameter based variants for setting foreground and background colors. Indexed colors: -- *\\E[ 38:5: m* -- *\\E[ 38;5; m* +- *\\E[ 38 : 5 :* _idx_ *m* +- *\\E[ 38 ; 5 ;* _idx_ *m* RGB colors: -- *\\E[ 38:2:::: m* -- *\\E[ 38:2::: m* -- *\\E[ 38;2;;; m* +- *\\E[ 38 : 2 :* _cs_ *:* _r_ *:* _g_ *:* _b_ *m* +- *\\E[ 38 : 2 :* _r_ *:* _g_ *:* _b_ *m* +- *\\E[ 38 ; 2 ;* _r_ *;* _g_ *;* _b_ *m* The first variant is the "correct" one (and foot also recognizes, but ignores, the optional _tolerance_ parameters). @@ -212,8 +212,8 @@ ignores, the optional _tolerance_ parameters). The second one is allowed since many programs "forget" the color space ID, _cs_. -The sub-parameter based variants are preferred, and what foot's -terminfo uses. +The sub-parameter based variants are preferred, and are what foot's +*terminfo*(5) entry uses. ## Private Modes