home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / info / texinfo.i07 < prev    next >
Encoding:
GNU Info File  |  1993-06-12  |  46.9 KB  |  1,158 lines

  1. This is Info file texinfo, produced by Makeinfo-1.47 from the input
  2. file texinfo2.tex.
  3.  
  4.    This file documents Texinfo, a documentation system that uses a
  5. single source file to produce both on-line information and a printed
  6. manual.
  7.  
  8.    Copyright (C) 1988, 1990, 1991, 1992 Free Software 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
  18. this manual under the conditions for verbatim copying, provided that
  19. the 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 Foundation.
  26.  
  27. 
  28. File: texinfo,  Node: Using Ordinary TeX Commands,  Next: set and clear,  Prev: Conditional Commands,  Up: Conditionals
  29.  
  30. Using Ordinary TeX Commands
  31. ===========================
  32.  
  33.    Inside a region delineated by `@iftex' and `@end iftex', you can
  34. embed some PlainTeX commands.  Info will ignore these commands since
  35. they are only in that part of the file which is seen by TeX.  You can
  36. write the TeX commands as you would write them in a normal TeX file,
  37. except that you must replace the `\' used by TeX with an `@'.  For
  38. example, in the `@titlepage' section of a Texinfo file, you can use the
  39. TeX command `@vskip' to format the copyright page.  (The `@titlepage'
  40. command causes Info to ignore the region automatically, as it does with
  41. the `@iftex' command.)
  42.  
  43.    However, many features of PlainTeX will not work, as they are
  44. overridden by features of Texinfo.
  45.  
  46.    You can enter PlainTeX completely, and use `\' in the TeX commands,
  47. by delineating a region with the `@tex' and `@end tex' commands.  (The
  48. `@tex' command also causes Info to ignore the region, like the `@iftex'
  49. command.)
  50.  
  51.    For example, here is a mathematical expression written in PlainTeX:
  52.  
  53.      @tex
  54.      $$ \chi^2 = \sum_{i=1}^N
  55.                \left (y_i - (a + b x_i)
  56.                \over \sigma_i\right)^2 $$
  57.      @end tex
  58.  
  59. The output of this example will appear only in a printed manual.  If
  60. you are reading this in Info, you will not see anything after this
  61. paragraph.
  62.  
  63. 
  64. File: texinfo,  Node: set and clear,  Prev: Using Ordinary TeX Commands,  Up: Conditionals
  65.  
  66. `@set' and `@clear'
  67. ===================
  68.  
  69.    You can direct the Texinfo formatting commands to format or ignore
  70. parts of a Texinfo file with the `@set', `@clear', and related
  71. commands.  For example, you can use this option to create one document
  72. that has two variants, such as a guide book both for tourists and for
  73. natives of an area.  The version for tourists could have extra
  74. information about how to `get around', while the version for natives
  75. would not.
  76.  
  77.    To create such a document, write a Texinfo file that specifies some
  78. text for one version, some text for the other version, and some text
  79. for both versions.  The Texinfo formatting commands will only affect
  80. the version you designate.
  81.  
  82.    Use the `@set FLAG' command to turn on, or "set", a FLAG; a "flag"
  83. can be any word.  The format for the command looks like this:
  84.  
  85.      @set FLAG
  86.  
  87.    When a FLAG is set, the Texinfo formatting commands will format text
  88. between subsequent pairs of `@ifset FLAG' and `@end ifset' commands.
  89.  
  90.    For example, here is an extract from a Texinfo file:
  91.  
  92.      Unless you have good surge suppressors on your
  93.      power line, you should turn off your computer
  94.      before a thunderstorm.
  95.      
  96.      @set enough-time-before-storm
  97.      
  98.      @ifset enough-time-before-storm
  99.      Save all your files, type @kbd{sync} to ensure that
  100.      the operating system copies all data in memory to the hard
  101.      disk, type @kbd{halt}, and then turn off the machine.
  102.      @end ifset
  103.      
  104.      Pull the electric plug from the wall.
  105.  
  106. In the example, the formatting commands will format the text between
  107. `@ifset enough-time-before-storm' and `@end ifset' because the
  108. `enough-time-before-storm' flag is set.
  109.  
  110.    Use the `@clear FLAG' command to turn off, or "clear", a flag. 
  111. Clearing a flag is the opposite of setting a flag.  The command looks
  112. like this:
  113.  
  114.      @clear FLAG
  115.  
  116.    When FLAG is cleared, then the Texinfo formatting commands do *not*
  117. format the text between `@ifset FLAG' and `@end ifset'; that text is
  118. ignored and does not appear in either printed or Info output.
  119.  
  120.    Thus, if you clear the `enough-time-before-storm' flag of the
  121. preceding example with `@clear FLAG', the Texinfo formatting commands
  122. ignore the text between the `@ifset enough-time-before-storm' and `@end
  123. ifset' commands.  In the formatted output, that text does not appear;
  124. you see only the line that says, "Pull the electric plug from the
  125. wall", in both printed and Info output.
  126.  
  127.    If a flag is cleared with an `@clear FLAG' command, then the
  128. formatting commands format text between subsequent pairs of `@ifclear'
  129. and `@end ifclear' commands.  But if the flag is set with `@set FLAG',
  130. then the formatting commands do *not* format text between an `@ifclear'
  131. and an `@end ifclear' command; rather, they ignore that text.  An
  132. `@ifclear' command looks like this:
  133.  
  134.      @ifclear FLAG
  135.  
  136.    In brief, the commands are:
  137.  
  138. `@set FLAG'
  139.      Tell the Texinfo formatting commands that FLAG is set.
  140.  
  141. `@clear FLAG'
  142.      Tell the Texinfo formatting commands that FLAG is cleared.
  143.  
  144. `@ifset FLAG'
  145.      If FLAG is set, tell the Texinfo formatting commands to format the
  146.      text up to the following `@end ifset' command.
  147.  
  148.      If FLAG is cleared, tell the Texinfo formatting commands to ignore
  149.      text up to the following `@end ifset' command.
  150.  
  151. `@ifclear FLAG'
  152.      If FLAG is set, tell the Texinfo formatting commands to ignore the
  153.      text up to the following `@end ifclear' command.
  154.  
  155.      If FLAG is cleared, tell the Texinfo formatting commands to format
  156.      the text up to the following `@end ifclear' command.
  157.  
  158.    Write each of these commands on a line of its own.
  159.  
  160. 
  161. File: texinfo,  Node: Format/Print Hardcopy,  Next: Create an Info File,  Prev: Conditionals,  Up: Top
  162.  
  163. Format and Print Hardcopy
  164. *************************
  165.  
  166.    There are three major shell commands for making a printed manual
  167. from a Texinfo file: one for converting the Texinfo file into a file
  168. that will be printed, a second for sorting indices, and a third for
  169. printing the formatted document.  When you use the shell commands, you
  170. can either work directly in the operating system shell or work within a
  171. shell inside GNU Emacs.
  172.  
  173.    If you are using GNU Emacs, you can use commands provided by Texinfo
  174. mode instead of shell commands.  In addition to the three commands to
  175. format a file, sort the indices, and print the result, Texinfo mode
  176. offers key bindings for commands to recenter the output buffer, show the
  177. print queue, and delete a job from the print queue.
  178.  
  179. * Menu:
  180.  
  181. * Use TeX::                     Use TeX to format for hardcopy.
  182. * Shell Format & Print::        How to format and print a hardcopy manual
  183.                                  with shell commands.
  184. * Within Emacs::                How to format and print from an Emacs shell.
  185. * Texinfo Mode Printing::       How to format and print in Texinfo mode.
  186. * Compile-Command::             How to print using Emacs's compile command.
  187. * Requirements Summary::        TeX formatting requirements summary.
  188. * Preparing for TeX::           What you need to do to use TeX.
  189. * Overfull hboxes::             What are and what to do with overfull hboxes.
  190. * smallbook::                   Printing small format books and manuals.
  191.  
  192. 
  193. File: texinfo,  Node: Use TeX,  Next: Shell Format & Print,  Up: Format/Print Hardcopy
  194.  
  195. Use TeX
  196. =======
  197.  
  198.    The typesetting program called TeX is used for formatting a Texinfo
  199. file.(1) TeX is a very powerful typesetting program and, if used right,
  200. does an exceptionally good job. *Note How to Obtain TeX: Obtaining TeX,
  201. for information on how to obtain TeX.
  202.  
  203.    The `makeinfo', `texinfo-format-region', and `texinfo-format-buffer'
  204. commands read the very same @-commands in the Texinfo file as does TeX,
  205. but process them differently to make an Info file; see *Note Create an
  206. Info File::.
  207.  
  208.    ---------- Footnotes ----------
  209.  
  210.    (1)  If you do not have TeX, you can use the `texi2roff' program for
  211. formatting.
  212.  
  213. 
  214. File: texinfo,  Node: Shell Format & Print,  Next: Within Emacs,  Prev: Use TeX,  Up: Format/Print Hardcopy
  215.  
  216. How to Format and Print Using Shell Commands
  217. ============================================
  218.  
  219.    Format the Texinfo file with the shell command `tex' followed by the
  220. name of the Texinfo file.  This produces a formatted DVI file as well
  221. as several auxiliary files containing indices, cross references, etc. 
  222. The DVI file (for "DeVice Independent" file) can be printed on a wide
  223. variety of printers.
  224.  
  225.    The `tex' formatting command itself does not sort the indices; it
  226. writes an output file of unsorted index data.  This is a misfeature of
  227. TeX.  Hence, to generate a printed index, you first need a sorted index
  228. to work from.  The `texindex' command sorts indices.(1)
  229.  
  230.    The `tex' formatting command outputs unsorted index files under
  231. names that obey a standard convention.  These names are the name of
  232. your main input file to the `tex' formatting command, with everything
  233. after the first period thrown away, and the two letter names of indices
  234. added at the end.  For example, the raw index output files for the
  235. input file `foo.texinfo' would be `foo.cp', `foo.vr', `foo.fn',
  236. `foo.tp', `foo.pg' and `foo.ky'.  Those are exactly the arguments to
  237. give to `texindex'.  Or else, you can use `??' as "wild-cards" and give
  238. the command in this form:
  239.  
  240.      texindex foo.??
  241.  
  242. This command will run `texindex' on all the unsorted index files,
  243. including any that you have defined yourself using `@defindex' or
  244. `@defcodeindex'.  (You may execute `texindex foo.??' even if there are
  245. similarly named files with two letter extensions that are not index
  246. files, such as `foo.el'.  The `texindex' command reports but otherwise
  247. ignores such files.)
  248.  
  249.    For each file specified, `texindex' generates a sorted index file
  250. whose name is made by appending `s' to the input file name.  The
  251. `@printindex' command knows to look for a file of that name. `texindex'
  252. does not alter the raw index output file.
  253.  
  254.    After you have sorted the indices, you need to rerun the `tex'
  255. formatting command on the Texinfo file.  This regenerates a formatted
  256. DVI file with up-to-date index entries.(2)
  257.  
  258.    To summarize, this is a three step process:
  259.  
  260.   1. Run the `tex' formatting command on the Texinfo file.  This
  261.      generates the formatted DVI file as well as the raw index files
  262.      with two letter extensions.
  263.  
  264.   2. Run the shell command `texindex' on the raw index files to sort
  265.      them.  This creates the corresponding sorted index files.
  266.  
  267.   3. Rerun the `tex' formatting command on the Texinfo file.  This
  268.      regenerates a formatted DVI file with the index entries in the
  269.      correct order.  This second run also corrects the page numbers for
  270.      the cross references.  (The tables of contents are always correct.)
  271.  
  272.    You need not run `texindex' each time after you run the `tex'
  273. formatting.  If you do not, on the next run, the `tex' formatting
  274. command will use whatever sorted index files happen to exist from the
  275. previous use of `texindex'.  This is usually OK while you are debugging.
  276.  
  277.    Rather than type the `tex' and `texindex' commands yourself, you can
  278. use `texi2dvi'.  This shell script is designed to simplify the
  279. `tex'--`texindex'--`tex' sequence by figuring out whether index files
  280. and DVI files are up-to-date. It runs `texindex' and `tex' only when
  281. necessary.
  282.  
  283.    The syntax for `texi2dvi' is like this (where `%' is the shell
  284. prompt):
  285.  
  286.      % texi2dvi FILENAME...
  287.  
  288.    Finally, you can print the DVI file with the DVI print command. The
  289. precise command to use depends on the system; `lpr -d' is common.  The
  290. DVI print command may require a file name without any extension or with
  291. a `.dvi' extension.
  292.  
  293.    The following commands, for example, sort the indices, format, and
  294. print the `Bison Manual' (where `%' is the shell prompt):
  295.  
  296.      % tex bison.texinfo
  297.      % texindex bison.??
  298.      % tex bison.texinfo
  299.      % lpr -d bison.dvi
  300.  
  301. (Remember that the shell commands may be different at your site; but
  302. these are commonly used versions.)
  303.  
  304.    ---------- Footnotes ----------
  305.  
  306.    (1)  The source file `texindex.c' comes as part of the standard GNU
  307. distribution and is usually installed when Emacs is installed.
  308.  
  309.    (2)  If you use more than one index and have cross references to an
  310. index other than the first, you must run `tex' *three times* to get
  311. correct output: once to generate raw index data; again (after
  312. `texindex') to output the text of the indices and determine their true
  313. page numbers; and a third time to output correct page numbers in cross
  314. references to them. However, cross references to indices are rare.
  315.  
  316. 
  317. File: texinfo,  Node: Within Emacs,  Next: Texinfo Mode Printing,  Prev: Shell Format & Print,  Up: Format/Print Hardcopy
  318.  
  319. From an Emacs Shell ...
  320. =======================
  321.  
  322.    You can give formatting and printing commands from a shell within GNU
  323. Emacs.  To create a shell within Emacs, type `M-x shell'.  In this
  324. shell, you can format and print the document.  *Note  How to Format and
  325. Print Using Shell Commands: Shell Format & Print, for details.
  326.  
  327.    You can switch to and from the shell buffer while `tex' is running
  328. and do other editing.  If you are formatting a long document on a slow
  329. machine, this can be very convenient.
  330.  
  331.    You can also use `texi2dvi' from an Emacs shell.  For example, here
  332. is how to use `texi2dvi' to format and print the `GCC Internals Manual'
  333. from a shell within Emacs (where `%' is the shell prompt):
  334.  
  335.      % texi2dvi gcc.texinfo
  336.      % lpr -d gcc.dvi
  337.  
  338.    *Note Texinfo Mode Printing::, for more information about formatting
  339. and printing in Texinfo mode.
  340.  
  341. 
  342. File: texinfo,  Node: Texinfo Mode Printing,  Next: Compile-Command,  Prev: Within Emacs,  Up: Format/Print Hardcopy
  343.  
  344. Formatting and Printing in Texinfo Mode
  345. =======================================
  346.  
  347.    Texinfo mode provides several predefined key commands for TeX
  348. formatting and printing.  These include commands for sorting indices,
  349. looking at the printer queue, killing the formatting job, and
  350. recentering the display of the buffer in which the operations occur.
  351.  
  352. `C-c C-t C-r'
  353. `M-x texinfo-tex-region'
  354.      Run TeX on the current region.
  355.  
  356. `C-c C-t C-b'
  357. `M-x texinfo-tex-buffer'
  358.      Run TeX on the current buffer.
  359.  
  360. `C-c C-t C-i'
  361. `M-x texinfo-texindex'
  362.      Sort the indices of a Texinfo file formatted with
  363.      `texinfo-tex-region' or `texinfo-tex-buffer'.
  364.  
  365. `C-c C-t C-p'
  366. `M-x texinfo-tex-print'
  367.      Print a DVI file that was made with `texinfo-tex-region' or
  368.      `texinfo-tex-buffer'.
  369.  
  370. `C-c C-t C-q'
  371. `M-x texinfo-show-tex-print-queue'
  372.      Show the print queue.
  373.  
  374. `C-c C-t C-d'
  375. `M-x texinfo-delete-from-tex-print-queue'
  376.      Delete a job from the print queue; you will be prompted for the job
  377.      number shown by a preceding `C-c C-t C-q' command
  378.      (`texinfo-show-tex-print-queue').
  379.  
  380. `C-c C-t C-k'
  381. `M-x texinfo-kill-tex-job'
  382.      Kill the currently running TeX job started by `texinfo-tex-region'
  383.      or `texinfo-tex-buffer', or any other process running in the
  384.      Texinfo shell buffer.
  385.  
  386. `C-c C-t C-x'
  387. `M-x texinfo-quit-tex-job'
  388.      Quit a TeX formatting job that has stopped because of an error by
  389.      sending an x to it.  When you do this, TeX preserves a record of
  390.      what it did in a `.log' file.
  391.  
  392. `C-c C-t C-l'
  393. `M-x texinfo-recenter-tex-output-buffer'
  394.      Redisplay the shell buffer in which the TeX printing and formatting
  395.      commands are run to show its most recent output.
  396.  
  397.    Thus, the usual sequence of commands for formatting a buffer is as
  398. follows (with comments to the right):
  399.  
  400.      C-c C-t C-b             Run TeX on the buffer.
  401.      C-c C-t C-i             Sort the indices.
  402.      C-c C-t C-b             Rerun TeX to regenerate indices.
  403.      C-c C-t C-p             Print the DVI file.
  404.      C-c C-t C-q             Display the printer queue.
  405.  
  406.    The Texinfo mode TeX formatting commands start a subshell in Emacs
  407. called the `*texinfo-tex-shell*'.  The `texinfo-tex-command',
  408. `texinfo-texindex-command', and `tex-dvi-print-command' commands are
  409. all run in this shell.
  410.  
  411.    You can watch the commands operate in the `*texinfo-tex-shell*'
  412. buffer, and you can switch to and from and use the
  413. `*texinfo-tex-shell*' buffer as you would any other shell buffer.
  414.  
  415.    The formatting and print commands depend on the values of several
  416. variables. The default values are:
  417.  
  418.           Variable                            Default value
  419.      
  420.      texinfo-tex-command                       "tex"
  421.      texinfo-texindex-command                  "texindex"
  422.      texinfo-tex-shell-cd-command              "cd"
  423.      texinfo-tex-dvi-print-command             "lpr -d"
  424.      texinfo-show-tex-queue-command            "lpq"
  425.      texinfo-delete-from-print-queue-command   "lprm"
  426.      texinfo-start-of-header                   "%**start"
  427.      texinfo-end-of-header                     "%**end"
  428.      texinfo-tex-trailer                       "@bye"
  429.  
  430.    The default values of `texinfo-tex-command' and
  431. `texinfo-texindex-command' are set in the `texnfo-tex.el' file.
  432.  
  433.    You can change the values of these variables with the `M-x
  434. edit-options' command (*note Editing Variable Values: ( emacs)Edit
  435. Options.), with the `M-x set-variable' command (*note Examining and
  436. Setting Variables: (emacs)Examining.), or with your `.emacs'
  437. initialization file (*note Init File: (emacs)Init File.).
  438.  
  439. 
  440. File: texinfo,  Node: Compile-Command,  Next: Requirements Summary,  Prev: Texinfo Mode Printing,  Up: Format/Print Hardcopy
  441.  
  442. Using the Local Variables List
  443. ==============================
  444.  
  445.    Yet another way to apply the TeX formatting command to a Texinfo
  446. file is to put that command in a "local variables list" at the end of
  447. the Texinfo file.  You can then specify the TeX formatting command as a
  448. `compile-command' and have Emacs run the TeX formatting command by
  449. typing `M-x compile'.  This creates a special shell called the
  450. `*compilation buffer*' in which Emacs runs the compile command.  For
  451. example, at the end of the `gdb.texinfo' file, after the `@bye', you
  452. would put the following:
  453.  
  454.      @c Local Variables:
  455.      @c compile-command: "tex gdb.texinfo"
  456.      @c End:
  457.  
  458. This technique is most often used by programmers who also compile
  459. programs this way; see *Note Compilation: (emacs)Compilation.
  460.  
  461. 
  462. File: texinfo,  Node: Requirements Summary,  Next: Preparing for TeX,  Prev: Compile-Command,  Up: Format/Print Hardcopy
  463.  
  464. TeX Formatting Requirements Summary
  465. ===================================
  466.  
  467.    Every Texinfo file that is to be input to TeX must begin with a
  468. `\input' command and contain an `@settitle' command:
  469.  
  470.      \input texinfo
  471.      @settitle NAME-OF-MANUAL
  472.  
  473. The first command instructs TeX to load the macros it needs to process
  474. a Texinfo file and the second command specifies the title of printed
  475. manual.
  476.  
  477.    Every Texinfo file must end with a line that terminates TeX
  478. processing and forces out unfinished pages:
  479.  
  480.      @bye
  481.  
  482.    Strictly speaking, these three lines are all a Texinfo file needs for
  483. TeX, besides the body.  (The `@setfilename' line is the only line that
  484. a Texinfo file needs for Info formatting.)
  485.  
  486.    Usually, the file's first line contains an `@c -*-texinfo-*-'
  487. comment that causes Emacs to switch to Texinfo mode when you edit the
  488. file.  In addition, the beginning usually includes an `@setfilename'
  489. for Info formatting, an `@setchapternewpage' command, a title page, a
  490. copyright page, and permissions.  Besides an `@bye', the end of a file
  491. usually includes indices and a table of contents.
  492.  
  493. For more information, see
  494. *Note `@setchapternewpage': setchapternewpage,
  495. *Note Page Headings: Headings,
  496. *Note Titlepage & Copyright Page::,
  497. *Note Printing Indices & Menus::, and
  498. *Note Contents::.
  499.  
  500. 
  501. File: texinfo,  Node: Preparing for TeX,  Next: Overfull hboxes,  Prev: Requirements Summary,  Up: Format/Print Hardcopy
  502.  
  503. Preparing to Use TeX
  504. ====================
  505.  
  506. TeX needs to know where to find the `texinfo.tex' file that you have
  507. told it to input with the `\input texinfo' command at the beginning of
  508. the first line.  The `texinfo.tex' file tells TeX how to handle
  509. @-commands.  (`texinfo.tex' is included in the standard GNU
  510. distributions.)
  511.  
  512.    Usually, the `texinfo.tex' file is put in the default directory that
  513. contains TeX macros (the `/usr/lib/tex/macros' directory) when GNU
  514. Emacs or other GNU software is installed. In this case, TeX will find
  515. the file and you do not need to do anything special. Alternatively, you
  516. can put `texinfo.tex' in the directory in which the Texinfo source file
  517. is located, and TeX will find it there.
  518.  
  519.    However, you may want to specify the location of the `\input' file
  520. yourself.  One way to do this is to write the complete path for the file
  521. after the `\input' command.  Another way is to set the `TEXINPUTS'
  522. environment variable in your `.cshrc' or `.profile' file.  The
  523. `TEXINPUTS' environment variable will tell TeX where to find the
  524. `texinfo.tex' file and any other file that you might want TeX to use.
  525.  
  526.    Whether you use a `.cshrc' or `.profile' file depends on whether you
  527. use `csh', `sh', or `bash' for your shell command interpreter.  When
  528. you use `csh', it looks to the `.cshrc' file for initialization
  529. information, and when you use `sh' or `bash', it looks to the
  530. `.profile' file.
  531.  
  532.    In a `.cshrc' file, you could use the following `csh' command
  533. sequence:
  534.  
  535.      setenv TEXINPUTS .:/usr/me/mylib:/usr/lib/tex/macros
  536.  
  537.    In a `.profile' file, you could use the following `sh' command
  538. sequence:
  539.  
  540.      TEXINPUTS=.:/usr/me/mylib:/usr/lib/tex/macros
  541.      export TEXINPUTS
  542.  
  543. This would cause TeX to look for `\input' file first in the current
  544. directory, indicated by the `.', then in a hypothetical user's
  545. `me/mylib' directory, and finally in the system library.
  546.  
  547. 
  548. File: texinfo,  Node: Overfull hboxes,  Next: smallbook,  Prev: Preparing for TeX,  Up: Format/Print Hardcopy
  549.  
  550. Overfull "hboxes"
  551. =================
  552.  
  553.    TeX is sometimes unable to typeset a line without extending it into
  554. the right margin.  This can occur when TeX comes upon what it
  555. interprets as a long word that it cannot hyphenate, such as an
  556. electronic mail network address or a very long title.  When this
  557. happens, TeX prints an error message like this:
  558.  
  559.      Overfull \hbox (20.76302pt too wide)
  560.  
  561. (In TeX, lines are in "horizontal boxes", hence the term, "hbox". The
  562. backslash, `\', is the TeX equivalent of `@'.)
  563.  
  564.    TeX also provides the line number in the Texinfo source file and the
  565. text of the offending line, which is marked at all the places that TeX
  566. knows how to hyphenate words. *Note Catching Errors with TeX
  567. Formatting: Debugging with TeX, for more information about typesetting
  568. errors.
  569.  
  570.    If the Texinfo file has an overfull hbox, you can rewrite the
  571. sentence so the overfull hbox does not occur, or you can decide to
  572. leave it.  A small excursion into the right margin often does not
  573. matter and may not even be noticeable.
  574.  
  575.    However, if you do leave an overfull hbox, unless told otherwise,
  576. TeX will print a large, ugly, black rectangle beside the line. This is
  577. so you will notice the location of the problem if you are correcting a
  578. draft.  To prevent such a monstrosity from marring your final printout,
  579. put the following in the beginning of the Texinfo file on a line of its
  580. own, before the `@titlepage' command:
  581.  
  582.      @finalout
  583.  
  584. 
  585. File: texinfo,  Node: smallbook,  Prev: Overfull hboxes,  Up: Format/Print Hardcopy
  586.  
  587. Printing "Small" Books
  588. ======================
  589.  
  590.    By default, TeX typesets pages for printing in an 8.5 by 11 inch
  591. format.  However, you can direct TeX to typeset a document in a 7 by
  592. 9.25 inch format that is suitable for bound books by inserting the
  593. following command on a line by itself at the beginning of the Texinfo
  594. file, before the title page:
  595.  
  596.      @smallbook
  597.  
  598. (Since regular sized books are often about 7 by 9.25 inches, this
  599. command might better have been called the `@regularbooksize' command,
  600. but it came to be called the `@smallbook' command by comparison to the
  601. 8.5 by 11 inch format.)
  602.  
  603.    If you write the `@smallbook' command between the start-of-header
  604. and end-of-header lines, the Texinfo mode TeX region formatting
  605. command, `texinfo-tex-region', will format the region in "small" book
  606. size (*note Start of Header::.).
  607.  
  608.    The Free Software Foundation distributes printed copies of `The GNU
  609. Emacs Manual' and other manuals in the "small" book size. *Note
  610. `@smallexample' and `@smalllisp': smallexample & smalllisp, for
  611. information about commands that make it easier to produce examples for
  612. a smaller manual.
  613.  
  614. 
  615. File: texinfo,  Node: Create an Info File,  Next: Install an Info File,  Prev: Format/Print Hardcopy,  Up: Top
  616.  
  617. Creating an Info File
  618. *********************
  619.  
  620.    `makeinfo' is a utility that converts a Texinfo file into an Info
  621. file; `texinfo-format-region' and `texinfo-format-buffer' are GNU Emacs
  622. functions that do the same.
  623.  
  624.    A Texinfo file must possess an `@setfilename' line near its
  625. beginning, otherwise the Info formatting commands will fail.
  626.  
  627.    For information on installing the Info file in the Info system, see
  628. *Note Install an Info File::.
  629.  
  630. * Menu:
  631.  
  632. * makeinfo advantages::         `makeinfo' provides better error checking.
  633. * Running makeinfo::            How to run `makeinfo' from a shell.
  634. * makeinfo options::            Specify fill-column and other options.
  635. * Pointer Validation::          How to check that pointers point somewhere.
  636. * makeinfo in Emacs::           How to run `makeinfo' from Emacs.
  637. * texinfo-format commands::     Two Info formatting commands written
  638.                                   in Emacs Lisp are an alternative
  639.                                   to `makeinfo'.
  640. * Tag and Split Files::         How tagged and split files help Info
  641.                                   to run better.
  642.  
  643. 
  644. File: texinfo,  Node: makeinfo advantages,  Next: Running makeinfo,  Up: Create an Info File
  645.  
  646. `makeinfo' Preferred
  647. ====================
  648.  
  649.    The `makeinfo' utility creates an Info file from a Texinfo source
  650. file more quickly than either of the Emacs formatting commands and
  651. provides better error messages.  We recommend it.  `makeinfo' is a C
  652. program that is independent of Emacs.  You do not need to run Emacs to
  653. use `makeinfo', which means you can use `makeinfo' on machines that are
  654. too small to run Emacs. You can run `makeinfo' in any one of three
  655. ways: from an operating system shell, from a shell inside Emacs, or by
  656. typing a key command in Texinfo mode in Emacs.
  657.  
  658.    The `texinfo-format-region' and the `texinfo-format-buffer' commands
  659. are useful if you cannot run `makeinfo'.  Also, in some circumstances,
  660. they format short regions or buffers more quickly than `makeinfo'.
  661.  
  662. 
  663. File: texinfo,  Node: Running makeinfo,  Next: makeinfo options,  Prev: makeinfo advantages,  Up: Create an Info File
  664.  
  665. Running `makeinfo' from a Shell
  666. ===============================
  667.  
  668.    To create an Info file from a Texinfo file, type `makeinfo' followed
  669. by the name of the Texinfo file.  Thus, to create the Info file for
  670. Bison, type the following at the shell prompt (where `%' is the prompt):
  671.  
  672.      % makeinfo bison.texinfo
  673.  
  674.    (You can run a shell inside Emacs by typing `M-x shell'.)
  675.  
  676.    Sometimes you will want to specify options.  For example, if you wish
  677. to discover which version of `makeinfo' you are using, type:
  678.  
  679.      % makeinfo --version
  680.  
  681.    *Note makeinfo options::, for more information.
  682.  
  683. 
  684. File: texinfo,  Node: makeinfo options,  Next: Pointer Validation,  Prev: Running makeinfo,  Up: Create an Info File
  685.  
  686. Options for `makeinfo'
  687. ======================
  688.  
  689.    The `makeinfo' command takes a number of options.  Most often,
  690. options are used to set the value of the fill column and specify the
  691. footnote style.  Each command line option is a word preceded by `--'(1)
  692. or a letter preceded by `-'.  You can use abbreviations for the option
  693. names as long as they are unique.
  694.  
  695.    For example, you could use the following command to create an Info
  696. file for `bison.texinfo' in which each line is filled to only 68
  697. columns (where `%' is the prompt):
  698.  
  699.      % makeinfo --fill-column=68 bison.texinfo
  700.  
  701.    You can write two or more options in sequence, like this:
  702.  
  703.      % makeinfo --no-split --fill-column=70 ...
  704.  
  705. This would keep the Info file together as one possibly very long file
  706. and would also set the fill column to 70.
  707.  
  708.    The options are:
  709.  
  710. `-D VAR'
  711.      Cause VAR to be defined.  This is equivalent to `@set VAR' in the
  712.      Texinfo file.
  713.  
  714. `--error-limit=LIMIT'
  715.      Set the maximum number of errors that `makeinfo' will report
  716.      before exiting (on the assumption that continuing would be
  717.      useless). The default number of errors that can be reported before
  718.      `makeinfo' gives up is 100.
  719.  
  720. `--fill-column=WIDTH'
  721.      Specify the maximum number of columns in a line; this is the
  722.      right-hand edge of a line.  Paragraphs that are filled will be
  723.      filled to this width.  (Filling is the process of breaking up and
  724.      connecting lines so that lines are the same length as or shorter
  725.      than the number specified as the fill column.  Lines are broken
  726.      between words.)
  727.  
  728. `--footnote-style=STYLE'
  729.      Set the footnote style to STYLE, either `end' for the end node
  730.      style or `separate' for the separate node style.  The value set by
  731.      this option overrides the value set in a Texinfo file by an
  732.      `@footnotestyle' command.  When the footnote style is `separate',
  733.      `makeinfo' makes a new node containing the footnotes found in the
  734.      current node.  When the footnote style is `end', `makeinfo' places
  735.      the footnote references at the end of the current node.
  736.  
  737. `-I DIR'
  738.      Add `dir' to the directory search list for finding files that are
  739.      included using the `@include' command.  By default, `makeinfo'
  740.      searches only the current directory.
  741.  
  742. `--no-headers'
  743.      Do not include menus or node lines in the output.  This results in
  744.      an ASCII file that you cannot read in Info since it does not
  745.      contain the requisite nodes or menus; but you can print such a
  746.      file in a single, typewriter-like font and produce acceptable
  747.      output.
  748.  
  749. `--no-split'
  750.      Suppress the splitting stage of `makeinfo'.  Normally, large
  751.      output files (where the size is greater than 70k bytes) are split
  752.      into smaller subfiles, each one approximately 50k bytes.  If you
  753.      specify `--no-split', `makeinfo' will not split up the output file.
  754.  
  755. `--no-pointer-validate'
  756. `--no-validate'
  757.      Suppress the pointer-validation phase of `makeinfo'.  Normally,
  758.      after a Texinfo file is processed, some consistency checks are
  759.      made to ensure that cross references can be resolved, etc. *Note
  760.      Pointer Validation::.
  761.  
  762. `--no-warn'
  763.      Suppress the output of warning messages.  This does *not* suppress
  764.      the output of error messages, only warnings.  You might want this
  765.      if the file you are creating has examples of Texinfo cross
  766.      references within it, and the nodes that are referenced do not
  767.      actually exist.
  768.  
  769. `--output=FILE'
  770. `-o FILE'
  771.      Specify that the output should be directed to FILE and not to the
  772.      file name specified in the `@setfilename' command found in the
  773.      texinfo source.  FILE can be the special token `-', which specifies
  774.      standard output.
  775.  
  776. `--paragraph-indent=INDENT'
  777.      Set the paragraph indentation style to INDENT.  The value set by
  778.      this option overrides the value set in a Texinfo file by an
  779.      `@paragraphindent' command.  The value of INDENT is interpreted as
  780.      follows:
  781.  
  782.         * If the value of INDENT is `asis', do not change the existing
  783.           indentation at the starts of paragraphs.
  784.  
  785.         * If the value of INDENT is zero, delete any existing
  786.           indentation.
  787.  
  788.         * If the value of INDENT is greater than zero, indent each
  789.           paragraph by that number of spaces.
  790.  
  791. `--reference-limit=LIMIT'
  792.      Set the value of the number of references to a node that
  793.      `makeinfo' will make without reporting a warning.  If a node has
  794.      more than this number of references in it, `makeinfo' will make the
  795.      references but also report a warning.
  796.  
  797. `-U VAR'
  798.      Cause VAR to be undefined.  This is equivalent to `@clear VAR' in
  799.      the Texinfo file.
  800.  
  801. `--verbose'
  802.      Cause `makeinfo' to display messages saying what it is doing.
  803.      Normally, `makeinfo' only outputs messages if there are errors or
  804.      warnings.
  805.  
  806. `--version'
  807.      Report the version number of this copy of `makeinfo'.
  808.  
  809.    ---------- Footnotes ----------
  810.  
  811.    (1)  `--' has replaced `+', the old introductory character, to
  812. maintain POSIX.2 compatibility without losing long-named options.
  813.  
  814. 
  815. File: texinfo,  Node: Pointer Validation,  Next: makeinfo in Emacs,  Prev: makeinfo options,  Up: Create an Info File
  816.  
  817. Pointer Validation
  818. ==================
  819.  
  820.    If you do not suppress pointer-validation (by using the
  821. `--no-pointer-validation' option), `makeinfo' will check the validity
  822. of the final Info file.  Mostly, this means ensuring that nodes you
  823. have referenced really exist.  Here is a complete list of what is
  824. checked:
  825.  
  826.   1. If a `Next', `Previous', or `Up' node reference is a reference to a
  827.      node in the current file and is not an external reference such as
  828.      to `(dir)', then the referenced node must exist.
  829.  
  830.   2. In every node, if the `Previous' node is different from the `Up'
  831.      node, then the `Previous' node must also be pointed to by a `Next'
  832.      node.
  833.  
  834.   3. Every node except the `Top' node must have an `Up' pointer.
  835.  
  836.   4. The node referenced by an `Up' pointer must contain a reference to
  837.      the current node in some manner other than through a `Next'
  838.      reference. This includes menu entries and cross references.
  839.  
  840.   5. If the `Next' reference of a node is not the same as the `Next'
  841.      reference of the `Up' reference, then the node referenced by the
  842.      `Next' pointer must have a `Previous' pointer that points back to
  843.      the current node. This rule allows the last node in a section to
  844.      point to the first node of the next chapter.
  845.  
  846. 
  847. File: texinfo,  Node: makeinfo in Emacs,  Next: texinfo-format commands,  Prev: Pointer Validation,  Up: Create an Info File
  848.  
  849. Running `makeinfo' inside Emacs
  850. ===============================
  851.  
  852.    You can run `makeinfo' in GNU Emacs Texinfo mode by using either the
  853. `makeinfo-region' or the `makeinfo-buffer' commands.  In Texinfo mode,
  854. the commands are bound to `C-c C-m C-r' and `C-c C-m C-b' by default.
  855.  
  856. `C-c C-m C-r'
  857. `M-x makeinfo-region'
  858.      Format the current region for Info.
  859.  
  860. `C-c C-m C-b'
  861. `M-x makeinfo-buffer'
  862.      Format the current buffer for Info.
  863.  
  864.    When you invoke either `makeinfo-region' or `makeinfo-buffer', Emacs
  865. prompts for a file name, offering the name of the visited file as the
  866. default.  You can edit the default file name in the minibuffer if you
  867. wish, before typing RET to start the `makeinfo' process.
  868.  
  869.    The Emacs `makeinfo-region' and `makeinfo-buffer' commands run the
  870. `makeinfo' program in a temporary shell buffer.  If `makeinfo' finds
  871. any errors, Emacs displays the error messages in the temporary buffer.
  872.  
  873.    You can parse the error messages by typing `C-x `' (`next-error'). 
  874. This causes Emacs to go to and position the cursor on the line in the
  875. Texinfo source that `makeinfo' thinks caused the error.  *Note Running
  876. `make' or Compilers Generally: (emacs)Compilation, for more information
  877. about using the `next-error' command.
  878.  
  879.    In addition, you can kill the shell in which the `makeinfo' command
  880. is running or make the shell buffer display its most recent output.
  881.  
  882. `C-c C-m C-k'
  883. `M-x makeinfo-kill-job'
  884.      Kill the current running `makeinfo' job created by
  885.      `makeinfo-region' or `makeinfo-buffer'.
  886.  
  887. `C-c C-m C-l'
  888. `M-x makeinfo-recenter-output-buffer'
  889.      Redisplay the `makeinfo' shell buffer to display its most recent
  890.      output.
  891.  
  892. (Note that the parallel commands for killing and recentering a TeX job
  893. are `C-c C-t C-k' and `C-c C-t C-l'.  *Note Texinfo Mode Printing::.)
  894.  
  895.    You can specify options for `makeinfo' by setting the
  896. `makeinfo-options' variable with either the `M-x edit-options' or the
  897. `M-x set-variable' command, or by setting the variable in your `.emacs'
  898. initialization file.
  899.  
  900.    For example, you could write the following in your `.emacs' file:
  901.  
  902.      (setq makeinfo-options
  903.            "--paragraph-indent=0 --no-split
  904.             --fill-column=70 --verbose")
  905.  
  906. For more information, see
  907. *Note Editing Variable Values: (emacs)Edit Options,
  908. *Note Examining and Setting Variables: (emacs)Examining,
  909. *Note Init File: (emacs)Init File, and
  910. *Note Options for `makeinfo': makeinfo options.
  911.  
  912. 
  913. File: texinfo,  Node: texinfo-format commands,  Next: Tag and Split Files,  Prev: makeinfo in Emacs,  Up: Create an Info File
  914.  
  915. The `texinfo-format...' Commands
  916. ================================
  917.  
  918. In GNU Emacs in Texinfo mode, you can format part or all of a Texinfo
  919. file with the `texinfo-format-region' command.  This formats the
  920. current region and displays the formatted text in a temporary buffer
  921. called `*Info Region*'.
  922.  
  923.    Similarly, you can format a buffer with the `texinfo-format-buffer'
  924. command.  This command creates a new buffer and generates the Info file
  925. in it.  Typing `C-x C-s' will save the Info file under the name
  926. specified by the `@setfilename' line which must be near the beginning
  927. of the Texinfo file.
  928.  
  929. `C-c C-e C-r'
  930. ``texinfo-format-region''
  931.      Format the current region for Info.
  932.  
  933. `C-c C-e C-b'
  934. ``texinfo-format-buffer''
  935.      Format the current buffer for Info.
  936.  
  937.    The `texinfo-format-region' and `texinfo-format-buffer' commands
  938. provide you with some error checking, and other functions can provide
  939. you with further help in finding formatting errors.  These procedures
  940. are described in an appendix; see *Note Catching Mistakes::. However,
  941. the `makeinfo' program is often faster and provides better error
  942. checking (*note makeinfo in Emacs::.).
  943.  
  944. 
  945. File: texinfo,  Node: Tag and Split Files,  Prev: texinfo-format commands,  Up: Create an Info File
  946.  
  947. Tag Files and Split Files
  948. =========================
  949.  
  950.    If a Texinfo file has more than 30,000 bytes,
  951. `texinfo-format-buffer' automatically creates a tag table for its Info
  952. file;  `makeinfo' always creates a tag table.  With a "tag table", Info
  953. can jump to new nodes more quickly than it can otherwise.
  954.  
  955.    In addition, if the Texinfo file contains more than about 70,000
  956. bytes, `texinfo-format-buffer' and `makeinfo' split the large Info file
  957. into shorter "indirect" subfiles of about 50,000 bytes each.  Big files
  958. are split into smaller files so that Emacs does not need to make a
  959. large buffer to hold the whole of a large Info file; instead, Emacs
  960. allocates just enough memory for the small, split off file that is
  961. needed at the time.  This way, Emacs avoids wasting memory when you run
  962. Info.  (Before splitting was implemented, Info files were always kept
  963. short and "include files" were designed as a way to create a single,
  964. large printed manual out of the smaller Info files.  *Note Include
  965. Files::, for more information.  Include files are still used for very
  966. large documents, such as `The Emacs Lisp Reference Manual', in which
  967. each chapter is a separate file.)
  968.  
  969.    When a file is split, Info itself makes use of a shortened version of
  970. the original file that contains just the tag table and references to
  971. the files that were split off.  The split off files are called
  972. "indirect" files.
  973.  
  974.    The split off files have names that are created by appending `-1',
  975. `-2', `-3' and so on to the file name specified by the `@setfilename'
  976. command.  The shortened version of the original file continues to have
  977. the name specified by `@setfilename'.
  978.  
  979.    At one stage in writing this document, for example, the Info file
  980. was saved as `test-texinfo' and that file looked like this:
  981.  
  982.      Info file: test-texinfo,    -*-Text-*-
  983.      produced by texinfo-format-buffer
  984.      from file: new-texinfo-manual.texinfo
  985.      
  986.      ^_
  987.      Indirect:
  988.      test-texinfo-1: 102
  989.      test-texinfo-2: 50422
  990.      test-texinfo-3: 101300
  991.      ^_^L
  992.      Tag table:
  993.      (Indirect)
  994.      Node: overview^?104
  995.      Node: info file^?1271
  996.      Node: printed manual^?4853
  997.      Node: conventions^?6855
  998.      ...
  999.  
  1000. (But `test-texinfo' had far more nodes than are shown here.)  Each of
  1001. the split off, indirect files, `test-texinfo-1', `test-texinfo-2', and
  1002. `test-texinfo-3', is listed in this file after the line that says
  1003. `Indirect:'.  The tag table is listed after the line that says `Tag
  1004. table:'.
  1005.  
  1006.    In the list of indirect files, the number following the file name
  1007. records the cumulative number of bytes in the preceding indirect files,
  1008. not counting the file list itself, the tag table, or the permissions
  1009. text in each file.  In the tag table, the number following the node name
  1010. records the location of the beginning of the node, in bytes from the
  1011. beginning.
  1012.  
  1013.    If you are using `texinfo-format-buffer' to create Info files, you
  1014. may want to run the `Info-validate' command.  (The `makeinfo' command
  1015. does such a good job on its own, you do not need `Info-validate'.) 
  1016. However, you cannot run the `M-x Info-validate' node-checking command
  1017. on indirect files.  For information on how to prevent files from being
  1018. split and how to validate the structure of the nodes, see *Note Using
  1019. Info-validate::.
  1020.  
  1021. 
  1022. File: texinfo,  Node: Install an Info File,  Next: Command List,  Prev: Create an Info File,  Up: Top
  1023.  
  1024. Installing an Info File
  1025. ***********************
  1026.  
  1027.    Info files are usually kept in the `.../emacs/info' directory.  (You
  1028. can find the location of this directory within Emacs by typing `C-h i'
  1029. to enter Info and then typing `C-x C-f' to see the full pathname to the
  1030. `info' directory.)
  1031.  
  1032. * Menu:
  1033.  
  1034. * Directory file::              The top level menu for all Info files.
  1035. * New Info File::               Listing a new info file.
  1036. * Other Info Directories::      How to specify Info files that are
  1037.                                   located in other directories.
  1038.  
  1039. 
  1040. File: texinfo,  Node: Directory file,  Next: New Info File,  Up: Install an Info File
  1041.  
  1042. The `dir' File
  1043. ==============
  1044.  
  1045.    For Info to work, the `info' directory must contain a file that
  1046. serves as a top level directory for the Info system.  By convention,
  1047. this file is called `dir'.  The `dir' file is itself an Info file.  It
  1048. contains the top level menu for all the Info files in the system.  The
  1049. menu looks like this:
  1050.  
  1051.      * Menu:
  1052.      
  1053.      * Info:    (info).     Documentation browsing system.
  1054.      * Emacs:   (emacs).    The extensible, self-documenting
  1055.                             text editor.
  1056.      * Texinfo: (texinfo).  With one source file, make
  1057.                             either a printed manual using
  1058.                             TeX or an Info file.
  1059.      ...
  1060.  
  1061. Each of these menu entries points to the `Top' node of the Info file
  1062. that is named in parentheses.  (The menu entry does not need to specify
  1063. the `Top' node, since Info goes to the `Top' node if no node name is
  1064. mentioned.  *Note Nodes in Other Info Files: Other Info Files.)
  1065.  
  1066.    Thus, the `Info' entry points to the `Top' node of the `info' file
  1067. and the `Emacs' entry points to the `Top' node of the `emacs' file.
  1068.  
  1069.    In each of the Info files, the `Up' pointer of the `Top' node refers
  1070. back to the `dir' file.  For example, the line for the `Top' node of
  1071. the Emacs manual looks like this in Info:
  1072.  
  1073.      File: emacs  Node: Top, Up: (DIR), Next: Distrib
  1074.  
  1075. (Note that in this case, the file name is written in upper case
  1076. letters--it can be written in either upper or lower case.  Info has a
  1077. feature that it will change the case of the file name to lower case if
  1078. it cannot find the name as written.)
  1079.  
  1080. 
  1081. File: texinfo,  Node: New Info File,  Next: Other Info Directories,  Prev: Directory file,  Up: Install an Info File
  1082.  
  1083. Listing a New Info File
  1084. =======================
  1085.  
  1086.    To add a new Info file to your system, write a new menu entry to the
  1087. menu in the `dir' file by editing the `dir' file by hand.  Also, put the
  1088. new Info file in the `.../emacs/info' directory.  For example, if you
  1089. were adding documentation for GDB, you would make the following new
  1090. entry:
  1091.  
  1092.      * GDB: (gdb).           The source-level C debugger.
  1093.  
  1094. The first part of the menu entry is the menu entry name; it is followed
  1095. by a colon.  The second part is the name of the Info file, in
  1096. parentheses; it is followed by a period.  The third part of the entry
  1097. is the description of the item.
  1098.  
  1099.    Conventionally, the name of an Info file has a `.info' extension.
  1100. Thus, you might list the name of the file like this:
  1101.  
  1102.      * GDB: (gdb.info).           The source-level C debugger.
  1103.  
  1104. However, Info will look for a file with a `.info' extension if it does
  1105. not find the file under the name given in the menu.  This means that in
  1106. a menu  you can refer to the file `gdb.info' as `gdb', as shown in the
  1107. first example.  This looks better.
  1108.  
  1109. 
  1110. File: texinfo,  Node: Other Info Directories,  Prev: New Info File,  Up: Install an Info File
  1111.  
  1112. Info Files in Other Directories
  1113. ===============================
  1114.  
  1115.    If an Info file is not in the `info' directory, there are two ways
  1116. to specify its location:
  1117.  
  1118.    * Write the pathname as the menu's second part, or;
  1119.  
  1120.    * Specify the `info' directory name in an environment variable in
  1121.      your `.profile' or `.cshrc' initialization file.  (Only you and
  1122.      others with the same environment variable will be able to find Info
  1123.      files whose location is specified this way.)
  1124.  
  1125.    For example, to reach a test file in the `~bob/manuals' directory,
  1126. you could add an entry like this to the menu in the `dir' file:
  1127.  
  1128.      * Test: (~bob/manuals/info-test).  Bob's own test file.
  1129.  
  1130. In this case, the absolute file name of the `info-test' file is written
  1131. as the second part of the menu entry.
  1132.  
  1133.    Alternatively, you may set the `INFOPATH' environment variable in
  1134. your `.cshrc' or `.profile' file.  The `INFOPATH' environment variable
  1135. will tell Info where to look.
  1136.  
  1137.    If you use `sh' or `bash' for your shell command interpreter, you
  1138. must set the `INFOPATH' environment variable in the `.profile'
  1139. initialization file; but if you use `csh', you must set the variable in
  1140. the `.cshrc' initialization file.  The two files require slightly
  1141. different command formats.
  1142.  
  1143.    * In a `.cshrc' file, you could set the `INFOPATH' variable as
  1144.      follows:
  1145.  
  1146.           setenv INFOPATH .:~bob/manuals:/usr/local/emacs/info
  1147.  
  1148.    * In a `.profile' file, you would achieve the same effect by writing:
  1149.  
  1150.           INFOPATH=.:~bob/manuals:/usr/local/emacs/info
  1151.           export INFOPATH
  1152.  
  1153. Either form would cause Info to look first in the current directory,
  1154. indicated by the `.', then in the `~bob/manuals' directory, and finally
  1155. in the `/usr/local/emacs/info' directory (which is the usual location
  1156. for the standard Info directory).
  1157.  
  1158.