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.BEGIN / s14 < prev    next >
Text File  |  1994-01-25  |  9KB  |  221 lines

  1. @Section
  2.    @Tag { booklayout }
  3.    @Title { Books }
  4. @Begin
  5. @PP
  6. The DocumentLayout package may also be used to produce books.  Type
  7. @Code "-ibook" in the Unix command instead of {@Code "-idoc"} to use the
  8. package in this way.
  9. @PP
  10. A book begins with a @Code "@Book" symbol:
  11. @ID @Code {
  12. "@Book"
  13. "    @Title {}"
  14. "    @Author {}"
  15. "    @Edition {}"
  16. "    @Publisher {}"
  17. "    @InitialFont { Times Roman 12p }"
  18. "    @InitialBreak { adjust 1.2fx }"
  19. "    @Hyphenate { Yes }"
  20. "//"
  21. }
  22. The first four options are printed on the title page, the first three
  23. using {@Code "clines @Break"} (see page {@PageOf clines}).  There are no
  24. {@Code "@Columns"}, {@Code "@PageNumbers"}, or {@Code "@FirstPageNumber"}
  25. options.  The last three options are as for @Code "@Document" and
  26. {@Code "@Report"}.  Disaster will ensue if the @Code "//" is omitted.
  27. @PP
  28. Next comes an optional preface:
  29. @ID @Code {
  30. "@Preface"
  31. "    @Tag { preface }"
  32. "    @Title { About this book }"
  33. "@Begin"
  34. "@PP"
  35. "..."
  36. "@End @Preface"
  37. }
  38. Since the title of most prefaces is simply Preface, this is the default
  39. value of the @Code "@Title" option.  After the preface, BookLayout will
  40. produce a table of contents listing the introduction, chapters,
  41. sections, subsections, appendices, biblio&-graphy, and index as
  42. appropriate.
  43. @PP
  44. The pages up to this point will be numbered in lower case Roman
  45. numerals; subsequent pages will be numbered in Arabic starting from 1.
  46. @PP
  47. Next comes an optional introduction, in exactly the same style as the
  48. preface except that @Code "@Introduction" replaces @Code "@Preface" and
  49. the default title is Introduction.  After that comes a sequence of chapters
  50. in the usual style:
  51. @ID @Code {
  52. "@Chapter"
  53. "    @Title { Principles }"
  54. "    @Tag { principles }"
  55. "@Begin"
  56. "@PP"
  57. "..."
  58. "@End @Chapter"
  59. }
  60. No @Code "@BeginChapters" or @Code "@EndChapters" symbols are
  61. needed.  Within a chapter, there may be a sequence of sections,
  62. each introduced by @Code "@Section" in the usual way, all bracketed
  63. by @Code "@BeginSections" and {@Code "@EndSections"}.  Within each
  64. section there may be subsections, each introduced by {@Code "@SubSection"},
  65. and the sequence as a whole bracketed by @Code "@BeginSubSections" and
  66. {@Code "@EndSubSections"}.  The first subsection of the first section of the
  67. first chapter will be numbered 1.1.1, and so on.  There are no sub-subsections.
  68. @PP
  69. Finally there is opportunity for a sequence of appendices, each
  70. introduced by @Code "@Appendix" in the usual way.  No
  71. @Code "@BeginAppendices" or @Code "@EndAppendices" symbols are
  72. needed.  The appendices are numbered A, B, C, etc., and there
  73. are sub-appendices, obtained in the usual way.
  74. @PP
  75. Each symbol with a @Code "@Title" option also has a @Code "@RunningTitle"
  76. option.  The more important parts of the book (preface, introduction,
  77. chapters, and appendices) have their @Code "@RunningTitle" printed at
  78. the top of each even-numbered page; if omitted, the @Code "@Title" option
  79. is used instead.
  80. @PP
  81. With Basser Lout, a long document is best broken into a sequence of files,
  82. each containing one section, from @Code "@Section" to @Code "@End @Section"
  83. inclusive.  Other files are needed for the beginning of each chapter,
  84. from @Code "@Chapter" to {@Code "@BeginSections"}, and for the end of
  85. each chapter, that is the final @Code "@EndSections" and
  86. {@Code "@End @Chapter"}.  On the Unix operating system a good scheme for
  87. naming these files is
  88. @ID lines @Break {
  89. @Code ch0.00     @Code "@Book" ... @Code "//"
  90. @Code ch0.01     Preface
  91. @Code ch0.02     Introduction
  92. @Code ch1.00     Beginning of Chapter 1
  93. @Code ch1.01     Section 1.1
  94. @Code ch1.02     Section 1.2
  95. . . .
  96. @Code ch1.99     End of Chapter 1
  97. @Code ch2.00     Beginning of Chapter 2
  98. @Code ch2.01     Section 2.1
  99. @Code ch2.02     Section 2.2
  100. . . .
  101. @Code ch2.99     End of Chapter 2
  102. }
  103. and so on.  Then the Unix command
  104. @ID @Code "lout -ibook ch0.00 ch3.??"
  105. will format Chapter 3 only; and
  106. @ID @Code "lout -ibook ch?.??"
  107. will format the entire book.  The whole book must be formatted by one
  108. command to get the page numbers right, but there is no need to do
  109. this until everything is perfect.
  110. @PP
  111. The symbols described in Sections 1--7 above are all available as
  112. usual.  The numbering of figures and tables includes a chapter or
  113. appendix number:  the first figure of Appendix A will be numbered A.1,
  114. and so on.  Figures and tables within the preface and introduction are
  115. numbered 1, 2, 3, etc.  When figures and tables appear near the end of
  116. a chapter, the following page on which they appear may also be the first
  117. page of the next chapter, which looks very poor.  The solution is to move
  118. the figure or table to an earlier point in the chapter.
  119. @PP
  120. Figures and tables work in a slightly different way to previously, owing
  121. to the need to attach a chapter or appendix number to each one.  The
  122. first figure of each chapter or appendix must be preceded by
  123. {@Code "@BeginFigures"}, and the last figure of each chapter or appendix
  124. must be followed by {@Code "@EndFigures"}.  These symbols must also bracket
  125. figures in the preface and introduction.  The symbols are not required
  126. when there are no figures.  Similarly, {@Code "@BeginTables"} and
  127. {@Code "@EndTables"} must bracket tables.
  128. @PP
  129. Cross referencing works as described in Section {@NumberOf cross};
  130. @Code "@Tag" options may be given to the preface, introduction,
  131. chapters, sections, subsections, appendices, and sub-appendices.
  132. @PP
  133. References work as described in Section {@NumberOf refs}, except
  134. that @Code "@ReferenceSection" is added automatically as needed.  A variant of
  135. the @Code "@Ref" symbol called @Code "@ChapRef" is provided, which
  136. causes the reference to appear at the end of the current preface,
  137. introduction, chapter, or appendix, rather than at the end of the book.
  138. @PP
  139. Also available are symbols for making an index.  To
  140. add an entry to the index, place
  141. @ID @Code "packages @Index { Packages }"
  142. for example at the relevant point.  The result will be something like
  143. @ID { Packages, 27 }
  144. appearing in the index in the alphabetical position determined by the
  145. left parameter, which should be a juxtaposition of simple words composed,
  146. by convention, of lower-case letters and periods only.
  147. @PP
  148. A variant called @Code "@SubIndex" provides a small indent, as is
  149. conventional for sub-entries in indexes.  For example,
  150. @ID @Code {
  151. "package  @Index  { Packages }"
  152. "package.r @SubIndex {ReportLayout}"
  153. "package.b @SubIndex {BookLayout}"
  154. }
  155. scattered through a document will produce something like
  156. @ID lines @Break {
  157. Packages, 27
  158.    BookLayout, 45
  159.    ReportLayout, 40
  160. }
  161. Note how the left parameters have been carefully chosen to produce the
  162. correct ordering.  There is also a @Code "@SubSubIndex" symbol with a
  163. double indent.
  164. @PP
  165. These symbols attach one page number to each entry.  Although the best
  166. authorities recommend exactly this, many authors choose to have entries
  167. like
  168. @ID { Fourier Transform, 576, 583--593 }
  169. despite the inconvenience to their readers.  {@Code "@RawIndex"},
  170. {@Code "@RawSubIndex"}, and {@Code "@RawSubSubIndex"}
  171. symbols are provided which do not add page numbers to the entry, leaving
  172. this to the user.  For example, one systematic way to get page number
  173. ranges is to place
  174. @ID @Code {
  175. "packages @RawIndex {"
  176. "    Packages, {@PageOf packages}"
  177. "    -- {@PageOf packages.end}"
  178. "}"
  179. }
  180. at the start of the range, and
  181. @ID @Code {
  182. "{@PageMark packages.end}"
  183. }
  184. at the end of the range.  This works because all six index symbols
  185. include a @Code "@PageMark" operation.  Incidentally, this means that
  186. index tags should be different from chapter and other tags.
  187. @PP
  188. Another use for @Code "@RawIndex" is to get blank lines into the index
  189. between the letters of the alphabet, by inserting phantom entries:
  190. @ID @Code {
  191. "b @RawIndex {}"
  192. "c @RawIndex {}"
  193. "..."
  194. "z @RawIndex {}"
  195. }
  196. In fact there is a symbol called @Code "@IndexBlanks" which creates
  197. exactly these 25 entries.  Unfortunately, these blanks will occasionally
  198. appear at the top of a column, and if there are no entries beginning with
  199. x, for example, there will be two blank lines between the w and y
  200. entries.  The careful user can start off with @Code "@IndexBlanks" and
  201. replace it later by the appropriate subset.
  202. @FootNote {
  203. For Lout to solve this problem automatically, it would need to be told
  204. which letter each index entry belongs under, perhaps by symbols
  205. {@Code "@AIndex"}, {@Code "@BIndex"}, etc.  The author
  206. felt that this would have been too tedious.
  207. }
  208. @PP
  209. Owing to problems behind the scenes, the Index heading will be printed,
  210. and an entry will be made in the table of contents, even if there are no
  211. entries in the index.  To prevent this, you will need to change the
  212. @Code "@MakeIndex" option in the @Code book setup file to {@Code "No"},
  213. using the method described in the following section.
  214. @PP
  215. Although the page numbers in index entries will be kept up to date
  216. automatically as the document changes, as all cross references are, 
  217. the user is recommended to refrain from inserting index entries until
  218. the book is complete and an overall plan of the structure of the index
  219. can be made.
  220. @End @Section
  221.