home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / texinfo-3.1-bin.lha / info / texi.info-1 (.txt) < prev    next >
GNU Info File  |  1994-02-24  |  51KB  |  884 lines

  1. This is Info file texi.info, produced by Makeinfo-1.55 from the input
  2. file texi.texi.
  3.    This file documents Texinfo, a documentation system that uses a
  4. single source file to produce both on-line information and a printed
  5. manual.
  6.    Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation,
  7.    This is the second edition of the Texinfo documentation,
  8. and is consistent with version 2 of `texinfo.tex'.
  9.    Permission is granted to make and distribute verbatim copies of this
  10. manual provided the copyright notice and this permission notice are
  11. preserved on all copies.
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided that
  14. the entire resulting derived work is distributed under the terms of a
  15. permission notice identical to this one.
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that this permission notice may be stated in a
  19. translation approved by the Free Software Foundation.
  20. File: texi.info,  Node: Top,  Next: Copying,  Prev: (dir),  Up: (dir)
  21. Texinfo
  22. *******
  23.    Texinfo is a documentation system that uses a single source file to
  24. produce both on-line information and printed output.
  25.    The first part of this master menu lists the major nodes in this Info
  26. document, including the @-command and concept indices.  The rest of the
  27. menu lists all the lower level nodes in the document.
  28.    This is Edition 2.18 of the Texinfo documentation, 26 March 1993,
  29. for Texinfo Version 2.
  30. * Menu:
  31. * Copying::                     Your rights.
  32. * Overview::                    Texinfo in brief.
  33. * Texinfo Mode::                How to use Texinfo mode.
  34. * Beginning a File::            What is at the beginning of a Texinfo file?
  35. * Ending a File::               What is at the end of a Texinfo file?
  36. * Structuring::                 How to create chapters, sections, subsections,
  37.                                   appendices, and other parts.
  38. * Nodes::                       How to write nodes.
  39. * Menus::                       How to write menus.
  40. * Cross References::            How to write cross references.
  41. * Marking Text::                How to mark words and phrases as code,
  42.                                   keyboard input, meta-syntactic
  43.                                   variables, and the like.
  44. * Quotations and Examples::     How to write quotations, examples, etc.
  45. * Lists and Tables::            How to write lists and tables.
  46. * Indices::                     How to create indices.
  47. * Insertions::                  How to insert @-signs, braces, etc.
  48. * Glyphs::                      How to indicate results of evaluation,
  49.                                   expansion of macros, errors, etc.
  50. * Breaks::                      How to force and prevent line and page breaks.
  51. * Definition Commands::         How to describe functions and the like
  52.                                   in a uniform manner.
  53. * Footnotes::                   How to write footnotes.
  54. * Conditionals::                How to specify text for either TeX or Info.
  55. * Format/Print Hardcopy::       How to convert a Texinfo file to a file
  56.                                   for printing and how to print that file.
  57. * Create an Info File::         Convert a Texinfo file into an Info file.
  58. * Install an Info File::        Make an Info file accessible to users.
  59. * Command List::                All the Texinfo @-commands.
  60. * Tips::                        Hints on how to write a Texinfo document.
  61. * Sample Texinfo File::         A sample Texinfo file to look at.
  62. * Sample Permissions::          Tell readers they have the right to copy
  63.                                   and distribute.
  64. * Include Files::               How to incorporate other Texinfo files.
  65. * Headings::                    How to write page headings and footings.
  66. * Catching Mistakes::           How to find formatting mistakes.
  67. * Refilling Paragraphs::        All about paragraph refilling.
  68. * Command Syntax::              A description of @-Command syntax.
  69. * Obtaining TeX::               How to Obtain TeX.
  70. * New Features::                Texinfo second edition features.
  71. * Command and Variable Index::  A menu containing commands and variables.
  72. * Concept Index::               A menu covering many topics.
  73.  -- The Detailed Node Listing --
  74. Overview of Texinfo
  75. * Using Texinfo::               Create a conventional printed book
  76.                                   or an Info file.
  77. * Info Files::                  What is an Info file?
  78. * Printed Books::               Characteristics of a printed book or manual.
  79. * Formatting Commands::         @-commands are used for formatting.
  80. * Conventions::                 General rules for writing a Texinfo file.
  81. * Comments::                    How to write comments and mark regions that
  82.                                   the formatting commands will ignore.
  83. * Minimum::                     What a Texinfo file must have.
  84. * Six Parts::                   Usually, a Texinfo file has six parts.
  85. * Short Sample::                A short sample Texinfo file.
  86. * Acknowledgements::
  87. Using Texinfo Mode
  88. * Texinfo Mode Overview::       How Texinfo mode can help you.
  89. * Emacs Editing::               Texinfo mode adds to GNU Emacs' general
  90.                                   purpose editing features.
  91. * Inserting::                   How to insert frequently used @-commands.
  92. * Showing the Structure::       How to show the structure of a file.
  93. * Updating Nodes and Menus::    How to update or create new nodes and menus.
  94. * Info Formatting::             How to format for Info.
  95. * Printing::                    How to format and print part or all of a file.
  96. * Texinfo Mode Summary::        Summary of all the Texinfo mode commands.
  97. Updating Nodes and Menus
  98. * Updating Commands::           Five major updating commands.
  99. * Updating Requirements::       How to structure a Texinfo file for
  100.                                   using the updating command.
  101. * Other Updating Commands::     How to indent descriptions, insert
  102.                                   missing nodes lines, and update
  103.                                   nodes in sequence.
  104. Beginning a Texinfo File
  105. * Four Parts::                  Four parts begin a Texinfo file.
  106. * Sample Beginning::            Here is a sample beginning for a Texinfo file.
  107. * Header::                      The very beginning of a Texinfo file.
  108. * Info Summary and Permissions::  Summary and copying permissions for Info.
  109. * Titlepage & Copyright Page::  Creating the title and copyright pages.
  110. * The Top Node::                Creating the `Top' node and master menu.
  111. * Software Copying Permissions::  Ensure that you and others continue to
  112.                                   have the right to use and share software.
  113. The Texinfo File Header
  114. * First Line::                  The first line of a Texinfo file.
  115. * Start of Header::             Formatting a region requires this.
  116. * setfilename::                 Tell Info the name of the Info file.
  117. * settitle::                    Create a title for the printed work.
  118. * setchapternewpage::           Start chapters on right-hand pages.
  119. * paragraphindent::             An option to specify paragraph indentation.
  120. * End of Header::               Formatting a region requires this.
  121. The Title and Copyright Pages
  122. * titlepage::                   Create a title for the printed document.
  123. * titlefont center sp::         The `@titlefont', `@center',
  124.                                   and `@sp' commands.
  125. * title subtitle author::       The `@title', `@subtitle',
  126.                                   and `@author' commands.
  127. * Copyright & Permissions::     How to write the copyright notice and
  128.                                   include copying permissions.
  129. * end titlepage::               Turn on page headings after the title and
  130.                                   copyright pages.
  131. * headings on off::             An option for turning headings on and off
  132.                                   and double or single sided printing.
  133. The `Top' Node and Master Menu
  134. * Title of Top Node::           Sketch what the file is about.
  135. * Master Menu Parts::           A master menu has three or more parts.
  136. Ending a Texinfo File
  137. * Printing Indices & Menus::    How to print an index in hardcopy and
  138.                                   generate index menus in Info.
  139. * Contents::                    How to create a table of contents.
  140. * File End::                    How to mark the end of a file.
  141. Chapter Structuring
  142. * Tree Structuring::            A manual is like an upside down tree ...
  143. * Structuring Command Types::   How to divide a manual into parts.
  144. * makeinfo top::                The `@top' command, part of the `Top' node.
  145. * chapter::
  146. * unnumbered & appendix::
  147. * majorheading & chapheading::
  148. * section::
  149. * unnumberedsec appendixsec heading::
  150. * subsection::
  151. * unnumberedsubsec appendixsubsec subheading::
  152. * subsubsection::               Commands for the lowest level sections.
  153. Nodes
  154. * Two Paths::                   Different commands to structure
  155.                                   Info output and printed output.
  156. * Node Menu Illustration::      A diagram, and sample nodes and menus.
  157. * node::                        How to write a node, in detail.
  158. * makeinfo Pointer Creation::   How to create node pointers with `makeinfo'.
  159. The `@node' Command
  160. * Node Names::                  How to choose node and pointer names.
  161. * Writing a Node::              How to write an `@node' line.
  162. * Node Line Tips::              Keep names short.
  163. * Node Line Requirements::      Keep names unique, without @-commands.
  164. * First Node::                  How to write a `Top' node.
  165. * makeinfo top command::        How to use the `@top' command.
  166. * Top Node Summary::            Write a brief description for readers.
  167. Menus
  168. * Menu Location::               Put a menu in a short node.
  169. * Writing a Menu::              What is a menu?
  170. * Menu Parts::                  A menu entry has three parts.
  171. * Less Cluttered Menu Entry::   Two part menu entry.
  172. * Menu Example::                Two and three part menu entries.
  173. * Other Info Files::            How to refer to a different Info file.
  174. Cross References
  175. * References::                  What cross references are for.
  176. * Cross Reference Commands::    A summary of the different commands.
  177. * Cross Reference Parts::       A cross reference has several parts.
  178. * xref::                        Begin a reference with `See' ...
  179. * Top Node Naming::             How to refer to the beginning of another file.
  180. * ref::                         A reference for the last part of a sentence.
  181. * pxref::                       How to write a parenthetical cross reference.
  182. * inforef::                     How to refer to an Info-only file.
  183. `@xref'
  184. * Reference Syntax::            What a reference looks like and requires.
  185. * One Argument::                `@xref' with one argument.
  186. * Two Arguments::               `@xref' with two arguments.
  187. * Three Arguments::             `@xref' with three arguments.
  188. * Four and Five Arguments::     `@xref' with four and five arguments.
  189. Marking Words and Phrases
  190. * Indicating::                  How to indicate definitions, files, etc.
  191. * Emphasis::                    How to emphasize text.
  192. Indicating Definitions, Commands, etc.
  193. * Useful Highlighting::         Highlighting provides useful information.
  194. * code::                        How to indicate code.
  195. * kbd::                         How to show keyboard input.
  196. * key::                         How to specify keys.
  197. * samp::                        How to show a literal sequence of characters.
  198. * var::                         How to indicate a metasyntactic variable.
  199. * file::                        How to indicate the name of a file.
  200. * dfn::                         How to specify a definition.
  201. * cite::                        How to refer to a book that is not in Info.
  202. Emphasizing Text
  203. * emph & strong::               How to emphasize text in Texinfo.
  204. * Smallcaps::                   How to use the small caps font.
  205. * Fonts::                       Various font commands for printed output.
  206. Quotations and Examples
  207. * Block Enclosing Commands::    Use different constructs for
  208.                                   different purposes.
  209. * quotation::                   How to write a quotation.
  210. * example::                     How to write an example in a fixed-width font.
  211. * noindent::                    How to prevent paragraph indentation.
  212. * Lisp Example::                How to illustrate Lisp code.
  213. * smallexample & smalllisp::    Forms for the `@smallbook' option.
  214. * display::                     How to write an example in the current font.
  215. * format::                      How to write an example that does not narrow
  216.                                   the margins.
  217. * exdent::                      How to undo the indentation of a line.
  218. * flushleft & flushright::      How to push text flushleft or flushright.
  219. * cartouche::                   How to draw cartouches around examples.
  220. Making Lists and Tables
  221. * Introducing Lists::           Texinfo formats lists for you.
  222. * itemize::                     How to construct a simple list.
  223. * enumerate::                   How to construct a numbered list.
  224. * Two-column Tables::           How to construct a two-column table.
  225. Making a Two-column Table
  226. * table::                       How to construct a two-column table.
  227. * ftable vtable::               How to construct a two-column table
  228.                                   with automatic indexing.
  229. * itemx::                       How to put more entries in the first column.
  230. Creating Indices
  231. * Index Entries::               Choose different words for index entries.
  232. * Predefined Indices::          Use different indices for different kinds
  233.                                   of entry.
  234. * Indexing Commands::           How to make an index entry.
  235. * Combining Indices::           How to combine indices.
  236. * New Indices::                 How to define your own indices.
  237. Combining Indices
  238. * syncodeindex::                How to merge two indices, using `@code'
  239.                                   font for the merged-from index.
  240. * synindex::                    How to merge two indices, using the
  241.                                   default font of the merged-to index.
  242. Special Insertions
  243. * Braces Atsigns Periods::      How to insert braces, `@' and periods.
  244. * dmn::                         How to format a dimension.
  245. * Dots Bullets::                How to insert dots and bullets.
  246. * TeX and copyright::           How to insert the TeX logo
  247.                                   and the copyright symbol.
  248. * minus::                       How to insert a minus sign.
  249. Inserting `@', Braces, and Periods
  250. * Inserting An Atsign::
  251. * Inserting Braces::            How to insert `{' and `}'
  252. * Controlling Spacing::         How to insert the right amount of space
  253.                                   after punctuation within a sentence.
  254. Inserting Ellipsis, Dots, and Bullets
  255. * dots::                        How to insert dots ...
  256. * bullet::                      How to insert a bullet.
  257. Inserting TeX and the Copyright Symbol
  258. * tex::                         How to insert the TeX logo.
  259. * copyright symbol::            How to use `@copyright'{}.
  260. Glyphs for Examples
  261. * Glyphs Summary::
  262. * result::                      How to show the result of expression.
  263. * expansion::                   How to indicate an expansion.
  264. * Print Glyph::                 How to indicate printed output.
  265. * Error Glyph::                 How to indicate an error message.
  266. * Equivalence::                 How to indicate equivalence.
  267. * Point Glyph::                 How to indicate the location of point.
  268. Making and Preventing Breaks
  269. * Break Commands::              Cause and prevent splits.
  270. * Line Breaks::                 How to force a single line to use two lines.
  271. * w::                           How to prevent unwanted line breaks.
  272. * sp::                          How to insert blank lines.
  273. * page::                        How to force the start of a new page.
  274. * group::                       How to prevent unwanted page breaks.
  275. * need::                        Another way to prevent unwanted page breaks.
  276. Definition Commands
  277. * Def Cmd Template::            How to structure a description using a
  278.                                   definition command.
  279. * Optional Arguments::          How to handle optional and repeated arguments.
  280. * deffnx::                      How to group two or more `first' lines.
  281. * Def Cmds in Detail::          All the definition commands.
  282. * Def Cmd Conventions::         Conventions for writing definitions.
  283. * Sample Function Definition::
  284. The Definition Commands
  285. * Functions Commands::          Commands for functions and similar entities.
  286. * Variables Commands::          Commands for variables and similar entities.
  287. * Typed Functions::             Commands for functions in typed languages.
  288. * Typed Variables::             Commands for variables in typed languages.
  289. * Abstract Objects::            Commands for object-oriented programming.
  290. * Data Types::                  The definition command for data types.
  291. Conditionally Visible Text
  292. * Conditional Commands::        How to specify text for Info or TeX.
  293. * Using Ordinary TeX Commands::  You can use any and all TeX commands.
  294. * set clear value::             How to designate which text to format (for
  295.                                   both Info and TeX); and how to set a
  296.                                   flag to a string that you can insert.
  297. `@set', `@clear', and `@value'
  298. * ifset ifclear::               Format a region if a flag is set.
  299. * value::                       Replace a flag with a string.
  300. * value Example::               An easy way to update edition information.
  301. Format and Print Hardcopy
  302. * Use TeX::                     Use TeX to format for hardcopy.
  303. * Shell Format & Print::        How to format and print a hardcopy manual
  304.                                  with shell commands.
  305. * Within Emacs::                How to format and print from an Emacs shell.
  306. * Texinfo Mode Printing::       How to format and print in Texinfo mode.
  307. * Compile-Command::             How to print using Emacs's compile command.
  308. * Requirements Summary::        TeX formatting requirements summary.
  309. * Preparing for TeX::           What you need to do to use TeX.
  310. * Overfull hboxes::             What are and what to do with overfull hboxes.
  311. * smallbook::                   How to print small format books and manuals.
  312. * A4 Paper::                    How to print on European A4 paper.
  313. * Cropmarks and Magnification::  How to print marks to indicate the size
  314.                                 of pages and how to print scaled up output.
  315. Creating an Info File
  316. * makeinfo advantages::         `makeinfo' provides better error checking.
  317. * Invoking makeinfo::           How to run `makeinfo' from a shell.
  318. * makeinfo options::            Specify fill-column and other options.
  319. * Pointer Validation::          How to check that pointers point somewhere.
  320. * makeinfo in Emacs::           How to run `makeinfo' from Emacs.
  321. * texinfo-format commands::     Two Info formatting commands written
  322.                                   in Emacs Lisp are an alternative
  323.                                   to `makeinfo'.
  324. * Batch Formatting::            How to format for Info in Emacs Batch mode.
  325. * Tag and Split Files::         How tagged and split files help Info
  326.                                   to run better.
  327. Installing an Info File
  328. * Directory file::              The top level menu for all Info files.
  329. * New Info File::               Listing a new info file.
  330. * Other Info Directories::      How to specify Info files that are
  331.                                   located in other directories.
  332. Sample Permissions
  333. * Inserting Permissions::       How to put permissions in your document.
  334. * ifinfo Permissions::          Sample `ifinfo' copying permissions.
  335. * Titlepage Permissions::       Sample Titlepage copying permissions.
  336. Include Files
  337. * Using Include Files::         How to use the `@include' command.
  338. * texinfo-multiple-files-update::  How to create and update nodes and
  339.                                   menus when using included files.
  340. * Include File Requirements::   What `texinfo-multiple-files-update' expects.
  341. * Sample Include File::         A sample outer file with included files
  342.                                   within it; and a sample included file.
  343. * Include Files Evolution::     How use of the `@include' command
  344.                                   has changed over time.
  345. Page Headings
  346. * Headings Introduced::         Conventions for using page headings.
  347. * Heading Format::              Standard page heading formats.
  348. * Heading Choice::              How to specify the type of page heading.
  349. * Custom Headings::             How to create your own headings and footings.
  350. Formatting Mistakes
  351. * makeinfo preferred::          `makeinfo' finds errors.
  352. * Debugging with Info::         How to catch errors with Info formatting.
  353. * Debugging with TeX::          How to catch errors with TeX formatting.
  354. * Using texinfo-show-structure::  How to use `texinfo-show-structure'.
  355. * Using occur::                 How to list all lines containing a pattern.
  356. * Running Info-Validate::       How to find badly referenced nodes.
  357. Finding Badly Referenced Nodes
  358. * Using Info-validate::         How to run `Info-validate'.
  359. * Unsplit::                     How to create an unsplit file.
  360. * Tagifying::                   How to tagify a file.
  361. * Splitting::                   How to split a file manually.
  362. Second Edition Features
  363. * New Texinfo Mode Commands::   The updating commands are especially useful.
  364. * New Commands::                Many newly described @-commands.
  365. File: texi.info,  Node: Copying,  Next: Overview,  Prev: Top,  Up: Top
  366. Texinfo Copying Conditions
  367. **************************
  368.    The programs currently being distributed that relate to Texinfo
  369. include portions of GNU Emacs, plus other separate programs (including
  370. `makeinfo', `info', `texindex', and `texinfo.tex').  These programs are
  371. "free"; this means that everyone is free to use them and free to
  372. redistribute them on a free basis.  The Texinfo-related programs are
  373. not in the public domain; they are copyrighted and there are
  374. restrictions on their distribution, but these restrictions are designed
  375. to permit everything that a good cooperating citizen would want to do.
  376. What is not allowed is to try to prevent others from further sharing
  377. any version of these programs that they might get from you.
  378.    Specifically, we want to make sure that you have the right to give
  379. away copies of the programs that relate to Texinfo, that you receive
  380. source code or else can get it if you want it, that you can change these
  381. programs or use pieces of them in new free programs, and that you know
  382. you can do these things.
  383.    To make sure that everyone has such rights, we have to forbid you to
  384. deprive anyone else of these rights.  For example, if you distribute
  385. copies of the Texinfo related programs, you must give the recipients all
  386. the rights that you have.  You must make sure that they, too, receive or
  387. can get the source code.  And you must tell them their rights.
  388.    Also, for our own protection, we must make certain that everyone
  389. finds out that there is no warranty for the programs that relate to
  390. Texinfo.  If these programs are modified by someone else and passed on,
  391. we want their recipients to know that what they have is not what we
  392. distributed, so that any problems introduced by others will not reflect
  393. on our reputation.
  394.    The precise conditions of the licenses for the programs currently
  395. being distributed that relate to Texinfo are found in the General Public
  396. Licenses that accompany them.
  397. File: texi.info,  Node: Overview,  Next: Texinfo Mode,  Prev: Copying,  Up: Top
  398. Overview of Texinfo
  399. *******************
  400.    "Texinfo"(1) is a documentation system that uses a single source
  401. file to produce both on-line information and printed output.  This
  402. means that instead of writing two different documents, one for the
  403. on-line help or other on-line information and the other for a typeset
  404. manual or other printed work, you need write only one document.  When
  405. the work is revised, you need revise only one document.  (You can read
  406. the on-line information, known as an "Info file", with an Info
  407. documentation-reading program.)
  408. * Menu:
  409. * Using Texinfo::               Create a conventional printed book
  410.                                   or an Info file.
  411. * Info Files::                  What is an Info file?
  412. * Printed Books::               Characteristics of a printed book or manual.
  413. * Formatting Commands::         @-commands are used for formatting.
  414. * Conventions::                 General rules for writing a Texinfo file.
  415. * Comments::                    How to write comments and mark regions that
  416.                                   the formatting commands will ignore.
  417. * Minimum::                     What a Texinfo file must have.
  418. * Six Parts::                   Usually, a Texinfo file has six parts.
  419. * Short Sample::                A short sample Texinfo file.
  420. * Acknowledgements::
  421.    ---------- Footnotes ----------
  422.    (1)  Note that the first syllable of "Texinfo" is pronounced like
  423. "speck", not "hex".  This odd pronunciation is derived from, but is not
  424. the same as, the pronunciation of TeX.  In the word TeX, the `X' is
  425. actually the Greek letter "chi" rather than the English letter "ex".
  426. Pronounce TeX as if the `X' were the last sound in the name `Bach'; but
  427. pronounce Texinfo as if the `x' were a `k'.  Spell "Texinfo" with a
  428. capital "T" and write the other letters in lower case.
  429. File: texi.info,  Node: Using Texinfo,  Next: Info Files,  Up: Overview
  430. Using Texinfo
  431. =============
  432.    Using Texinfo, you can create a printed document with the normal
  433. features of a book, including chapters, sections, cross references, and
  434. indices.  From the same Texinfo source file, you can create a
  435. menu-driven, on-line Info file with nodes, menus, cross references, and
  436. indices.  You can, if you wish, make the chapters and sections of the
  437. printed document correspond to the nodes of the on-line information;
  438. and you use the same cross references and indices for both the Info
  439. file and the printed work.  `The GNU Emacs Manual' is a good example of
  440. a Texinfo file, as is this manual.
  441.    To make a printed document, you process a Texinfo source file with
  442. the TeX typesetting program.  This creates a DVI file that you can
  443. typeset and print as a book or report.  (Note that the Texinfo language
  444. is completely different from TeX's usual language, PlainTeX, which
  445. Texinfo replaces.)  If you do not have TeX, but do have `troff' or
  446. `nroff', you can use the `texi2roff' program instead.
  447.    To make an Info file, you process a Texinfo source file with the
  448. `makeinfo' utility or Emacs's `texinfo-format-buffer' command; this
  449. creates an Info file that you can install on-line.
  450.    TeX and `texi2roff' work with many types of printer; similarly, Info
  451. works with almost every type of computer terminal.  This power makes
  452. Texinfo a general purpose system, but brings with it a constraint,
  453. which is that a Texinfo file may contain only the customary
  454. "typewriter" characters (letters, numbers, spaces, and punctuation
  455. marks) but no special graphics.
  456.    A Texinfo file is a plain ASCII file containing text and
  457. "@-commands" (words preceded by an `@') that tell the typesetting and
  458. formatting programs what to do.  You may edit a Texinfo file with any
  459. text editor; but it is especially convenient to use GNU Emacs since
  460. that editor has a special mode, called Texinfo mode, that provides
  461. various Texinfo-related features.  (*Note Texinfo Mode::.)
  462.    Before writing a Texinfo source file, you should become familiar with
  463. the Info documentation reading program and learn about nodes, menus,
  464. cross references, and the rest.  (*note info: (info)Top, for more
  465. information.)
  466.    You can use Texinfo to create both on-line help and printed manuals;
  467. moreover, Texinfo is freely redistributable.  For these reasons, Texinfo
  468. is the format in which documentation for GNU utilities and libraries is
  469. written.
  470. File: texi.info,  Node: Info Files,  Next: Printed Books,  Prev: Using Texinfo,  Up: Overview
  471. Info files
  472. ==========
  473.    An Info file is a Texinfo file formatted so that the Info
  474. documentation reading program can operate on it.  (`makeinfo' and
  475. `texinfo-format-buffer' are two commands that convert a Texinfo file
  476. into an Info file.)
  477.    Info files are divided into pieces called "nodes", each of which
  478. contains the discussion of one topic.  Each node has a name, and
  479. contains both text for the user to read and pointers to other nodes,
  480. which are identified by their names.  The Info program displays one node
  481. at a time, and provides commands with which the user can move to other
  482. related nodes.
  483.    *note info: (info)Top, for more information about using Info.
  484.    Each node of an Info file may have any number of child nodes that
  485. describe subtopics of the node's topic.  The names of child nodes are
  486. listed in a "menu" within the parent node; this allows you to use
  487. certain Info commands to move to one of the child nodes.  Generally, an
  488. Info file is organized like a book.  If a node is at the logical level
  489. of a chapter, its child nodes are at the level of sections; likewise,
  490. the child nodes of sections are at the level of subsections.
  491.    All the children of any one parent are linked together in a
  492. bidirectional chain of `Next' and `Previous' pointers.  The `Next'
  493. pointer provides a link to the next section, and the `Previous' pointer
  494. provides a link to the previous section.  This means that all the nodes
  495. that are at the level of sections within a chapter are linked together.
  496. Normally the order in this chain is the same as the order of the
  497. children in the parent's menu.  Each child node records the parent node
  498. name as its `Up' pointer.  The last child has no `Next' pointer, and the
  499. first child has the parent both as its `Previous' and as its `Up'
  500. pointer.(1)
  501.    The book-like structuring of an Info file into nodes that correspond
  502. to chapters, sections, and the like is a matter of convention, not a
  503. requirement.  The `Up', `Previous', and `Next' pointers of a node can
  504. point to any other nodes, and a menu can contain any other nodes.
  505. Thus, the node structure can be any directed graph.  But it is usually
  506. more comprehensible to follow a structure that corresponds to the
  507. structure of chapters and sections in a printed book or report.
  508.    In addition to menus and to `Next', `Previous', and `Up' pointers,
  509. Info provides pointers of another kind, called references, that can be
  510. sprinkled throughout the text.  This is usually the best way to
  511. represent links that do not fit a hierarchical structure.
  512.    Usually, you will design a document so that its nodes match the
  513. structure of chapters and sections in the printed output.  But there
  514. are times when this is not right for the material being discussed.
  515. Therefore, Texinfo uses separate commands to specify the node structure
  516. for the Info file and the section structure for the printed output.
  517.    Generally, you enter an Info file through a node that by convention
  518. is called `Top'.  This node normally contains just a brief summary of
  519. the file's purpose, and a large menu through which the rest of the file
  520. is reached.  From this node, you can either traverse the file
  521. systematically by going from node to node, or you can go to a specific
  522. node listed in the main menu, or you can search the index menus and
  523. then go directly to the node that has the information you want.
  524.    If you want to read through an Info file in sequence, as if it were a
  525. printed manual, you can get the whole file with the advanced Info
  526. command `g* RET'.  (*note Advanced Info commands: (info)Expert.)
  527.    The `dir' file in the `info' directory serves as the departure point
  528. for the whole Info system.  From it, you can reach the `Top' nodes of
  529. each of the documents in a complete Info system.
  530.    ---------- Footnotes ----------
  531.    (1)  In some documents, the first child has no `Previous' pointer.
  532. Occasionally, the last child has the node name of the next following
  533. higher level node as its `Next' pointer.
  534. File: texi.info,  Node: Printed Books,  Next: Formatting Commands,  Prev: Info Files,  Up: Overview
  535. Printed Books
  536. =============
  537.    A Texinfo file can be formatted and typeset as a printed book or
  538. manual.  To do this, you need TeX, a powerful, sophisticated typesetting
  539. program written by Donald Knuth.(1)
  540.    A Texinfo-based book is similar to any other typeset, printed work:
  541. it can have a title page, copyright page, table of contents, and
  542. preface, as well as chapters, numbered or unnumbered sections and
  543. subsections, page headers, cross references, footnotes, and indices.
  544.    You can use Texinfo to write a book without ever having the intention
  545. of converting it into on-line information.  You can use Texinfo for
  546. writing a printed novel, and even to write a printed memo, although
  547. this latter application is not recommended since electronic mail is so
  548. much easier.
  549.    TeX is a general purpose typesetting program.  Texinfo provides a
  550. file called `texinfo.tex' that contains information (definitions or
  551. "macros") that TeX uses when it typesets a Texinfo file.
  552. (`texinfo.tex' tells TeX how to convert the Texinfo @-commands to TeX
  553. commands, which TeX can then process to create the typeset document.)
  554. `texinfo.tex' contains the specifications for printing a document.
  555.    Most often, documents are printed on 8.5 inch by 11 inch pages
  556. (216mm by 280mm; this is the default size), but you can also print for
  557. 7 inch by 9.25 inch pages (178mm by 235mm; the `@smallbook' size) or on
  558. European A4 size paper (`@afourpaper').  (*Note Printing "Small" Books:
  559. smallbook.  Also, see *Note Printing on A4 Paper: A4 Paper.)
  560.    By changing the parameters in `texinfo.tex', you can change the size
  561. of the printed document.  In addition, you can change the style in
  562. which the printed document is formatted; for example, you can change the
  563. sizes and fonts used, the amount of indentation for each paragraph, the
  564. degree to which words are hyphenated, and the like.  By changing the
  565. specifications, you can make a book look dignified, old and serious, or
  566. light-hearted, young and cheery.
  567.    TeX is freely distributable.  It is written in a dialect of Pascal
  568. called WEB and can be compiled either in Pascal or (by using a
  569. conversion program that comes with the TeX distribution) in C.  (*Note
  570. TeX Mode: (emacs)TeX Mode, for information about TeX.)
  571.    TeX is very powerful and has a great many features.  Because a
  572. Texinfo file must be able to present information both on a
  573. character-only terminal in Info form and in a typeset book, the
  574. formatting commands that Texinfo supports are necessarily limited.
  575.    *Note How to Obtain TeX: Obtaining TeX.
  576.    ---------- Footnotes ----------
  577.    (1)  You can also use the `texi2roff' program if you do not have
  578. TeX; since Texinfo is designed for use with TeX, `texi2roff' is not
  579. described here.  `texi2roff' is part of the standard GNU distribution.
  580. File: texi.info,  Node: Formatting Commands,  Next: Conventions,  Prev: Printed Books,  Up: Overview
  581. @-commands
  582. ==========
  583.    In a Texinfo file, the commands that tell TeX how to typeset the
  584. printed manual and tell `makeinfo' and `texinfo-format-buffer' how to
  585. create an Info file are preceded by `@'; they are called "@-commands".
  586. For example, `@node' is the command to indicate a node and `@chapter'
  587. is the command to indicate the start of a chapter.
  588.      *Please note:* All the @-commands, with the exception of the
  589.      `@TeX{}' command, must be written entirely in lower case.
  590.    The Texinfo @-commands are a strictly limited set of constructs.  The
  591. strict limits make it possible for Texinfo files to be understood both
  592. by TeX and by the code that converts them into Info files.  You can
  593. display Info files on any terminal that displays alphabetic and numeric
  594. characters.  Similarly, you can print the output generated by TeX on a
  595. wide variety of printers.
  596.    Depending on what they do or what arguments(1) they take, you need
  597. to write @-commands on lines of their own or as part of sentences:
  598.    * Write a command such as `@noindent' at the beginning of a line as
  599.      the only text on the line.  (`@noindent' prevents the beginning of
  600.      the next line from being indented as the beginning of a paragraph.)
  601.    * Write a command such as `@chapter' at the beginning of a line
  602.      followed by the command's arguments, in this case the chapter
  603.      title, on the rest of the line.  (`@chapter' creates chapter
  604.      titles.)
  605.    * Write a command such as `@dots{}' wherever you wish but usually
  606.      within a sentence. (`@dots{}' creates dots ...)
  607.    * Write a command such as `@code{SAMPLE-CODE}' wherever you wish
  608.      (but usually within a sentence) with its argument, SAMPLE-CODE in
  609.      this example, between the braces.  (`@code' marks text as being
  610.      code.)
  611.    * Write a command such as `@example' at the beginning of a line of
  612.      its own; write the body-text on following lines; and write the
  613.      matching `@end' command, `@end example' in this case, at the
  614.      beginning of a line of its own after the body-text. (`@example'
  615.      ... `@end example' indents and typesets body-text as an example.)
  616. As a general rule, a command requires braces if it mingles among other
  617. text; but it does not need braces if it starts a line of its own.  The
  618. non-alphabetic commands, such as `@:', are exceptions to the rule; they
  619. do not need braces.
  620.    As you gain experience with Texinfo, you will rapidly learn how to
  621. write the different commands: the different ways to write commands make
  622. it easier to write and read Texinfo files than if all commands followed
  623. exactly the same syntax.  (For details about @-command syntax, see
  624. *Note @-Command Syntax: Command Syntax.)
  625.    ---------- Footnotes ----------
  626.    (1)  The word "argument" comes from the way it is used in
  627. mathematics and does not refer to a disputation between two people; it
  628. refers to the information presented to the command.  According to the
  629. `Oxford English Dictionary', the word derives from the Latin for "to
  630. make clear, prove"; thus it came to mean `the evidence offered as
  631. proof', which is to say, `the information offered', which led to its
  632. mathematical meaning.  In its other thread of derivation, the word came
  633. to mean `to assert in a manner against which others may make counter
  634. assertions', which led to the meaning of `argument' as a disputation.
  635. File: texi.info,  Node: Conventions,  Next: Comments,  Prev: Formatting Commands,  Up: Overview
  636. General Syntactic Conventions
  637. =============================
  638.    All ASCII printing characters except `@', `{' and `}' can appear in
  639. a Texinfo file and stand for themselves.  `@' is the escape character
  640. which introduces commands.  `{' and `}' should be used only to surround
  641. arguments to certain commands.  To put one of these special characters
  642. into the document, put an `@' character in front of it, like this:
  643. `@@', `@{', and `@}'.
  644.    It is customary in TeX to use doubled single-quote characters to
  645. begin and end quotations: ` ` and ' ' (but without a space between the
  646. two single-quote characters).  This convention should be followed in
  647. Texinfo files.  TeX converts doubled single-quote characters to left-
  648. and right-hand doubled quotation marks and Info converts doubled
  649. single-quote characters to ASCII double-quotes: ` ` and ' ' to " .
  650.    Use three hyphens in a row, `---', for a dash--like this.  In TeX, a
  651. single or even a double hyphen produces a printed dash that is shorter
  652. than the usual typeset dash. Info reduces three hyphens to two for
  653. display on the screen.
  654.    To prevent a paragraph from being indented in the printed manual, put
  655. the command `@noindent' on a line by itself before the paragraph.
  656.    If you mark off a region of the Texinfo file with the `@iftex' and
  657. `@end iftex' commands, that region will appear only in the printed
  658. copy; in that region, you can use certain commands borrowed from
  659. PlainTeX that you cannot use in Info.  Likewise, if you mark off a
  660. region with the `@ifinfo' and `@end ifinfo' commands, that region will
  661. appear only in the Info file; in that region, you can use Info commands
  662. that you cannot use in TeX.  (*Note Conditionals::.)
  663.      *Caution:* Do not use tabs in a Texinfo file!  TeX uses
  664.      variable-width fonts, which means that it cannot predefine a tab
  665.      to work in all circumstances.  Consequently, TeX treats tabs like
  666.      single spaces, and that is not what they look like.
  667.      To avoid this problem, Texinfo mode causes GNU Emacs to insert
  668.      multiple spaces when you press the TAB key.
  669.      Also, you can run `untabify' in Emacs to convert tabs in a region
  670.      to multiple spaces.
  671. File: texi.info,  Node: Comments,  Next: Minimum,  Prev: Conventions,  Up: Overview
  672. Comments
  673. ========
  674.    You can write comments in a Texinfo file that will not appear in
  675. either the Info file or the printed manual by using the `@comment'
  676. command (which may be abbreviated to `@c').  Such comments are for the
  677. person who reads the Texinfo file.  All the text on a line that follows
  678. either `@comment' or `@c' is a comment; the rest of the line does not
  679. appear in either the Info file or the printed manual. (Often, you can
  680. write the `@comment' or `@c' in the middle of a line, and only the text
  681. that follows after the `@comment' or `@c' command does not appear; but
  682. some commands, such as `@settitle' and `@setfilename', work on a whole
  683. line.  You cannot use `@comment' or `@c' in a line beginning with such
  684. a command.)
  685.    You can write long stretches of text that will not appear in either
  686. the Info file or the printed manual by using the `@ignore' and `@end
  687. ignore' commands.  Write each of these commands on a line of its own,
  688. starting each command at the beginning of the line.  Text between these
  689. two commands does not appear in the processed output.  You can use
  690. `@ignore' and `@end ignore' for writing comments.  Often, `@ignore' and
  691. `@end ignore' is used to enclose a part of the copying permissions that
  692. applies to the Texinfo source file of a document, but not to the Info
  693. or printed version of the document.
  694. File: texi.info,  Node: Minimum,  Next: Six Parts,  Prev: Comments,  Up: Overview
  695. What a Texinfo File Must Have
  696. =============================
  697.    By convention, the names of Texinfo files end with one of the
  698. extensions `.texinfo', `.texi', or `.tex'.  The longer extension is
  699. preferred since it describes more clearly to a human reader the nature
  700. of the file.  The shorter extensions are for operating systems that
  701. cannot handle long file names.
  702.    In order to be made into a printed manual and an Info file, a
  703. Texinfo file *must* begin with lines like this:
  704.      \input texinfo
  705.      @setfilename INFO-FILE-NAME
  706.      @settitle NAME-OF-MANUAL
  707. The contents of the file follow this beginning, and then you *must* end
  708. a Texinfo file with a line like this:
  709.      @bye
  710. The `\input texinfo' line tells TeX to use the `texinfo.tex' file,
  711. which tells TeX how to translate the Texinfo @-commands into TeX
  712. typesetting commands.  (Note the use of the backslash, `\'; this is
  713. correct for TeX.)  The `@setfilename' line provides a name for the Info
  714. file and the `@settitle' line specifies a title for the page headers (or
  715. footers) of the printed manual.
  716.    The `@bye' line at the end of the file on a line of its own tells
  717. the formatters that the file is ended and to stop formatting.
  718.    Usually, you will not use quite such a spare format, but will include
  719. mode setting and start-of-header and end-of-header lines at the
  720. beginning of a Texinfo file, like this:
  721.      \input texinfo   @c -*-texinfo-*-
  722.      @c %**start of header
  723.      @setfilename INFO-FILE-NAME
  724.      @settitle NAME-OF-MANUAL
  725.      @c %**end of header
  726. In the first line, `-*-texinfo-*-' causes Emacs to switch into Texinfo
  727. mode when you edit the file.
  728.    The `@c' lines which surround the `@setfilename' and `@settitle'
  729. lines are optional, but you need them in order to run TeX or Info on
  730. just part of the file.  (*Note Start of Header::, for more information.)
  731.    Furthermore, you will usually provide a Texinfo file with a title
  732. page, indices, and the like.  But the minimum, which can be useful for
  733. short documents, is just the three lines at the beginning and the one
  734. line at the end.
  735. File: texi.info,  Node: Six Parts,  Next: Short Sample,  Prev: Minimum,  Up: Overview
  736. Six Parts of a Texinfo File
  737. ===========================
  738.    Generally, a Texinfo file contains more than the minimal beginning
  739. and end--it usually contains six parts:
  740. 1. Header
  741.      The "Header" names the file, tells TeX which definitions' file to
  742.      use, and performs other "housekeeping" tasks.
  743. 2. Summary Description and Copyright
  744.      The "Summary Description and Copyright" segment describes the
  745.      document and contains the copyright notice and copying permissions
  746.      for the Info file.  The segment must be enclosed between `@ifinfo'
  747.      and `@end ifinfo' commands so that the formatters place it only in
  748.      the Info file.
  749. 3. Title and Copyright
  750.      The "Title and Copyright" segment contains the title and copyright
  751.      pages and copying permissions for the printed manual.  The segment
  752.      must be enclosed between `@titlepage' and `@end titlepage'
  753.      commands.  The title and copyright page appear only in the printed
  754.      manual.
  755. 4. `Top' Node and Master Menu
  756.      The "Master Menu" contains a complete menu of all the nodes in the
  757.      whole Info file.  It appears only in the Info file, in the `Top'
  758.      node.
  759. 5. Body
  760.      The "Body" of the document may be structured like a traditional
  761.      book or encyclopedia or it may be free form.
  762. 6. End
  763.      The "End" contains commands for printing indices and generating
  764.      the table of contents, and the `@bye' command on a line of its own.
  765. File: texi.info,  Node: Short Sample,  Next: Acknowledgements,  Prev: Six Parts,  Up: Overview
  766. A Short Sample Texinfo File
  767. ===========================
  768.    Here is a complete but very short Texinfo file, in 6 parts.  The
  769. first three parts of the file, from `\input texinfo' through to `@end
  770. titlepage', look more intimidating than they are.  Most of the material
  771. is standard boilerplate; when you write a manual, simply insert the
  772. names for your own manual in this segment. (*Note Beginning a File::.)
  773. In the following, the sample text is *indented*; comments on it are
  774. not.  The complete file, without any comments, is shown in *Note Sample
  775. Texinfo File::.
  776. Part 1: Header
  777. --------------
  778. The header does not appear in either the Info file or the
  779. printed output.  It sets various parameters, including the
  780. name of the Info file and the title used in the header.
  781.      \input texinfo   @c -*-texinfo-*-
  782.      @c %**start of header
  783.      @setfilename sample.info
  784.      @settitle Sample Document
  785.      @c %**end of header
  786.      
  787.      @setchapternewpage odd
  788. Part 2: Summary Description and Copyright
  789. -----------------------------------------
  790. The summary description and copyright segment does not
  791. appear in the printed document.
  792.      @ifinfo
  793.      This is a short example of a complete Texinfo file.
  794.      
  795.      Copyright @copyright{} 1990 Free Software Foundation, Inc.
  796.      @end ifinfo
  797. Part 3: Titlepage and Copyright
  798. -------------------------------
  799. The titlepage segment does not appear in the Info file.
  800.      @titlepage
  801.      @sp 10
  802.      @comment The title is printed in a large font.
  803.      @center @titlefont{Sample Title}
  804.      
  805.      @c The following two commands start the copyright page.
  806.      @page
  807.      @vskip 0pt plus 1filll
  808.      Copyright @copyright{} 1990 Free Software Foundation, Inc.
  809.      @end titlepage
  810. Part 4: `Top' Node and Master Menu
  811. ----------------------------------
  812. The `Top' node contains the master menu for the Info file.
  813. Since a printed manual uses a table of contents rather than
  814. a menu, the master menu appears only in the Info file.
  815.      @node    Top,       First Chapter, (dir),    (dir)
  816.      @comment node-name, next,          previous, up
  817.      @menu
  818.      * First Chapter::    The first chapter is the
  819.                           only chapter in this sample.
  820.      * Concept Index::    This index has two entries.
  821.      @end menu
  822. Part 5:  The Body of the Document
  823. ---------------------------------
  824. The body segment contains all the text of the document, but not the
  825. indices or table of contents.  This example illustrates a node and a
  826. chapter containing an enumerated list.
  827.      @node    First Chapter, Concept Index, Top,      Top
  828.      @comment node-name,     next,          previous, up
  829.      @chapter First Chapter
  830.      @cindex Sample index entry
  831.      
  832.      This is the contents of the first chapter.
  833.      @cindex Another sample index entry
  834.      
  835.      Here is a numbered list.
  836.      
  837.      @enumerate
  838.      @item
  839.      This is the first item.
  840.      
  841.      @item
  842.      This is the second item.
  843.      @end enumerate
  844.      
  845.      The @code{makeinfo} and @code{texinfo-format-buffer}
  846.      commands transform a Texinfo file such as this into
  847.      an Info file; and @TeX{} typesets it for a printed
  848.      manual.
  849. Part 6: The End of the Document
  850. -------------------------------
  851. The end segment contains commands both for generating an index in a node
  852. and unnumbered chapter of its own and for generating the table of
  853. contents; and it contains the `@bye' command that marks the end of the
  854. document.
  855.      @node    Concept Index,    ,  First Chapter, Top
  856.      @comment node-name,    next,  previous,      up
  857.      @unnumbered Concept Index
  858.      
  859.      @printindex cp
  860.      
  861.      @contents
  862.      @bye
  863. The Results
  864. -----------
  865.    Here is what the contents of the first chapter of the sample look
  866. like:
  867.      This is the contents of the first chapter.
  868.      Here is a numbered list.
  869.        1. This is the first item.
  870.        2. This is the second item.
  871.      The `makeinfo' and `texinfo-format-buffer' commands transform a
  872.      Texinfo file such as this into an Info file; and TeX typesets it
  873.      for a printed manual.
  874. File: texi.info,  Node: Acknowledgements,  Prev: Short Sample,  Up: Overview
  875. Acknowledgements
  876. ================
  877.    Richard M. Stallman wrote Edition 1.0 of this manual.
  878. Robert J. Chassell revised and extended it, starting with Edition 1.1.
  879.    Our thanks go out to all who helped improve this work, particularly
  880. to Francois Pinard and David D. Zuhn, who tirelessly recorded and
  881. reported mistakes and obscurities; our special thanks go to
  882. Melissa Weisshaus for her frequent and often tedious reviews of nearly
  883. similar editions.  Our mistakes are our own.
  884.