home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / texinfo-3.1-bin.lha / info / texi.info-4 (.txt) < prev    next >
GNU Info File  |  1994-02-24  |  50KB  |  944 lines

  1. This is Info file texi.info, produced by Makeinfo-1.55 from the input
  2. file texi.texi.
  3.    This file documents Texinfo, a documentation system that uses a
  4. single source file to produce both on-line information and a printed
  5. manual.
  6.    Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation,
  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
  13. this manual under the conditions for verbatim copying, provided that
  14. the 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: texi.info,  Node: Node Line Requirements,  Next: First Node,  Prev: Node Line Tips,  Up: node
  21. `@node' Line Requirements
  22. -------------------------
  23.    Here are several requirements for `@node' lines:
  24.    * All the node names for a single Info file must be unique.
  25.      Duplicates confuse the Info movement commands.  This means, for
  26.      example, that if you end every chapter with a summary, you must
  27.      name each summary node differently.  You cannot just call each one
  28.      "Summary".  You may, however, duplicate the titles of chapters,
  29.      sections, and the like.  Thus you can end each chapter in a book
  30.      with a section called "Summary", so long as the node names for
  31.      those sections are all different.
  32.    * A pointer name must be the name of a node.
  33.      The node to which a pointer points may come before or after the
  34.      node containing the pointer.
  35.    * You cannot use any of the Texinfo @-commands in a node name;
  36.      @-commands confuse Info.
  37.      Thus, the beginning of the section called `@chapter' looks like
  38.      this:
  39.           @node  chapter, unnumbered & appendix, makeinfo top, Structuring
  40.           @comment  node-name,  next,  previous,  up
  41.           @section @code{@@chapter}
  42.           @findex chapter
  43.    * You cannot use commas, colons, or apostrophes within a node name;
  44.      these confuse TeX or the Info formatters.
  45.      For example, the following is a section title:
  46.           @code{@@unnumberedsec}, @code{@@appendixsec}, @code{@@heading}
  47.      The corresponding node name is:
  48.           unnumberedsec appendixsec heading
  49.    * Case is significant.
  50. File: texi.info,  Node: First Node,  Next: makeinfo top command,  Prev: Node Line Requirements,  Up: node
  51. The First Node
  52. --------------
  53.    The first node of a Texinfo file is the `Top' node, except in an
  54. included file (*note Include Files::.).
  55.    The `Top' node (which must be named `top' or `Top') should have as
  56. its `Up' and `Previous' nodes the name of a node in another file, where
  57. there is a menu that leads to this file.  Specify the file name in
  58. parentheses.  If the file is to be installed directly in the Info
  59. directory file, use `(dir)' as the parent of the `Top' node; this is
  60. short for `(dir)top', and specifies the `Top' node in the `dir' file,
  61. which contains the main menu for Info.  For example, the `@node Top'
  62. line of this manual looks like this:
  63.      @node Top, Overview, (dir), (dir)
  64. (You may use the Texinfo updating commands or the `makeinfo' utility to
  65. insert these `Next' and `(dir)' pointers automatically.)
  66.    *Note Install an Info File::, for more information about installing
  67. an Info file in the `info' directory.
  68.    The `Top' node contains the main or master menu for the document.
  69. File: texi.info,  Node: makeinfo top command,  Next: Top Node Summary,  Prev: First Node,  Up: node
  70. The `@top' Sectioning Command
  71. -----------------------------
  72.    A special sectioning command, `@top', has been created for use with
  73. the `@node Top' line.  The `@top' sectioning command tells `makeinfo'
  74. that it marks the `Top' node in the file.  It provides the information
  75. that `makeinfo' needs to insert node pointers automatically.  Write the
  76. `@top' command at the beginning of the line immediately following the
  77. `@node Top' line.  Write the title on the remaining part of the same
  78. line as the `@top' command.
  79.    In Info, the `@top' sectioning command causes the title to appear on
  80. a line by itself, with a line of asterisks inserted underneath.
  81.    In TeX and `texinfo-format-buffer', the `@top' sectioning command is
  82. merely a synonym for `@unnumbered'.  Neither of these formatters
  83. require an `@top' command, and do nothing special with it.  You can use
  84. `@chapter' or `@unnumbered' after the `@node Top' line when you use
  85. these formatters.  Also, you can use `@chapter' or `@unnumbered' when
  86. you use the Texinfo updating commands to create or update pointers and
  87. menus.
  88.    Whatever sectioning command follows an `@node Top' line, whether it
  89. be `@top' or `@chapter', the `@node Top' line and the immediately
  90. following line and any additional text must be enclosed between
  91. `@ifinfo' and `@end ifinfo' commands.  (*Note Conditionals::.)  This
  92. prevents the title and the accompanying text from appearing in printed
  93. output.  Write the `@ifinfo' command before the `@node' line and write
  94. the `@end ifinfo' command after the `@top' or other sectioning command
  95. and after any additional text.  (You can write the `@end ifinfo'
  96. command after the `@end menu' command if you like.)
  97. File: texi.info,  Node: Top Node Summary,  Prev: makeinfo top command,  Up: node
  98. The `Top' Node Summary
  99. ----------------------
  100.    You can help readers by writing a summary in the `Top' node, after
  101. the `@top' line, before the main or master menu.  The summary should
  102. briefly describe the Info file.  You should also write the version
  103. number of the program to which the manual applies in this section.  This
  104. helps the reader keep track of which manual is for which version of the
  105. program.  If the manual changes more frequently than the program or is
  106. independent of it, you should also include an edition number for the
  107. manual.  (The title page should also contain this information: see
  108. *Note `@titlepage': titlepage.)
  109.    Put the whole of the `Top' node, including the `@top' sectioning
  110. command line if you have one, between `@ifinfo' and `@end ifinfo' so
  111. none of the text appears in the printed output (*note Conditionally
  112. Visible Text: Conditionals.).  (You may want to repeat the brief
  113. description from the `Top' node within `@iftex' ... `@end iftex' at the
  114. beginning of the first chapter, for those who read the printed manual.)
  115. File: texi.info,  Node: makeinfo Pointer Creation,  Prev: node,  Up: Nodes
  116. Creating Pointers with `makeinfo'
  117. =================================
  118.    The `makeinfo' program has a feature for automatically creating node
  119. pointers for a hierarchically organized file that lacks them.
  120.    When you take advantage of this feature, you do not need to write the
  121. `Next', `Previous', and `Up' pointers after the name of a node.
  122. However, you must write a sectioning command, such as `@chapter' or
  123. `@section', on the line immediately following each truncated `@node'
  124. line.  You cannot write a comment line after a node line; the section
  125. line must follow it immediately.
  126.    In addition, you must follow the `Top' `@node' line with a line
  127. beginning with `@top' to mark the `Top' node in the file. *Note `@top':
  128. makeinfo top.
  129.    Finally, you must write the name of each node (except for the `Top'
  130. node) in a menu that is one or more hierarchical levels above the
  131. node's hierarchical level.
  132.    This node pointer insertion feature in `makeinfo' is an alternative
  133. to the menu and pointer creation and update commands in Texinfo mode.
  134. (*Note Updating Nodes and Menus::.)  It is especially helpful to people
  135. who do not use GNU Emacs for writing Texinfo documents.
  136. File: texi.info,  Node: Menus,  Next: Cross References,  Prev: Nodes,  Up: Top
  137. Menus
  138. *****
  139.    "Menus" contain pointers to subordinate nodes.(1) In Info, you use
  140. menus to go to such nodes.  Menus have no effect in printed manuals and
  141. do not appear in them.
  142.    By convention, a menu is put at the end of a node since a reader who
  143. uses the menu may not see text that follows it.
  144.    A node that has a menu should *not* contain much text.  If you have
  145. a lot of text and a menu, move most of the text into a new subnode--all
  146. but a few lines.
  147. * Menu:
  148. * Menu Location::               Put a menu in a short node.
  149. * Writing a Menu::              What is a menu?
  150. * Menu Parts::                  A menu entry has three parts.
  151. * Less Cluttered Menu Entry::   Two part menu entry.
  152. * Menu Example::                Two and three part menu entries.
  153. * Other Info Files::            How to refer to a different Info file.
  154.    ---------- Footnotes ----------
  155.    (1)  Menus can carry you to any node, regardless of the hierarchical
  156. structure; even to nodes in a different Info file.  However, the GNU
  157. Emacs Texinfo mode updating commands work only to create menus of
  158. subordinate nodes.  Conventionally, cross references are used to refer
  159. to other nodes.
  160. File: texi.info,  Node: Menu Location,  Next: Writing a Menu,  Up: Menus
  161. Menus Need Short Nodes
  162. ======================
  163.    A reader can easily see a menu that is close to the beginning of the
  164. node.  The node should be short.  As a practical matter, you should
  165. locate a menu within 20 lines of the beginning of the node.  Otherwise,
  166. a reader with a terminal that displays only a few lines may miss the
  167. menu and its associated text.
  168.    The short text before a menu may look awkward in a printed manual.
  169. To avoid this, you can write a menu near the beginning of its node and
  170. follow the menu by an `@node' line, and then an `@heading' line located
  171. within `@ifinfo' and `@end ifinfo'.  This way, the menu, `@node' line,
  172. and title appear only in the Info file, not the printed document.
  173.    For example, the preceding two paragraphs follow an Info-only menu,
  174. `@node' line, and heading, and look like this:
  175.      @menu
  176.      * Menu Location::             Put a menu in a short node.
  177.      * Writing a Menu::            What is a menu?
  178.      * Menu Parts::                A menu entry has three parts.
  179.      * Less Cluttered Menu Entry:: Two part menu entry.
  180.      * Menu Example::              Two and three part entries.
  181.      * Other Info Files::          How to refer to a different
  182.                                      Info file.
  183.      @end menu
  184.      
  185.      @node Menu Location, Writing a Menu,  , Menus
  186.      @ifinfo
  187.      @heading Menus Need Short Nodes
  188.      @end ifinfo
  189.    The Texinfo file for this document contains more than a dozen
  190. examples of this procedure.  One is at the beginning of this chapter;
  191. another is at the beginning of the "Cross References" chapter.
  192. File: texi.info,  Node: Writing a Menu,  Next: Menu Parts,  Prev: Menu Location,  Up: Menus
  193. Writing a Menu
  194. ==============
  195.    A menu consists of an `@menu' command on a line by itself followed
  196. by menu entry lines or menu comment lines and then by an `@end menu'
  197. command on a line by itself.
  198.    A menu looks like this:
  199.      @menu
  200.      Larger Units of Text
  201.      
  202.      * Files::                       All about handling files.
  203.      * Multiples: Buffers.           Multiple buffers; editing
  204.                                        several files at once.
  205.      @end menu
  206.    In a menu, every line that begins with an `* ' is a "menu entry".
  207. (Note the space after the asterisk.)  A line that does not start with
  208. an `* ' may also appear in a menu.  Such a line is not a menu entry but
  209. is a menu comment line that appears in the Info file.  In the example
  210. above, the line `Larger Units of Text' is a menu comment line; the two
  211. lines starting with `* ' are menu entries.
  212. File: texi.info,  Node: Menu Parts,  Next: Less Cluttered Menu Entry,  Prev: Writing a Menu,  Up: Menus
  213. The Parts of a Menu
  214. ===================
  215.    A menu entry has three parts, only the second of which is required:
  216.   1. The menu entry name.
  217.   2. The name of the node (required).
  218.   3. A description of the item.
  219.    The template for a menu entry looks like this:
  220.      * MENU-ENTRY-NAME: NODE-NAME.   DESCRIPTION
  221.    Follow the menu entry name with a single colon and follow the node
  222. name with tab, comma, period, or newline.
  223.    In Info, a user selects a node with the `m' (`Info-menu') command.
  224. The menu entry name is what the user types after the `m' command.
  225.    The third part of a menu entry is a descriptive phrase or sentence.
  226. Menu entry names and node names are often short; the description
  227. explains to the reader what the node is about.  The description, which
  228. is optional, can spread over two or more lines.  A useful description
  229. complements the node name rather than repeats it.
  230. File: texi.info,  Node: Less Cluttered Menu Entry,  Next: Menu Example,  Prev: Menu Parts,  Up: Menus
  231. Less Cluttered Menu Entry
  232. =========================
  233.    When the menu entry name and node name are the same, you can write
  234. the name immediately after the asterisk and space at the beginning of
  235. the line and follow the name with two colons.
  236.    For example, write
  237.      * Name::                                    DESCRIPTION
  238. instead of
  239.      * Name: Name.                               DESCRIPTION
  240.    You should use the node name for the menu entry name whenever
  241. possible, since it reduces visual clutter in the menu.
  242. File: texi.info,  Node: Menu Example,  Next: Other Info Files,  Prev: Less Cluttered Menu Entry,  Up: Menus
  243. A Menu Example
  244. ==============
  245.    A menu looks like this in Texinfo:
  246.      @menu
  247.      * menu entry name: Node name.   A short description.
  248.      * Node name::                   This form is preferred.
  249.      @end menu
  250. This produces:
  251.      * menu:
  252.      
  253.      * menu entry name: Node name.   A short description.
  254.      * Node name::                   This form is preferred.
  255.    Here is an example as you might see it in a Texinfo file:
  256.      @menu
  257.      Larger Units of Text
  258.      
  259.      * Files::                       All about handling files.
  260.      * Multiples: Buffers.           Multiple buffers; editing
  261.                                        several files at once.
  262.      @end menu
  263. This produces:
  264.      * menu:
  265.      Larger Units of Text
  266.      
  267.      * Files::                       All about handling files.
  268.      * Multiples: Buffers.           Multiple buffers; editing
  269.                                        several files at once.
  270.    In this example, the menu has two entries.  `Files' is both a menu
  271. entry name and the name of the node referred to by that name.
  272. `Multiples' is the menu entry name; it refers to the node named
  273. `Buffers'. The line `Larger Units of Text' is a comment; it appears in
  274. the menu, but is not an entry.
  275.    Since no file name is specified with either `Files' or `Buffers',
  276. they must be the names of nodes in the same Info file (*note Referring
  277. to Other Info Files: Other Info Files.).
  278. File: texi.info,  Node: Other Info Files,  Prev: Menu Example,  Up: Menus
  279. Referring to Other Info Files
  280. =============================
  281.    You can create a menu entry that enables a reader in Info to go to a
  282. node in another Info file by writing the file name in parentheses just
  283. before the node name.  In this case, you should use the three-part menu
  284. entry format, which saves the reader from having to type the file name.
  285.    The format looks like this:
  286.      @menu
  287.      * FIRST-ENTRY-NAME:(FILENAME)NODENAME.     DESCRIPTION
  288.      * SECOND-ENTRY-NAME:(FILENAME)SECOND-NODE. DESCRIPTION
  289.      @end menu
  290.    For example, to refer directly to the `Outlining' and `Rebinding'
  291. nodes in the `Emacs Manual', you would write a menu like this:
  292.      @menu
  293.      * Outlining: (emacs)Outline Mode. The major mode for
  294.                                        editing outlines.
  295.      * Rebinding: (emacs)Rebinding.    How to redefine the
  296.                                        meaning of a key.
  297.      @end menu
  298.    If you do not list the node name, but only name the file, then Info
  299. presumes that you are referring to the `Top' node.
  300.    The `dir' file that contains the main menu for Info has menu entries
  301. that list only file names.  These take you directly to the `Top' nodes
  302. of each Info document.  (*Note Install an Info File::.)
  303.    For example:
  304.      * Info: (info).         Documentation browsing system.
  305.      * Emacs: (emacs).       The extensible, self-documenting
  306.                              text editor.
  307. (The `dir' top level directory for the Info system is an Info file, not
  308. a Texinfo file, but a menu entry looks the same in both types of file.)
  309.    Note that the GNU Emacs Texinfo mode menu updating commands only work
  310. with nodes within the current buffer, so you cannot use them to create
  311. menus that refer to other files.  You must write such menus by hand.
  312. File: texi.info,  Node: Cross References,  Next: Marking Text,  Prev: Menus,  Up: Top
  313. Cross References
  314. ****************
  315.    "Cross references" are used to refer the reader to other parts of the
  316. same or different Texinfo files.  In Texinfo, nodes are the places to
  317. which cross references can refer.
  318. * Menu:
  319. * References::                  What cross references are for.
  320. * Cross Reference Commands::    A summary of the different commands.
  321. * Cross Reference Parts::       A cross reference has several parts.
  322. * xref::                        Begin a reference with `See' ...
  323. * Top Node Naming::             How to refer to the beginning of another file.
  324. * ref::                         A reference for the last part of a sentence.
  325. * pxref::                       How to write a parenthetical cross reference.
  326. * inforef::                     How to refer to an Info-only file.
  327. File: texi.info,  Node: References,  Next: Cross Reference Commands,  Up: Cross References
  328. What References Are For
  329. =======================
  330.    Often, but not always, a printed document should be designed so that
  331. it can be read sequentially.  People tire of flipping back and forth to
  332. find information that should be presented to them as they need it.
  333.    However, in any document, some information will be too detailed for
  334. the current context, or incidental to it; use cross references to
  335. provide access to such information.  Also, an on-line help system or a
  336. reference manual is not like a novel; few read such documents in
  337. sequence from beginning to end.  Instead, people look up what they
  338. need.  For this reason, such creations should contain many cross
  339. references to help readers find other information that they may not
  340. have read.
  341.    In a printed manual, a cross reference results in a page reference,
  342. unless it is to another manual altogether, in which case the cross
  343. reference names that manual.
  344.    In Info, a cross reference results in an entry that you can follow
  345. using the Info `f' command.  (*note Some advanced Info commands:
  346. (info)Help-Adv.)
  347.    The various cross reference commands use nodes to define cross
  348. reference locations.  This is evident in Info, in which a cross
  349. reference takes you to the specified node.  TeX also uses nodes to
  350. define cross reference locations, but the action is less obvious.  When
  351. TeX generates a DVI file, it records nodes' page numbers and uses the
  352. page numbers in making references.  Thus, if you are writing a manual
  353. that will only be printed, and will not be used on-line, you must
  354. nonetheless write `@node' lines to name the places to which you make
  355. cross references.
  356. File: texi.info,  Node: Cross Reference Commands,  Next: Cross Reference Parts,  Prev: References,  Up: Cross References
  357. Different Cross Reference Commands
  358. ==================================
  359.    There are four different cross reference commands:
  360. `@xref'
  361.      Used to start a sentence in the printed manual saying `See ...' or
  362.      an entry in the Info file saying `*Note ...'.
  363. `@ref'
  364.      Used within or, more often, at the end of a sentence; same as
  365.      `@xref' for Info; produces just the reference in the printed
  366.      manual without a preceding `See'.
  367. `@pxref'
  368.      Used within parentheses to make a reference that suits both an Info
  369.      file and a printed book.  Starts with a lower case `see' within the
  370.      printed manual. (`p' is for `parenthesis'.)
  371. `@inforef'
  372.      Used to make a reference to an Info file for which there is no
  373.      printed manual.
  374. (The `@cite' command is used to make references to books and manuals
  375. for which there is no corresponding Info file and, therefore, no node
  376. to which to point.   *Note `@cite': cite.)
  377. File: texi.info,  Node: Cross Reference Parts,  Next: xref,  Prev: Cross Reference Commands,  Up: Cross References
  378. Parts of a Cross Reference
  379. ==========================
  380.    A cross reference command requires only one argument, which is the
  381. name of the node to which it refers.  But a cross reference command may
  382. contain up to four additional arguments.  By using these arguments, you
  383. can provide a cross reference name for Info, a topic description or
  384. section title for the printed output, the name of a different Info
  385. file, and the name of a different printed manual.
  386.    Here is a simple cross reference example:
  387.      @xref{Node name}.
  388. which produces
  389.      *Note Node name::.
  390.      See Section NNN [Node name], page PPP.
  391.    Here is an example of a full five-part cross reference:
  392.      @xref{Node name, Cross Reference Name, Particular Topic,
  393.      info-file-name, A Printed Manual}, for details.
  394. which produces
  395.      *Note Cross Reference Name: (info-file-name)Node name,
  396.      for details.
  397. in Info and
  398.      See section "Particular Topic" in A Printed Manual, for details.
  399. in a printed book.
  400.    The five possible arguments for a cross reference are:
  401.   1. The node name (required).  This is the node to which the cross
  402.      reference takes you.  In a printed document, the location of the
  403.      node provides the page reference only for references within the
  404.      same document.
  405.   2. The cross reference name for the Info reference, if it is to be
  406.      different from the node name.  If you include this argument, it
  407.      argument becomes the first part of the cross reference. It is
  408.      usually omitted.
  409.   3. A topic description or section name.  Often, this is the title of
  410.      the section.  This is used as the name of the reference in the
  411.      printed manual.  If omitted, the node name is used.
  412.   4. The name of the Info file in which the reference is located, if it
  413.      is different from the current file.
  414.   5. The name of a printed manual from a different Texinfo file.
  415.    The template for a full five argument cross reference looks like
  416. this:
  417.      @xref{NODE-NAME, CROSS-REFERENCE-NAME, TITLE-OR-TOPIC,
  418.      INFO-FILE-NAME, PRINTED-MANUAL-TITLE}.
  419.    Cross references with one, two, three, four, and five arguments are
  420. described separately following the description of `@xref'.
  421.    Write a node name in a cross reference in exactly the same way as in
  422. the `@node' line, including the same capitalization; otherwise, the
  423. formatters may not find the reference.
  424.    You can write cross reference commands within a paragraph, but note
  425. how Info and TeX format the output of each of the various commands:
  426. write `@xref' at the beginning of a sentence; write `@pxref' only
  427. within parentheses, and so on.
  428. File: texi.info,  Node: xref,  Next: Top Node Naming,  Prev: Cross Reference Parts,  Up: Cross References
  429. `@xref'
  430. =======
  431.    The `@xref' command generates a cross reference for the beginning of
  432. a sentence.  The Info formatting commands convert it into an Info cross
  433. reference, which the Info `f' command can use to bring you directly to
  434. another node.  The TeX typesetting commands convert it into a page
  435. reference, or a reference to another book or manual.
  436. * Menu:
  437. * Reference Syntax::            What a reference looks like and requires.
  438. * One Argument::                `@xref' with one argument.
  439. * Two Arguments::               `@xref' with two arguments.
  440. * Three Arguments::             `@xref' with three arguments.
  441. * Four and Five Arguments::     `@xref' with four and five arguments.
  442. File: texi.info,  Node: Reference Syntax,  Next: One Argument,  Up: xref
  443. What a Reference Looks Like and Requires
  444. ----------------------------------------
  445.    Most often, an Info cross reference looks like this:
  446.      *Note NODE-NAME::.
  447. or like this
  448.      *Note CROSS-REFERENCE-NAME: NODE-NAME.
  449. In TeX, a cross reference looks like this:
  450.      See Section SECTION-NUMBER [NODE-NAME], page PAGE.
  451. or like this
  452.      See Section SECTION-NUMBER [TITLE-OR-TOPIC], page PAGE.
  453.    The `@xref' command does not generate a period or comma to end the
  454. cross reference in either the Info file or the printed output.  You
  455. must write that period or comma yourself; otherwise, Info will not
  456. recognize the end of the reference.  (The `@pxref' command works
  457. differently.  *Note `@pxref': pxref.)
  458.      *Please note:* A period or comma *must* follow the closing brace
  459.      of an `@xref'.  It is required to terminate the cross reference.
  460.      This period or comma will appear in the output, both in the Info
  461.      file and in the printed manual.
  462.    `@xref' must refer to an Info node by name.  Use `@node' to define
  463. the node (*note Writing a Node::.).
  464.    `@xref' is followed by several arguments inside braces, separated by
  465. commas.  Whitespace before and after these commas is ignored.
  466.    A cross reference requires only the name of a node; but it may
  467. contain up to four additional arguments.  Each of these variations
  468. produces a cross reference that looks somewhat different.
  469.      *Please note:* Commas separate arguments in a cross reference;
  470.      avoid including them in the title or other part lest the formatters
  471.      mistake them for separators.
  472. File: texi.info,  Node: One Argument,  Next: Two Arguments,  Prev: Reference Syntax,  Up: xref
  473. `@xref' with One Argument
  474. -------------------------
  475.    The simplest form of `@xref' takes one argument, the name of another
  476. node in the same Info file.    The Info formatters produce output that
  477. the Info readers can use to jump to the reference; TeX produces output
  478. that specifies the page and section number for you.
  479. For example,
  480.      @xref{Tropical Storms}.
  481. produces
  482.      *Note Tropical Storms::.
  483.      See Section 3.1 [Tropical Storms], page 24.
  484. (Note that in the preceding example the closing brace is followed by a
  485. period.)
  486.    You can write a clause after the cross reference, like this:
  487.      @xref{Tropical Storms}, for more info.
  488. which produces
  489.      *Note Tropical Storms::, for more info.
  490.      See Section 3.1 [Tropical Storms], page 24, for more info.
  491. (Note that in the preceding example the closing brace is followed by a
  492. comma, and then by the clause, which is followed by a period.)
  493. File: texi.info,  Node: Two Arguments,  Next: Three Arguments,  Prev: One Argument,  Up: xref
  494. `@xref' with Two Arguments
  495. --------------------------
  496.    With two arguments, the second is used as the name of the Info cross
  497. reference, while the first is still the name of the node to which the
  498. cross reference points.
  499. The template is like this:
  500.      @xref{NODE-NAME, CROSS-REFERENCE-NAME}.
  501. For example,
  502.      @xref{Electrical Effects, Lightning}.
  503. produces:
  504.      *Note Lightning: Electrical Effects.
  505.      See Section 5.2 [Electrical Effects], page 57.
  506. (Note that in the preceding example the closing brace is followed by a
  507. period; and that the node name is printed, not the cross reference
  508. name.)
  509.    You can write a clause after the cross reference, like this:
  510.      @xref{Electrical Effects, Lightning}, for more info.
  511. which produces
  512.      *Note Lightning: Electrical Effects, for more info.
  513.      See Section 5.2 [Electrical Effects], page 57, for more info.
  514. (Note that in the preceding example the closing brace is followed by a
  515. comma, and then by the clause, which is followed by a period.)
  516. File: texi.info,  Node: Three Arguments,  Next: Four and Five Arguments,  Prev: Two Arguments,  Up: xref
  517. `@xref' with Three Arguments
  518. ----------------------------
  519.    A third argument replaces the node name in the TeX output.  The third
  520. argument should be the name of the section in the printed output, or
  521. else state the topic discussed by that section.  Often, you will want to
  522. use initial upper case letters so it will be easier to read when the
  523. reference is printed.  Use a third argument when the node name is
  524. unsuitable because of syntax or meaning.
  525.    Remember to avoid placing a comma within the title or topic section
  526. of a cross reference, or within any other section.  The formatters
  527. divide cross references into arguments according to the commas; a comma
  528. within a title or other section will divide it into two arguments.  In
  529. a reference, you need to write a title such as "Clouds, Mist, and Fog"
  530. without the commas.
  531.    Also, remember to write a comma or period after the closing brace of
  532. a `@xref' to terminate the cross reference.  In the following examples,
  533. a clause follows a terminating comma.
  534. The template is like this:
  535.      @xref{NODE-NAME, CROSS-REFERENCE-NAME, TITLE-OR-TOPIC}.
  536. For example,
  537.      @xref{Electrical Effects, Lightning, Thunder and Lightning},
  538.      for details.
  539. produces
  540.      *Note Lightning: Electrical Effects, for details.
  541.      See Section 5.2 [Thunder and Lightning], page 57, for details.
  542.    If a third argument is given and the second one is empty, then the
  543. third argument serves both.  (Note how two commas, side by side, mark
  544. the empty second argument.)
  545.      @xref{Electrical Effects, , Thunder and Lightning},
  546.      for details.
  547. produces
  548.      *Note Thunder and Lightning: Electrical Effects, for details.
  549.      See Section 5.2 [Thunder and Lightning], page 57, for details.
  550.    As a practical matter, it is often best to write cross references
  551. with just the first argument if the node name and the section title are
  552. the same, and with the first and third arguments if the node name and
  553. title are different.
  554.    Here are several examples from `The GAWK Manual':
  555.      @xref{Sample Program}.
  556.      @xref{Glossary}.
  557.      @xref{Case-sensitivity, ,Case-sensitivity in Matching}.
  558.      @xref{Close Output, , Closing Output Files and Pipes},
  559.         for more information.
  560.      @xref{Regexp, , Regular Expressions as Patterns}.
  561. File: texi.info,  Node: Four and Five Arguments,  Prev: Three Arguments,  Up: xref
  562. `@xref' with Four and Five Arguments
  563. ------------------------------------
  564.    In a cross reference, a fourth argument specifies the name of another
  565. Info file, different from the file in which the reference appears, and
  566. a fifth argument specifies its title as a printed manual.
  567.    Remember that a comma or period must follow the closing brace of an
  568. `@xref' command to terminate the cross reference.  In the following
  569. examples, a clause follows a terminating comma.
  570. The template is:
  571.      @xref{NODE-NAME, CROSS-REFERENCE-NAME, TITLE-OR-TOPIC,
  572.      INFO-FILE-NAME, PRINTED-MANUAL-TITLE}.
  573. For example,
  574.      @xref{Electrical Effects, Lightning, Thunder and Lightning,
  575.      weather, An Introduction to Meteorology}, for details.
  576. produces
  577.      *Note Lightning: (weather)Electrical Effects, for details.
  578. The name of the Info file is enclosed in parentheses and precedes the
  579. name of the node.
  580. In a printed manual, the reference looks like this:
  581.      See section "Thunder and Lightning" in An Introduction to
  582.      Meteorology, for details.
  583. The title of the printed manual is typeset in italics; and the
  584. reference lacks a page number since TeX cannot know to which page a
  585. reference refers when that reference is to another manual.
  586.    Often, you will leave out the second argument when you use the long
  587. version of `@xref'.  In this case, the third argument, the topic
  588. description, will be used as the cross reference name in Info.
  589. The template looks like this:
  590.      @xref{NODE-NAME, , TITLE-OR-TOPIC, INFO-FILE-NAME,
  591.      PRINTED-MANUAL-TITLE}, for details.
  592. which produces
  593.      *Note TITLE-OR-TOPIC: (INFO-FILE-NAME)NODE-NAME, for details.
  594.      See section TITLE-OR-TOPIC in PRINTED-MANUAL-TITLE, for details.
  595. For example,
  596.      @xref{Electrical Effects, , Thunder and Lightning,
  597.      weather, An Introduction to Meteorology}, for details.
  598. produces
  599.      *Note Thunder and Lightning: (weather)Electrical Effects,
  600.      for details.
  601.      See section "Thunder and Lightning" in An Introduction to
  602.      Meteorology, for details.
  603.    On rare occasions, you may want to refer to another Info file that
  604. is within a single printed manual--when multiple Texinfo files are
  605. incorporated into the same TeX run but make separate Info files.  In
  606. this case, you need to specify only the fourth argument, and not the
  607. fifth.
  608. File: texi.info,  Node: Top Node Naming,  Next: ref,  Prev: xref,  Up: Cross References
  609. Naming a `Top' Node
  610. ===================
  611.    In a cross reference, you must always name a node.  This means that
  612. in order to refer to a whole manual, you must identify the `Top' node by
  613. writing it as the first argument to the `@xref' command.  (This is
  614. different from the way you write a menu entry; see *Note Referring to
  615. Other Info Files: Other Info Files.)  At the same time, to provide a
  616. meaningful section topic or title in the printed cross reference
  617. (instead of the word `Top'), you must write an appropriate entry for
  618. the third argument to the `@xref' command.
  619. Thus, to make a cross reference to `The GNU Make Manual', write:
  620.      @xref{Top, , Overview, make, The GNU Make Manual}.
  621. which produces
  622.      *Note Overview: (make)Top.
  623.      See section "Overview" in The GNU Make Manual.
  624. In this example, `Top' is the name of the first node, and `Overview' is
  625. the name of the first section of the manual.
  626. File: texi.info,  Node: ref,  Next: pxref,  Prev: Top Node Naming,  Up: Cross References
  627. `@ref'
  628. ======
  629.    `@ref' is nearly the same as `@xref' except that it does not
  630. generate a `See' in the printed output, just the reference itself.
  631. This makes it useful as the last part of a sentence.
  632. For example,
  633.      For more information, see @ref{Hurricanes}.
  634. produces
  635.      For more information, see *Note Hurricanes.
  636.      For more information, see Section 8.2 [Hurricanes], page 123.
  637.    The `@ref' command sometimes leads writers to express themselves in
  638. a manner that is suitable for a printed manual but looks awkward in the
  639. Info format.  Bear in mind that your audience will be using both the
  640. printed and the Info format.
  641. For example,
  642.      Sea surges are described in @ref{Hurricanes}.
  643. produces
  644.      Sea surges are described in Section 6.7 [Hurricanes], page 72.
  645. in a printed document, and the following in Info:
  646.      Sea surges are described in *Note Hurricanes::.
  647.      *Caution:* You *must* write a period or comma immediately after an
  648.      `@ref' command with two or more arguments.  Otherwise, Info will
  649.      not find the end of the cross reference entry and its attempt to
  650.      follow the cross reference will fail.  As a general rule, you
  651.      should write a period or comma after every `@ref' command.  This
  652.      looks best in both the printed and the Info output.
  653. File: texi.info,  Node: pxref,  Next: inforef,  Prev: ref,  Up: Cross References
  654. `@pxref'
  655. ========
  656.    The parenthetical reference command, `@pxref', is nearly the same as
  657. `@xref', but you use it *only* inside parentheses and you do *not* type
  658. a comma or period after the command's closing brace.  The command
  659. differs from `@xref' in two ways:
  660.   1. TeX typesets the reference for the printed manual with a lower case
  661.      `see' rather than an upper case `See'.
  662.   2. The Info formatting commands automatically end the reference with a
  663.      closing colon or period.
  664.    Because one type of formatting automatically inserts closing
  665. punctuation and the other does not, you should use `@pxref' *only*
  666. inside parentheses as part of another sentence.  Also, you yourself
  667. should not insert punctuation after the reference, as you do with
  668. `@xref'.
  669.    `@pxref' is designed so that the output looks right and works right
  670. between parentheses both in printed output and in an Info file.  In a
  671. printed manual, a closing comma or period should not follow a cross
  672. reference within parentheses; such punctuation is wrong.  But in an
  673. Info file, suitable closing punctuation must follow the cross reference
  674. so Info can recognize its end.  `@pxref' spares you the need to use
  675. complicated methods to put a terminator into one form of the output and
  676. not the other.
  677. With one argument, a parenthetical cross reference looks like this:
  678.      ... storms cause flooding (@pxref{Hurricanes}) ...
  679. which produces
  680.      ... storms cause flooding (*Note Hurricanes::) ...
  681.      ... storms cause flooding (see Section 6.7 [Hurricanes], page 72)
  682.      ...
  683.    With two arguments, a parenthetical cross reference has this
  684. template:
  685.      ... (@pxref{NODE-NAME, CROSS-REFERENCE-NAME}) ...
  686. which produces
  687.      ... (*Note CROSS-REFERENCE-NAME: NODE-NAME.) ...
  688.      ... (see Section NNN [NODE-NAME], page PPP) ...
  689.    `@pxref' can be used with up to five arguments just like `@xref'
  690. (*note `@xref': xref.).
  691.      *Please note:* Use `@pxref' only as a parenthetical reference.  Do
  692.      not try to use `@pxref' as a clause in a sentence.  It will look
  693.      bad in either the Info file, the printed output, or both.
  694.      Also, parenthetical cross references look best at the ends of
  695.      sentences.  Although you may write them in the middle of a
  696.      sentence, that location breaks up the flow of text.
  697. File: texi.info,  Node: inforef,  Prev: pxref,  Up: Cross References
  698. `@inforef'
  699. ==========
  700.    `@inforef' is used for cross references to Info files for which
  701. there are no printed manuals.  Even in a printed manual, `@inforef'
  702. generates a reference directing the user to look in an Info file.
  703.    The command takes either two or three arguments, in the following
  704. order:
  705.   1. The node name.
  706.   2. The cross reference name (optional).
  707.   3. The Info file name.
  708. Separate the arguments with commas, as with `@xref'.  Also, you must
  709. terminate the reference with a comma or period after the `}', as you do
  710. with `@xref'.
  711. The template is:
  712.      @inforef{NODE-NAME, CROSS-REFERENCE-NAME, INFO-FILE-NAME},
  713. Thus,
  714.      @inforef{Expert, Advanced Info commands, info},
  715.      for more information.
  716. produces
  717.      *Note Advanced Info commands: (info)Expert,
  718.      for more information.
  719.      See Info file `info', node `Expert', for more information.
  720. Similarly,
  721.      @inforef{Expert, , info}, for more information.
  722. produces
  723.      *Note (info)Expert::, for more information.
  724.      See Info file `info', node `Expert', for more information.
  725.    The converse of `@inforef' is `@cite', which is used to refer to
  726. printed works for which no Info form exists.  *Note `@cite': cite.
  727. File: texi.info,  Node: Marking Text,  Next: Quotations and Examples,  Prev: Cross References,  Up: Top
  728. Marking Words and Phrases
  729. *************************
  730.    In Texinfo, you can mark words and phrases in a variety of ways.
  731. The Texinfo formatters use this information to determine how to
  732. highlight the text.  You can specify, for example, whether a word or
  733. phrase is a defining occurrence, a metasyntactic variable, or a symbol
  734. used in a program.  Also, you can emphasize text.
  735. * Menu:
  736. * Indicating::                  How to indicate definitions, files, etc.
  737. * Emphasis::                    How to emphasize text.
  738. File: texi.info,  Node: Indicating,  Next: Emphasis,  Up: Marking Text
  739. Indicating Definitions, Commands, etc.
  740. ======================================
  741.    Texinfo has commands for indicating just what kind of object a piece
  742. of text refers to.  For example, metasyntactic variables are marked by
  743. `@var', and code by `@code'.  Since the pieces of text are labelled by
  744. commands that tell what kind of object they are, it is easy to change
  745. the way the Texinfo formatters prepare such text.  (Texinfo is an
  746. *intentional* formatting language rather than a *typesetting*
  747. formatting language.)
  748.    For example, in a printed manual, code is usually illustrated in a
  749. typewriter font; `@code' tells TeX to typeset this text in this font.
  750. But it would be easy to change the way TeX highlights code to use
  751. another font, and this change would not effect how keystroke examples
  752. are highlighted.  If straight typesetting commands were used in the body
  753. of the file and you wanted to make a change, you would need to check
  754. every single occurrence to make sure that you were changing code and
  755. not something else that should not be changed.
  756. * Menu:
  757. * Useful Highlighting::         Highlighting provides useful information.
  758. * code::                        How to indicate code.
  759. * kbd::                         How to show keyboard input.
  760. * key::                         How to specify keys.
  761. * samp::                        How to show a literal sequence of characters.
  762. * var::                         How to indicate a metasyntactic variable.
  763. * file::                        How to indicate the name of a file.
  764. * dfn::                         How to specify a definition.
  765. * cite::                        How to refer to a book that is not in Info.
  766. File: texi.info,  Node: Useful Highlighting,  Next: code,  Up: Indicating
  767. Highlighting Commands are Useful
  768. --------------------------------
  769.    The highlighting commands can be used to generate useful information
  770. from the file, such as lists of functions or file names.  It is
  771. possible, for example, to write a program in Emacs Lisp (or a keyboard
  772. macro) to insert an index entry after every paragraph that contains
  773. words or phrases marked by a specified command.  You could do this to
  774. construct an index of functions if you had not already made the entries.
  775.    The commands serve a variety of purposes:
  776. `@code{SAMPLE-CODE}'
  777.      Indicate text that is a literal example of a piece of a program.
  778. `@kbd{KEYBOARD-CHARACTERS}'
  779.      Indicate keyboard input.
  780. `@key{KEY-NAME}'
  781.      Indicate the conventional name for a key on a keyboard.
  782. `@samp{TEXT}'
  783.      Indicate text that is a literal example of a sequence of
  784.      characters.
  785. `@var{METASYNTACTIC-VARIABLE}'
  786.      Indicate a metasyntactic variable.
  787. `@file{FILE-NAME}'
  788.      Indicate the name of a file.
  789. `@dfn{TERM}'
  790.      Indicate the introductory or defining use of a term.
  791. `@cite{REFERENCE}'
  792.      Indicate the name of a book.
  793. File: texi.info,  Node: code,  Next: kbd,  Prev: Useful Highlighting,  Up: Indicating
  794. `@code'{SAMPLE-CODE}
  795. --------------------
  796.    Use the `@code' command to indicate text that is a piece of a
  797. program and which consists of entire syntactic tokens.  Enclose the
  798. text in braces.
  799.    Thus, you should use `@code' for an expression in a program, for the
  800. name of a variable or function used in a program, or for a keyword.
  801. Also, you should use `@code' for the name of a program, such as `diff',
  802. that is a name used in the machine. (You should write the name of a
  803. program in the ordinary text font if you regard it as a new English
  804. word, such as `Emacs' or `Bison'.)
  805.    Use `@code' for environment variables such as `TEXINPUTS', and other
  806. variables.
  807.    Use `@code' for command names in command languages that resemble
  808. programming languages, such as Texinfo or the shell.  For example,
  809. `@code' and `@samp' are produced by writing `@code{@@code}' and
  810. `@code{@@samp}' in the Texinfo source, respectively.
  811.    Note, however, that you should not use `@code' for shell options
  812. such as `-c' when such options stand alone. (Use `@samp'.) Also, an
  813. entire shell command often looks better if written using `@samp' rather
  814. than `@code'.  In this case, the rule is to choose the more pleasing
  815. format.
  816.    It is incorrect to alter the case of a word inside an `@code'
  817. command when it appears at the beginning of a sentence.  Most computer
  818. languages are case sensitive.  In C, for example, `Printf' is different
  819. from the identifier `printf', and most likely is a misspelling of it.
  820. Even in languages which are not case sensitive, it is confusing to a
  821. human reader to see identifiers spelled in different ways.  Pick one
  822. spelling and always use that.  If you do not want to start a sentence
  823. with a command written all in lower case, you should rearrange the
  824. sentence.
  825.    Do not use the `@code' command for a string of characters shorter
  826. than a syntactic token.  If you are writing about `TEXINPU', which is
  827. just a part of the name for the `TEXINPUTS' environment variable, you
  828. should use `@samp'.
  829.    In particular, you should not use the `@code' command when writing
  830. about the characters used in a token; do not, for example, use `@code'
  831. when you are explaining what letters or printable symbols can be used
  832. in the names of functions.  (Use `@samp'.)  Also, you should not use
  833. `@code' to mark text that is considered input to programs unless the
  834. input is written in a language that is like a programming language.
  835. For example, you should not use `@code' for the keystroke commands of
  836. GNU Emacs (use `@kbd' instead) although you may use `@code' for the
  837. names of the Emacs Lisp functions that the keystroke commands invoke.
  838.    In the printed manual, `@code' causes TeX to typeset the argument in
  839. a typewriter face.  In the Info file, it causes the Info formatting
  840. commands to use single quotation marks around the text.
  841.    For example,
  842.      Use @code{diff} to compare two files.
  843. produces this in the printed manual:
  844.      Use `diff' to compare two files.
  845. File: texi.info,  Node: kbd,  Next: key,  Prev: code,  Up: Indicating
  846. `@kbd'{KEYBOARD-CHARACTERS}
  847. ---------------------------
  848.    Use the `@kbd' command for characters of input to be typed by users.
  849. For example, to refer to the characters `M-a', write
  850.      @kbd{M-a}
  851. and to refer to the characters `M-x shell', write
  852.      @kbd{M-x shell}
  853.    The `@kbd' command has the same effect as `@code' in Info, but may
  854. produce a different font in a printed manual.
  855.    You can embed another @-command inside the braces of an `@kbd'
  856. command.  Here, for example, is the way to describe a command that
  857. would be described more verbosely as "press an `r' and then press the
  858. RET key":
  859.      @kbd{r @key{RET}}
  860. This produces: `r RET'
  861.    You also use the `@kbd' command if you are spelling out the letters
  862. you type; for example:
  863.      To give the @code{logout} command,
  864.      type the characters @kbd{l o g o u t @key{RET}}.
  865. This produces:
  866.      To give the `logout' command, type the characters `l o g o u t
  867.      RET'.
  868.    (Also, this example shows that you can add spaces for clarity.  If
  869. you really want to mention a space character as one of the characters of
  870. input, write `@key{SPC}' for it.)
  871. File: texi.info,  Node: key,  Next: samp,  Prev: kbd,  Up: Indicating
  872. `@key'{KEY-NAME}
  873. ----------------
  874.    Use the `@key' command for the conventional name for a key on a
  875. keyboard, as in:
  876.      @key{RET}
  877.    You can use the `@key' command within the argument of an `@kbd'
  878. command when the sequence of characters to be typed includes one or
  879. more keys that are described by name.
  880.    For example, to produce `C-x ESC' you would type:
  881.      @kbd{C-x @key{ESC}}
  882.    Here is a list of the recommended names for keys; they are all in
  883. upper case:
  884.     SPC
  885.           Space
  886.     RET
  887.           Return
  888.     LFD
  889.           Linefeed
  890.     TAB
  891.           Tab
  892.     BS
  893.           Backspace
  894.     ESC
  895.           Escape
  896.     DEL
  897.           Delete
  898.     SFT
  899.           Shift
  900.     CTL
  901.           Control
  902.     META
  903.           Meta
  904.    There are subtleties to handling words like `meta' or `ctl' that are
  905. names of shift keys.  When mentioning a character in which the shift
  906. key is used, such as `Meta-a', use the `@kbd' command alone; do not use
  907. the `@key' command; but when you are referring to the shift key in
  908. isolation, use the `@key' command.  For example, write `@kbd{Meta-a}'
  909. to produce `Meta-a' and `@key{META}' to produce META.  This is because
  910. `Meta-a' refers to keys that you press on a keyboard, but META refers
  911. to a key without implying that you press it.  In short, use `@kbd' for
  912. what you do, and use `@key' for what you talk about: "Press `@kbd{M-a}'
  913. to move point to the beginning of the sentence.  The `@key{META}' key
  914. is often in the lower left of the keyboard."
  915. File: texi.info,  Node: samp,  Next: var,  Prev: key,  Up: Indicating
  916. `@samp'{TEXT}
  917. -------------
  918.    Use the `@samp' command to indicate text that is a literal example
  919. or `sample' of a sequence of characters in a file, string, pattern, etc.
  920. Enclose the text in braces.  The argument appears within single
  921. quotation marks in both the Info file and the printed manual; in
  922. addition, it is printed in a fixed-width font.
  923.      To match @samp{foo} at the end of the line,
  924.      use the regexp @samp{foo$}.
  925. produces
  926.      To match `foo' at the end of the line, use the regexp `foo$'.
  927.    Any time you are referring to single characters, you should use
  928. `@samp' unless `@kbd' is more appropriate.  Use `@samp' for the names
  929. of command-line options.  Also, you may use `@samp' for entire
  930. statements in C and for entire shell commands--in this case, `@samp'
  931. often looks better than `@code'.  Basically, `@samp' is a catchall for
  932. whatever is not covered by `@code', `@kbd', or `@key'.
  933.    Only include punctuation marks within braces if they are part of the
  934. string you are specifying.  Write punctuation marks outside the braces
  935. if those punctuation marks are part of the English text that surrounds
  936. the string.  In the following sentence, for example, the commas and
  937. period are outside of the braces:
  938.      In English, the vowels are @samp{a}, @samp{e},
  939.      @samp{i}, @samp{o}, @samp{u}, and sometimes
  940.      @samp{y}.
  941. This produces:
  942.      In English, the vowels are `a', `e', `i', `o', `u',  and sometimes
  943.      `y'.
  944.