]> gitweb.factorcode.org Git - factor.git/commitdiff
help.markup: adding $vocab-subsections which renders nicer.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 2 Jan 2022 03:32:03 +0000 (19:32 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 2 Jan 2022 03:32:03 +0000 (19:32 -0800)
basis/colors/colors-docs.factor
basis/db/db-docs.factor
basis/help/markup/markup.factor
basis/ui/pens/pens-docs.factor
basis/unicode/unicode-docs.factor
basis/wrap/wrap-docs.factor
basis/xml/xml-docs.factor
core/checksums/checksums-docs.factor
core/io/encodings/encodings-docs.factor
extra/graphviz/graphviz-docs.factor

index dea28c433219b689d7408e9056f0c1145c9e7bcb..ebd648f0cac3ef0927033e41d7fb0713ce0d2b52 100644 (file)
@@ -84,16 +84,18 @@ $nl
     "colors.constants"
 }
 "Color implementations:"
-{ $vocab-subsection "CIE 1931 XYZ colors" "colors.xyz" }
-{ $vocab-subsection "CIE 1931 xyY colors" "colors.xyy" }
-{ $vocab-subsection "CIE 1976 LAB colors" "colors.lab" }
-{ $vocab-subsection "CIE 1976 LUV colors" "colors.luv" }
-{ $vocab-subsection "CMYK colors" "colors.cmyk" }
-{ $vocab-subsection "Grayscale colors" "colors.gray" }
-{ $vocab-subsection "HSL colors" "colors.hsl" }
-{ $vocab-subsection "HSV colors" "colors.hsv" }
-{ $vocab-subsection "RYB colors" "colors.ryb" }
-{ $vocab-subsection "YIQ colors" "colors.yiq" }
-{ $vocab-subsection "YUV colors" "colors.yuv" } ;
+{ $vocab-subsections
+    { "CIE 1931 XYZ colors" "colors.xyz" }
+    { "CIE 1931 xyY colors" "colors.xyy" }
+    { "CIE 1976 LAB colors" "colors.lab" }
+    { "CIE 1976 LUV colors" "colors.luv" }
+    { "CMYK colors" "colors.cmyk" }
+    { "Grayscale colors" "colors.gray" }
+    { "HSL colors" "colors.hsl" }
+    { "HSV colors" "colors.hsv" }
+    { "RYB colors" "colors.ryb" }
+    { "YIQ colors" "colors.yiq" }
+    { "YUV colors" "colors.yuv" }
+} ;
 
 ABOUT: "colors"
index f0d631f9602f6f5ee2059f91da689df04ba9b056..41af87f04d2f40f4f410d2de263ce30ee91d7b53 100644 (file)
@@ -181,9 +181,10 @@ ARTICLE: "db" "Database library"
 "Accessing a database:"
 { $subsections "db-custom-database-combinators" }
 "Higher-level database help:"
-{ $vocab-subsection "Database types" "db.types" }
-{ $vocab-subsection "High-level tuple/database integration" "db.tuples" }
-$nl
+{ $vocab-subsections
+    { "Database types" "db.types" }
+    { "High-level tuple/database integration" "db.tuples" }
+}
 "Low-level database help:"
 { $subsections
     "db-protocol"
@@ -191,8 +192,10 @@ $nl
     "db-lowlevel-tutorial"
 }
 "Supported database backends:"
-{ $vocab-subsection "SQLite" "db.sqlite" }
-{ $vocab-subsection "PostgreSQL" "db.postgresql" } ;
+{ $vocab-subsections
+    { "SQLite" "db.sqlite" }
+    { "PostgreSQL" "db.postgresql" }
+} ;
 
 ARTICLE: "db-random-access-result-set" "Random access result sets"
 "Random-access result sets do not have to be traversed in order. For instance, PostgreSQL's result set object can be accessed as a matrix with i,j coordinates."
index e72c6606e2c00fceaf6dafcb2c1dbe580d7a228f..8401d0b1b01f3a6353384667157d59c8e71ad369 100644 (file)
@@ -256,6 +256,9 @@ PRIVATE>
         if*
     ] ($subsection) ;
 
+: $vocab-subsections ( element -- )
+    [ $vocab-subsection ] each ($blank-line) ;
+
 : $vocab-link ( element -- )
     check-first [ vocab-name ] keep ($vocab-link) ;
 
