home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / info / texinfo.i05 (.txt) < prev    next >
GNU Info File  |  1993-06-12  |  52KB  |  1,003 lines

  1. This is Info file texinfo, produced by Makeinfo-1.47 from the input
  2. file texinfo2.tex.
  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 Free Software 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
  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 Foundation.
  20. File: texinfo,  Node: Smallcaps,  Next: Fonts,  Prev: emph & strong,  Up: Emphasis
  21. `@sc'{TEXT}: The Small Caps Font
  22. --------------------------------
  23.    Use the `@sc' command to set text in the printed output in a small
  24. caps font and set text in the Info file in upper case letters.
  25.    Write the text between braces in lower case, like this:
  26.      The @sc{acm} and @sc{ieee} are technical societies.
  27. This produces:
  28.      The ACM and IEEE are technical societies.
  29.    TeX typesets the small caps font in a manner that prevents the
  30. letters from `jumping out at you on the page'.  This makes small caps
  31. text easier to read than text in all upper case.
  32.    If the text between the braces of an `@sc' command is upper case,
  33. TeX typesets the text in full-size capitals.  Use full-size capitals
  34. sparingly.
  35.    The Info formatting commands set all small caps text in upper case.
  36.    You may also use the small caps font for a jargon word such as ATO
  37. (a NASA word meaning `abort to orbit').
  38.    There are subtleties to using the small caps font with a jargon word
  39. such as CDR, a word used in Lisp programming.  In this case, you should
  40. use the small caps font when the word refers to the second and
  41. subsequent elements of a list (the CDR of the list), but you should use
  42. `@code' when the word refers to the Lisp function of the same spelling.
  43. File: texinfo,  Node: Fonts,  Prev: Smallcaps,  Up: Emphasis
  44. Fonts for Printing, Not Info
  45. ----------------------------
  46.    Texinfo provides four font commands that specify font changes in the
  47. printed manual but have no effect in the Info file.  `@i' requests
  48. italic font (in some versions of TeX, a slanted font is used), `@b'
  49. requests bold face, `@t' requests the fixed-width, typewriter-style
  50. font used by `@code', and `@r' requests a roman font, which is the
  51. usual font in which text is printed.  All four commands apply to an
  52. argument that follows, surrounded by braces.
  53.    Only the `@r' command has much use: in example programs, you can use
  54. the `@r' command to convert code comments from the fixed-width font to
  55. a roman font.  This looks better in printed output.
  56.    For example,
  57.      @lisp
  58.      (+ 2 2)    ; @r{Add two plus two.}
  59.      @end lisp
  60. produces
  61.      (+ 2 2)    ; Add two plus two.
  62.    If possible, you should avoid using the other three font commands. 
  63. If you need to use one, it probably indicates a gap in the Texinfo
  64. language.
  65. File: texinfo,  Node: Quotations and Examples,  Next: Lists and Tables,  Prev: Marking Text,  Up: Top
  66. Quotations and Examples
  67. ***********************
  68.    Quotations and examples are blocks of text consisting of one or more
  69. whole paragraphs that are set off from the bulk of the text and treated
  70. differently.  They are usually indented.
  71.    In Texinfo, you always begin a quotation or example by writing an
  72. @-command at the beginning of a line by itself, and end it by writing
  73. an `@end' command that is also at the beginning of a line by itself. 
  74. For instance, you begin an example by writing `@example' by itself at
  75. the beginning of a line and end the example by writing `@end example'
  76. on a line by itself, at the beginning of that line.
  77. * Menu:
  78. * Block Enclosing Commands::    Use different constructs for
  79.                                   different purposes.
  80. * quotation::                   How to write a quotation.
  81. * example::                     How to write an example in a fixed-width font.
  82. * noindent::                    How to prevent paragraph indentation.
  83. * Lisp Example::                How to illustrate Lisp code.
  84. * smallexample & smalllisp::    Forms for the `@smallbook' option.
  85. * display::                     How to write an example in the current font.
  86. * format::                      How to write an example that does not narrow
  87.                                   the margins.
  88. * exdent::                      How to undo the indentation of a line.
  89. * flushleft & flushright::      How to push text flushleft or flushright.
  90. * cartouche::                   How to draw cartouches around examples.
  91. File: texinfo,  Node: Block Enclosing Commands,  Next: quotation,  Up: Quotations and Examples
  92. The Block Enclosing Commands
  93. ============================
  94.    There are a number of commands for quotations and examples:
  95. `@quotation'
  96.      Indicate text that is quoted. The text is filled, indented, and
  97.      printed in a roman font by default.
  98. `@example'
  99.      Illustrate code, commands, and the like. The text is printed in a
  100.      fixed-width font, and indented but not filled.
  101. `@lisp'
  102.      Illustrate Lisp code. The text is printed in a fixed-width font,
  103.      and indented but not filled.
  104. `@smallexample'
  105.      Illustrate code, commands, and the like.  Similar to `@example',
  106.      except that in TeX this command typesets text in a smaller font
  107.      for the smaller `@smallbook' format than for the 8.5 by 11 inch
  108.      format.
  109. `@smalllisp'
  110.      Illustrate Lisp code.  Similar to `@lisp', except that in TeX this
  111.      command typesets text in a smaller font for the smaller
  112.      `@smallbook' format than for the 8.5 by 11 inch format.
  113. `@display'
  114.      Display illustrative text.  The text is indented but not filled,
  115.      and no font is specified (so, by default, the font is roman).
  116. `@format'
  117.      Print illustrative text.  The text is not indented and not filled
  118.      and no font is specified (so, by default, the font is roman).
  119.    The `@exdent' command is used within the above constructs to undo
  120. the indentation of a line.
  121.    The `@flushleft' and `@flushright' commands are used to line up the
  122. left or right margins of unfilled text.
  123.    The `@noindent' command may be used after one of the above
  124. constructs to prevent the following text from being indented as a new
  125. paragraph.
  126.    You can use the `@cartouche' command within one of the above
  127. constructs to highlight the example or quotation by drawing a box with
  128. rounded corners around it.  (The `@cartouche' command affects only the
  129. printed manual; it has no effect in the Info file; see *Note Drawing
  130. Cartouches Around Examples: cartouche.)
  131. File: texinfo,  Node: quotation,  Next: example,  Prev: Block Enclosing Commands,  Up: Quotations and Examples
  132. `@quotation'
  133. ============
  134.    The text of a quotation is processed normally except that
  135.    * the margins are closer to the center of the page, so the whole of
  136.      the quotation is indented;
  137.    * the first lines of paragraphs are indented no more than other
  138.      lines;
  139.    * in the printed output, interline and interparagraph spacing is
  140.      reduced.
  141.      This is an example of text written between an `@quotation' command
  142.      and an `@end quotation' command.  An `@quotation' command is most
  143.      often used to indicate text that is excerpted from another (real
  144.      or hypothetical) printed work.
  145.    Write an `@quotation' command as text on a line by itself.  This
  146. line will disappear from the output.  Mark the end of the quotation
  147. with a line beginning with and containing only `@end quotation'. The
  148. `@end quotation' line will likewise disappear from the output.  Thus,
  149. the input
  150.      @quotation
  151.      This is
  152.      a foo.
  153.      @end quotation
  154. produces
  155.      This is a foo.
  156. File: texinfo,  Node: example,  Next: noindent,  Prev: quotation,  Up: Quotations and Examples
  157. `@example'
  158. ==========
  159.    The `@example' command is used to indicate an example that is not
  160. part of the running text, such as computer input or output.
  161.      This is an example of text written between an
  162.      `@example' command
  163.      and an `@end example'command.
  164.      The text is indented but not filled.
  165.      
  166.      In the printed manual, the text is typeset in a
  167.      fixed-width font, and extra spaces and blank lines are
  168.      significant.  In the Info file, an analogous result is
  169.      obtained by indenting each line with five spaces.
  170.    Write an `@example' command at the beginning a line by itself. This
  171. line will disappear from the output. Mark the end of the example with
  172. an  `@end example' command, also written at the beginning a line by
  173. itself. The `@end example' will disappear from the output.
  174.    For example,
  175.      @example
  176.      mv foo bar
  177.      @end example
  178. produces
  179.      mv foo bar
  180.    Since the lines containing `@example' and `@end example' will
  181. disappear, you should put a blank line before the `@example' and
  182. another blank line after the `@end example'.  (Remember that blank
  183. lines between the beginning `@example' and the ending `@end example'
  184. will appear in the output.)
  185.      *Caution:* Do not use tabs in lines of an example (or anywhere
  186.      else in Texinfo, for that matter)!  TeX treats tabs like single
  187.      spaces, and that is not what they look like.  This is a problem
  188.      with TeX.  (If necessary, in Emacs, you can use `M-x untabify' to
  189.      convert tabs in a region to multiple spaces.)
  190.    Examples are often, logically speaking, "in the middle" of a
  191. paragraph, and the text continues after an example should not be
  192. indented.  The `@noindent' command prevents a piece of text from being
  193. indented as if it were a new paragraph. (*Note noindent::.)
  194.    (The `@code' command is used for examples of code that are embedded
  195. within sentences, not set off from preceding and following text.  *Note
  196. `@code': code.)
  197. File: texinfo,  Node: noindent,  Next: Lisp Example,  Prev: example,  Up: Quotations and Examples
  198. `@noindent'
  199. ===========
  200.    If you have text following an `@example' or other similar inclusion
  201. that reads as a continuation of the text before the `@example', it is
  202. good to prevent this text from being indented as a new paragraph.  To
  203. accomplish this, write `@noindent' at the beginning of a line by itself
  204. preceding the continuation text. For example:
  205.      @example
  206.      This is an example
  207.      @end example
  208.      
  209.      @noindent
  210.      This line is not indented.  As you can see, the
  211.      beginning of the line is fully flush left with the line
  212.      that follows after it.  (This whole example is between
  213.      @code{@@display} and @code{@@end display}.)
  214. produces
  215.           This is an example
  216.      
  217.      
  218.      This line is not indented.  As you can see, the
  219.      beginning of the line is fully flush left with the line
  220.      that follows after it.  (This whole example is between
  221.      `@display' and `@end display'.)
  222.    To adjust the number of blank lines properly in the Info file output,
  223. remember that the line containing `@noindent' does not generate a blank
  224. line, and neither does the `@end example' line.
  225.    In the Texinfo source file for this manual, each line that says
  226. `produces' is preceded by a line containing `@noindent'.
  227.    Do not put braces after an `@noindent' command; they are not
  228. necessary, since `@noindent' is a command used outside of paragraphs
  229. (*note Command Syntax::.).
  230. File: texinfo,  Node: Lisp Example,  Next: smallexample & smalllisp,  Prev: noindent,  Up: Quotations and Examples
  231. `@lisp'
  232. =======
  233.    The `@lisp' command is used for Lisp code.  It is synonymous with
  234. the `@example' command.
  235.      This is an example of text written between an
  236.      `@lisp' command and an `@end lisp' command.
  237.    Use `@lisp' instead of `@example' so as to preserve information
  238. regarding the nature of the example.  This is useful, for example, if
  239. you write a function that evaluates only and all the Lisp code in a
  240. Texinfo file.  Then you can use the Texinfo file as a Lisp library.(1)
  241.    Mark the end of `@lisp' with `@end lisp' on a line by itself.
  242.    ---------- Footnotes ----------
  243.    (1)  It would be straightforward to extend Texinfo to work in a
  244. similar fashion for C, FORTRAN, or other languages.
  245. File: texinfo,  Node: smallexample & smalllisp,  Next: display,  Prev: Lisp Example,  Up: Quotations and Examples
  246. `@smallexample' and `@smalllisp'
  247. ================================
  248.    In addition to the regular `@example' and `@lisp' commands, Texinfo
  249. has two other "example-style" commands.  These are the `@smallexample'
  250. and `@smalllisp' commands.  Both these commands are designed for use
  251. with the `@smallbook' command that causes TeX to produce a printed
  252. manual in a 7 by 9.25 inch format rather than the regular 8.5 by 11
  253. inch format.
  254.    In TeX, the `@smallexample' and `@smalllisp' commands typeset text
  255. in a smaller font for the smaller `@smallbook' format than for the 8.5
  256. by 11 inch format.  Consequently, many examples containing long lines
  257. fit in a narrower, `@smallbook' page without needing to be shortened. 
  258. Both commands typeset in the normal font size when you format for the
  259. 8.5 by 11 inch size; indeed, in this situation, the `@smallexample' and
  260. `@smalllisp' commands are defined to be the `@example' and `@lisp'
  261. commands.
  262.    In Info, the `@smallexample' and `@smalllisp' commands are
  263. equivalent to the `@example' and `@lisp' commands, and work exactly the
  264. same.
  265.    Mark the end of `@smallexample' or `@smalllisp' with `@end
  266. smallexample' or `@end smalllisp', respectively.
  267.      This is an example of text written between `@smallexample' and
  268.      `@end smallexample'.  In Info and in an 8.5 by 11 inch manual,
  269.      this text appears in its normal size; but in a 7 by 9.25 inch manual,
  270.      this text appears in a smaller font.
  271.    The `@smallexample' and `@smalllisp' commands make it easier to
  272. prepare smaller format manuals without forcing you to edit examples by
  273. hand to fit them onto narrower pages.
  274.    *Note Printing "Small" Books: smallbook, for more information about
  275. the `@smallbook' command.
  276. File: texinfo,  Node: display,  Next: format,  Prev: smallexample & smalllisp,  Up: Quotations and Examples
  277. `@display'
  278. ==========
  279.    The `@display' command begins a kind of example.  It is like the
  280. `@example' command except that, in a printed manual, `@display' does
  281. not select the fixed-width font.  In fact, it does not specify the font
  282. at all, so that the text appears in the same font it would have
  283. appeared in without the `@display' command.
  284.      This is an example of text written between an `@display' command
  285.      and an `@end display' command.  The `@display' command
  286.      indents the text, but does not fill it.
  287. File: texinfo,  Node: format,  Next: exdent,  Prev: display,  Up: Quotations and Examples
  288. `@format'
  289. =========
  290.    The `@format' command is similar to `@example' except that, in the
  291. printed manual, `@format' does not select the fixed-width font and does
  292. not narrow the margins.
  293. This is an example of text written between an `@format' command
  294. and an `@end format' command.  As you can see
  295. from this example,
  296. the `@format' command does not fill the text.
  297. File: texinfo,  Node: exdent,  Next: flushleft & flushright,  Prev: format,  Up: Quotations and Examples
  298. `@exdent': Undoing a Line's Indentation
  299. =======================================
  300.    The `@exdent' command removes any indentation a line might have. The
  301. command is written at the beginning of a line and applies only to the
  302. text that follows the command that is on the same line.  Do not use
  303. braces around the text.  In a printed manual, the text on an `@exdent'
  304. line is printed in the roman font.
  305.    `@exdent' is usually used within examples.  Thus,
  306.      @example
  307.      This line follows an @@example command.
  308.      @exdent This line is exdented.
  309.      This line follows the exdented line.
  310.      The @@end example comes on the next line.
  311.      @end group
  312. produces
  313.      This line follows an @example command.
  314. This line is exdented.
  315.      This line follows the exdented line.
  316.      The @end example comes on the next line.
  317.    In practice, the `@exdent' command is rarely used. Usually, you
  318. un-indent text by ending the example and returning the page to its
  319. normal width.
  320. File: texinfo,  Node: flushleft & flushright,  Next: cartouche,  Prev: exdent,  Up: Quotations and Examples
  321. `@flushleft' and `@flushright'
  322. ==============================
  323.    The `@flushleft' and `@flushright' commands line up the ends of
  324. lines on the left and right margins of a page, but do not fill the
  325. text.  The commands are written on lines of their own, without braces. 
  326. The `@flushleft' and `@flushright' commands are ended by `@end
  327. flushleft' and `@end flushright' commands on lines of their own.
  328.    For example,
  329.      @flushleft
  330.      This text is
  331.      written flushleft.
  332.      @end flushleft
  333. produces
  334.      This text is
  335.      written flushleft.
  336. Flushright produces the type of indentation often used in the return
  337. address of letters.
  338. For example,
  339.      @flushright
  340.      Here is an example of text written
  341.      flushright.  The @code{@flushright} command
  342.      right justifies every line but leaves the
  343.      left end ragged.
  344.      @end flushright
  345. produces
  346.                                      Here is an example of text written
  347.                                  flushright.  The `@flushright' command
  348.                               right justifies every line but leaves the
  349.                                                        left end ragged.
  350. File: texinfo,  Node: cartouche,  Prev: flushleft & flushright,  Up: Quotations and Examples
  351. Drawing Cartouches Around Examples
  352. ==================================
  353.    In a printed manual, the `@cartouche' command draws a box with
  354. rounded corners around its contents.  You can use this command to
  355. further highlight an example or quotation.  For instance, you could
  356. write a manual in which one type of example is surrounded by a cartouche
  357. for emphasis.
  358.    The `@cartouche' command affects only the printed manual; it has no
  359. effect in the Info file.
  360.    For example,
  361.      @example
  362.      @cartouche
  363.      % pwd
  364.      /usr/local/lib/emacs/info
  365.      @end cartouche
  366.      @end group
  367. surrounds the two-line example with a box with rounded corners, in the
  368. printed manual.
  369. File: texinfo,  Node: Lists and Tables,  Next: Indices,  Prev: Quotations and Examples,  Up: Top
  370. Making Lists and Tables
  371. ***********************
  372.    Texinfo has several ways of making lists and two-column tables. 
  373. Lists can be bulleted or numbered, while two-column tables can
  374. highlight the items in the first column.
  375. * Menu:
  376. * Introducing Lists::           Texinfo formats lists for you.
  377. * itemize::                     How to construct a simple list.
  378. * enumerate::                   How to construct a numbered list.
  379. * Two-column Tables::           How to construct a two-column table.
  380. File: texinfo,  Node: Introducing Lists,  Next: itemize,  Up: Lists and Tables
  381. Introducing Lists
  382. =================
  383.    Texinfo automatically indents the text in lists or tables, and
  384. numbers an enumerated list.  This last feature is useful if you modify
  385. the list, since you do not need to renumber it yourself.
  386.    Numbered lists and tables begin with the appropriate @-command at the
  387. beginning of a line, and end with the corresponding `@end' command on a
  388. line by itself.  The table and itemized-list commands also require that
  389. you write formatting information on the same line as the beginning
  390. @-command.
  391.    Begin an enumerated list, for example, with an `@enumerate' command
  392. and end the list with an `@end enumerate' command. Begin an itemized
  393. list with an `@itemize' command, followed on the same line by a
  394. formatting command such as `@bullet', and end the list with an `@end
  395. itemize' command.
  396.    Precede each element of a list with an `@item' command.
  397. Here is an itemized list of the different kinds of table and lists:
  398.    * Itemized lists with and without bullets.
  399.    * Enumerated lists, using numbers or letters.
  400.    * Two-column tables with highlighting.
  401. Here is an enumerated list with the same items:
  402.   1. Itemized lists with and without bullets.
  403.   2. Enumerated lists, using numbers or letters.
  404.   3. Two-column tables with highlighting.
  405. And here is a two-column table with the same items and their @-commands:
  406. `@itemize'
  407.      Itemized lists with and without bullets.
  408. `@enumerate'
  409.      Enumerated lists, using numbers or letters.
  410. `@table'
  411. `@ftable'
  412. `@vtable'
  413.      Two-column tables with highlighting.
  414. File: texinfo,  Node: itemize,  Next: enumerate,  Prev: Introducing Lists,  Up: Lists and Tables
  415. Making an Itemized List
  416. =======================
  417.    The `@itemize' command is used to produce sequences of indented
  418. paragraphs, with a bullet or other mark inside the left margin at the
  419. beginning of each paragraph for which such a mark is desired.
  420.    Begin an itemized list by writing `@itemize' at the beginning of a
  421. line.  Follow the command, on the same line, with a character or a
  422. Texinfo command that generates a mark.  Usually, you will write
  423. `@bullet' after `@itemize', but you can use `@minus', or any character
  424. or any special symbol that results in a single character in the Info
  425. file.  (When you write `@bullet' or `@minus' after an `@itemize'
  426. command, you may omit the `{}'.)
  427.    Write the text of the indented paragraphs themselves after the
  428. `@itemize', up to another line that says `@end itemize'.
  429.    Before each paragraph for which a mark in the margin is desired,
  430. write a line that says just `@item'.  Do not write any other text on
  431. this line.
  432.    Usually, you should put a blank line before an `@item'.  This puts a
  433. blank line in the Info file. (TeX inserts the proper interline
  434. whitespace in either case.)  Except when the entries are very brief,
  435. these blank lines make the list look better.
  436.    Here is an example of the use of `@itemize', followed by the output
  437. it produces.  Note that `@bullet' produces an `*' in Info and a round
  438. dot in TeX.
  439.      @itemize @bullet
  440.      @item
  441.      Some text for foo.
  442.      
  443.      @item
  444.      Some text
  445.      for bar.
  446.      @end itemize
  447. This produces:
  448.         * Some text for foo.
  449.         * Some text for bar.
  450.    Itemized lists may be embedded within other itemized lists.  Here is
  451. a list marked with dashes embedded in a list marked with bullets:
  452.      @itemize @bullet
  453.      @item
  454.      First item.
  455.      
  456.      @itemize @minus
  457.      @item
  458.      Inner item.
  459.      
  460.      @item
  461.      Second inner item.
  462.      @end itemize
  463.      
  464.      @item
  465.      Second outer item.
  466.      @end itemize
  467. This produces:
  468.         * First item.
  469.              - Inner item.
  470.              - Second inner item.
  471.         * Second outer item.
  472. File: texinfo,  Node: enumerate,  Next: Two-column Tables,  Prev: itemize,  Up: Lists and Tables
  473. Making a Numbered or Lettered List
  474. ==================================
  475.    `@enumerate' is like `@itemize' except that the marks in the left
  476. margin contain successive integers or letters. (*Note `@itemize':
  477. itemize.)
  478.    Write the `@enumerate' command at the beginning of a line. The
  479. command does not require an argument, but accepts either a number or a
  480. letter as an option. Without an argument, `@enumerate' starts the list
  481. with the number 1.  With a numeric argument, such as 3, the command
  482. starts the list with that number. With an upper or lower case letter,
  483. such as `a' or `A', the command starts the list with that letter.
  484.    Write the text of the enumerated list in the same way you write an
  485. itemized list: put `@item' on a line of its own before the start of
  486. each paragraph that you want enumerated.  Do not write any other text on
  487. the line beginning with `@item'.
  488.    You should put a blank line between entries in the list. This
  489. generally makes it easier to read the Info file.
  490.    Here is an example of `@enumerate' without an argument:
  491.      @enumerate
  492.      @item
  493.      Underlying causes.
  494.      
  495.      @item
  496.      Proximate causes.
  497.      @end enumerate
  498. This produces:
  499.   1. Underlying causes.
  500.   2. Proximate causes.
  501.    Here is an example with an argument of `3':
  502.      @enumerate 3
  503.      @item
  504.      Predisposing causes.
  505.      
  506.      @item
  507.      Precipitating causes.
  508.      
  509.      @item
  510.      Perpetuating causes.
  511.      @end enumerate
  512. This produces:
  513.   3. Predisposing causes.
  514.   4. Precipitating causes.
  515.   5. Perpetuating causes.
  516.    Here is a brief summary of the alternatives.  The summary is
  517. constructed using `@enumerate' with an argument of `a'.
  518.   a. `@enumerate'
  519.      Without an argument, produce a numbered list, starting with the
  520.      number 1.
  521.   b. `@enumerate POSITIVE-INTEGER'
  522.      With a (positive) numeric argument, start a numbered list with that
  523.      number.  You can use this to continue a list that you interrupted
  524.      with other text.
  525.   c. `@enumerate UPPER-CASE-LETTER'
  526.      With an upper case letter as argument, start a list in which each
  527.      item is marked by a letter, beginning with that upper case letter.
  528.   d. `@enumerate LOWER-CASE-LETTER'
  529.      With a lower case letter as argument, start a list in which each
  530.      item is marked by a letter, beginning with that lower case letter.
  531.    You can also nest enumerated lists, as in an outline.
  532. File: texinfo,  Node: Two-column Tables,  Prev: enumerate,  Up: Lists and Tables
  533. Making a Two-column Table
  534. =========================
  535.    `@table' is similar to `@itemize', but the command allows you to
  536. specify a name or heading line for each item.  (*Note `@itemize':
  537. itemize.)  The `@table' command is used to produce two-column tables,
  538. and is especially useful for glossaries and explanatory exhibits.
  539. * Menu:
  540. * table::                       How to construct a two-column table.
  541. * ftable vtable::               How to construct a two-column table
  542.                                   with automatic indexing.
  543. * itemx::                       How to put more entries in the first column.
  544. File: texinfo,  Node: table,  Next: ftable vtable,  Up: Two-column Tables
  545. Using the `@table' Command
  546. --------------------------
  547.    Use the `@table' command to produce two-column tables.
  548.    Write the `@table' command at the beginning of a line and follow it
  549. on the same line with an argument that is a Texinfo command such as
  550. `@code', `@samp', `@var', or `@kbd'. Although these commands are
  551. usually followed by arguments in braces, in this case you use the
  552. command name without an argument because `@item' will supply the
  553. argument.  This command will be applied to the text that goes into the
  554. first column of each item and determines how it will be highlighted. 
  555. For example, `@samp' will cause the text in the first column to be
  556. highlighted with an `@samp' command.
  557.    You may also choose to use the `@asis' command as an argument to
  558. `@table'.  `@asis' is a command that does nothing; if you use this
  559. command after `@table', TeX and the Info formatting commands output the
  560. first column entries without added highlighting, (`as is').
  561.    (The `@table' command may work with other commands besides those
  562. listed here.  However, you can only use commands that normally take
  563. arguments in braces.)
  564.    Begin each table entry with an `@item' command at the beginning of a
  565. line.  Write the first column text on the same line as the `@item'
  566. command.  Write the second column text on the line following the
  567. `@item' line and on subsequent lines.  (You do not need to type
  568. anything for an empty second column entry.)  You may write as many
  569. lines of supporting text as you wish, even several paragraphs.  But
  570. only text on the same line as the `@item' will be placed in the first
  571. column.
  572.    Normally, you should put a blank line before an `@item' line. This
  573. puts a blank like in the Info file.  Except when the entries are very
  574. brief, a blank line looks better.
  575.    The following table, for example, highlights the text in the first
  576. column with an `@samp' command:
  577.      @table @samp
  578.      @item foo
  579.      This is the text for
  580.      @samp{foo}.
  581.      
  582.      @item bar
  583.      Text for @samp{bar}.
  584.      @end table
  585. This produces:
  586. `foo'
  587.      This is the text for `foo'.
  588. `bar'
  589.      Text for `bar'.
  590.    If you want to list two or more named items with a single block of
  591. text, use the `@itemx' command.  (*Note  `@itemx': itemx.)
  592. File: texinfo,  Node: ftable vtable,  Next: itemx,  Prev: table,  Up: Two-column Tables
  593. `@ftable' and `@vtable'
  594. -----------------------
  595.    The `@ftable' and `@vtable' commands are the same as the `@table'
  596. command except that `@ftable' automatically enters each of the items in
  597. the first column of the table into the index of functions and `@vtable'
  598. automatically enters each of the items in the first column of the table
  599. into the index of variables.  This simplifies the task of creating
  600. indices.  Only the items on the same line as the `@item' commands are
  601. indexed, and they are indexed in exactly the form that they appear on
  602. that line.  *Note  Creating Indices: Indices, for more information
  603. about indices.
  604.    Begin a two-column table using `@ftable' or `@vtable' by writing the
  605. @-command at the beginning of a line, followed on the same line by an
  606. argument that is a Texinfo command such as `@code', exactly as you
  607. would for an `@table' command; and end the table with an `@end ftable'
  608. or `@end vtable' command on a line by itself.
  609. File: texinfo,  Node: itemx,  Prev: ftable vtable,  Up: Two-column Tables
  610. `@itemx'
  611. --------
  612.    Use the `@itemx' command inside a table when you have two or more
  613. first column entries for the same item, each of which should appear on
  614. a line of its own.  Use `@itemx' for all but the first entry.  The
  615. `@itemx' command works exactly like `@item' except that it does not
  616. generate extra vertical space above the first column text.  For example,
  617.      @table @code
  618.      @item upcase
  619.      @itemx downcase
  620.      These two functions accept a character or a string as
  621.      argument, and return the corresponding upper case (lower
  622.      case) character or string.@refill
  623.      @end table
  624. produces
  625. `upcase'
  626. `downcase'
  627.      These two functions accept a character or a string as argument,
  628.      and return the corresponding upper case (lower case) character or
  629.      string.
  630. (Note also that this example illustrates multi-line supporting text in
  631. a two-column table.)
  632. File: texinfo,  Node: Indices,  Next: Insertions,  Prev: Lists and Tables,  Up: Top
  633. Creating Indices
  634. ****************
  635.    Using Texinfo, you can generate indices without having to sort and
  636. collate entries manually.  In an index, the entries are listed in
  637. alphabetical order, together with information on how to find the
  638. discussion of each entry.  In a printed manual, this information
  639. consists of page numbers.  In an Info file, this information is a menu
  640. entry leading to the first node referenced.
  641.    Texinfo provides several predefined kinds of index: an index for
  642. functions, an index for variables, an index for concepts, and so on. 
  643. You can combine indices or use them for other than their canonical
  644. purpose.  If you wish, you can define your own indices.
  645. * Menu:
  646. * Index Entries::               Choose different words for index entries.
  647. * Predefined Indices::          Use different indices for different kinds
  648.                                   of entry.
  649. * Indexing Commands::           How to make an index entry.
  650. * Combining Indices::           How to combine indices.
  651. * New Indices::                 How to define your own indices.
  652. File: texinfo,  Node: Index Entries,  Next: Predefined Indices,  Up: Indices
  653. Making Index Entries
  654. ====================
  655.    When you are making index entries, it is good practice to think of
  656. the different ways people may look for something.  Different people *do
  657. not* think of the same words when they look something up.  A helpful
  658. index will have items indexed under all the different words that people
  659. may use.  For example, one reader may think it obvious that the
  660. two-letter names for indices should be listed under "Indices,
  661. two-letter names", since the word "Index" is the general concept. But
  662. another reader may remember the specific concept of two-letter names
  663. and search for the entry listed as "Two letter names for indices".  A
  664. good index will have both entries and will help both readers.
  665.    Like typesetting, the construction of an index is a highly skilled,
  666. professional art, the subtleties of which are not appreciated until you
  667. need to do it yourself.
  668.    *Note Printing Indices & Menus::, for information about printing an
  669. index at the end of a book or creating an index menu in an Info file.
  670. File: texinfo,  Node: Predefined Indices,  Next: Indexing Commands,  Prev: Index Entries,  Up: Indices
  671. Predefined Indices
  672. ==================
  673.    Texinfo provides six predefined indices:
  674.    * A "concept index" listing concepts that are discussed.
  675.    * A "function index" listing functions (such as entry points of
  676.      libraries).
  677.    * A "variables index" listing variables (such as global variables of
  678.      libraries).
  679.    * A "keystroke index" listing keyboard commands.
  680.    * A "program index" listing names of programs.
  681.    * A "data type index" listing data types (such as structures defined
  682.      in header files).
  683. Not every manual needs all of these, and most manuals use two or three
  684. of them.  This manual has two indices: a concept index and an @-command
  685. index (that is actually the function index but is called a command
  686. index in the chapter heading).  Two or more indices can be combined
  687. into one using the `@synindex' or `@syncodeindex' commands.  *Note
  688. Combining Indices::.
  689. File: texinfo,  Node: Indexing Commands,  Next: Combining Indices,  Prev: Predefined Indices,  Up: Indices
  690. Defining the Entries of an Index
  691. ================================
  692.    The data to make an index come from many individual indexing commands
  693. scattered throughout the Texinfo source file.  Each command says to add
  694. one entry to a particular index; after formatting, the index will give
  695. the current page number or node name as the reference.
  696.    An index entry consists of an indexing command at the beginning of a
  697. line followed, on the rest of the line, by the entry.
  698.    For example, this section begins with the following five entries for
  699. the concept index:
  700.      @cindex Defining indexing entries
  701.      @cindex Index entries
  702.      @cindex Entries for an index
  703.      @cindex Specifying index entries
  704.      @cindex Creating index entries
  705.    Each predefined index has its own indexing command--`@cindex' for
  706. the concept index, `@findex' for the function index, and so on.
  707.    The usual convention is to capitalize the first word of each index
  708. entry, unless that word is the name of a function, variable, or other
  709. such entity that should not be capitalized.  Thus, if you are
  710. documenting Emacs Lisp, you should usually capitalize entries in the
  711. concept index, but not those in the function index. However, if your
  712. concept index entries are consistently short (one or two words each) it
  713. may look better for each regular entry to start with a lower case
  714. letter.  Whichever convention you adapt, please be consistent!
  715.    By default, entries for a concept index are printed in a small roman
  716. font and entries for the other indices are printed in a small `@code'
  717. font.  You may change the way part of an entry is printed with the
  718. usual Texinfo commands, such as `@file' for file names and `@emph' for
  719. emphasis (*note Marking Text::.).
  720.    The six indexing commands for predefined indices are:
  721. `@cindex CONCEPT'
  722.      Make an entry in the concept index for CONCEPT.
  723. `@findex FUNCTION'
  724.      Make an entry in the function index for FUNCTION.
  725. `@vindex VARIABLE'
  726.      Make an entry in the variable index for VARIABLE.
  727. `@kindex KEYSTROKE'
  728.      Make an entry in the key index for KEYSTROKE.
  729. `@pindex PROGRAM'
  730.      Make an entry in the program index for PROGRAM.
  731. `@tindex DATA TYPE'
  732.      Make an entry in the data type index for DATA TYPE.
  733.      *Caution:* Do not use a colon in an index entry.  In Info, a colon
  734.      separates the menu entry name from the node name.  An extra colon
  735.      confuses Info. *Note How to Write a Menu Entry: Writing a Menu
  736.      Entry, for more information about the structure of a menu entry.
  737.    If you write several identical index entries in different places in a
  738. Texinfo file, the index in the printed manual will list all the pages to
  739. which those entries refer.  However, the index in the Info file will
  740. list *only* the node that references the *first* of those index
  741. entries.  Therefore, it is best to write indices in which each entry
  742. refers to only one place in the Texinfo file.  Fortunately, this
  743. constraint is a feature rather than a loss since it means that the index
  744. will be easy to use.  Otherwise, you could create an index that lists
  745. several pages for one entry and your reader would not know to which page
  746. to turn.  If you have two identical entries for one topic, change the
  747. topics slightly, or qualify them to indicate the difference.
  748.    You are not actually required to use the predefined indices for their
  749. canonical purposes.  For example, suppose you wish to index some C
  750. preprocessor macros.  You could put them in the function index along
  751. with actual functions, just by writing `@findex' commands for them;
  752. then, when you print the "Function Index" as an unnumbered chapter, you
  753. could give it the title `Function and Macro Index' and all will be
  754. consistent for the reader.  Or you could put the macros in with the
  755. data types by writing `@tindex' commands for them, and give that index
  756. a suitable title so the reader will understand. (*Note Printing Indices
  757. & Menus::.)
  758. File: texinfo,  Node: Combining Indices,  Next: New Indices,  Prev: Indexing Commands,  Up: Indices
  759. Combining Indices
  760. =================
  761.    Sometimes you will want to combine two disparate indices such as
  762. functions and concepts, perhaps because you have few enough of one of
  763. them that a separate index for them would look silly.
  764.    You could put functions into the concept index by writing `@cindex'
  765. commands for them instead of `@findex' commands, and produce a
  766. consistent manual by printing the concept index with the title
  767. `Function and Concept Index' and not printing the `Function Index' at
  768. all; but this is not a robust procedure.  It works only if your
  769. document is never included as part of another document that is designed
  770. to have a separate function index; if your document were to be included
  771. with such a document, the functions from your document and those from
  772. the other would not end up together. Also, to make your function names
  773. appear in the right font in the concept index, you would need to
  774. enclose every one of them between the braces of `@code'.
  775. * Menu:
  776. * syncodeindex::                How to merge two indices, using `@code'
  777.                                   font for the merged-from index.
  778. * synindex::                    How to merge two indices, using the
  779.                                   default font of the merged-to index.
  780. File: texinfo,  Node: syncodeindex,  Next: synindex,  Up: Combining Indices
  781. `@syncodeindex'
  782. ...............
  783.    When you want to combine functions and concepts into one index, you
  784. should index the functions with `@findex' and index the concepts with
  785. `@cindex', and use the `@syncodeindex' command to redirect the function
  786. index entries into the concept index.
  787.    The `@syncodeindex' command takes two arguments; they are the name
  788. of the index to redirect, and the name of the index to redirect it to.
  789. The template looks like this:
  790.      @syncodeindex FROM TO
  791.    For this purpose, the indices are given two-letter names:
  792.      concept index
  793.      function index
  794.      variable index
  795.      key index
  796.      program index
  797.      data type index
  798.    Write an `@syncodeindex' command before or shortly after the
  799. end-of-header line at the beginning of a Texinfo file.  For example, to
  800. merge a function index with a concept index, write the following:
  801.      @syncodeindex fn cp
  802. This will cause all entries designated for the function index to merge
  803. in with the concept index instead.
  804.    To merge both a variables index and a function index into a concept
  805. index, write the following:
  806.      @syncodeindex vr cp
  807.      @syncodeindex fn cp
  808.    The `@syncodeindex' command puts all the entries from the `from'
  809. index (the redirected index) into the `@code' font, overriding whatever
  810. default font is used by the index to which the entries are now
  811. directed.  This way, if you direct function names from a function index
  812. into a concept index, all the function names are printed in the `@code'
  813. font as you would expect.
  814. File: texinfo,  Node: synindex,  Prev: syncodeindex,  Up: Combining Indices
  815. `@synindex'
  816. ...........
  817.    The `@synindex' command is nearly the same as the `@syncodeindex'
  818. command, except that it does not put the `from' index  entries into the
  819. `@code' font; rather it puts them in the roman font.  Thus, you use
  820. `@synindex' when you merge a concept index into a function index.
  821.    *Note Printing Indices & Menus::, for information about printing an
  822. index at the end of a book or creating an index menu in an Info file.
  823. File: texinfo,  Node: New Indices,  Prev: Combining Indices,  Up: Indices
  824. Defining New Indices
  825. ====================
  826.    In addition to the predefined indices, you may use the `@defindex'
  827. and `@defcodeindex' commands to define new indices.  These commands
  828. create new indexing @-commands with which you mark index entries.  The
  829. `@defindex 'command is used like this:
  830.      @defindex NAME
  831.    The name of an index should be a two letter word, such as `au'. For
  832. example:
  833.      @defindex au
  834.    This defines a new index, called the `au' index.  At the same time,
  835. it creates a new indexing command, `@auindex', that you can use to make
  836. index entries.  Use the new indexing command just as you would use a
  837. predefined indexing command.
  838.    For example, here is a section heading followed by a concept index
  839. entry and two `au' index entries.
  840.      @section Cognitive Semantics
  841.      @cindex kinesthetic image schemas
  842.      @auindex Johnson, Mark
  843.      @auindex Lakoff, George
  844. (Evidently, `au' serves here as an abbreviation for "author".) Texinfo
  845. constructs the new indexing command by concatenating the name of the
  846. index with `index'; thus, defining an `au' index leads to the automatic
  847. creation of an `@auindex' command.
  848.    Use the `@printindex' command to print the index, as you do with the
  849. predefined indices.  For example:
  850.      @node Author Index, Subject Index, , Top
  851.      @unnumbered Author Index
  852.      
  853.      @printindex au
  854.    The `@defcodeindex' is like the `@defindex' command, except that, in
  855. the printed output, it prints entries in an `@code' font instead of a
  856. roman font.  Thus, it parallels the `@findex' command rather than the
  857. `@cindex' command.
  858.    You should define new indices within or right after the end-of-header
  859. line of a Texinfo file, before any `@synindex' or `@syncodeindex'
  860. commands (*note Header::.).
  861. File: texinfo,  Node: Insertions,  Next: Glyphs,  Prev: Indices,  Up: Top
  862. Special Insertions
  863. ******************
  864.    Texinfo provides several commands for formatting dimensions, for
  865. inserting single characters that have special meaning in Texinfo, such
  866. as braces, and for inserting special graphic symbols that do not
  867. correspond to characters, such as dots and bullets.
  868. * Menu:
  869. * Braces Atsigns Periods::      How to insert braces, `@' and periods.
  870. * dmn::                         How to format a dimension.
  871. * Dots Bullets::                How to insert dots and bullets.
  872. * TeX and copyright::           How to insert the TeX logo
  873.                                   and the copyright symbol.
  874. * minus::                       How to insert a minus sign.
  875. File: texinfo,  Node: Braces Atsigns Periods,  Next: dmn,  Up: Insertions
  876. Inserting `@', Braces, and Periods
  877. ==================================
  878.    `@' and curly braces are special characters in Texinfo.  To insert
  879. these characters so they appear in text, you must put an `@' in front
  880. of these characters to prevent Texinfo from misinterpreting them.
  881.    Periods are also special.  Depending on whether the period is inside
  882. or at the end of a sentence, less or more space is inserted after a
  883. period in a typeset manual.  Since it is not always possible for
  884. Texinfo to determine when a period ends a sentence and when it is used
  885. in an abbreviation, special commands are needed in some circumstances.
  886. (Usually, Texinfo can guess how to handle periods, so you do not need
  887. to use the special commands; you just enter a period as you would if
  888. you were using a typewriter, which means you put two spaces after the
  889. period, question mark, or exclamation mark that ends a sentence.)
  890.    Do not put braces after any of these commands; they are not
  891. necessary.
  892. * Menu:
  893. * Inserting An Atsign::
  894. * Inserting Braces::            How to insert `{' and `}'
  895. * Controlling Spacing::         How to insert the right amount of space
  896.                                   after punctuation within a sentence.
  897. File: texinfo,  Node: Inserting An Atsign,  Next: Inserting Braces,  Up: Braces Atsigns Periods
  898. Inserting `@' with @@
  899. ---------------------
  900.    `@@' stands for a single `@' in either printed or Info output.
  901.    Do not put braces after an `@@' command.
  902. File: texinfo,  Node: Inserting Braces,  Next: Controlling Spacing,  Prev: Inserting An Atsign,  Up: Braces Atsigns Periods
  903. Inserting `{' and `}'with @{ and @}
  904. -----------------------------------
  905.    `@{' stands for a single `{' in either printed or Info output.
  906.    `@}' stands for a single `}' in either printed or Info output.
  907.    Do not put braces after either an `@{' or an `@}' command.
  908. File: texinfo,  Node: Controlling Spacing,  Prev: Inserting Braces,  Up: Braces Atsigns Periods
  909. Spacing After Colons and Periods
  910. --------------------------------
  911.    Use the `@:' command after a period, question mark, exclamation
  912. mark, or colon that should not be followed by extra space. For example,
  913. use `@:' after periods that end abbreviations which are not at the ends
  914. of sentences.  `@:' has no effect on the Info file output.
  915.    For example,
  916.      The U.S.A.@: is a continental nation.
  917. produces
  918.      The U.S.A. is a continental nation.
  919.    Use `@.' instead of a period at the end of a sentence that ends with
  920. a single capital letter.  Otherwise, TeX will think the letter is an
  921. abbreviation and will not insert the correct end-of-sentence spacing. 
  922. Here is an example:
  923.      Give it to X. and to Y@.  Give it to Z@.
  924.      Give it to X. and to Y.  Give it to Z.
  925. produces
  926.      Give it to X. and to Y.  Give it to Z.
  927.      Give it to X. and to Y.  Give it to Z.
  928.    In the Info file output, `@.' is equivalent to a simple `.'.
  929.    The meanings of `@:' and `@.' in Texinfo are designed to work well
  930. with the Emacs sentence motion commands.  This made it necessary for
  931. them to be incompatible with some other formatting systems that use
  932. @-commands.
  933.    Do not put braces after either an `@:' or an `@.' command.
  934. File: texinfo,  Node: dmn,  Next: Dots Bullets,  Prev: Braces Atsigns Periods,  Up: Insertions
  935. `@dmn'{DIMENSION}: Format a Dimension
  936. =====================================
  937.    At times, you may want to write `12pt' or `8.5in' with little or no
  938. space between the number and the abbreviation for the dimension.  You
  939. can use the `@dmn' command to do this.  On seeing the command, TeX
  940. inserts just enough space for proper typesetting; the Info formatting
  941. commands insert no space at all, since the Info file does not require
  942.    To use the `@dmn' command, write the number and then follow it
  943. immediately, with no intervening space, by `@dmn', and then by the
  944. dimension within braces.
  945. For example,
  946.      A4 paper is 8.27@dmn{in} wide.
  947. produces
  948.      A4 paper is 8.27in wide.
  949.    Not everyone uses this style.  Instead of `8.27in', you may write
  950. `8.27 in.' or `8.27 inches'.
  951. File: texinfo,  Node: Dots Bullets,  Next: TeX and copyright,  Prev: dmn,  Up: Insertions
  952. Inserting Ellipsis, Dots, and Bullets
  953. =====================================
  954.    An "ellipsis" (a line of dots) is not typeset as a string of
  955. periods, so a special command is used for ellipsis in Texinfo.  The
  956. `@bullet' command is special, too.  Each of these commands is followed
  957. by a pair of braces, `{}', without any whitespace between the name of
  958. the command and the braces.  (You need to use braces with these
  959. commands because you can use them next to other text; without the
  960. braces, the formatters would be confused.  *Note  @-Command Syntax:
  961. Command Syntax, for further information).
  962. * Menu:
  963. * dots::                        How to insert dots ...
  964. * bullet::                      How to insert a bullet.
  965. File: texinfo,  Node: dots,  Next: bullet,  Up: Dots Bullets
  966. `@dots'{}
  967. ---------
  968.    Use the `@dots{}' command to generate an ellipsis, which is three
  969. dots in a row, appropriately spaced, like this: `...'.  Do not simply
  970. write three periods in the input file; that would work for the Info
  971. file output, but would produce the wrong amount of space between the
  972. periods in the printed manual.
  973. File: texinfo,  Node: bullet,  Prev: dots,  Up: Dots Bullets
  974. `@bullet'{}
  975. -----------
  976.    Use the `@bullet{}' command to generate a large round dot, or the
  977. closest possible thing to one.  In Info, an asterisk is used.
  978.    Here is a bullet: *
  979.    When you use `@bullet' in `@itemize', you do not need to type the
  980. braces, because `@itemize' supplies them.  *Note itemize::.
  981. File: texinfo,  Node: TeX and copyright,  Next: minus,  Prev: Dots Bullets,  Up: Insertions
  982. Inserting TeX and the Copyright Symbol
  983. ======================================
  984.    The logo `TeX' is typeset in a special fashion and it needs an
  985. @-command.  The copyright symbol, `(C)', is also special. Each of these
  986. commands is followed by a pair of braces, `{}', without any whitespace
  987. between the name of the command and the braces.
  988. * Menu:
  989. * tex::                         How to insert the TeX logo.
  990. * copyright symbol::            How to use `@copyright'{}.
  991. File: texinfo,  Node: tex,  Next: copyright symbol,  Up: TeX and copyright
  992. `@TeX'{}
  993. --------
  994.    Use the `@TeX{}' command to generate `TeX'.  In a printed manual,
  995. this is a special logo that is different from three ordinary letters. 
  996. In Info, it just looks like `TeX'.  The `@TeX{}' command is unique
  997. among Texinfo commands in that the T and the X are in upper case.
  998. File: texinfo,  Node: copyright symbol,  Prev: tex,  Up: TeX and copyright
  999. `@copyright'{}
  1000. --------------
  1001.    Use the `@copyright{}' command to generate `(C)'.  In a printed
  1002. manual, this is a `c' inside a circle, and in Info, this is `(C)'.
  1003.