home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / texinfo-3.7-bin.lha / info / texinfo.info-3 (.txt) < prev    next >
GNU Info File  |  1996-10-12  |  51KB  |  954 lines

  1. This is Info file texinfo.info, produced by Makeinfo-1.64 from the
  2. input file /ade-src/fsf/texinfo/texinfo.texi.
  3.   This file documents Texinfo, a documentation system that uses a single
  4. source file to produce both on-line information and a printed manual.
  5.   Copyright (C) 1988, 1990, 1991, 1992, 1993, 1995 Free Software
  6. Foundation, Inc.
  7.   This is the second edition of the Texinfo documentation,
  8. and is consistent with version 2 of `texinfo.tex'.
  9.   Permission is granted to make and distribute verbatim copies of this
  10. manual provided the copyright notice and this permission notice are
  11. preserved on all copies.
  12.   Permission is granted to copy and distribute modified versions of this
  13. manual under the conditions for verbatim copying, provided that the
  14. entire resulting derived work is distributed under the terms of a
  15. permission notice identical to this one.
  16.   Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that this permission notice may be stated in a
  19. translation approved by the Free Software Foundation.
  20. File: texinfo.info,  Node: Titlepage & Copyright Page,  Next: The Top Node,  Prev: Info Summary and Permissions,  Up: Beginning a File
  21. The Title and Copyright Pages
  22. =============================
  23.   A manual's name and author are usually printed on a title page.
  24. Sometimes copyright information is printed on the title page as well;
  25. more often, copyright information is printed on the back of the title
  26. page.
  27.   The title and copyright pages appear in the printed manual, but not
  28. in the Info file.  Because of this, it is possible to use several
  29. slightly obscure TeX typesetting commands that cannot be used in an
  30. Info file.  In addition, this part of the beginning of a Texinfo file
  31. contains the text of the copying permissions that will appear in the
  32. printed manual.
  33.   *Note Titlepage Copying Permissions: Titlepage Permissions, for the
  34. standard text for the copyright permissions.
  35. * Menu:
  36. * titlepage::                   Create a title for the printed document.
  37. * titlefont center sp::         The `@titlefont', `@center',
  38.                                   and `@sp' commands.
  39. * title subtitle author::       The `@title', `@subtitle',
  40.                                   and `@author' commands.
  41. * Copyright & Permissions::     How to write the copyright notice and
  42.                                   include copying permissions.
  43. * end titlepage::               Turn on page headings after the title and
  44.                                   copyright pages.
  45. * headings on off::             An option for turning headings on and off
  46.                                   and double or single sided printing.
  47. File: texinfo.info,  Node: titlepage,  Next: titlefont center sp,  Prev: Titlepage & Copyright Page,  Up: Titlepage & Copyright Page
  48. `@titlepage'
  49. ------------
  50.   Start the material for the title page and following copyright page
  51. with `@titlepage' on a line by itself and end it with `@end titlepage'
  52. on a line by itself.
  53.   The `@end titlepage' command starts a new page and turns on page
  54. numbering. (*Note Page Headings: Headings, for details about how to
  55. generate of page headings.)  All the material that you want to appear
  56. on unnumbered pages should be put between the `@titlepage' and `@end
  57. titlepage' commands.  By using the `@page' command you can force a page
  58. break within the region delineated by the `@titlepage' and `@end
  59. titlepage' commands and thereby create more than one unnumbered page.
  60. This is how the copyright page is produced.  (The `@titlepage' command
  61. might perhaps have been better named the `@titleandadditionalpages'
  62. command, but that would have been rather long!)
  63.   When you write a manual about a computer program, you should write the
  64. version of the program to which the manual applies on the title page.
  65. If the manual changes more frequently than the program or is
  66. independent of it, you should also include an edition number(1) (*note
  67. titlepage-Footnotes::) for the manual.  This helps readers keep track
  68. of which manual is for which version of the program.  (The `Top' node
  69. should also contain this information; see *Note `@top': makeinfo top.)
  70.   Texinfo provides two methods for creating a title page.  One method
  71. uses the `@titlefont', `@sp', and `@center' commands to generate a
  72. title page in which the words on the page are centered.
  73.   The second method uses the `@title', `@subtitle', and `@author'
  74. commands to create a title page with black rules under the title and
  75. author lines and the subtitle text set flush to the right hand side of
  76. the page.  With this method, you do not specify any of the actual
  77. formatting of the title page.  You specify the text you want, and
  78. Texinfo does the formatting.  You may use either method.
  79. File: texinfo.info,  Node: titlepage-Footnotes,  Up: titlepage
  80.   (1)  We have found that it is helpful to refer to versions of manuals
  81. as `editions' and versions of programs as `versions'; otherwise, we
  82. find we are liable to confuse each other in conversation by referring
  83. to both the documentation and the software with the same words.
  84. File: texinfo.info,  Node: titlefont center sp,  Next: title subtitle author,  Prev: titlepage,  Up: Titlepage & Copyright Page
  85. `@titlefont', `@center', and `@sp'
  86. ----------------------------------
  87.   You can use the `@titlefont', `@sp', and `@center' commands to create
  88. a title page for a printed document.  (This is the first of the two
  89. methods for creating a title page in Texinfo.)
  90.   Use the `@titlefont' command to select a large font suitable for the
  91. title itself.
  92.   For example:
  93.      @titlefont{Texinfo}
  94.   Use the `@center' command at the beginning of a line to center the
  95. remaining text on that line.  Thus,
  96.      @center @titlefont{Texinfo}
  97. centers the title, which in this example is "Texinfo" printed in the
  98. title font.
  99.   Use the `@sp' command to insert vertical space.  For example:
  100.      @sp 2
  101. This inserts two blank lines on the printed page.  (*Note `@sp': sp,
  102. for more information about the `@sp' command.)
  103.   A template for this method looks like this:
  104.      @titlepage
  105.      @sp 10
  106.      @center @titlefont{NAME-OF-MANUAL-WHEN-PRINTED}
  107.      @sp 2
  108.      @center SUBTITLE-IF-ANY
  109.      @sp 2
  110.      @center AUTHOR
  111.      ...
  112.      @end titlepage
  113.   The spacing of the example fits an 8 1/2 by 11 inch manual.
  114. File: texinfo.info,  Node: title subtitle author,  Next: Copyright & Permissions,  Prev: titlefont center sp,  Up: Titlepage & Copyright Page
  115. `@title', `@subtitle', and `@author'
  116. ------------------------------------
  117.   You can use the `@title', `@subtitle', and `@author' commands to
  118. create a title page in which the vertical and horizontal spacing is
  119. done for you automatically.  This contrasts with the method described in
  120. the previous section, in which the `@sp' command is needed to adjust
  121. vertical spacing.
  122.   Write the `@title', `@subtitle', or `@author' commands at the
  123. beginning of a line followed by the title, subtitle, or author.
  124.   The `@title' command produces a line in which the title is set flush
  125. to the left-hand side of the page in a larger than normal font.  The
  126. title is underlined with a black rule.
  127.   The `@subtitle' command sets subtitles in a normal-sized font flush
  128. to the right-hand side of the page.
  129.   The `@author' command sets the names of the author or authors in a
  130. middle-sized font flush to the left-hand side of the page on a line
  131. near the bottom of the title page.  The names are underlined with a
  132. black rule that is thinner than the rule that underlines the title.
  133. (The black rule only occurs if the `@author' command line is followed
  134. by an `@page' command line.)
  135.   There are two ways to use the `@author' command: you can write the
  136. name or names on the remaining part of the line that starts with an
  137. `@author' command:
  138.      @author by Jane Smith and John Doe
  139. or you can write the names one above each other by using two (or more)
  140. `@author' commands:
  141.      @author Jane Smith
  142.      @author John Doe
  143. (Only the bottom name is underlined with a black rule.)
  144.   A template for this method looks like this:
  145.      @titlepage
  146.      @title NAME-OF-MANUAL-WHEN-PRINTED
  147.      @subtitle SUBTITLE-IF-ANY
  148.      @subtitle SECOND-SUBTITLE
  149.      @author AUTHOR
  150.      @page
  151.      ...
  152.      @end titlepage
  153. Contrast this form with the form of a title page written using the
  154. `@sp', `@center', and `@titlefont' commands:
  155.      @titlepage
  156.      @sp 10
  157.      @center @titlefont{Name of Manual When Printed}
  158.      @sp 2
  159.      @center Subtitle, If Any
  160.      @sp 1
  161.      @center Second subtitle
  162.      @sp 2
  163.      @center Author
  164.      @page
  165.      ...
  166.      @end titlepage
  167. File: texinfo.info,  Node: Copyright & Permissions,  Next: end titlepage,  Prev: title subtitle author,  Up: Titlepage & Copyright Page
  168. Copyright Page and Permissions
  169. ------------------------------
  170.   By international treaty, the copyright notice for a book should be
  171. either on the title page or on the back of the title page.  The
  172. copyright notice should include the year followed by the name of the
  173. organization or person who owns the copyright.
  174.   When the copyright notice is on the back of the title page, that page
  175. is customarily not numbered.  Therefore, in Texinfo, the information on
  176. the copyright page should be within `@titlepage' and `@end titlepage'
  177. commands.
  178.   Use the `@page' command to cause a page break.  To push the copyright
  179. notice and the other text on the copyright page towards the bottom of
  180. the page, you can write a somewhat mysterious line after the `@page'
  181. command that reads like this:
  182.      @vskip 0pt plus 1filll
  183. This is a TeX command that is not supported by the Info formatting
  184. commands.  The `@vskip' command inserts whitespace.  The `0pt plus
  185. 1filll' means to put in zero points of mandatory whitespace, and as
  186. much optional whitespace as needed to push the following text to the
  187. bottom of the page.  Note the use of three `l's in the word `filll';
  188. this is the correct usage in TeX.
  189.   In a printed manual, the `@copyright{}' command generates a `c'
  190. inside a circle.  (In Info, it generates `(C)'.)  The copyright notice
  191. itself has the following legally defined sequence:
  192.      Copyright (C) YEAR COPYRIGHT-OWNER
  193.   It is customary to put information on how to get a manual after the
  194. copyright notice, followed by the copying permissions for the manual.
  195.   Note that permissions must be given here as well as in the summary
  196. segment within `@ifinfo' and `@end ifinfo' that immediately follows the
  197. header since this text appears only in the printed manual and the
  198. `ifinfo' text appears only in the Info file.
  199.   *Note Sample Permissions::, for the standard text.
  200. File: texinfo.info,  Node: end titlepage,  Next: headings on off,  Prev: Copyright & Permissions,  Up: Titlepage & Copyright Page
  201. Heading Generation
  202. ------------------
  203.   An `@end titlepage' command on a line by itself not only marks the
  204. end of the title and copyright pages, but also causes TeX to start
  205. generating page headings and page numbers.
  206.   To repeat what is said elsewhere,  Texinfo has two standard page
  207. heading formats, one for documents which are printed on one side of
  208. each sheet of paper (single-sided printing), and the other for
  209. documents which are printed on both sides of each sheet (double-sided
  210. printing).  (*Note `@setchapternewpage': setchapternewpage.) You can
  211. specify these formats in different ways:
  212.    * The conventional way is to write an `@setchapternewpage' command
  213.      before the title page commands, and then have the `@end titlepage'
  214.      command start generating page headings in the manner desired.
  215.      (*Note `@setchapternewpage': setchapternewpage.)
  216.    * Alternatively, you can use the `@headings' command to prevent page
  217.      headings from being generated or to start them for either single or
  218.      double-sided printing.  (Write an `@headings' command immediately
  219.      after the `@end titlepage' command.  *Note The `@headings'
  220.      Command: headings on off, for more information.)
  221.    * Or, you may specify your own page heading and footing format.
  222.      *Note Page Headings: Headings, for detailed information about page
  223.      headings and footings.
  224.   Most documents are formatted with the standard single-sided or
  225. double-sided format, using `@setchapternewpage odd' for double-sided
  226. printing and no `@setchapternewpage' command for single-sided printing.
  227. File: texinfo.info,  Node: headings on off,  Prev: end titlepage,  Up: Titlepage & Copyright Page
  228. The `@headings' Command
  229. -----------------------
  230.   The `@headings' command is rarely used.  It specifies what kind of
  231. page headings and footings to print on each page.  Usually, this is
  232. controlled by the `@setchapternewpage' command.  You need the
  233. `@headings' command only if the `@setchapternewpage' command does not
  234. do what you want, or if you want to turn off pre-defined page headings
  235. prior to defining your own.  Write an `@headings' command immediately
  236. after the `@end titlepage' command.
  237.   There are four ways to use the `@headings' command:
  238. `@headings off'
  239.      Turn off printing of page headings.
  240. `@headings single'
  241.      Turn on page headings appropriate for single-sided printing.
  242. `@headings double'
  243. `@headings on'
  244.      Turn on page headings appropriate for double-sided printing.  The
  245.      two commands, `@headings on' and `@headings double', are
  246.      synonymous.
  247.   For example, suppose you write `@setchapternewpage off' before the
  248. `@titlepage' command to tell TeX to start a new chapter on the same
  249. page as the end of the last chapter.  This command also causes TeX to
  250. typeset page headers for single-sided printing.  To cause TeX to
  251. typeset for double sided printing, write `@headings double' after the
  252. `@end titlepage' command.
  253.   You can stop TeX from generating any page headings at all by writing
  254. `@headings off' on a line of its own immediately after the line
  255. containing the `@end titlepage' command, like this:
  256.      @end titlepage
  257.      @headings off
  258. The `@headings off' command overrides the `@end titlepage' command,
  259. which would otherwise cause TeX to print page headings.
  260.   You can also specify your own style of page heading and footing.
  261. *Note Page Headings: Headings, for more information.
  262. File: texinfo.info,  Node: The Top Node,  Next: Software Copying Permissions,  Prev: Titlepage & Copyright Page,  Up: Beginning a File
  263. The `Top' Node and Master Menu
  264. ==============================
  265.   The `Top' node is the node from which you enter an Info file.
  266.   A `Top' node should contain a brief description of the Info file and
  267. an extensive, master menu for the whole Info file.  This helps the
  268. reader understand what the Info file is about.  Also, you should write
  269. the version number of the program to which the Info file applies; or,
  270. at least, the edition number.
  271.   The contents of the `Top' node should appear only in the Info file;
  272. none of it should appear in printed output, so enclose it between
  273. `@ifinfo' and `@end ifinfo' commands.  (TeX does not print either an
  274. `@node' line or a menu; they appear only in Info; strictly speaking,
  275. you are not required to enclose these parts between `@ifinfo' and `@end
  276. ifinfo', but it is simplest to do so.  *Note Conditionally Visible
  277. Text: Conditionals.)
  278. * Menu:
  279. * Title of Top Node::           Sketch what the file is about.
  280. * Master Menu Parts::           A master menu has three or more parts.
  281. File: texinfo.info,  Node: Title of Top Node,  Next: Master Menu Parts,  Prev: The Top Node,  Up: The Top Node
  282. `Top' Node Title
  283. ----------------
  284.   Sometimes, you will want to place an `@top' sectioning command line
  285. containing the title of the document immediately after the `@node Top'
  286. line (*note The `@top' Sectioning Command: makeinfo top command., for
  287. more information).
  288.   For example, the beginning of the Top node of this manual contains an
  289. `@top' sectioning command, a short description, and edition and version
  290. information.  It looks like this:
  291.      ...
  292.      @end titlepage
  293.      
  294.      @ifinfo
  295.      @node Top, Copying, (dir), (dir)
  296.      @top Texinfo
  297.      
  298.      Texinfo is a documentation system...
  299.      
  300.      This is edition...
  301.      ...
  302.      @end ifinfo
  303.      
  304.      @menu
  305.      * Copying::                 Texinfo is freely
  306.                                    redistributable.
  307.      * Overview::                What is Texinfo?
  308.      ...
  309.      @end menu
  310.   In a `Top' node, the `Previous', and `Up' nodes usually refer to the
  311. top level directory of the whole Info system, which is called `(dir)'.
  312. The `Next' node refers to the first node that follows the main or master
  313. menu, which is usually the copying permissions, introduction, or first
  314. chapter.
  315. File: texinfo.info,  Node: Master Menu Parts,  Prev: Title of Top Node,  Up: The Top Node
  316. Parts of a Master Menu
  317. ----------------------
  318.   A "master menu" is a detailed main menu listing all the nodes in a
  319. file.
  320.   A master menu is enclosed in `@menu' and `@end menu' commands and
  321. does not appear in the printed document.
  322.   Generally, a master menu is divided into parts.
  323.    * The first part contains the major nodes in the Texinfo file: the
  324.      nodes for the chapters, chapter-like sections, and the appendices.
  325.    * The second part contains nodes for the indices.
  326.    * The third and subsequent parts contain a listing of the other,
  327.      lower level nodes, often ordered by chapter.  This way, rather
  328.      than go through an intermediary menu, an inquirer can go directly
  329.      to a particular node when searching for specific information.
  330.      These menu items are not required; add them if you think they are a
  331.      convenience.
  332.   Each section in the menu can be introduced by a descriptive line.  So
  333. long as the line does not begin with an asterisk, it will not be
  334. treated as a menu entry.  (*Note Writing a Menu::, for more
  335. information.)
  336.   For example, the master menu for this manual looks like the following
  337. (but has many more entries):
  338.      @menu
  339.      * Copying::             Texinfo is freely
  340.                                redistributable.
  341.      * Overview::            What is Texinfo?
  342.      * Texinfo Mode::        Special features in GNU Emacs.
  343.      ...
  344.      ...
  345.      * Command and Variable Index::
  346.                              An entry for each @-command.
  347.      * Concept Index::       An entry for each concept.
  348.      
  349.       --- The Detailed Node Listing ---
  350.      
  351.      Overview of Texinfo
  352.      
  353.      * Info Files::          What is an Info file?
  354.      * Printed Manuals::     Characteristics of
  355.                                a printed manual.
  356.      ...
  357.      ...
  358.      
  359.      Using Texinfo Mode
  360.      
  361.      * Info on a Region::    Formatting part of a file
  362.                                for Info.
  363.      ...
  364.      ...
  365.      @end menu
  366. File: texinfo.info,  Node: Software Copying Permissions,  Prev: The Top Node,  Up: Beginning a File
  367. Software Copying Permissions
  368. ============================
  369.   If the Texinfo file has a section containing the "General Public
  370. License" and the distribution information and a warranty disclaimer for
  371. the software that is documented, this section usually follows the `Top'
  372. node.  The General Public License is very important to Project GNU
  373. software.  It ensures that you and others will continue to have a right
  374. to use and share the software.
  375.   The copying and distribution information and the disclaimer are
  376. followed by an introduction or else by the first chapter of the manual.
  377.   Although an introduction is not a required part of a Texinfo file, it
  378. is very helpful.  Ideally, it should state clearly and concisely what
  379. the file is about and who would be interested in reading it.  In
  380. general, an introduction would follow the licensing and distribution
  381. information, although sometimes people put it earlier in the document.
  382. Usually, an introduction is put in an `@unnumbered' section.  (*Note
  383. The `@unnumbered' and `@appendix' Commands: unnumbered & appendix.)
  384. File: texinfo.info,  Node: Ending a File,  Next: Structuring,  Prev: Beginning a File,  Up: Top
  385. Ending a Texinfo File
  386. *********************
  387.   The end of a Texinfo file should include the commands that create
  388. indices and generate detailed and summary tables of contents.  And it
  389. must include the `@bye' command that marks the last line processed by
  390.   For example:
  391.      @node    Concept Index,     , Variables Index, Top
  392.      @c        node-name,    next, previous,        up
  393.      @unnumbered Concept Index
  394.      
  395.      @printindex cp
  396.      
  397.      @contents
  398.      @bye
  399. * Menu:
  400. * Printing Indices & Menus::    How to print an index in hardcopy and
  401.                                   generate index menus in Info.
  402. * Contents::                    How to create a table of contents.
  403. * File End::                    How to mark the end of a file.
  404. File: texinfo.info,  Node: Printing Indices & Menus,  Next: Contents,  Prev: Ending a File,  Up: Ending a File
  405. Index Menus and Printing an Index
  406. =================================
  407.   To print an index means to include it as part of a manual or Info
  408. file.  This does not happen automatically just because you use
  409. `@cindex' or other index-entry generating commands in the Texinfo file;
  410. those just cause the raw data for the index to be accumulated.  To
  411. generate an index, you must include the `@printindex' command at the
  412. place in the document where you want the index to appear.  Also, as
  413. part of the process of creating a printed manual, you must run a
  414. program called `texindex' (*note Format/Print Hardcopy::.) to sort the
  415. raw data to produce a sorted index file.  The sorted index file is what
  416. is actually used to print the index.
  417.   Texinfo offers six different types of predefined index: the concept
  418. index, the function index, the variables index, the keystroke index, the
  419. program index, and the data type index (*note Predefined Indices::.).
  420. Each index type has a two-letter name: `cp', `fn', `vr', `ky', `pg',
  421. and `tp'.  You may merge indices, or put them into separate sections
  422. (*note Combining Indices::.); or you may define your own indices (*note
  423. Defining New Indices: New Indices.).
  424.   The `@printindex' command takes a two-letter index name, reads the
  425. corresponding sorted index file and formats it appropriately into an
  426. index.
  427.   The `@printindex' command does not generate a chapter heading for the
  428. index.  Consequently, you should precede the `@printindex' command with
  429. a suitable section or chapter command (usually `@unnumbered') to supply
  430. the chapter heading and put the index into the table of contents.
  431. Precede the `@unnumbered' command with an `@node' line.
  432.   For example:
  433.      @node Variable Index, Concept Index, Function Index, Top
  434.      @comment    node-name,         next,       previous, up
  435.      @unnumbered Variable Index
  436.      
  437.      @printindex vr
  438.      @node     Concept Index,     , Variable Index, Top
  439.      @comment      node-name, next,       previous, up
  440.      @unnumbered Concept Index
  441.      
  442.      @printindex cp
  443.      @summarycontents
  444.      @contents
  445.      @bye
  446. (Readers often prefer that the concept index come last in a book, since
  447. that makes it easiest to find.)
  448. File: texinfo.info,  Node: Contents,  Next: File End,  Prev: Printing Indices & Menus,  Up: Ending a File
  449. Generating a Table of Contents
  450. ==============================
  451.   The `@chapter', `@section', and other structuring commands supply the
  452. information to make up a table of contents, but they do not cause an
  453. actual table to appear in the manual.  To do this, you must use the
  454. `@contents' and `@summarycontents' commands:
  455. `@contents'
  456.      Generate a table of contents in a printed manual, including all
  457.      chapters, sections, subsections, etc., as well as appendices and
  458.      unnumbered chapters.  (Headings generated by the `@heading' series
  459.      of commands do not appear in the table of contents.)  The
  460.      `@contents' command should be written on a line by itself.
  461. `@shortcontents'
  462. `@summarycontents'
  463.      (`@summarycontents' is a synonym for `@shortcontents'; the two
  464.      commands are exactly the same.)
  465.      Generate a short or summary table of contents that lists only the
  466.      chapters (and appendices and unnumbered chapters).  Omit sections,
  467.      subsections and subsubsections.  Only a long manual needs a short
  468.      table of contents in addition to the full table of contents.
  469.      Write the `@shortcontents' command on a line by itself right
  470.      *before* the `@contents' command.
  471.   The table of contents commands automatically generate a chapter-like
  472. heading at the top of the first table of contents page.  Write the table
  473. of contents commands at the very end of a Texinfo file, just before the
  474. `@bye' command, following any index sections--anything in the Texinfo
  475. file after the table of contents commands will be omitted from the
  476. table of contents.
  477.   When you print a manual with a table of contents, the table of
  478. contents are printed last and numbered with roman numerals.  You need
  479. to place those pages in their proper place, after the title page,
  480. yourself.  (This is the only collating you need to do for a printed
  481. manual.  The table of contents is printed last because it is generated
  482. after the rest of the manual is typeset.)
  483.   Here is an example of where to write table of contents commands:
  484.      INDICES...
  485.      @shortcontents
  486.      @contents
  487.      @bye
  488.   Since an Info file uses menus instead of tables of contents, the Info
  489. formatting commands ignore the `@contents' and `@shortcontents'
  490. commands.
  491. File: texinfo.info,  Node: File End,  Prev: Contents,  Up: Ending a File
  492. `@bye' File Ending
  493. ==================
  494.   An `@bye' command terminates TeX or Info formatting.  None of the
  495. formatting commands see any of the file following `@bye'.  The `@bye'
  496. command should be on a line by itself.
  497.   If you wish, you may follow the `@bye' line with notes. These notes
  498. will not be formatted and will not appear in either Info or a printed
  499. manual; it is as if text after `@bye' were within `@ignore' ... `@end
  500. ignore'.  Also, you may follow the `@bye' line with a local variables
  501. list.  *Note Using Local Variables and the Compile Command:
  502. Compile-Command, for more information.
  503. File: texinfo.info,  Node: Structuring,  Next: Nodes,  Prev: Ending a File,  Up: Top
  504. Chapter Structuring
  505. *******************
  506.   The "chapter structuring" commands divide a document into a hierarchy
  507. of chapters, sections, subsections, and subsubsections.  These commands
  508. generate large headings; they also provide information for the table of
  509. contents of a printed manual (*note Generating a Table of Contents:
  510. Contents.).
  511.   The chapter structuring commands do not create an Info node structure,
  512. so normally you should put an `@node' command immediately before each
  513. chapter structuring command (*note Nodes::.).  The only time you are
  514. likely to use the chapter structuring commands without using the node
  515. structuring commands is if you are writing a document that contains no
  516. cross references and will never be transformed into Info format.
  517.   It is unlikely that you will ever write a Texinfo file that is
  518. intended only as an Info file and not as a printable document.  If you
  519. do, you might still use chapter structuring commands to create a
  520. heading at the top of each node--but you don't need to.
  521. * Menu:
  522. * Tree Structuring::            A manual is like an upside down tree ...
  523. * Structuring Command Types::   How to divide a manual into parts.
  524. * makeinfo top::                The `@top' command, part of the `Top' node.
  525. * chapter::
  526. * unnumbered & appendix::
  527. * majorheading & chapheading::
  528. * section::
  529. * unnumberedsec appendixsec heading::
  530. * subsection::
  531. * unnumberedsubsec appendixsubsec subheading::
  532. * subsubsection::               Commands for the lowest level sections.
  533. * Raise/lower sections::        How to change commands' hierarchical level.
  534. File: texinfo.info,  Node: Tree Structuring,  Next: Structuring Command Types,  Prev: Structuring,  Up: Structuring
  535. Tree Structure of Sections
  536. ==========================
  537.   A Texinfo file is usually structured like a book with chapters,
  538. sections, subsections, and the like.  This structure can be visualized
  539. as a tree (or rather as an upside-down tree) with the root at the top
  540. and the levels corresponding to chapters, sections, subsection, and
  541. subsubsections.
  542.   Here is a diagram that shows a Texinfo file with three chapters, each
  543. of which has two sections.
  544.                                Top
  545.                                 |
  546.               -------------------------------------
  547.              |                  |                  |
  548.           Chapter 1          Chapter 2          Chapter 3
  549.              |                  |                  |
  550.           --------           --------           --------
  551.          |        |         |        |         |        |
  552.       Section  Section   Section  Section   Section  Section
  553.         1.1      1.2       2.1      2.2       3.1      3.2
  554.   In a Texinfo file that has this structure, the beginning of Chapter 2
  555. looks like this:
  556.      @node    Chapter 2,  Chapter 3, Chapter 1, top
  557.      @chapter Chapter 2
  558.   The chapter structuring commands are described in the sections that
  559. follow; the `@node' and `@menu' commands are described in following
  560. chapters. (*Note Nodes::, and see *Note Menus::.)
  561. File: texinfo.info,  Node: Structuring Command Types,  Next: makeinfo top,  Prev: Tree Structuring,  Up: Structuring
  562. Types of Structuring Command
  563. ============================
  564.   The chapter structuring commands fall into four groups or series, each
  565. of which contains structuring commands corresponding to the
  566. hierarchical levels of chapters, sections, subsections, and
  567. subsubsections.
  568.   The four groups are the `@chapter' series, the `@unnumbered' series,
  569. the `@appendix' series, and the `@heading' series.
  570.   Each command produces titles that have a different appearance on the
  571. printed page or Info file; only some of the commands produce titles
  572. that are listed in the table of contents of a printed book or manual.
  573.    * The `@chapter' and `@appendix' series of commands produce numbered
  574.      or lettered entries both in the body of a printed work and in its
  575.      table of contents.
  576.    * The `@unnumbered' series of commands produce unnumbered entries
  577.      both in the body of a printed work and in its table of contents.
  578.      The `@top' command, which has a special use, is a member of this
  579.      series (*note `@top': makeinfo top.).
  580.    * The `@heading' series of commands produce unnumbered headings that
  581.      do not appear in a table of contents.  The heading commands never
  582.      start a new page.
  583.    * The `@majorheading' command produces results similar to using the
  584.      `@chapheading' command but generates a larger vertical whitespace
  585.      before the heading.
  586.    * When an `@setchapternewpage' command says to do so, the
  587.      `@chapter', `@unnumbered', and `@appendix' commands start new
  588.      pages in the printed manual; the `@heading' commands do not.
  589.   Here are the four groups of chapter structuring commands:
  590.                                                             No new pages
  591.      Numbered       Unnumbered       Lettered and numbered  Unnumbered
  592.      In contents    In contents          In contents        Not in contents
  593.      
  594.                     @top                                    @majorheading
  595.      @chapter       @unnumbered          @appendix          @chapheading
  596.      @section       @unnumberedsec       @appendixsec       @heading
  597.      @subsection    @unnumberedsubsec    @appendixsubsec    @subheading
  598.      @subsubsection @unnumberedsubsubsec @appendixsubsubsec @subsubheading
  599. File: texinfo.info,  Node: makeinfo top,  Next: chapter,  Prev: Structuring Command Types,  Up: Structuring
  600. `@top'
  601. ======
  602.   The `@top' command is a special sectioning command that you use only
  603. after an `@node Top' line at the beginning of a Texinfo file.  The
  604. `@top' command tells the `makeinfo' formatter which node is the `Top'
  605. node.  It has the same typesetting effect as `@unnumbered' (*note
  606. `@unnumbered': (`@appendix')unnumbered & appendix.).  For detailed
  607. information, see *Note The `@top' Command: makeinfo top command.
  608. File: texinfo.info,  Node: chapter,  Next: unnumbered & appendix,  Prev: makeinfo top,  Up: Structuring
  609. `@chapter'
  610. ==========
  611.   `@chapter' identifies a chapter in the document.  Write the command
  612. at the beginning of a line and follow it on the same line by the title
  613. of the chapter.
  614.   For example, this chapter in this manual is entitled "Chapter
  615. Structuring"; the `@chapter' line looks like this:
  616.      @chapter Chapter Structuring
  617.   In TeX, the `@chapter' command creates a chapter in the document,
  618. specifying the chapter title.  The chapter is numbered automatically.
  619.   In Info, the `@chapter' command causes the title to appear on a line
  620. by itself, with a line of asterisks inserted underneath.  Thus, in
  621. Info, the above example produces the following output:
  622.      Chapter Structuring
  623.      *******************
  624. File: texinfo.info,  Node: unnumbered & appendix,  Next: majorheading & chapheading,  Prev: chapter,  Up: Structuring
  625. `@unnumbered', `@appendix'
  626. ==========================
  627.   Use the `@unnumbered' command to create a chapter that appears in a
  628. printed manual without chapter numbers of any kind.  Use the
  629. `@appendix' command to create an appendix in a printed manual that is
  630. labelled by letter instead of by number.
  631.   For Info file output, the `@unnumbered' and `@appendix' commands are
  632. equivalent to `@chapter': the title is printed on a line by itself with
  633. a line of asterisks underneath.  (*Note `@chapter': chapter.)
  634.   To create an appendix or an unnumbered chapter, write an `@appendix'
  635. or `@unnumbered' command at the beginning of a line and follow it on
  636. the same line by the title, as you would if you were creating a chapter.
  637. File: texinfo.info,  Node: majorheading & chapheading,  Next: section,  Prev: unnumbered & appendix,  Up: Structuring
  638. `@majorheading', `@chapheading'
  639. ===============================
  640.   The `@majorheading' and `@chapheading' commands put chapter-like
  641. headings in the body of a document.
  642.   However, neither command causes TeX to produce a numbered heading or
  643. an entry in the table of contents; and neither command causes TeX to
  644. start a new page in a printed manual.
  645.   In TeX, an `@majorheading' command generates a larger vertical
  646. whitespace before the heading than an `@chapheading' command but is
  647. otherwise the same.
  648.   In Info, the `@majorheading' and `@chapheading' commands are
  649. equivalent to `@chapter': the title is printed on a line by itself with
  650. a line of asterisks underneath.  (*Note `@chapter': chapter.)
  651. File: texinfo.info,  Node: section,  Next: unnumberedsec appendixsec heading,  Prev: majorheading & chapheading,  Up: Structuring
  652. `@section'
  653. ==========
  654.   In a printed manual, an `@section' command identifies a numbered
  655. section within a chapter.  The section title appears in the table of
  656. contents.  In Info, an `@section' command provides a title for a
  657. segment of text, underlined with `='.
  658.   This section is headed with an `@section' command and looks like this
  659. in the Texinfo file:
  660.      @section @code{@@section}
  661.   To create a section, write the `@section' command at the beginning of
  662. a line and follow it on the same line by the section title.
  663.   Thus,
  664.      @section This is a section
  665. produces
  666.      This is a section
  667.      =================
  668. in Info.
  669. File: texinfo.info,  Node: unnumberedsec appendixsec heading,  Next: subsection,  Prev: section,  Up: Structuring
  670. `@unnumberedsec', `@appendixsec', `@heading'
  671. ============================================
  672.   The `@unnumberedsec', `@appendixsec', and `@heading' commands are,
  673. respectively, the unnumbered, appendix-like, and heading-like
  674. equivalents of the `@section' command.  (*Note `@section': section.)
  675. `@unnumberedsec'
  676.      The `@unnumberedsec' command may be used within an unnumbered
  677.      chapter or within a regular chapter or appendix to provide an
  678.      unnumbered section.
  679. `@appendixsec'
  680. `@appendixsection'
  681.      `@appendixsection' is a longer spelling of the `@appendixsec'
  682.      command; the two are synonymous.
  683.      Conventionally, the `@appendixsec' or `@appendixsection' command
  684.      is used only within appendices.
  685. `@heading'
  686.      You may use the `@heading' command anywhere you wish for a
  687.      section-style heading that will not appear in the table of
  688.      contents.
  689. File: texinfo.info,  Node: subsection,  Next: unnumberedsubsec appendixsubsec subheading,  Prev: unnumberedsec appendixsec heading,  Up: Structuring
  690. The `@subsection' Command
  691. =========================
  692.   Subsections are to sections as sections are to chapters.  (*Note
  693. `@section': section.)  In Info, subsection titles are underlined with
  694. `-'.  For example,
  695.      @subsection This is a subsection
  696. produces
  697.      This is a subsection
  698.      --------------------
  699.   In a printed manual, subsections are listed in the table of contents
  700. and are numbered three levels deep.
  701. File: texinfo.info,  Node: unnumberedsubsec appendixsubsec subheading,  Next: subsubsection,  Prev: subsection,  Up: Structuring
  702. The `@subsection'-like Commands
  703. ===============================
  704.   The `@unnumberedsubsec', `@appendixsubsec', and `@subheading'
  705. commands are, respectively, the unnumbered, appendix-like, and
  706. heading-like equivalents of the `@subsection' command.  (*Note
  707. `@subsection': subsection.)
  708.   In Info, the `@subsection'-like commands generate a title underlined
  709. with hyphens.  In a printed manual, an `@subheading' command produces a
  710. heading like that of a subsection except that it is not numbered and
  711. does not appear in the table of contents.  Similarly, an
  712. `@unnumberedsubsec' command produces an unnumbered heading like that of
  713. a subsection and an `@appendixsubsec' command produces a
  714. subsection-like heading labelled with a letter and numbers; both of
  715. these commands produce headings that appear in the table of contents.
  716. File: texinfo.info,  Node: subsubsection,  Next: Raise/lower sections,  Prev: unnumberedsubsec appendixsubsec subheading,  Up: Structuring
  717. The `subsub' Commands
  718. =====================
  719.   The fourth and lowest level sectioning commands in Texinfo are the
  720. `subsub' commands.  They are:
  721. `@subsubsection'
  722.      Subsubsections are to subsections as subsections are to sections.
  723.      (*Note `@subsection': subsection.)  In a printed manual,
  724.      subsubsection titles appear in the table of contents and are
  725.      numbered four levels deep.
  726. `@unnumberedsubsubsec'
  727.      Unnumbered subsubsection titles appear in the table of contents of
  728.      a printed manual, but lack numbers.  Otherwise, unnumbered
  729.      subsubsections are the same as subsubsections.  In Info, unnumbered
  730.      subsubsections look exactly like ordinary subsubsections.
  731. `@appendixsubsubsec'
  732.      Conventionally, appendix commands are used only for appendices and
  733.      are lettered and numbered appropriately in a printed manual.  They
  734.      also appear in the table of contents.  In Info, appendix
  735.      subsubsections look exactly like ordinary subsubsections.
  736. `@subsubheading'
  737.      The `@subsubheading' command may be used anywhere that you need a
  738.      small heading that will not appear in the table of contents.  In
  739.      Info, subsubheadings look exactly like ordinary subsubsection
  740.      headings.
  741.   In Info,  `subsub' titles are underlined with periods.  For example,
  742.      @subsubsection This is a subsubsection
  743. produces
  744.      This is a subsubsection
  745.      .......................
  746. File: texinfo.info,  Node: Raise/lower sections,  Prev: subsubsection,  Up: Structuring
  747. `@raisesections' and `@lowersections'
  748. =====================================
  749.   The `@raisesections' and `@lowersections' commands raise and lower
  750. the hierarchical level of chapters, sections, subsections and the like.
  751. The `@raisesections' command changes sections to chapters, subsections
  752. to sections, and so on.  The `@lowersections' command changes chapters
  753. to sections, sections to subsections, and so on.
  754.   An `@lowersections' command is useful if you wish to include text
  755. that is written as an outer or standalone Texinfo file in another
  756. Texinfo file as an inner, included file.  If you write the command at
  757. the beginning of the file, all your `@chapter' commands are formatted
  758. as if they were `@section' commands, all your `@section' command are
  759. formatted as if they were `@subsection' commands, and so on.
  760.   `@raisesections' raises a command one level in the chapter
  761. structuring hierarchy:
  762.        Change           To
  763.      
  764.      @subsection     @section,
  765.      @section        @chapter,
  766.      @heading        @chapheading,
  767.                etc.
  768.   `@lowersections' lowers a command one level in the chapter
  769. structuring hierarchy:
  770.        Change           To
  771.      
  772.      @chapter        @section,
  773.      @subsection     @subsubsection,
  774.      @heading        @subheading,
  775.                etc.
  776.   An `@raisesections' or `@lowersections' command changes only those
  777. structuring commands that follow the command in the Texinfo file.
  778. Write an `@raisesections' or `@lowersections' command on a line of its
  779.   An `@lowersections' command cancels an `@raisesections' command, and
  780. vice versa.
  781.   Repeated use of the commands continue to raise or lower the
  782. hierarchical level a step at a time.
  783.   An attempt to raise above `chapters' reproduces chapter commands; an
  784. attempt to lower below `subsubsections' reproduces subsubsection
  785. commands.
  786. File: texinfo.info,  Node: Nodes,  Next: Menus,  Prev: Structuring,  Up: Top
  787. Nodes
  788. *****
  789.   "Nodes" are the primary segments of a Texinfo file.  They do not
  790. themselves impose a hierarchic or any other kind of structure on a file.
  791. Nodes contain "node pointers" that name other nodes, and can contain
  792. "menus" which are lists of nodes.  In Info, the movement commands can
  793. carry you to a pointed-to node or to a node listed in a menu.  Node
  794. pointers and menus provide structure for Info files just as chapters,
  795. sections, subsections, and the like, provide structure for printed
  796. books.
  797. * Menu:
  798. * Two Paths::                   Different commands to structure
  799.                                   Info output and printed output.
  800. * Node Menu Illustration::      A diagram, and sample nodes and menus.
  801. * node::                        How to write a node, in detail.
  802. * makeinfo Pointer Creation::   How to create node pointers with `makeinfo'.
  803. File: texinfo.info,  Node: Two Paths,  Next: Node Menu Illustration,  Prev: Nodes,  Up: Nodes
  804. Two Paths
  805. =========
  806.   The node and menu commands and the chapter structuring commands are
  807. independent of each other:
  808.    * In Info, node and menu commands provide structure.  The chapter
  809.      structuring commands generate headings with different kinds of
  810.      underlining--asterisks for chapters, hyphens for sections, and so
  811.      on; they do nothing else.
  812.    * In TeX, the chapter structuring commands generate chapter and
  813.      section numbers and tables of contents.  The node and menu
  814.      commands provide information for cross references; they do nothing
  815.      else.
  816.   You can use node pointers and menus to structure an Info file any way
  817. you want; and you can write a Texinfo file so that its Info output has a
  818. different structure than its printed output.  However, most Texinfo
  819. files are written such that the structure for the Info output
  820. corresponds to the structure for the printed output.  It is not
  821. convenient to do otherwise.
  822.   Generally, printed output is structured in a tree-like hierarchy in
  823. which the chapters are the major limbs from which the sections branch
  824. out.  Similarly, node pointers and menus are organized to create a
  825. matching structure in the Info output.
  826. File: texinfo.info,  Node: Node Menu Illustration,  Next: node,  Prev: Two Paths,  Up: Nodes
  827. Node and Menu Illustration
  828. ==========================
  829.   Here is a copy of the diagram shown earlier that illustrates a Texinfo
  830. file with three chapters, each of which contains two sections.
  831.   Note that the "root" is at the top of the diagram and the "leaves"
  832. are at the bottom.  This is how such a diagram is drawn conventionally;
  833. it illustrates an upside-down tree.  For this reason, the root node is
  834. called the `Top' node, and `Up' node pointers carry you closer to the
  835. root.
  836.                                Top
  837.                                 |
  838.               -------------------------------------
  839.              |                  |                  |
  840.           Chapter 1          Chapter 2          Chapter 3
  841.              |                  |                  |
  842.           --------           --------           --------
  843.          |        |         |        |         |        |
  844.       Section  Section   Section  Section   Section  Section
  845.         1.1      1.2       2.1      2.2       3.1      3.2
  846.   Write the beginning of the node for Chapter 2 like this:
  847.      @node     Chapter 2,  Chapter 3, Chapter 1, top
  848.      @comment  node-name,  next,      previous,  up
  849. This `@node' line says that the name of this node is "Chapter 2", the
  850. name of the `Next' node is "Chapter 3", the name of the `Previous' node
  851. is "Chapter 1", and the name of the `Up' node is "Top".
  852.      *Please Note:* `Next' refers to the next node at the same
  853.      hierarchical level in the manual, not necessarily to the next node
  854.      within the Texinfo file.  In the Texinfo file, the subsequent node
  855.      may be at a lower level--a section-level node may follow a
  856.      chapter-level node, and a subsection-level node may follow a
  857.      section-level node.  `Next' and `Previous' refer to nodes at the
  858.      *same* hierarchical level.  (The `Top' node contains the exception
  859.      to this rule.  Since the `Top' node is the only node at that
  860.      level, `Next' refers to the first following node, which is almost
  861.      always a chapter or chapter-level node.)
  862.   To go to Sections 2.1 and 2.2 using Info, you need a menu inside
  863. Chapter 2.  (*Note Menus::.)  You would write the menu just before the
  864. beginning of Section 2.1, like this:
  865.          @menu
  866.          * Sect. 2.1::    Description of this section.
  867.          * Sect. 2.2::
  868.          @end menu
  869.   Write the node for Sect. 2.1 like this:
  870.          @node     Sect. 2.1, Sect. 2.2, Chapter 2, Chapter 2
  871.          @comment  node-name, next,      previous,  up
  872.   In Info format, the `Next' and `Previous' pointers of a node usually
  873. lead to other nodes at the same level--from chapter to chapter or from
  874. section to section (sometimes, as shown, the `Previous' pointer points
  875. up); an `Up' pointer usually leads to a node at the level above (closer
  876. to the `Top' node); and a `Menu' leads to nodes at a level below (closer
  877. to `leaves').  (A cross reference can point to a node at any level; see
  878. *Note Cross References::.)
  879.   Usually, an `@node' command and a chapter structuring command are
  880. used in sequence, along with indexing commands.  (You may follow the
  881. `@node' line with a comment line that reminds you which pointer is
  882. which.)
  883.   Here is the beginning of the chapter in this manual called "Ending a
  884. Texinfo File".  This shows an `@node' line followed by a comment line,
  885. an `@chapter' line, and then by indexing lines.
  886.      @node    Ending a File, Structuring, Beginning a File, Top
  887.      @comment node-name,     next,        previous,         up
  888.      @chapter Ending a Texinfo File
  889.      @cindex Ending a Texinfo file
  890.      @cindex Texinfo file ending
  891.      @cindex File ending
  892. File: texinfo.info,  Node: node,  Next: makeinfo Pointer Creation,  Prev: Node Menu Illustration,  Up: Nodes
  893. The `@node' Command
  894. ===================
  895.   A "node" is a segment of text that begins at an `@node' command and
  896. continues until the next `@node' command.  The definition of node is
  897. different from that for chapter or section.  A chapter may contain
  898. sections and a section may contain subsections; but a node cannot
  899. contain subnodes; the text of a node continues only until the next
  900. `@node' command in the file.  A node usually contains only one chapter
  901. structuring command, the one that follows the `@node' line.  On the
  902. other hand, in printed output nodes are used only for cross references,
  903. so a chapter or section may contain any number of nodes.  Indeed, a
  904. chapter usually contains several nodes, one for each section,
  905. subsection, and subsubsection.
  906.   To create a node, write an `@node' command at the beginning of a
  907. line, and follow it with four arguments, separated by commas, on the
  908. rest of the same line.  These arguments are the name of the node, and
  909. the names of the `Next', `Previous', and `Up' pointers, in that order.
  910. You may insert spaces before each pointer if you wish; the spaces are
  911. ignored.  You must write the name of the node, and the names of the
  912. `Next', `Previous', and `Up' pointers, all on the same line.  Otherwise,
  913. the formatters fail.  (*note info: (info)Top, for more information
  914. about nodes in Info.)
  915.   Usually, you write one of the chapter-structuring command lines
  916. immediately after an `@node' line--for example, an `@section' or
  917. `@subsection' line.  (*Note Types of Structuring Command: Structuring
  918. Command Types.)
  919.      *Please note:* The GNU Emacs Texinfo mode updating commands work
  920.      only with Texinfo files in which `@node' lines are followed by
  921.      chapter structuring lines.  *Note Updating Requirements::.
  922.   TeX uses `@node' lines to identify the names to use for cross
  923. references.  For this reason, you must write `@node' lines in a Texinfo
  924. file that you intend to format for printing, even if you do not intend
  925. to format it for Info.  (Cross references, such as the one at the end
  926. of this sentence, are made with `@xref' and its related commands; see
  927. *Note Cross References::.)
  928. * Menu:
  929. * Node Names::                  How to choose node and pointer names.
  930. * Writing a Node::              How to write an `@node' line.
  931. * Node Line Tips::              Keep names short.
  932. * Node Line Requirements::      Keep names unique, without @-commands.
  933. * First Node::                  How to write a `Top' node.
  934. * makeinfo top command::        How to use the `@top' command.
  935. * Top Node Summary::            Write a brief description for readers.
  936. File: texinfo.info,  Node: Node Names,  Next: Writing a Node,  Prev: node,  Up: node
  937. Choosing Node and Pointer Names
  938. -------------------------------
  939.   The name of a node identifies the node.  The pointers enable you to
  940. reach other nodes and consist of the names of those nodes.
  941.   Normally, a node's `Up' pointer contains the name of the node whose
  942. menu mentions that node.  The node's `Next' pointer contains the name
  943. of the node that follows that node in that menu and its `Previous'
  944. pointer contains the name of the node that precedes it in that menu.
  945. When a node's `Previous' node is the same as its `Up' node, both node
  946. pointers name the same node.
  947.   Usually, the first node of a Texinfo file is the `Top' node, and its
  948. `Up' and `Previous' pointers point to the `dir' file, which contains
  949. the main menu for all of Info.
  950.   The `Top' node itself contains the main or master menu for the manual.
  951. Also, it is helpful to include a brief description of the manual in the
  952. `Top' node.  *Note First Node::, for information on how to write the
  953. first node of a Texinfo file.
  954.