aboutsummaryrefslogtreecommitdiffstats
path: root/doc/user/prg_opti
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/prg_opti')
-rw-r--r--doc/user/prg_opti112
1 files changed, 78 insertions, 34 deletions
diff --git a/doc/user/prg_opti b/doc/user/prg_opti
index 0b8dbb6..f48e662 100644
--- a/doc/user/prg_opti
+++ b/doc/user/prg_opti
@@ -7,28 +7,41 @@ The {@Code "@CP"}, {@Code "@Eiffel"} etc. symbols have a number of
options for changing the appearance of the printed program. These
options are the same for all symbols, although their default values
may vary. The @Code "style" option changes the printing style; its
+programs. @RawIndex { programs }
+programs.style @SubIndex { @Code "style" option }
+style. @RawIndex { @Code "style" option }
+style.in.programs @SubIndex { in programs }
+programs. @RawIndex { programs }
+programs.fixed @SubIndex { @Code "fixed" style }
+fixed.programs @Index { @Code "fixed" style (programs) }
value may be {@Code "fixed"} (fixed-width font), {@Code "varying"}
+programs. @RawIndex { programs }
+programs.varying @SubIndex { @Code "varying" style }
+varying.programs @Index { @Code "varying" style (programs) }
+programs. @RawIndex { programs }
+programs.symbol @SubIndex { @Code "symbol" style }
+symbol.programs @Index { @Code "symbol" style (programs) }
(varying-width font), or {@Code "symbol"} (varying-width font with
mathematical symbols used for some operators). Its default value
depends on the language, and may be found in the fourth column of
the table at the start of this chapter. The example in the previous
section was in @Code fixed style; we can switch styles like this:
-@ID @OneRow @Code {
-"@CP"
-" style { varying }"
-"{"
-"#include <stdio.h>"
-""
-"treeprint(p) /* print tree p recursively */"
-"struct tnode *p;"
-"{"
-" if (p != NULL) {"
-" treeprint(p->left);"
-" printf(\"%4d %s\\n\", p->count, p->word);"
-" treeprint(p->right);"
-" }"
-"}"
-"}"
+@ID @OneRow @Code @Verbatim {
+@CP
+ style { varying }
+{
+#include <stdio.h>
+
+treeprint(p) /* print tree p recursively */
+struct tnode *p;
+{
+ if (p != NULL) {
+ treeprint(p->left);
+ printf(\%4d %s\\n\, p->count, p->word);
+ treeprint(p->right);
+ }
+}
+}
}
The result in this case will be
@ID @OneRow @CP style { varying }
@@ -65,31 +78,44 @@ with mathematical symbols replacing some of the operators.
The {@Code "@CP"}, {@Code "@Eiffel"} etc. symbols have additional options
which allow a finer control over the style. Here they all are, with their
default values:
-@ID @OneRow @Code {
-"@CP [ or @Eiffel, @Blue, etc. ]"
-" style { fixed }"
-" numbered { No }"
-" font { Courier }"
-" size { -1.0p }"
-" line { 1.0vx }"
-" tabin { 8 }"
-" tabout { 8s }"
-" identifiers { Base }"
-" keywords { Base }"
-" operators { Base }"
-" numbers { Base }"
-" strings { Base }"
-" comments { Base }"
-"{"
-" ..."
-"}"
+@ID @OneRow @Code @Verbatim {
+@CP [ or @Eiffel, @Blue, etc. ]
+ style { fixed }
+ numbered { No }
+ font { Courier }
+ size { -1.0p }
+ line { 1.0vx }
+ tabin { 8 }
+ tabout { 8s }
+ identifiers { Base }
+ keywords { Base }
+ operators { Base }
+ numbers { Base }
+ strings { Base }
+ comments { Base }
+{
+ ...
+}
}
We are already familiar with {@Code "style"}. After that comes
{@Code "numbered"}, whose value may be {@Code "No"} (the default),
{@Code "Yes"}, or a number, and which determines whether or not
+programs. @RawIndex { programs }
+programs.numbered @SubIndex { @Code "numbered" option }
+numbered.programs @Index { @Code "numbered" option (programs) }
line numbers are to be added and if so the value of the first
one. Next we have
{@Code "font"}, which determines the font family to use, {@Code "size"},
+programs. @RawIndex { programs }
+programs.font @SubIndex { @Code "font" option }
+font.option. @RawIndex { @Code "font" option }
+font.option.in.programs @SubIndex { in program formatting }
+programs. @RawIndex { programs }
+programs.size @SubIndex { @Code "size" option }
+size.programs @Index { @Code "size" option (programs) }
+programs. @RawIndex { programs }
+programs.line @SubIndex { @Code "line" option }
+line.programs @Index { @Code "line" option (programs) }
the font size to use, and {@Code "line"}, the inter-line spacing. The
default value for @Code "size" asks for one point smaller than in the
surrounding document; this was done to compensate for Courier's relatively
@@ -98,6 +124,24 @@ large appearance compared to other fonts of the same nominal size.
The @Code "tabin" and @Code "tabout" options are the subject of
Section {@NumberOf tabs}. After them come six options giving the
particular font faces in which to print identifiers, keywords, operators,
+programs. @RawIndex { programs }
+programs.identifiers @SubIndex { @Code "identifiers" option }
+identifiers.programs @Index { @Code "identifiers" option (programs) }
+programs. @RawIndex { programs }
+programs.keywords @SubIndex { @Code "keywords" option }
+keywords.programs @Index { @Code "keywords" option (programs) }
+programs. @RawIndex { programs }
+programs.operators @SubIndex { @Code "operators" option }
+operators.programs @Index { @Code "operators" option (programs) }
+programs. @RawIndex { programs }
+programs.numbers @SubIndex { @Code "numbers" option }
+numbers.programs @Index { @Code "numbers" option (programs) }
+programs. @RawIndex { programs }
+programs.strings @SubIndex { @Code "strings" option }
+strings.programs @Index { @Code "strings" option (programs) }
+programs. @RawIndex { programs }
+programs.comments @SubIndex { @Code "comments" option }
+comments.programs @Index { @Code "comments" option (programs) }
numbers, strings, and comments. {@Code "Base"} means the basic face; other
commonly available choices are {@Code "Slope"} and {@Code "Bold"}. These
options may all be set to different faces if desired. The default values