home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / info / texinfo.info-5 < prev    next >
Encoding:
GNU Info File  |  1996-10-12  |  49.0 KB  |  1,396 lines

  1. This is Info file texinfo.info, produced by Makeinfo-1.64 from the
  2. input file /ade-src/fsf/texinfo/texinfo.texi.
  3.  
  4.   This file documents Texinfo, a documentation system that uses a single
  5. source file to produce both on-line information and a printed manual.
  6.  
  7.   Copyright (C) 1988, 1990, 1991, 1992, 1993, 1995 Free Software
  8. Foundation, Inc.
  9.  
  10.   This is the second edition of the Texinfo documentation,
  11. and is consistent with version 2 of `texinfo.tex'.
  12.  
  13.   Permission is granted to make and distribute verbatim copies of this
  14. manual provided the copyright notice and this permission notice are
  15. preserved on all copies.
  16.  
  17.   Permission is granted to copy and distribute modified versions of this
  18. manual under the conditions for verbatim copying, provided that the
  19. entire resulting derived work is distributed under the terms of a
  20. permission notice identical to this one.
  21.  
  22.   Permission is granted to copy and distribute translations of this
  23. manual into another language, under the above conditions for modified
  24. versions, except that this permission notice may be stated in a
  25. translation approved by the Free Software Foundation.
  26.  
  27. 
  28. File: texinfo.info,  Node: samp,  Next: var,  Prev: key,  Up: Indicating
  29.  
  30. `@samp'{TEXT}
  31. -------------
  32.  
  33.   Use the `@samp' command to indicate text that is a literal example or
  34. `sample' of a sequence of characters in a file, string, pattern, etc.
  35. Enclose the text in braces.  The argument appears within single
  36. quotation marks in both the Info file and the printed manual; in
  37. addition, it is printed in a fixed-width font.
  38.  
  39.      To match @samp{foo} at the end of the line,
  40.      use the regexp @samp{foo$}.
  41.  
  42. produces
  43.  
  44.      To match `foo' at the end of the line, use the regexp `foo$'.
  45.  
  46.   Any time you are referring to single characters, you should use
  47. `@samp' unless `@kbd' is more appropriate.  Use `@samp' for the names
  48. of command-line options.  Also, you may use `@samp' for entire
  49. statements in C and for entire shell commands--in this case, `@samp'
  50. often looks better than `@code'.  Basically, `@samp' is a catchall for
  51. whatever is not covered by `@code', `@kbd', or `@key'.
  52.  
  53.   Only include punctuation marks within braces if they are part of the
  54. string you are specifying.  Write punctuation marks outside the braces
  55. if those punctuation marks are part of the English text that surrounds
  56. the string.  In the following sentence, for example, the commas and
  57. period are outside of the braces:
  58.  
  59.      In English, the vowels are @samp{a}, @samp{e},
  60.      @samp{i}, @samp{o}, @samp{u}, and sometimes
  61.      @samp{y}.
  62.  
  63. This produces:
  64.  
  65.      In English, the vowels are `a', `e', `i', `o', `u',  and sometimes
  66.      `y'.
  67.  
  68. 
  69. File: texinfo.info,  Node: var,  Next: file,  Prev: samp,  Up: Indicating
  70.  
  71. `@var'{METASYNTACTIC-VARIABLE}
  72. ------------------------------
  73.  
  74.   Use the `@var' command to indicate metasyntactic variables.  A
  75. "metasyntactic variable" is something that stands for another piece of
  76. text.  For example, you should use a metasyntactic variable in the
  77. documentation of a function to describe the arguments that are passed
  78. to that function.
  79.  
  80.   Do not use `@var' for the names of particular variables in
  81. programming languages.  These are specific names from a program, so
  82. `@code' is correct for them.  For example, the Lisp variable
  83. `texinfo-tex-command' is not a metasyntactic variable; it is properly
  84. formatted using `@code'.
  85.  
  86.   The effect of `@var' in the Info file is to change the case of the
  87. argument to all upper case; in the printed manual, to italicize it.
  88.  
  89.   For example,
  90.  
  91.      To delete file @var{filename},
  92.      type @code{rm @var{filename}}.
  93.  
  94. produces
  95.  
  96.      To delete file FILENAME, type `rm FILENAME'.
  97.  
  98. (Note that `@var' may appear inside `@code', `@samp', `@file', etc.)
  99.  
  100.   Write a metasyntactic variable all in lower case without spaces, and
  101. use hyphens to make it more readable.  Thus, the Texinfo source for the
  102. illustration of how to begin a Texinfo manual looks like this:
  103.  
  104.      \input texinfo
  105.      @@setfilename @var{info-file-name}
  106.      @@settitle @var{name-of-manual}
  107.  
  108. This produces:
  109.  
  110.      \input texinfo
  111.      @setfilename INFO-FILE-NAME
  112.      @settitle NAME-OF-MANUAL
  113.  
  114.   In some documentation styles, metasyntactic variables are shown with
  115. angle brackets, for example:
  116.  
  117.      ..., type rm <filename>
  118.  
  119. However, that is not the style that Texinfo uses.  (You can, of course,
  120. modify the sources to TeX and the Info formatting commands to output
  121. the `<...>' format if you wish.)
  122.  
  123. 
  124. File: texinfo.info,  Node: file,  Next: dfn,  Prev: var,  Up: Indicating
  125.  
  126. `@file'{FILE-NAME}
  127. ------------------
  128.  
  129.   Use the `@file' command to indicate text that is the name of a file,
  130. buffer, or directory, or is the name of a node in Info.  You can also
  131. use the command for file name suffixes.  Do not use `@file' for symbols
  132. in a programming language; use `@code'.
  133.  
  134.   Currently, `@file' is equivalent to `@samp' in its effects.  For
  135. example,
  136.  
  137.      The @file{.el} files are in
  138.      the @file{/usr/local/emacs/lisp} directory.
  139.  
  140. produces
  141.  
  142.      The `.el' files are in the `/usr/local/emacs/lisp' directory.
  143.  
  144. 
  145. File: texinfo.info,  Node: dfn,  Next: cite,  Prev: file,  Up: Indicating
  146.  
  147. `@dfn'{TERM}
  148. ------------
  149.  
  150.   Use the `@dfn' command to identify the introductory or defining use
  151. of a technical term.  Use the command only in passages whose purpose is
  152. to introduce a term which will be used again or which the reader ought
  153. to know.  Mere passing mention of a term for the first time does not
  154. deserve `@dfn'.  The command generates italics in the printed manual,
  155. and double quotation marks in the Info file.  For example:
  156.  
  157.      Getting rid of a file is called @dfn{deleting} it.
  158.  
  159. produces
  160.  
  161.      Getting rid of a file is called "deleting" it.
  162.  
  163.   As a general rule, a sentence containing the defining occurrence of a
  164. term should be a definition of the term.  The sentence does not need to
  165. say explicitly that it is a definition, but it should contain the
  166. information of a definition--it should make the meaning clear.
  167.  
  168. 
  169. File: texinfo.info,  Node: cite,  Prev: dfn,  Up: Indicating
  170.  
  171. `@cite'{REFERENCE}
  172. ------------------
  173.  
  174.   Use the `@cite' command for the name of a book that lacks a companion
  175. Info file. The command produces italics in the printed manual, and
  176. quotation marks in the Info file.
  177.  
  178.   (If a book is written in Texinfo, it is better to use a cross
  179. reference command since a reader can easily follow such a reference in
  180. Info.  *Note `@xref': xref.)
  181.  
  182. 
  183. File: texinfo.info,  Node: Emphasis,  Prev: Indicating,  Up: Marking Text
  184.  
  185. Emphasizing Text
  186. ================
  187.  
  188.   Usually, Texinfo changes the font to mark words in the text according
  189. to what category the words belong to; an example is the `@code' command.
  190. Most often, this is the best way to mark words.  However, sometimes you
  191. will want to emphasize text without indicating a category.  Texinfo has
  192. two commands to do this.  Also, Texinfo has several commands that
  193. specify the font in which TeX will typeset text.  These commands have
  194. no affect on Info and only one of them, the `@r' command, has any
  195. regular use.
  196.  
  197. * Menu:
  198.  
  199. * emph & strong::               How to emphasize text in Texinfo.
  200. * Smallcaps::                   How to use the small caps font.
  201. * Fonts::                       Various font commands for printed output.
  202. * Customized Highlighting::     How to define highlighting commands.
  203.  
  204. 
  205. File: texinfo.info,  Node: emph & strong,  Next: Smallcaps,  Prev: Emphasis,  Up: Emphasis
  206.  
  207. `@emph'{TEXT} and `@strong'{TEXT}
  208. ---------------------------------
  209.  
  210.   The `@emph' and `@strong' commands are for emphasis; `@strong' is
  211. stronger.  In printed output, `@emph' produces *italics* and `@strong'
  212. produces *bold*.
  213.  
  214.   For example,
  215.  
  216.      @quotation
  217.      @strong{Caution:} @code{rm * .[^.]*} removes @emph{all}
  218.      files in the directory.
  219.      @end quotation
  220.  
  221. produces:
  222.  
  223.           *Caution*: `rm * .[^.]*' removes *all*
  224.           files in the directory.
  225.  
  226.   The `@strong' command is seldom used except to mark what is, in
  227. effect, a typographical element, such as the word `Caution' in the
  228. preceding example.
  229.  
  230.   In the Info file, both `@emph' and `@strong' put asterisks around the
  231. text.
  232.  
  233.      *Caution:* Do not use `@emph' or `@strong' with the word `Note';
  234.      Info will mistake the combination for a cross reference.  Use a
  235.      phrase such as *Please note* or *Caution* instead.
  236.  
  237. 
  238. File: texinfo.info,  Node: Smallcaps,  Next: Fonts,  Prev: emph & strong,  Up: Emphasis
  239.  
  240. `@sc'{TEXT}: The Small Caps Font
  241. --------------------------------
  242.  
  243.   Use the `@sc' command to set text in the printed output in a small
  244. caps font and set text in the Info file in upper case letters.
  245.  
  246.   Write the text between braces in lower case, like this:
  247.  
  248.      The @sc{acm} and @sc{ieee} are technical societies.
  249.  
  250. This produces:
  251.  
  252.      The ACM and IEEE are technical societies.
  253.  
  254.   TeX typesets the small caps font in a manner that prevents the
  255. letters from `jumping out at you on the page'.  This makes small caps
  256. text easier to read than text in all upper case.  The Info formatting
  257. commands set all small caps text in upper case.
  258.  
  259.   If the text between the braces of an `@sc' command is upper case, TeX
  260. typesets in full-size capitals.  Use full-size capitals sparingly.
  261.  
  262.   You may also use the small caps font for a jargon word such as ATO (a
  263. NASA word meaning `abort to orbit').
  264.  
  265.   There are subtleties to using the small caps font with a jargon word
  266. such as CDR, a word used in Lisp programming.  In this case, you should
  267. use the small caps font when the word refers to the second and
  268. subsequent elements of a list (the CDR of the list), but you should use
  269. `@code' when the word refers to the Lisp function of the same spelling.
  270.  
  271. 
  272. File: texinfo.info,  Node: Fonts,  Next: Customized Highlighting,  Prev: Smallcaps,  Up: Emphasis
  273.  
  274. Fonts for Printing, Not Info
  275. ----------------------------
  276.  
  277.   Texinfo provides four font commands that specify font changes in the
  278. printed manual but have no effect in the Info file.  `@i' requests
  279. italic font (in some versions of TeX, a slanted font is used), `@b'
  280. requests bold face, `@t' requests the fixed-width, typewriter-style
  281. font used by `@code', and `@r' requests a roman font, which is the
  282. usual font in which text is printed.  All four commands apply to an
  283. argument that follows, surrounded by braces.
  284.  
  285.   Only the `@r' command has much use: in example programs, you can use
  286. the `@r' command to convert code comments from the fixed-width font to
  287. a roman font.  This looks better in printed output.
  288.  
  289.   For example,
  290.  
  291.      @lisp
  292.      (+ 2 2)    ; @r{Add two plus two.}
  293.      @end lisp
  294.  
  295. produces
  296.  
  297.      (+ 2 2)    ; Add two plus two.
  298.  
  299.   If possible, you should avoid using the other three font commands.  If
  300. you need to use one, it probably indicates a gap in the Texinfo
  301. language.
  302.  
  303. 
  304. File: texinfo.info,  Node: Customized Highlighting,  Prev: Fonts,  Up: Emphasis
  305.  
  306. Customized Highlighting
  307. -----------------------
  308.  
  309.   You can use regular TeX commands inside of `@iftex' ...  `@end iftex'
  310. to create your own customized highlighting commands for Texinfo.  The
  311. easiest way to do this is to equate your customized commands with
  312. pre-existing commands, such as those for italics.  Such new commands
  313. work only with TeX.
  314.  
  315.   You can use the `@definfoenclose' command inside of `@ifinfo' ...
  316. `@end ifinfo' to define commands for Info with the same names as new
  317. commands for TeX.  `@definfoenclose' creates new commands for Info that
  318. mark text by enclosing it in strings that precede and follow the text.
  319. (1) (*note Customized Highlighting-Footnotes::)
  320.  
  321.   Here is how to create a new @-command called `@phoo' that causes TeX
  322. to typeset its argument in italics and causes Info to display the
  323. argument between `//' and `\\'.
  324.  
  325.   For TeX, write the following to equate the `@phoo' command with the
  326. existing `@i' italics command:
  327.  
  328.      @iftex
  329.      @global@let@phoo=@i
  330.      @end iftex
  331.  
  332. This defines `@phoo' as a command that causes TeX to typeset the
  333. argument to `@phoo' in italics.  `@global@let' tells TeX to equate the
  334. next argument with the argument that follows the equals sign.
  335.  
  336.   For Info, write the following to tell the Info formatters to enclose
  337. the argument between `//' and `\\':
  338.  
  339.      @ifinfo
  340.      @definfoenclose phoo, //, \\
  341.      @end ifinfo
  342.  
  343. Write the `@definfoenclose' command on a line and follow it with three
  344. arguments separated by commas (commas are used as separators in an
  345. `@node' line in the same way).
  346.  
  347.    * The first argument to `@definfoenclose' is the @-command name
  348.      *without* the `@';
  349.  
  350.    * the second argument is the Info start delimiter string; and,
  351.  
  352.    * the third argument is the Info end delimiter string.
  353.  
  354. The latter two arguments enclose the highlighted text in the Info file.
  355. A delimiter string may contain spaces.  Neither the start nor end
  356. delimiter is required.  However, if you do not provide a start
  357. delimiter, you must follow the command name with two commas in a row;
  358. otherwise, the Info formatting commands will misinterpret the end
  359. delimiter string as a start delimiter string.
  360.  
  361.   After you have defined `@phoo' both for TeX and for Info, you can
  362. then write `@phoo{bar}' to see `//bar\\' in Info and see `bar' in
  363. italics in printed output.
  364.  
  365.   Note that each definition applies to its own formatter: one for TeX,
  366. the other for Info.
  367.  
  368.   Here is another example:
  369.  
  370.      @ifinfo
  371.      @definfoenclose headword, , :
  372.      @end ifinfo
  373.      @iftex
  374.      @global@let@headword=@b
  375.      @end iftex
  376.  
  377. This defines `@headword' as an Info formatting command that inserts
  378. nothing before and a colon after the argument and as a TeX formatting
  379. command to typeset its argument in bold.
  380.  
  381. 
  382. File: texinfo.info,  Node: Customized Highlighting-Footnotes,  Up: Customized Highlighting
  383.  
  384.   (1)  Currently, `@definfoenclose' works only with
  385. `texinfo-format-buffer' and `texinfo-format-region', not with
  386. `makeinfo'.
  387.  
  388. 
  389. File: texinfo.info,  Node: Quotations and Examples,  Next: Lists and Tables,  Prev: Marking Text,  Up: Top
  390.  
  391. Quotations and Examples
  392. ***********************
  393.  
  394.   Quotations and examples are blocks of text consisting of one or more
  395. whole paragraphs that are set off from the bulk of the text and treated
  396. differently.  They are usually indented.
  397.  
  398.   In Texinfo, you always begin a quotation or example by writing an
  399. @-command at the beginning of a line by itself, and end it by writing
  400. an `@end' command that is also at the beginning of a line by itself.
  401. For instance, you begin an example by writing `@example' by itself at
  402. the beginning of a line and end the example by writing `@end example'
  403. on a line by itself, at the beginning of that line.
  404.  
  405. * Menu:
  406.  
  407. * Block Enclosing Commands::    Use different constructs for
  408.                                   different purposes.
  409. * quotation::                   How to write a quotation.
  410. * example::                     How to write an example in a fixed-width font.
  411. * noindent::                    How to prevent paragraph indentation.
  412. * Lisp Example::                How to illustrate Lisp code.
  413. * smallexample & smalllisp::    Forms for the `@smallbook' option.
  414. * display::                     How to write an example in the current font.
  415. * format::                      How to write an example that does not narrow
  416.                                   the margins.
  417. * exdent::                      How to undo the indentation of a line.
  418. * flushleft & flushright::      How to push text flushleft or flushright.
  419. * cartouche::                   How to draw cartouches around examples.
  420.  
  421. 
  422. File: texinfo.info,  Node: Block Enclosing Commands,  Next: quotation,  Prev: Quotations and Examples,  Up: Quotations and Examples
  423.  
  424. The Block Enclosing Commands
  425. ============================
  426.  
  427.   Here are commands for quotations and examples:
  428.  
  429. `@quotation'
  430.      Indicate text that is quoted. The text is filled, indented, and
  431.      printed in a roman font by default.
  432.  
  433. `@example'
  434.      Illustrate code, commands, and the like. The text is printed in a
  435.      fixed-width font, and indented but not filled.
  436.  
  437. `@lisp'
  438.      Illustrate Lisp code. The text is printed in a fixed-width font,
  439.      and indented but not filled.
  440.  
  441. `@smallexample'
  442.      Illustrate code, commands, and the like.  Similar to `@example',
  443.      except that in TeX this command typesets text in a smaller font
  444.      for the smaller `@smallbook' format than for the 8.5 by 11 inch
  445.      format.
  446.  
  447. `@smalllisp'
  448.      Illustrate Lisp code.  Similar to `@lisp', except that in TeX this
  449.      command typesets text in a smaller font for the smaller
  450.      `@smallbook' format than for the 8.5 by 11 inch format.
  451.  
  452. `@display'
  453.      Display illustrative text.  The text is indented but not filled,
  454.      and no font is specified (so, by default, the font is roman).
  455.  
  456. `@format'
  457.      Print illustrative text.  The text is not indented and not filled
  458.      and no font is specified (so, by default, the font is roman).
  459.  
  460.   The `@exdent' command is used within the above constructs to undo the
  461. indentation of a line.
  462.  
  463.   The `@flushleft' and `@flushright' commands are used to line up the
  464. left or right margins of unfilled text.
  465.  
  466.   The `@noindent' command may be used after one of the above constructs
  467. to prevent the following text from being indented as a new paragraph.
  468.  
  469.   You can use the `@cartouche' command within one of the above
  470. constructs to highlight the example or quotation by drawing a box with
  471. rounded corners around it.  (The `@cartouche' command affects only the
  472. printed manual; it has no effect in the Info file; see *Note Drawing
  473. Cartouches Around Examples: cartouche.)
  474.  
  475. 
  476. File: texinfo.info,  Node: quotation,  Next: example,  Prev: Block Enclosing Commands,  Up: Quotations and Examples
  477.  
  478. `@quotation'
  479. ============
  480.  
  481.   The text of a quotation is processed normally except that:
  482.  
  483.    * the margins are closer to the center of the page, so the whole of
  484.      the quotation is indented;
  485.  
  486.    * the first lines of paragraphs are indented no more than other
  487.      lines;
  488.  
  489.    * in the printed output, interparagraph spacing is reduced.
  490.  
  491.      This is an example of text written between an `@quotation' command
  492.      and an `@end quotation' command.  An `@quotation' command is most
  493.      often used to indicate text that is excerpted from another (real
  494.      or hypothetical) printed work.
  495.  
  496.   Write an `@quotation' command as text on a line by itself.  This line
  497. will disappear from the output.  Mark the end of the quotation with a
  498. line beginning with and containing only `@end quotation'.  The `@end
  499. quotation' line will likewise disappear from the output.  Thus, the
  500. following,
  501.  
  502.      @quotation
  503.      This is
  504.      a foo.
  505.      @end quotation
  506.  
  507. produces
  508.  
  509.      This is a foo.
  510.  
  511. 
  512. File: texinfo.info,  Node: example,  Next: noindent,  Prev: quotation,  Up: Quotations and Examples
  513.  
  514. `@example'
  515. ==========
  516.  
  517.   The `@example' command is used to indicate an example that is not
  518. part of the running text, such as computer input or output.
  519.  
  520.      This is an example of text written between an
  521.      `@example' command
  522.      and an `@end example' command.
  523.      The text is indented but not filled.
  524.      
  525.      In the printed manual, the text is typeset in a
  526.      fixed-width font, and extra spaces and blank lines are
  527.      significant.  In the Info file, an analogous result is
  528.      obtained by indenting each line with five spaces.
  529.  
  530.   Write an `@example' command at the beginning of a line by itself.
  531. This line will disappear from the output.  Mark the end of the example
  532. with an `@end example' command, also written at the beginning of a line
  533. by itself.  The `@end example' will disappear from the output.
  534.  
  535.   For example,
  536.  
  537.      @example
  538.      mv foo bar
  539.      @end example
  540.  
  541. produces
  542.  
  543.      mv foo bar
  544.  
  545.   Since the lines containing `@example' and `@end example' will
  546. disappear, you should put a blank line before the `@example' and
  547. another blank line after the `@end example'.  (Remember that blank
  548. lines between the beginning `@example' and the ending `@end example'
  549. will appear in the output.)
  550.  
  551.      *Caution:* Do not use tabs in the lines of an example (or anywhere
  552.      else in Texinfo, for that matter)!  TeX treats tabs as single
  553.      spaces, and that is not what they look like.  This is a problem
  554.      with TeX.  (If necessary, in Emacs, you can use `M-x untabify' to
  555.      convert tabs in a region to multiple spaces.)
  556.  
  557.   Examples are often, logically speaking, "in the middle" of a
  558. paragraph, and the text continues after an example should not be
  559. indented.  The `@noindent' command prevents a piece of text from being
  560. indented as if it were a new paragraph.  (*Note noindent::.)
  561.  
  562.   (The `@code' command is used for examples of code that are embedded
  563. within sentences, not set off from preceding and following text.  *Note
  564. `@code': code.)
  565.  
  566. 
  567. File: texinfo.info,  Node: noindent,  Next: Lisp Example,  Prev: example,  Up: Quotations and Examples
  568.  
  569. `@noindent'
  570. ===========
  571.  
  572.   An example or other inclusion can break a paragraph into segments.
  573. Ordinarily, the formatters indent text that follows an example as a new
  574. paragraph.  However, you can prevent this by writing `@noindent' at the
  575. beginning of a line by itself preceding the continuation text.
  576.  
  577.   For example:
  578.  
  579.      @example
  580.      This is an example
  581.      @end example
  582.      
  583.      @noindent
  584.      This line is not indented.  As you can see, the
  585.      beginning of the line is fully flush left with the line
  586.      that follows after it.  (This whole example is between
  587.      @code{@@display} and @code{@@end display}.)
  588.  
  589. produces
  590.  
  591.           This is an example
  592.      
  593.      
  594.      This line is not indented.  As you can see, the
  595.      beginning of the line is fully flush left with the line
  596.      that follows after it.  (This whole example is between
  597.      `@display' and `@end display'.)
  598.  
  599.   To adjust the number of blank lines properly in the Info file output,
  600. remember that the line containing `@noindent' does not generate a blank
  601. line, and neither does the `@end example' line.
  602.  
  603.   In the Texinfo source file for this manual, each line that says
  604. `produces' is preceded by a line containing `@noindent'.
  605.  
  606.   Do not put braces after an `@noindent' command; they are not
  607. necessary, since `@noindent' is a command used outside of paragraphs
  608. (*note Command Syntax::.).
  609.  
  610. 
  611. File: texinfo.info,  Node: Lisp Example,  Next: smallexample & smalllisp,  Prev: noindent,  Up: Quotations and Examples
  612.  
  613. `@lisp'
  614. =======
  615.  
  616.   The `@lisp' command is used for Lisp code.  It is synonymous with the
  617. `@example' command.
  618.  
  619.      This is an example of text written between an
  620.      `@lisp' command and an `@end lisp' command.
  621.  
  622.   Use `@lisp' instead of `@example' so as to preserve information
  623. regarding the nature of the example.  This is useful, for example, if
  624. you write a function that evaluates only and all the Lisp code in a
  625. Texinfo file.  Then you can use the Texinfo file as a Lisp library.(1)
  626. (*note Lisp Example-Footnotes::)
  627.  
  628.   Mark the end of `@lisp' with `@end lisp' on a line by itself.
  629.  
  630. 
  631. File: texinfo.info,  Node: Lisp Example-Footnotes,  Up: Lisp Example
  632.  
  633.   (1)  It would be straightforward to extend Texinfo to work in a
  634. similar fashion for C, FORTRAN, or other languages.
  635.  
  636. 
  637. File: texinfo.info,  Node: smallexample & smalllisp,  Next: display,  Prev: Lisp Example,  Up: Quotations and Examples
  638.  
  639. `@smallexample' and `@smalllisp'
  640. ================================
  641.  
  642.   In addition to the regular `@example' and `@lisp' commands, Texinfo
  643. has two other "example-style" commands.  These are the `@smallexample'
  644. and `@smalllisp' commands.  Both these commands are designed for use
  645. with the `@smallbook' command that causes TeX to produce a printed
  646. manual in a 7 by 9.25 inch format rather than the regular 8.5 by 11
  647. inch format.
  648.  
  649.   In TeX, the `@smallexample' and `@smalllisp' commands typeset text in
  650. a smaller font for the smaller `@smallbook' format than for the 8.5 by
  651. 11 inch format.  Consequently, many examples containing long lines fit
  652. in a narrower, `@smallbook' page without needing to be shortened.  Both
  653. commands typeset in the normal font size when you format for the 8.5 by
  654. 11 inch size; indeed, in this situation, the `@smallexample' and
  655. `@smalllisp' commands are defined to be the `@example' and `@lisp'
  656. commands.
  657.  
  658.   In Info, the `@smallexample' and `@smalllisp' commands are equivalent
  659. to the `@example' and `@lisp' commands, and work exactly the same.
  660.  
  661.   Mark the end of `@smallexample' or `@smalllisp' with `@end
  662. smallexample' or `@end smalllisp', respectively.
  663.  
  664.      This is an example of text written between `@smallexample' and
  665.      `@end smallexample'.  In Info and in an 8.5 by 11 inch manual,
  666.      this text appears in its normal size; but in a 7 by 9.25 inch manual,
  667.      this text appears in a smaller font.
  668.  
  669.   The `@smallexample' and `@smalllisp' commands make it easier to
  670. prepare smaller format manuals without forcing you to edit examples by
  671. hand to fit them onto narrower pages.
  672.  
  673.   As a general rule, a printed document looks better if you write all
  674. the examples in a chapter consistently in `@example' or in
  675. `@smallexample'.  Only occasionally should you mix the two formats.
  676.  
  677.   *Note Printing "Small" Books: smallbook, for more information about
  678. the `@smallbook' command.
  679.  
  680. 
  681. File: texinfo.info,  Node: display,  Next: format,  Prev: smallexample & smalllisp,  Up: Quotations and Examples
  682.  
  683. `@display'
  684. ==========
  685.  
  686.   The `@display' command begins a kind of example.  It is like the
  687. `@example' command except that, in a printed manual, `@display' does
  688. not select the fixed-width font.  In fact, it does not specify the font
  689. at all, so that the text appears in the same font it would have
  690. appeared in without the `@display' command.
  691.  
  692.      This is an example of text written between an `@display' command
  693.      and an `@end display' command.  The `@display' command
  694.      indents the text, but does not fill it.
  695.  
  696. 
  697. File: texinfo.info,  Node: format,  Next: exdent,  Prev: display,  Up: Quotations and Examples
  698.  
  699. `@format'
  700. =========
  701.  
  702.   The `@format' command is similar to `@example' except that, in the
  703. printed manual, `@format' does not select the fixed-width font and does
  704. not narrow the margins.
  705.  
  706. This is an example of text written between an `@format' command
  707. and an `@end format' command.  As you can see
  708. from this example,
  709. the `@format' command does not fill the text.
  710.  
  711. 
  712. File: texinfo.info,  Node: exdent,  Next: flushleft & flushright,  Prev: format,  Up: Quotations and Examples
  713.  
  714. `@exdent': Undoing a Line's Indentation
  715. =======================================
  716.  
  717.   The `@exdent' command removes any indentation a line might have.  The
  718. command is written at the beginning of a line and applies only to the
  719. text that follows the command that is on the same line.  Do not use
  720. braces around the text.  In a printed manual, the text on an `@exdent'
  721. line is printed in the roman font.
  722.  
  723.   `@exdent' is usually used within examples.  Thus,
  724.  
  725.      @example
  726.      This line follows an @@example command.
  727.      @exdent This line is exdented.
  728.      This line follows the exdented line.
  729.      The @@end example comes on the next line.
  730.      @end group
  731.  
  732. produces
  733.  
  734.      This line follows an @example command.
  735. This line is exdented.
  736.      This line follows the exdented line.
  737.      The @end example comes on the next line.
  738.  
  739.   In practice, the `@exdent' command is rarely used.  Usually, you
  740. un-indent text by ending the example and returning the page to its
  741. normal width.
  742.  
  743. 
  744. File: texinfo.info,  Node: flushleft & flushright,  Next: cartouche,  Prev: exdent,  Up: Quotations and Examples
  745.  
  746. `@flushleft' and `@flushright'
  747. ==============================
  748.  
  749.   The `@flushleft' and `@flushright' commands line up the ends of lines
  750. on the left and right margins of a page, but do not fill the text.  The
  751. commands are written on lines of their own, without braces.  The
  752. `@flushleft' and `@flushright' commands are ended by `@end flushleft'
  753. and `@end flushright' commands on lines of their own.
  754.  
  755.   For example,
  756.  
  757.      @flushleft
  758.      This text is
  759.      written flushleft.
  760.      @end flushleft
  761.  
  762. produces
  763.  
  764.      This text is
  765.      written flushleft.
  766.  
  767.   Flushright produces the type of indentation often used in the return
  768. address of letters.
  769.  
  770. For example,
  771.  
  772.      @flushright
  773.      Here is an example of text written
  774.      flushright.  The @code{@flushright} command
  775.      right justifies every line but leaves the
  776.      left end ragged.
  777.      @end flushright
  778.  
  779. produces
  780.  
  781.                                      Here is an example of text written
  782.                                  flushright.  The `@flushright' command
  783.                               right justifies every line but leaves the
  784.                                                        left end ragged.
  785.  
  786. 
  787. File: texinfo.info,  Node: cartouche,  Prev: flushleft & flushright,  Up: Quotations and Examples
  788.  
  789. Drawing Cartouches Around Examples
  790. ==================================
  791.  
  792.   In a printed manual, the `@cartouche' command draws a box with
  793. rounded corners around its contents.  You can use this command to
  794. further highlight an example or quotation.  For instance, you could
  795. write a manual in which one type of example is surrounded by a cartouche
  796. for emphasis.
  797.  
  798.   The `@cartouche' command affects only the printed manual; it has no
  799. effect in the Info file.
  800.  
  801.   For example,
  802.  
  803.      @example
  804.      @cartouche
  805.      % pwd
  806.      /usr/local/lib/emacs/info
  807.      @end cartouche
  808.      @end example
  809.  
  810. surrounds the two-line example with a box with rounded corners, in the
  811. printed manual.
  812.  
  813. 
  814. File: texinfo.info,  Node: Lists and Tables,  Next: Indices,  Prev: Quotations and Examples,  Up: Top
  815.  
  816. Making Lists and Tables
  817. ***********************
  818.  
  819.   Texinfo has several ways of making lists and two-column tables.
  820. Lists can be bulleted or numbered, while two-column tables can
  821. highlight the items in the first column.
  822.  
  823. * Menu:
  824.  
  825. * Introducing Lists::           Texinfo formats lists for you.
  826. * itemize::                     How to construct a simple list.
  827. * enumerate::                   How to construct a numbered list.
  828. * Two-column Tables::           How to construct a two-column table.
  829.  
  830. 
  831. File: texinfo.info,  Node: Introducing Lists,  Next: itemize,  Prev: Lists and Tables,  Up: Lists and Tables
  832.  
  833. Introducing Lists
  834. =================
  835.  
  836.   Texinfo automatically indents the text in lists or tables, and numbers
  837. an enumerated list.  This last feature is useful if you modify the
  838. list, since you do not need to renumber it yourself.
  839.  
  840.   Numbered lists and tables begin with the appropriate @-command at the
  841. beginning of a line, and end with the corresponding `@end' command on a
  842. line by itself.  The table and itemized-list commands also require that
  843. you write formatting information on the same line as the beginning
  844. @-command.
  845.  
  846.   Begin an enumerated list, for example, with an `@enumerate' command
  847. and end the list with an `@end enumerate' command.  Begin an itemized
  848. list with an `@itemize' command, followed on the same line by a
  849. formatting command such as `@bullet', and end the list with an `@end
  850. itemize' command.
  851.  
  852.   Precede each element of a list with an `@item' or `@itemx' command.
  853.  
  854. Here is an itemized list of the different kinds of table and lists:
  855.  
  856.    * Itemized lists with and without bullets.
  857.  
  858.    * Enumerated lists, using numbers or letters.
  859.  
  860.    * Two-column tables with highlighting.
  861.  
  862. Here is an enumerated list with the same items:
  863.  
  864.   1. Itemized lists with and without bullets.
  865.  
  866.   2. Enumerated lists, using numbers or letters.
  867.  
  868.   3. Two-column tables with highlighting.
  869.  
  870. And here is a two-column table with the same items and their @-commands:
  871.  
  872. `@itemize'
  873.      Itemized lists with and without bullets.
  874.  
  875. `@enumerate'
  876.      Enumerated lists, using numbers or letters.
  877.  
  878. `@table'
  879. `@ftable'
  880. `@vtable'
  881.      Two-column tables with highlighting.
  882.  
  883. 
  884. File: texinfo.info,  Node: itemize,  Next: enumerate,  Prev: Introducing Lists,  Up: Lists and Tables
  885.  
  886. Making an Itemized List
  887. =======================
  888.  
  889.   The `@itemize' command produces sequences of indented paragraphs,
  890. with a bullet or other mark inside the left margin at the beginning of
  891. each paragraph for which such a mark is desired.
  892.  
  893.   Begin an itemized list by writing `@itemize' at the beginning of a
  894. line.  Follow the command, on the same line, with a character or a
  895. Texinfo command that generates a mark.  Usually, you will write
  896. `@bullet' after `@itemize', but you can use `@minus', or any character
  897. or any special symbol that results in a single character in the Info
  898. file.  (When you write `@bullet' or `@minus' after an `@itemize'
  899. command, you may omit the `{}'.)
  900.  
  901.   Write the text of the indented paragraphs themselves after the
  902. `@itemize', up to another line that says `@end itemize'.
  903.  
  904.   Before each paragraph for which a mark in the margin is desired, write
  905. a line that says just `@item'.  Do not write any other text on this
  906. line.
  907.  
  908.   Usually, you should put a blank line before an `@item'.  This puts a
  909. blank line in the Info file. (TeX inserts the proper interline
  910. whitespace in either case.)  Except when the entries are very brief,
  911. these blank lines make the list look better.
  912.  
  913.   Here is an example of the use of `@itemize', followed by the output
  914. it produces.  Note that `@bullet' produces an `*' in Info and a round
  915. dot in TeX.
  916.  
  917.      @itemize @bullet
  918.      @item
  919.      Some text for foo.
  920.      
  921.      @item
  922.      Some text
  923.      for bar.
  924.      @end itemize
  925.  
  926. This produces:
  927.  
  928.         * Some text for foo.
  929.  
  930.         * Some text for bar.
  931.  
  932.   Itemized lists may be embedded within other itemized lists.  Here is a
  933. list marked with dashes embedded in a list marked with bullets:
  934.  
  935.      @itemize @bullet
  936.      @item
  937.      First item.
  938.      
  939.      @itemize @minus
  940.      @item
  941.      Inner item.
  942.      
  943.      @item
  944.      Second inner item.
  945.      @end itemize
  946.      
  947.      @item
  948.      Second outer item.
  949.      @end itemize
  950.  
  951. This produces:
  952.  
  953.         * First item.
  954.  
  955.              - Inner item.
  956.  
  957.              - Second inner item.
  958.  
  959.         * Second outer item.
  960.  
  961. 
  962. File: texinfo.info,  Node: enumerate,  Next: Two-column Tables,  Prev: itemize,  Up: Lists and Tables
  963.  
  964. Making a Numbered or Lettered List
  965. ==================================
  966.  
  967.   `@enumerate' is like `@itemize' except that the marks in the left
  968. margin contain successive integers or letters.  (*Note `@itemize':
  969. itemize.)
  970.  
  971.   Write the `@enumerate' command at the beginning of a line.  The
  972. command does not require an argument, but accepts either a number or a
  973. letter as an option.  Without an argument, `@enumerate' starts the list
  974. with the number 1.  With a numeric argument, such as 3, the command
  975. starts the list with that number.  With an upper or lower case letter,
  976. such as `a' or `A', the command starts the list with that letter.
  977.  
  978.   Write the text of the enumerated list in the same way you write an
  979. itemized list: put `@item' on a line of its own before the start of
  980. each paragraph that you want enumerated.  Do not write any other text on
  981. the line beginning with `@item'.
  982.  
  983.   You should put a blank line between entries in the list.  This
  984. generally makes it easier to read the Info file.
  985.  
  986.   Here is an example of `@enumerate' without an argument:
  987.  
  988.      @enumerate
  989.      @item
  990.      Underlying causes.
  991.      
  992.      @item
  993.      Proximate causes.
  994.      @end enumerate
  995.  
  996. This produces:
  997.  
  998.   1. Underlying causes.
  999.  
  1000.   2. Proximate causes.
  1001.  
  1002.   Here is an example with an argument of `3':
  1003.  
  1004.      @enumerate 3
  1005.      @item
  1006.      Predisposing causes.
  1007.      
  1008.      @item
  1009.      Precipitating causes.
  1010.      
  1011.      @item
  1012.      Perpetuating causes.
  1013.      @end enumerate
  1014.  
  1015. This produces:
  1016.  
  1017.   3. Predisposing causes.
  1018.  
  1019.   4. Precipitating causes.
  1020.  
  1021.   5. Perpetuating causes.
  1022.  
  1023.   Here is a brief summary of the alternatives.  The summary is
  1024. constructed using `@enumerate' with an argument of `a'.
  1025.  
  1026.   a. `@enumerate'
  1027.  
  1028.      Without an argument, produce a numbered list, starting with the
  1029.      number 1.
  1030.  
  1031.   b. `@enumerate POSITIVE-INTEGER'
  1032.  
  1033.      With a (positive) numeric argument, start a numbered list with that
  1034.      number.  You can use this to continue a list that you interrupted
  1035.      with other text.
  1036.  
  1037.   c. `@enumerate UPPER-CASE-LETTER'
  1038.  
  1039.      With an upper case letter as argument, start a list in which each
  1040.      item is marked by a letter, beginning with that upper case letter.
  1041.  
  1042.   d. `@enumerate LOWER-CASE-LETTER'
  1043.  
  1044.      With a lower case letter as argument, start a list in which each
  1045.      item is marked by a letter, beginning with that lower case letter.
  1046.  
  1047.   You can also nest enumerated lists, as in an outline.
  1048.  
  1049. 
  1050. File: texinfo.info,  Node: Two-column Tables,  Prev: enumerate,  Up: Lists and Tables
  1051.  
  1052. Making a Two-column Table
  1053. =========================
  1054.  
  1055.   `@table' is similar to `@itemize', but the command allows you to
  1056. specify a name or heading line for each item.  (*Note `@itemize':
  1057. itemize.)  The `@table' command is used to produce two-column tables,
  1058. and is especially useful for glossaries and explanatory exhibits.
  1059.  
  1060. * Menu:
  1061.  
  1062. * table::                       How to construct a two-column table.
  1063. * ftable vtable::               How to construct a two-column table
  1064.                                   with automatic indexing.
  1065. * itemx::                       How to put more entries in the first column.
  1066.  
  1067. 
  1068. File: texinfo.info,  Node: table,  Next: ftable vtable,  Prev: Two-column Tables,  Up: Two-column Tables
  1069.  
  1070. Using the `@table' Command
  1071. --------------------------
  1072.  
  1073.   Use the `@table' command to produce two-column tables.
  1074.  
  1075.   Write the `@table' command at the beginning of a line and follow it
  1076. on the same line with an argument that is a Texinfo command such as
  1077. `@code', `@samp', `@var', or `@kbd'.  Although these commands are
  1078. usually followed by arguments in braces, in this case you use the
  1079. command name without an argument because `@item' will supply the
  1080. argument.  This command will be applied to the text that goes into the
  1081. first column of each item and determines how it will be highlighted.
  1082. For example, `@samp' will cause the text in the first column to be
  1083. highlighted with an `@samp' command.
  1084.  
  1085.   You may also choose to use the `@asis' command as an argument to
  1086. `@table'.  `@asis' is a command that does nothing; if you use this
  1087. command after `@table', TeX and the Info formatting commands output the
  1088. first column entries without added highlighting (`as is').
  1089.  
  1090.   (The `@table' command may work with other commands besides those
  1091. listed here.  However, you can only use commands that normally take
  1092. arguments in braces.)
  1093.  
  1094.   Begin each table entry with an `@item' command at the beginning of a
  1095. line.  Write the first column text on the same line as the `@item'
  1096. command.  Write the second column text on the line following the
  1097. `@item' line and on subsequent lines.  (You do not need to type
  1098. anything for an empty second column entry.)  You may write as many
  1099. lines of supporting text as you wish, even several paragraphs.  But
  1100. only text on the same line as the `@item' will be placed in the first
  1101. column.
  1102.  
  1103.   Normally, you should put a blank line before an `@item' line.  This
  1104. puts a blank like in the Info file.  Except when the entries are very
  1105. brief, a blank line looks better.
  1106.  
  1107.   The following table, for example, highlights the text in the first
  1108. column with an `@samp' command:
  1109.  
  1110.      @table @samp
  1111.      @item foo
  1112.      This is the text for
  1113.      @samp{foo}.
  1114.      
  1115.      @item bar
  1116.      Text for @samp{bar}.
  1117.      @end table
  1118.  
  1119. This produces:
  1120.  
  1121. `foo'
  1122.      This is the text for `foo'.
  1123.  
  1124. `bar'
  1125.      Text for `bar'.
  1126.  
  1127.   If you want to list two or more named items with a single block of
  1128. text, use the `@itemx' command.  (*Note `@itemx': itemx.)
  1129.  
  1130. 
  1131. File: texinfo.info,  Node: ftable vtable,  Next: itemx,  Prev: table,  Up: Two-column Tables
  1132.  
  1133. `@ftable' and `@vtable'
  1134. -----------------------
  1135.  
  1136.   The `@ftable' and `@vtable' commands are the same as the `@table'
  1137. command except that `@ftable' automatically enters each of the items in
  1138. the first column of the table into the index of functions and `@vtable'
  1139. automatically enters each of the items in the first column of the table
  1140. into the index of variables.  This simplifies the task of creating
  1141. indices.  Only the items on the same line as the `@item' commands are
  1142. indexed, and they are indexed in exactly the form that they appear on
  1143. that line.  *Note Creating Indices: Indices, for more information about
  1144. indices.
  1145.  
  1146.   Begin a two-column table using `@ftable' or `@vtable' by writing the
  1147. @-command at the beginning of a line, followed on the same line by an
  1148. argument that is a Texinfo command such as `@code', exactly as you
  1149. would for an `@table' command; and end the table with an `@end ftable'
  1150. or `@end vtable' command on a line by itself.
  1151.  
  1152. 
  1153. File: texinfo.info,  Node: itemx,  Prev: ftable vtable,  Up: Two-column Tables
  1154.  
  1155. `@itemx'
  1156. --------
  1157.  
  1158.   Use the `@itemx' command inside a table when you have two or more
  1159. first column entries for the same item, each of which should appear on
  1160. a line of its own.  Use `@itemx' for all but the first entry.  The
  1161. `@itemx' command works exactly like `@item' except that it does not
  1162. generate extra vertical space above the first column text.
  1163.  
  1164.   For example,
  1165.  
  1166.      @table @code
  1167.      @item upcase
  1168.      @itemx downcase
  1169.      These two functions accept a character or a string as
  1170.      argument, and return the corresponding upper case (lower
  1171.      case) character or string.
  1172.      @end table
  1173.  
  1174. This produces:
  1175.  
  1176. `upcase'
  1177. `downcase'
  1178.      These two functions accept a character or a string as argument,
  1179.      and return the corresponding upper case (lower case) character or
  1180.      string.
  1181.  
  1182. (Note also that this example illustrates multi-line supporting text in
  1183. a two-column table.)
  1184.  
  1185. 
  1186. File: texinfo.info,  Node: Indices,  Next: Insertions,  Prev: Lists and Tables,  Up: Top
  1187.  
  1188. Creating Indices
  1189. ****************
  1190.  
  1191.   Using Texinfo, you can generate indices without having to sort and
  1192. collate entries manually.  In an index, the entries are listed in
  1193. alphabetical order, together with information on how to find the
  1194. discussion of each entry.  In a printed manual, this information
  1195. consists of page numbers.  In an Info file, this information is a menu
  1196. entry leading to the first node referenced.
  1197.  
  1198.   Texinfo provides several predefined kinds of index: an index for
  1199. functions, an index for variables, an index for concepts, and so on.
  1200. You can combine indices or use them for other than their canonical
  1201. purpose.  If you wish, you can define your own indices.
  1202.  
  1203. * Menu:
  1204.  
  1205. * Index Entries::               Choose different words for index entries.
  1206. * Predefined Indices::          Use different indices for different kinds
  1207.                                   of entry.
  1208. * Indexing Commands::           How to make an index entry.
  1209. * Combining Indices::           How to combine indices.
  1210. * New Indices::                 How to define your own indices.
  1211.  
  1212. 
  1213. File: texinfo.info,  Node: Index Entries,  Next: Predefined Indices,  Prev: Indices,  Up: Indices
  1214.  
  1215. Making Index Entries
  1216. ====================
  1217.  
  1218.   When you are making index entries, it is good practice to think of the
  1219. different ways people may look for something.  Different people *do
  1220. not* think of the same words when they look something up.  A helpful
  1221. index will have items indexed under all the different words that people
  1222. may use.  For example, one reader may think it obvious that the
  1223. two-letter names for indices should be listed under "Indices,
  1224. two-letter names", since the word "Index" is the general concept.  But
  1225. another reader may remember the specific concept of two-letter names
  1226. and search for the entry listed as "Two letter names for indices".  A
  1227. good index will have both entries and will help both readers.
  1228.  
  1229.   Like typesetting, the construction of an index is a highly skilled,
  1230. professional art, the subtleties of which are not appreciated until you
  1231. need to do it yourself.
  1232.  
  1233.   *Note Printing Indices & Menus::, for information about printing an
  1234. index at the end of a book or creating an index menu in an Info file.
  1235.  
  1236. 
  1237. File: texinfo.info,  Node: Predefined Indices,  Next: Indexing Commands,  Prev: Index Entries,  Up: Indices
  1238.  
  1239. Predefined Indices
  1240. ==================
  1241.  
  1242.   Texinfo provides six predefined indices:
  1243.  
  1244.    * A "concept index" listing concepts that are discussed.
  1245.  
  1246.    * A "function index" listing functions (such as entry points of
  1247.      libraries).
  1248.  
  1249.    * A "variables index" listing variables (such as global variables of
  1250.      libraries).
  1251.  
  1252.    * A "keystroke index" listing keyboard commands.
  1253.  
  1254.    * A "program index" listing names of programs.
  1255.  
  1256.    * A "data type index" listing data types (such as structures defined
  1257.      in header files).
  1258.  
  1259. Not every manual needs all of these, and most manuals use two or three
  1260. of them.  This manual has two indices: a concept index and an @-command
  1261. index (that is actually the function index but is called a command
  1262. index in the chapter heading).  Two or more indices can be combined
  1263. into one using the `@synindex' or `@syncodeindex' commands.  *Note
  1264. Combining Indices::.
  1265.  
  1266. 
  1267. File: texinfo.info,  Node: Indexing Commands,  Next: Combining Indices,  Prev: Predefined Indices,  Up: Indices
  1268.  
  1269. Defining the Entries of an Index
  1270. ================================
  1271.  
  1272.   The data to make an index come from many individual indexing commands
  1273. scattered throughout the Texinfo source file.  Each command says to add
  1274. one entry to a particular index; after formatting, the index will give
  1275. the current page number or node name as the reference.
  1276.  
  1277.   An index entry consists of an indexing command at the beginning of a
  1278. line followed, on the rest of the line, by the entry.
  1279.  
  1280.   For example, this section begins with the following five entries for
  1281. the concept index:
  1282.  
  1283.      @cindex Defining indexing entries
  1284.      @cindex Index entries
  1285.      @cindex Entries for an index
  1286.      @cindex Specifying index entries
  1287.      @cindex Creating index entries
  1288.  
  1289.   Each predefined index has its own indexing command--`@cindex' for the
  1290. concept index, `@findex' for the function index, and so on.
  1291.  
  1292.   Concept index entries consist of text.  The best way to write an index
  1293. is to choose entries that are terse yet clear.  If you can do this, the
  1294. index often looks better if the entries are not capitalized, but
  1295. written just as they would appear in the middle of a sentence.
  1296. (Capitalize proper names and acronyms that always call for upper case
  1297. letters.)  This is the case convention we use in most GNU manuals'
  1298. indices.
  1299.  
  1300.   If you don't see how to make an entry terse yet clear, make it longer
  1301. and clear--not terse and confusing.  If many of the entries are several
  1302. words long, the index may look better if you use a different convention:
  1303. to capitalize the first word of each entry.  But do not capitalize a
  1304. case-sensitive name such as a C or Lisp function name or a shell
  1305. command; that would be a spelling error.
  1306.  
  1307.   Whichever case convention you use, please use it consistently!
  1308.  
  1309.   Entries in indices other than the concept index are symbol names in
  1310. programming languages, or program names; these names are usually
  1311. case-sensitive, so use upper and lower case as required for them.
  1312.  
  1313.   By default, entries for a concept index are printed in a small roman
  1314. font and entries for the other indices are printed in a small `@code'
  1315. font.  You may change the way part of an entry is printed with the
  1316. usual Texinfo commands, such as `@file' for file names and `@emph' for
  1317. emphasis (*note Marking Text::.).
  1318.  
  1319.   The six indexing commands for predefined indices are:
  1320.  
  1321. `@cindex CONCEPT'
  1322.      Make an entry in the concept index for CONCEPT.
  1323.  
  1324. `@findex FUNCTION'
  1325.      Make an entry in the function index for FUNCTION.
  1326.  
  1327. `@vindex VARIABLE'
  1328.      Make an entry in the variable index for VARIABLE.
  1329.  
  1330. `@kindex KEYSTROKE'
  1331.      Make an entry in the key index for KEYSTROKE.
  1332.  
  1333. `@pindex PROGRAM'
  1334.      Make an entry in the program index for PROGRAM.
  1335.  
  1336. `@tindex DATA TYPE'
  1337.      Make an entry in the data type index for DATA TYPE.
  1338.  
  1339.      *Caution:* Do not use a colon in an index entry.  In Info, a colon
  1340.      separates the menu entry name from the node name.  An extra colon
  1341.      confuses Info.  *Note The Parts of a Menu: Menu Parts, for more
  1342.      information about the structure of a menu entry.
  1343.  
  1344.   If you write several identical index entries in different places in a
  1345. Texinfo file, the index in the printed manual will list all the pages to
  1346. which those entries refer.  However, the index in the Info file will
  1347. list *only* the node that references the *first* of those index
  1348. entries.  Therefore, it is best to write indices in which each entry
  1349. refers to only one place in the Texinfo file.  Fortunately, this
  1350. constraint is a feature rather than a loss since it means that the index
  1351. will be easy to use.  Otherwise, you could create an index that lists
  1352. several pages for one entry and your reader would not know to which page
  1353. to turn.  If you have two identical entries for one topic, change the
  1354. topics slightly, or qualify them to indicate the difference.
  1355.  
  1356.   You are not actually required to use the predefined indices for their
  1357. canonical purposes.  For example, suppose you wish to index some C
  1358. preprocessor macros.  You could put them in the function index along
  1359. with actual functions, just by writing `@findex' commands for them;
  1360. then, when you print the "Function Index" as an unnumbered chapter, you
  1361. could give it the title `Function and Macro Index' and all will be
  1362. consistent for the reader.  Or you could put the macros in with the
  1363. data types by writing `@tindex' commands for them, and give that index
  1364. a suitable title so the reader will understand.  (*Note Printing
  1365. Indices & Menus::.)
  1366.  
  1367. 
  1368. File: texinfo.info,  Node: Combining Indices,  Next: New Indices,  Prev: Indexing Commands,  Up: Indices
  1369.  
  1370. Combining Indices
  1371. =================
  1372.  
  1373.   Sometimes you will want to combine two disparate indices such as
  1374. functions and concepts, perhaps because you have few enough of one of
  1375. them that a separate index for them would look silly.
  1376.  
  1377.   You could put functions into the concept index by writing `@cindex'
  1378. commands for them instead of `@findex' commands, and produce a
  1379. consistent manual by printing the concept index with the title
  1380. `Function and Concept Index' and not printing the `Function Index' at
  1381. all; but this is not a robust procedure.  It works only if your
  1382. document is never included as part of another document that is designed
  1383. to have a separate function index; if your document were to be included
  1384. with such a document, the functions from your document and those from
  1385. the other would not end up together.  Also, to make your function names
  1386. appear in the right font in the concept index, you would need to
  1387. enclose every one of them between the braces of `@code'.
  1388.  
  1389. * Menu:
  1390.  
  1391. * syncodeindex::                How to merge two indices, using `@code'
  1392.                                   font for the merged-from index.
  1393. * synindex::                    How to merge two indices, using the
  1394.                                   default font of the merged-to index.
  1395.  
  1396.