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

  1. This is Info file makeinfo.info, produced by Makeinfo-1.64 from the
  2. input file makeinfo.texi.
  3.  
  4. This file is an extract from the `Texinfo' manual.
  5. It documents `makeinfo', a program that converts Texinfo files into
  6. Info files or in AmigaGuide® hypertext files.
  7.  
  8. Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
  9.  
  10. Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14. Permission is granted to copy and distribute modified versions of this
  15. manual under the conditions for verbatim copying, provided that the
  16. entire resulting derived work is distributed under the terms of a
  17. permission notice identical to this one.
  18.  
  19. Permission is granted to copy and distribute translations of this manual
  20. into another language, under the above conditions for modified versions,
  21. except that this permission notice may be stated in a translation
  22. approved by the Free Software Foundation.
  23.  
  24. 
  25. File: makeinfo.info,  Node: Top,  Prev: (dir),  Up: (dir)
  26.  
  27. What is `makeinfo'?
  28. *******************
  29.  
  30. `makeinfo' is a program for converting "TeXinfo" files into "Info"
  31. files or "AmigaGuide®" hypertext files.  TeXinfo is a documentation
  32. system that uses a single source file to produce both on-line
  33. information and printed output.
  34.  
  35. You can read the on-line information using Info; type `info' to learn
  36. about Info.  *Note Texinfo: (texinfo)Top, to learn about the TeXinfo
  37. documentation system.
  38.  
  39. * Menu:
  40.  
  41. * Formatting Control::          Controlling the width of lines, paragraph
  42.                                 indentation, and other similar formatting.
  43.  
  44. * Options::                     Command line options which control the
  45.                                 behaviour of Makeinfo.
  46.  
  47. * Pointer Validation::          How Makeinfo can help you to track node
  48.                                 references through complex Texinfo files.
  49.  
  50. * The Macro Facility::          Makeinfo allows the use of "macros".
  51.  
  52. * Index::                       Index of Concepts.
  53.  
  54. 
  55. File: makeinfo.info,  Node: Formatting Control,  Next: Options,  Prev: Top,  Up: Top
  56.  
  57. Controlling Paragraph Formats
  58. =============================
  59.  
  60. Without any special options, `makeinfo' "fills" the paragraphs that it
  61. outputs to an Info file.  Filling is the process of breaking and
  62. connecting lines so that lines are the same length as or shorter than
  63. the number specified as the fill column.  Lines are broken between
  64. words.  With `makeinfo', you can control:
  65.  
  66.    * The width of each paragraph (the "fill-column").
  67.  
  68.    * The amount of indentation that the first line of each paragraph
  69.      receives (the "paragraph-indentation").
  70.  
  71. 
  72. File: makeinfo.info,  Node: Options,  Next: Pointer Validation,  Prev: Formatting Control,  Up: Top
  73.  
  74. Command Line Options
  75. ====================
  76.  
  77. The following command line options are available for `makeinfo'.
  78.  
  79. `-D VAR'
  80.      Cause VAR to be defined.  This is equivalent to `@set VAR' in the
  81.      Texinfo file.
  82.  
  83. `--error-limit LIMIT'
  84.      Set the maximum number of errors that `makeinfo' will report
  85.      before exiting (on the assumption that continuing would be
  86.      useless).  The default number of errors that can be reported before
  87.      `makeinfo' gives up is 100.
  88.  
  89. `--fill-column WIDTH'
  90.      Specify the maximum number of columns in a line; this is the
  91.      right-hand edge of a line.  Paragraphs that are filled will be
  92.      filled to this width.  The default value for `fill-column' is 72.
  93.  
  94. `--footnote-style STYLE'
  95.      Set the footnote style to STYLE, either `end' for the end node
  96.      style or `separate' for the separate node style.  The value set by
  97.      this option overrides the value set in a Texinfo file by an
  98.      `@footnotestyle' command.  When the footnote style is `separate',
  99.      `makeinfo' makes a new node containing the footnotes found in the
  100.      current node.  When the footnote style is `end', `makeinfo' places
  101.      the footnote references at the end of the current node.
  102.  
  103. `-I DIR'
  104.      Add `dir' to the directory search list for finding files that are
  105.      included using the `@include' command.  By default, `makeinfo'
  106.      searches only the current directory.
  107.  
  108. `--no-headers'
  109.      Do not include menus or node lines in the output.  This results in
  110.      an ASCII file that you cannot read in Info since it does not
  111.      contain the requisite nodes or menus; but you can print such a
  112.      file in a single, typewriter-like font and produce acceptable
  113.      output.
  114.  
  115. `--no-split'
  116.      Suppress the splitting stage of `makeinfo'.  Normally, large
  117.      output files (where the size is greater than 70k bytes) are split
  118.      into smaller subfiles, each one approximately 50k bytes.  If you
  119.      specify `--no-split', `makeinfo' will not split up the output file.
  120.  
  121. `--no-pointer-validate'
  122. `--no-validate'
  123.      Suppress the pointer-validation phase of `makeinfo'.  Normally,
  124.      after a Texinfo file is processed, some consistency checks are
  125.      made to ensure that cross references can be resolved, etc.  *Note
  126.      Pointer Validation::.
  127.  
  128. `--no-warn'
  129.      Suppress the output of warning messages.  This does *not* suppress
  130.      the output of error messages, only warnings.  You might want this
  131.      if the file you are creating has examples of Texinfo cross
  132.      references within it, and the nodes that are referenced do not
  133.      actually exist.
  134.  
  135. `--no-number-footnotes'
  136.      Supress automatic footnote numbering.  By default, `makeinfo'
  137.      numbers each footnote sequentially in a single node, resetting the
  138.      current footnote number to 1 at the start of each node.
  139.  
  140. `--output FILE'
  141. `-o FILE'
  142.      Specify that the output should be directed to FILE and not to the
  143.      file name specified in the `@setfilename' command found in the
  144.      Texinfo source.  FILE can be the special token `-', which specifies
  145.      standard output.
  146.  
  147. `--paragraph-indent INDENT'
  148.      Set the paragraph indentation style to INDENT.  The value set by
  149.      this option overrides the value set in a Texinfo file by an
  150.      `@paragraphindent' command.  The value of INDENT is interpreted as
  151.      follows:
  152.  
  153.         * If the value of INDENT is `asis', do not change the existing
  154.           indentation at the starts of paragraphs.
  155.  
  156.         * If the value of INDENT is zero, delete any existing
  157.           indentation.
  158.  
  159.         * If the value of INDENT is greater than zero, indent each
  160.           paragraph by that number of spaces.
  161.  
  162. `--reference-limit LIMIT'
  163.      Set the value of the number of references to a node that
  164.      `makeinfo' will make without reporting a warning.  If a node has
  165.      more than this number of references in it, `makeinfo' will make the
  166.      references but also report a warning.
  167.  
  168. `-U VAR'
  169.      Cause VAR to be undefined.  This is equivalent to `@clear VAR' in
  170.      the Texinfo file.
  171.  
  172. `--verbose'
  173.      Cause `makeinfo' to display messages saying what it is doing.
  174.      Normally, `makeinfo' only outputs messages if there are errors or
  175.      warnings.
  176.  
  177. `--version'
  178.      Report the version number of this copy of `makeinfo'.
  179.  
  180. `--amiga'
  181.      Converts a "TeXinfo" file to "AmigaGuide®" V34 hypertext format.
  182.  
  183. `--amiga-39'
  184.      Converts a "TeXinfo" file to "AmigaGuide®" V39 hypertext format.
  185.  
  186. `--amiga-40'
  187.      Converts a "TeXinfo" file to "AmigaGuide®" V40 hypertext format.
  188.  
  189. `--index-button-length NUMBER'
  190.      An index button will have a minimum length of NUMBER. The default
  191.      value for `index-button-length' is 40. (Only used if converting to
  192.      an "AmigaGuide®" file).
  193.  
  194. `--menu-button-length NUMBER'
  195.      A menu button will have a minimum length of NUMBER. The default
  196.      value for `menu-button-length' is 25. (Only used if converting to
  197.      an "AmigaGuide®" file).
  198.  
  199. `--help'
  200.      Show a summary of the commend line arguments to `makeinfo'.
  201.  
  202. 
  203. File: makeinfo.info,  Node: Pointer Validation,  Next: The Macro Facility,  Prev: Options,  Up: Top
  204.  
  205. Pointer Validation
  206. ==================
  207.  
  208. If you do not suppress pointer-validation (by using the
  209. `--no-pointer-validation' option), `makeinfo' will check the validity
  210. of the final Info file.  Mostly, this means ensuring that nodes you
  211. have referenced really exist.  Here is a complete list of what is
  212. checked:
  213.  
  214.   1. If a `Next', `Previous', or `Up' node reference is a reference to a
  215.      node in the current file and is not an external reference such as
  216.      to `(dir)', then the referenced node must exist.
  217.  
  218.   2. In every node, if the `Previous' node is different from the `Up'
  219.      node, then the `Previous' node must also be pointed to by a `Next'
  220.      node.
  221.  
  222.   3. Every node except the `Top' node must have an `Up' pointer.
  223.  
  224.   4. The node referenced by an `Up' pointer must contain a reference to
  225.      the current node in some manner other than through a `Next'
  226.      reference.  This includes menu entries and cross references.
  227.  
  228.   5. If the `Next' reference of a node is not the same as the `Next'
  229.      reference of the `Up' reference, then the node referenced by the
  230.      `Next' pointer must have a `Previous' pointer that points back to
  231.      the current node.  This rule allows the last node in a section to
  232.      point to the first node of the next chapter.
  233.  
  234. 
  235. File: makeinfo.info,  Node: The Macro Facility,  Next: Index,  Prev: Pointer Validation,  Up: Top
  236.  
  237. The Macro Facility
  238. ==================
  239.  
  240. This chapter describes the new macro facility.
  241.  
  242. A "macro"  is a command that you define in terms of other commands.  It
  243. doesn't exist as a TeXinfo command until you define it as part of the
  244. input file to `Makeinfo'.  Once the command exists, it behaves much as
  245. any other TeXinfo command.  Macros are a useful way to ease the details
  246. and tedium of writing a `correct' info file.  The following sections
  247. explain how to write and invoke macros.
  248.  
  249. * Menu:
  250.  
  251. * How to Use Macros in TeXinfo::
  252.                         How to use the macro facility.
  253.  
  254. * Using Macros Recursively::
  255.                         How to write a macro which does (or doesn't) recurse.
  256.  
  257. * Using TeXinfo Macros As Arguments::
  258.                         Passing a macro as an argument.
  259.  
  260. 
  261. File: makeinfo.info,  Node: How to Use Macros in TeXinfo,  Next: Using Macros Recursively,  Up: The Macro Facility
  262.  
  263. How to Use Macros in TeXinfo
  264. ----------------------------
  265.  
  266. Using macros in TeXinfo is easy.  First you define the macro.  After
  267. that, the macro command is available as a normal TeXinfo command.  Here
  268. is what a definition looks like:
  269.  
  270.      @macro NAME{ARG1, ... ARGN}
  271.      TEXINFO COMMANDS...
  272.      @end macro
  273.  
  274. The arguments that you specify that the macro takes are expanded with
  275. the actual parameters used when calling the macro if they are seen
  276. surrounded by backslashes.  For example, here is a definition of
  277. `@codeitem', a macro which can be used wherever `@item' can be used,
  278. but which surrounds its argument with `@code{...}'.
  279.  
  280.      @macro codeitem{item}
  281.      @item @code{\item\}
  282.      @end macro
  283.  
  284. When the macro is expanded, all of the text between the `@macro' and
  285. `@end macro' is inserted into the document at the expansion point, with
  286. the actual parameters substituted for the named parameters.  So, a call
  287. to the above macro might look like:
  288.  
  289.      @codeitem{Foo}
  290.  
  291. and `Makeinfo' would execute the following code:
  292.  
  293.      @item @code{Foo}
  294.  
  295. A special case is made for macros which only take a single argument, and
  296. which are invoked without any brace characters (i.e., `{'...`}')
  297. surrounding an argument; the rest of the line is supplied as is as the
  298. sole argument to the macro.  This special case allows one to redefine
  299. some standard TeXinfo commands without modifying the input file.  Along
  300. with the non-recursive action of macro invocation, one can easily
  301. redefine the sectioning commands to also provide index entries:
  302.  
  303.      @macro chapter{name}
  304.      @chapter \name\
  305.      @findex \name\
  306.      @end macro
  307.  
  308. Thus, the text:
  309.  
  310.      @chapter strlen
  311.  
  312. will expand to:
  313.  
  314.      @chapter strlen
  315.      @findex strlen
  316.  
  317. 
  318. File: makeinfo.info,  Node: Using Macros Recursively,  Next: Using TeXinfo Macros As Arguments,  Prev: How to Use Macros in TeXinfo,  Up: The Macro Facility
  319.  
  320. Using Macros Recursively
  321. ------------------------
  322.  
  323. Normally, while a particular macro is executing, any call to that macro
  324. will be seen as a call to a builtin TeXinfo command.  This allows one
  325. to redefine a builtin TeXinfo command as a macro, and then use that
  326. command within the definition of the macro itself.  For example, one
  327. might wish to make sure that whereever a term was defined with
  328. `@dfn{...}', the location of the definition would appear in the concept
  329. index for the manual.  Here is a macro which redefines `@dfn' to do
  330. just that:
  331.  
  332.      @macro dfn{text}
  333.      @dfn{\text\}
  334.      @cpindex \text\
  335.      @end macro
  336.  
  337. Note that we used the builtin TeXinfo command `@dfn' within our
  338. overriding macro definition.
  339.  
  340. This behaviour itself can be overridden for macro execution by writing a
  341. special "macro control command"  in the definition of the macro.  The
  342. command is considered special because it doesn't affect the output text
  343. directly, rather, it affects the way in which the macro is defined.  One
  344. such special command is `@allow-recursion'.
  345.  
  346.      @macro silly{arg}
  347.      @allow-recursion
  348.      \arg\
  349.      @end macro
  350.  
  351. Now `@silly' is a macro that can be used within a call to itself:
  352.  
  353.      This text @silly{@silly{some text}} is ``some text''.
  354.  
  355. 
  356. File: makeinfo.info,  Node: Using TeXinfo Macros As Arguments,  Prev: Using Macros Recursively,  Up: The Macro Facility
  357.  
  358. Using TeXinfo Macros As Arguments
  359. ---------------------------------
  360.  
  361. * Menu:
  362.  
  363. * macro:                                The Macro Facility.
  364. * macro control command:                Using Macros Recursively.
  365. * Pointer validation with makeinfo:     Pointer Validation.
  366. * Validation of pointers:               Pointer Validation.
  367.  
  368. How to use TeXinfo macros as arguments to other TeXinfo macros.
  369.  
  370. 
  371. File: makeinfo.info,  Node: Index,  Prev: The Macro Facility,  Up: Top
  372.  
  373. Index
  374. =====
  375.  
  376. * Menu:
  377.  
  378. * macro control command:                Using Macros Recursively.
  379. * Pointer validation with makeinfo:     Pointer Validation.
  380. * Validation of pointers:               Pointer Validation.
  381.  
  382.  
  383. 
  384. Tag Table:
  385. Node: Top995
  386. Node: Formatting Control2044
  387. Node: Options2679
  388. Node: Pointer Validation7760
  389. Node: The Macro Facility9127
  390. Node: How to Use Macros in TeXinfo10011
  391. Node: Using Macros Recursively11839
  392. Node: Using TeXinfo Macros As Arguments13249
  393. Node: Index13762
  394. 
  395. End Tag Table
  396.