home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / lout2.lzh / LOUT2 / DOC / TR.TAB / s2 < prev    next >
Text File  |  1994-01-25  |  4KB  |  98 lines

  1. @Section
  2.    @Title { Changing the style of entries and columns }
  3. @Begin
  4. @PP
  5. The style of an entry is mainly determined by four symbols from standard
  6. Lout:  {@Code "@Font"}, {@Code "@Break"}, {@Code "@Wide"}, and
  7. {@Code "@High"}.  We will review them only briefly here, since they are
  8. treated elsewhere [{@Ref kingston92}, {@Ref kingston92begin}],
  9. then explain how they are used within tables.
  10. @PP
  11. The @Code "@Font" symbol changes the font and font size of an object.  For
  12. example,
  13. @ID @Code "Slope @Font { hello world }"
  14. produces {Slope @Font { hello world }}, and
  15. @ID @Code "{ Bold +2p } @Font { hello world }"
  16. produces
  17. @ID {{ Bold +2p } @Font { hello world }}
  18. which is two points larger than it otherwise would have been, as well
  19. as set in bold.  The DocumentLayout package provides the abbreviations
  20. @Code "@I" and @Code "@B" for @Code "Slope @Font" and {@Code "Bold @Font"}.
  21. @PP
  22. The @Code "@Break" symbol affects paragraph breaking.  Most relevant
  23. here are @Code "clines @Break" and {@Code "rlines @Break"}, which will
  24. centre or right-justify one or more lines in the given column:
  25. @ID @Code {
  26. "clines @Break {"
  27. "A small centred"
  28. "paragraph."
  29. "}"
  30. }
  31. produces
  32. @ID {
  33. clines @Break {
  34. A small centred
  35. paragraph.
  36. }
  37. }
  38. for example.  Actually, there is a small problem with these symbols:  they
  39. only work on paragraphs of at least two words, so they will fail to
  40. centre or right-justify a solitary word.  Tab provides two symbols,
  41. {@Code "@CC"} and {@Code "@RR"}, which do essentially the same thing,
  42. but which work on single words as well.
  43. @PP
  44. The @Code "@Wide" symbol forces an object to have a given width, by
  45. padding it with white space on the right if it is too small, or breaking
  46. its paragraphs if it is too wide:
  47. @ID @Code {
  48. "1.5i @Wide {"
  49. "This small paragraph will"
  50. "be broken to a width of"
  51. "one and one half inches."
  52. "}"
  53. }
  54. produces
  55. @ID {
  56. 1.5i @Wide {
  57. This small paragraph will
  58. be broken to a width of
  59. one and one half inches.
  60. }
  61. }
  62. Widths may be specified in centimetres, points or ems using the letters
  63. {@Code "c"}, {@Code "p"} and {@Code "e"} instead of {@Code "i"}.  The
  64. @Code "@High" symbol is very similar, forcing an object to have a given
  65. height by adding white space beneath it.
  66. @PP
  67. Although we will use only these four symbols in the following, more
  68. exotic symbols may be used, for example @Code "90d @Rotate" which
  69. rotates any object (the entire table, for example, or one entry) ninety
  70. degrees, or any other positive or negative angle.  Symbols defined by
  71. the user or taken from other packages may also be used.
  72. @PP
  73. To change the style of an individual entry, enclose it in the symbols
  74. required:
  75. @ID @Code {
  76. "@Rowa"
  77. "    A { @CC { one entry of the table } }"
  78. }
  79. More commonly, the same style is to be applied to every entry in a
  80. particular column, and this is done by placing the symbols for the style
  81. inside the format option, between @Code "@Col" and the column letter:
  82. @ID @Code {
  83. "@Tab"
  84. "    @Fmta { @Col 3c @Wide @CC A  !  ... }"
  85. }
  86. Any @Code "@CC" or @Code "@RR" symbol should appear last, immediately
  87. before the column letter.  Now every entry in column @Code A will be
  88. centred in a three centimetre space, which means that the column as
  89. a whole will be three centimetres wide (excluding margins) and its
  90. entries will be centred.
  91. @PP
  92. It is best not to use the @Code "@Wide" symbol at first, since Lout is
  93. quite good at choosing appropriate column widths.  If the result is not
  94. satisfactory, and the table is wide enough to require paragraph breaking
  95. within its entries, @Code "@Wide" should be used only to reduce the width
  96. of the wider columns, not to increase the width of the narrower ones.
  97. @End @Section
  98.