index d95bc2d8c5f7abd53804cc48cbe8084cb5f9bc41..e32919323cf7bdd830b4c6cb87bce9c5333fa865 100644 (file)
@@ -18,9 +18,11 @@ ARTICLE: "ui-pen-protocol" "UI pen protocol"
 "The default value of these slots is the " { $link f } " singleton, which implements the above protocol by doing nothing."
 $nl
 "Some other pre-defined implementations:"
-{ $vocab-subsection "Gradient pens" "ui.pens.gradient" }
-{ $vocab-subsection "Image pens" "ui.pens.image" }
-{ $vocab-subsection "Polygon pens" "ui.pens.polygon" }
-{ $vocab-subsection "Solid pens" "ui.pens.solid" }
-{ $vocab-subsection "Tile pens" "ui.pens.tile" }
+{ $vocab-subsections
+    { "Gradient pens" "ui.pens.gradient" }
+    { "Image pens" "ui.pens.image" }
+    { "Polygon pens" "ui.pens.polygon" }
+    { "Solid pens" "ui.pens.solid" }
+    { "Tile pens" "ui.pens.tile" }
+}
 "Custom implementations must follow the guidelines set forth in " { $link "ui-paint-custom" } "." ;
index 21c2febd099302795d8840a3dfeeeb4d7d19f24d..b5e908f624e94df8ddea3a9b0093e3632aabdc3d 100644 (file)
@@ -9,14 +9,18 @@ $nl
 "The Unicode character set is accompanied by several standard algorithms for common operations like encoding text in files, capitalizing a string, finding the boundaries between words, and so on."
 $nl
 "The Unicode algorithms implemented by the " { $vocab-link "unicode" } " vocabulary are:"
-{ $vocab-subsection "Case mapping" "unicode.case" }
-{ $vocab-subsection "Collation and weak comparison" "unicode.collation" }
-{ $vocab-subsection "Character classes" "unicode.categories" }
-{ $vocab-subsection "Word and grapheme breaks" "unicode.breaks" }
-{ $vocab-subsection "Unicode normalization" "unicode.normalize" }
+{ $vocab-subsections
+    { "Case mapping" "unicode.case" }
+    { "Collation and weak comparison" "unicode.collation" }
+    { "Character classes" "unicode.categories" }
+    { "Word and grapheme breaks" "unicode.breaks" }
+    { "Unicode normalization" "unicode.normalize" }
+}
 "The following are mostly for internal use:"
-{ $vocab-subsection "Unicode category syntax" "unicode.categories" }
-{ $vocab-subsection "Unicode data tables" "unicode.data" }
+{ $vocab-subsections
+    { "Unicode category syntax" "unicode.categories" }
+    { "Unicode data tables" "unicode.data" }
+}
 { $see-also "ascii" "io.encodings" } ;
 
 ABOUT: "unicode"
index c0a68e60a16324fc1d9df14a302b8b161efd5155..21035504929c76c51178d5eb3127b4e94a4e1571 100644 (file)
@@ -7,8 +7,10 @@ ABOUT: "wrap"
 
 ARTICLE: "wrap" "Word wrapping"
 "The " { $vocab-link "wrap" } " vocabulary implements word wrapping. Wrapping can take place based on simple strings, assumed to be monospace, or abstract word objects."
-{ $vocab-subsection "String word wrapping" "wrap.strings" }
-{ $vocab-subsection "Word object wrapping" "wrap.words" } ;
+{ $vocab-subsections
+    { "String word wrapping" "wrap.strings" }
+    { "Word object wrapping" "wrap.words" }
+} ;
 
 HELP: element
 { $class-description "An element to be wrapped. It has the following slots:" }
index 6318cec93ffd2d2ee14ce6b704f7417a6ce1c175..092fb2c3131a79dc363fd8f94c402b7463c132da 100644 (file)
@@ -110,11 +110,13 @@ ARTICLE: "xml" "XML parser"
     { "xml" "events" }
     { "xml" "namespaces" }
 }
