home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / texinfo-3.1-bin.lha / info / texi.info-7 < prev    next >
Encoding:
GNU Info File  |  1994-02-24  |  49.4 KB  |  1,308 lines

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