-{ $vocab-subsection "Writing XML" "xml.writer" }
-{ $vocab-subsection "XML parsing errors" "xml.errors" }
-{ $vocab-subsection "XML entities" "xml.entities" }
-{ $vocab-subsection "XML data types" "xml.data" }
-{ $vocab-subsection "Utilities for traversing XML" "xml.traversal" }
-{ $vocab-subsection "Syntax extensions for XML" "xml.syntax" } ;
+{ $vocab-subsections
+    { "Writing XML" "xml.writer" }
+    { "XML parsing errors" "xml.errors" }
+    { "XML entities" "xml.entities" }
+    { "XML data types" "xml.data" }
+    { "Utilities for traversing XML" "xml.traversal" }
+    { "Syntax extensions for XML" "xml.syntax" }
+} ;
 
 ABOUT: "xml"
index 9f33b355dadfeb442242574c6d2afc4f371040ea..cef909bb1e17888154aedaf605572661b1426be1 100644 (file)
@@ -72,12 +72,14 @@ $nl
     get-checksum
 }
 "Checksum implementations:"
-{ $vocab-subsection "CRC32 checksum" "checksums.crc32" }
-{ $vocab-subsection "MD5 checksum" "checksums.md5" }
-{ $vocab-subsection "SHA checksums" "checksums.sha" }
-{ $vocab-subsection "Adler-32 checksum" "checksums.adler-32" }
-{ $vocab-subsection "OpenSSL checksums" "checksums.openssl" }
-{ $vocab-subsection "Internet checksum" "checksums.internet" }
-{ $vocab-subsection "Checksum using an external utility" "checksums.process" } ;
+{ $vocab-subsections
+    { "CRC32 checksum" "checksums.crc32" }
+    { "MD5 checksum" "checksums.md5" }
+    { "SHA checksums" "checksums.sha" }
+    { "Adler-32 checksum" "checksums.adler-32" }
+    { "OpenSSL checksums" "checksums.openssl" }
+    { "Internet checksum" "checksums.internet" }
+    { "Checksum using an external utility" "checksums.process" }
+} ;
 
 ABOUT: "checksums"
index ddcf2f37fb9219062e4ca1860da47d308c58a5dc..95cb73e8ad51100bbb5d80da6587193504d376a7 100644 (file)
@@ -92,12 +92,13 @@ ARTICLE: "encodings-descriptors" "Encoding descriptors"
     "io.encodings.binary"
     "io.encodings.utf8"
 }
-{ $vocab-subsection "UTF-16 encoding" "io.encodings.utf16" }
-{ $vocab-subsection "UTF-32 encoding" "io.encodings.utf32" }
-{ $vocab-subsection "Strict encodings" "io.encodings.strict" }
-"Legacy encodings:"
-{ $vocab-subsection "8-bit encodings" "io.encodings.8-bit" }
-{ $vocab-subsection "ASCII encoding" "io.encodings.ascii" }
+{ $vocab-subsections
+    { "UTF-16 encoding" "io.encodings.utf16" }
+    { "UTF-32 encoding" "io.encodings.utf32" }
+    { "Strict encodings" "io.encodings.strict" }
+    { "8-bit encodings" "io.encodings.8-bit" }
+    { "ASCII encoding" "io.encodings.ascii" }
+}
 { $see-also "encodings-introduction" } ;
 
 ARTICLE: "encodings-protocol" "Encoding protocol"
index c581d98eb53aa195e867fa09f84c1caefc5551c2..6a904e3a71e95abc67bfdc69f60018fa4f04eb6c 100644 (file)
@@ -926,10 +926,11 @@ $nl
 "This vocabulary provides the basic tools to construct Factor representations of graphs. For more details, see:"
 { $subsections { "graphviz" "data" } }
 "Other vocabularies let you change a graph's look & feel, write cleaner code to represent it, and (of course) generate its Graphviz output:"
-{ $vocab-subsection "Graphviz attributes" "graphviz.attributes" }
-{ $vocab-subsection "Graphviz notation" "graphviz.notation" }
-{ $vocab-subsection "Rendering Graphviz output" "graphviz.render" }
-$nl
+{ $vocab-subsections
+    { "Graphviz attributes" "graphviz.attributes" }
+    { "Graphviz notation" "graphviz.notation" }
+    { "Rendering Graphviz output" "graphviz.render" }
+}
 "After reading the above, you can see several examples in action:"
 { $subsections { "graphviz" "gallery" } }
 ;