* config/i386/i386.md (mmx_pinsrw): Output operands in correct
[official-gcc.git] / texinfo / doc / texinfo.texi
blob10b236a941d87b2871f8020d64d092cc8406a6ac
1 \input texinfo.tex    @c -*-texinfo-*-
2 @c $Id: texinfo.texi,v 1.1.1.1 1998/03/23 04:42:12 law Exp $
3 @c %**start of header
5 @c All text is ignored before the setfilename.
6 @setfilename texinfo
7 @settitle Texinfo @value{edition}
9 @set edition 2.24
10 @set update-month July 1997
11 @set update-date 25 @value{update-month}
13 @c Define a new index for options.
14 @defcodeindex op
15 @c Put everything except function (command, in this case) names in one
16 @c index (arbitrarily chosen to be the concept index).
17 @syncodeindex op cp
18 @syncodeindex vr cp
19 @syncodeindex pg cp
21 @footnotestyle separate
22 @paragraphindent 2
23 @finalout
24 @comment %**end of header
26 @c Before release, run C-u C-c C-u C-a (texinfo-all-menus-update with a
27 @c prefix arg).  This updates the node pointers, which texinfmt.el needs.
29 @dircategory Texinfo documentation system
30 @direntry
31 * Texinfo: (texinfo).           The GNU documentation format.
32 * install-info: (texinfo)Invoking install-info. Updating info/dir entries.
33 * texi2dvi: (texinfo)Format with texi2dvi.      Printing Texinfo documentation.
34 * texindex: (texinfo)Format with tex/texindex.  Sorting Texinfo index files.
35 * makeinfo: (texinfo)makeinfo Preferred.        Translate Texinfo source.
36 @end direntry
38 @c Set smallbook if printing in smallbook format so the example of the
39 @c smallbook font is actually written using smallbook; in bigbook, a kludge
40 @c is used for TeX output.  Do this through the -t option to texi2dvi,
41 @c so this same source can be used for other paper sizes as well.
42 @c smallbook
43 @c set smallbook
44 @c @@clear smallbook
46 @c Currently undocumented command, 5 December 1993:
48 @c nwnode          (Same as node, but no warnings; for `makeinfo'.)
50 @ifinfo
51 This file documents Texinfo, a documentation system that can produce
52 both on-line information and a printed manual from a single source file.
54 Copyright (C) 1988, 90, 91, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
56 This is the second edition of the Texinfo documentation,@*
57 and is consistent with version 2 of @file{texinfo.tex}.
59 Permission is granted to make and distribute verbatim copies of
60 this manual provided the copyright notice and this permission notice
61 are preserved on all copies.
63 @ignore
64 Permission is granted to process this file through TeX and print the
65 results, provided the printed document carries copying permission
66 notice identical to this one except for the removal of this paragraph
67 (this paragraph not being relevant to the printed manual).
69 @end ignore
70 Permission is granted to copy and distribute modified versions of this
71 manual under the conditions for verbatim copying, provided that the entire
72 resulting derived work is distributed under the terms of a permission
73 notice identical to this one.
75 Permission is granted to copy and distribute translations of this manual
76 into another language, under the above conditions for modified versions,
77 except that this permission notice may be stated in a translation approved
78 by the Free Software Foundation.
79 @end ifinfo
81 @setchapternewpage odd
83 @shorttitlepage Texinfo
85 @titlepage
86 @c use the new format for titles
87 @title Texinfo
88 @subtitle The GNU Documentation Format
89 @subtitle Edition @value{edition}, for Texinfo Version Three
90 @subtitle @value{update-month}
92 @author Robert J.@: Chassell
93 @author Richard M.@: Stallman
95 @c Include the Distribution inside the titlepage so
96 @c that headings are turned off.
98 @page
99 @vskip 0pt plus 1filll
100 Copyright @copyright{} 1988, 90, 91, 92, 93, 95, 96, 97
101 Free Software Foundation, Inc.
103 @sp 2
104 This is the second edition of the Texinfo documentation,@*
105 and is consistent with version 2 of @file{texinfo.tex}.
106 @sp 2
108 Published by the Free Software Foundation @*
109 59 Temple Place Suite 330 @*
110 Boston, MA 02111-1307 @*
111 USA @*
112 Printed copies are available for $15 each.@*
113 ISBN 1-882114-64-7
114 @c ISBN 1-882114-63-9 is for edition 2.20 of 28 February 1995
115 @c ISBN 1-882114-64-7 is for edition 2.23 of 1 October 1996.
117 Permission is granted to make and distribute verbatim copies of
118 this manual provided the copyright notice and this permission notice
119 are preserved on all copies.
121 Permission is granted to copy and distribute modified versions of this
122 manual under the conditions for verbatim copying, provided that the entire
123 resulting derived work is distributed under the terms of a permission
124 notice identical to this one.
126 Permission is granted to copy and distribute translations of this manual
127 into another language, under the above conditions for modified versions,
128 except that this permission notice may be stated in a translation approved
129 by the Free Software Foundation.
130 @sp 2
131 Cover art by Etienne Suvasa.
132 @end titlepage
134 @ifinfo
135 @node Top, Copying, (dir), (dir)
136 @top Texinfo
138 Texinfo is a documentation system that uses a single source file to
139 produce both on-line information and printed output.@refill
141 The first part of this master menu lists the major nodes in this Info
142 document, including the @@-command and concept indices.  The rest of
143 the menu lists all the lower level nodes in the document.@refill
145 This is Edition @value{edition} of the Texinfo documentation,
146 @w{@value{update-date},} for Texinfo Version Three.
147 @end ifinfo
149 @c Here is a spare copy of the chapter menu entry descriptions,
150 @c in case they are accidently deleted
151 @ignore
152 Your rights.
153 Texinfo in brief.
154 How to use Texinfo mode.
155 What is at the beginning of a Texinfo file?
156 What is at the end of a Texinfo file?
157 How to create chapters, sections, subsections,
158   appendices, and other parts.
159 How to provide structure for a document.
160 How to write nodes.
161 How to write menus.
162 How to write cross references.
163 How to mark words and phrases as code,
164   keyboard input, meta-syntactic
165   variables, and the like.
166 How to write quotations, examples, etc.
167 How to write lists and tables.
168 How to create indices.
169 How to insert @@-signs, braces, etc.
170 How to indicate results of evaluation,
171   expansion of macros, errors, etc.
172 How to force and prevent line and page breaks.
173 How to describe functions and the like in a uniform manner.
174 How to write footnotes.
175 How to specify text for either @TeX{} or Info.
176 How to print hardcopy.
177 How to create an Info file.
178 How to install an Info file
179 A list of all the Texinfo @@-commands.
180 Hints on how to write a Texinfo document.
181 A sample Texinfo file to look at.
182 Tell readers they have the right to copy
183   and distribute.
184 How to incorporate other Texinfo files.
185 How to write page headings and footings.
186 How to find formatting mistakes.
187 All about paragraph refilling.
188 A description of @@-Command syntax.
189 Texinfo second edition features.
190 A menu containing commands and variables.
191 A menu covering many topics.
192 @end ignore
194 @menu
195 * Copying::                     Your rights.
196 * Overview::                    Texinfo in brief.
197 * Texinfo Mode::                How to use Texinfo mode.
198 * Beginning a File::            What is at the beginning of a Texinfo file?
199 * Ending a File::               What is at the end of a Texinfo file?
200 * Structuring::                 How to create chapters, sections, subsections,
201                                   appendices, and other parts.
202 * Nodes::                       How to write nodes.
203 * Menus::                       How to write menus.
204 * Cross References::            How to write cross references.
205 * Marking Text::                How to mark words and phrases as code,
206                                   keyboard input, meta-syntactic
207                                   variables, and the like.
208 * Quotations and Examples::     How to write quotations, examples, etc.
209 * Lists and Tables::            How to write lists and tables.
210 * Indices::                     How to create indices.
211 * Insertions::                  How to insert @@-signs, braces, etc.
212 * Breaks::                      How to force and prevent line and page breaks.
213 * Definition Commands::         How to describe functions and the like
214                                   in a uniform manner.
215 * Footnotes::                   How to write footnotes.
216 * Conditionals::                How to specify text for either @TeX{} or Info.
217 * Macros::                      Defining new Texinfo commands.
218 * Format/Print Hardcopy::       How to convert a Texinfo file to a file
219                                   for printing and how to print that file.
220 * Create an Info File::         Convert a Texinfo file into an Info file.
221 * Install an Info File::        Make an Info file accessible to users.
222 * Command List::                All the Texinfo @@-commands.
223 * Tips::                        Hints on how to write a Texinfo document.
224 * Sample Texinfo File::         A sample Texinfo file to look at.
225 * Sample Permissions::          Tell readers they have the right to copy
226                                   and distribute.
227 * Include Files::               How to incorporate other Texinfo files.
228 * Headings::                    How to write page headings and footings.
229 * Catching Mistakes::           How to find formatting mistakes.
230 * Refilling Paragraphs::        All about paragraph refilling.
231 * Command Syntax::              A description of @@-Command syntax.
232 * Obtaining TeX::               How to Obtain @TeX{}.
233 * Command and Variable Index::  A menu containing commands and variables.
234 * Concept Index::               A menu covering many topics.
236 @detailmenu
238  --- The Detailed Node Listing ---
240 Overview of Texinfo
242 * Using Texinfo::               Create a conventional printed book
243                                   or an Info file.
244 * Info Files::                  What is an Info file?
245 * Printed Books::               Characteristics of a printed book or manual.
246 * Formatting Commands::         @@-commands are used for formatting.
247 * Conventions::                 General rules for writing a Texinfo file.
248 * Comments::                    How to write comments and mark regions that
249                                   the formatting commands will ignore.
250 * Minimum::                     What a Texinfo file must have.
251 * Six Parts::                   Usually, a Texinfo file has six parts.
252 * Short Sample::                A short sample Texinfo file.
253 * Acknowledgements::            
255 Using Texinfo Mode
257 * Texinfo Mode Overview::       How Texinfo mode can help you.
258 * Emacs Editing::               Texinfo mode adds to GNU Emacs' general
259                                   purpose editing features.
260 * Inserting::                   How to insert frequently used @@-commands.
261 * Showing the Structure::       How to show the structure of a file.
262 * Updating Nodes and Menus::    How to update or create new nodes and menus.
263 * Info Formatting::             How to format for Info.
264 * Printing::                    How to format and print part or all of a file.
265 * Texinfo Mode Summary::        Summary of all the Texinfo mode commands.
267 Updating Nodes and Menus
269 * Updating Commands::           Five major updating commands.
270 * Updating Requirements::       How to structure a Texinfo file for
271                                   using the updating command.
272 * Other Updating Commands::     How to indent descriptions, insert
273                                   missing nodes lines, and update
274                                   nodes in sequence.
276 Beginning a Texinfo File
278 * Four Parts::                  Four parts begin a Texinfo file.
279 * Sample Beginning::            Here is a sample beginning for a Texinfo file.
280 * Header::                      The very beginning of a Texinfo file.
281 * Info Summary and Permissions::  Summary and copying permissions for Info.
282 * Titlepage & Copyright Page::  Creating the title and copyright pages.
283 * The Top Node::                Creating the `Top' node and master menu.
284 * Software Copying Permissions::  Ensure that you and others continue to
285                                   have the right to use and share software.
287 The Texinfo File Header
289 * First Line::                  The first line of a Texinfo file.
290 * Start of Header::             Formatting a region requires this.
291 * setfilename::                 Tell Info the name of the Info file.
292 * settitle::                    Create a title for the printed work.
293 * setchapternewpage::           Start chapters on right-hand pages.
294 * paragraphindent::             An option to specify paragraph indentation.
295 * End of Header::               Formatting a region requires this.
297 The Title and Copyright Pages
299 * titlepage::                   Create a title for the printed document.
300 * titlefont center sp::         The @code{@@titlefont}, @code{@@center},
301                                   and @code{@@sp} commands.
302 * title subtitle author::       The @code{@@title}, @code{@@subtitle},
303                                   and @code{@@author} commands.
304 * Copyright & Permissions::     How to write the copyright notice and
305                                   include copying permissions.
306 * end titlepage::               Turn on page headings after the title and
307                                   copyright pages.
308 * headings on off::             An option for turning headings on and off
309                                   and double or single sided printing.
311 The `Top' Node and Master Menu
313 * Title of Top Node::           Sketch what the file is about.
314 * Master Menu Parts::           A master menu has three or more parts.
316 Ending a Texinfo File
318 * Printing Indices & Menus::    How to print an index in hardcopy and
319                                   generate index menus in Info.
320 * Contents::                    How to create a table of contents.
321 * File End::                    How to mark the end of a file.
323 Chapter Structuring
325 * Tree Structuring::            A manual is like an upside down tree @dots{}
326 * Structuring Command Types::   How to divide a manual into parts.
327 * makeinfo top::                The @code{@@top} command, part of the `Top' node.
328 * chapter::                     
329 * unnumbered & appendix::       
330 * majorheading & chapheading::  
331 * section::                     
332 * unnumberedsec appendixsec heading::  
333 * subsection::                  
334 * unnumberedsubsec appendixsubsec subheading::  
335 * subsubsection::               Commands for the lowest level sections.
336 * Raise/lower sections::        How to change commands' hierarchical level.
338 Nodes
340 * Two Paths::                   Different commands to structure
341                                   Info output and printed output.
342 * Node Menu Illustration::      A diagram, and sample nodes and menus.
343 * node::                        How to write a node, in detail.
344 * makeinfo Pointer Creation::   How to create node pointers with @code{makeinfo}.
346 The @code{@@node} Command
348 * Node Names::                  How to choose node and pointer names.
349 * Writing a Node::              How to write an @code{@@node} line.
350 * Node Line Tips::              Keep names short.
351 * Node Line Requirements::      Keep names unique, without @@-commands.
352 * First Node::                  How to write a `Top' node.
353 * makeinfo top command::        How to use the @code{@@top} command.
354 * Top Node Summary::            Write a brief description for readers.
356 Menus
358 * Menu Location::               Put a menu in a short node.
359 * Writing a Menu::              What is a menu?
360 * Menu Parts::                  A menu entry has three parts.
361 * Less Cluttered Menu Entry::   Two part menu entry.
362 * Menu Example::                Two and three part menu entries.
363 * Other Info Files::            How to refer to a different Info file.
365 Cross References
367 * References::                  What cross references are for.
368 * Cross Reference Commands::    A summary of the different commands.
369 * Cross Reference Parts::       A cross reference has several parts.
370 * xref::                        Begin a reference with `See' @dots{}
371 * Top Node Naming::             How to refer to the beginning of another file.
372 * ref::                         A reference for the last part of a sentence.
373 * pxref::                       How to write a parenthetical cross reference.
374 * inforef::                     How to refer to an Info-only file.
375 * uref::                        How to refer to a uniform resource locator.
377 @code{@@xref}
379 * Reference Syntax::            What a reference looks like and requires.
380 * One Argument::                @code{@@xref} with one argument.
381 * Two Arguments::               @code{@@xref} with two arguments.
382 * Three Arguments::             @code{@@xref} with three arguments.
383 * Four and Five Arguments::     @code{@@xref} with four and five arguments.
385 Marking Words and Phrases
387 * Indicating::                  How to indicate definitions, files, etc.
388 * Emphasis::                    How to emphasize text.
390 Indicating Definitions, Commands, etc.
392 * Useful Highlighting::         Highlighting provides useful information.
393 * code::                        How to indicate code.
394 * kbd::                         How to show keyboard input.
395 * key::                         How to specify keys.
396 * samp::                        How to show a literal sequence of characters.
397 * var::                         How to indicate a metasyntactic variable.
398 * file::                        How to indicate the name of a file.
399 * dfn::                         How to specify a definition.
400 * cite::                        How to refer to a book that is not in Info.
401 * url::                         How to indicate a world wide web reference.
402 * email::                       How to indicate an electronic mail address.
404 Emphasizing Text
406 * emph & strong::               How to emphasize text in Texinfo.
407 * Smallcaps::                   How to use the small caps font.
408 * Fonts::                       Various font commands for printed output.
409 * Customized Highlighting::     How to define highlighting commands.
411 Quotations and Examples
413 * Block Enclosing Commands::    Use different constructs for
414                                   different purposes.
415 * quotation::                   How to write a quotation.
416 * example::                     How to write an example in a fixed-width font.
417 * noindent::                    How to prevent paragraph indentation.
418 * Lisp Example::                How to illustrate Lisp code.
419 * smallexample & smalllisp::    Forms for the @code{@@smallbook} option.
420 * display::                     How to write an example in the current font.
421 * format::                      How to write an example that does not narrow
422                                   the margins.
423 * exdent::                      How to undo the indentation of a line.
424 * flushleft & flushright::      How to push text flushleft or flushright.
425 * cartouche::                   How to draw cartouches around examples.
427 Lists and Tables
429 * Introducing Lists::           Texinfo formats lists for you.
430 * itemize::                     How to construct a simple list.
431 * enumerate::                   How to construct a numbered list.
432 * Two-column Tables::           How to construct a two-column table.
433 * Multi-column Tables::         How to construct generalized tables.
435 Making a Two-column Table
437 * table::                       How to construct a two-column table.
438 * ftable vtable::               Automatic indexing for two-column tables.
439 * itemx::                       How to put more entries in the first column.
441 Multi-column Tables
443 * Multitable Column Widths::    Defining multitable column widths.
444 * Multitable Rows::             Defining multitable rows, with examples.
446 Creating Indices
448 * Index Entries::               Choose different words for index entries.
449 * Predefined Indices::          Use different indices for different kinds
450                                   of entry.
451 * Indexing Commands::           How to make an index entry.
452 * Combining Indices::           How to combine indices.
453 * New Indices::                 How to define your own indices.
455 Combining Indices
457 * syncodeindex::                How to merge two indices, using @code{@@code}
458                                   font for the merged-from index.
459 * synindex::                    How to merge two indices, using the
460                                   default font of the merged-to index.
462 Special Insertions
464 * Braces Atsigns::              How to insert braces, @samp{@@}.
465 * Inserting Space::             How to insert the right amount of space
466                                   within a sentence.
467 * Inserting Accents::           How to insert accents and special characters.
468 * Dots Bullets::                How to insert dots and bullets.
469 * TeX and copyright::           How to insert the @TeX{} logo
470                                   and the copyright symbol.
471 * pounds::                      How to insert the pounds currency symbol.
472 * minus::                       How to insert a minus sign.
473 * math::                        How to format a mathematical expression.
474 * Glyphs::                      How to indicate results of evaluation,
475                                   expansion of macros, errors, etc.
476 * Images::                      How to include graphics.
478 Inserting @@ and Braces
480 * Inserting An Atsign::         How to insert @samp{@@}.
481 * Inserting Braces::            How to insert @samp{@{} and @samp{@}}.
483 Inserting Space
485 * Not Ending a Sentence::       Sometimes a . doesn't end a sentence.
486 * Ending a Sentence::           Sometimes it does.
487 * Multiple Spaces::             Inserting multiple spaces.
488 * dmn::                         How to format a dimension.
490 Inserting Ellipsis, Dots, and Bullets
492 * dots::                        How to insert dots @dots{}
493 * bullet::                      How to insert a bullet.
495 Inserting @TeX{} and the Copyright Symbol
497 * tex::                         How to insert the @TeX{} logo.
498 * copyright symbol::            How to use @code{@@copyright}@{@}.
500 Glyphs for Examples
502 * Glyphs Summary::              
503 * result::                      How to show the result of expression.
504 * expansion::                   How to indicate an expansion.
505 * Print Glyph::                 How to indicate printed output.
506 * Error Glyph::                 How to indicate an error message.
507 * Equivalence::                 How to indicate equivalence.
508 * Point Glyph::                 How to indicate the location of point.
510 Glyphs Summary
512 * result::                      
513 * expansion::                   
514 * Print Glyph::                 
515 * Error Glyph::                 
516 * Equivalence::                 
517 * Point Glyph::                 
519 Making and Preventing Breaks
521 * Break Commands::              Cause and prevent splits.
522 * Line Breaks::                 How to force a single line to use two lines.
523 * - and hyphenation::           How to tell TeX about hyphenation points.
524 * w::                           How to prevent unwanted line breaks.
525 * sp::                          How to insert blank lines.
526 * page::                        How to force the start of a new page.
527 * group::                       How to prevent unwanted page breaks.
528 * need::                        Another way to prevent unwanted page breaks.
530 Definition Commands
532 * Def Cmd Template::            How to structure a description using a
533                                   definition command.
534 * Optional Arguments::          How to handle optional and repeated arguments.
535 * deffnx::                      How to group two or more `first' lines.
536 * Def Cmds in Detail::          All the definition commands.
537 * Def Cmd Conventions::         Conventions for writing definitions.
538 * Sample Function Definition::  
540 The Definition Commands
542 * Functions Commands::          Commands for functions and similar entities.
543 * Variables Commands::          Commands for variables and similar entities.
544 * Typed Functions::             Commands for functions in typed languages.
545 * Typed Variables::             Commands for variables in typed languages.
546 * Abstract Objects::            Commands for object-oriented programming.
547 * Data Types::                  The definition command for data types.
549 Footnotes
551 * Footnote Commands::           How to write a footnote in Texinfo.
552 * Footnote Styles::             Controlling how footnotes appear in Info.
554 Conditionally Visible Text
556 * Conditional Commands::        Specifying text for HTML, Info, or @TeX{}.
557 * Conditional Not Commands::    Specifying text for not HTML, Info, or @TeX{}.
558 * Raw Formatter Commands::      Using raw @TeX{} or HTML commands.
559 * set clear value::             Designating which text to format (for
560                                   all output formats); and how to set a
561                                   flag to a string that you can insert.
563 @code{@@set}, @code{@@clear}, and @code{@@value}
565 * ifset ifclear::               Format a region if a flag is set.
566 * value::                       Replace a flag with a string.
567 * value Example::               An easy way to update edition information.
569 Macros: Defining New Texinfo Commands
571 * Defining Macros::             Both defining and undefining new commands.
572 * Invoking Macros::             Using a macro, once you've defined it.
574 Format and Print Hardcopy
576 * Use TeX::                     Use @TeX{} to format for hardcopy.
577 * Format with tex/texindex::    How to format in a shell.
578 * Format with texi2dvi::        A simpler way to use the shell.
579 * Print with lpr::              How to print.
580 * Within Emacs::                How to format and print from an Emacs shell.
581 * Texinfo Mode Printing::       How to format and print in Texinfo mode.
582 * Compile-Command::             How to print using Emacs's compile command.
583 * Requirements Summary::        @TeX{} formatting requirements summary.
584 * Preparing for TeX::           What you need to do to use @TeX{}.
585 * Overfull hboxes::             What are and what to do with overfull hboxes.
586 * smallbook::                   How to print small format books and manuals.
587 * A4 Paper::                    How to print on European A4 paper.
588 * Cropmarks and Magnification::  How to print marks to indicate the size
589                                 of pages and how to print scaled up output.
591 Creating an Info File
593 * makeinfo advantages::         @code{makeinfo} provides better error checking.
594 * Invoking makeinfo::           How to run @code{makeinfo} from a shell.
595 * makeinfo options::            Specify fill-column and other options.
596 * Pointer Validation::          How to check that pointers point somewhere.
597 * makeinfo in Emacs::           How to run @code{makeinfo} from Emacs.
598 * texinfo-format commands::     Two Info formatting commands written
599                                   in Emacs Lisp are an alternative
600                                   to @code{makeinfo}.
601 * Batch Formatting::            How to format for Info in Emacs Batch mode.
602 * Tag and Split Files::         How tagged and split files help Info
603                                   to run better.
605 Installing an Info File
607 * Directory file::              The top level menu for all Info files.
608 * New Info File::               Listing a new info file.
609 * Other Info Directories::      How to specify Info files that are
610                                   located in other directories.
611 * Installing Dir Entries::      How to specify what menu entry to add
612                                   to the Info directory.
613 * Invoking install-info::       @code{install-info} options.
615 Sample Permissions
617 * Inserting Permissions::       How to put permissions in your document.
618 * ifinfo Permissions::          Sample @samp{ifinfo} copying permissions.
619 * Titlepage Permissions::       Sample Titlepage copying permissions.
621 Include Files
623 * Using Include Files::         How to use the @code{@@include} command.
624 * texinfo-multiple-files-update::  How to create and update nodes and
625                                   menus when using included files.
626 * Include File Requirements::   What @code{texinfo-multiple-files-update} expects.
627 * Sample Include File::         A sample outer file with included files
628                                   within it; and a sample included file.
629 * Include Files Evolution::     How use of the @code{@@include} command
630                                   has changed over time.
632 Page Headings
634 * Headings Introduced::         Conventions for using page headings.
635 * Heading Format::              Standard page heading formats.
636 * Heading Choice::              How to specify the type of page heading.
637 * Custom Headings::             How to create your own headings and footings.
639 Formatting Mistakes
641 * makeinfo Preferred::          @code{makeinfo} finds errors.
642 * Debugging with Info::         How to catch errors with Info formatting.
643 * Debugging with TeX::          How to catch errors with @TeX{} formatting.
644 * Using texinfo-show-structure::  How to use @code{texinfo-show-structure}.
645 * Using occur::                 How to list all lines containing a pattern.
646 * Running Info-Validate::       How to find badly referenced nodes.
648 Finding Badly Referenced Nodes
650 * Using Info-validate::         How to run @code{Info-validate}.
651 * Unsplit::                     How to create an unsplit file.
652 * Tagifying::                   How to tagify a file.
653 * Splitting::                   How to split a file manually.
655 How to Obtain @TeX{}
657 * New Texinfo Mode Commands::   The updating commands are especially useful.
658 * New Commands::                Many newly described @@-commands.
659 @end detailmenu
660 @end menu
662 @node Copying, Overview, Top, Top
663 @comment  node-name, next, previous,  up
664 @unnumbered Texinfo Copying Conditions
665 @cindex Copying conditions
666 @cindex Conditions for copying Texinfo
668 The programs currently being distributed that relate to Texinfo include
669 portions of GNU Emacs, plus other separate programs (including
670 @code{makeinfo}, @code{info}, @code{texindex}, and @file{texinfo.tex}).
671 These programs are @dfn{free}; this means that everyone is free to use
672 them and free to redistribute them on a free basis.  The Texinfo-related
673 programs are not in the public domain; they are copyrighted and there
674 are restrictions on their distribution, but these restrictions are
675 designed to permit everything that a good cooperating citizen would want
676 to do.  What is not allowed is to try to prevent others from further
677 sharing any version of these programs that they might get from
678 you.@refill
680   Specifically, we want to make sure that you have the right to give
681 away copies of the programs that relate to Texinfo, that you receive
682 source code or else can get it if you want it, that you can change these
683 programs or use pieces of them in new free programs, and that you know
684 you can do these things.@refill
686   To make sure that everyone has such rights, we have to forbid you to
687 deprive anyone else of these rights.  For example, if you distribute
688 copies of the Texinfo related programs, you must give the recipients all
689 the rights that you have.  You must make sure that they, too, receive or
690 can get the source code.  And you must tell them their rights.@refill
692   Also, for our own protection, we must make certain that everyone finds
693 out that there is no warranty for the programs that relate to Texinfo.
694 If these programs are modified by someone else and passed on, we want
695 their recipients to know that what they have is not what we distributed,
696 so that any problems introduced by others will not reflect on our
697 reputation.@refill
699   The precise conditions of the licenses for the programs currently
700 being distributed that relate to Texinfo are found in the General Public
701 Licenses that accompany them.@refill
703 @node Overview, Texinfo Mode, Copying, Top
704 @comment  node-name,  next,  previous,  up
705 @chapter Overview of Texinfo
706 @cindex Overview of Texinfo
707 @cindex Texinfo overview
709 @dfn{Texinfo}@footnote{Note that the first syllable of ``Texinfo'' is
710 pronounced like ``speck'', not ``hex''.  This odd pronunciation is
711 derived from, but is not the same as, the pronunciation of @TeX{}.  In
712 the word @TeX{}, the @samp{X} is actually the Greek letter ``chi''
713 rather than the English letter ``ex''.  Pronounce @TeX{} as if the
714 @samp{X} were the last sound in the name `Bach'; but pronounce Texinfo
715 as if the @samp{x} were a `k'.  Spell ``Texinfo'' with a capital ``T''
716 and write the other letters in lower case.}
717 is a documentation system that uses a single source file to produce both
718 on-line information and printed output.  This means that instead of
719 writing two different documents, one for the on-line help or other on-line
720 information and the other for a typeset manual or other printed work, you
721 need write only one document.  When the work is revised, you need revise
722 only one document.  (You can read the on-line information, known as an
723 @dfn{Info file}, with an Info documentation-reading program.)@refill
725 @menu
726 * Using Texinfo::               Create a conventional printed book
727                                   or an Info file.
728 * Info Files::                  What is an Info file?
729 * Printed Books::               Characteristics of a printed book or manual.
730 * Formatting Commands::         @@-commands are used for formatting.
731 * Conventions::                 General rules for writing a Texinfo file.
732 * Comments::                    How to write comments and mark regions that
733                                   the formatting commands will ignore.
734 * Minimum::                     What a Texinfo file must have.
735 * Six Parts::                   Usually, a Texinfo file has six parts.
736 * Short Sample::                A short sample Texinfo file.
737 * Acknowledgements::            
738 @end menu
740 @node Using Texinfo, Info Files, Overview, Overview
741 @ifinfo
742 @heading Using Texinfo
743 @end ifinfo
745 Using Texinfo, you can create a printed document with the normal
746 features of a book, including chapters, sections, cross references,
747 and indices.  From the same Texinfo source file, you can create a
748 menu-driven, on-line Info file with nodes, menus, cross references,
749 and indices.  You can, if you wish, make the chapters and sections of
750 the printed document correspond to the nodes of the on-line
751 information; and you use the same cross references and indices for
752 both the Info file and the printed work.  @cite{The GNU
753 Emacs Manual} is a good example of a Texinfo file, as is this manual.@refill
755 To make a printed document, you process a Texinfo source file with the
756 @TeX{} typesetting program.  This creates a DVI file that you can
757 typeset and print as a book or report.  (Note that the Texinfo language
758 is completely different from @TeX{}'s usual language, plain @TeX{}.)  If
759 you do not have @TeX{}, but do have @code{troff} or @code{nroff}, you
760 can use the @code{texi2roff} program instead.@refill
762 To make an Info file, you process a Texinfo source file with the
763 @code{makeinfo} utility or Emacs's @code{texinfo-format-buffer} command;
764 this creates an Info file that you can install on-line.@refill
766 @TeX{} and @code{texi2roff} work with many types of printers; similarly,
767 Info works with almost every type of computer terminal.  This power
768 makes Texinfo a general purpose system, but brings with it a constraint,
769 which is that a Texinfo file may contain only the customary
770 ``typewriter'' characters (letters, numbers, spaces, and punctuation
771 marks) but no special graphics.@refill
773 A Texinfo file is a plain @sc{ascii} file containing text and
774 @dfn{@@-commands} (words preceded by an @samp{@@}) that tell the
775 typesetting and formatting programs what to do.  You may edit a
776 Texinfo file with any text editor; but it is especially convenient to
777 use GNU Emacs since that editor has a special mode, called Texinfo
778 mode, that provides various Texinfo-related features.  (@xref{Texinfo
779 Mode}.)@refill
781 Before writing a Texinfo source file, you should become familiar with
782 the Info documentation reading program and learn about nodes,
783 menus, cross references, and the rest.  (@inforef{Top, info, info},
784 for more information.)@refill
786 You can use Texinfo to create both on-line help and printed manuals;
787 moreover, Texinfo is freely redistributable.  For these reasons, Texinfo
788 is the format in which documentation for GNU utilities and libraries is
789 written.@refill
791 @node Info Files, Printed Books, Using Texinfo, Overview
792 @comment  node-name,  next,  previous,  up
793 @section Info files
794 @cindex Info files
796 An Info file is a Texinfo file formatted so that the Info documentation
797 reading program can operate on it.  (@code{makeinfo}
798 and @code{texinfo-format-buffer} are two commands that convert a Texinfo file
799 into an Info file.)@refill
801 Info files are divided into pieces called @dfn{nodes}, each of which
802 contains the discussion of one topic.  Each node has a name, and
803 contains both text for the user to read and pointers to other nodes,
804 which are identified by their names.  The Info program displays one node
805 at a time, and provides commands with which the user can move to other
806 related nodes.@refill
808 @ifinfo
809 @inforef{Top, info, info}, for more information about using Info.@refill
810 @end ifinfo
812 Each node of an Info file may have any number of child nodes that
813 describe subtopics of the node's topic.  The names of child
814 nodes are listed in a @dfn{menu} within the parent node; this
815 allows you to use certain Info commands to move to one of the child
816 nodes.  Generally, an Info file is organized like a book.  If a node
817 is at the logical level of a chapter, its child nodes are at the level
818 of sections; likewise, the child nodes of sections are at the level
819 of subsections.@refill
821 All the children of any one parent are linked together in a
822 bidirectional chain of `Next' and `Previous' pointers.  The `Next'
823 pointer provides a link to the next section, and the `Previous' pointer
824 provides a link to the previous section.  This means that all the nodes
825 that are at the level of sections within a chapter are linked together.
826 Normally the order in this chain is the same as the order of the
827 children in the parent's menu.  Each child node records the parent node
828 name as its `Up' pointer.  The last child has no `Next' pointer, and the
829 first child has the parent both as its `Previous' and as its `Up'
830 pointer.@footnote{In some documents, the first child has no `Previous'
831 pointer.  Occasionally, the last child has the node name of the next
832 following higher level node as its `Next' pointer.}@refill
834 The book-like structuring of an Info file into nodes that correspond
835 to chapters, sections, and the like is a matter of convention, not a
836 requirement.  The `Up', `Previous', and `Next' pointers of a node can
837 point to any other nodes, and a menu can contain any other nodes.
838 Thus, the node structure can be any directed graph.  But it is usually
839 more comprehensible to follow a structure that corresponds to the
840 structure of chapters and sections in a printed book or report.@refill
842 In addition to menus and to `Next', `Previous', and `Up' pointers, Info
843 provides pointers of another kind, called references, that can be
844 sprinkled throughout the text.  This is usually the best way to
845 represent links that do not fit a hierarchical structure.@refill
847 Usually, you will design a document so that its nodes match the
848 structure of chapters and sections in the printed output.  But
849 occasionally there are times when this is not right for the material
850 being discussed.  Therefore, Texinfo uses separate commands to specify
851 the node structure for the Info file and the section structure for the
852 printed output.@refill
854 Generally, you enter an Info file through a node that by convention is
855 named `Top'.  This node normally contains just a brief summary of the
856 file's purpose, and a large menu through which the rest of the file is
857 reached.  From this node, you can either traverse the file
858 systematically by going from node to node, or you can go to a specific
859 node listed in the main menu, or you can search the index menus and then
860 go directly to the node that has the information you want.  Alternatively,
861 with the standalone Info program, you can specify specific menu items on
862 the command line (@pxref{Top,,, info, Info}).
864 If you want to read through an Info file in sequence, as if it were a
865 printed manual, you can hit @key{SPC} repeatedly, or you get the whole
866 file with the advanced Info command @kbd{g *}.  (@inforef{Expert,
867 Advanced Info commands, info}.)@refill
869 @c !!! dir file may be located in one of many places:
870 @c     /usr/local/emacs/info            mentioned in info.c DEFAULT_INFOPATH
871 @c     /usr/local/lib/emacs/info        mentioned in info.c DEFAULT_INFOPATH
872 @c     /usr/gnu/info                    mentioned in info.c DEFAULT_INFOPATH
873 @c     /usr/local/info
874 @c     /usr/local/lib/info
875 The @file{dir} file in the @file{info} directory serves as the
876 departure point for the whole Info system.  From it, you can reach the
877 `Top' nodes of each of the documents in a complete Info system.@refill
879 @node Printed Books, Formatting Commands, Info Files, Overview
880 @comment  node-name,  next,  previous,  up
881 @section Printed Books
882 @cindex Printed book and manual characteristics
883 @cindex Manual characteristics, printed
884 @cindex Book characteristics, printed
885 @cindex Texinfo printed book characteristics
886 @cindex Characteristics, printed books or manuals
888 @cindex Knuth, Donald
889 A Texinfo file can be formatted and typeset as a printed book or manual.
890 To do this, you need @TeX{}, a powerful, sophisticated typesetting
891 program written by Donald Knuth.@footnote{You can also use the
892 @code{texi2roff} program if you do not have @TeX{}; since Texinfo is
893 designed for use with @TeX{}, @code{texi2roff} is not described here.
894 @code{texi2roff} is not part of the standard GNU distribution.}
896 A Texinfo-based book is similar to any other typeset, printed work: it
897 can have a title page, copyright page, table of contents, and preface,
898 as well as chapters, numbered or unnumbered sections and subsections,
899 page headers, cross references, footnotes, and indices.@refill
901 You can use Texinfo to write a book without ever having the intention
902 of converting it into on-line information.  You can use Texinfo for
903 writing a printed novel, and even to write a printed memo, although
904 this latter application is not recommended since electronic mail is so
905 much easier.@refill
907 @TeX{} is a general purpose typesetting program.  Texinfo provides a
908 file called @file{texinfo.tex} that contains information (definitions or
909 @dfn{macros}) that @TeX{} uses when it typesets a Texinfo file.
910 (@file{texinfo.tex} tells @TeX{} how to convert the Texinfo @@-commands
911 to @TeX{} commands, which @TeX{} can then process to create the typeset
912 document.)  @file{texinfo.tex} contains the specifications for printing
913 a document.@refill
915 Most often, documents are printed on 8.5 inch by 11 inch
916 pages (216@dmn{mm} by 280@dmn{mm}; this is the default size), but you
917 can also print for 7 inch by 9.25 inch pages (178@dmn{mm} by
918 235@dmn{mm}; the @code{@@smallbook} size) or on European A4 size paper
919 (@code{@@afourpaper}).  (@xref{smallbook, , Printing ``Small'' Books}.
920 Also, see @ref{A4 Paper, ,Printing on A4 Paper}.)@refill
922 By changing the parameters in @file{texinfo.tex}, you can change the
923 size of the printed document.  In addition, you can change the style in
924 which the printed document is formatted; for example, you can change the
925 sizes and fonts used, the amount of indentation for each paragraph, the
926 degree to which words are hyphenated, and the like.  By changing the
927 specifications, you can make a book look dignified, old and serious, or
928 light-hearted, young and cheery.@refill
930 @TeX{} is freely distributable.  It is written in a superset of Pascal
931 called WEB and can be compiled either in Pascal or (by using a
932 conversion program that comes with the @TeX{} distribution) in C.
933 (@xref{TeX Mode, ,@TeX{} Mode, emacs, The GNU Emacs Manual}, for information
934 about @TeX{}.)@refill
936 @TeX{} is very powerful and has a great many features.  Because a
937 Texinfo file must be able to present information both on a
938 character-only terminal in Info form and in a typeset book, the
939 formatting commands that Texinfo supports are necessarily
940 limited.@refill
942 @xref{Obtaining TeX, , How to Obtain @TeX{}}.
945 @node Formatting Commands, Conventions, Printed Books, Overview
946 @comment  node-name,  next,  previous,  up
947 @section @@-commands
948 @cindex @@-commands
949 @cindex Formatting commands
951 In a Texinfo file, the commands that tell @TeX{} how to typeset the
952 printed manual and tell @code{makeinfo} and
953 @code{texinfo-format-buffer} how to create an Info file are preceded
954 by @samp{@@}; they are called @dfn{@@-commands}.  For example,
955 @code{@@node} is the command to indicate a node and @code{@@chapter}
956 is the command to indicate the start of a chapter.@refill
958 @quotation
959 @strong{Please note:} All the @@-commands, with the exception of the
960 @code{@@TeX@{@}} command, must be written entirely in lower
961 case.@refill
962 @end quotation
964 The Texinfo @@-commands are a strictly limited set of constructs.  The
965 strict limits make it possible for Texinfo files to be understood both
966 by @TeX{} and by the code that converts them into Info files.  You can
967 display Info files on any terminal that displays alphabetic and
968 numeric characters.  Similarly, you can print the output generated by
969 @TeX{} on a wide variety of printers.@refill
971 Depending on what they do or what arguments@footnote{The word
972 @dfn{argument} comes from the way it is used in mathematics and does
973 not refer to a disputation between two people; it refers to the
974 information presented to the command.  According to the @cite{Oxford
975 English Dictionary}, the word derives from the Latin for @dfn{to make
976 clear, prove}; thus it came to mean `the evidence offered as proof',
977 which is to say, `the information offered', which led to its
978 mathematical meaning.  In its other thread of derivation, the word
979 came to mean `to assert in a manner against which others may make
980 counter assertions', which led to the meaning of `argument' as a
981 disputation.} they take, you need to write @@-commands on lines of
982 their own or as part of sentences:@refill
984 @itemize @bullet
985 @item
986 Write a command such as @code{@@noindent} at the beginning of a line as
987 the only text on the line.  (@code{@@noindent} prevents the beginning of
988 the next line from being indented as the beginning of a
989 paragraph.)@refill
991 @item
992 Write a command such as @code{@@chapter} at the beginning of a line
993 followed by the command's arguments, in this case the chapter title, on
994 the rest of the line.  (@code{@@chapter} creates chapter titles.)@refill
996 @item
997 Write a command such as @code{@@dots@{@}} wherever you wish but usually
998 within a sentence. (@code{@@dots@{@}} creates dots @dots{})@refill
1000 @item
1001 Write a command such as @code{@@code@{@var{sample-code}@}} wherever you
1002 wish (but usually within a sentence) with its argument,
1003 @var{sample-code} in this example, between the braces.  (@code{@@code}
1004 marks text as being code.)@refill
1006 @item
1007 Write a command such as @code{@@example} at the beginning of a line of
1008 its own; write the body-text on following lines; and write the matching
1009 @code{@@end} command, @code{@@end example} in this case, at the
1010 beginning of a line of its own after the body-text. (@code{@@example}
1011 @dots{} @code{@@end example} indents and typesets body-text as an
1012 example.)@refill
1013 @end itemize
1015 @noindent
1016 @cindex Braces, when to use
1017 As a general rule, a command requires braces if it mingles among other
1018 text; but it does not need braces if it starts a line of its own.  The
1019 non-alphabetic commands, such as @code{@@:}, are exceptions to the rule;
1020 they do not need braces.@refill
1022 As you gain experience with Texinfo, you will rapidly learn how to
1023 write the different commands: the different ways to write commands
1024 make it easier to write and read Texinfo files than if all commands
1025 followed exactly the same syntax.  (For details about @@-command
1026 syntax, see @ref{Command Syntax, , @@-Command Syntax}.)@refill
1028 @node Conventions, Comments, Formatting Commands, Overview
1029 @comment  node-name,  next,  previous,  up
1030 @section General Syntactic Conventions
1031 @cindex General syntactic conventions
1032 @cindex Syntactic conventions
1033 @cindex Conventions, syntactic
1035 All printable @sc{ascii} characters except @samp{@@}, @samp{@{} and
1036 @samp{@}} can appear in a Texinfo file and stand for themselves.
1037 @samp{@@} is the escape character which introduces commands.
1038 @samp{@{} and @samp{@}} should be used only to surround arguments to
1039 certain commands.  To put one of these special characters into the
1040 document, put an @samp{@@} character in front of it, like this:
1041 @samp{@@@@}, @samp{@@@{}, and @samp{@@@}}.@refill
1043 @ifinfo
1044 It is customary in @TeX{} to use doubled single-quote characters to
1045 begin and end quotations: ` ` and ' ' (but without a space between the
1046 two single-quote characters).  This convention should be followed in
1047 Texinfo files.  @TeX{} converts doubled single-quote characters to
1048 left- and right-hand doubled quotation marks and Info converts doubled
1049 single-quote characters to @sc{ascii} double-quotes: ` ` and ' ' to " .@refill
1050 @end ifinfo
1051 @iftex
1052 It is customary in @TeX{} to use doubled single-quote characters to
1053 begin and end quotations: @w{@tt{ `` }} and @w{@tt{ '' }}.  This
1054 convention should be followed in Texinfo files.  @TeX{} converts
1055 doubled single-quote characters to left- and right-hand doubled
1056 quotation marks, ``like this'', and Info converts doubled single-quote
1057 characters to @sc{ascii} double-quotes: @w{@tt{ `` }} and
1058 @w{@tt{ '' }} to @w{@tt{ " }}.@refill
1059 @end iftex
1061 Use three hyphens in a row, @samp{---}, for a dash---like this.  In
1062 @TeX{}, a single or double hyphen produces a printed dash that is
1063 shorter than the usual typeset dash. Info reduces three hyphens to two
1064 for display on the screen.
1066 To prevent a paragraph from being indented in the printed manual, put
1067 the command @code{@@noindent} on a line by itself before the
1068 paragraph.@refill
1070 If you mark off a region of the Texinfo file with the @code{@@iftex}
1071 and @w{@code{@@end iftex}} commands, that region will appear only in
1072 the printed copy; in that region, you can use certain commands
1073 borrowed from plain @TeX{} that you cannot use in Info.  Likewise, if
1074 you mark off a region with the @code{@@ifinfo} and @code{@@end ifinfo}
1075 commands, that region will appear only in the Info file; in that
1076 region, you can use Info commands that you cannot use in @TeX{}.
1077 Similarly for @code{@@ifhtml @dots{} @@end ifhtml},
1078 @code{@@ifnothtml @dots{} @@end ifnothtml},
1079 @code{@@ifnotinfo @dots{} @@end ifnotinfo},
1080 @code{@@ifnottex @dots{} @@end ifnottex},
1081 @xref{Conditionals}.
1083 @cindex Tabs; don't use!
1084 @quotation
1085 @strong{Caution:} Do not use tabs in a Texinfo file!  @TeX{} uses
1086 variable-width fonts, which means that it cannot predefine a tab to work
1087 in all circumstances.  Consequently, @TeX{} treats tabs like single
1088 spaces, and that is not what they look like.  Furthermore,
1089 @code{makeinfo} does nothing special with tabs, and thus a tab character
1090 in your input file may appear differently in the output.
1092 @noindent
1093 To avoid this problem, Texinfo mode causes GNU Emacs to insert multiple
1094 spaces when you press the @key{TAB} key.@refill
1096 @noindent
1097 Also, you can run @code{untabify} in Emacs to convert tabs in a region
1098 to multiple spaces.@refill
1100 @noindent
1101 Don't use tabs.
1102 @end quotation
1104 @node Comments, Minimum, Conventions, Overview
1105 @comment  node-name,  next,  previous,  up
1106 @section Comments
1108 You can write comments in a Texinfo file that will not appear in
1109 either the Info file or the printed manual by using the
1110 @code{@@comment} command (which may be abbreviated to @code{@@c}).
1111 Such comments are for the person who reads the Texinfo file.  All the
1112 text on a line that follows either @code{@@comment} or @code{@@c} is a
1113 comment; the rest of the line does not appear in either the Info file
1114 or the printed manual. (Often, you can write the @code{@@comment} or
1115 @code{@@c} in the middle of a line, and only the text that follows after
1116 the @code{@@comment} or @code{@@c} command does not appear; but some
1117 commands, such as @code{@@settitle} and @code{@@setfilename}, work on a
1118 whole line.  You cannot use @code{@@comment} or @code{@@c} in a line
1119 beginning with such a command.)@refill
1120 @cindex Comments
1121 @findex comment
1122 @findex c @r{(comment)}
1124 You can write long stretches of text that will not appear in either
1125 the Info file or the printed manual by using the @code{@@ignore} and
1126 @code{@@end ignore} commands.  Write each of these commands on a line
1127 of its own, starting each command at the beginning of the line.  Text
1128 between these two commands does not appear in the processed output.
1129 You can use @code{@@ignore} and @code{@@end ignore} for writing
1130 comments.  Often, @code{@@ignore} and @code{@@end ignore} is used
1131 to enclose a part of the copying permissions that applies to the
1132 Texinfo source file of a document, but not to the Info or printed
1133 version of the document.@refill
1134 @cindex Ignored text
1135 @cindex Unprocessed text
1136 @findex ignore
1137 @c !!! Perhaps include this comment about ignore and ifset:
1138 @ignore
1139 Text enclosed by @code{@@ignore} or by failing @code{@@ifset} or
1140 @code{@@ifclear} conditions is ignored in the sense that it will not
1141 contribute to the formatted output.  However, TeX and makeinfo must
1142 still parse the ignored text, in order to understand when to
1143 @emph{stop} ignoring text from the source file; that means that you
1144 will still get error messages if you have invalid Texinfo markup
1145 within ignored text.
1146 @end ignore
1148 @node Minimum, Six Parts, Comments, Overview
1149 @comment  node-name,  next,  previous,  up
1150 @section What a Texinfo File Must Have
1151 @cindex Minimal Texinfo file (requirements)
1152 @cindex Must have in Texinfo file
1153 @cindex Required in Texinfo file
1154 @cindex Texinfo file minimum
1156 By convention, the names of Texinfo files end with one of the
1157 extensions @file{.texinfo}, @file{.texi}, or @file{.tex}.  The longer
1158 extension is preferred since it describes more clearly to a human
1159 reader the nature of the file.  The shorter extensions are for
1160 operating systems that cannot handle long file names.@refill
1162 In order to be made into a printed manual and an Info file, a Texinfo
1163 file @strong{must} begin with lines like this:@refill
1165 @example
1166 @group
1167 \input texinfo
1168 @@setfilename @var{info-file-name}
1169 @@settitle @var{name-of-manual}
1170 @end group
1171 @end example
1173 @noindent
1174 The contents of the file follow this beginning, and then you @strong{must} end
1175 a Texinfo file with a line like this:@refill
1177 @example
1178 @@bye
1179 @end example
1181 @findex input @r{(@TeX{} command)}
1182 @noindent
1183 The @samp{\input texinfo} line tells @TeX{} to use the
1184 @file{texinfo.tex} file, which tells @TeX{} how to translate the Texinfo
1185 @@-commands into @TeX{} typesetting commands.  (Note the use of the
1186 backslash, @samp{\}; this is correct for @TeX{}.)  The
1187 @samp{@@setfilename} line provides a name for the Info file and tells
1188 @TeX{} to open auxiliary files.  The @samp{@@settitle} line specifies a
1189 title for the page headers (or footers) of the printed manual.@refill
1191 The @code{@@bye} line at the end of the file on a line of its own tells
1192 the formatters that the file is ended and to stop formatting.@refill
1194 Usually, you will not use quite such a spare format, but will include
1195 mode setting and start-of-header and end-of-header lines at the
1196 beginning of a Texinfo file, like this:@refill
1198 @example
1199 @group
1200 \input texinfo   @@c -*-texinfo-*-
1201 @@c %**start of header
1202 @@setfilename @var{info-file-name}
1203 @@settitle @var{name-of-manual}
1204 @@c %**end of header
1205 @end group
1206 @end example
1208 @noindent
1209 In the first line, @samp{-*-texinfo-*-} causes Emacs to switch into
1210 Texinfo mode when you edit the file.
1212 The @code{@@c} lines which surround the @samp{@@setfilename} and
1213 @samp{@@settitle} lines are optional, but you need them in order to
1214 run @TeX{} or Info on just part of the file.  (@xref{Start of Header},
1215 for more information.)@refill
1217 Furthermore, you will usually provide a Texinfo file with a title
1218 page, indices, and the like.  But the minimum, which can be useful
1219 for short documents, is just the three lines at the beginning and the
1220 one line at the end.@refill
1222 @node Six Parts, Short Sample, Minimum, Overview
1223 @comment  node-name,  next,  previous,  up
1224 @section Six Parts of a Texinfo File
1226 Generally, a Texinfo file contains more than the minimal
1227 beginning and end---it usually contains six parts:@refill
1229 @table @r
1230 @item 1. Header
1231 The @dfn{Header} names the file, tells @TeX{} which definitions' file to
1232 use, and performs other ``housekeeping'' tasks.@refill
1234 @item 2. Summary Description and Copyright
1235 The @dfn{Summary Description and Copyright} segment describes the document
1236 and contains the copyright notice and copying permissions for the Info
1237 file.  The segment must be enclosed between @code{@@ifinfo} and
1238 @code{@@end ifinfo} commands so that the formatters place it only in the Info
1239 file.@refill
1241 @item 3. Title and Copyright
1242 The @dfn{Title and Copyright} segment contains the title and copyright pages
1243 and copying permissions for the printed manual.  The segment must be
1244 enclosed between @code{@@titlepage} and @code{@@end titlepage} commands.
1245 The title and copyright page appear only in the printed @w{manual}.@refill
1247 @item 4. `Top' Node and Master Menu
1248 The @dfn{Master Menu} contains a complete menu of all the nodes in the whole
1249 Info file.  It appears only in the Info file, in the `Top' node.@refill
1251 @item 5. Body
1252 The @dfn{Body} of the document may be structured like a traditional book or
1253 encyclopedia or it may be free form.@refill
1255 @item 6. End
1256 The @dfn{End} contains commands for printing indices and generating
1257 the table of contents, and the @code{@@bye} command on a line of its
1258 own.@refill
1259 @end table
1261 @node Short Sample, Acknowledgements, Six Parts, Overview
1262 @comment  node-name,  next,  previous,  up
1263 @section A Short Sample Texinfo File
1264 @cindex Sample Texinfo file
1266 Here is a complete but very short Texinfo file, in six parts.  The first
1267 three parts of the file, from @samp{\input texinfo} through to
1268 @samp{@@end titlepage}, look more intimidating than they are.  Most of
1269 the material is standard boilerplate; when you write a manual, simply
1270 insert the names for your own manual in this segment. (@xref{Beginning a
1271 File}.)@refill
1273 @noindent
1274 In the following, the sample text is @emph{indented}; comments on it are
1275 not.  The complete file, without any comments, is shown in
1276 @ref{Sample Texinfo File}.
1278 @subheading Part 1: Header
1280 @noindent
1281 The header does not appear in either the Info file or the
1282 printed output.  It sets various parameters, including the
1283 name of the Info file and the title used in the header.
1285 @example
1286 @group
1287 \input texinfo   @@c -*-texinfo-*-
1288 @@c %**start of header
1289 @@setfilename sample.info
1290 @@settitle Sample Document
1291 @@c %**end of header
1293 @@setchapternewpage odd
1294 @end group
1295 @end example
1297 @subheading Part 2: Summary Description and Copyright
1299 @noindent
1300 The summary description and copyright segment does not
1301 appear in the printed document.
1303 @example
1304 @group
1305 @@ifinfo
1306 This is a short example of a complete Texinfo file.
1308 Copyright @@copyright@{@} 1990 Free Software Foundation, Inc.
1309 @@end ifinfo
1310 @end group
1311 @end example
1313 @subheading Part 3: Titlepage and Copyright
1315 @noindent
1316 The titlepage segment does not appear in the Info file.
1318 @example
1319 @group
1320 @@titlepage
1321 @@sp 10
1322 @@comment The title is printed in a large font.
1323 @@center @@titlefont@{Sample Title@}
1324 @end group
1326 @group
1327 @@c The following two commands start the copyright page.
1328 @@page
1329 @@vskip 0pt plus 1filll
1330 Copyright @@copyright@{@} 1990 Free Software Foundation, Inc.
1331 @@end titlepage
1332 @end group
1333 @end example
1335 @subheading Part 4: `Top' Node and Master Menu
1337 @noindent
1338 The `Top' node contains the master menu for the Info file.
1339 Since a printed manual uses a table of contents rather than
1340 a menu, the master menu appears only in the Info file.
1342 @example
1343 @group
1344 @@node    Top,       First Chapter, ,         (dir)
1345 @@comment node-name, next,          previous, up
1346 @end group
1347 @end example
1349 @example
1350 @group
1351 @@menu
1352 * First Chapter::    The first chapter is the
1353                      only chapter in this sample.
1354 * Concept Index::    This index has two entries.
1355 @@end menu
1356 @end group
1357 @end example
1359 @subheading Part 5:  The Body of the Document
1361 @noindent
1362 The body segment contains all the text of the document, but not the
1363 indices or table of contents.  This example illustrates a node and a
1364 chapter containing an enumerated list.@refill
1366 @example
1367 @group
1368 @@node    First Chapter, Concept Index, Top,      Top
1369 @@comment node-name,     next,          previous, up
1370 @@chapter First Chapter
1371 @@cindex Sample index entry
1372 @end group
1374 @group
1375 This is the contents of the first chapter.
1376 @@cindex Another sample index entry
1377 @end group
1379 @group
1380 Here is a numbered list.
1382 @@enumerate
1383 @@item
1384 This is the first item.
1386 @@item
1387 This is the second item.
1388 @@end enumerate
1389 @end group
1391 @group
1392 The @@code@{makeinfo@} and @@code@{texinfo-format-buffer@}
1393 commands transform a Texinfo file such as this into
1394 an Info file; and @@TeX@{@} typesets it for a printed
1395 manual.
1396 @end group
1397 @end example
1399 @subheading Part 6: The End of the Document
1401 @noindent
1402 The end segment contains commands both for generating an index in a node
1403 and unnumbered chapter of its own and for generating the table of
1404 contents; and it contains the @code{@@bye} command that marks the end of
1405 the document.@refill
1407 @example
1408 @group
1409 @@node    Concept Index,    ,  First Chapter, Top
1410 @@comment node-name,    next,  previous,      up
1411 @@unnumbered Concept Index
1412 @end group
1414 @group
1415 @@printindex cp
1417 @@contents
1418 @@bye
1419 @end group
1420 @end example
1422 @subheading The Results
1424 Here is what the contents of the first chapter of the sample look like:
1426 @sp 1
1427 @need 700
1428 @quotation
1429 This is the contents of the first chapter.
1431 Here is a numbered list.
1433 @enumerate
1434 @item
1435 This is the first item.
1437 @item
1438 This is the second item.
1439 @end enumerate
1441 The @code{makeinfo} and @code{texinfo-format-buffer}
1442 commands transform a Texinfo file such as this into
1443 an Info file; and @TeX{} typesets it for a printed
1444 manual.
1445 @end quotation
1447 @node Acknowledgements,  , Short Sample, Overview
1448 @comment  node-name,  next,  previous,  up
1449 @section Acknowledgements
1451 @cindex Stallman, Richard M.
1452 @cindex Chassell, Robert J.
1453 @cindex Berry, Karl
1454 Richard M.@: Stallman wrote Edition 1.0 of this manual.  @w{Robert J.@:
1455 Chassell} revised and extended it, starting with Edition 1.1.  Karl
1456 Berry made updates for the Texinfo 3.8 and subsequent releases, starting
1457 with Edition 2.22.
1459 @cindex Pinard, Fran@,{c}ois
1460 @cindex Zuhn, David D.
1461 @cindex Weisshaus, Melissa
1462 Our thanks go out to all who helped improve this work, particularly to
1463 Fran@,{c}ois Pinard and @w{David D.@: Zuhn}, who tirelessly recorded and
1464 reported mistakes and obscurities; our special thanks go to Melissa
1465 Weisshaus for her frequent and often tedious reviews of nearly similar
1466 editions.  Our mistakes are our own.
1468 Please send suggestions and corrections to:
1470 @example
1471 @group
1472 @r{Internet address:}
1473     bug-texinfo@@prep.ai.mit.edu
1474 @end group
1475 @end example
1477 @noindent
1478 Please include the manual's edition number and update date in your messages.
1480 @node Texinfo Mode, Beginning a File, Overview, Top
1481 @comment  node-name,  next,  previous,  up
1482 @chapter Using Texinfo Mode
1483 @cindex Texinfo mode
1484 @cindex Mode, using Texinfo
1485 @cindex GNU Emacs
1486 @cindex Emacs
1488 You may edit a Texinfo file with any text editor you choose.  A Texinfo
1489 file is no different from any other @sc{ascii} file.  However, GNU Emacs
1490 comes with a special mode, called Texinfo
1491 mode, that provides  Emacs commands and tools to help ease your work.@refill
1493 This chapter describes features of GNU Emacs' Texinfo mode but not any
1494 features of the Texinfo formatting language.  If you are reading this
1495 manual straight through from the beginning, you may want to skim through
1496 this chapter briefly and come back to it after reading succeeding
1497 chapters which describe the Texinfo formatting language in
1498 detail.@refill
1500 @menu
1501 * Texinfo Mode Overview::       How Texinfo mode can help you.
1502 * Emacs Editing::               Texinfo mode adds to GNU Emacs' general
1503                                   purpose editing features.
1504 * Inserting::                   How to insert frequently used @@-commands.
1505 * Showing the Structure::       How to show the structure of a file.
1506 * Updating Nodes and Menus::    How to update or create new nodes and menus.
1507 * Info Formatting::             How to format for Info.
1508 * Printing::                    How to format and print part or all of a file.
1509 * Texinfo Mode Summary::        Summary of all the Texinfo mode commands.
1510 @end menu
1512 @node Texinfo Mode Overview, Emacs Editing, Texinfo Mode, Texinfo Mode
1513 @ifinfo
1514 @heading Texinfo Mode Overview
1515 @end ifinfo
1517 Texinfo mode provides special features for working with Texinfo
1518 files:@refill
1520 @itemize @bullet
1521 @item
1522 Insert frequently used @@-commands. @refill
1524 @item
1525 Automatically create @code{@@node} lines.
1527 @item
1528 Show the structure of a Texinfo source file.@refill
1530 @item
1531 Automatically create or update the `Next',
1532 `Previous', and `Up' pointers of a node.
1534 @item
1535 Automatically create or update menus.@refill
1537 @item
1538 Automatically create a master menu.@refill
1540 @item
1541 Format a part or all of a file for Info.@refill
1543 @item
1544 Typeset and print part or all of a file.@refill
1545 @end itemize
1547 Perhaps the two most helpful features are those for inserting frequently
1548 used @@-commands and for creating node pointers and menus.@refill
1550 @node Emacs Editing, Inserting, Texinfo Mode Overview, Texinfo Mode
1551 @section The Usual GNU Emacs Editing Commands
1553 In most cases, the usual Text mode commands work the same in Texinfo
1554 mode as they do in Text mode.  Texinfo mode adds new editing commands
1555 and tools to GNU Emacs' general purpose editing features.  The major
1556 difference concerns filling.  In Texinfo mode, the paragraph
1557 separation variable and syntax table are redefined so that Texinfo
1558 commands that should be on lines of their own are not inadvertently
1559 included in paragraphs.  Thus, the @kbd{M-q} (@code{fill-paragraph})
1560 command will refill a paragraph but not mix an indexing command on a
1561 line adjacent to it into the paragraph.@refill
1563 In addition, Texinfo mode sets the @code{page-delimiter} variable to
1564 the value of @code{texinfo-chapter-level-regexp}; by default, this is
1565 a regular expression matching the commands for chapters and their
1566 equivalents, such as appendices.  With this value for the page
1567 delimiter, you can jump from chapter title to chapter title with the
1568 @kbd{C-x ]} (@code{forward-page}) and @kbd{C-x [}
1569 (@code{backward-page}) commands and narrow to a chapter with the
1570 @kbd{C-x p} (@code{narrow-to-page}) command.  (@xref{Pages, , ,emacs,
1571 The GNU Emacs Manual}, for details about the page commands.)@refill
1573 You may name a Texinfo file however you wish, but the convention is to
1574 end a Texinfo file name with one of the three extensions
1575 @file{.texinfo}, @file{.texi}, or @file{.tex}.  A longer extension is
1576 preferred, since it is explicit, but a shorter extension may be
1577 necessary for operating systems that limit the length of file names.
1578 GNU Emacs automatically enters Texinfo mode when you visit a file with
1579 a @file{.texinfo} or  @file{.texi}
1580 extension.  Also, Emacs switches to Texinfo mode
1581 when you visit a
1582 file that has @samp{-*-texinfo-*-} in its first line.  If ever you are
1583 in another mode and wish to switch to Texinfo mode, type @code{M-x
1584 texinfo-mode}.@refill
1586 Like all other Emacs features, you can customize or enhance Texinfo
1587 mode as you wish.  In particular, the keybindings are very easy to
1588 change.  The keybindings described here are the default or standard
1589 ones.@refill
1591 @node Inserting, Showing the Structure, Emacs Editing, Texinfo Mode
1592 @comment  node-name,  next,  previous,  up
1593 @section Inserting Frequently Used Commands
1594 @cindex Inserting frequently used commands
1595 @cindex Frequently used commands, inserting
1596 @cindex Commands, inserting them
1598 Texinfo mode provides commands to insert various frequently used
1599 @@-commands into the buffer.  You can use these commands to save
1600 keystrokes.@refill
1602 The insert commands are invoked by typing @kbd{C-c} twice and then the
1603 first letter of the @@-command:@refill
1605 @table @kbd
1606 @item  C-c C-c c
1607 @itemx M-x texinfo-insert-@@code
1608 @findex texinfo-insert-@@code
1609 Insert @code{@@code@{@}} and put the
1610 cursor between the braces.@refill
1612 @item  C-c C-c d
1613 @itemx M-x texinfo-insert-@@dfn
1614 @findex texinfo-insert-@@dfn
1615 Insert @code{@@dfn@{@}} and put the
1616 cursor between the braces.@refill
1618 @item  C-c C-c e
1619 @itemx M-x texinfo-insert-@@end
1620 @findex texinfo-insert-@@end
1621 Insert @code{@@end} and attempt to insert the correct following word,
1622 such as @samp{example} or @samp{table}.  (This command does not handle
1623 nested lists correctly, but inserts the word appropriate to the
1624 immediately preceding list.)@refill
1626 @item  C-c C-c i
1627 @itemx M-x texinfo-insert-@@item
1628 @findex texinfo-insert-@@item
1629 Insert @code{@@item} and put the
1630 cursor at the beginning of the next line.@refill
1632 @item  C-c C-c k
1633 @itemx M-x texinfo-insert-@@kbd
1634 @findex texinfo-insert-@@kbd
1635 Insert @code{@@kbd@{@}} and put the
1636 cursor between the braces.@refill
1638 @item  C-c C-c n
1639 @itemx M-x texinfo-insert-@@node
1640 @findex texinfo-insert-@@node
1641 Insert @code{@@node} and a comment line
1642 listing the sequence for the `Next',
1643 `Previous', and `Up' nodes.
1644 Leave point after the @code{@@node}.@refill
1646 @item  C-c C-c o
1647 @itemx M-x texinfo-insert-@@noindent
1648 @findex texinfo-insert-@@noindent
1649 Insert @code{@@noindent} and put the
1650 cursor at the beginning of the next line.@refill
1652 @item  C-c C-c s
1653 @itemx M-x texinfo-insert-@@samp
1654 @findex texinfo-insert-@@samp
1655 Insert @code{@@samp@{@}} and put the
1656 cursor between the braces.@refill
1658 @item  C-c C-c t
1659 @itemx M-x texinfo-insert-@@table
1660 @findex texinfo-insert-@@table
1661 Insert @code{@@table} followed by a @key{SPC}
1662 and leave the cursor after the @key{SPC}.@refill
1664 @item  C-c C-c v
1665 @itemx M-x texinfo-insert-@@var
1666 @findex texinfo-insert-@@var
1667 Insert @code{@@var@{@}} and put the
1668 cursor between the braces.@refill
1670 @item  C-c C-c x
1671 @itemx M-x texinfo-insert-@@example
1672 @findex texinfo-insert-@@example
1673 Insert @code{@@example} and put the
1674 cursor at the beginning of the next line.@refill
1676 @c M-@{  was the binding for texinfo-insert-braces;
1677 @c in Emacs 19, backward-paragraph will take this binding.
1678 @item C-c C-c @{
1679 @itemx M-x texinfo-insert-braces
1680 @findex texinfo-insert-braces
1681 Insert @code{@{@}} and put the cursor between the braces.@refill
1683 @item C-c C-c @}
1684 @itemx C-c C-c ]
1685 @itemx M-x up-list
1686 @findex up-list
1687 Move from between a pair of braces forward past the closing brace.
1688 Typing @kbd{C-c C-c ]} is easier than typing @kbd{C-c C-c @}}, which
1689 is, however, more mnemonic; hence the two keybindings.  (Also, you can
1690 move out from between braces by typing @kbd{C-f}.)@refill
1691 @end table
1693 To put a command such as @w{@code{@@code@{@dots{}@}}} around an
1694 @emph{existing} word, position the cursor in front of the word and type
1695 @kbd{C-u 1 C-c C-c c}.  This makes it easy to edit existing plain text.
1696 The value of the prefix argument tells Emacs how many words following
1697 point to include between braces---@samp{1} for one word, @samp{2} for
1698 two words, and so on.  Use a negative argument to enclose the previous
1699 word or words.  If you do not specify a prefix argument, Emacs inserts
1700 the @@-command string and positions the cursor between the braces.  This
1701 feature works only for those @@-commands that operate on a word or words
1702 within one line, such as @code{@@kbd} and @code{@@var}.@refill
1704 This set of insert commands was created after analyzing the frequency
1705 with which different @@-commands are used in the @cite{GNU Emacs
1706 Manual} and the @cite{GDB Manual}.  If you wish to add your own insert
1707 commands, you can bind a keyboard macro to a key, use abbreviations,
1708 or extend the code in @file{texinfo.el}.@refill
1710 @findex texinfo-start-menu-description
1711 @cindex Menu description, start
1712 @cindex Description for menu, start
1713 @kbd{C-c C-c C-d} (@code{texinfo-start-menu-description}) is an insert
1714 command that works differently from the other insert commands.  It
1715 inserts a node's section or chapter title in the space for the
1716 description in a menu entry line.  (A menu entry has three parts, the
1717 entry name, the node name, and the description.  Only the node name is
1718 required, but a description helps explain what the node is about.
1719 @xref{Menu Parts, , The Parts of a Menu}.)@refill
1721 To use @code{texinfo-start-menu-description}, position point in a menu
1722 entry line and type @kbd{C-c C-c C-d}.  The command looks for and copies
1723 the title that goes with the node name, and inserts the title as a
1724 description; it positions point at beginning of the inserted text so you
1725 can edit it.  The function does not insert the title if the menu entry
1726 line already contains a description.@refill
1728 This command is only an aid to writing descriptions; it does not do the
1729 whole job.  You must edit the inserted text since a title tends to use
1730 the same words as a node name but a useful description uses different
1731 words.@refill
1733 @node Showing the Structure, Updating Nodes and Menus, Inserting, Texinfo Mode
1734 @comment  node-name,  next,  previous,  up
1735 @section Showing the Section Structure of a File
1736 @cindex Showing the section structure of a file
1737 @cindex Section structure of a file, showing it
1738 @cindex Structure of a file, showing it
1739 @cindex Outline of file structure, showing it
1740 @cindex Contents-like outline of file structure
1741 @cindex File section structure, showing it
1742 @cindex Texinfo file section structure, showing it
1744 You can show the section structure of a Texinfo file by using the
1745 @kbd{C-c C-s} command (@code{texinfo-show-structure}).  This command
1746 shows the section structure of a Texinfo file by listing the lines
1747 that begin with the @@-commands for @code{@@chapter},
1748 @code{@@section}, and the like.  It constructs what amounts
1749 to a table of contents.  These lines are displayed in another buffer
1750 called the @samp{*Occur*} buffer.  In that buffer, you can position
1751 the cursor over one of the lines and use the @kbd{C-c C-c} command
1752 (@code{occur-mode-goto-occurrence}), to jump to the corresponding spot
1753 in the Texinfo file.@refill
1755 @table @kbd
1756 @item  C-c C-s
1757 @itemx M-x texinfo-show-structure
1758 @findex texinfo-show-structure
1759 Show the @code{@@chapter}, @code{@@section}, and such lines of a
1760 Texinfo file.@refill
1762 @item  C-c C-c
1763 @itemx M-x occur-mode-goto-occurrence
1764 @findex occur-mode-goto-occurrence
1765 Go to the line in the Texinfo file corresponding to the line under the
1766 cursor in the @file{*Occur*} buffer.@refill
1767 @end table
1769 If you call @code{texinfo-show-structure} with a prefix argument by
1770 typing @w{@kbd{C-u C-c C-s}}, it will list not only those lines with the
1771 @@-commands for @code{@@chapter}, @code{@@section}, and the like,
1772 but also the @code{@@node} lines.  (This is how the
1773 @code{texinfo-show-structure} command worked without an argument in
1774 the first version of Texinfo.  It was changed because @code{@@node}
1775 lines clutter up the @samp{*Occur*} buffer and are usually not
1776 needed.)  You can use @code{texinfo-show-structure} with a prefix
1777 argument to check whether the `Next', `Previous', and `Up' pointers of
1778 an @code{@@node} line are correct.@refill
1780 Often, when you are working on a manual, you will be interested only
1781 in the structure of the current chapter.  In this case, you can mark
1782 off the region of the buffer that you are interested in by using the
1783 @kbd{C-x n n} (@code{narrow-to-region}) command and
1784 @code{texinfo-show-structure} will work on only that region.  To see
1785 the whole buffer again, use @w{@kbd{C-x n w}} (@code{widen}).
1786 (@xref{Narrowing, , , emacs, The GNU Emacs Manual}, for more
1787 information about the narrowing commands.)@refill
1789 @vindex page-delimiter
1790 @cindex Page delimiter in Texinfo mode
1791 In addition to providing the @code{texinfo-show-structure} command,
1792 Texinfo mode sets the value of the page delimiter variable to match
1793 the chapter-level @@-commands.  This enables you to use the @kbd{C-x
1794 ]} (@code{forward-page}) and @kbd{C-x [} (@code{backward-page})
1795 commands to move forward and backward by chapter, and to use the
1796 @kbd{C-x p} (@code{narrow-to-page}) command to narrow to a chapter.
1797 @xref{Pages, , , emacs, The GNU Emacs Manual}, for more information
1798 about the page commands.@refill
1800 @node Updating Nodes and Menus, Info Formatting, Showing the Structure, Texinfo Mode
1801 @comment  node-name,  next,  previous,  up
1802 @section Updating Nodes and Menus
1803 @cindex Updating nodes and menus
1804 @cindex Create nodes, menus automatically
1805 @cindex Insert nodes, menus automatically
1806 @cindex Automatically insert nodes, menus
1808 Texinfo mode provides commands for automatically creating or updating
1809 menus and node pointers.  The commands are called ``update'' commands
1810 because their most frequent use is for updating a Texinfo file after
1811 you have worked on it; but you can use them to insert the `Next',
1812 `Previous', and `Up' pointers into an @code{@@node} line that has none and to
1813 create menus in a file that has none.@refill
1815 If you do not use the updating commands, you need to write menus and
1816 node pointers by hand, which is a tedious task.@refill
1818 @menu
1819 * Updating Commands::           Five major updating commands.
1820 * Updating Requirements::       How to structure a Texinfo file for
1821                                   using the updating command.
1822 * Other Updating Commands::     How to indent descriptions, insert
1823                                   missing nodes lines, and update
1824                                   nodes in sequence.
1825 @end menu
1827 @node Updating Commands, Updating Requirements, Updating Nodes and Menus, Updating Nodes and Menus
1828 @ifinfo
1829 @subheading The Updating Commands
1830 @end ifinfo
1832 You can use the updating commands@refill
1834 @itemize @bullet
1835 @item
1836 to insert or update the `Next', `Previous', and `Up' pointers of a
1837 node,@refill
1839 @item
1840 to insert or update the menu for a section, and@refill
1842 @item
1843 to create a master menu for a Texinfo source file.@refill
1844 @end itemize
1846 You can also use the commands to update all the nodes and menus in a
1847 region or in a whole Texinfo file.@refill
1849 The updating commands work only with conventional Texinfo files, which
1850 are structured hierarchically like books.  In such files, a structuring
1851 command line must follow closely after each @code{@@node} line, except
1852 for the `Top' @code{@@node} line.  (A @dfn{structuring command line} is
1853 a line beginning with @code{@@chapter}, @code{@@section}, or other
1854 similar command.)
1856 You can write the structuring command line on the line that follows
1857 immediately after an @code{@@node} line or else on the line that
1858 follows after a single @code{@@comment} line or a single
1859 @code{@@ifinfo} line.  You cannot interpose more than one line between
1860 the @code{@@node} line and the structuring command line; and you may
1861 interpose only an @code{@@comment} line or an @code{@@ifinfo} line.
1863 Commands which work on a whole buffer require that the `Top' node be
1864 followed by a node with an @code{@@chapter} or equivalent-level command.
1865 Note that the menu updating commands will not create a main or master
1866 menu for a Texinfo file that has only @code{@@chapter}-level nodes!  The
1867 menu updating commands only create menus @emph{within} nodes for lower level
1868 nodes.  To create a menu of chapters, you must provide a `Top'
1869 node.@refill
1871 The menu updating commands remove menu entries that refer to other Info
1872 files since they do not refer to nodes within the current buffer.  This
1873 is a deficiency.  Rather than use menu entries, you can use cross
1874 references to refer to other Info files.  None of the updating commands
1875 affect cross references.@refill
1877 Texinfo mode has five updating commands that are used most often: two
1878 are for updating the node pointers or menu of a single node (or a
1879 region); two are for updating every node pointer and menu in a file;
1880 and one, the @code{texinfo-master-menu} command, is for creating a
1881 master menu for a complete file, and optionally, for updating every
1882 node and menu in the whole Texinfo file.@refill
1884 The @code{texinfo-master-menu} command is the primary command:@refill
1886 @table @kbd
1887 @item C-c C-u m
1888 @itemx M-x texinfo-master-menu
1889 @findex texinfo-master-menu
1890 Create or update a master menu that includes all the other menus
1891 (incorporating the descriptions from pre-existing menus, if
1892 any).@refill
1894 With an argument (prefix argument, @kbd{C-u,} if interactive), first create or
1895 update all the nodes and all the regular menus in the buffer before
1896 constructing the master menu.  (@xref{The Top Node, , The Top Node and
1897 Master Menu}, for more about a master menu.)@refill
1899 For @code{texinfo-master-menu} to work, the Texinfo file must have a
1900 `Top' node and at least one subsequent node.@refill
1902 After extensively editing a Texinfo file, you can type the following:
1904 @example
1905 C-u M-x texinfo-master-menu
1906 @exdent or
1907 C-u C-c C-u m
1908 @end example
1910 @noindent
1911 This updates all the nodes and menus completely and all at once.@refill
1912 @end table
1914 The other major updating commands do smaller jobs and are designed for
1915 the person  who updates nodes and menus as he or she writes a Texinfo
1916 file.@refill
1918 @need 1000
1919 The commands are:@refill
1921 @table @kbd
1922 @item C-c C-u C-n
1923 @itemx M-x texinfo-update-node
1924 @findex texinfo-update-node
1925 Insert the `Next', `Previous', and `Up' pointers for the node that point is
1926 within (i.e., for the @code{@@node} line preceding point).  If the
1927 @code{@@node} line has pre-existing `Next', `Previous', or `Up'
1928 pointers in it, the old pointers are removed and new ones inserted.
1929 With an argument (prefix argument, @kbd{C-u}, if interactive), this command
1930 updates all @code{@@node} lines in the region (which is the text
1931 between point and mark).@refill
1933 @item C-c C-u C-m
1934 @itemx M-x texinfo-make-menu
1935 @findex texinfo-make-menu
1936 Create or update the menu in the node that point is within.
1937 With an argument (@kbd{C-u} as prefix argument, if
1938 interactive), the command makes or updates menus for the
1939 nodes which are either within or a part of the
1940 region.@refill
1942 Whenever @code{texinfo-make-menu} updates an existing menu, the
1943 descriptions from that menu are incorporated into the new menu.  This
1944 is done by copying descriptions from the existing menu to the entries
1945 in the new menu that have the same node names.  If the node names are
1946 different, the descriptions are not copied to the new menu.@refill
1948 @item C-c C-u C-e
1949 @itemx M-x texinfo-every-node-update
1950 @findex texinfo-every-node-update
1951 Insert or update the `Next', `Previous', and `Up' pointers for every
1952 node in the buffer.@refill
1954 @item C-c C-u C-a
1955 @itemx M-x texinfo-all-menus-update
1956 @findex texinfo-all-menus-update
1957 Create or update all the menus in the buffer.  With an argument
1958 (@kbd{C-u} as prefix argument, if interactive), first insert
1959 or update all the node
1960 pointers before working on the menus.@refill
1962 If a master menu exists, the @code{texinfo-all-menus-update} command
1963 updates it; but the command does not create a new master menu if none
1964 already exists.  (Use the @code{texinfo-master-menu} command for
1965 that.)@refill
1967 When working on a document that does not merit a master menu, you can
1968 type the following:
1970 @example
1971 C-u C-c C-u C-a
1972 @exdent or
1973 C-u M-x texinfo-all-menus-update
1974 @end example
1976 @noindent
1977 This updates all the nodes and menus.@refill
1978 @end table
1980 The @code{texinfo-column-for-description} variable specifies the
1981 column to which menu descriptions are indented.  By default, the value
1982 is 32 although it is often useful to reduce it to as low as 24.  You
1983 can set the variable with the @kbd{M-x edit-options} command
1984 (@pxref{Edit Options, , Editing Variable Values, emacs, The GNU Emacs
1985 Manual}) or with the @kbd{M-x set-variable} command (@pxref{Examining,
1986 , Examining and Setting Variables, emacs, The GNU Emacs
1987 Manual}).@refill
1989 Also, the @code{texinfo-indent-menu-description} command may be used to
1990 indent existing menu descriptions to a specified column.  Finally, if
1991 you wish, you can use the @code{texinfo-insert-node-lines} command to
1992 insert missing @code{@@node} lines into a file.  (@xref{Other Updating
1993 Commands}, for more information.)@refill
1995 @node Updating Requirements, Other Updating Commands, Updating Commands, Updating Nodes and Menus
1996 @comment  node-name,  next,  previous,  up
1997 @subsection Updating Requirements
1998 @cindex Updating requirements
1999 @cindex Requirements for updating commands
2001 To use the updating commands, you must organize the Texinfo file
2002 hierarchically with chapters, sections, subsections, and the like.
2003 When you construct the hierarchy of the manual, do not `jump down'
2004 more than one level at a time: you can follow the `Top' node with a
2005 chapter, but not with a section; you can follow a chapter with a
2006 section, but not with a subsection.  However, you may `jump up' any
2007 number of levels at one time---for example, from a subsection to a
2008 chapter.@refill
2010 Each @code{@@node} line, with the exception of the line for the `Top'
2011 node, must be followed by a line with a structuring command such as
2012 @code{@@chapter}, @code{@@section}, or
2013 @code{@@unnumberedsubsec}.@refill
2015 Each @code{@@node} line/structuring-command line combination
2016 must look either like this:@refill
2018 @example
2019 @group
2020 @@node     Comments,  Minimum, Conventions, Overview
2021 @@comment  node-name, next,    previous,    up
2022 @@section Comments
2023 @end group
2024 @end example
2026 or like this (without the @code{@@comment} line):
2028 @example
2029 @group
2030 @@node Comments, Minimum, Conventions, Overview
2031 @@section Comments
2032 @end group
2033 @end example
2035 @noindent
2036 In this example, `Comments' is the name of both the node and the
2037 section.  The next node is called `Minimum' and the previous node is
2038 called `Conventions'.  The `Comments' section is within the `Overview'
2039 node, which is specified by the `Up' pointer.  (Instead of an
2040 @code{@@comment} line, you can write an @code{@@ifinfo} line.)@refill
2042 If a file has a `Top' node, it must be called @samp{top} or @samp{Top}
2043 and be the first node in the file.@refill
2045 The menu updating commands create a menu of sections within a chapter,
2046 a menu of subsections within a section, and so on.  This means that
2047 you must have a `Top' node if you want a menu of chapters.@refill
2049 Incidentally, the @code{makeinfo} command will create an Info file for
2050 a hierarchically organized Texinfo file that lacks `Next', `Previous'
2051 and `Up' pointers.  Thus, if you can be sure that your Texinfo file
2052 will be formatted with @code{makeinfo}, you have no need for the
2053 `update node' commands.  (@xref{Create an Info File, , Creating an
2054 Info File}, for more information about @code{makeinfo}.)  However,
2055 both @code{makeinfo} and the @code{texinfo-format-@dots{}} commands
2056 require that you insert menus in the file.@refill
2058 @node Other Updating Commands,  , Updating Requirements, Updating Nodes and Menus
2059 @comment  node-name,  next,  previous,  up
2060 @subsection Other Updating Commands
2062 In addition to the five major updating commands, Texinfo mode
2063 possesses several less frequently used updating commands:@refill
2065 @table @kbd
2066 @item M-x texinfo-insert-node-lines
2067 @findex texinfo-insert-node-lines
2068 Insert @code{@@node} lines before the @code{@@chapter},
2069 @code{@@section}, and other sectioning commands wherever they are
2070 missing throughout a region in a Texinfo file.@refill
2072 With an argument (@kbd{C-u} as prefix argument, if interactive), the
2073 @code{texinfo-insert-node-lines} command not only inserts
2074 @code{@@node} lines but also inserts the chapter or section titles as
2075 the names of the corresponding nodes.  In addition, it inserts the
2076 titles as node names in pre-existing @code{@@node} lines that lack
2077 names.  Since node names should be more concise than section or
2078 chapter titles, you must manually edit node names so inserted.@refill
2080 For example, the following marks a whole buffer as a region and inserts
2081 @code{@@node} lines and titles throughout:@refill
2083 @example
2084 C-x h C-u M-x texinfo-insert-node-lines
2085 @end example
2087 (Note that this command inserts titles as node names in @code{@@node}
2088 lines; the @code{texinfo-start-menu-description} command
2089 (@pxref{Inserting, Inserting Frequently Used Commands}) inserts titles
2090 as descriptions in menu entries, a different action.  However, in both
2091 cases, you need to edit the inserted text.)@refill
2093 @item M-x texinfo-multiple-files-update
2094 @findex texinfo-multiple-files-update @r{(in brief)}
2095 Update nodes and menus in a document built from several separate files.
2096 With @kbd{C-u} as a prefix argument, create and insert a master menu in
2097 the outer file.  With a numeric prefix argument, such as @kbd{C-u 2}, first
2098 update all the menus and all the `Next', `Previous', and `Up' pointers
2099 of all the included files before creating and inserting a master menu in
2100 the outer file.  The @code{texinfo-multiple-files-update} command is
2101 described in the appendix on @code{@@include} files.
2102 @ifinfo
2103 @xref{texinfo-multiple-files-update}.@refill
2104 @end ifinfo
2105 @iftex
2106 @xref{texinfo-multiple-files-update, ,
2107 @code{texinfo-multiple-files-update}}.@refill
2108 @end iftex
2110 @item M-x texinfo-indent-menu-description
2111 @findex texinfo-indent-menu-description
2112 Indent every description in the menu following point to the specified
2113 column.  You can use this command to give yourself more space for
2114 descriptions.  With an argument (@kbd{C-u} as prefix argument, if
2115 interactive), the @code{texinfo-indent-menu-description} command indents
2116 every description in every menu in the region.  However, this command
2117 does not indent the second and subsequent lines of a multi-line
2118 description.@refill
2120 @item M-x texinfo-sequential-node-update
2121 @findex texinfo-sequential-node-update
2122 Insert the names of the nodes immediately following and preceding the
2123 current node as the `Next' or `Previous' pointers regardless of those
2124 nodes' hierarchical level.  This means that the `Next' node of a
2125 subsection may well be the next chapter.  Sequentially ordered nodes are
2126 useful for novels and other documents that you read through
2127 sequentially.  (However, in Info, the @kbd{g *} command lets
2128 you look through the file sequentially, so sequentially ordered nodes
2129 are not strictly necessary.)  With an argument (prefix argument, if
2130 interactive), the @code{texinfo-sequential-node-update} command
2131 sequentially updates all the nodes in the region.@refill
2132 @end table
2134 @node Info Formatting, Printing, Updating Nodes and Menus, Texinfo Mode
2135 @comment  node-name,  next,  previous,  up
2136 @section Formatting for Info
2137 @cindex Formatting for Info
2138 @cindex Running an Info formatter
2139 @cindex Info formatting
2141 Texinfo mode provides several commands for formatting part or all of a
2142 Texinfo file for Info.  Often, when you are writing a document, you
2143 want to format only part of a file---that is, a region.@refill
2145 You can use either the @code{texinfo-format-region} or the
2146 @code{makeinfo-region} command to format a region:@refill
2148 @table @kbd
2149 @findex texinfo-format-region
2150 @item  C-c C-e C-r
2151 @itemx M-x texinfo-format-region
2152 @itemx C-c C-m C-r
2153 @itemx M-x makeinfo-region
2154 Format the current region for Info.@refill
2155 @end table
2157 You can use either the @code{texinfo-format-buffer} or the
2158 @code{makeinfo-buffer} command to format a whole buffer:@refill
2160 @table @kbd
2161 @findex texinfo-format-buffer
2162 @item  C-c C-e C-b
2163 @itemx M-x texinfo-format-buffer
2164 @itemx C-c C-m C-b
2165 @itemx M-x makeinfo-buffer
2166 Format the current buffer for Info.@refill
2167 @end table
2169 @need 1000
2170 For example, after writing a Texinfo file, you can type the following:
2172 @example
2173 C-u C-c C-u m
2174 @exdent or
2175 C-u M-x texinfo-master-menu
2176 @end example
2178 @noindent
2179 This updates all the nodes and menus.  Then type the following to create
2180 an Info file:
2182 @example
2183 C-c C-m C-b
2184 @exdent or
2185 M-x makeinfo-buffer
2186 @end example
2188 For @TeX{} or the Info formatting commands to work, the file @emph{must}
2189 include a line that has @code{@@setfilename} in its header.@refill
2191 @xref{Create an Info File}, for details about Info formatting.@refill
2193 @node Printing, Texinfo Mode Summary, Info Formatting, Texinfo Mode
2194 @comment node-name,  next,  previous,  up
2195 @section Formatting and Printing
2196 @cindex Formatting for printing
2197 @cindex Printing a region or buffer
2198 @cindex Region formatting and printing
2199 @cindex Buffer formatting and printing
2200 @cindex Part of file formatting and printing
2202 Typesetting and printing a Texinfo file is a multi-step process in which
2203 you first create a file for printing (called a DVI file), and then
2204 print the file.  Optionally, you may also create indices.  To do this,
2205 you must run the @code{texindex} command after first running the
2206 @code{tex} typesetting command; and then you must run the @code{tex}
2207 command again.  Or else run the @code{texi2dvi} command which
2208 automatically creates indices as needed.@refill
2210 Often, when you are writing a document, you want to typeset and print
2211 only part of a file to see what it will look like.  You can use the
2212 @code{texinfo-tex-region} and related commands for this purpose.  Use
2213 the @code{texinfo-tex-buffer} command to format all of a
2214 buffer.@refill
2216 @table @kbd
2217 @item  C-c C-t C-b
2218 @itemx M-x texinfo-tex-buffer
2219 @findex texinfo-tex-buffer
2220 Run @code{texi2dvi} on the buffer.  In addition to running @TeX{} on the
2221 buffer, this command automatically creates or updates indices as
2222 needed.@refill
2224 @item  C-c C-t C-r
2225 @itemx M-x texinfo-tex-region
2226 @findex texinfo-tex-region
2227 Run @TeX{} on the region.@refill
2229 @item C-c C-t C-i
2230 @itemx M-x texinfo-texindex
2231 Run @code{texindex} to sort the indices of a Texinfo file formatted with
2232 @code{texinfo-tex-region}.  The @code{texinfo-tex-region} command does
2233 not run @code{texindex} automatically; it only runs the @code{tex}
2234 typesetting command.  You must run the @code{texinfo-tex-region} command
2235 a second time after sorting the raw index files with the @code{texindex}
2236 command.  (Usually, you do not format an index when you format a region,
2237 only when you format a buffer.  Now that the @code{texi2dvi} command
2238 exists, there is little or no need for this command.)@refill
2240 @item C-c C-t C-p
2241 @itemx M-x texinfo-tex-print
2242 @findex texinfo-tex-print
2243 Print the file (or the part of the file) previously formatted with
2244 @code{texinfo-tex-buffer} or @code{texinfo-tex-region}.@refill
2245 @end table
2247 For @code{texinfo-tex-region} or @code{texinfo-tex-buffer} to work, the
2248 file @emph{must} start with a @samp{\input texinfo} line and must
2249 include an @code{@@settitle} line.  The file must end with @code{@@bye}
2250 on a line by itself.  (When you use @code{texinfo-tex-region}, you must
2251 surround the @code{@@settitle} line with start-of-header and
2252 end-of-header lines.)@refill
2254 @xref{Format/Print Hardcopy}, for a description of the other @TeX{} related
2255 commands, such as @code{tex-show-print-queue}.@refill
2257 @node Texinfo Mode Summary,  , Printing, Texinfo Mode
2258 @comment  node-name,  next,  previous,  up
2259 @section Texinfo Mode Summary
2261 In Texinfo mode, each set of commands has default keybindings that
2262 begin with the same keys.  All the commands that are custom-created
2263 for Texinfo mode begin with @kbd{C-c}.  The keys are somewhat
2264 mnemonic.@refill
2266 @subheading Insert Commands
2268 The insert commands are invoked by typing @kbd{C-c} twice and then the
2269 first letter of the @@-command to be inserted.  (It might make more
2270 sense mnemonically to use @kbd{C-c C-i}, for `custom insert', but
2271 @kbd{C-c C-c} is quick to type.)@refill
2273 @example
2274 C-c C-c c       @r{Insert} @samp{@@code}.
2275 C-c C-c d       @r{Insert} @samp{@@dfn}.
2276 C-c C-c e       @r{Insert} @samp{@@end}.
2277 C-c C-c i       @r{Insert} @samp{@@item}.
2278 C-c C-c n       @r{Insert} @samp{@@node}.
2279 C-c C-c s       @r{Insert} @samp{@@samp}.
2280 C-c C-c v       @r{Insert} @samp{@@var}.
2281 C-c C-c @{       @r{Insert braces.}
2282 C-c C-c ]
2283 C-c C-c @}       @r{Move out of enclosing braces.}
2285 @group
2286 C-c C-c C-d     @r{Insert a node's section title}
2287                 @r{in the space for the description}
2288                 @r{in a menu entry line.}
2289 @end group
2290 @end example
2292 @subheading Show Structure
2294 The @code{texinfo-show-structure} command is often used within a
2295 narrowed region.@refill
2297 @example
2298 C-c C-s         @r{List all the headings.}
2299 @end example
2301 @subheading The Master Update Command
2303 The @code{texinfo-master-menu} command creates a master menu; and can
2304 be used to update every node and menu in a file as well.@refill
2306 @example
2307 @group
2308 C-c C-u m
2309 M-x texinfo-master-menu
2310                 @r{Create or update a master menu.}
2311 @end group
2313 @group
2314 C-u C-c C-u m   @r{With @kbd{C-u} as a prefix argument, first}
2315                 @r{create or update all nodes and regular}
2316                 @r{menus, and then create a master menu.}
2317 @end group
2318 @end example
2320 @subheading Update Pointers
2322 The update pointer commands are invoked by typing @kbd{C-c C-u} and
2323 then either @kbd{C-n} for @code{texinfo-update-node} or @kbd{C-e} for
2324 @code{texinfo-every-node-update}.@refill
2326 @example
2327 C-c C-u C-n     @r{Update a node.}
2328 C-c C-u C-e     @r{Update every node in the buffer.}
2329 @end example
2331 @subheading Update Menus
2333 Invoke the  update menu commands by typing @kbd{C-c C-u}
2334 and then either @kbd{C-m} for @code{texinfo-make-menu} or
2335 @kbd{C-a} for @code{texinfo-all-menus-update}.  To update
2336 both nodes and menus at the same time, precede @kbd{C-c C-u
2337 C-a} with @kbd{C-u}.@refill
2339 @example
2340 C-c C-u C-m     @r{Make or update a menu.}
2342 @group
2343 C-c C-u C-a     @r{Make or update all}
2344                 @r{menus in a buffer.}
2345 @end group
2347 @group
2348 C-u C-c C-u C-a @r{With @kbd{C-u} as a prefix argument,}
2349                 @r{first create or update all nodes and}
2350                 @r{then create or update all menus.}
2351 @end group
2352 @end example
2354 @subheading Format for Info
2356 The Info formatting commands that are written in Emacs Lisp are
2357 invoked by typing @kbd{C-c C-e} and then either @kbd{C-r} for a region
2358 or @kbd{C-b} for the whole buffer.@refill
2360 The Info formatting commands that are written in C and based on the
2361 @code{makeinfo} program are invoked by typing @kbd{C-c C-m} and then
2362 either @kbd{C-r} for a region or @kbd{C-b} for the whole buffer.@refill
2364 @need 800
2365 @noindent
2366 Use the @code{texinfo-format@dots{}} commands:
2368 @example
2369 @group
2370 C-c C-e C-r     @r{Format the region.}
2371 C-c C-e C-b     @r{Format the buffer.}
2372 @end group
2373 @end example
2375 @need 750
2376 @noindent
2377 Use @code{makeinfo}:
2379 @example
2380 C-c C-m C-r     @r{Format the region.}
2381 C-c C-m C-b     @r{Format the buffer.}
2382 C-c C-m C-l     @r{Recenter the @code{makeinfo} output buffer.}
2383 C-c C-m C-k     @r{Kill the @code{makeinfo} formatting job.}
2384 @end example
2386 @subheading Typeset and Print
2388 The @TeX{} typesetting and printing commands are invoked by typing
2389 @kbd{C-c C-t} and then another control command: @kbd{C-r} for
2390 @code{texinfo-tex-region}, @kbd{C-b} for @code{texinfo-tex-buffer},
2391 and so on.@refill
2393 @example
2394 C-c C-t C-r     @r{Run @TeX{} on the region.}
2395 C-c C-t C-b     @r{Run} @code{texi2dvi} @r{on the buffer.}
2396 C-c C-t C-i     @r{Run} @code{texindex}.
2397 C-c C-t C-p     @r{Print the DVI file.}
2398 C-c C-t C-q     @r{Show the print queue.}
2399 C-c C-t C-d     @r{Delete a job from the print queue.}
2400 C-c C-t C-k     @r{Kill the current @TeX{} formatting job.}
2401 C-c C-t C-x     @r{Quit a currently stopped @TeX{} formatting job.}
2402 C-c C-t C-l     @r{Recenter the output buffer.}
2403 @end example
2405 @subheading Other Updating Commands
2407 The `other updating commands' do not have standard keybindings because
2408 they are rarely used.
2410 @example
2411 @group
2412 M-x texinfo-insert-node-lines
2413                 @r{Insert missing @code{@@node} lines in region.}
2414                 @r{With @kbd{C-u} as a prefix argument,}
2415                 @r{use section titles as node names.}
2416 @end group
2418 @group
2419 M-x texinfo-multiple-files-update
2420                 @r{Update a multi-file document.}
2421                 @r{With @kbd{C-u 2} as a prefix argument,}
2422                 @r{create or update all nodes and menus}
2423                 @r{in all included files first.}
2424 @end group
2426 @group
2427 M-x texinfo-indent-menu-description
2428                 @r{Indent descriptions.}
2429 @end group
2431 @group
2432 M-x texinfo-sequential-node-update
2433                 @r{Insert node pointers in strict sequence.}
2434 @end group
2435 @end example
2437 @node Beginning a File, Ending a File, Texinfo Mode, Top
2438 @comment  node-name,  next,  previous,  up
2439 @chapter Beginning a Texinfo File
2440 @cindex Beginning a Texinfo file
2441 @cindex Texinfo file beginning
2442 @cindex File beginning
2444 Certain pieces of information must be provided at the beginning of a
2445 Texinfo file, such as the name of the file and the title of the
2446 document.@refill
2448 @menu
2449 * Four Parts::                  Four parts begin a Texinfo file.
2450 * Sample Beginning::            Here is a sample beginning for a Texinfo file.
2451 * Header::                      The very beginning of a Texinfo file.
2452 * Info Summary and Permissions::  Summary and copying permissions for Info.
2453 * Titlepage & Copyright Page::  Creating the title and copyright pages.
2454 * The Top Node::                Creating the `Top' node and master menu.
2455 * Software Copying Permissions::  Ensure that you and others continue to
2456                                   have the right to use and share software.
2457 @end menu
2459 @node Four Parts, Sample Beginning, Beginning a File, Beginning a File
2460 @ifinfo
2461 @heading Four Parts Begin a File
2462 @end ifinfo
2464 Generally, the beginning of a Texinfo file has four parts:@refill
2466 @enumerate
2467 @item
2468 The header, delimited by special comment lines, that includes the
2469 commands for naming the Texinfo file and telling @TeX{} what
2470 definitions file to use when processing the Texinfo file.@refill
2472 @item
2473 A short statement of what the file is about, with a copyright notice
2474 and copying permissions.  This is enclosed in @code{@@ifinfo} and
2475 @code{@@end ifinfo} commands so that the formatters place it only
2476 in the Info file.@refill
2478 @item
2479 A title page and copyright page, with a copyright notice and copying
2480 permissions.  This is enclosed between @code{@@titlepage} and
2481 @code{@@end titlepage} commands.  The title and copyright page appear
2482 only in the printed @w{manual}.@refill
2484 @item
2485 The `Top' node that contains a menu for the whole Info file.  The
2486 contents of this node appear only in the Info file.@refill
2487 @end enumerate
2489 Also, optionally, you may include the copying conditions for a program
2490 and a warranty disclaimer.  The copying section will be followed by an
2491 introduction or else by the first chapter of the manual.@refill
2493 Since the copyright notice and copying permissions for the Texinfo
2494 document (in contrast to the copying permissions for a program) are in
2495 parts that appear only in the Info file or only in the printed manual,
2496 this information must be given twice.@refill
2498 @node Sample Beginning, Header, Four Parts, Beginning a File
2499 @comment  node-name,  next,  previous,  up
2500 @section Sample Texinfo File Beginning
2502 The following sample shows what is needed.@refill
2504 @example
2505 \input texinfo   @@c -*-texinfo-*-
2506 @@c %**start of header
2507 @@setfilename @var{name-of-info-file}
2508 @@settitle @var{name-of-manual}
2509 @@setchapternewpage odd
2510 @@c %**end of header
2512 @@ifinfo
2513 This file documents @dots{}
2515 Copyright @var{year} @var{copyright-owner}
2517 @group
2518 Permission is granted to @dots{}
2519 @@end ifinfo
2520 @end group
2522 @group
2523 @@c  This title page illustrates only one of the
2524 @@c  two methods of forming a title page.
2525 @end group
2527 @group
2528 @@titlepage
2529 @@title @var{name-of-manual-when-printed}
2530 @@subtitle @var{subtitle-if-any}
2531 @@subtitle @var{second-subtitle}
2532 @@author @var{author}
2533 @end group
2535 @group
2536 @@c  The following two commands
2537 @@c  start the copyright page.
2538 @@page
2539 @@vskip 0pt plus 1filll
2540 Copyright @@copyright@{@} @var{year} @var{copyright-owner}
2541 @end group
2543 Published by @dots{}
2545 Permission is granted to @dots{}
2546 @@end titlepage
2548 @@node Top, Overview, , (dir)
2550 @@ifinfo
2551 This document describes @dots{}
2553 This document applies to version @dots{}
2554 of the program named @dots{}
2555 @@end ifinfo
2557 @group
2558 @@menu
2559 * Copying::          Your rights and freedoms.
2560 * First Chapter::    Getting started @dots{}
2561 * Second Chapter::              @dots{}
2562   @dots{}
2563   @dots{}
2564 @@end menu
2565 @end group
2567 @group
2568 @@node    First Chapter, Second Chapter, top,      top
2569 @@comment node-name,     next,           previous, up
2570 @@chapter First Chapter
2571 @@cindex Index entry for First Chapter
2572 @end group
2573 @end example
2575 @node Header, Info Summary and Permissions, Sample Beginning, Beginning a File
2576 @comment  node-name,  next,  previous,  up
2577 @section The Texinfo File Header
2578 @cindex Header for Texinfo files
2579 @cindex Texinfo file header
2581 Texinfo files start with at least three lines that provide Info and
2582 @TeX{} with necessary information.  These are the @code{\input
2583 texinfo} line, the @code{@@settitle} line, and the
2584 @code{@@setfilename} line.  If you want to run @TeX{} on just a part
2585 of the Texinfo File, you must write the @code{@@settitle}
2586 and @code{@@setfilename} lines between start-of-header and end-of-header
2587 lines.@refill
2589 Thus, the beginning of a Texinfo file looks like this:
2591 @example
2592 @group
2593 \input texinfo   @@c -*-texinfo-*-
2594 @@setfilename sample.info
2595 @@settitle Sample Document
2596 @end group
2597 @end example
2599 @noindent
2600 or else like this:
2602 @example
2603 @group
2604 \input texinfo   @@c -*-texinfo-*-
2605 @@c %**start of header
2606 @@setfilename sample.info
2607 @@settitle Sample Document
2608 @@c %**end of header
2609 @end group
2610 @end example
2612 @menu
2613 * First Line::                  The first line of a Texinfo file.
2614 * Start of Header::             Formatting a region requires this.
2615 * setfilename::                 Tell Info the name of the Info file.
2616 * settitle::                    Create a title for the printed work.
2617 * setchapternewpage::           Start chapters on right-hand pages.
2618 * paragraphindent::             An option to specify paragraph indentation.
2619 * End of Header::               Formatting a region requires this.
2620 @end menu
2622 @node First Line, Start of Header, Header, Header
2623 @comment  node-name,  next,  previous,  up
2624 @subsection The First Line of a Texinfo File
2625 @cindex First line of a Texinfo file
2626 @cindex Beginning line of a Texinfo file
2627 @cindex Header of a Texinfo file
2629 Every Texinfo file that is to be the top-level input to @TeX{} must begin
2630 with a line that looks like this:@refill
2632 @example
2633 \input texinfo   @@c -*-texinfo-*-
2634 @end example
2636 @noindent
2637 This line serves two functions:
2639 @enumerate
2640 @item
2641 When the file is processed by @TeX{}, the @samp{\input texinfo} command
2642 tells @TeX{} to load the macros needed for processing a Texinfo file.
2643 These are in a file called @file{texinfo.tex}, which is usually located
2644 in the @file{/usr/lib/tex/macros} directory.  @TeX{} uses the backslash,
2645 @samp{\}, to mark the beginning of a command, just as Texinfo uses
2646 @samp{@@}.  The @file{texinfo.tex} file causes the switch from @samp{\}
2647 to @samp{@@}; before the switch occurs, @TeX{} requires @samp{\}, which
2648 is why it appears at the beginning of the file.@refill
2650 @item
2651 When the file is edited in GNU Emacs, the @samp{-*-texinfo-*-} mode
2652 specification tells Emacs to use Texinfo mode.@refill
2653 @end enumerate
2655 @node Start of Header, setfilename, First Line, Header
2656 @comment  node-name,  next,  previous,  up
2657 @subsection Start of Header
2658 @cindex Start of header line
2660 Write a start-of-header line on the second line of a Texinfo file.
2661 Follow the start-of-header line with @code{@@setfilename} and
2662 @code{@@settitle} lines and, optionally, with other command lines, such
2663 as @code{@@smallbook} or @code{@@footnotestyle}; and then by an
2664 end-of-header line (@pxref{End of Header}).@refill
2666 With these lines, you can format part of a Texinfo file for Info or
2667 typeset part for printing.@refill
2669 A start-of-header line looks like this:@refill
2671 @example
2672 @@c %**start of header
2673 @end example
2675 The odd string of characters, @samp{%**}, is to ensure that no other
2676 comment is accidentally taken for a start-of-header line.@refill
2678 @node setfilename, settitle, Start of Header, Header
2679 @comment  node-name,  next,  previous,  up
2680 @subsection @code{@@setfilename}
2681 @cindex Info file requires @code{@@setfilename}
2682 @findex setfilename
2684 In order to serve as the primary input file for either @code{makeinfo}
2685 or @TeX{}, a Texinfo file must contain a line that looks like this:
2687 @example
2688 @@setfilename @var{info-file-name}
2689 @end example
2691 Write the @code{@@setfilename} command at the beginning of a line and
2692 follow it on the same line by the Info file name.  Do not write anything
2693 else on the line; anything on the line after the command is considered
2694 part of the file name, including what would otherwise be a
2695 comment.
2697 The @code{@@setfilename} line specifies the name of the Info file to be
2698 generated.  This name should be different from the name of the Texinfo
2699 file.  There are two conventions for choosing the name: you can either
2700 remove the @samp{.texi} extension from the input file name, or replace
2701 it with the @samp{.info} extension.
2703 Some operating systems cannot handle long file names.  You can run into
2704 a problem even when the file name you specify is itself short enough.
2705 This occurs because the Info formatters split a long Info file into
2706 short indirect subfiles, and name them by appending @samp{-1},
2707 @samp{-2}, @dots{}, @samp{-10}, @samp{-11}, and so on, to the original
2708 file name.  (@xref{Tag and Split Files, , Tag Files and Split Files}.)
2709 The subfile name @file{texinfo.info-10}, for example, is too long for
2710 some systems; so the Info file name for this document is @file{texinfo}
2711 rather than @file{texinfo.info}.
2713 @cindex Ignored before @code{@@setfilename}
2714 The Info formatting commands ignore everything written before the
2715 @code{@@setfilename} line, which is why the very first line of
2716 the file (the @code{\input} line) does not show up in the output.
2718 @pindex texinfo.cnf
2719 The @code{@@setfilename} line produces no output when you typeset a
2720 manual with @TeX{}, but it nevertheless is essential: it opens the
2721 index, cross-reference, and other auxiliary files used by Texinfo, and
2722 also reads @file{texinfo.cnf} if that file is present on your system
2723 (@pxref{Preparing for TeX,, Preparing to Use @TeX{}}).
2726 @node settitle, setchapternewpage, setfilename, Header
2727 @comment  node-name,  next,  previous,  up
2728 @subsection @code{@@settitle}
2729 @findex settitle
2731 In order to be made into a printed manual, a Texinfo file must contain
2732 a line that looks like this:@refill
2734 @example
2735 @@settitle @var{title}
2736 @end example
2738 Write the @code{@@settitle} command at the beginning of a line and
2739 follow it on the same line by the title.  This tells @TeX{} the title
2740 to use in a header or footer.  Do not write anything else on the line;
2741 anything on the line after the command is considered part of the
2742 title, including a comment.@refill
2744 Conventionally, when @TeX{} formats a Texinfo file for double-sided
2745 output, the title is printed in the left-hand (even-numbered) page
2746 headings and the current chapter title is printed in the right-hand
2747 (odd-numbered) page headings.  (@TeX{} learns the title of each chapter
2748 from each @code{@@chapter} command.)  Page footers are not
2749 printed.@refill
2751 Even if you are printing in a single-sided style, @TeX{} looks for an
2752 @code{@@settitle} command line, in case you include the manual title
2753 in the heading. @refill
2755 The @code{@@settitle} command should precede everything that generates
2756 actual output in @TeX{}.@refill
2758 Although the title in the @code{@@settitle} command is usually the
2759 same as the title on the title page, it does not affect the title as
2760 it appears on the title page.  Thus, the two do not need not match
2761 exactly;  and the title in the @code{@@settitle} command can be a
2762 shortened or expanded version of the title as it appears on the title
2763 page. (@xref{titlepage, , @code{@@titlepage}}.)@refill
2765 @TeX{} prints page headings only for that text that comes after the
2766 @code{@@end titlepage} command in the Texinfo file, or that comes
2767 after an @code{@@headings} command that turns on headings.
2768 (@xref{headings on off, , The @code{@@headings} Command}, for more
2769 information.)@refill
2771 You may, if you wish, create your own, customized headings and
2772 footings.  @xref{Headings, , Page Headings}, for a detailed discussion
2773 of this process.@refill
2775 @node setchapternewpage, paragraphindent, settitle, Header
2776 @comment  node-name,  next,  previous,  up
2777 @subsection @code{@@setchapternewpage}
2778 @cindex Starting chapters
2779 @cindex Pages, starting odd
2780 @findex setchapternewpage
2782 In a book or a manual, text is usually printed on both sides of the
2783 paper, chapters start on right-hand pages, and right-hand pages have
2784 odd numbers.  But in short reports, text often is printed only on one
2785 side of the paper.  Also in short reports, chapters sometimes do not
2786 start on new pages, but are printed on the same page as the end of the
2787 preceding chapter, after a small amount of vertical whitespace.@refill
2789 You can use the @code{@@setchapternewpage} command with various
2790 arguments to specify how @TeX{} should start chapters and whether it
2791 should typeset pages for printing on one or both sides of the paper
2792 (single-sided or double-sided printing).@refill
2794 Write the @code{@@setchapternewpage} command at the beginning of a
2795 line followed by its argument.@refill
2797 For example, you would write the following to cause each chapter to
2798 start on a fresh odd-numbered page:@refill
2800 @example
2801 @@setchapternewpage odd
2802 @end example
2804 You can specify one of three alternatives with the
2805 @code{@@setchapternewpage} command:@refill
2807 @table @asis
2808 @ignore
2809 @item No @code{@@setchapternewpage} command
2810 If the Texinfo file does not contain an @code{@@setchapternewpage}
2811 command before the @code{@@titlepage} command, @TeX{} automatically
2812 begins chapters on new pages and prints headings in the standard
2813 format for single-sided printing.  This is the conventional format for
2814 single-sided printing.@refill
2816 The result is exactly the same as when you write
2817 @code{@@setchapternewpage on}.@refill
2818 @end ignore
2819 @item @code{@@setchapternewpage off}
2820 Cause @TeX{} to typeset a new chapter on the same page as the last
2821 chapter, after skipping some vertical whitespace.  Also, cause @TeX{} to
2822 format page headers for single-sided printing. (You can override the
2823 headers format with the @code{@@headings double} command; see
2824 @ref{headings on off, , The @code{@@headings} Command}.)@refill
2826 @item @code{@@setchapternewpage on}
2827 Cause @TeX{} to start new chapters on new pages and to typeset page
2828 headers for single-sided printing.  This is the form most often
2829 used for short reports.@refill
2831 This alternative is the default.@refill
2833 @item @code{@@setchapternewpage odd}
2834 Cause @TeX{} to start new chapters on new, odd-numbered pages
2835 (right-handed pages) and to typeset for double-sided printing.  This is
2836 the form most often used for books and manuals.@refill
2837 @end table
2839 @noindent
2840 Texinfo does not have an @code{@@setchapternewpage even} command.@refill
2842 @noindent
2843 (You can countermand or modify an @code{@@setchapternewpage} command
2844 with an @code{@@headings} command.  @xref{headings on off, , The
2845 @code{@@headings} Command}.)@refill
2847 At the beginning of a manual or book, pages are not numbered---for
2848 example, the title and copyright pages of a book are not numbered.
2849 By convention, table of contents pages are numbered with roman
2850 numerals and not in sequence with the rest of the document.@refill
2852 Since an Info file does not have pages, the @code{@@setchapternewpage}
2853 command has no effect on it.@refill
2855 Usually, you do not write an @code{@@setchapternewpage} command for
2856 single-sided printing, but accept the default which is to typeset for
2857 single-sided printing and to start new chapters on new pages.  Usually,
2858 you write an @code{@@setchapternewpage odd} command for double-sided
2859 printing.@refill
2861 @node paragraphindent, End of Header, setchapternewpage, Header
2862 @comment  node-name,  next,  previous,  up
2863 @subsection Paragraph Indenting
2864 @cindex Indenting paragraphs
2865 @cindex Paragraph indentation
2866 @findex paragraphindent
2868 The Info formatting commands may insert spaces at the beginning of the
2869 first line of each paragraph, thereby indenting that paragraph.  You
2870 can use the @code{@@paragraphindent} command to specify the
2871 indentation.  Write an @code{@@paragraphindent} command at the
2872 beginning of a line followed by either @samp{asis} or a number.  The
2873 template is:@refill
2875 @example
2876 @@paragraphindent @var{indent}
2877 @end example
2879 The Info formatting commands indent according to the value of
2880 @var{indent}:@refill
2882 @itemize @bullet
2883 @item
2884 If the value of @var{indent} is @samp{asis}, the Info formatting
2885 commands do not change the existing indentation.@refill
2887 @item
2888 If the value of @var{indent} is zero, the Info formatting commands delete
2889 existing indentation.@refill
2891 @item
2892 If the value of @var{indent} is greater than zero, the Info formatting
2893 commands indent the paragraph by that number of spaces.@refill
2894 @end itemize
2896 The default value of @var{indent} is @samp{asis}.@refill
2898 Write the @code{@@paragraphindent} command before or shortly after the
2899 end-of-header line at the beginning of a Texinfo file.  (If you write
2900 the command between the start-of-header and end-of-header lines, the
2901 region formatting commands indent paragraphs as specified.)@refill
2903 A peculiarity of the @code{texinfo-format-buffer} and
2904 @code{texinfo-format-region} commands is that they do not indent (nor
2905 fill) paragraphs that contain @code{@@w} or @code{@@*} commands.
2906 @xref{Refilling Paragraphs}, for a detailed description of what goes
2907 on.@refill
2909 @node End of Header,  , paragraphindent, Header
2910 @comment  node-name,  next,  previous,  up
2911 @subsection End of Header
2912 @cindex End of header line
2914 Follow the header lines with an @w{end-of-header} line.
2915 An end-of-header line looks like this:@refill
2917 @example
2918 @@c %**end of header
2919 @end example
2921 If you include the @code{@@setchapternewpage} command between the
2922 start-of-header and end-of-header lines, @TeX{} will typeset a region as
2923 that command specifies.  Similarly, if you include an @code{@@smallbook}
2924 command between the start-of-header and end-of-header lines, @TeX{} will
2925 typeset a region in the ``small'' book format.@refill
2927 @ifinfo
2928 The reason for the odd string of characters (@samp{%**}) is so that the
2929 @code{texinfo-tex-region} command does not accidentally find
2930 something that it should not when it is looking for the header.@refill
2932 The start-of-header line and the end-of-header line are Texinfo mode
2933 variables that you can change.@refill
2934 @end ifinfo
2936 @iftex
2937 @xref{Start of Header}.
2938 @end iftex
2940 @node Info Summary and Permissions, Titlepage & Copyright Page, Header, Beginning a File
2941 @comment  node-name,  next,  previous,  up
2942 @section Summary and Copying Permissions for Info
2944 The title page and the copyright page appear only in the printed copy of
2945 the manual; therefore, the same information must be inserted in a
2946 section that appears only in the Info file.  This section usually
2947 contains a brief description of the contents of the Info file, a
2948 copyright notice, and copying permissions.@refill
2950 The copyright notice should read:@refill
2952 @example
2953 Copyright @var{year} @var{copyright-owner}
2954 @end example
2956 @noindent
2957 and be put on a line by itself.@refill
2959 Standard text for the copyright permissions is contained in an appendix
2960 to this manual; see @ref{ifinfo Permissions, , @samp{ifinfo} Copying
2961 Permissions}, for the complete text.@refill
2963 The permissions text appears in an Info file @emph{before} the first
2964 node.  This mean that a reader does @emph{not} see this text when
2965 reading the file using Info, except when using the advanced Info command
2966 @kbd{g *}.
2968 @node Titlepage & Copyright Page, The Top Node, Info Summary and Permissions, Beginning a File
2969 @comment  node-name,  next,  previous,  up
2970 @section The Title and Copyright Pages
2972 A manual's name and author are usually printed on a title page.
2973 Sometimes copyright information is printed on the title page as well;
2974 more often, copyright information is printed on the back of the title
2975 page.
2977 The title and copyright pages appear in the printed manual, but not in the
2978 Info file.  Because of this, it is possible to use several slightly
2979 obscure @TeX{} typesetting commands that cannot be used in an Info file.
2980 In addition, this part of the beginning of a Texinfo file contains the text
2981 of the copying permissions that will appear in the printed manual.@refill
2983 @xref{Titlepage Permissions, , Titlepage Copying Permissions}, for the
2984 standard text for the copyright permissions.@refill
2986 @menu
2987 * titlepage::                   Create a title for the printed document.
2988 * titlefont center sp::         The @code{@@titlefont}, @code{@@center},
2989                                   and @code{@@sp} commands.
2990 * title subtitle author::       The @code{@@title}, @code{@@subtitle},
2991                                   and @code{@@author} commands.
2992 * Copyright & Permissions::     How to write the copyright notice and
2993                                   include copying permissions.
2994 * end titlepage::               Turn on page headings after the title and
2995                                   copyright pages.
2996 * headings on off::             An option for turning headings on and off
2997                                   and double or single sided printing.
2998 @end menu
3000 @node titlepage, titlefont center sp, Titlepage & Copyright Page, Titlepage & Copyright Page
3001 @comment  node-name,  next,  previous,  up
3002 @subsection @code{@@titlepage}
3003 @cindex Title page
3004 @findex titlepage
3006 Start the material for the title page and following copyright page
3007 with @code{@@titlepage} on a line by itself and end it with
3008 @code{@@end titlepage} on a line by itself.@refill
3010 The @code{@@end titlepage} command starts a new page and turns on page
3011 numbering.  (@xref{Headings, , Page Headings}, for details about how to
3012 generate page headings.)  All the material that you want to
3013 appear on unnumbered pages should be put between the
3014 @code{@@titlepage} and @code{@@end titlepage} commands.  By using the
3015 @code{@@page} command you can force a page break within the region
3016 delineated by the @code{@@titlepage} and @code{@@end titlepage}
3017 commands and thereby create more than one unnumbered page.  This is
3018 how the copyright page is produced.  (The @code{@@titlepage} command
3019 might perhaps have been better named the
3020 @code{@@titleandadditionalpages} command, but that would have been
3021 rather long!)@refill
3023 @c !!! append refill to footnote when makeinfo can handle it.
3024 When you write a manual about a computer program, you should write the
3025 version of the program to which the manual applies on the title
3026 page.  If the manual changes more frequently than the program or is
3027 independent of it, you should also include an edition
3028 number@footnote{We have found that it is helpful to refer to versions
3029 of manuals as `editions' and versions of programs as `versions';
3030 otherwise, we find we are liable to confuse each other in conversation
3031 by referring to both the documentation and the software with the same
3032 words.} for the manual.  This helps readers keep track of which manual
3033 is for which version of the program.  (The `Top' node
3034 should also contain this information; see @ref{makeinfo top, ,
3035 @code{@@top}}.)@refill
3037 Texinfo provides two main methods for creating a title page.  One method
3038 uses the @code{@@titlefont}, @code{@@sp}, and @code{@@center} commands
3039 to generate a title page in which the words on the page are
3040 centered.@refill
3042 The second method uses the @code{@@title}, @code{@@subtitle}, and
3043 @code{@@author} commands to create a title page with black rules under
3044 the title and author lines and the subtitle text set flush to the
3045 right hand side of the page.  With this method, you do not specify any
3046 of the actual formatting of the title page.  You specify the text
3047 you want, and Texinfo does the formatting.  You may use either
3048 method.@refill
3050 @findex shorttitlepage
3051 For extremely simple applications, Texinfo also provides a command
3052 @code{@@shorttitlepage} which takes a single argument as the title.
3053 The argument is typeset on a page by itself and followed by a blank
3054 page.
3057 @node titlefont center sp, title subtitle author, titlepage, Titlepage & Copyright Page
3058 @comment  node-name,  next,  previous,  up
3059 @subsection @code{@@titlefont}, @code{@@center}, and @code{@@sp}
3060 @findex titlefont
3061 @findex center
3062 @findex sp @r{(titlepage line spacing)}
3064 You can use the @code{@@titlefont}, @code{@@sp}, and @code{@@center}
3065 commands to create a title page for a printed document.  (This is the
3066 first of the two methods for creating a title page in Texinfo.)@refill
3068 Use the @code{@@titlefont} command to select a large font suitable for
3069 the title itself.@refill
3071 @need 700
3072 For example:
3074 @example
3075 @@titlefont@{Texinfo@}
3076 @end example
3078 Use the @code{@@center} command at the beginning of a line to center
3079 the remaining text on that line.  Thus,@refill
3081 @example
3082 @@center @@titlefont@{Texinfo@}
3083 @end example
3085 @noindent
3086 centers the title, which in this example is ``Texinfo'' printed
3087 in the title font.@refill
3089 Use the @code{@@sp} command to insert vertical space.  For example:@refill
3091 @example
3092 @@sp 2
3093 @end example
3095 @noindent
3096 This inserts two blank lines on the printed page.  (@xref{sp, ,
3097 @code{@@sp}}, for more information about the @code{@@sp}
3098 command.)@refill
3100 A template for this method looks like this:@refill
3102 @example
3103 @group
3104 @@titlepage
3105 @@sp 10
3106 @@center @@titlefont@{@var{name-of-manual-when-printed}@}
3107 @@sp 2
3108 @@center @var{subtitle-if-any}
3109 @@sp 2
3110 @@center @var{author}
3111 @dots{}
3112 @@end titlepage
3113 @end group
3114 @end example
3116 The spacing of the example fits an 8 1/2 by 11 inch manual.@refill
3118 @node title subtitle author, Copyright & Permissions, titlefont center sp, Titlepage & Copyright Page
3119 @comment  node-name,  next,  previous,  up
3120 @subsection @code{@@title}, @code{@@subtitle}, and @code{@@author}
3121 @findex title
3122 @findex subtitle
3123 @findex author
3125 You can use the @code{@@title}, @code{@@subtitle}, and @code{@@author}
3126 commands to create a title page in which the vertical and horizontal
3127 spacing is done for you automatically.  This contrasts with the method
3128 described in
3129 the previous section, in which the @code{@@sp} command is needed to
3130 adjust vertical spacing.@refill
3132 Write the @code{@@title}, @code{@@subtitle}, or @code{@@author}
3133 commands at the beginning of a line followed by the title, subtitle,
3134 or author.@refill
3136 The @code{@@title} command produces a line in which the title is set
3137 flush to the left-hand side of the page in a larger than normal font.
3138 The title is underlined with a black rule.@refill
3140 The @code{@@subtitle} command sets subtitles in a normal-sized font
3141 flush to the right-hand side of the page.@refill
3143 The @code{@@author} command sets the names of the author or authors in
3144 a middle-sized font flush to the left-hand side of the page on a line
3145 near the bottom of the title page.  The names are underlined with a
3146 black rule that is thinner than the rule that underlines the title.
3147 (The black rule only occurs if the @code{@@author} command line is
3148 followed by an @code{@@page} command line.)@refill
3150 There are two ways to use the @code{@@author} command: you can write
3151 the name or names on the remaining part of the line that starts with
3152 an @code{@@author} command:@refill
3154 @example
3155 @@author by Jane Smith and John Doe
3156 @end example
3158 @noindent
3159 or you can write the names one above each other by using two (or more)
3160 @code{@@author} commands:@refill
3162 @example
3163 @group
3164 @@author Jane Smith
3165 @@author John Doe
3166 @end group
3167 @end example
3169 @noindent
3170 (Only the bottom name is underlined with a black rule.)@refill
3172 @need 950
3173 A template for this method looks like this:@refill
3175 @example
3176 @group
3177 @@titlepage
3178 @@title @var{name-of-manual-when-printed}
3179 @@subtitle @var{subtitle-if-any}
3180 @@subtitle @var{second-subtitle}
3181 @@author @var{author}
3182 @@page
3183 @dots{}
3184 @@end titlepage
3185 @end group
3186 @end example
3188 @ifinfo
3189 @noindent
3190 Contrast this form with the form of a title page written using the
3191 @code{@@sp}, @code{@@center}, and @code{@@titlefont} commands:@refill
3193 @example
3194 @@titlepage
3195 @@sp 10
3196 @@center @@titlefont@{Name of Manual When Printed@}
3197 @@sp 2
3198 @@center Subtitle, If Any
3199 @@sp 1
3200 @@center Second subtitle
3201 @@sp 2
3202 @@center Author
3203 @@page
3204 @dots{}
3205 @@end titlepage
3206 @end example
3207 @end ifinfo
3209 @node Copyright & Permissions, end titlepage, title subtitle author, Titlepage & Copyright Page
3210 @comment  node-name,  next,  previous,  up
3211 @subsection Copyright Page and Permissions
3212 @cindex Copyright page
3213 @cindex Printed permissions
3214 @cindex Permissions, printed
3216 By international treaty, the copyright notice for a book should be
3217 either on the title page or on the back of the title page.  The
3218 copyright notice should include the year followed by the name of the
3219 organization or person who owns the copyright.@refill
3221 When the copyright notice is on the back of the title page, that page
3222 is customarily not numbered.  Therefore, in Texinfo, the information
3223 on the copyright page should be within @code{@@titlepage} and
3224 @code{@@end titlepage} commands.@refill
3226 @findex vskip
3227 @findex filll
3228 @cindex Vertical whitespace (@samp{vskip})
3229 Use the @code{@@page} command to cause a page break.  To push the
3230 copyright notice and the other text on the copyright page towards the
3231 bottom of the page, you can write a somewhat mysterious line after the
3232 @code{@@page} command that reads like this:@refill
3234 @example
3235 @@vskip 0pt plus 1filll
3236 @end example
3238 @noindent
3239 This is a @TeX{} command that is not supported by the Info formatting
3240 commands.  The @code{@@vskip} command inserts whitespace.  The
3241 @samp{0pt plus 1filll} means to put in zero points of mandatory whitespace,
3242 and as much optional whitespace as needed to push the
3243 following text to the bottom of the page.  Note the use of three
3244 @samp{l}s in the word @samp{filll}; this is the correct usage in
3245 @TeX{}.@refill
3247 @findex copyright
3248 In a printed manual, the @code{@@copyright@{@}} command generates a
3249 @samp{c} inside a circle.  (In Info, it generates @samp{(C)}.)  The
3250 copyright notice itself has the following legally defined sequence:@refill
3252 @example
3253 Copyright @copyright{} @var{year} @var{copyright-owner}
3254 @end example
3256 It is customary to put information on how to get a manual after the
3257 copyright notice, followed by the copying permissions for the
3258 manual.@refill
3260 Note that permissions must be given here as well as in the summary
3261 segment within @code{@@ifinfo} and @code{@@end ifinfo} that
3262 immediately follows the header since this text appears only in the
3263 printed manual and the @samp{ifinfo} text appears only in the Info
3264 file.@refill
3266 @xref{Sample Permissions}, for the standard text.@refill
3268 @node end titlepage, headings on off, Copyright & Permissions, Titlepage & Copyright Page
3269 @comment  node-name,  next,  previous,  up
3270 @subsection Heading Generation
3271 @findex end titlepage
3272 @cindex Headings, page, begin to appear
3273 @cindex Titlepage end starts headings
3274 @cindex End titlepage starts headings
3276 An @code{@@end titlepage} command on a line by itself not only marks
3277 the end of the title and copyright pages, but also causes @TeX{} to start
3278 generating page headings and page numbers.
3280 To repeat what is said elsewhere,  Texinfo has two standard page heading
3281 formats, one for documents which are printed on one side of each sheet of paper
3282 (single-sided printing), and the other for documents which are printed on both
3283 sides of each sheet (double-sided printing).
3284 (@xref{setchapternewpage, ,@code{@@setchapternewpage}}.)
3285 You can specify these formats in different ways:@refill
3287 @itemize @bullet
3288 @item
3289 The conventional way is to write an @code{@@setchapternewpage} command
3290 before the title page commands, and then have the @code{@@end
3291 titlepage} command start generating page headings in the manner desired.
3292 (@xref{setchapternewpage, , @code{@@setchapternewpage}}.)@refill
3294 @item
3295 Alternatively, you can use the @code{@@headings} command to prevent page
3296 headings from being generated or to start them for either single or
3297 double-sided printing.  (Write an @code{@@headings} command immediately
3298 after the @code{@@end titlepage} command.  @xref{headings on off, , The
3299 @code{@@headings} Command}, for more information.)@refill
3301 @item
3302 Or, you may specify your own page heading and footing format.
3303 @xref{Headings, , Page Headings}, for detailed
3304 information about page headings and footings.@refill
3305 @end itemize
3307 Most documents are formatted with the standard single-sided or
3308 double-sided format, using @code{@@setchapternewpage odd} for
3309 double-sided printing and no @code{@@setchapternewpage} command for
3310 single-sided printing.@refill
3312 @node headings on off,  , end titlepage, Titlepage & Copyright Page
3313 @comment  node-name,  next,  previous,  up
3314 @subsection The @code{@@headings} Command
3315 @findex headings
3317 The @code{@@headings} command is rarely used.  It specifies what kind of
3318 page headings and footings to print on each page.  Usually, this is
3319 controlled by the @code{@@setchapternewpage} command.  You need the
3320 @code{@@headings} command only if the @code{@@setchapternewpage} command
3321 does not do what you want, or if you want to turn off pre-defined page
3322 headings prior to defining your own.  Write an @code{@@headings} command
3323 immediately after the @code{@@end titlepage} command.@refill
3325 You can use @code{@@headings} as follows:@refill
3327 @table @code
3328 @item @@headings off
3329 Turn off printing of page headings.@refill
3331 @item @@headings single
3332 Turn on page headings appropriate for single-sided printing.
3333 @refill
3335 @item @@headings double
3336 Turn on page headings appropriate for double-sided printing.  The two
3337 commands, @code{@@headings on} and @code{@@headings double}, are
3338 synonymous.@refill
3340 @item @@headings singleafter
3341 @itemx @@headings doubleafter
3342 Turn on @code{single} or @code{double} headings, respectively, after the
3343 current page is output.
3345 @item @@headings on
3346 Turn on page headings: @code{single} if @samp{@@setchapternewpage
3347 on}, @code{double} otherwise.
3348 @end table
3350 For example, suppose you write @code{@@setchapternewpage off} before the
3351 @code{@@titlepage} command to tell @TeX{} to start a new chapter on the
3352 same page as the end of the last chapter.  This command also causes
3353 @TeX{} to typeset page headers for single-sided printing.  To cause
3354 @TeX{} to typeset for double sided printing, write @code{@@headings
3355 double} after the @code{@@end titlepage} command.
3357 You can stop @TeX{} from generating any page headings at all by
3358 writing @code{@@headings off} on a line of its own immediately after the
3359 line containing the @code{@@end titlepage} command, like this:@refill
3361 @example
3362 @@end titlepage
3363 @@headings off
3364 @end example
3366 @noindent
3367 The @code{@@headings off} command overrides the @code{@@end titlepage}
3368 command, which would otherwise cause @TeX{} to print page
3369 headings.@refill
3371 You can also specify your own style of page heading and footing.
3372 @xref{Headings, , Page Headings}, for more information.@refill
3374 @node The Top Node, Software Copying Permissions, Titlepage & Copyright Page, Beginning a File
3375 @comment  node-name,  next,  previous,  up
3376 @section The `Top' Node and Master Menu
3377 @cindex @samp{@r{Top}} node
3378 @cindex Master menu
3379 @cindex Node, `Top'
3381 The `Top' node is the node from which you enter an Info file.@refill
3383 A `Top' node should contain a brief description of the Info file and an
3384 extensive, master menu for the whole Info file.
3385 This helps the reader understand what the Info file is
3386 about.  Also, you should write the version number of the program to
3387 which the Info file applies; or, at least, the edition number.@refill
3389 The contents of the `Top' node should appear only in the Info file; none
3390 of it should appear in printed output, so enclose it between
3391 @code{@@ifinfo} and @code{@@end ifinfo} commands.  (@TeX{} does not
3392 print either an @code{@@node} line or a menu; they appear only in Info;
3393 strictly speaking, you are not required to enclose these parts between
3394 @code{@@ifinfo} and @code{@@end ifinfo}, but it is simplest to do so.
3395 @xref{Conditionals, , Conditionally Visible Text}.)@refill
3397 @menu
3398 * Title of Top Node::           Sketch what the file is about.
3399 * Master Menu Parts::           A master menu has three or more parts.
3400 @end menu
3402 @node Title of Top Node, Master Menu Parts, The Top Node, The Top Node
3403 @ifinfo
3404 @subheading `Top' Node Title
3405 @end ifinfo
3407 Sometimes, you will want to place an @code{@@top} sectioning command
3408 line containing the title of the document immediately after the
3409 @code{@@node Top} line (@pxref{makeinfo top command, , The @code{@@top}
3410 Sectioning Command}, for more information).@refill
3412 For example, the beginning of the Top node of this manual contains an
3413 @code{@@top} sectioning command, a short description, and edition and
3414 version information.  It looks like this:@refill
3416 @example
3417 @group
3418 @dots{}
3419 @@end titlepage
3421 @@ifinfo
3422 @@node Top, Copying, , (dir)
3423 @@top Texinfo
3425 Texinfo is a documentation system@dots{}
3426 @end group
3428 @group
3429 This is edition@dots{}
3430 @dots{}
3431 @@end ifinfo
3432 @end group
3434 @group
3435 @@menu
3436 * Copying::                 Texinfo is freely
3437                               redistributable.
3438 * Overview::                What is Texinfo?
3439 @dots{}
3440 @end group
3441 @@end menu
3442 @end example
3444 In a `Top' node, the `Previous', and `Up' nodes usually refer to the top
3445 level directory of the whole Info system, which is called @samp{(dir)}.
3446 The `Next' node refers to the first node that follows the main or master
3447 menu, which is usually the copying permissions, introduction, or first
3448 chapter.@refill
3450 @node Master Menu Parts,  , Title of Top Node, The Top Node
3451 @subsection Parts of a Master Menu
3452 @cindex Master menu parts
3453 @cindex Parts of a master menu
3455 A @dfn{master menu} is a detailed main menu listing all the nodes in a
3456 file.
3458 A master menu is enclosed in @code{@@menu} and @code{@@end menu}
3459 commands and does not appear in the printed document.@refill
3461 Generally, a master menu is divided into parts.@refill
3463 @itemize @bullet
3464 @item
3465 The first part contains the major nodes in the Texinfo file: the nodes
3466 for the chapters, chapter-like sections, and the appendices.@refill
3468 @item
3469 The second part contains nodes for the indices.@refill
3471 @item
3472 The third and subsequent parts contain a listing of the other, lower
3473 level nodes, often ordered by chapter.  This way, rather than go
3474 through an intermediary menu, an inquirer can go directly to a
3475 particular node when searching for specific information.  These menu
3476 items are not required; add them if you think they are a
3477 convenience.  If you do use them, put @code{@@detailmenu} before the
3478 first one, and @code{@@end detailmenu} after the last; otherwise,
3479 @code{makeinfo} will get confused.
3480 @end itemize
3482 Each section in the menu can be introduced by a descriptive line.  So
3483 long as the line does not begin with an asterisk, it will not be
3484 treated as a menu entry.  (@xref{Writing a Menu}, for more
3485 information.)@refill
3487 For example, the master menu for this manual looks like the following
3488 (but has many more entries):@refill
3490 @example
3491 @group
3492 @@menu
3493 * Copying::             Texinfo is freely
3494                           redistributable.
3495 * Overview::            What is Texinfo?
3496 * Texinfo Mode::        Special features in GNU Emacs.
3497 @dots{}
3498 @dots{}
3499 @end group
3500 @group
3501 * Command and Variable Index::
3502                         An entry for each @@-command.
3503 * Concept Index::       An entry for each concept.
3504 @end group
3506 @group
3507 @@detailmenu
3508  --- The Detailed Node Listing ---
3510 Overview of Texinfo
3512 * Info Files::          What is an Info file?
3513 * Printed Manuals::     Characteristics of
3514                           a printed manual.
3515 @dots{}
3516 @dots{}
3517 @end group
3519 @group
3520 Using Texinfo Mode
3522 * Info on a Region::    Formatting part of a file
3523                           for Info.
3524 @dots{}
3525 @dots{}
3526 @@end detailmenu
3527 @@end menu
3528 @end group
3529 @end example
3531 @node Software Copying Permissions,  , The Top Node, Beginning a File
3532 @comment  node-name,  next,  previous,  up
3533 @section Software Copying Permissions
3534 @cindex Software copying permissions
3535 @cindex Copying software
3536 @cindex Distribution
3537 @cindex License agreement
3539 If the Texinfo file has a section containing the ``General Public
3540 License'' and the distribution information and a warranty disclaimer
3541 for the software that is documented, this section usually follows the
3542 `Top' node.  The General Public License is very important to Project
3543 GNU software.  It ensures that you and others will continue to have a
3544 right to use and share the software.@refill
3546 The copying and distribution information and the disclaimer are
3547 followed by an introduction or else by the first chapter of the
3548 manual.@refill
3550 @cindex Introduction, as part of file
3551 Although an introduction is not a required part of a Texinfo file, it
3552 is very helpful.  Ideally, it should state clearly and concisely what
3553 the file is about and who would be interested in reading it.  In
3554 general, an introduction would follow the licensing and distribution
3555 information, although sometimes people put it earlier in the document.
3556 Usually, an introduction is put in an @code{@@unnumbered} section.
3557 (@xref{unnumbered & appendix, , The @code{@@unnumbered} and
3558 @code{@@appendix} Commands}.)@refill
3560 @node Ending a File, Structuring, Beginning a File, Top
3561 @comment  node-name,  next,  previous,  up
3562 @chapter Ending a Texinfo File
3563 @cindex Ending a Texinfo file
3564 @cindex Texinfo file ending
3565 @cindex File ending
3566 @findex bye
3568 The end of a Texinfo file should include the commands that create
3569 indices and generate detailed and summary tables of contents.
3570 And it must include the @code{@@bye} command that marks the last line
3571 processed by @TeX{}.@refill
3573 @need 700
3574 For example:
3576 @example
3577 @@node    Concept Index,     , Variables Index, Top
3578 @@c        node-name,    next, previous,        up
3579 @@unnumbered Concept Index
3581 @@printindex cp
3583 @@contents
3584 @@bye
3585 @end example
3587 @menu
3588 * Printing Indices & Menus::    How to print an index in hardcopy and
3589                                   generate index menus in Info.
3590 * Contents::                    How to create a table of contents.
3591 * File End::                    How to mark the end of a file.
3592 @end menu
3594 @node Printing Indices & Menus, Contents, Ending a File, Ending a File
3595 @comment  node-name,  next,  previous,  up
3596 @section Index Menus and Printing an Index
3597 @findex printindex
3598 @cindex Printing an index
3599 @cindex Indices, printing and menus
3600 @cindex Generating menus with indices
3601 @cindex Menus generated with indices
3603 To print an index means to include it as part of a manual or Info
3604 file.  This does not happen automatically just because you use
3605 @code{@@cindex} or other index-entry generating commands in the
3606 Texinfo file; those just cause the raw data for the index to be
3607 accumulated.  To generate an index, you must include the
3608 @code{@@printindex} command at the place in the document where you
3609 want the index to appear.  Also, as part of the process of creating a
3610 printed manual, you must run a program called @code{texindex}
3611 (@pxref{Format/Print Hardcopy}) to sort the raw data to produce a sorted
3612 index file.  The sorted index file is what is actually used to
3613 print the index.@refill
3615 Texinfo offers six different types of predefined index: the concept
3616 index, the function index, the variables index, the keystroke index, the
3617 program index, and the data type index (@pxref{Predefined Indices}).  Each
3618 index type has a two-letter name: @samp{cp}, @samp{fn}, @samp{vr},
3619 @samp{ky}, @samp{pg}, and @samp{tp}.  You may merge indices, or put them
3620 into separate sections (@pxref{Combining Indices}); or you may define
3621 your own indices (@pxref{New Indices, , Defining New Indices}).@refill
3623 The @code{@@printindex} command takes a two-letter index name, reads
3624 the corresponding sorted index file and formats it appropriately into
3625 an index.@refill
3627 @ignore
3628 The two-letter index names are:
3630 @table @samp
3631 @item cp
3632 concept index
3633 @item fn
3634 function index
3635 @item vr
3636 variable index
3637 @item ky
3638 key index
3639 @item pg
3640 program index
3641 @item tp
3642 data type index
3643 @end table
3644 @end ignore
3645 The @code{@@printindex} command does not generate a chapter heading
3646 for the index.  Consequently, you should precede the
3647 @code{@@printindex} command with a suitable section or chapter command
3648 (usually @code{@@unnumbered}) to supply the chapter heading and put
3649 the index into the table of contents.  Precede the @code{@@unnumbered}
3650 command with an @code{@@node} line.@refill
3652 @need 1200
3653 For example:
3655 @smallexample
3656 @group
3657 @@node Variable Index, Concept Index, Function Index, Top
3658 @@comment    node-name,         next,       previous, up
3659 @@unnumbered Variable Index
3661 @@printindex vr
3662 @end group
3664 @group
3665 @@node     Concept Index,     , Variable Index, Top
3666 @@comment      node-name, next,       previous, up
3667 @@unnumbered Concept Index
3669 @@printindex cp
3670 @end group
3672 @group
3673 @@summarycontents
3674 @@contents
3675 @@bye
3676 @end group
3677 @end smallexample
3679 @noindent
3680 (Readers often prefer that the concept index come last in a book,
3681 since that makes it easiest to find.)@refill
3683 @ignore
3684 @c TeX can do sorting, just not conveniently enough to handle sorting
3685 @c Texinfo indexes. --karl, 5may97.
3686 In @TeX{}, the @code{@@printindex} command needs a sorted index file
3687 to work from.  @TeX{} does not know how to do sorting; this is a
3688 deficiency.  @TeX{} writes output files of raw index data; use the
3689 @code{texindex} program to convert these files to sorted index files.
3690 (@xref{Format/Print Hardcopy}, for more information.)@refill
3691 @end ignore
3694 @node Contents, File End, Printing Indices & Menus, Ending a File
3695 @comment  node-name,  next,  previous,  up
3696 @section Generating a Table of Contents
3697 @cindex Table of contents
3698 @cindex Contents, Table of
3699 @findex contents
3700 @findex summarycontents
3701 @findex shortcontents
3703 The @code{@@chapter}, @code{@@section}, and other structuring commands
3704 supply the information to make up a table of contents, but they do not
3705 cause an actual table to appear in the manual.  To do this, you must
3706 use the @code{@@contents} and @code{@@summarycontents}
3707 commands:@refill
3709 @table @code
3710 @item @@contents
3711 Generate a table of contents in a printed manual, including all
3712 chapters, sections, subsections, etc., as well as appendices and
3713 unnumbered chapters.  (Headings generated by the @code{@@heading}
3714 series of commands do not appear in the table of contents.)  The
3715 @code{@@contents} command should be written on a line by
3716 itself.@refill
3718 @item @@shortcontents
3719 @itemx @@summarycontents
3720 (@code{@@summarycontents} is a synonym for @code{@@shortcontents}; the
3721 two commands are exactly the same.)@refill
3723 Generate a short or summary table of contents that lists only the
3724 chapters (and appendices and unnumbered chapters).  Omit sections, subsections
3725 and subsubsections.  Only a long manual needs a short table
3726 of contents in addition to the full table of contents.@refill
3728 Write the @code{@@shortcontents} command on a line by itself right
3729 @emph{before} the @code{@@contents} command.@refill
3730 @end table
3732 The table of contents commands automatically generate a chapter-like
3733 heading at the top of the first table of contents page.  Write the table
3734 of contents commands at the very end of a Texinfo file, just before the
3735 @code{@@bye} command, following any index sections---anything in the
3736 Texinfo file after the table of contents commands will be omitted from
3737 the table of contents.@refill
3739 When you print a manual with a table of contents, the table of
3740 contents are printed last and numbered with roman numerals.  You need
3741 to place those pages in their proper place, after the title page,
3742 yourself.  (This is the only collating you need to do for a printed
3743 manual.  The table of contents is printed last because it is generated
3744 after the rest of the manual is typeset.)@refill
3746 @need 700
3747 Here is an example of where to write table of contents commands:@refill
3749 @example
3750 @group
3751 @var{indices}@dots{}
3752 @@shortcontents
3753 @@contents
3754 @@bye
3755 @end group
3756 @end example
3758 Since an Info file uses menus instead of tables of contents, the Info
3759 formatting commands ignore the @code{@@contents} and
3760 @code{@@shortcontents} commands.@refill
3762 @node File End,  , Contents, Ending a File
3763 @comment  node-name,  next,  previous,  up
3764 @section @code{@@bye} File Ending
3765 @findex bye
3767 An @code{@@bye} command terminates @TeX{} or Info formatting.  None of
3768 the formatting commands see any of the file following @code{@@bye}.
3769 The @code{@@bye} command should be on a line by itself.@refill
3771 If you wish, you may follow the @code{@@bye} line with notes. These notes
3772 will not be formatted and will not appear in either Info or a printed
3773 manual; it is as if text after @code{@@bye} were within @code{@@ignore}
3774 @dots{} @code{@@end ignore}.  Also, you may follow the @code{@@bye} line
3775 with a local variables list.  @xref{Compile-Command, , Using Local
3776 Variables and the Compile Command}, for more information.@refill
3778 @node Structuring, Nodes, Ending a File, Top
3779 @comment  node-name,  next,  previous,  up
3780 @chapter Chapter Structuring
3781 @cindex Chapter structuring
3782 @cindex Structuring of chapters
3784 The @dfn{chapter structuring} commands divide a document into a hierarchy of
3785 chapters, sections, subsections, and subsubsections.  These commands
3786 generate large headings; they also provide information for the table
3787 of contents of a printed manual (@pxref{Contents, , Generating a Table
3788 of Contents}).@refill
3790 The chapter structuring commands do not create an Info node structure,
3791 so normally you should put an @code{@@node} command immediately before
3792 each chapter structuring command (@pxref{Nodes}).  The only time you
3793 are likely to use the chapter structuring commands without using the
3794 node structuring commands is if you are writing a document that
3795 contains no cross references and will never be transformed into Info
3796 format.@refill
3798 It is unlikely that you will ever write a Texinfo file that is
3799 intended only as an Info file and not as a printable document.  If you
3800 do, you might still use chapter structuring commands to create a
3801 heading at the top of each node---but you don't need to.@refill
3803 @menu
3804 * Tree Structuring::            A manual is like an upside down tree @dots{}
3805 * Structuring Command Types::   How to divide a manual into parts.
3806 * makeinfo top::                The @code{@@top} command, part of the `Top' node.
3807 * chapter::                     
3808 * unnumbered & appendix::       
3809 * majorheading & chapheading::  
3810 * section::                     
3811 * unnumberedsec appendixsec heading::  
3812 * subsection::                  
3813 * unnumberedsubsec appendixsubsec subheading::  
3814 * subsubsection::               Commands for the lowest level sections.
3815 * Raise/lower sections::        How to change commands' hierarchical level.
3816 @end menu
3818 @node Tree Structuring, Structuring Command Types, Structuring, Structuring
3819 @comment  node-name,  next,  previous,  up
3820 @section Tree Structure of Sections
3821 @cindex Tree structuring
3823 A Texinfo file is usually structured like a book with chapters,
3824 sections, subsections, and the like.  This structure can be visualized
3825 as a tree (or rather as an upside-down tree) with the root at the top
3826 and the levels corresponding to chapters, sections, subsection, and
3827 subsubsections.@refill
3829 Here is a diagram that shows a Texinfo file with three chapters,
3830 each of which has two sections.@refill
3832 @example
3833 @group
3834                           Top
3835                            |
3836          -------------------------------------
3837         |                  |                  |
3838      Chapter 1          Chapter 2          Chapter 3
3839         |                  |                  |
3840      --------           --------           --------
3841     |        |         |        |         |        |
3842  Section  Section   Section  Section   Section  Section
3843    1.1      1.2       2.1      2.2       3.1      3.2
3845 @end group
3846 @end example
3848 In a Texinfo file that has this structure, the beginning of Chapter 2
3849 looks like this:@refill
3851 @example
3852 @group
3853 @@node    Chapter 2,  Chapter 3, Chapter 1, top
3854 @@chapter Chapter 2
3855 @end group
3856 @end example
3858 The chapter structuring commands are described in the sections that
3859 follow; the @code{@@node} and @code{@@menu} commands are described in
3860 following chapters. (@xref{Nodes}, and see @ref{Menus}.)@refill
3862 @node Structuring Command Types, makeinfo top, Tree Structuring, Structuring
3863 @comment  node-name,  next,  previous,  up
3864 @section Types of Structuring Commands
3866 The chapter structuring commands fall into four groups or series, each
3867 of which contains structuring commands corresponding to the
3868 hierarchical levels of chapters, sections, subsections, and
3869 subsubsections.@refill
3871 The four groups are the @code{@@chapter} series, the
3872 @code{@@unnumbered} series, the @code{@@appendix} series, and the
3873 @code{@@heading} series.@refill
3875 Each command produces titles that have a different appearance on the
3876 printed page or Info file; only some of the commands produce
3877 titles that are listed in the table of contents of a printed book or
3878 manual.@refill
3880 @itemize @bullet
3881 @item
3882 The @code{@@chapter} and @code{@@appendix} series of commands produce
3883 numbered or lettered entries both in the body of a printed work and in
3884 its table of contents.@refill
3886 @item
3887 The @code{@@unnumbered} series of commands produce unnumbered entries
3888 both in the body of a printed work and in its table of contents.  The
3889 @code{@@top} command, which has a special use, is a member of this
3890 series (@pxref{makeinfo top, , @code{@@top}}).@refill
3892 @item
3893 The @code{@@heading} series of commands produce unnumbered headings
3894 that do not appear in a table of contents.  The heading commands never
3895 start a new page.@refill
3897 @item
3898 The @code{@@majorheading} command produces results similar to using
3899 the @code{@@chapheading} command but generates a larger vertical
3900 whitespace before the heading.@refill
3902 @item
3903 When an @code{@@setchapternewpage} command says to do so, the
3904 @code{@@chapter}, @code{@@unnumbered}, and @code{@@appendix} commands
3905 start new pages in the printed manual; the @code{@@heading} commands
3906 do not.@refill
3907 @end itemize
3909 @need 1000
3910 Here are the four groups of chapter structuring commands:@refill
3912 @c Slightly different formatting for regular sized books and smallbooks.
3913 @ifset smallbook
3914 @sp 1
3915 @tex
3916 {\let\rm=\indrm \let\tt=\indtt
3917 \halign{\hskip\itemindent#\hfil&  \hskip.5em#\hfil&  \hskip.5em#\hfil&
3918 \hskip.5em#\hfil\cr
3920 & & &                                                \rm No new pages\cr
3921 \rm Numbered&    \rm Unnumbered&  \rm Lettered and numbered& \rm Unnumbered\cr
3922 \rm In contents&  \rm In contents&  \rm In contents&  \rm Not in contents\cr
3924 & & & \cr
3925  &              \tt  @@top&            &               \tt @@majorheading\cr
3926 \tt @@chapter& \tt @@unnumbered&    \tt @@appendix&     \tt @@chapheading\cr
3927 \tt @@section&   \tt @@unnumberedsec&   \tt @@appendixsec&   \tt @@heading\cr
3928 \tt @@subsection&\tt @@unnumberedsubsec&\tt @@appendixsubsec&
3929 \tt @@subheading\cr
3930 \tt @@subsubsection& \tt @@unnumberedsubsubsec& \tt @@appendixsubsubsec&
3931 \tt @@subsubheading\cr}}
3932 @end tex
3933 @end ifset
3934 @ifclear smallbook
3935 @sp 1
3936 @tex
3937 \vbox{
3938 \halign{\hskip\itemindent\hskip.5em#\hfil&  \hskip.5em#\hfil&
3939 \hskip.5em#\hfil& \hskip.5em #\hfil\cr
3941 & & & \cr
3942 & & &                                                \rm No new pages\cr
3943 \rm Numbered&    \rm Unnumbered&  \rm Lettered and numbered& \rm Unnumbered\cr
3944 \rm In contents&  \rm In contents&  \rm In contents&  \rm Not in contents\cr
3946 & & & \cr
3947  &              \tt  @@top&            &               \tt @@majorheading\cr
3948 \tt @@chapter& \tt @@unnumbered&    \tt @@appendix&     \tt @@chapheading\cr
3949 \tt @@section&   \tt @@unnumberedsec&   \tt @@appendixsec&   \tt @@heading\cr
3950 \tt @@subsection&\tt @@unnumberedsubsec&\tt @@appendixsubsec&
3951 \tt @@subheading\cr
3952 \tt @@subsubsection& \tt @@unnumberedsubsubsec& \tt @@appendixsubsubsec&
3953 \tt @@subsubheading\cr}}
3954 @end tex
3955 @end ifclear
3956 @ifinfo
3957 @example
3958 @group
3959                                                        @r{No new pages}
3960 @r{Numbered}       @r{Unnumbered}       @r{Lettered and numbered}  @r{Unnumbered}
3961 @r{In contents}    @r{In contents}          @r{In contents}        @r{Not in contents}
3963                @@top                                    @@majorheading
3964 @@chapter       @@unnumbered          @@appendix          @@chapheading
3965 @@section       @@unnumberedsec       @@appendixsec       @@heading
3966 @@subsection    @@unnumberedsubsec    @@appendixsubsec    @@subheading
3967 @@subsubsection @@unnumberedsubsubsec @@appendixsubsubsec @@subsubheading
3968 @end group
3969 @end example
3970 @end ifinfo
3972 @c Cannot line up columns properly inside of an example because of roman
3973 @c proportional fonts.
3974 @ignore
3975 @ifset smallbook
3976 @iftex
3977 @smallexample
3978 @group
3979                                                        @r{No new pages}
3980 @r{Numbered}      @r{Unnumbered}       @r{Lettered and numbered}  @r{Unnumbered}
3981 @r{In contents}      @r{In contents}           @r{In contents}         @r{Not in contents}
3983                @@top                                    @@majorheading
3984 @@chapter       @@unnumbered          @@appendix          @@chapheading
3985 @@section       @@unnumberedsec       @@appendixsec       @@heading
3986 @@subsection    @@unnumberedsubsec    @@appendixsubsec    @@subheading
3987 @@subsubsection @@unnumberedsubsubsec @@appendixsubsubsec @@subsubheading
3988 @end group
3989 @end smallexample
3990 @end iftex
3991 @end ifset
3992 @ifclear smallbook
3993 @iftex
3994 @smallexample
3995 @group
3996                                                       @r{No new pages}
3997 @r{Numbered}      @r{Unnumbered}       @r{Lettered and numbered}  @r{Unnumbered}
3998 @r{In contents}      @r{In contents}           @r{In contents}         @r{Not in contents}
4000                @@top                                    @@majorheading
4001 @@chapter       @@unnumbered          @@appendix          @@chapheading
4002 @@section       @@unnumberedsec       @@appendixsec       @@heading
4003 @@subsection    @@unnumberedsubsec    @@appendixsubsec    @@subheading
4004 @@subsubsection @@unnumberedsubsubsec @@appendixsubsubsec @@subsubheading
4005 @end group
4006 @end smallexample
4007 @end iftex
4008 @end ignore
4010 @node makeinfo top, chapter, Structuring Command Types, Structuring
4011 @comment  node-name,  next,  previous,  up
4012 @section @code{@@top}
4014 The @code{@@top} command is a special sectioning command that you use
4015 only after an @samp{@@node Top} line at the beginning of a Texinfo file.
4016 The @code{@@top} command tells the @code{makeinfo} formatter
4017 which node is the `Top'
4018 node.  It has the same typesetting effect as @code{@@unnumbered}
4019 (@pxref{unnumbered & appendix, , @code{@@unnumbered}, @code{@@appendix}}).
4020 For detailed information, see
4021 @ref{makeinfo top command, , The @code{@@top} Command}.@refill
4023 @node chapter, unnumbered & appendix, makeinfo top, Structuring
4024 @comment  node-name,  next,  previous,  up
4025 @section @code{@@chapter}
4026 @findex chapter
4028 @code{@@chapter} identifies a chapter in the document.  Write the
4029 command at the beginning of a line and follow it on the same line by
4030 the title of the chapter.@refill
4032 For example, this chapter in this manual is entitled ``Chapter
4033 Structuring''; the @code{@@chapter} line looks like this:@refill
4035 @example
4036 @@chapter Chapter Structuring
4037 @end example
4039 In @TeX{}, the @code{@@chapter} command creates a chapter in the
4040 document, specifying the chapter title.  The chapter is numbered
4041 automatically.@refill
4043 In Info, the @code{@@chapter} command causes the title to appear on a
4044 line by itself, with a line of asterisks inserted underneath.  Thus,
4045 in Info, the above example produces the following output:@refill
4047 @example
4048 Chapter Structuring
4049 *******************
4050 @end example
4052 @findex centerchap
4053 Texinfo also provides a command @code{@@centerchap}, which is analogous
4054 to @code{@@unnumbered}, but centers its argument in the printed output.
4055 This kind of stylistic choice is not usually offered by Texinfo.
4056 @c but the Hacker's Dictionary wanted it ...
4059 @node unnumbered & appendix, majorheading & chapheading, chapter, Structuring
4060 @comment  node-name,  next,  previous,  up
4061 @section @code{@@unnumbered}, @code{@@appendix}
4062 @findex unnumbered
4063 @findex appendix
4065 Use the @code{@@unnumbered} command to create a chapter that appears
4066 in a printed manual without chapter numbers of any kind.  Use the
4067 @code{@@appendix} command to create an appendix in a printed manual
4068 that is labelled by letter instead of by number.@refill
4070 For Info file output, the @code{@@unnumbered} and @code{@@appendix}
4071 commands are equivalent to @code{@@chapter}: the title is printed on a
4072 line by itself with a line of asterisks underneath.  (@xref{chapter, ,
4073 @code{@@chapter}}.)@refill
4075 To create an appendix or an unnumbered chapter, write an
4076 @code{@@appendix} or @code{@@unnumbered} command at the beginning of a
4077 line and follow it on the same line by the title, as you would if you
4078 were creating a chapter.@refill
4081 @node majorheading & chapheading, section, unnumbered & appendix, Structuring
4082 @section @code{@@majorheading}, @code{@@chapheading}
4083 @findex majorheading
4084 @findex chapheading
4086 The @code{@@majorheading} and @code{@@chapheading} commands put
4087 chapter-like headings in the body of a document.@refill
4089 However, neither command causes @TeX{} to produce a numbered heading
4090 or an entry in the table of contents; and neither command causes
4091 @TeX{} to start a new page in a printed manual.@refill
4093 In @TeX{}, an @code{@@majorheading} command generates a larger vertical
4094 whitespace before the heading than an @code{@@chapheading} command but
4095 is otherwise the same.@refill
4097 In Info,
4098 the @code{@@majorheading} and
4099 @code{@@chapheading} commands are equivalent to
4100 @code{@@chapter}: the title is printed on a line by itself with a line
4101 of asterisks underneath.  (@xref{chapter, , @code{@@chapter}}.)@refill
4103 @node section, unnumberedsec appendixsec heading, majorheading & chapheading, Structuring
4104 @comment  node-name,  next,  previous,  up
4105 @section @code{@@section}
4106 @findex section
4108 In a printed manual, an @code{@@section} command identifies a
4109 numbered section within a chapter.  The section title appears in the
4110 table of contents.  In Info, an @code{@@section} command provides a
4111 title for a segment of text, underlined with @samp{=}.@refill
4113 This section is headed with an @code{@@section} command and looks like
4114 this in the Texinfo file:@refill
4116 @example
4117 @@section @@code@{@@@@section@}
4118 @end example
4120 To create a section, write the @code{@@section} command at the
4121 beginning of a line and follow it on the same line by the section
4122 title.@refill
4124 Thus,
4126 @example
4127 @@section This is a section
4128 @end example
4130 @noindent
4131 produces
4133 @example
4134 @group
4135 This is a section
4136 =================
4137 @end group
4138 @end example
4140 @noindent
4141 in Info.
4143 @node unnumberedsec appendixsec heading, subsection, section, Structuring
4144 @comment  node-name,  next,  previous,  up
4145 @section @code{@@unnumberedsec}, @code{@@appendixsec}, @code{@@heading}
4146 @findex unnumberedsec
4147 @findex appendixsec
4148 @findex heading
4150 The @code{@@unnumberedsec}, @code{@@appendixsec}, and @code{@@heading}
4151 commands are, respectively, the unnumbered, appendix-like, and
4152 heading-like equivalents of the @code{@@section} command.
4153 (@xref{section, , @code{@@section}}.)@refill
4155 @table @code
4156 @item @@unnumberedsec
4157 The @code{@@unnumberedsec} command may be used within an
4158 unnumbered chapter or within a regular chapter or appendix to
4159 provide an unnumbered section.@refill
4161 @item @@appendixsec
4162 @itemx @@appendixsection
4163 @code{@@appendixsection} is a longer spelling of the
4164 @code{@@appendixsec} command; the two are synonymous.@refill
4165 @findex appendixsection
4167 Conventionally, the @code{@@appendixsec} or @code{@@appendixsection}
4168 command is used only within appendices.@refill
4170 @item @@heading
4171 You may use the @code{@@heading} command anywhere you wish for a
4172 section-style heading that will not appear in the table of contents.@refill
4173 @end table
4175 @node subsection, unnumberedsubsec appendixsubsec subheading, unnumberedsec appendixsec heading, Structuring
4176 @comment  node-name,  next,  previous,  up
4177 @section The @code{@@subsection} Command
4178 @findex subsection
4180 Subsections are to sections as sections are to chapters.
4181 (@xref{section, , @code{@@section}}.)  In Info, subsection titles are
4182 underlined with @samp{-}.  For example,@refill
4184 @example
4185 @@subsection This is a subsection
4186 @end example
4188 @noindent
4189 produces
4191 @example
4192 @group
4193 This is a subsection
4194 --------------------
4195 @end group
4196 @end example
4198 In a printed manual, subsections are listed in the table of contents
4199 and are numbered three levels deep.@refill
4201 @node unnumberedsubsec appendixsubsec subheading, subsubsection, subsection, Structuring
4202 @comment  node-name,  next,  previous,  up
4203 @section The @code{@@subsection}-like Commands
4204 @cindex Subsection-like commands
4205 @findex unnumberedsubsec
4206 @findex appendixsubsec
4207 @findex subheading
4209 The @code{@@unnumberedsubsec}, @code{@@appendixsubsec}, and
4210 @code{@@subheading} commands are, respectively, the unnumbered,
4211 appendix-like, and heading-like equivalents of the @code{@@subsection}
4212 command.  (@xref{subsection, , @code{@@subsection}}.)@refill
4214 In Info, the @code{@@subsection}-like commands generate a title
4215 underlined with hyphens.  In a printed manual, an @code{@@subheading}
4216 command produces a heading like that of a subsection except that it is
4217 not numbered and does not appear in the table of contents.  Similarly,
4218 an @code{@@unnumberedsubsec} command produces an unnumbered heading like
4219 that of a subsection and an @code{@@appendixsubsec} command produces a
4220 subsection-like heading labelled with a letter and numbers; both of
4221 these commands produce headings that appear in the table of
4222 contents.@refill
4224 @node subsubsection, Raise/lower sections, unnumberedsubsec appendixsubsec subheading, Structuring
4225 @comment  node-name,  next,  previous,  up
4226 @section The `subsub' Commands
4227 @cindex Subsub commands
4228 @findex subsubsection
4229 @findex unnumberedsubsubsec
4230 @findex appendixsubsubsec
4231 @findex subsubheading
4233 The fourth and lowest level sectioning commands in Texinfo are the
4234 `subsub' commands.  They are:@refill
4236 @table @code
4237 @item @@subsubsection
4238 Subsubsections are to subsections as subsections are to sections.
4239 (@xref{subsection, , @code{@@subsection}}.)  In a printed manual,
4240 subsubsection titles appear in the table of contents and are numbered
4241 four levels deep.@refill
4243 @item @@unnumberedsubsubsec
4244 Unnumbered subsubsection titles appear in the table of contents of a
4245 printed manual, but lack numbers.  Otherwise, unnumbered
4246 subsubsections are the same as subsubsections.  In Info, unnumbered
4247 subsubsections look exactly like ordinary subsubsections.@refill
4249 @item @@appendixsubsubsec
4250 Conventionally, appendix commands are used only for appendices and are
4251 lettered and numbered appropriately in a printed manual.  They also
4252 appear in the table of contents.  In Info, appendix subsubsections look
4253 exactly like ordinary subsubsections.@refill
4255 @item @@subsubheading
4256 The @code{@@subsubheading} command may be used anywhere that you need
4257 a small heading that will not appear in the table of contents.  In
4258 Info, subsubheadings look exactly like ordinary subsubsection
4259 headings.@refill
4260 @end table
4262 In Info,  `subsub' titles are underlined with periods.
4263 For example,@refill
4265 @example
4266 @@subsubsection This is a subsubsection
4267 @end example
4269 @noindent
4270 produces
4272 @example
4273 @group
4274 This is a subsubsection
4275 .......................
4276 @end group
4277 @end example
4279 @node Raise/lower sections,  , subsubsection, Structuring
4280 @comment  node-name,  next,  previous,  up
4281 @section @code{@@raisesections} and @code{@@lowersections}
4282 @findex raisesections
4283 @findex lowersections
4284 @cindex Raising and lowering sections
4285 @cindex Sections, raising and lowering
4287 The @code{@@raisesections} and @code{@@lowersections} commands raise and
4288 lower the hierarchical level of chapters, sections, subsections and the
4289 like.  The @code{@@raisesections} command changes sections to chapters,
4290 subsections to sections, and so on.  The @code{@@lowersections} command
4291 changes chapters to sections, sections to subsections, and so on.
4293 @cindex Include files, and section levels
4294 An @code{@@lowersections} command is useful if you wish to include text
4295 that is written as an outer or standalone Texinfo file in another
4296 Texinfo file as an inner, included file.  If you write the command at
4297 the beginning of the file, all your @code{@@chapter} commands are
4298 formatted as if they were @code{@@section} commands, all your
4299 @code{@@section} command are formatted as if they were
4300 @code{@@subsection} commands, and so on.
4302 @need 1000
4303 @code{@@raisesections} raises a command one level in the chapter
4304 structuring hierarchy:@refill
4306 @example
4307 @group
4308   @r{Change}           @r{To}
4310 @@subsection     @@section,
4311 @@section        @@chapter,
4312 @@heading        @@chapheading,
4313           @r{etc.}
4314 @end group
4315 @end example
4317 @need 1000
4318 @code{@@lowersections} lowers a command one level in the chapter
4319 structuring hierarchy:@refill
4321 @example
4322 @group
4323   @r{Change}           @r{To}
4325 @@chapter        @@section,
4326 @@subsection     @@subsubsection,
4327 @@heading        @@subheading,
4328           @r{etc.}
4329 @end group
4330 @end example
4332 An @code{@@raisesections} or @code{@@lowersections} command changes only
4333 those structuring commands that follow the command in the Texinfo file.
4334 Write an @code{@@raisesections} or @code{@@lowersections} command on a
4335 line of its own.
4337 An @code{@@lowersections} command cancels an @code{@@raisesections}
4338 command, and vice versa.  Typically, the commands are used like this:
4340 @example
4341 @@lowersections
4342 @@include somefile.texi
4343 @@raisesections
4344 @end example
4346 Without the @code{@@raisesections}, all the subsequent sections in your
4347 document will be lowered.
4349 Repeated use of the commands continue to raise or lower the hierarchical
4350 level a step at a time.
4352 An attempt to raise above `chapters' reproduces chapter commands; an
4353 attempt to lower below `subsubsections' reproduces subsubsection
4354 commands.
4356 @node Nodes, Menus, Structuring, Top
4357 @comment  node-name,  next,  previous,  up
4358 @chapter Nodes
4360 @dfn{Nodes} are the primary segments of a Texinfo file.  They do not
4361 themselves impose a hierarchic or any other kind of structure on a file.
4362 Nodes contain @dfn{node pointers} that name other nodes, and can contain
4363 @dfn{menus} which are lists of nodes.  In Info, the movement commands
4364 can carry you to a pointed-to node or to a node listed in a menu.  Node
4365 pointers and menus provide structure for Info files just as chapters,
4366 sections, subsections, and the like, provide structure for printed
4367 books.@refill
4369 @menu
4370 * Two Paths::                   Different commands to structure
4371                                   Info output and printed output.
4372 * Node Menu Illustration::      A diagram, and sample nodes and menus.
4373 * node::                        How to write a node, in detail.
4374 * makeinfo Pointer Creation::   How to create node pointers with @code{makeinfo}.
4375 @end menu
4377 @node Two Paths, Node Menu Illustration, Nodes, Nodes
4378 @ifinfo
4379 @heading Two Paths
4380 @end ifinfo
4382 The node and menu commands and the chapter structuring commands are
4383 independent of each other:
4385 @itemize @bullet
4386 @item
4387 In Info, node and menu commands provide structure.  The chapter
4388 structuring commands generate headings with different kinds of
4389 underlining---asterisks for chapters, hyphens for sections, and so on;
4390 they do nothing else.@refill
4392 @item
4393 In @TeX{}, the chapter structuring commands generate chapter and section
4394 numbers and tables of contents.  The node and menu commands provide
4395 information for cross references; they do nothing else.@refill
4396 @end itemize
4398 You can use node pointers and menus to structure an Info file any way
4399 you want; and you can write a Texinfo file so that its Info output has a
4400 different structure than its printed output.  However, most Texinfo
4401 files are written such that the structure for the Info output
4402 corresponds to the structure for the printed output.  It is not
4403 convenient to do otherwise.@refill
4405 Generally, printed output is structured in a tree-like hierarchy in
4406 which the chapters are the major limbs from which the sections branch
4407 out.  Similarly, node pointers and menus are organized to create a
4408 matching structure in the Info output.@refill
4410 @node Node Menu Illustration, node, Two Paths, Nodes
4411 @comment  node-name,  next,  previous,  up
4412 @section Node and Menu Illustration
4414 Here is a copy of the diagram shown earlier that illustrates a Texinfo
4415 file with three chapters, each of which contains two sections.@refill
4417 Note that the ``root'' is at the top of the diagram and the ``leaves''
4418 are at the bottom.  This is how such a diagram is drawn conventionally;
4419 it illustrates an upside-down tree.  For this reason, the root node is
4420 called the `Top' node, and `Up' node pointers carry you closer to the
4421 root.@refill
4423 @example
4424 @group
4425                           Top
4426                            |
4427          -------------------------------------
4428         |                  |                  |
4429      Chapter 1          Chapter 2          Chapter 3
4430         |                  |                  |
4431      --------           --------           --------
4432     |        |         |        |         |        |
4433  Section  Section   Section  Section   Section  Section
4434    1.1      1.2       2.1      2.2       3.1      3.2
4436 @end group
4437 @end example
4439 Write the beginning of the node for Chapter 2 like this:@refill
4441 @example
4442 @group
4443 @@node     Chapter 2,  Chapter 3, Chapter 1, top
4444 @@comment  node-name,  next,      previous,  up
4445 @end group
4446 @end example
4448 @noindent
4449 This @code{@@node} line says that the name of this node is ``Chapter 2'', the
4450 name of the `Next' node is ``Chapter 3'', the name of the `Previous'
4451 node is ``Chapter 1'', and the name of the `Up' node is ``Top''.
4453 @quotation
4454 @strong{Please Note:} `Next' refers to the next node at the same
4455 hierarchical level in the manual, not necessarily to the next node
4456 within the Texinfo file.  In the Texinfo file, the subsequent node may
4457 be at a lower level---a section-level node may follow a chapter-level
4458 node, and a subsection-level node may follow a section-level node.
4459 `Next' and `Previous' refer to nodes at the @emph{same} hierarchical
4460 level.  (The `Top' node contains the exception to this rule.  Since the
4461 `Top' node is the only node at that level, `Next' refers to the first
4462 following node, which is almost always a chapter or chapter-level
4463 node.)@refill
4464 @end quotation
4466 To go to Sections 2.1 and 2.2 using Info, you need a menu inside Chapter
4467 2.  (@xref{Menus}.)  You would write the menu just
4468 before the beginning of Section 2.1, like this:@refill
4470 @example
4471 @group
4472     @@menu
4473     * Sect. 2.1::    Description of this section.
4474     * Sect. 2.2::
4475     @@end menu
4476 @end group
4477 @end example
4479 Write the node for Sect. 2.1 like this:@refill
4481 @example
4482 @group
4483     @@node     Sect. 2.1, Sect. 2.2, Chapter 2, Chapter 2
4484     @@comment  node-name, next,      previous,  up
4485 @end group
4486 @end example
4488 In Info format, the `Next' and `Previous' pointers of a node usually
4489 lead to other nodes at the same level---from chapter to chapter or from
4490 section to section (sometimes, as shown, the `Previous' pointer points
4491 up); an `Up' pointer usually leads to a node at the level above (closer
4492 to the `Top' node); and a `Menu' leads to nodes at a level below (closer
4493 to `leaves').  (A cross reference can point to a node at any level;
4494 see @ref{Cross References}.)@refill
4496 Usually, an @code{@@node} command and a chapter structuring command are
4497 used in sequence, along with indexing commands.  (You may follow the
4498 @code{@@node} line with a comment line that reminds you which pointer is
4499 which.)@refill
4501 Here is the beginning of the chapter in this manual called ``Ending a
4502 Texinfo File''.  This shows an @code{@@node} line followed by a comment
4503 line, an @code{@@chapter} line, and then by indexing lines.@refill
4505 @example
4506 @group
4507 @@node    Ending a File, Structuring, Beginning a File, Top
4508 @@comment node-name,     next,        previous,         up
4509 @@chapter Ending a Texinfo File
4510 @@cindex Ending a Texinfo file
4511 @@cindex Texinfo file ending
4512 @@cindex File ending
4513 @end group
4514 @end example
4516 @node node, makeinfo Pointer Creation, Node Menu Illustration, Nodes
4517 @comment  node-name,  next,  previous,  up
4518 @section The @code{@@node} Command
4520 @cindex Node, defined
4521 A @dfn{node} is a segment of text that begins at an @code{@@node}
4522 command and continues until the next @code{@@node} command.  The
4523 definition of node is different from that for chapter or section.  A
4524 chapter may contain sections and a section may contain subsections;
4525 but a node cannot contain subnodes; the text of a node continues only
4526 until the next @code{@@node} command in the file.  A node usually
4527 contains only one chapter structuring command, the one that follows
4528 the @code{@@node} line.  On the other hand, in printed output nodes
4529 are used only for cross references, so a chapter or section may
4530 contain any number of nodes.  Indeed, a chapter usually contains
4531 several nodes, one for each section, subsection, and
4532 subsubsection.@refill
4534 To create a node, write an @code{@@node} command at the beginning of a
4535 line, and follow it with four arguments, separated by commas, on the
4536 rest of the same line.  These arguments are the name of the node, and
4537 the names of the `Next', `Previous', and `Up' pointers, in that order.
4538 You may insert spaces before each pointer if you wish; the spaces are
4539 ignored.  You must write the name of the node, and the names of the
4540 `Next', `Previous', and `Up' pointers, all on the same line.  Otherwise,
4541 the formatters fail.  (@inforef{Top, info, info}, for more information
4542 about nodes in Info.)@refill
4544 Usually, you write one of the chapter-structuring command lines
4545 immediately after an @code{@@node} line---for example, an
4546 @code{@@section} or @code{@@subsection} line.  (@xref{Structuring
4547 Command Types, , Types of Structuring Commands}.)@refill
4549 @quotation
4550 @strong{Please note:} The GNU Emacs Texinfo mode updating commands work
4551 only with Texinfo files in which @code{@@node} lines are followed by chapter
4552 structuring lines.  @xref{Updating Requirements}.@refill
4553 @end quotation
4555 @TeX{} uses @code{@@node} lines to identify the names to use for cross
4556 references.  For this reason, you must write @code{@@node} lines in a
4557 Texinfo file that you intend to format for printing, even if you do not
4558 intend to format it for Info.  (Cross references, such as the one at the
4559 end of this sentence, are made with @code{@@xref} and its related
4560 commands; see @ref{Cross References}.)@refill
4562 @menu
4563 * Node Names::                  How to choose node and pointer names.
4564 * Writing a Node::              How to write an @code{@@node} line.
4565 * Node Line Tips::              Keep names short.
4566 * Node Line Requirements::      Keep names unique, without @@-commands.
4567 * First Node::                  How to write a `Top' node.
4568 * makeinfo top command::        How to use the @code{@@top} command.
4569 * Top Node Summary::            Write a brief description for readers.
4570 @end menu
4572 @node Node Names, Writing a Node, node, node
4573 @ifinfo
4574 @subheading Choosing Node and Pointer Names
4575 @end ifinfo
4577 The name of a node identifies the node.  The pointers enable
4578 you to reach other nodes and consist of the names of those nodes.@refill
4580 Normally, a node's `Up' pointer contains the name of the node whose menu
4581 mentions that node.  The node's `Next' pointer contains the name of the
4582 node that follows that node in that menu and its `Previous' pointer
4583 contains the name of the node that precedes it in that menu.  When a
4584 node's `Previous' node is the same as its `Up' node, both node pointers
4585 name the same node.@refill
4587 Usually, the first node of a Texinfo file is the `Top' node, and its
4588 `Up' and `Previous' pointers point to the @file{dir} file, which
4589 contains the main menu for all of Info.@refill
4591 The `Top' node itself contains the main or master menu for the manual.
4592 Also, it is helpful to include a brief description of the manual in the
4593 `Top' node.  @xref{First Node}, for information on how to write the
4594 first node of a Texinfo file.@refill
4596 @node Writing a Node, Node Line Tips, Node Names, node
4597 @comment  node-name,  next,  previous,  up
4598 @subsection How to Write an @code{@@node} Line
4599 @cindex Writing an @code{@@node} line
4600 @cindex @code{@@node} line writing
4601 @cindex Node line writing
4603 The easiest way to write an @code{@@node} line is to write @code{@@node}
4604 at the beginning of a line and then the name of the node, like
4605 this:@refill
4607 @example
4608 @@node @var{node-name}
4609 @end example
4611 If you are using GNU Emacs, you can use the update node commands
4612 provided by Texinfo mode to insert the names of the pointers; or you
4613 can leave the pointers out of the Texinfo file and let @code{makeinfo}
4614 insert node pointers into the Info file it creates.  (@xref{Texinfo
4615 Mode}, and @ref{makeinfo Pointer Creation}.)@refill
4617 Alternatively, you can insert the `Next', `Previous', and `Up'
4618 pointers yourself.  If you do this, you may find it helpful to use the
4619 Texinfo mode keyboard command @kbd{C-c C-c n}.  This command inserts
4620 @samp{@@node} and a comment line listing the names of the pointers in
4621 their proper order.  The comment line helps you keep track of which
4622 arguments are for which pointers.  This comment line is especially useful
4623 if you are not familiar with Texinfo.@refill
4625 The template for a node line with `Next', `Previous', and `Up' pointers
4626 looks like this:@refill
4628 @example
4629 @@node @var{node-name}, @var{next}, @var{previous}, @var{up}
4630 @end example
4632 If you wish, you can ignore @code{@@node} lines altogether in your first
4633 draft and then use the @code{texinfo-insert-node-lines} command to
4634 create @code{@@node} lines for you.  However, we do not
4635 recommend this practice.  It is better to name the node itself
4636 at the same time that you
4637 write a segment so you can easily make cross references.  A large number
4638 of cross references are an especially important feature of a good Info
4639 file.@refill
4641 After you have inserted an @code{@@node} line, you should immediately
4642 write an @@-command for the chapter or section and insert its name.
4643 Next (and this is important!), put in several index entries.  Usually,
4644 you will find at least two and often as many as four or five ways of
4645 referring to the node in the index.  Use them all.  This will make it
4646 much easier for people to find the node.@refill
4648 @node Node Line Tips, Node Line Requirements, Writing a Node, node
4649 @comment  node-name,  next,  previous,  up
4650 @subsection @code{@@node} Line Tips
4652 Here are three suggestions:
4654 @itemize @bullet
4655 @item
4656 Try to pick node names that are informative but short.@refill
4658 In the Info file, the file name, node name, and pointer names are all
4659 inserted on one line, which may run into the right edge of the window.
4660 (This does not cause a problem with Info, but is ugly.)@refill
4662 @item
4663 Try to pick node names that differ from each other near the beginnings
4664 of their names.  This way, it is easy to use automatic name completion in
4665 Info.@refill
4667 @item
4668 By convention, node names are capitalized just as they would be for
4669 section or chapter titles---initial and significant words are
4670 capitalized; others are not.@refill
4671 @end itemize
4673 @node Node Line Requirements, First Node, Node Line Tips, node
4674 @comment  node-name,  next,  previous,  up
4675 @subsection @code{@@node} Line Requirements
4677 @cindex Node line requirements
4678 Here are several requirements for @code{@@node} lines:
4680 @itemize @bullet
4681 @cindex Unique nodename requirement
4682 @cindex Nodename must be unique
4683 @item
4684 All the node names for a single Info file must be unique.@refill
4686 Duplicates confuse the Info movement commands.  This means, for
4687 example, that if you end every chapter with a summary, you must name
4688 each summary node differently.  You cannot just call each one
4689 ``Summary''.  You may, however, duplicate the titles of chapters, sections,
4690 and the like.  Thus you can end each chapter in a book with a section
4691 called ``Summary'', so long as the node names for those sections are all
4692 different.@refill
4694 @item
4695 A pointer name must be the name of a node.@refill
4697 The node to which a pointer points may come before or after the
4698 node containing the pointer.@refill
4700 @cindex @@-command in nodename
4701 @cindex Nodename, cannot contain
4702 @item
4703 You cannot use any of the Texinfo @@-commands in a node name;
4704 @w{@@-commands} confuse Info.@refill
4706 @need 750
4707 Thus, the beginning of the section called @code{@@chapter} looks like
4708 this:@refill
4710 @smallexample
4711 @group
4712 @@node  chapter, unnumbered & appendix, makeinfo top, Structuring
4713 @@comment  node-name,  next,  previous,  up
4714 @@section @@code@{@@@@chapter@}
4715 @@findex chapter
4716 @end group
4717 @end smallexample
4719 @cindex Comma in nodename
4720 @cindex Apostrophe in nodename
4721 @item
4722 You cannot use commas or apostrophes within a node name; these
4723 confuse @TeX{} or the Info formatters.@refill
4725 @need 700
4726 For example, the following is a section title:
4728 @smallexample
4729 @@code@{@@@@unnumberedsec@}, @@code@{@@@@appendixsec@}, @@code@{@@@@heading@}
4730 @end smallexample
4732 @noindent
4733 The corresponding node name is:
4735 @smallexample
4736 unnumberedsec appendixsec heading
4737 @end smallexample
4739 @cindex Case in nodename
4740 @item
4741 Case is significant.
4742 @end itemize
4745 @node First Node, makeinfo top command, Node Line Requirements, node
4746 @comment  node-name,  next,  previous,  up
4747 @subsection The First Node
4748 @cindex Top node is first
4749 @cindex First node
4751 The first node of a Texinfo file is the @dfn{Top} node, except in an
4752 included file (@pxref{Include Files}).  The Top node contains the main
4753 or master menu for the document, and a short summary of the document
4754 (@pxref{Top Node Summary}).
4756 @cindex Up node of Top node
4757 @cindex (dir) as Up node of Top node
4758 The Top node (which must be named @samp{top} or @samp{Top}) should have
4759 as its `Up' node the name of a node in another file, where there is a
4760 menu that leads to this file.  Specify the file name in parentheses.  If
4761 the file is to be installed directly in the Info directory file, use
4762 @samp{(dir)} as the parent of the Top node; this is short for
4763 @samp{(dir)top}, and specifies the Top node in the @file{dir} file,
4764 which contains the main menu for the Info system as a whole.  For
4765 example, the @code{@@node Top} line of this manual looks like this:
4767 @example
4768 @@node Top, Copying, , (dir)
4769 @end example
4771 @noindent
4772 (You can use the Texinfo updating commands or the @code{makeinfo}
4773 utility to insert these pointers automatically.)
4775 @cindex Previous node of Top node
4776 Do not define the `Previous' node of the Top node to be @samp{(dir)}, as
4777 it causes confusing behavior for users: if you are in the Top node and
4778 hits @key{DEL} to go backwards, you wind up in the middle of the
4779 some other entry in the @file{dir} file, which has nothing to do with
4780 what you were reading.
4782 @xref{Install an Info File}, for more information about installing
4783 an Info file in the @file{info} directory.
4786 @node makeinfo top command, Top Node Summary, First Node, node
4787 @comment  node-name,  next,  previous,  up
4788 @subsection The @code{@@top} Sectioning Command
4789 @findex top @r{(@@-command)}
4791 A special sectioning command, @code{@@top}, has been created for use
4792 with the @code{@@node Top} line.  The @code{@@top} sectioning command tells
4793 @code{makeinfo} that it marks the `Top' node in the file.  It provides
4794 the information that @code{makeinfo} needs to insert node
4795 pointers automatically.  Write the @code{@@top} command at the
4796 beginning of the line immediately following the @code{@@node Top}
4797 line.  Write the title on the remaining part of the same line as the
4798 @code{@@top} command.@refill
4800 In Info, the @code{@@top} sectioning command causes the title to appear on a
4801 line by itself, with a line of asterisks inserted underneath.@refill
4803 In @TeX{} and @code{texinfo-format-buffer}, the @code{@@top}
4804 sectioning command is merely a synonym for @code{@@unnumbered}.
4805 Neither of these formatters require an @code{@@top} command, and do
4806 nothing special with it.  You can use @code{@@chapter} or
4807 @code{@@unnumbered} after the @code{@@node Top} line when you use
4808 these formatters.  Also, you can use @code{@@chapter} or
4809 @code{@@unnumbered} when you use the Texinfo updating commands to
4810 create or update pointers and menus.@refill
4813 @node Top Node Summary,  , makeinfo top command, node
4814 @subsection The `Top' Node Summary
4815 @cindex @samp{@r{Top}} node summary
4817 You can help readers by writing a summary in the `Top' node, after the
4818 @code{@@top} line, before the main or master menu.  The summary should
4819 briefly describe the document.  In Info, this summary will appear just
4820 before the master menu.  In a printed manual, this summary will appear
4821 on a page of its own.@refill
4823 If you do not want the summary to appear on a page of its own in a
4824 printed manual, you can enclose the whole of the `Top' node, including
4825 the @code{@@node Top} line and the @code{@@top} sectioning command line
4826 or other sectioning command line between @code{@@ifinfo} and @code{@@end
4827 ifinfo}.  This prevents any of the text from appearing in the printed
4828 output. (@pxref{Conditionals, , Conditionally Visible Text}).  You can
4829 repeat the brief description from the `Top' node within @code{@@iftex}
4830 @dots{} @code{@@end iftex} at the beginning of the first chapter, for
4831 those who read the printed manual.  This saves paper and may look
4832 neater.@refill
4834 You should write the version number of the program to which the manual
4835 applies in the summary.  This helps the reader keep track of which
4836 manual is for which version of the program.  If the manual changes more
4837 frequently than the program or is independent of it, you should also
4838 include an edition number for the manual.  (The title page should also
4839 contain this information: see @ref{titlepage, ,
4840 @code{@@titlepage}}.)@refill
4842 @node makeinfo Pointer Creation,  , node, Nodes
4843 @section Creating Pointers with @code{makeinfo}
4844 @cindex Creating pointers with @code{makeinfo}
4845 @cindex Pointer creation with @code{makeinfo}
4846 @cindex Automatic pointer creation with @code{makeinfo}
4848 The @code{makeinfo} program has a feature for automatically creating
4849 node pointers for a hierarchically organized file that lacks
4850 them.@refill
4852 When you take advantage of this feature, you do not need to write the
4853 `Next', `Previous', and `Up' pointers after the name of a node.
4854 However, you must write a sectioning command, such as @code{@@chapter}
4855 or @code{@@section}, on the line immediately following each truncated
4856 @code{@@node} line.  You cannot write a comment line after a node
4857 line; the section line must follow it immediately.@refill
4859 In addition, you must follow the `Top' @code{@@node} line with a line beginning
4860 with @code{@@top} to mark the `Top' node in the file. @xref{makeinfo
4861 top, , @code{@@top}}.
4863 Finally, you must write the name of each node (except for the `Top'
4864 node) in a menu that is one or more hierarchical levels above the
4865 node's hierarchical level.@refill
4867 This node pointer insertion feature in @code{makeinfo} is an
4868 alternative to the menu and pointer creation and update commands in
4869 Texinfo mode.  (@xref{Updating Nodes and Menus}.)  It is especially
4870 helpful to people who do not use GNU Emacs for writing Texinfo
4871 documents.@refill
4873 @node Menus, Cross References, Nodes, Top
4874 @comment  node-name,  next,  previous,          up
4875 @chapter Menus
4876 @cindex Menus
4877 @findex menu
4879 @dfn{Menus} contain pointers to subordinate
4880 nodes.@footnote{Menus can carry you to any node, regardless
4881 of the hierarchical structure; even to nodes in a different
4882 Info file.  However, the GNU Emacs Texinfo mode updating
4883 commands work only to create menus of subordinate nodes.
4884 Conventionally, cross references are used to refer to other
4885 nodes.} In Info, you use menus to go to such nodes.  Menus
4886 have no effect in printed manuals and do not appear in
4887 them.@refill
4889 By convention, a menu is put at the end of a node since a reader who
4890 uses the menu may not see text that follows it.@refill
4892 @ifinfo
4893 A node that has a menu should @emph{not} contain much text.  If you
4894 have a lot of text and a menu, move most of the text into a new
4895 subnode---all but a few lines.@refill
4896 @end ifinfo
4897 @iftex
4898 @emph{A node that has a menu should not contain much text.} If you
4899 have a lot of text and a menu, move most of the text into a new
4900 subnode---all but a few lines.  Otherwise, a reader with a terminal
4901 that displays only a few lines may miss the menu and its associated
4902 text.  As a practical matter, you should locate a menu within 20 lines
4903 of the beginning of the node.@refill
4904 @end iftex
4906 @menu
4907 * Menu Location::               Put a menu in a short node.
4908 * Writing a Menu::              What is a menu?
4909 * Menu Parts::                  A menu entry has three parts.
4910 * Less Cluttered Menu Entry::   Two part menu entry.
4911 * Menu Example::                Two and three part menu entries.
4912 * Other Info Files::            How to refer to a different Info file.
4913 @end menu
4915 @node Menu Location, Writing a Menu, Menus, Menus
4916 @ifinfo
4917 @heading Menus Need Short Nodes
4918 @end ifinfo
4919 @cindex Menu location
4920 @cindex Location of menus
4921 @cindex Nodes for menus are short
4922 @cindex Short nodes for menus
4924 @ifinfo
4925 A reader can easily see a menu that is close to the beginning of the
4926 node.  The node should be short.  As a practical matter, you should
4927 locate a menu within 20 lines of the beginning of the node.
4928 Otherwise, a reader with a terminal that displays only a few lines may
4929 miss the menu and its associated text.@refill
4930 @end ifinfo
4932 The short text before a menu may look awkward in a printed manual.  To
4933 avoid this, you can write a menu near the beginning of its node and
4934 follow the menu by an @code{@@node} line, and then an @code{@@heading}
4935 line located within @code{@@ifinfo} and @code{@@end ifinfo}.  This way,
4936 the menu, @code{@@node} line, and title appear only in the Info file,
4937 not the printed document.@refill
4939 For example, the preceding two paragraphs follow an Info-only menu,
4940 @code{@@node} line, and heading, and look like this:@refill
4942 @example
4943 @group
4944 @@menu
4945 * Menu Location::             Put a menu in a short node.
4946 * Writing a Menu::            What is a menu?
4947 * Menu Parts::                A menu entry has three parts.
4948 * Less Cluttered Menu Entry:: Two part menu entry.
4949 * Menu Example::              Two and three part entries.
4950 * Other Info Files::          How to refer to a different
4951                                 Info file.
4952 @@end menu
4954 @@node Menu Location, Writing a Menu, , Menus
4955 @@ifinfo
4956 @@heading Menus Need Short Nodes
4957 @@end ifinfo
4958 @end group
4959 @end example
4961 The Texinfo file for this document contains more than a dozen
4962 examples of this procedure.  One is at the beginning of this chapter;
4963 another is at the beginning of the ``Cross References'' chapter.@refill
4965 @node Writing a Menu, Menu Parts, Menu Location, Menus
4966 @section Writing a Menu
4967 @cindex Writing a menu
4968 @cindex Menu writing
4970 A menu consists of an @code{@@menu} command on a line by
4971 itself followed by menu entry lines or menu comment lines
4972 and then by an @code{@@end menu} command on a line by
4973 itself.@refill
4975 A menu looks like this:@refill
4977 @example
4978 @group
4979 @@menu
4980 Larger Units of Text
4982 * Files::                       All about handling files.
4983 * Multiples: Buffers.           Multiple buffers; editing
4984                                   several files at once.
4985 @@end menu
4986 @end group
4987 @end example
4989 In a menu, every line that begins with an @w{@samp{* }} is a
4990 @dfn{menu entry}.  (Note the space after the asterisk.)  A
4991 line that does not start with an @w{@samp{* }} may also
4992 appear in a menu.  Such a line is not a menu entry but is a
4993 menu comment line that appears in the Info file.  In
4994 the example above, the line @samp{Larger Units of Text} is a
4995 menu comment line; the two lines starting with @w{@samp{* }}
4996 are menu entries.
4998 @node Menu Parts, Less Cluttered Menu Entry, Writing a Menu, Menus
4999 @section The Parts of a Menu
5000 @cindex Parts of a menu
5001 @cindex Menu parts
5002 @cindex @code{@@menu} parts
5004 A menu entry has three parts, only the second of which is required:
5006 @enumerate
5007 @item
5008 The menu entry name (optional).
5010 @item
5011 The name of the node (required).
5013 @item
5014 A description of the item (optional).
5015 @end enumerate
5017 The template for a menu entry looks like this:@refill
5019 @example
5020 * @var{menu-entry-name}: @var{node-name}.   @var{description}
5021 @end example
5023 Follow the menu entry name with a single colon and follow the node name
5024 with tab, comma, period, or newline.@refill
5026 In Info, a user selects a node with the @kbd{m} (@code{Info-menu})
5027 command.  The menu entry name is what the user types after the @kbd{m}
5028 command.@refill
5030 The third part of a menu entry is a descriptive phrase or sentence.
5031 Menu entry names and node names are often short; the description
5032 explains to the reader what the node is about.  A useful description
5033 complements the node name rather than repeats it.  The description,
5034 which is optional, can spread over two or more lines; if it does, some
5035 authors prefer to indent the second line while others prefer to align it
5036 with the first (and all others).  It's up to you.
5039 @node Less Cluttered Menu Entry, Menu Example, Menu Parts, Menus
5040 @comment  node-name,  next,  previous,  up
5041 @section Less Cluttered Menu Entry
5042 @cindex Two part menu entry
5043 @cindex Double-colon menu entries
5044 @cindex Menu entries with two colons
5045 @cindex Less cluttered menu entry
5046 @cindex Uncluttered menu entry
5048 When the menu entry name and node name are the same, you can write
5049 the name immediately after the asterisk and space at the beginning of
5050 the line and follow the name with two colons.@refill
5052 @need 800
5053 For example, write
5055 @example
5056 * Name::                                    @var{description}
5057 @end example
5059 @need 800
5060 @noindent
5061 instead of
5063 @example
5064 * Name: Name.                               @var{description}
5065 @end example
5067 You should use the node name for the menu entry name whenever possible,
5068 since it reduces visual clutter in the menu.@refill
5070 @node Menu Example, Other Info Files, Less Cluttered Menu Entry, Menus
5071 @comment  node-name,  next,  previous,  up
5072 @section A Menu Example
5073 @cindex Menu example
5074 @cindex Example menu
5076 A menu looks like this in Texinfo:@refill
5078 @example
5079 @group
5080 @@menu
5081 * menu entry name: Node name.   A short description.
5082 * Node name::                   This form is preferred.
5083 @@end menu
5084 @end group
5085 @end example
5087 @need 800
5088 @noindent
5089 This produces:
5091 @example
5092 @group
5093 * menu:
5095 * menu entry name: Node name.   A short description.
5096 * Node name::                   This form is preferred.
5097 @end group
5098 @end example
5100 @need 700
5101 Here is an example as you might see it in a Texinfo file:@refill
5103 @example
5104 @group
5105 @@menu
5106 Larger Units of Text
5108 * Files::                       All about handling files.
5109 * Multiples: Buffers.           Multiple buffers; editing
5110                                   several files at once.
5111 @@end menu
5112 @end group
5113 @end example
5115 @need 800
5116 @noindent
5117 This produces:
5119 @example
5120 @group
5121 * menu:
5122 Larger Units of Text
5124 * Files::                       All about handling files.
5125 * Multiples: Buffers.           Multiple buffers; editing
5126                                   several files at once.
5127 @end group
5128 @end example
5130 In this example, the menu has two entries.  @samp{Files} is both a menu
5131 entry name and the name of the node referred to by that name.
5132 @samp{Multiples} is the menu entry name; it refers to the node named
5133 @samp{Buffers}. The line @samp{Larger Units of Text} is a comment; it
5134 appears in the menu, but is not an entry.@refill
5136 Since no file name is specified with either @samp{Files} or
5137 @samp{Buffers}, they must be the names of nodes in the same Info file
5138 (@pxref{Other Info Files, , Referring to Other Info Files}).@refill
5140 @node Other Info Files,  , Menu Example, Menus
5141 @comment  node-name,  next,  previous,  up
5142 @section Referring to Other Info Files
5143 @cindex Referring to other Info files
5144 @cindex Nodes in other Info files
5145 @cindex Other Info files' nodes
5146 @cindex Going to other Info files' nodes
5147 @cindex Info; other files' nodes
5149 You can create a menu entry that enables a reader in Info to go to a
5150 node in another Info file by writing the file name in parentheses just
5151 before the node name.  In this case, you should use the three-part menu
5152 entry format, which saves the reader from having to type the file
5153 name.@refill
5155 @need 800
5156 The format looks like this:@refill
5158 @example
5159 @group
5160 @@menu
5161 * @var{first-entry-name}:(@var{filename})@var{nodename}.     @var{description}
5162 * @var{second-entry-name}:(@var{filename})@var{second-node}. @var{description}
5163 @@end menu
5164 @end group
5165 @end example
5167 For example, to refer directly to the @samp{Outlining} and
5168 @samp{Rebinding} nodes in the @cite{Emacs Manual}, you would write a
5169 menu like this:@refill
5171 @example
5172 @group
5173 @@menu
5174 * Outlining: (emacs)Outline Mode. The major mode for
5175                                   editing outlines.
5176 * Rebinding: (emacs)Rebinding.    How to redefine the
5177                                   meaning of a key.
5178 @@end menu
5179 @end group
5180 @end example
5182 If you do not list the node name, but only name the file, then Info
5183 presumes that you are referring to the `Top' node.@refill
5185 The @file{dir} file that contains the main menu for Info has menu
5186 entries that list only file names.  These take you directly to the `Top'
5187 nodes of each Info document.  (@xref{Install an Info File}.)@refill
5189 @need 700
5190 For example:
5192 @example
5193 @group
5194 * Info: (info).         Documentation browsing system.
5195 * Emacs: (emacs).       The extensible, self-documenting
5196                         text editor.
5197 @end group
5198 @end example
5200 @noindent
5201 (The @file{dir} top level directory for the Info system is an Info file,
5202 not a Texinfo file, but a menu entry looks the same in both types of
5203 file.)@refill
5205 Note that the GNU Emacs Texinfo mode menu updating commands only work
5206 with nodes within the current buffer, so you cannot use them to create
5207 menus that refer to other files.  You must write such menus by hand.@refill
5209 @node Cross References, Marking Text, Menus, Top
5210 @comment  node-name,  next,  previous,  up
5211 @chapter Cross References
5212 @cindex Making cross references
5213 @cindex Cross references
5214 @cindex References
5216 @dfn{Cross references} are used to refer the reader to other parts of the
5217 same or different Texinfo files.  In Texinfo, nodes are the
5218 places to which cross references can refer.@refill
5220 @menu
5221 * References::                  What cross references are for.
5222 * Cross Reference Commands::    A summary of the different commands.
5223 * Cross Reference Parts::       A cross reference has several parts.
5224 * xref::                        Begin a reference with `See' @dots{}
5225 * Top Node Naming::             How to refer to the beginning of another file.
5226 * ref::                         A reference for the last part of a sentence.
5227 * pxref::                       How to write a parenthetical cross reference.
5228 * inforef::                     How to refer to an Info-only file.
5229 * uref::                        How to refer to a uniform resource locator.
5230 @end menu
5232 @node References, Cross Reference Commands, Cross References, Cross References
5233 @ifinfo
5234 @heading What References Are For
5235 @end ifinfo
5237 Often, but not always, a printed document should be designed so that
5238 it can be read sequentially.  People tire of flipping back and forth
5239 to find information that should be presented to them as they need
5240 it.@refill
5242 However, in any document, some information will be too detailed for
5243 the current context, or incidental to it; use cross references to
5244 provide access to such information.  Also, an on-line help system or a
5245 reference manual is not like a novel; few read such documents in
5246 sequence from beginning to end.  Instead, people look up what they
5247 need.  For this reason, such creations should contain many cross
5248 references to help readers find other information that they may not
5249 have read.@refill
5251 In a printed manual, a cross reference results in a page reference,
5252 unless it is to another manual altogether, in which case the cross
5253 reference names that manual.@refill
5255 In Info, a cross reference results in an entry that you can follow using
5256 the Info @samp{f} command.  (@inforef{Help-Adv, Some advanced Info
5257 commands, info}.)@refill
5259 The various cross reference commands use nodes to define cross
5260 reference locations.  This is evident in Info, in which a cross
5261 reference takes you to the specified node.  @TeX{} also uses nodes to
5262 define cross reference locations, but the action is less obvious.  When
5263 @TeX{} generates a DVI file, it records nodes' page numbers and
5264 uses the page numbers in making references.  Thus, if you are writing
5265 a manual that will only be printed, and will not be used on-line, you
5266 must nonetheless write @code{@@node} lines to name the places to which
5267 you make cross references.@refill
5269 @need 800
5270 @node Cross Reference Commands, Cross Reference Parts, References, Cross References
5271 @comment  node-name,  next,  previous,  up
5272 @section Different Cross Reference Commands
5273 @cindex Different cross reference commands
5275 There are four different cross reference commands:@refill
5277 @table @code
5278 @item @@xref
5279 Used to start a sentence in the printed manual saying @w{`See @dots{}'}
5280 or an Info cross-reference saying @samp{*Note @var{name}: @var{node}.}.
5282 @item @@ref
5283 Used within or, more often, at the end of a sentence; same as
5284 @code{@@xref} for Info; produces just the reference in the printed
5285 manual without a preceding `See'.@refill
5287 @item @@pxref
5288 Used within parentheses to make a reference that suits both an Info
5289 file and a printed book.  Starts with a lower case `see' within the
5290 printed manual. (@samp{p} is for `parenthesis'.)@refill
5292 @item @@inforef
5293 Used to make a reference to an Info file for which there is no printed
5294 manual.@refill
5295 @end table
5297 @noindent
5298 (The @code{@@cite} command is used to make references to books and
5299 manuals for which there is no corresponding Info file and, therefore,
5300 no node to which to point.   @xref{cite, , @code{@@cite}}.)@refill
5302 @node Cross Reference Parts, xref, Cross Reference Commands, Cross References
5303 @comment  node-name,  next,  previous,  up
5304 @section Parts of a Cross Reference
5305 @cindex Cross reference parts
5306 @cindex Parts of a cross reference
5308 A cross reference command requires only one argument, which is the
5309 name of the node to which it refers.  But a cross reference command
5310 may contain up to four additional arguments.  By using these
5311 arguments, you can provide a cross reference name for Info, a topic
5312 description or section title for the printed output, the name of a
5313 different Info file, and the name of a different printed
5314 manual.@refill
5316 Here is a simple cross reference example:@refill
5318 @example
5319 @@xref@{Node name@}.
5320 @end example
5322 @noindent
5323 which produces
5325 @example
5326 *Note Node name::.
5327 @end example
5329 @noindent
5332 @quotation
5333 See Section @var{nnn} [Node name], page @var{ppp}.
5334 @end quotation
5336 @need 700
5337 Here is an example of a full five-part cross reference:@refill
5339 @example
5340 @group
5341 @@xref@{Node name, Cross Reference Name, Particular Topic,
5342 info-file-name, A Printed Manual@}, for details.
5343 @end group
5344 @end example
5346 @noindent
5347 which produces
5349 @example
5350 *Note Cross Reference Name: (info-file-name)Node name,
5351 for details.
5352 @end example
5354 @noindent
5355 in Info and
5357 @quotation
5358 See section ``Particular Topic'' in @i{A Printed Manual}, for details.
5359 @end quotation
5361 @noindent
5362 in a printed book.
5364 The five possible arguments for a cross reference are:@refill
5366 @enumerate
5367 @item
5368 The node name (required).  This is the node to which the
5369 cross reference takes you.  In a printed document, the location of the
5370 node provides the page reference only for references within the same
5371 document.@refill
5373 @item
5374 The cross reference name for the Info reference, if it is to be different
5375 from the node name.  If you include this argument, it becomes
5376 the first part of the cross reference.  It is usually omitted.@refill
5378 @item
5379 A topic description or section name.  Often, this is the title of the
5380 section.  This is used as the name of the reference in the printed
5381 manual.  If omitted, the node name is used.@refill
5383 @item
5384 The name of the Info file in which the reference is located, if it is
5385 different from the current file.  You need not include any @samp{.info}
5386 suffix on the file name, since Info readers try appending it
5387 automatically.
5389 @item
5390 The name of a printed manual from a different Texinfo file.@refill
5391 @end enumerate
5393 The template for a full five argument cross reference looks like
5394 this:@refill
5396 @example
5397 @group
5398 @@xref@{@var{node-name}, @var{cross-reference-name}, @var{title-or-topic},
5399 @var{info-file-name}, @var{printed-manual-title}@}.
5400 @end group
5401 @end example
5403 Cross references with one, two, three, four, and five arguments are
5404 described separately following the description of @code{@@xref}.@refill
5406 Write a node name in a cross reference in exactly the same way as in
5407 the @code{@@node} line, including the same capitalization; otherwise, the
5408 formatters may not find the reference.@refill
5410 You can write cross reference commands within a paragraph, but note
5411 how Info and @TeX{} format the output of each of the various commands:
5412 write @code{@@xref} at the beginning of a sentence; write
5413 @code{@@pxref} only within parentheses, and so on.@refill
5415 @node xref, Top Node Naming, Cross Reference Parts, Cross References
5416 @comment  node-name,  next,  previous,  up
5417 @section @code{@@xref}
5418 @findex xref
5419 @cindex Cross references using @code{@@xref}
5420 @cindex References using @code{@@xref}
5422 The @code{@@xref} command generates a cross reference for the
5423 beginning of a sentence.  The Info formatting commands convert it into
5424 an Info cross reference, which the Info @samp{f} command can use to
5425 bring you directly to another node.  The @TeX{} typesetting commands
5426 convert it into a page reference, or a reference to another book or
5427 manual.@refill
5429 @menu
5430 * Reference Syntax::            What a reference looks like and requires.
5431 * One Argument::                @code{@@xref} with one argument.
5432 * Two Arguments::               @code{@@xref} with two arguments.
5433 * Three Arguments::             @code{@@xref} with three arguments.
5434 * Four and Five Arguments::     @code{@@xref} with four and five arguments.
5435 @end menu
5437 @node Reference Syntax, One Argument, xref, xref
5438 @ifinfo
5439 @subheading What a Reference Looks Like and Requires
5440 @end ifinfo
5442 Most often, an Info cross reference looks like this:@refill
5444 @example
5445 *Note @var{node-name}::.
5446 @end example
5448 @noindent
5449 or like this
5451 @example
5452 *Note @var{cross-reference-name}: @var{node-name}.
5453 @end example
5455 @noindent
5456 In @TeX{}, a cross reference looks like this:
5458 @example
5459 See Section @var{section-number} [@var{node-name}], page @var{page}.
5460 @end example
5462 @noindent
5463 or like this
5465 @example
5466 See Section @var{section-number} [@var{title-or-topic}], page @var{page}.
5467 @end example
5469 The @code{@@xref} command does not generate a period or comma to end
5470 the cross reference in either the Info file or the printed output.
5471 You must write that period or comma yourself; otherwise, Info will not
5472 recognize the end of the reference.  (The @code{@@pxref} command works
5473 differently.  @xref{pxref, , @code{@@pxref}}.)@refill
5475 @quotation
5476 @strong{Please note:} A period or comma @strong{must} follow the closing
5477 brace of an @code{@@xref}.  It is required to terminate the cross
5478 reference.  This period or comma will appear in the output, both in
5479 the Info file and in the printed manual.@refill
5480 @end quotation
5482 @code{@@xref} must refer to an Info node by name.  Use @code{@@node}
5483 to define the node (@pxref{Writing a Node}).@refill
5485 @code{@@xref} is followed by several arguments inside braces, separated by
5486 commas.  Whitespace before and after these commas is ignored.@refill
5488 A cross reference requires only the name of a node; but it may contain
5489 up to four additional arguments.  Each of these variations produces a
5490 cross reference that looks somewhat different.@refill
5492 @quotation
5493 @strong{Please note:} Commas separate arguments in a cross reference;
5494 avoid including them in the title or other part lest the formatters
5495 mistake them for separators.@refill
5496 @end quotation
5498 @node One Argument, Two Arguments, Reference Syntax, xref
5499 @subsection @code{@@xref} with One Argument
5501 The simplest form of @code{@@xref} takes one argument, the name of
5502 another node in the same Info file.    The Info formatters produce
5503 output that the Info readers can use to jump to the reference; @TeX{}
5504 produces output that specifies the page and section number for you.@refill
5506 @need 700
5507 @noindent
5508 For example,
5510 @example
5511 @@xref@{Tropical Storms@}.
5512 @end example
5514 @noindent
5515 produces
5517 @example
5518 *Note Tropical Storms::.
5519 @end example
5521 @noindent
5524 @quotation
5525 See Section 3.1 [Tropical Storms], page 24.
5526 @end quotation
5528 @noindent
5529 (Note that in the preceding example the closing brace is followed by a
5530 period.)@refill
5532 You can write a clause after the cross reference, like this:@refill
5534 @example
5535 @@xref@{Tropical Storms@}, for more info.
5536 @end example
5538 @noindent
5539 which produces
5541 @example
5542 *Note Tropical Storms::, for more info.
5543 @end example
5545 @quotation
5546 See Section 3.1 [Tropical Storms], page 24, for more info.
5547 @end quotation
5549 @noindent
5550 (Note that in the preceding example the closing brace is followed by a
5551 comma, and then by the clause, which is followed by a period.)@refill
5553 @node Two Arguments, Three Arguments, One Argument, xref
5554 @subsection @code{@@xref} with Two Arguments
5556 With two arguments, the second is used as the name of the Info cross
5557 reference, while the first is still the name of the node to which the
5558 cross reference points.@refill
5560 @need 750
5561 @noindent
5562 The template is like this:
5564 @example
5565 @@xref@{@var{node-name}, @var{cross-reference-name}@}.
5566 @end example
5568 @need 700
5569 @noindent
5570 For example,
5572 @example
5573 @@xref@{Electrical Effects, Lightning@}.
5574 @end example
5576 @noindent
5577 produces:
5579 @example
5580 *Note Lightning: Electrical Effects.
5581 @end example
5583 @noindent
5586 @quotation
5587 See Section 5.2 [Electrical Effects], page 57.
5588 @end quotation
5590 @noindent
5591 (Note that in the preceding example the closing brace is followed by a
5592 period; and that the node name is printed, not the cross reference name.)@refill
5594 You can write a clause after the cross reference, like this:@refill
5596 @example
5597 @@xref@{Electrical Effects, Lightning@}, for more info.
5598 @end example
5600 @noindent
5601 which produces
5602 @example
5603 *Note Lightning: Electrical Effects, for more info.
5604 @end example
5606 @noindent
5609 @quotation
5610 See Section 5.2 [Electrical Effects], page 57, for more info.
5611 @end quotation
5613 @noindent
5614 (Note that in the preceding example the closing brace is followed by a
5615 comma, and then by the clause, which is followed by a period.)@refill
5617 @node Three Arguments, Four and Five Arguments, Two Arguments, xref
5618 @subsection @code{@@xref} with Three Arguments
5620 A third argument replaces the node name in the @TeX{} output.  The third
5621 argument should be the name of the section in the printed output, or
5622 else state the topic discussed by that section.  Often, you will want to
5623 use initial upper case letters so it will be easier to read when the
5624 reference is printed.  Use a third argument when the node name is
5625 unsuitable because of syntax or meaning.@refill
5627 Remember to avoid placing a comma within the title or topic section of
5628 a cross reference, or within any other section.  The formatters divide
5629 cross references into arguments according to the commas; a comma
5630 within a title or other section will divide it into two arguments.  In
5631 a reference, you need to write a title such as ``Clouds, Mist, and
5632 Fog'' without the commas.@refill
5634 Also, remember to write a comma or period after the closing brace of a
5635 @code{@@xref} to terminate the cross reference.  In the following
5636 examples, a clause follows a terminating comma.@refill
5639 @need 750
5640 @noindent
5641 The template is like this:
5643 @example
5644 @group
5645 @@xref@{@var{node-name}, @var{cross-reference-name}, @var{title-or-topic}@}.
5646 @end group
5647 @end example
5649 @need 700
5650 @noindent
5651 For example,
5653 @example
5654 @group
5655 @@xref@{Electrical Effects, Lightning, Thunder and Lightning@},
5656 for details.
5657 @end group
5658 @end example
5660 @noindent
5661 produces
5663 @example
5664 *Note Lightning: Electrical Effects, for details.
5665 @end example
5667 @noindent
5670 @quotation
5671 See Section 5.2 [Thunder and Lightning], page 57, for details.
5672 @end quotation
5674 If a third argument is given and the second one is empty, then the
5675 third argument serves both.  (Note how two commas, side by side, mark
5676 the empty second argument.)@refill
5678 @example
5679 @group
5680 @@xref@{Electrical Effects, , Thunder and Lightning@},
5681 for details.
5682 @end group
5683 @end example
5685 @noindent
5686 produces
5688 @example
5689 *Note Thunder and Lightning: Electrical Effects, for details.
5690 @end example
5692 @noindent
5695 @quotation
5696 See Section 5.2 [Thunder and Lightning], page 57, for details.
5697 @end quotation
5699 As a practical matter, it is often best to write cross references with
5700 just the first argument if the node name and the section title are the
5701 same, and with the first and third arguments if the node name and title
5702 are different.@refill
5704 Here are several examples from @cite{The GNU Awk User's Guide}:@refill
5706 @smallexample
5707 @@xref@{Sample Program@}.
5708 @@xref@{Glossary@}.
5709 @@xref@{Case-sensitivity, ,Case-sensitivity in Matching@}.
5710 @@xref@{Close Output, , Closing Output Files and Pipes@},
5711    for more information.
5712 @@xref@{Regexp, , Regular Expressions as Patterns@}.
5713 @end smallexample
5715 @node Four and Five Arguments,  , Three Arguments, xref
5716 @subsection @code{@@xref} with Four and Five Arguments
5718 In a cross reference, a fourth argument specifies the name of another
5719 Info file, different from the file in which the reference appears, and
5720 a fifth argument specifies its title as a printed manual.@refill
5722 Remember that a comma or period must follow the closing brace of an
5723 @code{@@xref} command to terminate the cross reference.  In the
5724 following examples, a clause follows a terminating comma.@refill
5726 @need 800
5727 @noindent
5728 The template is:
5730 @example
5731 @group
5732 @@xref@{@var{node-name}, @var{cross-reference-name}, @var{title-or-topic},
5733 @var{info-file-name}, @var{printed-manual-title}@}.
5734 @end group
5735 @end example
5737 @need 700
5738 @noindent
5739 For example,
5741 @example
5742 @@xref@{Electrical Effects, Lightning, Thunder and Lightning,
5743 weather, An Introduction to Meteorology@}, for details.
5744 @end example
5746 @noindent
5747 produces
5749 @example
5750 *Note Lightning: (weather)Electrical Effects, for details.
5751 @end example
5753 @noindent
5754 The name of the Info file is enclosed in parentheses and precedes
5755 the name of the node.
5757 @noindent
5758 In a printed manual, the reference looks like this:@refill
5760 @quotation
5761 See section ``Thunder and Lightning'' in @i{An Introduction to
5762 Meteorology}, for details.
5763 @end quotation
5765 @noindent
5766 The title of the printed manual is typeset in italics; and the
5767 reference lacks a page number since @TeX{} cannot know to which page a
5768 reference refers when that reference is to another manual.@refill
5770 Often, you will leave out the second argument when you use the long
5771 version of @code{@@xref}.  In this case, the third argument, the topic
5772 description, will be used as the cross reference name in Info.@refill
5774 @noindent
5775 The template looks like this:
5777 @example
5778 @@xref@{@var{node-name}, , @var{title-or-topic}, @var{info-file-name},
5779 @var{printed-manual-title}@}, for details.
5780 @end example
5782 @noindent
5783 which produces
5785 @example
5786 *Note @var{title-or-topic}: (@var{info-file-name})@var{node-name}, for details.
5787 @end example
5789 @noindent
5792 @quotation
5793 See section @var{title-or-topic} in @var{printed-manual-title}, for details.
5794 @end quotation
5796 @need 700
5797 @noindent
5798 For example,
5800 @example
5801 @@xref@{Electrical Effects, , Thunder and Lightning,
5802 weather, An Introduction to Meteorology@}, for details.
5803 @end example
5805 @noindent
5806 produces
5808 @example
5809 @group
5810 *Note Thunder and Lightning: (weather)Electrical Effects,
5811 for details.
5812 @end group
5813 @end example
5815 @noindent
5818 @quotation
5819 See section ``Thunder and Lightning'' in @i{An Introduction to
5820 Meteorology}, for details.
5821 @end quotation
5823 On rare occasions, you may want to refer to another Info file that
5824 is within a single printed manual---when multiple Texinfo files are
5825 incorporated into the same @TeX{} run but make separate Info files.
5826 In this case, you need to specify only the fourth argument, and not
5827 the fifth.@refill
5829 @node Top Node Naming, ref, xref, Cross References
5830 @section Naming a `Top' Node
5831 @cindex Naming a `Top' Node in references
5832 @cindex @samp{@r{Top}} node naming for references
5834 In a cross reference, you must always name a node.  This means that in
5835 order to refer to a whole manual, you must identify the `Top' node by
5836 writing it as the first argument to the @code{@@xref} command.  (This
5837 is different from the way you write a menu entry; see @ref{Other Info
5838 Files, , Referring to Other Info Files}.)  At the same time, to
5839 provide a meaningful section topic or title in the printed cross
5840 reference (instead of the word `Top'), you must write an appropriate
5841 entry for the third argument to the @code{@@xref} command.
5842 @refill
5844 @noindent
5845 Thus, to make a cross reference to @cite{The GNU Make Manual},
5846 write:@refill
5848 @example
5849 @@xref@{Top, , Overview, make, The GNU Make Manual@}.
5850 @end example
5852 @noindent
5853 which produces
5855 @example
5856 *Note Overview: (make)Top.
5857 @end example
5859 @noindent
5862 @quotation
5863 See section ``Overview'' in @i{The GNU Make Manual}.
5864 @end quotation
5866 @noindent
5867 In this example, @samp{Top} is the name of the first node, and
5868 @samp{Overview} is the name of the first section of the manual.@refill
5869 @node ref, pxref, Top Node Naming, Cross References
5870 @comment  node-name,  next,  previous,  up
5871 @section @code{@@ref}
5872 @cindex Cross references using @code{@@ref}
5873 @cindex References using @code{@@ref}
5874 @findex ref
5876 @code{@@ref} is nearly the same as @code{@@xref} except that it does
5877 not generate a `See' in the printed output, just the reference itself.
5878 This makes it useful as the last part of a sentence.@refill
5880 @need 700
5881 @noindent
5882 For example,
5884 @example
5885 For more information, see @@ref@{Hurricanes@}.
5886 @end example
5888 @noindent
5889 produces
5891 @example
5892 For more information, see *Note Hurricanes.
5893 @end example
5895 @noindent
5898 @quotation
5899 For more information, see Section 8.2 [Hurricanes], page 123.
5900 @end quotation
5902 The @code{@@ref} command sometimes leads writers to express themselves
5903 in a manner that is suitable for a printed manual but looks awkward
5904 in the Info format.  Bear in mind that your audience will be using
5905 both the printed and the Info format.@refill
5907 @need 800
5908 @noindent
5909 For example,
5911 @example
5912 @group
5913 Sea surges are described in @@ref@{Hurricanes@}.
5914 @end group
5915 @end example
5917 @need 800
5918 @noindent
5919 produces
5921 @quotation
5922 Sea surges are described in Section 6.7 [Hurricanes], page 72.
5923 @end quotation
5925 @need 800
5926 @noindent
5927 in a printed document, and the following in Info:
5929 @example
5930 Sea surges are described in *Note Hurricanes::.
5931 @end example
5933 @quotation
5934 @strong{Caution:} You @emph{must} write a period or comma immediately
5935 after an @code{@@ref} command with two or more arguments.  Otherwise,
5936 Info will not find the end of the cross reference entry and its
5937 attempt to follow the cross reference will fail.  As a general rule,
5938 you should write a period or comma after every @code{@@ref} command.
5939 This looks best in both the printed and the Info output.@refill
5940 @end quotation
5942 @node pxref, inforef, ref, Cross References
5943 @comment  node-name,  next,  previous,  up
5944 @section @code{@@pxref}
5945 @cindex Cross references using @code{@@pxref}
5946 @cindex References using @code{@@pxref}
5947 @findex pxref
5949 The parenthetical reference command, @code{@@pxref}, is nearly the
5950 same as @code{@@xref}, but you use it @emph{only} inside parentheses
5951 and you do @emph{not} type a comma or period after the command's
5952 closing brace.  The command differs from @code{@@xref} in two
5953 ways:@refill
5955 @enumerate
5956 @item
5957 @TeX{} typesets the reference for the printed manual with a lower case
5958 `see' rather than an upper case `See'.@refill
5960 @item
5961 The Info formatting commands automatically end the reference with a
5962 closing colon or period.@refill
5963 @end enumerate
5965 Because one type of formatting automatically inserts closing
5966 punctuation and the other does not, you should use @code{@@pxref}
5967 @emph{only} inside parentheses as part of another sentence.  Also, you
5968 yourself should not insert punctuation after the reference, as you do
5969 with @code{@@xref}.@refill
5971 @code{@@pxref} is designed so that the output looks right and works
5972 right between parentheses both in printed output and in an Info file.
5973 In a printed manual, a closing comma or period should not follow a
5974 cross reference within parentheses; such punctuation is wrong.  But in
5975 an Info file, suitable closing punctuation must follow the cross
5976 reference so Info can recognize its end.  @code{@@pxref} spares you
5977 the need to use complicated methods to put a terminator into one form
5978 of the output and not the other.@refill
5980 @noindent
5981 With one argument, a parenthetical cross reference looks like
5982 this:@refill
5984 @example
5985 @dots{} storms cause flooding (@@pxref@{Hurricanes@}) @dots{}
5986 @end example
5988 @need 800
5989 @noindent
5990 which produces
5992 @example
5993 @group
5994 @dots{} storms cause flooding (*Note Hurricanes::) @dots{}
5995 @end group
5996 @end example
5998 @noindent
6001 @quotation
6002 @dots{} storms cause flooding (see Section 6.7 [Hurricanes], page 72) @dots{}
6003 @end quotation
6005 With two arguments, a parenthetical cross reference has this
6006 template:@refill
6008 @example
6009 @dots{} (@@pxref@{@var{node-name}, @var{cross-reference-name}@}) @dots{}
6010 @end example
6012 @noindent
6013 which produces
6015 @example
6016 @dots{} (*Note @var{cross-reference-name}: @var{node-name}.) @dots{}
6017 @end example
6019 @noindent
6022 @need 1500
6023 @quotation
6024 @dots{} (see Section @var{nnn} [@var{node-name}], page @var{ppp}) @dots{}
6025 @end quotation
6027 @code{@@pxref} can be used with up to five arguments just like
6028 @code{@@xref} (@pxref{xref, , @code{@@xref}}).@refill
6030 @quotation
6031 @strong{Please note:} Use @code{@@pxref} only as a parenthetical
6032 reference.  Do not try to use @code{@@pxref} as a clause in a sentence.
6033 It will look bad in either the Info file, the printed output, or
6034 both.@refill
6036 Also, parenthetical cross references look best at the ends of sentences.
6037 Although you may write them in the middle of a sentence, that location
6038 breaks up the flow of text.@refill
6039 @end quotation
6041 @node inforef, uref, pxref, Cross References
6042 @section @code{@@inforef}
6043 @cindex Cross references using @code{@@inforef}
6044 @cindex References using @code{@@inforef}
6045 @findex inforef
6047 @code{@@inforef} is used for cross references to Info files for which
6048 there are no printed manuals.  Even in a printed manual,
6049 @code{@@inforef} generates a reference directing the user to look in
6050 an Info file.@refill
6052 The command takes either two or three arguments, in the following
6053 order:@refill
6055 @enumerate
6056 @item
6057 The node name.
6059 @item
6060 The cross reference name (optional).
6062 @item
6063 The Info file name.
6064 @end enumerate
6066 @noindent
6067 Separate the arguments with commas, as with @code{@@xref}.  Also, you
6068 must terminate the reference with a comma or period after the
6069 @samp{@}}, as you do with @code{@@xref}.@refill
6071 @noindent
6072 The template is:
6074 @example
6075 @@inforef@{@var{node-name}, @var{cross-reference-name}, @var{info-file-name}@},
6076 @end example
6078 @need 800
6079 @noindent
6080 Thus,
6082 @example
6083 @group
6084 @@inforef@{Expert, Advanced Info commands, info@},
6085 for more information.
6086 @end group
6087 @end example
6089 @need 800
6090 @noindent
6091 produces
6093 @example
6094 @group
6095 *Note Advanced Info commands: (info)Expert,
6096 for more information.
6097 @end group
6098 @end example
6100 @need 800
6101 @noindent
6104 @quotation
6105 See Info file @file{info}, node @samp{Expert}, for more information.
6106 @end quotation
6108 @need 800
6109 @noindent
6110 Similarly,
6112 @example
6113 @group
6114 @@inforef@{Expert, , info@}, for more information.
6115 @end group
6116 @end example
6118 @need 800
6119 @noindent
6120 produces
6122 @example
6123 *Note (info)Expert::, for more information.
6124 @end example
6126 @need 800
6127 @noindent
6130 @quotation
6131 See Info file @file{info}, node @samp{Expert}, for more information.
6132 @end quotation
6134 The converse of @code{@@inforef} is @code{@@cite}, which is used to
6135 refer to printed works for which no Info form exists.  @xref{cite, ,
6136 @code{@@cite}}.@refill
6139 @node uref,  , inforef, Cross References
6140 @section @code{@@uref@{@var{url}[, @var{displayed-text}]@}}
6141 @findex uref
6142 @cindex Uniform resource locator, referring to
6143 @cindex URL, referring to
6145 @code{@@uref} produces a reference to a uniform resource locator (URL).
6146 It takes one mandatory argument, the URL, and one optional argument, the
6147 text to display (the default is the URL itself).  In HTML output,
6148 @code{@@uref} produces a link you can follow.  For example:
6150 @example
6151 The official GNU ftp site is
6152 @@uref@{ftp://ftp.gnu.ai.mit.edu/pub/gnu@}
6153 @end example
6155 @noindent produces (in text):
6156 @display
6157 The official GNU ftp site is
6158 @uref{ftp://ftp.gnu.ai.mit.edu/pub/gnu}
6159 @end display
6161 @noindent whereas
6162 @example
6163 The official
6164 @@uref@{ftp://ftp.gnu.ai.mit.edu/pub/gnu,
6165   GNU ftp site@} holds programs and texts.
6166 @end example
6168 @noindent produces (in text):
6169 @display
6170 The official @uref{ftp://ftp.gnu.ai.mit.edu/pub/gnu, GNU ftp site} holds
6171 programs and texts.
6172 @end display
6174 @noindent and (in HTML):
6175 @example
6176 The official <A HREF="ftp://ftp.gnu.ai.mit.edu/pub/gnu">GNU ftp
6177 site</A> holds programs and texts.
6178 @end example
6180 To merely indicate a URL, use @code{@@url} (@pxref{url, @code{@@url}}).
6183 @node Marking Text, Quotations and Examples, Cross References, Top
6184 @comment  node-name,  next,  previous,  up
6185 @chapter Marking Words and Phrases
6186 @cindex Paragraph, marking text within
6187 @cindex Marking words and phrases
6188 @cindex Words and phrases, marking them
6189 @cindex Marking text within a paragraph
6191 In Texinfo, you can mark words and phrases in a variety of ways.
6192 The Texinfo formatters use this information to determine how to
6193 highlight the text.
6194 You can specify, for example, whether a word or phrase is a
6195 defining occurrence, a metasyntactic variable, or a symbol used in a
6196 program.  Also, you can emphasize text.@refill
6198 @menu
6199 * Indicating::                  How to indicate definitions, files, etc.
6200 * Emphasis::                    How to emphasize text.
6201 @end menu
6203 @node Indicating, Emphasis, Marking Text, Marking Text
6204 @comment  node-name,  next,  previous,  up
6205 @section Indicating Definitions, Commands, etc.
6206 @cindex Highlighting text
6207 @cindex Indicating commands, definitions, etc.
6209 Texinfo has commands for indicating just what kind of object a piece of
6210 text refers to.  For example, metasyntactic variables are marked by
6211 @code{@@var}, and code by @code{@@code}.  Since the pieces of text are
6212 labelled by commands that tell what kind of object they are, it is easy
6213 to change the way the Texinfo formatters prepare such text.  (Texinfo is
6214 an @emph{intentional} formatting language rather than a @emph{typesetting}
6215 formatting language.)@refill
6217 For example, in a printed manual,
6218 code is usually illustrated in a typewriter font;
6219 @code{@@code} tells @TeX{} to typeset this text in this font.  But it
6220 would be easy to change the way @TeX{} highlights code to use another
6221 font, and this change would not effect how keystroke examples are
6222 highlighted.  If straight typesetting commands were used in the body
6223 of the file and you wanted to make a change, you would need to check
6224 every single occurrence to make sure that you were changing code and
6225 not something else that should not be changed.@refill
6227 @menu
6228 * Useful Highlighting::         Highlighting provides useful information.
6229 * code::                        How to indicate code.
6230 * kbd::                         How to show keyboard input.
6231 * key::                         How to specify keys.
6232 * samp::                        How to show a literal sequence of characters.
6233 * var::                         How to indicate a metasyntactic variable.
6234 * file::                        How to indicate the name of a file.
6235 * dfn::                         How to specify a definition.
6236 * cite::                        How to refer to a book that is not in Info.
6237 * url::                         How to indicate a world wide web reference.
6238 * email::                       How to indicate an electronic mail address.
6239 @end menu
6241 @node Useful Highlighting, code, Indicating, Indicating
6242 @ifinfo
6243 @subheading Highlighting Commands are Useful
6244 @end ifinfo
6246 The highlighting commands can be used to generate useful information
6247 from the file, such as lists of functions or file names.  It is
6248 possible, for example, to write a program in Emacs Lisp (or a keyboard
6249 macro) to insert an index entry after every paragraph that contains
6250 words or phrases marked by a specified command.  You could do this to
6251 construct an index of functions if you had not already made the
6252 entries.@refill
6254 The commands serve a variety of purposes:@refill
6256 @table @code
6257 @item @@code@{@var{sample-code}@}
6258 Indicate text that is a literal example of a piece of a program.@refill
6260 @item @@kbd@{@var{keyboard-characters}@}
6261 Indicate keyboard input.@refill
6263 @item @@key@{@var{key-name}@}
6264 Indicate the conventional name for a key on a keyboard.@refill
6266 @item @@samp@{@var{text}@}
6267 Indicate text that is a literal example of a sequence of characters.@refill
6269 @item @@var@{@var{metasyntactic-variable}@}
6270 Indicate a metasyntactic variable.@refill
6272 @item @@url@{@var{uniform-resource-locator}@}
6273 Indicate a uniform resource locator for the World Wide Web.
6275 @item @@file@{@var{file-name}@}
6276 Indicate the name of a file.@refill
6278 @item @@email@{@var{email-address}[, @var{displayed-text}]@}
6279 Indicate an electronic mail address.
6281 @item @@dfn@{@var{term}@}
6282 Indicate the introductory or defining use of a term.@refill
6284 @item @@cite@{@var{reference}@}
6285 Indicate the name of a book.@refill
6287 @ignore
6288 @item @@ctrl@{@var{ctrl-char}@}
6289 Use for an @sc{ascii} control character.@refill
6290 @end ignore
6291 @end table
6293 @node code, kbd, Useful Highlighting, Indicating
6294 @comment  node-name,  next,  previous,  up
6295 @subsection @code{@@code}@{@var{sample-code}@}
6296 @findex code
6298 Use the @code{@@code} command to indicate text that is a piece of a
6299 program and which consists of entire syntactic tokens.  Enclose the
6300 text in braces.@refill
6302 Thus, you should use @code{@@code} for an expression in a program, for
6303 the name of a variable or function used in a program, or for a
6304 keyword.  Also, you should use @code{@@code} for the name of a
6305 program, such as @code{diff}, that is a name used in the machine. (You
6306 should write the name of a program in the ordinary text font if you
6307 regard it as a new English word, such as `Emacs' or `Bison'.)@refill
6309 Use @code{@@code} for environment variables such as @code{TEXINPUTS},
6310 and other variables.@refill
6312 Use @code{@@code} for command names in command languages that
6313 resemble programming languages, such as Texinfo or the shell.
6314 For example, @code{@@code} and @code{@@samp} are produced by writing
6315 @samp{@@code@{@@@@code@}} and @samp{@@code@{@@@@samp@}} in the Texinfo
6316 source, respectively.@refill
6318 Note, however, that you should not use @code{@@code} for shell options
6319 such as @samp{-c} when such options stand alone. (Use @code{@@samp}.)
6320 Also, an entire shell command often looks better if written using
6321 @code{@@samp} rather than @code{@@code}.  In this case, the rule is to
6322 choose the more pleasing format.@refill
6324 It is incorrect to alter the case of a word inside an @code{@@code}
6325 command when it appears at the beginning of a sentence.  Most computer
6326 languages are case sensitive.  In C, for example, @code{Printf} is
6327 different from the identifier @code{printf}, and most likely is a
6328 misspelling of it.  Even in languages which are not case sensitive, it
6329 is confusing to a human reader to see identifiers spelled in different
6330 ways.  Pick one spelling and always use that.  If you do not want to
6331 start a sentence with a command written all in lower case, you should
6332 rearrange the sentence.@refill
6334 Do not use the @code{@@code} command for a string of characters shorter
6335 than a syntactic token.  If you are writing about @samp{TEXINPU}, which
6336 is just a part of the name for the @code{TEXINPUTS} environment
6337 variable, you should use @code{@@samp}.@refill
6339 In particular, you should not use the @code{@@code} command when writing
6340 about the characters used in a token; do not, for example, use
6341 @code{@@code} when you are explaining what letters or printable symbols
6342 can be used in the names of functions.  (Use @code{@@samp}.)  Also, you
6343 should not use @code{@@code} to mark text that is considered input to
6344 programs unless the input is written in a language that is like a
6345 programming language.  For example, you should not use @code{@@code} for
6346 the keystroke commands of GNU Emacs (use @code{@@kbd} instead) although
6347 you may use @code{@@code} for the names of the Emacs Lisp functions that
6348 the keystroke commands invoke.@refill
6350 In the printed manual, @code{@@code} causes @TeX{} to typeset the
6351 argument in a typewriter face.  In the Info file, it causes the Info
6352 formatting commands to use single quotation marks around the text.
6354 @need 700
6355 For example,
6357 @example
6358 Use @@code@{diff@} to compare two files.
6359 @end example
6361 @noindent
6362 produces this in the printed manual:@refill
6364 @quotation
6365 Use @code{diff} to compare two files.
6366 @end quotation
6367 @iftex
6369 @noindent
6370 and this in the Info file:@refill
6372 @example
6373 Use `diff' to compare two files.
6374 @end example
6375 @end iftex
6378 @node kbd, key, code, Indicating
6379 @subsection @code{@@kbd}@{@var{keyboard-characters}@}
6380 @findex kbd
6381 @cindex keyboard input
6383 Use the @code{@@kbd} command for characters of input to be typed by
6384 users.  For example, to refer to the characters @kbd{M-a},
6385 write@refill
6387 @example
6388 @@kbd@{M-a@}
6389 @end example
6391 @noindent
6392 and to refer to the characters @kbd{M-x shell}, write@refill
6394 @example
6395 @@kbd@{M-x shell@}
6396 @end example
6398 @cindex user input
6399 @cindex slanted typewriter font, for @code{@@kbd}
6400 The @code{@@kbd} command has the same effect as @code{@@code} in Info,
6401 but by default produces a different font (slanted typewriter instead of
6402 normal typewriter) in the printed manual, so users can distinguish the
6403 characters they are supposed to type from those the computer outputs.
6405 @findex kbdinputstyle
6406 Since the usage of @code{@@kbd} varies from manual to manual, you can
6407 control the font switching with the @code{@@kbdinputstyle} command.
6408 This command has no effect on Info output.  Write this command at the
6409 beginning of a line with a single word as an argument, one of the
6410 following:
6411 @vindex distinct@r{, arg to @@kbdinputstyle}
6412 @vindex example@r{, arg to @@kbdinputstyle}
6413 @vindex code@r{, arg to @@kbdinputstyle}
6414 @table @samp
6415 @item code
6416 Always use the same font for @code{@@kbd} as @code{@@code}.
6417 @item example
6418 Use the distinguishing font for @code{@@kbd} only in @code{@@example}
6419 and similar environments.
6420 @item example
6421 (the default) Always use the distinguishing font for @code{@@kbd}.
6422 @end table
6424 You can embed another @@-command inside the braces of an @code{@@kbd}
6425 command.  Here, for example, is the way to describe a command that
6426 would be described more verbosely as ``press an @samp{r} and then
6427 press the @key{RET} key'':@refill
6429 @example
6430 @@kbd@{r @@key@{RET@}@}
6431 @end example
6433 @noindent
6434 This produces: @kbd{r @key{RET}}
6436 You also use the @code{@@kbd} command if you are spelling out the letters
6437 you type; for example:@refill
6439 @example
6440 To give the @@code@{logout@} command,
6441 type the characters @@kbd@{l o g o u t @@key@{RET@}@}.
6442 @end example
6444 @noindent
6445 This produces:
6447 @quotation
6448 To give the @code{logout} command,
6449 type the characters @kbd{l o g o u t @key{RET}}.
6450 @end quotation
6452 (Also, this example shows that you can add spaces for clarity.  If you
6453 really want to mention a space character as one of the characters of
6454 input, write @kbd{@@key@{SPC@}} for it.)@refill
6457 @node key, samp, kbd, Indicating
6458 @comment  node-name,  next,  previous,  up
6459 @subsection @code{@@key}@{@var{key-name}@}
6460 @findex key
6462 Use the @code{@@key} command for the conventional name for a key on a
6463 keyboard, as in:@refill
6465 @example
6466 @@key@{RET@}
6467 @end example
6469 You can use the @code{@@key} command within the argument of an
6470 @code{@@kbd} command when the sequence of characters to be typed
6471 includes one or more keys that are described by name.@refill
6473 @need 700
6474 For example, to produce @kbd{C-x @key{ESC}} you would type:@refill
6476 @example
6477 @@kbd@{C-x @@key@{ESC@}@}
6478 @end example
6480 Here is a list of the recommended names for keys:
6481 @cindex Recommended names for keys
6482 @cindex Keys, recommended names
6483 @cindex Names recommended for keys
6484 @cindex Abbreviations for keys
6486 @quotation
6487 @table @t
6488 @item SPC
6489 Space
6490 @item RET
6491 Return
6492 @item LFD
6493 Linefeed (however, since most keyboards nowadays do not have a Linefeed key,
6494 it might be better to call this character @kbd{C-j}.
6495 @item TAB
6497 @item BS
6498 Backspace
6499 @item ESC
6500 Escape
6501 @item DEL
6502 Delete
6503 @item SHIFT
6504 Shift
6505 @item CTRL
6506 Control
6507 @item META
6508 Meta
6509 @end table
6510 @end quotation
6512 @cindex META key
6513 There are subtleties to handling words like `meta' or `ctrl' that are
6514 names of modifier keys.  When mentioning a character in which the
6515 modifier key is used, such as @kbd{Meta-a}, use the @code{@@kbd} command
6516 alone; do not use the @code{@@key} command; but when you are referring
6517 to the modifier key in isolation, use the @code{@@key} command.  For
6518 example, write @samp{@@kbd@{Meta-a@}} to produce @kbd{Meta-a} and
6519 @samp{@@key@{META@}} to produce @key{META}.
6521 @c I don't think this is a good explanation.
6522 @c I think it will puzzle readers more than it clarifies matters.  -- rms.
6523 @c In other words, use @code{@@kbd} for what you do, and use @code{@@key}
6524 @c for what you talk about: ``Press @code{@@kbd@{M-a@}} to move point to
6525 @c the beginning of the sentence.  The @code{@@key@{META@}} key is often in
6526 @c the lower left of the keyboard.''@refill
6528 @node samp, var, key, Indicating
6529 @comment  node-name,  next,  previous,  up
6530 @subsection @code{@@samp}@{@var{text}@}
6531 @findex samp
6533 Use the @code{@@samp} command to indicate text that is a literal example
6534 or `sample' of a sequence of characters in a file, string, pattern, etc.
6535 Enclose the text in braces.  The argument appears within single
6536 quotation marks in both the Info file and the printed manual; in
6537 addition, it is printed in a fixed-width font.@refill
6539 @example
6540 To match @@samp@{foo@} at the end of the line,
6541 use the regexp @@samp@{foo$@}.
6542 @end example
6544 @noindent
6545 produces
6547 @quotation
6548 To match @samp{foo} at the end of the line, use the regexp
6549 @samp{foo$}.@refill
6550 @end quotation
6552 Any time you are referring to single characters, you should use
6553 @code{@@samp} unless @code{@@kbd} or @code{@@key} is more appropriate.
6554 Use @code{@@samp} for the names of command-line options (except in an
6555 @code{@@table}, where @code{@@code} seems to read more easily).  Also,
6556 you may use @code{@@samp} for entire statements in C and for entire
6557 shell commands---in this case, @code{@@samp} often looks better than
6558 @code{@@code}.  Basically, @code{@@samp} is a catchall for whatever is
6559 not covered by @code{@@code}, @code{@@kbd}, or @code{@@key}.@refill
6561 Only include punctuation marks within braces if they are part of the
6562 string you are specifying.  Write punctuation marks outside the braces
6563 if those punctuation marks are part of the English text that surrounds
6564 the string.  In the following sentence, for example, the commas and
6565 period are outside of the braces:@refill
6567 @example
6568 @group
6569 In English, the vowels are @@samp@{a@}, @@samp@{e@},
6570 @@samp@{i@}, @@samp@{o@}, @@samp@{u@}, and sometimes
6571 @@samp@{y@}.
6572 @end group
6573 @end example
6575 @noindent
6576 This produces:
6578 @quotation
6579 In English, the vowels are @samp{a}, @samp{e},
6580 @samp{i}, @samp{o}, @samp{u},  and sometimes
6581 @samp{y}.
6582 @end quotation
6584 @node var, file, samp, Indicating
6585 @comment  node-name,  next,  previous,  up
6586 @subsection @code{@@var}@{@var{metasyntactic-variable}@}
6587 @findex var
6589 Use the @code{@@var} command to indicate metasyntactic variables.  A
6590 @dfn{metasyntactic variable} is something that stands for another piece of
6591 text.  For example, you should use a metasyntactic variable in the
6592 documentation of a function to describe the arguments that are passed
6593 to that function.@refill
6595 Do not use @code{@@var} for the names of particular variables in
6596 programming languages.  These are specific names from a program, so
6597 @code{@@code} is correct for them.  For example, the Emacs Lisp variable
6598 @code{texinfo-tex-command} is not a metasyntactic variable; it is
6599 properly formatted using @code{@@code}.@refill
6601 The effect of @code{@@var} in the Info file is to change the case of
6602 the argument to all upper case; in the printed manual, to italicize it.
6604 @need 700
6605 For example,
6607 @example
6608 To delete file @@var@{filename@},
6609 type @@code@{rm @@var@{filename@}@}.
6610 @end example
6612 @noindent
6613 produces
6615 @quotation
6616 To delete file @var{filename}, type @code{rm @var{filename}}.
6617 @end quotation
6619 @noindent
6620 (Note that @code{@@var} may appear inside @code{@@code},
6621 @code{@@samp}, @code{@@file}, etc.)@refill
6623 Write a metasyntactic variable all in lower case without spaces, and
6624 use hyphens to make it more readable.  Thus, the Texinfo source for
6625 the illustration of how to begin a Texinfo manual looks like
6626 this:@refill
6628 @example
6629 @group
6630 \input texinfo
6631 @@@@setfilename @@var@{info-file-name@}
6632 @@@@settitle @@var@{name-of-manual@}
6633 @end group
6634 @end example
6636 @noindent
6637 This produces:
6639 @example
6640 @group
6641 \input texinfo
6642 @@setfilename @var{info-file-name}
6643 @@settitle @var{name-of-manual}
6644 @end group
6645 @end example
6647 In some documentation styles, metasyntactic variables are shown with
6648 angle brackets, for example:@refill
6650 @example
6651 @dots{}, type rm <filename>
6652 @end example
6654 @noindent
6655 However, that is not the style that Texinfo uses.  (You can, of
6656 course, modify the sources to @TeX{} and the Info formatting commands
6657 to output the @code{<@dots{}>} format if you wish.)@refill
6659 @node file, dfn, var, Indicating
6660 @comment  node-name,  next,  previous,  up
6661 @subsection @code{@@file}@{@var{file-name}@}
6662 @findex file
6664 Use the @code{@@file} command to indicate text that is the name of a
6665 file, buffer, or directory, or is the name of a node in Info.  You can
6666 also use the command for file name suffixes.  Do not use @code{@@file}
6667 for symbols in a programming language; use @code{@@code}.
6669 Currently, @code{@@file} is equivalent to @code{@@samp} in its effects.
6670 For example,@refill
6672 @example
6673 The @@file@{.el@} files are in
6674 the @@file@{/usr/local/emacs/lisp@} directory.
6675 @end example
6677 @noindent
6678 produces
6680 @quotation
6681 The @file{.el} files are in
6682 the @file{/usr/local/emacs/lisp} directory.
6683 @end quotation
6685 @node dfn, cite, file, Indicating
6686 @comment  node-name,  next,  previous,  up
6687 @subsection @code{@@dfn}@{@var{term}@}
6688 @findex dfn
6690 Use the @code{@@dfn} command to identify the introductory or defining
6691 use of a technical term.  Use the command only in passages whose
6692 purpose is to introduce a term which will be used again or which the
6693 reader ought to know.  Mere passing mention of a term for the first
6694 time does not deserve @code{@@dfn}.  The command generates italics in
6695 the printed manual, and double quotation marks in the Info file.  For
6696 example:@refill
6698 @example
6699 Getting rid of a file is called @@dfn@{deleting@} it.
6700 @end example
6702 @noindent
6703 produces
6705 @quotation
6706 Getting rid of a file is called @dfn{deleting} it.
6707 @end quotation
6709 As a general rule, a sentence containing the defining occurrence of a
6710 term should be a definition of the term.  The sentence does not need
6711 to say explicitly that it is a definition, but it should contain the
6712 information of a definition---it should make the meaning clear.
6714 @node cite, url, dfn, Indicating
6715 @comment  node-name,  next,  previous,  up
6716 @subsection @code{@@cite}@{@var{reference}@}
6717 @findex cite
6719 Use the @code{@@cite} command for the name of a book that lacks a
6720 companion Info file. The command produces italics in the printed
6721 manual, and quotation marks in the Info file.@refill
6723 (If a book is written in Texinfo, it is better to use a cross reference
6724 command since a reader can easily follow such a reference in Info.
6725 @xref{xref, , @code{@@xref}}.)@refill
6727 @ignore
6728 @c node ctrl, , cite, Indicating
6729 @comment  node-name,  next,  previous,  up
6730 @c subsection @code{@@ctrl}@{@var{ctrl-char}@}
6731 @findex ctrl
6733 The @code{@@ctrl} command is seldom used.  It describes an @sc{ascii}
6734 control character by inserting the actual character into the Info
6735 file.
6737 Usually, in Texinfo, you talk what you type as keyboard entry by
6738 describing it with @code{@@kbd}: thus, @samp{@@kbd@{C-a@}} for
6739 @kbd{C-a}.  Use @code{@@kbd} in this way when talking about a control
6740 character that is typed on the keyboard by the user.  When talking
6741 about a control character appearing in a file or a string, do not use
6742 @code{@@kbd} since the control character is not typed.  Also, do not
6743 use @samp{C-} but spell out @code{control-}, as in @samp{control-a},
6744 to make it easier for a reader to understand.@refill
6746 @code{@@ctrl} is an idea from the beginnings of Texinfo which may not
6747 really fit in to the scheme of things.  But there may be times when
6748 you want to use the command.  The pattern is
6749 @code{@@ctrl@{@var{ch}@}}, where @var{ch} is an @sc{ascii} character
6750 whose control-equivalent is wanted.  For example, to specify
6751 @samp{control-f}, you would enter@refill
6753 @example
6754 @@ctrl@{f@}
6755 @end example
6757 @noindent
6758 produces
6760 @quotation
6761 @ctrl{f}
6762 @end quotation
6764 In the Info file, this generates the specified control character, output
6765 literally into the file.  This is done so a user can copy the specified
6766 control character (along with whatever else he or she wants) into another
6767 Emacs buffer and use it.  Since the `control-h',`control-i', and
6768 `control-j' characters are formatting characters, they should not be
6769 indicated with @code{@@ctrl}.@refill
6771 In a printed manual, @code{@@ctrl} generates text to describe or
6772 identify that control character: an uparrow followed by the character
6773 @var{ch}.@refill
6774 @end ignore
6777 @node url, email, cite, Indicating
6778 @subsection @code{@@url}@{@var{uniform-resource-locator}@}
6779 @findex url
6780 @cindex Uniform resource locator, indicating
6781 @cindex URL, indicating
6783 Use the @code{@@url} to indicate a uniform resource locator on the World
6784 Wide Web.  This is analogous to @code{@@file}, @code{@@var}, etc., and
6785 is purely for markup purposes.  It does not produce a link you can
6786 follow in HTML output (the @code{@@uref} command does, @pxref{uref,,
6787 @code{@@uref}}).  It is useful for example URL's which do not actually
6788 exist.  For example:
6790 @c Two lines because one is too long for smallbook format.
6791 @example
6792 For example, the url might be
6793 @@url@{http://host.domain.org/path@}.
6794 @end example
6797 @node email,  , url, Indicating
6798 @subsection @code{@@email}@{@var{email-address}[, @var{displayed-text}]@}
6799 @findex email
6801 Use the @code{@@email} command to indicate an electronic mail address.
6802 It takes one mandatory argument, the address, and one optional argument, the
6803 text to display (the default is the address itself).
6805 @cindex mailto link
6806 In Info and @TeX{}, the address is shown in angle brackets, preceded by
6807 the text to display if any.  In HTML output, @code{@@email} produces a
6808 @samp{mailto} link that usually brings up a mail composition window.
6809 For example:
6811 @example
6812 Send bug reports to @@email@{bug-texinfo@@@@prep.ai.mit.edu@}.
6813 Send suggestions to the @@email@{bug-texinfo@@@@prep.ai.mit.edu, same place@}.
6814 @end example
6815 @noindent produces
6816 @example
6817 Send bug reports to @email{bug-texinfo@@prep.ai.mit.edu}.
6818 Send suggestions to the @email{bug-texinfo@@prep.ai.mit.edu, same place}.
6819 @end example
6822 @node Emphasis,  , Indicating, Marking Text
6823 @comment node-name,  next,  previous,  up
6824 @section Emphasizing Text
6825 @cindex Emphasizing text
6827 Usually, Texinfo changes the font to mark words in the text according to
6828 what category the words belong to; an example is the @code{@@code} command.
6829 Most often, this is the best way to mark words.
6830 However, sometimes you will want to emphasize text without indicating a
6831 category.  Texinfo has two commands to do this.  Also, Texinfo has
6832 several commands that specify the font in which @TeX{} will typeset
6833 text.  These commands have no affect on Info and only one of them,
6834 the @code{@@r} command, has any regular use.@refill
6836 @menu
6837 * emph & strong::               How to emphasize text in Texinfo.
6838 * Smallcaps::                   How to use the small caps font.
6839 * Fonts::                       Various font commands for printed output.
6840 * Customized Highlighting::     How to define highlighting commands.
6841 @end menu
6843 @node emph & strong, Smallcaps, Emphasis, Emphasis
6844 @comment  node-name,  next,  previous,  up
6845 @subsection @code{@@emph}@{@var{text}@} and @code{@@strong}@{@var{text}@}
6846 @cindex Emphasizing text, font for
6847 @findex emph
6848 @findex strong
6850 The @code{@@emph} and @code{@@strong} commands are for emphasis;
6851 @code{@@strong} is stronger.  In printed output, @code{@@emph}
6852 produces @emph{italics} and @code{@@strong} produces
6853 @strong{bold}.@refill
6855 @need 800
6856 For example,
6858 @example
6859 @group
6860 @@quotation
6861 @@strong@{Caution:@} @@samp@{rm * .[^.]*@} removes @@emph@{all@}
6862 files in the directory.
6863 @@end quotation
6864 @end group
6865 @end example
6867 @iftex
6868 @noindent
6869 produces the following in printed output:
6871 @quotation
6872 @strong{Caution}: @code{rm * .[^.]*} removes @emph{all}
6873 files in the directory.
6874 @end quotation
6876 @noindent
6877 and the following in Info:
6878 @end iftex
6879 @ifinfo
6880 @noindent
6881 produces:
6882 @end ifinfo
6884 @example
6885      *Caution*: `rm * .[^.]*' removes *all*
6886      files in the directory.
6887 @end example
6889 The @code{@@strong} command is seldom used except to mark what is, in
6890 effect, a typographical element, such as the word `Caution' in the
6891 preceding example.
6893 In the Info file, both @code{@@emph} and @code{@@strong} put asterisks
6894 around the text.@refill
6896 @quotation
6897 @strong{Caution:} Do not use @code{@@emph} or @code{@@strong} with the
6898 word @samp{Note}; Info will mistake the combination for a cross
6899 reference.  Use a phrase such as @strong{Please note} or
6900 @strong{Caution} instead.@refill
6901 @end quotation
6903 @node Smallcaps, Fonts, emph & strong, Emphasis
6904 @subsection @code{@@sc}@{@var{text}@}: The Small Caps Font
6905 @cindex Small caps font
6906 @findex sc @r{(small caps font)}
6908 @iftex
6909 Use the @samp{@@sc} command to set text in the printed output in @sc{a
6910 small caps font} and set text in the Info file in upper case letters.@refill
6911 @end iftex
6912 @ifinfo
6913 Use the @samp{@@sc} command to set text in the printed output in a
6914 small caps font and set text in the Info file in upper case letters.@refill
6915 @end ifinfo
6917 Write the text between braces in lower case, like this:@refill
6919 @example
6920 The @@sc@{acm@} and @@sc@{ieee@} are technical societies.
6921 @end example
6923 @noindent
6924 This produces:
6926 @display
6927 The @sc{acm} and @sc{ieee} are technical societies.
6928 @end display
6930 @TeX{} typesets the small caps font in a manner that prevents the
6931 letters from `jumping out at you on the page'.  This makes small caps
6932 text easier to read than text in all upper case.  The Info formatting
6933 commands set all small caps text in upper case.@refill
6935 @ifinfo
6936 If the text between the braces of an @code{@@sc} command is upper case,
6937 @TeX{} typesets in full-size capitals.  Use full-size capitals
6938 sparingly.@refill
6939 @end ifinfo
6940 @iftex
6941 If the text between the braces of an @code{@@sc} command is upper case,
6942 @TeX{} typesets in @sc{FULL-SIZE CAPITALS}.  Use full-size capitals
6943 sparingly.@refill
6944 @end iftex
6946 You may also use the small caps font for a jargon word such as
6947 @sc{ato} (a @sc{nasa} word meaning `abort to orbit').@refill
6949 There are subtleties to using the small caps font with a jargon word
6950 such as @sc{cdr}, a word used in Lisp programming.  In this case, you
6951 should use the small caps font when the word refers to the second and
6952 subsequent elements of a list (the @sc{cdr} of the list), but you
6953 should use @samp{@@code} when the word refers to the Lisp function of
6954 the same spelling.@refill
6956 @node Fonts, Customized Highlighting, Smallcaps, Emphasis
6957 @comment node-name,  next,  previous,  up
6958 @subsection Fonts for Printing, Not Info
6959 @cindex Fonts for printing, not for Info
6960 @findex i @r{(italic font)}
6961 @findex b @r{(bold font)}
6962 @findex t @r{(typewriter font)}
6963 @findex r @r{(Roman font)}
6965 Texinfo provides four font commands that specify font changes in the
6966 printed manual but have no effect in the Info file.  @code{@@i}
6967 requests @i{italic} font (in some versions of @TeX{}, a slanted font
6968 is used), @code{@@b} requests @b{bold} face, @code{@@t} requests the
6969 @t{fixed-width}, typewriter-style font used by @code{@@code}, and @code{@@r} requests a
6970 @r{roman} font, which is the usual font in which text is printed.  All
6971 four commands apply to an argument that follows, surrounded by
6972 braces.@refill
6974 Only the @code{@@r} command has much use: in example programs, you
6975 can use the @code{@@r} command to convert code comments from the
6976 fixed-width font to a roman font.  This looks better in printed
6977 output.@refill
6979 @need 700
6980 For example,
6982 @example
6983 @group
6984 @@lisp
6985 (+ 2 2)    ; @@r@{Add two plus two.@}
6986 @@end lisp
6987 @end group
6988 @end example
6990 @noindent
6991 produces
6993 @lisp
6994 (+ 2 2)    ; @r{Add two plus two.}
6995 @end lisp
6997 If possible, you should avoid using the other three font commands.  If
6998 you need to use one, it probably indicates a gap in the Texinfo
6999 language.@refill
7001 @node Customized Highlighting,  , Fonts, Emphasis
7002 @comment node-name,  next,  previous,  up
7003 @subsection Customized Highlighting
7004 @cindex Highlighting, customized
7005 @cindex Customized highlighting
7007 @c I think this whole section is obsolete with the advent of macros
7008 @c --karl, 15sep96.
7009 You can use regular @TeX{} commands inside of @code{@@iftex} @dots{}
7010 @code{@@end iftex} to create your own customized highlighting commands
7011 for Texinfo.  The easiest way to do this is to equate your customized
7012 commands with pre-existing commands, such as those for italics.  Such
7013 new commands work only with @TeX{}.@refill
7015 @findex definfoenclose
7016 @cindex Enclosure command for Info
7017 You can use the @code{@@definfoenclose} command inside of
7018 @code{@@ifinfo} @dots{} @code{@@end ifinfo} to define commands for Info
7019 with the same names as new commands for @TeX{}.
7020 @code{@@definfoenclose} creates new commands for Info that mark text by
7021 enclosing it in strings that precede and follow the text.
7022 @footnote{Currently, @code{@@definfoenclose} works only with
7023 @code{texinfo-format-buffer} and @code{texinfo-format-region}, not with
7024 @code{makeinfo}.}@refill
7026 Here is how to create a new @@-command called @code{@@phoo} that causes
7027 @TeX{} to typeset its argument in italics and causes Info to display the
7028 argument between @samp{//} and @samp{\\}.@refill
7030 @need 1300
7031 For @TeX{}, write the following to equate the @code{@@phoo} command with
7032 the existing @code{@@i} italics command:@refill
7034 @example
7035 @group
7036 @@iftex
7037 @@global@@let@@phoo=@@i
7038 @@end iftex
7039 @end group
7040 @end example
7042 @noindent
7043 This defines @code{@@phoo} as a command that causes @TeX{} to typeset
7044 the argument to @code{@@phoo} in italics.  @code{@@global@@let} tells
7045 @TeX{} to equate the next argument with the argument that follows the
7046 equals sign.
7048 @need 1300
7049 For Info, write the following to tell the Info formatters to enclose the
7050 argument between @samp{//} and @samp{\\}:
7052 @example
7053 @group
7054 @@ifinfo
7055 @@definfoenclose phoo, //, \\
7056 @@end ifinfo
7057 @end group
7058 @end example
7060 @noindent
7061 Write the @code{@@definfoenclose} command on a line and follow it with
7062 three arguments separated by commas (commas are used as separators in an
7063 @code{@@node} line in the same way).@refill
7065 @itemize @bullet
7066 @item
7067 The first argument to @code{@@definfoenclose} is the @@-command name
7068 @strong{without} the @samp{@@};
7070 @item
7071 the second argument is the Info start delimiter string; and,
7073 @item
7074 the third argument is the Info end delimiter string.
7075 @end itemize
7077 @noindent
7078 The latter two arguments enclose the highlighted text in the Info file.
7079 A delimiter string may contain spaces.  Neither the start nor end
7080 delimiter is required.  However, if you do not provide a start
7081 delimiter, you must follow the command name with two commas in a row;
7082 otherwise, the Info formatting commands will misinterpret the end
7083 delimiter string as a start delimiter string.@refill
7085 After you have defined @code{@@phoo} both for @TeX{} and for Info, you
7086 can then write @code{@@phoo@{bar@}} to see @samp{//bar\\}
7087 in Info and see
7088 @ifinfo
7089 @samp{bar} in italics in printed output.
7090 @end ifinfo
7091 @iftex
7092 @i{bar} in italics in printed output.
7093 @end iftex
7095 Note that each definition applies to its own formatter: one for @TeX{},
7096 the other for Info.
7098 @need 1200
7099 Here is another example:
7101 @example
7102 @group
7103 @@ifinfo
7104 @@definfoenclose headword, , :
7105 @@end ifinfo
7106 @@iftex
7107 @@global@@let@@headword=@@b
7108 @@end iftex
7109 @end group
7110 @end example
7112 @noindent
7113 This defines @code{@@headword} as an Info formatting command that
7114 inserts nothing before and a colon after the argument and as a @TeX{}
7115 formatting command to typeset its argument in bold.
7117 @node Quotations and Examples, Lists and Tables, Marking Text, Top
7118 @comment  node-name,  next,  previous,  up
7119 @chapter Quotations and Examples
7121 Quotations and examples are blocks of text consisting of one or more
7122 whole paragraphs that are set off from the bulk of the text and
7123 treated differently.  They are usually indented.@refill
7125 In Texinfo, you always begin a quotation or example by writing an
7126 @@-command at the beginning of a line by itself, and end it by writing
7127 an @code{@@end} command that is also at the beginning of a line by
7128 itself.  For instance, you begin an example by writing @code{@@example}
7129 by itself at the beginning of a line and end the example by writing
7130 @code{@@end example} on a line by itself, at the beginning of that
7131 line.@refill
7132 @findex end
7134 @menu
7135 * Block Enclosing Commands::    Use different constructs for
7136                                   different purposes.
7137 * quotation::                   How to write a quotation.
7138 * example::                     How to write an example in a fixed-width font.
7139 * noindent::                    How to prevent paragraph indentation.
7140 * Lisp Example::                How to illustrate Lisp code.
7141 * smallexample & smalllisp::    Forms for the @code{@@smallbook} option.
7142 * display::                     How to write an example in the current font.
7143 * format::                      How to write an example that does not narrow
7144                                   the margins.
7145 * exdent::                      How to undo the indentation of a line.
7146 * flushleft & flushright::      How to push text flushleft or flushright.
7147 * cartouche::                   How to draw cartouches around examples.
7148 @end menu
7150 @node Block Enclosing Commands, quotation, Quotations and Examples, Quotations and Examples
7151 @section The Block Enclosing Commands
7153 Here are commands for quotations and examples:@refill
7155 @table @code
7156 @item @@quotation
7157 Indicate text that is quoted. The text is filled, indented, and
7158 printed in a roman font by default.@refill
7160 @item @@example
7161 Illustrate code, commands, and the like. The text is printed
7162 in a fixed-width font, and indented but not filled.@refill
7164 @item @@lisp
7165 Illustrate Lisp code. The text is printed in a fixed-width font,
7166 and indented but not filled.@refill
7168 @item @@smallexample
7169 Illustrate code, commands, and the like.  Similar to
7170 @code{@@example}, except that in @TeX{} this command typesets text in
7171 a smaller font for the smaller @code{@@smallbook} format than for the
7172 8.5 by 11 inch format.@refill
7174 @item @@smalllisp
7175 Illustrate Lisp code.  Similar to @code{@@lisp}, except that
7176 in @TeX{} this command typesets text in a smaller font for the smaller
7177 @code{@@smallbook} format than for the 8.5 by 11 inch format.@refill
7179 @item @@display
7180 Display illustrative text.  The text is indented but not filled, and
7181 no font is specified (so, by default, the font is roman).@refill
7183 @item @@format
7184 Print illustrative text.  The text is not indented and not filled
7185 and no font is specified (so, by default, the font is roman).@refill
7186 @end table
7188 The @code{@@exdent} command is used within the above constructs to
7189 undo the indentation of a line.
7191 The @code{@@flushleft} and @code{@@flushright} commands are used to line
7192 up the left or right margins of unfilled text.@refill
7194 The @code{@@noindent} command may be used after one of the above
7195 constructs to prevent the following text from being indented as a new
7196 paragraph.@refill
7198 You can use the @code{@@cartouche} command within one of the above
7199 constructs to highlight the example or quotation by drawing a box with
7200 rounded corners around it.  (The @code{@@cartouche} command affects
7201 only the printed manual; it has no effect in the Info file; see
7202 @ref{cartouche, , Drawing Cartouches Around Examples}.)@refill
7204 @node quotation, example, Block Enclosing Commands, Quotations and Examples
7205 @comment  node-name,  next,  previous,  up
7206 @section @code{@@quotation}
7207 @cindex Quotations
7208 @findex quotation
7210 The text of a quotation is
7211 processed normally except that:@refill
7213 @itemize @bullet
7214 @item
7215 the margins are closer to the center of the page, so the whole of the
7216 quotation is indented;@refill
7218 @item
7219 the first lines of paragraphs are indented no more than other
7220 lines;@refill
7222 @item
7223 in the printed output, interparagraph spacing is reduced.@refill
7224 @end itemize
7226 @quotation
7227 This is an example of text written between an @code{@@quotation}
7228 command and an @code{@@end quotation} command.  An @code{@@quotation}
7229 command is most often used to indicate text that is excerpted from
7230 another (real or hypothetical) printed work.@refill
7231 @end quotation
7233 Write an @code{@@quotation} command as text on a line by itself.  This
7234 line will disappear from the output.  Mark the end of the quotation
7235 with a line beginning with and containing only @code{@@end quotation}.
7236 The @code{@@end quotation} line will likewise disappear from the
7237 output.  Thus, the following,@refill
7239 @example
7240 @@quotation
7241 This is
7242 a foo.
7243 @@end quotation
7244 @end example
7246 @noindent
7247 produces
7249 @quotation
7250 This is a foo.
7251 @end quotation
7253 @node example, noindent, quotation, Quotations and Examples
7254 @comment  node-name,  next,  previous,  up
7255 @section @code{@@example}
7256 @cindex Examples, formatting them
7257 @cindex Formatting examples
7258 @findex example
7260 The @code{@@example} command is used to indicate an example that is
7261 not part of the running text, such as computer input or output.@refill
7263 @example
7264 @group
7265 This is an example of text written between an
7266 @code{@@example} command
7267 and an @code{@@end example} command.
7268 The text is indented but not filled.
7269 @end group
7271 @group
7272 In the printed manual, the text is typeset in a
7273 fixed-width font, and extra spaces and blank lines are
7274 significant.  In the Info file, an analogous result is
7275 obtained by indenting each line with five spaces.
7276 @end group
7277 @end example
7279 Write an @code{@@example} command at the beginning of a line by itself.
7280 This line will disappear from the output.  Mark the end of the example
7281 with an @code{@@end example} command, also written at the beginning of a
7282 line by itself.  The @code{@@end example} will disappear from the
7283 output.@refill
7285 @need 700
7286 For example,
7288 @example
7289 @@example
7290 mv foo bar
7291 @@end example
7292 @end example
7294 @noindent
7295 produces
7297 @example
7298 mv foo bar
7299 @end example
7301 Since the lines containing @code{@@example} and @code{@@end example}
7302 will disappear, you should put a blank line before the
7303 @code{@@example} and another blank line after the @code{@@end
7304 example}.  (Remember that blank lines between the beginning
7305 @code{@@example} and the ending @code{@@end example} will appear in
7306 the output.)@refill
7308 @quotation
7309 @strong{Caution:} Do not use tabs in the lines of an example (or anywhere
7310 else in Texinfo, for that matter)!  @TeX{} treats tabs as single
7311 spaces, and that is not what they look like.  This is a problem with
7312 @TeX{}.  (If necessary, in Emacs, you can use @kbd{M-x untabify} to
7313 convert tabs in a region to multiple spaces.)@refill
7314 @end quotation
7316 Examples are often, logically speaking, ``in the middle'' of a
7317 paragraph, and the text continues after an example should not be
7318 indented.  The @code{@@noindent} command prevents a piece of text from
7319 being indented as if it were a new paragraph.
7320 @ifinfo
7321 (@xref{noindent}.)
7322 @end ifinfo
7324 (The @code{@@code} command is used for examples of code that are
7325 embedded within sentences, not set off from preceding and following
7326 text.  @xref{code, , @code{@@code}}.)
7328 @node noindent, Lisp Example, example, Quotations and Examples
7329 @comment  node-name,  next,  previous,  up
7330 @section @code{@@noindent}
7331 @findex noindent
7333 An example or other inclusion can break a paragraph into segments.
7334 Ordinarily, the formatters indent text that follows an example as a new
7335 paragraph.  However, you can prevent this by writing @code{@@noindent}
7336 at the beginning of a line by itself preceding the continuation
7337 text.@refill
7339 @need 1500
7340 For example:
7342 @example
7343 @group
7344 @@example
7345 This is an example
7346 @@end example
7348 @@noindent
7349 This line is not indented.  As you can see, the
7350 beginning of the line is fully flush left with the line
7351 that follows after it.  (This whole example is between
7352 @@code@{@@@@display@} and @@code@{@@@@end display@}.)
7353 @end group
7354 @end example
7356 @noindent
7357 produces
7359 @display
7360 @example
7361 This is an example
7362 @end example
7363 @tex
7364 % Remove extra vskip; this is a kludge to counter the effect of display
7365 \vskip-3.5\baselineskip
7366 @end tex
7368 @noindent
7369 This line is not indented.  As you can see, the
7370 beginning of the line is fully flush left with the line
7371 that follows after it.  (This whole example is between
7372 @code{@@display} and @code{@@end display}.)
7373 @end display
7375 To adjust the number of blank lines properly in the Info file output,
7376 remember that the line containing @code{@@noindent} does not generate a
7377 blank line, and neither does the @code{@@end example} line.@refill
7379 In the Texinfo source file for this manual, each line that says
7380 `produces' is preceded by a line containing @code{@@noindent}.@refill
7382 Do not put braces after an @code{@@noindent} command; they are not
7383 necessary, since @code{@@noindent} is a command used outside of
7384 paragraphs (@pxref{Command Syntax}).@refill
7386 @node Lisp Example, smallexample & smalllisp, noindent, Quotations and Examples
7387 @comment  node-name,  next,  previous,  up
7388 @section @code{@@lisp}
7389 @cindex Lisp example
7390 @findex lisp
7392 The @code{@@lisp} command is used for Lisp code.  It is synonymous
7393 with the @code{@@example} command.
7395 @lisp
7396 This is an example of text written between an
7397 @code{@@lisp} command and an @code{@@end lisp} command.
7398 @end lisp
7400 Use @code{@@lisp} instead of @code{@@example} to preserve information
7401 regarding the nature of the example.  This is useful, for example, if
7402 you write a function that evaluates only and all the Lisp code in a
7403 Texinfo file.  Then you can use the Texinfo file as a Lisp
7404 library.@footnote{It would be straightforward to extend Texinfo to work
7405 in a similar fashion for C, Fortran, or other languages.}@refill
7407 Mark the end of @code{@@lisp} with @code{@@end lisp} on a line by
7408 itself.@refill
7410 @node smallexample & smalllisp, display, Lisp Example, Quotations and Examples
7411 @comment  node-name,  next,  previous,  up
7412 @section @code{@@smallexample} and @code{@@smalllisp}
7413 @cindex Small book example
7414 @cindex Example for a small book
7415 @cindex Lisp example for a small book
7416 @findex smallexample
7417 @findex smalllisp
7419 In addition to the regular @code{@@example} and @code{@@lisp} commands,
7420 Texinfo has two other ``example-style'' commands.  These are the
7421 @code{@@smallexample} and @code{@@smalllisp} commands.  Both these
7422 commands are designed for use with the @code{@@smallbook} command that
7423 causes @TeX{} to produce a printed manual in a 7 by 9.25 inch format
7424 rather than the regular 8.5 by 11 inch format.@refill
7426 In @TeX{}, the @code{@@smallexample} and @code{@@smalllisp} commands
7427 typeset text in a smaller font for the smaller @code{@@smallbook}
7428 format than for the 8.5 by 11 inch format.  Consequently, many examples
7429 containing long lines fit in a narrower, @code{@@smallbook} page
7430 without needing to be shortened.  Both commands typeset in the normal
7431 font size when you format for the 8.5 by 11 inch size; indeed,
7432 in this situation, the @code{@@smallexample} and @code{@@smalllisp}
7433 commands are defined to be the @code{@@example} and @code{@@lisp}
7434 commands.@refill
7436 In Info, the @code{@@smallexample} and @code{@@smalllisp} commands are
7437 equivalent to the @code{@@example} and @code{@@lisp} commands, and work
7438 exactly the same.@refill
7440 Mark the end of @code{@@smallexample} or @code{@@smalllisp} with
7441 @code{@@end smallexample} or @code{@@end smalllisp},
7442 respectively.@refill
7444 @iftex
7445 Here is an example written in the small font used by the
7446 @code{@@smallexample} and @code{@@smalllisp} commands:
7448 @ifclear smallbook
7449 @display
7450 @tex
7451 % Remove extra vskip; this is a kludge to counter the effect of display
7452 \vskip-3\baselineskip
7453 {\ninett
7454 \dots{} to make sure that you have the freedom to
7455 distribute copies of free software (and charge for
7456 this service if you wish), that you receive source
7457 code or can get it if you want it, that you can
7458 change the software or use pieces of it in new free
7459 programs; and that you know you can do these things.}
7460 @end tex
7461 @end display
7462 @end ifclear
7463 @end iftex
7464 @ifset smallbook
7465 @iftex
7466 @smallexample
7467 This is an example of text written between @code{@@smallexample} and
7468 @code{@@end smallexample}.  In Info and in an 8.5 by 11 inch manual,
7469 this text appears in its normal size; but in a 7 by 9.25 inch manual,
7470 this text appears in a smaller font.
7471 @end smallexample
7472 @end iftex
7473 @end ifset
7474 @ifinfo
7475 @smallexample
7476 This is an example of text written between @code{@@smallexample} and
7477 @code{@@end smallexample}.  In Info and in an 8.5 by 11 inch manual,
7478 this text appears in its normal size; but in a 7 by 9.25 inch manual,
7479 this text appears in a smaller font.
7480 @end smallexample
7481 @end ifinfo
7483 The @code{@@smallexample} and @code{@@smalllisp} commands make it
7484 easier to prepare smaller format manuals without forcing you to edit
7485 examples by hand to fit them onto narrower pages.@refill
7487 As a general rule, a printed document looks better if you write all the
7488 examples in a chapter consistently in @code{@@example} or in
7489 @code{@@smallexample}.  Only occasionally should you mix the two
7490 formats.@refill
7492 @xref{smallbook, , Printing ``Small'' Books}, for more information
7493 about the @code{@@smallbook} command.@refill
7495 @node display, format, smallexample & smalllisp, Quotations and Examples
7496 @comment  node-name,  next,  previous,  up
7497 @section @code{@@display}
7498 @cindex Display formatting
7499 @findex display
7501 The @code{@@display} command begins a kind of example.  It is like the
7502 @code{@@example} command
7503 except that, in
7504 a printed manual, @code{@@display} does not select the fixed-width
7505 font.  In fact, it does not specify the font at all, so that the text
7506 appears in the same font it would have appeared in without the
7507 @code{@@display} command.@refill
7509 @display
7510 This is an example of text written between an @code{@@display} command
7511 and an @code{@@end display} command.  The @code{@@display} command
7512 indents the text, but does not fill it.
7513 @end display
7515 @node format, exdent, display, Quotations and Examples
7516 @comment  node-name,  next,  previous,  up
7517 @section @code{@@format}
7518 @findex format
7520 The @code{@@format} command is similar to @code{@@example} except
7521 that, in the printed manual, @code{@@format} does not select the
7522 fixed-width font and does not narrow the margins.@refill
7524 @format
7525 This is an example of text written between an @code{@@format} command
7526 and an @code{@@end format} command.  As you can see
7527 from this example,
7528 the @code{@@format} command does not fill the text.
7529 @end format
7531 @node exdent, flushleft & flushright, format, Quotations and Examples
7532 @section @code{@@exdent}: Undoing a Line's Indentation
7533 @cindex Indentation undoing
7534 @findex exdent
7536 The @code{@@exdent} command removes any indentation a line might have.
7537 The command is written at the beginning of a line and applies only to
7538 the text that follows the command that is on the same line.  Do not use
7539 braces around the text.  In a printed manual, the text on an
7540 @code{@@exdent} line is printed in the roman font.@refill
7542 @code{@@exdent} is usually used within examples.  Thus,@refill
7544 @example
7545 @group
7546 @@example
7547 This line follows an @@@@example command.
7548 @@exdent This line is exdented.
7549 This line follows the exdented line.
7550 The @@@@end example comes on the next line.
7551 @@end group
7552 @end group
7553 @end example
7555 @noindent
7556 produces
7558 @example
7559 @group
7560 This line follows an @@example command.
7561 @exdent This line is exdented.
7562 This line follows the exdented line.
7563 The @@end example comes on the next line.
7564 @end group
7565 @end example
7567 In practice, the @code{@@exdent} command is rarely used.
7568 Usually, you un-indent text by ending the example and
7569 returning the page to its normal width.@refill
7571 @node flushleft & flushright, cartouche, exdent, Quotations and Examples
7572 @section @code{@@flushleft} and @code{@@flushright}
7573 @findex flushleft
7574 @findex flushright
7576 The @code{@@flushleft} and @code{@@flushright} commands line up the
7577 ends of lines on the left and right margins of a page,
7578 but do not fill the text.  The commands are written on lines of their
7579 own, without braces.  The @code{@@flushleft} and @code{@@flushright}
7580 commands are ended by @code{@@end flushleft} and @code{@@end
7581 flushright} commands on lines of their own.@refill
7583 @need 1500
7584 For example,
7586 @example
7587 @group
7588 @@flushleft
7589 This text is
7590 written flushleft.
7591 @@end flushleft
7592 @end group
7593 @end example
7595 @noindent
7596 produces
7598 @quotation
7599 @flushleft
7600 This text is
7601 written flushleft.
7602 @end flushleft
7603 @end quotation
7606 @code{@@flushright} produces the type of indentation often used in the
7607 return address of letters.  For example,
7609 @example
7610 @group
7611 @@flushright
7612 Here is an example of text written
7613 flushright.  The @@code@{@@flushright@} command
7614 right justifies every line but leaves the
7615 left end ragged.
7616 @@end flushright
7617 @end group
7618 @end example
7620 @noindent
7621 produces
7623 @flushright
7624 Here is an example of text written
7625 flushright.  The @code{@@flushright} command
7626 right justifies every line but leaves the
7627 left end ragged.
7628 @end flushright
7630 @node cartouche,  , flushleft & flushright, Quotations and Examples
7631 @section Drawing Cartouches Around Examples
7632 @findex cartouche
7633 @cindex Box with rounded corners
7635 In a printed manual, the @code{@@cartouche} command draws a box with
7636 rounded corners around its contents.  You can use this command to
7637 further highlight an example or quotation.  For instance, you could
7638 write a manual in which one type of example is surrounded by a cartouche
7639 for emphasis.@refill
7641 The @code{@@cartouche} command affects only the printed manual; it has
7642 no effect in the Info file.@refill
7644 @need 1500
7645 For example,
7647 @example
7648 @group
7649 @@example
7650 @@cartouche
7651 % pwd
7652 /usr/local/share/emacs
7653 @@end cartouche
7654 @@end example
7655 @end group
7656 @end example
7658 @noindent
7659 surrounds the two-line example with a box with rounded corners, in the
7660 printed manual.
7662 @iftex
7663 In a printed manual, the example looks like this:@refill
7665 @example
7666 @group
7667 @cartouche
7668 % pwd
7669 /usr/local/lib/emacs/info
7670 @end cartouche
7671 @end group
7672 @end example
7673 @end iftex
7676 @node Lists and Tables, Indices, Quotations and Examples, Top
7677 @chapter Lists and Tables
7678 @cindex Making lists and tables
7679 @cindex Lists and tables, making
7680 @cindex Tables and lists, making
7682 Texinfo has several ways of making lists and tables.  Lists can be
7683 bulleted or numbered; two-column tables can highlight the items in
7684 the first column; multi-column tables are also supported.
7686 @menu
7687 * Introducing Lists::           Texinfo formats lists for you.
7688 * itemize::                     How to construct a simple list.
7689 * enumerate::                   How to construct a numbered list.
7690 * Two-column Tables::           How to construct a two-column table.
7691 * Multi-column Tables::         How to construct generalized tables.
7692 @end menu
7694 @ifinfo
7695 @node Introducing Lists, itemize, Lists and Tables, Lists and Tables
7696 @heading Introducing Lists
7697 @end ifinfo
7699 Texinfo automatically indents the text in lists or tables, and numbers
7700 an enumerated list.  This last feature is useful if you modify the
7701 list, since you do not need to renumber it yourself.@refill
7703 Numbered lists and tables begin with the appropriate @@-command at the
7704 beginning of a line, and end with the corresponding @code{@@end}
7705 command on a line by itself.  The table and itemized-list commands
7706 also require that you write formatting information on the same line as
7707 the beginning @@-command.@refill
7709 Begin an enumerated list, for example, with an @code{@@enumerate}
7710 command and end the list with an @code{@@end enumerate} command.
7711 Begin an itemized list with an @code{@@itemize} command, followed on
7712 the same line by a formatting command such as @code{@@bullet}, and end
7713 the list with an @code{@@end itemize} command.@refill
7714 @findex end
7716 Precede each element of a list with an @code{@@item} or @code{@@itemx}
7717 command.@refill
7719 @sp 1
7720 @noindent
7721 Here is an itemized list of the different kinds of table and lists:@refill
7723 @itemize @bullet
7724 @item
7725 Itemized lists with and without bullets.
7727 @item
7728 Enumerated lists, using numbers or letters.
7730 @item
7731 Two-column tables with highlighting.
7732 @end itemize
7734 @sp 1
7735 @noindent
7736 Here is an enumerated list with the same items:@refill
7738 @enumerate
7739 @item
7740 Itemized lists with and without bullets.
7742 @item
7743 Enumerated lists, using numbers or letters.
7745 @item
7746 Two-column tables with highlighting.
7747 @end enumerate
7749 @sp 1
7750 @noindent
7751 And here is a two-column table with the same items and their
7752 @w{@@-commands}:@refill
7754 @table @code
7755 @item @@itemize
7756 Itemized lists with and without bullets.
7758 @item @@enumerate
7759 Enumerated lists, using numbers or letters.
7761 @item @@table
7762 @itemx @@ftable
7763 @itemx @@vtable
7764 Two-column tables with indexing.
7765 @end table
7767 @node itemize, enumerate, Introducing Lists, Lists and Tables
7768 @comment  node-name,  next,  previous,  up
7769 @section Making an Itemized List
7770 @cindex Itemization
7771 @findex itemize
7773 The @code{@@itemize} command produces sequences of indented
7774 paragraphs, with a bullet or other mark inside the left margin
7775 at the beginning of each paragraph for which such a mark is desired.@refill
7777 Begin an itemized list by writing @code{@@itemize} at the beginning of
7778 a line.  Follow the command, on the same line, with a character or a
7779 Texinfo command that generates a mark.  Usually, you will write
7780 @code{@@bullet} after @code{@@itemize}, but you can use
7781 @code{@@minus}, or any character or any special symbol that results in
7782 a single character in the Info file.  (When you write @code{@@bullet}
7783 or @code{@@minus} after an @code{@@itemize} command, you may omit the
7784 @samp{@{@}}.)@refill
7786 Write the text of the indented paragraphs themselves after the
7787 @code{@@itemize}, up to another line that says @code{@@end
7788 itemize}.@refill
7790 Before each paragraph for which a mark in the margin is desired, write
7791 a line that says just @code{@@item}.  Do not write any other text on this
7792 line.@refill
7793 @findex item
7795 Usually, you should put a blank line before an @code{@@item}.  This
7796 puts a blank line in the Info file. (@TeX{} inserts the proper
7797 interline whitespace in either case.)  Except when the entries are
7798 very brief, these blank lines make the list look better.@refill
7800 Here is an example of the use of @code{@@itemize}, followed by the
7801 output it produces.  Note that @code{@@bullet} produces an @samp{*} in
7802 Info and a round dot in @TeX{}.@refill
7804 @example
7805 @group
7806 @@itemize @@bullet
7807 @@item
7808 Some text for foo.
7810 @@item
7811 Some text
7812 for bar.
7813 @@end itemize
7814 @end group
7815 @end example
7817 @noindent
7818 This produces:
7820 @quotation
7821 @itemize @bullet
7822 @item
7823 Some text for foo.
7825 @item
7826 Some text
7827 for bar.
7828 @end itemize
7829 @end quotation
7831 Itemized lists may be embedded within other itemized lists.  Here is a
7832 list marked with dashes embedded in a list marked with bullets:@refill
7834 @example
7835 @group
7836 @@itemize @@bullet
7837 @@item
7838 First item.
7840 @@itemize @@minus
7841 @@item
7842 Inner item.
7844 @@item
7845 Second inner item.
7846 @@end itemize
7848 @@item
7849 Second outer item.
7850 @@end itemize
7851 @end group
7852 @end example
7854 @noindent
7855 This produces:
7857 @quotation
7858 @itemize @bullet
7859 @item
7860 First item.
7862 @itemize @minus
7863 @item
7864 Inner item.
7866 @item
7867 Second inner item.
7868 @end itemize
7870 @item
7871 Second outer item.
7872 @end itemize
7873 @end quotation
7875 @node enumerate, Two-column Tables, itemize, Lists and Tables
7876 @comment  node-name,  next,  previous,  up
7877 @section Making a Numbered or Lettered List
7878 @cindex Enumeration
7879 @findex enumerate
7881 @code{@@enumerate} is like @code{@@itemize} (@pxref{itemize,,
7882 @code{@@itemize}}), except that the labels on the items are
7883 successive integers or letters instead of bullets.
7885 Write the @code{@@enumerate} command at the beginning of a line.  The
7886 command does not require an argument, but accepts either a number or a
7887 letter as an option.  Without an argument, @code{@@enumerate} starts the
7888 list with the number @samp{1}.  With a numeric argument, such as
7889 @samp{3}, the command starts the list with that number.  With an upper
7890 or lower case letter, such as @samp{a} or @samp{A}, the command starts
7891 the list with that letter.@refill
7893 Write the text of the enumerated list in the same way you write an
7894 itemized list: put @code{@@item} on a line of its own before the start
7895 of each paragraph that you want enumerated.  Do not write any other text
7896 on the line beginning with @code{@@item}.@refill
7898 You should put a blank line between entries in the list.
7899 This generally makes it easier to read the Info file.@refill
7901 @need 1500
7902 Here is an example of @code{@@enumerate} without an argument:@refill
7904 @example
7905 @group
7906 @@enumerate
7907 @@item
7908 Underlying causes.
7910 @@item
7911 Proximate causes.
7912 @@end enumerate
7913 @end group
7914 @end example
7916 @noindent
7917 This produces:
7919 @enumerate
7920 @item
7921 Underlying causes.
7923 @item
7924 Proximate causes.
7925 @end enumerate
7926 @sp 1
7927 Here is an example with an argument of @kbd{3}:@refill
7928 @sp 1
7929 @example
7930 @group
7931 @@enumerate 3
7932 @@item
7933 Predisposing causes.
7935 @@item
7936 Precipitating causes.
7938 @@item
7939 Perpetuating causes.
7940 @@end enumerate
7941 @end group
7942 @end example
7944 @noindent
7945 This produces:
7947 @enumerate 3
7948 @item
7949 Predisposing causes.
7951 @item
7952 Precipitating causes.
7954 @item
7955 Perpetuating causes.
7956 @end enumerate
7957 @sp 1
7958 Here is a brief summary of the alternatives.  The summary is constructed
7959 using @code{@@enumerate} with an argument of @kbd{a}.@refill
7960 @sp 1
7961 @enumerate a
7962 @item
7963 @code{@@enumerate}
7965 Without an argument, produce a numbered list, starting with the number
7966 1.@refill
7968 @item
7969 @code{@@enumerate @var{positive-integer}}
7971 With a (positive) numeric argument, start a numbered list with that
7972 number.  You can use this to continue a list that you interrupted with
7973 other text.@refill
7975 @item
7976 @code{@@enumerate @var{upper-case-letter}}
7978 With an upper case letter as argument, start a list
7979 in which each item is marked
7980 by a letter, beginning with that upper case letter.@refill
7982 @item
7983 @code{@@enumerate @var{lower-case-letter}}
7985 With a lower case letter as argument, start a list
7986 in which each item is marked by
7987 a letter, beginning with that lower case letter.@refill
7988 @end enumerate
7990 You can also nest enumerated lists, as in an outline.@refill
7992 @node Two-column Tables, Multi-column Tables, enumerate, Lists and Tables
7993 @section Making a Two-column Table
7994 @cindex Tables, making two-column
7995 @findex table
7997 @code{@@table} is similar to @code{@@itemize} (@pxref{itemize,,
7998 @code{@@itemize}}), but allows you to specify a name or heading line for
7999 each item.  The @code{@@table} command is used to produce two-column
8000 tables, and is especially useful for glossaries, explanatory
8001 exhibits, and command-line option summaries.
8003 @menu
8004 * table::                       How to construct a two-column table.
8005 * ftable vtable::               Automatic indexing for two-column tables.
8006 * itemx::                       How to put more entries in the first column.
8007 @end menu
8009 @ifinfo
8010 @node table, ftable vtable, Two-column Tables, Two-column Tables
8011 @subheading Using the @code{@@table} Command
8013 Use the @code{@@table} command to produce two-column tables.@refill
8014 @end ifinfo
8016 Write the @code{@@table} command at the beginning of a line and follow
8017 it on the same line with an argument that is a Texinfo ``indicating''
8018 command such as @code{@@code}, @code{@@samp}, @code{@@var}, or
8019 @code{@@kbd} (@pxref{Indicating}).  Although these commands are usually
8020 followed by arguments in braces, in this case you use the command name
8021 without an argument because @code{@@item} will supply the argument.
8022 This command will be applied to the text that goes into the first column
8023 of each item and determines how it will be highlighted.  For example,
8024 @code{@@code} will cause the text in the first column to be highlighted
8025 with an @code{@@code} command.  (We recommend @code{@@code} for
8026 @code{@@table}'s of command-line options.)
8028 @findex asis
8029 You may also choose to use the @code{@@asis} command as an argument to
8030 @code{@@table}.  @code{@@asis} is a command that does nothing; if you
8031 use this command after @code{@@table}, @TeX{} and the Info formatting
8032 commands output the first column entries without added highlighting
8033 (``as is'').@refill
8035 (The @code{@@table} command may work with other commands besides those
8036 listed here.  However, you can only use commands that normally take
8037 arguments in braces.)@refill
8039 Begin each table entry with an @code{@@item} command at the beginning
8040 of a line.  Write the first column text on the same line as the
8041 @code{@@item} command.  Write the second column text on the line
8042 following the @code{@@item} line and on subsequent lines.  (You do not
8043 need to type anything for an empty second column entry.)  You may
8044 write as many lines of supporting text as you wish, even several
8045 paragraphs.  But only text on the same line as the @code{@@item} will
8046 be placed in the first column.@refill
8047 @findex item
8049 Normally, you should put a blank line before an @code{@@item} line.
8050 This puts a blank like in the Info file.  Except when the entries are
8051 very brief, a blank line looks better.@refill
8053 @need 1500
8054 The following table, for example, highlights the text in the first
8055 column with an @code{@@samp} command:@refill
8057 @example
8058 @group
8059 @@table @@samp
8060 @@item foo
8061 This is the text for
8062 @@samp@{foo@}.
8064 @@item bar
8065 Text for @@samp@{bar@}.
8066 @@end table
8067 @end group
8068 @end example
8070 @noindent
8071 This produces:
8073 @table @samp
8074 @item foo
8075 This is the text for
8076 @samp{foo}.
8077 @item bar
8078 Text for @samp{bar}.
8079 @end table
8081 If you want to list two or more named items with a single block of
8082 text, use the @code{@@itemx} command.  (@xref{itemx, ,
8083 @code{@@itemx}}.)@refill
8085 @node ftable vtable, itemx, table, Two-column Tables
8086 @comment  node-name,  next,  previous,  up
8087 @subsection @code{@@ftable} and @code{@@vtable}
8088 @cindex Tables with indexes
8089 @cindex Indexing table entries automatically
8090 @findex ftable
8091 @findex vtable
8093 The @code{@@ftable} and @code{@@vtable} commands are the same as the
8094 @code{@@table} command except that @code{@@ftable} automatically enters
8095 each of the items in the first column of the table into the index of
8096 functions and @code{@@vtable} automatically enters each of the items in
8097 the first column of the table into the index of variables.  This
8098 simplifies the task of creating indices.  Only the items on the same
8099 line as the @code{@@item} commands are indexed, and they are indexed in
8100 exactly the form that they appear on that line.  @xref{Indices, ,
8101 Creating Indices}, for more information about indices.@refill
8103 Begin a two-column table using @code{@@ftable} or @code{@@vtable} by
8104 writing the @@-command at the beginning of a line, followed on the same
8105 line by an argument that is a Texinfo command such as @code{@@code},
8106 exactly as you would for an @code{@@table} command; and end the table
8107 with an @code{@@end ftable} or @code{@@end vtable} command on a line by
8108 itself.
8110 See the example for @code{@@table} in the previous section.
8112 @node itemx,  , ftable vtable, Two-column Tables
8113 @comment  node-name,  next,  previous,  up
8114 @subsection @code{@@itemx}
8115 @cindex Two named items for @code{@@table}
8116 @findex itemx
8118 Use the @code{@@itemx} command inside a table when you have two or more
8119 first column entries for the same item, each of which should appear on a
8120 line of its own.  Use @code{@@itemx} for all but the first entry;
8121 @code{@@itemx} should always follow an @code{@@item} command.  The
8122 @code{@@itemx} command works exactly like @code{@@item} except that it
8123 does not generate extra vertical space above the first column text.
8125 @need 1000
8126 For example,
8128 @example
8129 @group
8130 @@table @@code
8131 @@item upcase
8132 @@itemx downcase
8133 These two functions accept a character or a string as
8134 argument, and return the corresponding upper case (lower
8135 case) character or string.
8136 @@end table
8137 @end group
8138 @end example
8140 @noindent
8141 This produces:
8143 @table @code
8144 @item upcase
8145 @itemx downcase
8146 These two functions accept a character or a string as
8147 argument, and return the corresponding upper case (lower
8148 case) character or string.@refill
8149 @end table
8151 @noindent
8152 (Note also that this example illustrates multi-line supporting text in
8153 a two-column table.)@refill
8156 @node Multi-column Tables,  , Two-column Tables, Lists and Tables
8157 @section Multi-column Tables
8158 @cindex Tables, making multi-column
8159 @findex multitable
8161 @code{@@multitable} allows you to construct tables with any number of
8162 columns, with each column having any width you like.
8164 You define the column widths on the @code{@@multitable} line itself, and
8165 write each row of the actual table following an @code{@@item} command,
8166 with columns separated by an @code{@@tab} command.  Finally, @code{@@end
8167 multitable} completes the table.  Details in the sections below.
8169 @menu
8170 * Multitable Column Widths::    Defining multitable column widths.
8171 * Multitable Rows::             Defining multitable rows, with examples.
8172 @end menu
8174 @node Multitable Column Widths, Multitable Rows, Multi-column Tables, Multi-column Tables
8175 @subsection Multitable Column Widths
8176 @cindex Multitable column widths
8177 @cindex Column widths, defining for multitables
8178 @cindex Widths, defining multitable column
8180 You can define the column widths for a multitable in two ways: as
8181 fractions of the line length; or with a prototype row.  Mixing the two
8182 methods is not supported.  In either case, the widths are defined
8183 entirely on the same line as the @code{@@multitable} command.
8185 @enumerate
8186 @item
8187 @findex columnfractions
8188 @cindex Line length, column widths as fraction of
8189 To specify column widths as fractions of the line length, write
8190 @code{@@columnfractions} and the decimal numbers (presumably less than
8191 1) after the @code{@@multitable} command, as in:
8193 @example
8194 @@multitable @@columnfractions .33 .33 .33
8195 @end example
8197 @noindent The fractions need not add up exactly to 1.0, as these do
8198 not.  This allows you to produce tables that do not need the full line
8199 length.
8201 @item
8202 @cindex Prototype row, column widths defined by
8203 To specify a prototype row, write the longest entry for each column
8204 enclosed in braces after the @code{@@multitable} command.  For example:
8206 @example
8207 @@multitable @{some text for column one@} @{for column two@}
8208 @end example
8210 @noindent
8211 The first column will then have the width of the typeset `some text for
8212 column one', and the second column the width of `for column two'.
8214 The prototype entries need not appear in the table itself.
8216 Although we used simple text in this example, the prototype entries can
8217 contain Texinfo commands; markup commands such as @code{@@code} are
8218 particularly likely to be useful.
8220 @end enumerate
8223 @node Multitable Rows,  , Multitable Column Widths, Multi-column Tables
8224 @subsection Multitable Rows
8225 @cindex Multitable rows
8226 @cindex Rows, of a multitable
8228 @findex item
8229 @cindex tab
8230 After the @code{@@multitable} command defining the column widths (see
8231 the previous section), you begin each row in the body of a multitable
8232 with @code{@@item}, and separate the column entries with @code{@@tab}.
8233 Line breaks are not special within the table body, and you may break
8234 input lines in your source file as necessary.
8236 Here is a complete example of a multi-column table (the text is from
8237 @cite{The GNU Emacs Manual}, @pxref{Split Window,, Splitting Windows,
8238 emacs, The GNU Emacs Manual}):
8240 @example
8241 @@multitable @@columnfractions .15 .45 .4
8242 @@item Key @@tab Command @@tab Description
8243 @@item C-x 2
8244 @@tab @@code@{split-window-vertically@}
8245 @@tab Split the selected window into two windows,
8246 with one above the other.
8247 @@item C-x 3
8248 @@tab @@code@{split-window-horizontally@}
8249 @@tab Split the selected window into two windows
8250 positioned side by side.
8251 @@item C-Mouse-2
8252 @@tab
8253 @@tab In the mode line or scroll bar of a window,
8254 split that window.
8255 @@end multitable
8256 @end example
8258 @noindent produces:
8260 @multitable @columnfractions .15 .45 .4
8261 @item Key @tab Command @tab Description
8262 @item C-x 2
8263 @tab @code{split-window-vertically}
8264 @tab Split the selected window into two windows,
8265 with one above the other.
8266 @item C-x 3
8267 @tab @code{split-window-horizontally}
8268 @tab Split the selected window into two windows
8269 positioned side by side.
8270 @item C-Mouse-2
8271 @tab
8272 @tab In the mode line or scroll bar of a window,
8273 split that window.
8274 @end multitable
8277 @node Indices, Insertions, Lists and Tables, Top
8278 @comment node-name,  next,  previous,  up
8279 @chapter Creating Indices
8280 @cindex Indices
8281 @cindex Creating indices
8283 Using Texinfo, you can generate indices without having to sort and
8284 collate entries manually.  In an index, the entries are listed in
8285 alphabetical order, together with information on how to find the
8286 discussion of each entry.  In a printed manual, this information
8287 consists of page numbers.  In an Info file, this information is a menu
8288 entry leading to the first node referenced.@refill
8290 Texinfo provides several predefined kinds of index: an index
8291 for functions, an index for variables, an index for concepts, and so
8292 on.  You can combine indices or use them for other than their
8293 canonical purpose.  If you wish, you can define your own indices.@refill
8295 @menu
8296 * Index Entries::               Choose different words for index entries.
8297 * Predefined Indices::          Use different indices for different kinds
8298                                   of entry.
8299 * Indexing Commands::           How to make an index entry.
8300 * Combining Indices::           How to combine indices.
8301 * New Indices::                 How to define your own indices.
8302 @end menu
8304 @node Index Entries, Predefined Indices, Indices, Indices
8305 @comment  node-name,  next,  previous,  up
8306 @section Making Index Entries
8307 @cindex Index entries, making
8308 @cindex Entries, making index
8310 When you are making index entries, it is good practice to think of the
8311 different ways people may look for something.  Different people
8312 @emph{do not} think of the same words when they look something up.  A
8313 helpful index will have items indexed under all the different words
8314 that people may use.  For example, one reader may think it obvious that
8315 the two-letter names for indices should be listed under ``Indices,
8316 two-letter names'', since the word ``Index'' is the general concept.
8317 But another reader may remember the specific concept of two-letter
8318 names and search for the entry listed as ``Two letter names for
8319 indices''.  A good index will have both entries and will help both
8320 readers.@refill
8322 Like typesetting, the construction of an index is a highly skilled,
8323 professional art, the subtleties of which are not appreciated until you
8324 need to do it yourself.@refill
8326 @xref{Printing Indices & Menus}, for information about printing an index
8327 at the end of a book or creating an index menu in an Info file.@refill
8329 @node Predefined Indices, Indexing Commands, Index Entries, Indices
8330 @comment  node-name,  next,  previous,  up
8331 @section Predefined Indices
8333 Texinfo provides six predefined indices:@refill
8335 @itemize @bullet
8336 @item
8337 A @dfn{concept index} listing concepts that are discussed.@refill
8339 @item
8340 A @dfn{function index} listing functions (such as entry points of
8341 libraries).@refill
8343 @item
8344 A @dfn{variables index} listing variables (such as global variables
8345 of libraries).@refill
8347 @item
8348 A @dfn{keystroke index} listing keyboard commands.@refill
8350 @item
8351 A @dfn{program index} listing names of programs.@refill
8353 @item
8354 A @dfn{data type index} listing data types (such as structures defined in
8355 header files).@refill
8356 @end itemize
8358 @noindent
8359 Not every manual needs all of these, and most manuals use two or three
8360 of them.  This manual has two indices: a
8361 concept index and an @@-command index (that is actually the function
8362 index but is called a command index in the chapter heading).  Two or
8363 more indices can be combined into one using the @code{@@synindex} or
8364 @code{@@syncodeindex} commands.  @xref{Combining Indices}.@refill
8366 @node Indexing Commands, Combining Indices, Predefined Indices, Indices
8367 @comment  node-name,  next,  previous,  up
8368 @section Defining the Entries of an Index
8369 @cindex Defining indexing entries
8370 @cindex Index entries
8371 @cindex Entries for an index
8372 @cindex Specifying index entries
8373 @cindex Creating index entries
8375 The data to make an index come from many individual indexing commands
8376 scattered throughout the Texinfo source file.  Each command says to add
8377 one entry to a particular index; after formatting, the index will give
8378 the current page number or node name as the reference.@refill
8380 An index entry consists of an indexing command at the beginning of a
8381 line followed, on the rest of the line, by the entry.@refill
8383 For example, this section begins with the following five entries for
8384 the concept index:@refill
8386 @example
8387 @@cindex Defining indexing entries
8388 @@cindex Index entries
8389 @@cindex Entries for an index
8390 @@cindex Specifying index entries
8391 @@cindex Creating index entries
8392 @end example
8394 Each predefined index has its own indexing command---@code{@@cindex}
8395 for the concept index, @code{@@findex} for the function index, and so
8396 on.@refill
8398 @cindex Writing index entries
8399 @cindex Index entry writing
8400 Concept index entries consist of text.  The best way to write an index
8401 is to choose entries that are terse yet clear.  If you can do this,
8402 the index often looks better if the entries are not capitalized, but
8403 written just as they would appear in the middle of a sentence.
8404 (Capitalize proper names and acronyms that always call for upper case
8405 letters.)  This is the case convention we use in most GNU manuals'
8406 indices.
8408 If you don't see how to make an entry terse yet clear, make it longer
8409 and clear---not terse and confusing.  If many of the entries are several
8410 words long, the index may look better if you use a different convention:
8411 to capitalize the first word of each entry.  But do not capitalize a
8412 case-sensitive name such as a C or Lisp function name or a shell
8413 command; that would be a spelling error.
8415 Whichever case convention you use, please use it consistently!
8417 @ignore
8418 Concept index entries consist of English text.  The usual convention
8419 is to capitalize the first word of each such index entry, unless that
8420 word is the name of a function, variable, or other such entity that
8421 should not be capitalized.  However, if your concept index entries are
8422 consistently short (one or two words each) it may look better for each
8423 regular entry to start with a lower case letter, aside from proper
8424 names and acronyms that always call for upper case letters.  Whichever
8425 convention you adapt, please be consistent!
8426 @end ignore
8428 Entries in indices other than the concept index are symbol names in
8429 programming languages, or program names; these names are usually
8430 case-sensitive, so use upper and lower case as required for them.
8432 By default, entries for a concept index are printed in a small roman
8433 font and entries for the other indices are printed in a small
8434 @code{@@code} font.  You may change the way part of an entry is
8435 printed with the usual Texinfo commands, such as @code{@@file} for
8436 file names and @code{@@emph} for emphasis (@pxref{Marking
8437 Text}).@refill
8438 @cindex Index font types
8440 @cindex Predefined indexing commands
8441 @cindex Indexing commands, predefined
8442 The six indexing commands for predefined indices are:
8444 @table @code
8445 @item @@cindex @var{concept}
8446 @findex cindex
8447 Make an entry in the concept index for @var{concept}.@refill
8449 @item @@findex @var{function}
8450 @findex findex
8451 Make an entry in the function index for @var{function}.@refill
8453 @item @@vindex @var{variable}
8454 @findex vindex
8455 Make an entry in the variable index for @var{variable}.@refill
8457 @item @@kindex @var{keystroke}
8458 @findex kindex
8459 Make an entry in the key index for @var{keystroke}.@refill
8461 @item @@pindex @var{program}
8462 @findex pindex
8463 Make an entry in the program index for @var{program}.@refill
8465 @item @@tindex @var{data type}
8466 @findex tindex
8467 Make an entry in the data type index for @var{data type}.@refill
8468 @end table
8470 @quotation
8471 @strong{Caution:} Do not use a colon in an index entry.  In Info, a
8472 colon separates the menu entry name from the node name.  An extra
8473 colon confuses Info.
8474 @xref{Menu Parts, , The Parts of a Menu},
8475 for more information about the structure of a menu entry.@refill
8476 @end quotation
8478 If you write several identical index entries in different places in a
8479 Texinfo file, the index in the printed manual will list all the pages to
8480 which those entries refer.  However, the index in the Info file will
8481 list @strong{only} the node that references the @strong{first} of those
8482 index entries.  Therefore, it is best to write indices in which each
8483 entry refers to only one place in the Texinfo file.  Fortunately, this
8484 constraint is a feature rather than a loss since it means that the index
8485 will be easy to use.  Otherwise, you could create an index that lists
8486 several pages for one entry and your reader would not know to which page
8487 to turn.  If you have two identical entries for one topic, change the
8488 topics slightly, or qualify them to indicate the difference.@refill
8490 You are not actually required to use the predefined indices for their
8491 canonical purposes.  For example, suppose you wish to index some C
8492 preprocessor macros.  You could put them in the function index along
8493 with actual functions, just by writing @code{@@findex} commands for
8494 them; then, when you print the ``Function Index'' as an unnumbered
8495 chapter, you could give it the title `Function and Macro Index' and
8496 all will be consistent for the reader.  Or you could put the macros in
8497 with the data types by writing @code{@@tindex} commands for them, and
8498 give that index a suitable title so the reader will understand.
8499 (@xref{Printing Indices & Menus}.)@refill
8501 @node Combining Indices, New Indices, Indexing Commands, Indices
8502 @comment node-name,  next,  previous,  up
8503 @section Combining Indices
8504 @cindex Combining indices
8505 @cindex Indices, combining them
8507 Sometimes you will want to combine two disparate indices such as functions
8508 and concepts, perhaps because you have few enough of one of them that
8509 a separate index for them would look silly.@refill
8511 You could put functions into the concept index by writing
8512 @code{@@cindex} commands for them instead of @code{@@findex} commands,
8513 and produce a consistent manual by printing the concept index with the
8514 title `Function and Concept Index' and not printing the `Function
8515 Index' at all; but this is not a robust procedure.  It works only if
8516 your document is never included as part of another
8517 document that is designed to have a separate function index; if your
8518 document were to be included with such a document, the functions from
8519 your document and those from the other would not end up together.
8520 Also, to make your function names appear in the right font in the
8521 concept index, you would need to enclose every one of them between
8522 the braces of @code{@@code}.@refill
8524 @menu
8525 * syncodeindex::                How to merge two indices, using @code{@@code}
8526                                   font for the merged-from index.
8527 * synindex::                    How to merge two indices, using the
8528                                   default font of the merged-to index.
8529 @end menu
8531 @node syncodeindex, synindex, Combining Indices, Combining Indices
8532 @subsection @code{@@syncodeindex}
8533 @findex syncodeindex
8535 When you want to combine functions and concepts into one index, you
8536 should index the functions with @code{@@findex} and index the concepts
8537 with @code{@@cindex}, and use the @code{@@syncodeindex} command to
8538 redirect the function index entries into the concept index.@refill
8539 @findex syncodeindex
8541 The @code{@@syncodeindex} command takes two arguments; they are the name
8542 of the index to redirect, and the name of the index to redirect it to.
8543 The template looks like this:@refill
8545 @example
8546 @@syncodeindex @var{from} @var{to}
8547 @end example
8549 @cindex Predefined names for indices
8550 @cindex Two letter names for indices
8551 @cindex Indices, two letter names
8552 @cindex Names for indices
8553 For this purpose, the indices are given two-letter names:@refill
8555 @table @samp
8556 @item cp
8557 concept index
8558 @item fn
8559 function index
8560 @item vr
8561 variable index
8562 @item ky
8563 key index
8564 @item pg
8565 program index
8566 @item tp
8567 data type index
8568 @end table
8570 Write an @code{@@syncodeindex} command before or shortly after the
8571 end-of-header line at the beginning of a Texinfo file.  For example,
8572 to merge a function index with a concept index, write the
8573 following:@refill
8575 @example
8576 @@syncodeindex fn cp
8577 @end example
8579 @noindent
8580 This will cause all entries designated for the function index to merge
8581 in with the concept index instead.@refill
8583 To merge both a variables index and a function index into a concept
8584 index, write the following:@refill
8586 @example
8587 @group
8588 @@syncodeindex vr cp
8589 @@syncodeindex fn cp
8590 @end group
8591 @end example
8593 @cindex Fonts for indices
8594 The @code{@@syncodeindex} command puts all the entries from the `from'
8595 index (the redirected index) into the @code{@@code} font, overriding
8596 whatever default font is used by the index to which the entries are
8597 now directed.  This way, if you direct function names from a function
8598 index into a concept index, all the function names are printed in the
8599 @code{@@code} font as you would expect.@refill
8601 @node synindex,  , syncodeindex, Combining Indices
8602 @subsection @code{@@synindex}
8603 @findex synindex
8605 The @code{@@synindex} command is nearly the same as the
8606 @code{@@syncodeindex} command, except that it does not put the
8607 `from' index  entries into the @code{@@code} font; rather it puts
8608 them in the roman font.  Thus, you use @code{@@synindex} when you
8609 merge a concept index into a function index.@refill
8611 @xref{Printing Indices & Menus}, for information about printing an index
8612 at the end of a book or creating an index menu in an Info file.@refill
8614 @node New Indices,  , Combining Indices, Indices
8615 @section Defining New Indices
8616 @cindex Defining new indices
8617 @cindex Indices, defining new
8618 @cindex New index defining
8619 @findex defindex
8620 @findex defcodeindex
8622 In addition to the predefined indices, you may use the
8623 @code{@@defindex} and @code{@@defcodeindex} commands to define new
8624 indices.  These commands create new indexing @@-commands with which
8625 you mark index entries.  The @code{@@defindex }command is used like
8626 this:@refill
8628 @example
8629 @@defindex @var{name}
8630 @end example
8632 The name of an index should be a two letter word, such as @samp{au}.
8633 For example:@refill
8635 @example
8636 @@defindex au
8637 @end example
8639 This defines a new index, called the @samp{au} index.  At the same
8640 time, it creates a new indexing command, @code{@@auindex}, that you
8641 can use to make index entries.  Use the new indexing command just as
8642 you would use a predefined indexing command.@refill
8644 For example, here is a section heading followed by a concept index
8645 entry and two @samp{au} index entries.@refill
8647 @example
8648 @@section Cognitive Semantics
8649 @@cindex kinesthetic image schemas
8650 @@auindex Johnson, Mark
8651 @@auindex Lakoff, George
8652 @end example
8654 @noindent
8655 (Evidently, @samp{au} serves here as an abbreviation for ``author''.)
8656 Texinfo constructs the new indexing command by concatenating the name
8657 of the index with @samp{index}; thus, defining an @samp{au} index
8658 leads to the automatic creation of an @code{@@auindex} command.@refill
8660 Use the @code{@@printindex} command to print the index, as you do with
8661 the predefined indices.  For example:@refill
8663 @example
8664 @group
8665 @@node Author Index, Subject Index, , Top
8666 @@unnumbered Author Index
8668 @@printindex au
8669 @end group
8670 @end example
8672 The @code{@@defcodeindex} is like the @code{@@defindex} command, except
8673 that, in the printed output, it prints entries in an @code{@@code} font
8674 instead of a roman font.  Thus, it parallels the @code{@@findex} command
8675 rather than the @code{@@cindex} command.@refill
8677 You should define new indices within or right after the end-of-header
8678 line of a Texinfo file, before any @code{@@synindex} or
8679 @code{@@syncodeindex} commands (@pxref{Header}).@refill
8681 @node Insertions, Breaks, Indices, Top
8682 @comment  node-name,  next,  previous,  up
8683 @chapter Special Insertions
8684 @cindex Inserting special characters and symbols
8685 @cindex Special insertions
8687 Texinfo provides several commands for inserting characters that have
8688 special meaning in Texinfo, such as braces, and for other graphic
8689 elements that do not correspond to simple characters you can type.
8691 @iftex
8692 These are:
8694 @itemize @bullet
8695 @item Braces, @samp{@@} and periods.
8696 @item Whitespace within and around a sentence.
8697 @item Accents.
8698 @item Dots and bullets.
8699 @item The @TeX{} logo and the copyright symbol.
8700 @item Mathematical expressions.
8701 @end itemize
8702 @end iftex
8704 @menu
8705 * Braces Atsigns::              How to insert braces, @samp{@@}.
8706 * Inserting Space::             How to insert the right amount of space
8707                                   within a sentence.
8708 * Inserting Accents::           How to insert accents and special characters.
8709 * Dots Bullets::                How to insert dots and bullets.
8710 * TeX and copyright::           How to insert the @TeX{} logo
8711                                   and the copyright symbol.
8712 * pounds::                      How to insert the pounds currency symbol.
8713 * minus::                       How to insert a minus sign.
8714 * math::                        How to format a mathematical expression.
8715 * Glyphs::                      How to indicate results of evaluation,
8716                                   expansion of macros, errors, etc.
8717 * Images::                      How to include graphics.
8718 @end menu
8721 @node Braces Atsigns, Inserting Space, Insertions, Insertions
8722 @section Inserting @@ and Braces
8723 @cindex Inserting @@, braces
8724 @cindex Braces, inserting
8725 @cindex Special characters, commands to insert
8726 @cindex Commands to insert special characters
8728 @samp{@@} and curly braces are special characters in Texinfo.  To insert
8729 these characters so they appear in text, you must put an @samp{@@} in
8730 front of these characters to prevent Texinfo from misinterpreting
8731 them.
8733 Do not put braces after any of these commands; they are not
8734 necessary.
8736 @menu
8737 * Inserting An Atsign::         How to insert @samp{@@}.
8738 * Inserting Braces::            How to insert @samp{@{} and @samp{@}}.
8739 @end menu
8741 @node Inserting An Atsign, Inserting Braces, Braces Atsigns, Braces Atsigns
8742 @subsection Inserting @samp{@@} with @@@@
8743 @findex @@ @r{(single @samp{@@})}
8745 @code{@@@@} stands for a single @samp{@@} in either printed or Info
8746 output.
8748 Do not put braces after an @code{@@@@} command.
8750 @node Inserting Braces,  , Inserting An Atsign, Braces Atsigns
8751 @subsection Inserting @samp{@{} and @samp{@}}with @@@{ and @@@}
8752 @findex @{ @r{(single @samp{@{})}
8753 @findex @} @r{(single @samp{@}})}
8755 @code{@@@{} stands for a single @samp{@{} in either printed or Info
8756 output.
8758 @code{@@@}} stands for a single @samp{@}} in either printed or Info
8759 output.
8761 Do not put braces after either an @code{@@@{} or an @code{@@@}}
8762 command.
8765 @node Inserting Space, Inserting Accents, Braces Atsigns, Insertions
8766 @section Inserting Space
8768 @cindex Inserting space
8769 @cindex Spacing, inserting
8770 @cindex Whitespace, inserting
8771 The following sections describe commands that control spacing of various
8772 kinds within and after sentences.
8774 @menu
8775 * Not Ending a Sentence::       Sometimes a . doesn't end a sentence.
8776 * Ending a Sentence::           Sometimes it does.
8777 * Multiple Spaces::             Inserting multiple spaces.
8778 * dmn::                         How to format a dimension.
8779 @end menu
8781 @node Not Ending a Sentence, Ending a Sentence, Inserting Space, Inserting Space
8782 @subsection Not Ending a Sentence
8784 @cindex Not ending a sentence
8785 @cindex Sentence non-ending punctuation
8786 @cindex Periods, inserting
8787 Depending on whether a period or exclamation point or question mark is
8788 inside or at the end of a sentence, less or more space is inserted after
8789 a period in a typeset manual.  Since it is not always possible for
8790 Texinfo to determine when a period ends a sentence and when it is used
8791 in an abbreviation, special commands are needed in some circumstances.
8792 (Usually, Texinfo can guess how to handle periods, so you do not need to
8793 use the special commands; you just enter a period as you would if you
8794 were using a typewriter, which means you put two spaces after the
8795 period, question mark, or exclamation mark that ends a sentence.)
8797 @findex : @r{(suppress widening)}
8798 Use the @code{@@:}@: command after a period, question mark,
8799 exclamation mark, or colon that should not be followed by extra space.
8800 For example, use @code{@@:}@: after periods that end abbreviations
8801 which are not at the ends of sentences.
8803 @need 700
8804 For example,
8806 @example
8807 The s.o.p.@@: has three parts @dots{}
8808 The s.o.p. has three parts @dots{}
8809 @end example
8811 @noindent
8812 @ifinfo
8813 produces
8814 @end ifinfo
8815 @iftex
8816 produces the following.  If you look carefully at this printed output,
8817 you will see a little more whitespace after @samp{s.o.p.} in the second
8818 line.@refill
8819 @end iftex
8821 @quotation
8822 The s.o.p.@: has three parts @dots{}@*
8823 The s.o.p. has three parts @dots{}
8824 @end quotation
8826 @noindent
8827 (Incidentally, @samp{s.o.p.} is an abbreviation for ``Standard Operating
8828 Procedure''.)
8830 @code{@@:} has no effect on the Info output.  Do not put braces after
8831 @code{@@:}.
8834 @node Ending a Sentence, Multiple Spaces, Not Ending a Sentence, Inserting Space
8835 @subsection Ending a Sentence
8837 @cindex Ending a Sentence
8838 @cindex Sentence ending punctuation
8840 @findex .  @r{(end of sentence)}
8841 @findex ! @r{(end of sentence)}
8842 @findex ? @r{(end of sentence)}
8843 Use @code{@@.}@: instead of a period, @code{@@!}@: instead of an
8844 exclamation point, and @code{@@?}@: instead of a question mark at the end
8845 of a sentence that ends with a single capital letter.  Otherwise, @TeX{}
8846 will think the letter is an abbreviation and will not insert the correct
8847 end-of-sentence spacing.  Here is an example:
8849 @example
8850 Give it to M.I.B. and to M.E.W@@.  Also, give it to R.J.C@@.
8851 Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.
8852 @end example
8854 @noindent
8855 @ifinfo
8856 produces
8857 @end ifinfo
8858 @iftex
8859 produces the following.  If you look carefully at this printed output,
8860 you will see a little more whitespace after the @samp{W} in the first
8861 line.
8862 @end iftex
8864 @quotation
8865 Give it to M.I.B. and to M.E.W@.  Also, give it to R.J.C@.@*
8866 Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.
8867 @end quotation
8869 In the Info file output, @code{@@.}@: is equivalent to a simple
8870 @samp{.}; likewise for @code{@@!}@: and @code{@@?}@:.
8872 The meanings of @code{@@:} and @code{@@.}@: in Texinfo are designed to
8873 work well with the Emacs sentence motion commands (@pxref{Sentences,,,
8874 emacs, The GNU Emacs Manual}).  This made it necessary for them to be
8875 incompatible with some other formatting systems that use @@-commands.
8877 Do not put braces after any of these commands.
8880 @node Multiple Spaces, dmn, Ending a Sentence, Inserting Space
8881 @subsection Multiple Spaces
8883 @cindex Multiple spaces
8884 @cindex Whitespace, inserting
8885 @findex (space)
8886 @findex (tab)
8887 @findex (newline)
8889 Ordinarily, @TeX{} collapses multiple whitespace characters (space, tab,
8890 and newline) into a single space.  Info output, on the other hand,
8891 preserves whitespace as you type it, except for changing a newline into
8892 a space; this is why it is important to put two spaces at the end of
8893 sentences in Texinfo documents.
8895 Occasionally, you may want to actually insert several consecutive
8896 spaces, either for purposes of example (what your program does with
8897 multiple spaces as input), or merely for purposes of appearance in
8898 headings or lists.  Texinfo supports three commands:
8899 @code{@@@kbd{SPACE}}, @code{@@@kbd{TAB}}, and @code{@@@kbd{NL}}, all of
8900 which insert a single space into the output.  (Here,
8901 @code{@@@kbd{SPACE}} represents an @samp{@@} character followed by a
8902 space, i.e., @samp{@@ }, and @kbd{TAB} and @kbd{NL} represent the tab
8903 character and end-of-line, i.e., when @samp{@@} is the last character on
8904 a line.)
8906 For example,
8907 @example
8908 Spacey@@ @@ @@ @@
8909 example.
8910 @end example
8912 @noindent produces
8914 @example
8915 Spacey@ @ @ @
8916 example.
8917 @end example
8919 Other possible uses of @code{@@@kbd{SPACE}} have been subsumed by
8920 @code{@@multitable} (@pxref{Multi-column Tables}).
8922 Do not follow any of these commands with braces.
8925 @node dmn,  , Multiple Spaces, Inserting Space
8926 @subsection @code{@@dmn}@{@var{dimension}@}: Format a Dimension
8927 @cindex Thin space between number, dimension
8928 @cindex Dimension formatting
8929 @cindex Format a dimension
8930 @findex dmn
8932 At times, you may want to write @samp{12@dmn{pt}} or
8933 @samp{8.5@dmn{in}} with little or no space between the number and the
8934 abbreviation for the dimension.  You can use the @code{@@dmn} command
8935 to do this.  On seeing the command, @TeX{} inserts just enough space
8936 for proper typesetting; the Info formatting commands insert no space
8937 at all, since the Info file does not require it.@refill
8939 To use the @code{@@dmn} command, write the number and then follow it
8940 immediately, with no intervening space, by @code{@@dmn}, and then by
8941 the dimension within braces.  For example,
8943 @example
8944 A4 paper is 8.27@@dmn@{in@} wide.
8945 @end example
8947 @noindent
8948 produces
8950 @quotation
8951 A4 paper is 8.27@dmn{in} wide.
8952 @end quotation
8954 Not everyone uses this style.  Some people prefer @w{@samp{8.27 in.@@:}}
8955 or @w{@samp{8.27 inches}} to @samp{8.27@@dmn@{in@}} in the Texinfo file.
8956 In these cases, however, the formatters may insert a line break between
8957 the number and the dimension, so use @code{@@w} (@pxref{w}).  Also, if
8958 you write a period after an abbreviation within a sentence, you should
8959 write @samp{@@:} after the period to prevent @TeX{} from inserting extra
8960 whitespace, as shown here.  @xref{Inserting Space}.
8963 @node Inserting Accents, Dots Bullets, Inserting Space, Insertions
8964 @section Inserting Accents
8966 @cindex Inserting accents
8967 @cindex Accents, inserting
8968 @cindex Floating accents, inserting
8970 Here is a table with the commands Texinfo provides for inserting
8971 floating accents.  The commands with non-alphabetic names do not take
8972 braces around their argument (which is taken to be the next character).
8973 (Exception: @code{@@,} @emph{does} take braces around its argument.)
8974 This is so as to make the source as convenient to type and read as
8975 possible, since accented characters are very common in some languages.
8977 @findex "
8978 @cindex Umlaut accent
8979 @findex '
8980 @cindex Acute accent
8981 @findex =
8982 @cindex Macron accent
8983 @findex ^
8984 @cindex Circumflex accent
8985 @findex `
8986 @cindex Grave accent
8987 @findex ~
8988 @cindex Tilde accent
8989 @findex ,
8990 @cindex Cedilla accent
8991 @findex dotaccent
8992 @cindex Dot accent
8993 @findex H
8994 @cindex Hungariam umlaut accent
8995 @findex ringaccent
8996 @cindex Ring accent
8997 @findex tieaccent
8998 @cindex Tie-after accent
8999 @findex u
9000 @cindex Breve accent
9001 @findex ubaraccent
9002 @cindex Underbar accent
9003 @findex udotaccent
9004 @cindex Underdot accent
9005 @findex v
9006 @cindex Check accent
9007 @multitable {@@questiondown@{@}} {Output} {macron/overbar accent}
9008 @item Command               @tab Output         @tab What
9009 @item @t{@@"o}              @tab @"o            @tab umlaut accent
9010 @item @t{@@'o}              @tab @'o            @tab acute accent
9011 @item @t{@@,@{c@}}          @tab @,{c}          @tab cedilla accent
9012 @item @t{@@=o}              @tab @=o            @tab macron/overbar accent
9013 @item @t{@@^o}              @tab @^o            @tab circumflex accent
9014 @item @t{@@`o}              @tab @`o            @tab grave accent
9015 @item @t{@@~o}              @tab @~o            @tab tilde accent
9016 @item @t{@@dotaccent@{o@}}  @tab @dotaccent{o}  @tab overdot accent
9017 @item @t{@@H@{o@}}          @tab @H{o}          @tab long Hungarian umlaut
9018 @item @t{@@ringaccent@{o@}} @tab @ringaccent{o} @tab ring accent
9019 @item @t{@@tieaccent@{oo@}} @tab @tieaccent{oo} @tab tie-after accent
9020 @item @t{@@u@{o@}}          @tab @u{o}          @tab breve accent
9021 @item @t{@@ubaraccent@{o@}} @tab @ubaraccent{o} @tab underbar accent
9022 @item @t{@@udotaccent@{o@}} @tab @udotaccent{o} @tab underdot accent
9023 @item @t{@@v@{o@}}          @tab @v{o}          @tab hacek or check accent
9024 @end multitable
9026 This table lists the Texinfo commands for inserting other characters
9027 commonly used in languages other than English.
9029 @findex questiondown
9030 @cindex @questiondown{}
9031 @findex exclamdown
9032 @cindex @exclamdown{}
9033 @findex aa
9034 @cindex @aa{}
9035 @findex AA
9036 @cindex @AA{}
9037 @findex ae
9038 @cindex @ae{}
9039 @findex AE
9040 @cindex @AE{}
9041 @findex dotless
9042 @cindex @dotless{i}
9043 @cindex @dotless{j}
9044 @cindex Dotless i, j
9045 @findex l
9046 @cindex @l{}
9047 @findex L
9048 @cindex @L{}
9049 @findex o
9050 @cindex @o{}
9051 @findex O
9052 @cindex @O{}
9053 @findex oe
9054 @cindex @oe{}
9055 @findex OE
9056 @cindex @OE{}
9057 @findex ss
9058 @cindex @ss{}
9059 @cindex Es-zet
9060 @cindex Sharp S
9061 @cindex German S
9062 @multitable {@@questiondown@{@}} {oe,OE} {es-zet or sharp S}
9063 @item @t{@@exclamdown@{@}}   @tab @exclamdown{}   @tab upside-down !
9064 @item @t{@@questiondown@{@}} @tab @questiondown{} @tab upside-down ?
9065 @item @t{@@aa@{@},@@AA@{@}}  @tab @aa{},@AA{}     @tab A,a with circle
9066 @item @t{@@ae@{@},@@AE@{@}}  @tab @ae{},@AE{}     @tab ae,AE ligatures
9067 @item @t{@@dotless@{i@}}     @tab @dotless{i}     @tab dotless i
9068 @item @t{@@dotless@{j@}}     @tab @dotless{j}     @tab dotless j
9069 @item @t{@@l@{@},@@L@{@}}    @tab @l{},@L{}       @tab suppressed-L,l
9070 @item @t{@@o@{@},@@O@{@}}    @tab @o{},@O{}       @tab O,o with slash
9071 @item @t{@@oe@{@},@@OE@{@}}  @tab @oe{},@OE{}     @tab OE,oe ligatures
9072 @item @t{@@ss@{@}}           @tab @ss{}           @tab es-zet or sharp S
9073 @end multitable
9076 @node Dots Bullets, TeX and copyright, Inserting Accents, Insertions
9077 @section Inserting Ellipsis, Dots, and Bullets
9078 @cindex Dots, inserting
9079 @cindex Bullets, inserting
9080 @cindex Ellipsis, inserting
9081 @cindex Inserting ellipsis
9082 @cindex Inserting dots
9083 @cindex Special typesetting commands
9084 @cindex Typesetting commands for dots, etc.
9086 An @dfn{ellipsis} (a line of dots) is not typeset as a string of
9087 periods, so a special command is used for ellipsis in Texinfo.  The
9088 @code{@@bullet} command is special, too.  Each of these commands is
9089 followed by a pair of braces, @samp{@{@}}, without any whitespace
9090 between the name of the command and the braces.  (You need to use braces
9091 with these commands because you can use them next to other text; without
9092 the braces, the formatters would be confused.  @xref{Command Syntax, ,
9093 @@-Command Syntax}, for further information.)@refill
9095 @menu
9096 * dots::                        How to insert dots @dots{}
9097 * bullet::                      How to insert a bullet.
9098 @end menu
9101 @node dots, bullet, Dots Bullets, Dots Bullets
9102 @subsection @code{@@dots}@{@} (@dots{})
9103 @findex dots
9104 @cindex Inserting dots
9105 @cindex Dots, inserting
9107 Use the @code{@@dots@{@}} command to generate an ellipsis, which is
9108 three dots in a row, appropriately spaced, like this: `@dots{}'.  Do
9109 not simply write three periods in the input file; that would work for
9110 the Info file output, but would produce the wrong amount of space
9111 between the periods in the printed manual.
9113 Similarly, the @code{@@enddots@{@}} command generates an
9114 end-of-sentence ellipsis (four dots) @enddots{}
9116 @iftex
9117 Here is an ellipsis: @dots{}
9118 Here are three periods in a row: ...
9120 In printed output, the three periods in a row are closer together than
9121 the dots in the ellipsis.
9122 @end iftex
9125 @node bullet,  , dots, Dots Bullets
9126 @subsection @code{@@bullet}@{@} (@bullet{})
9127 @findex bullet
9129 Use the @code{@@bullet@{@}} command to generate a large round dot, or
9130 the closest possible thing to one.  In Info, an asterisk is used.@refill
9132 Here is a bullet: @bullet{}
9134 When you use @code{@@bullet} in @code{@@itemize}, you do not need to
9135 type the braces, because @code{@@itemize} supplies them.
9136 (@xref{itemize, , @code{@@itemize}}.)@refill
9139 @node TeX and copyright, pounds, Dots Bullets, Insertions
9140 @section Inserting @TeX{} and the Copyright Symbol
9142 The logo `@TeX{}' is typeset in a special fashion and it needs an
9143 @@-command.  The copyright symbol, `@copyright{}', is also special.
9144 Each of these commands is followed by a pair of braces, @samp{@{@}},
9145 without any whitespace between the name of the command and the
9146 braces.@refill
9148 @menu
9149 * tex::                         How to insert the @TeX{} logo.
9150 * copyright symbol::            How to use @code{@@copyright}@{@}.
9151 @end menu
9154 @node tex, copyright symbol, TeX and copyright, TeX and copyright
9155 @subsection @code{@@TeX}@{@} (@TeX{})
9156 @findex tex (command)
9158 Use the @code{@@TeX@{@}} command to generate `@TeX{}'.  In a printed
9159 manual, this is a special logo that is different from three ordinary
9160 letters.  In Info, it just looks like @samp{TeX}.  The
9161 @code{@@TeX@{@}} command is unique among Texinfo commands in that the
9162 @kbd{T} and the @kbd{X} are in upper case.@refill
9165 @node copyright symbol,  , tex, TeX and copyright
9166 @subsection @code{@@copyright}@{@} (@copyright{})
9167 @findex copyright
9169 Use the @code{@@copyright@{@}} command to generate `@copyright{}'.  In
9170 a printed manual, this is a @samp{c} inside a circle, and in Info,
9171 this is @samp{(C)}.@refill
9174 @node pounds, minus, TeX and copyright, Insertions
9175 @section @code{@@pounds}@{@} (@pounds{}): Pounds Sterling
9176 @findex pounds
9178 Use the @code{@@pounds@{@}} command to generate `@pounds{}'.  In a
9179 printed manual, this is the symbol for the currency pounds sterling.
9180 In Info, it is a @samp{#}.  Other currency symbols are unfortunately not
9181 available.
9184 @node minus, math, pounds, Insertions
9185 @section @code{@@minus}@{@} (@minus{}): Inserting a Minus Sign
9186 @findex minus
9188 Use the @code{@@minus@{@}} command to generate a minus sign.  In a
9189 fixed-width font, this is a single hyphen, but in a proportional font,
9190 the symbol is the customary length for a minus sign---a little longer
9191 than a hyphen, shorter than an em-dash:
9193 @display
9194 @samp{@minus{}} is a minus sign generated with @samp{@@minus@{@}},
9196 `-' is a hyphen generated with the character @samp{-},
9198 `---' is an em-dash for text.
9199 @end display
9201 @noindent
9202 In the fixed-width font used by Info, @code{@@minus@{@}} is the same
9203 as a hyphen.
9205 You should not use @code{@@minus@{@}} inside @code{@@code} or
9206 @code{@@example} because the width distinction is not made in the
9207 fixed-width font they use.
9209 When you use @code{@@minus} to specify the mark beginning each entry in
9210 an itemized list, you do not need to type the braces
9211 (@pxref{itemize, , @code{@@itemize}}.)
9214 @node math, Glyphs, minus, Insertions
9215 @section @code{@@math}: Inserting Mathematical Expressions
9216 @findex math
9217 @cindex Mathematical expressions
9219 You can write a short mathematical expression with the @code{@@math}
9220 command.  Write the mathematical expression between braces, like this:
9222 @example
9223 @@math@{(a + b)(a + b) = a^2 + 2ab + b^2@}
9224 @end example
9226 @iftex
9227 @need 1000
9228 @noindent
9229 This produces the following in @TeX{}:
9231 @display
9232 @math{(a + b)(a + b) = a^2 + 2ab + b^2}
9233 @end display
9235 @noindent
9236 and the following in Info:
9237 @end iftex
9238 @ifinfo
9239 @noindent
9240 This produces the following in Info:
9241 @end ifinfo
9243 @example
9244 (a + b)(a + b) = a^2 + 2ab + b^2
9245 @end example
9247 Thus, the @code{@@math} command has no effect on the Info output.
9249 For complex mathematical expressions, you can also use @TeX{} directly
9250 (@pxref{Raw Formatter Commands}).  When you use @TeX{} directly,
9251 remember to write the mathematical expression between one or two
9252 @samp{$} (dollar-signs) as appropriate.
9255 @node Glyphs, Images, math, Insertions
9256 @section Glyphs for Examples
9257 @cindex Glyphs
9259 In Texinfo, code is often illustrated in examples that are delimited
9260 by @code{@@example} and @code{@@end example}, or by @code{@@lisp} and
9261 @code{@@end lisp}.  In such examples, you can indicate the results of
9262 evaluation or an expansion using @samp{@result{}} or
9263 @samp{@expansion{}}.  Likewise, there are commands to insert glyphs
9264 to indicate
9265 printed output, error messages, equivalence of expressions, and the
9266 location of point.@refill
9268 The glyph-insertion commands do not need to be used within an example, but
9269 most often they are.  Every  glyph-insertion command is followed by a pair of
9270 left- and right-hand braces.@refill
9272 @menu
9273 * Glyphs Summary::              
9274 * result::                      How to show the result of expression.
9275 * expansion::                   How to indicate an expansion.
9276 * Print Glyph::                 How to indicate printed output.
9277 * Error Glyph::                 How to indicate an error message.
9278 * Equivalence::                 How to indicate equivalence.
9279 * Point Glyph::                 How to indicate the location of point.
9280 @end menu
9282 @node Glyphs Summary, result, Glyphs, Glyphs
9283 @ifinfo
9284 @subheading Glyphs Summary
9286 Here are the different glyph commands:@refill
9287 @end ifinfo
9289 @table @asis
9290 @item @result{}
9291 @code{@@result@{@}} points to the result of an expression.@refill
9293 @item @expansion{}
9294 @code{@@expansion@{@}} shows the results of a macro expansion.@refill
9296 @item @print{}
9297 @code{@@print@{@}} indicates printed output.@refill
9299 @item @error{}
9300 @code{@@error@{@}} indicates that the following text is an error
9301 message.@refill
9303 @item @equiv{}
9304 @code{@@equiv@{@}} indicates the exact equivalence of two forms.@refill
9306 @item @point{}
9307 @code{@@point@{@}} shows the location of point.@refill
9308 @end table
9311 @menu
9312 * result::                      
9313 * expansion::                   
9314 * Print Glyph::                 
9315 * Error Glyph::                 
9316 * Equivalence::                 
9317 * Point Glyph::                 
9318 @end menu
9320 @node result, expansion, Glyphs Summary, Glyphs
9321 @subsection @code{@@result@{@}} (@result{}): Indicating Evaluation
9322 @cindex Result of an expression
9323 @cindex Indicating evaluation
9324 @cindex Evaluation glyph
9325 @cindex Value of an expression, indicating
9327 Use the @code{@@result@{@}} command to indicate the result of
9328 evaluating an expression.@refill
9330 @iftex
9331 The @code{@@result@{@}} command is displayed as @samp{=>} in Info and
9332 as @samp{@result{}} in the printed output.
9333 @end iftex
9334 @ifinfo
9335 The @code{@@result@{@}} command is displayed as @samp{@result{}} in Info
9336 and as a double stemmed arrow in the printed output.@refill
9337 @end ifinfo
9339 Thus, the following,
9341 @lisp
9342 (cdr '(1 2 3))
9343      @result{} (2 3)
9344 @end lisp
9346 @noindent
9347 may be read as ``@code{(cdr '(1 2 3))} evaluates to @code{(2 3)}''.
9350 @node expansion, Print Glyph, result, Glyphs
9351 @subsection @code{@@expansion@{@}} (@expansion{}): Indicating an Expansion
9352 @cindex Expansion, indicating it
9354 When an expression is a macro call, it expands into a new expression.
9355 You can indicate the result of the expansion with the
9356 @code{@@expansion@{@}} command.@refill
9358 @iftex
9359 The @code{@@expansion@{@}} command is displayed as @samp{==>} in Info and
9360 as @samp{@expansion{}} in the printed output.
9361 @end iftex
9362 @ifinfo
9363 The @code{@@expansion@{@}} command is displayed as @samp{@expansion{}}
9364 in Info and as a long arrow with a flat base in the printed output.@refill
9365 @end ifinfo
9367 @need 700
9368 For example, the following
9370 @example
9371 @group
9372 @@lisp
9373 (third '(a b c))
9374      @@expansion@{@} (car (cdr (cdr '(a b c))))
9375      @@result@{@} c
9376 @@end lisp
9377 @end group
9378 @end example
9380 @noindent
9381 produces
9383 @lisp
9384 @group
9385 (third '(a b c))
9386      @expansion{} (car (cdr (cdr '(a b c))))
9387      @result{} c
9388 @end group
9389 @end lisp
9391 @noindent
9392 which may be read as:
9394 @quotation
9395 @code{(third '(a b c))} expands to @code{(car (cdr (cdr '(a b c))))};
9396 the result of evaluating the expression is @code{c}.
9397 @end quotation
9399 @noindent
9400 Often, as in this case, an example looks better if the
9401 @code{@@expansion@{@}} and @code{@@result@{@}} commands are indented
9402 five spaces.@refill
9405 @node Print Glyph, Error Glyph, expansion, Glyphs
9406 @subsection @code{@@print@{@}} (@print{}): Indicating Printed Output
9407 @cindex Printed output, indicating it
9409 Sometimes an expression will print output during its execution.  You
9410 can indicate the printed output with the @code{@@print@{@}} command.@refill
9412 @iftex
9413 The @code{@@print@{@}} command is displayed as @samp{-|} in Info and
9414 as @samp{@print{}} in the printed output.
9415 @end iftex
9416 @ifinfo
9417 The @code{@@print@{@}} command is displayed as @samp{@print{}} in Info
9418 and similarly, as a horizontal dash butting against a vertical bar, in
9419 the printed output.@refill
9420 @end ifinfo
9422 In the following example, the printed text is indicated with
9423 @samp{@print{}}, and the value of the expression follows on the
9424 last line.@refill
9426 @lisp
9427 @group
9428 (progn (print 'foo) (print 'bar))
9429      @print{} foo
9430      @print{} bar
9431      @result{} bar
9432 @end group
9433 @end lisp
9435 @noindent
9436 In a Texinfo source file, this example is written as follows:
9438 @lisp
9439 @group
9440 @@lisp
9441 (progn (print 'foo) (print 'bar))
9442      @@print@{@} foo
9443      @@print@{@} bar
9444      @@result@{@} bar
9445 @@end lisp
9446 @end group
9447 @end lisp
9450 @node Error Glyph, Equivalence, Print Glyph, Glyphs
9451 @subsection @code{@@error@{@}} (@error{}): Indicating an Error Message
9452 @cindex Error message, indicating it
9454 A piece of code may cause an error when you evaluate it.  You can
9455 designate the error message with the @code{@@error@{@}} command.@refill
9457 @iftex
9458 The @code{@@error@{@}} command is displayed as @samp{error-->} in Info
9459 and as @samp{@error{}} in the printed output.
9460 @end iftex
9461 @ifinfo
9462 The @code{@@error@{@}} command is displayed as @samp{@error{}} in Info
9463 and as the word `error' in a box in the printed output.@refill
9464 @end ifinfo
9466 @need 700
9467 Thus,
9469 @example
9470 @@lisp
9471 (+ 23 'x)
9472 @@error@{@} Wrong type argument: integer-or-marker-p, x
9473 @@end lisp
9474 @end example
9476 @noindent
9477 produces
9479 @lisp
9480 (+ 23 'x)
9481 @error{} Wrong type argument: integer-or-marker-p, x
9482 @end lisp
9484 @noindent
9485 This indicates that the following error message is printed
9486 when you evaluate the expression:
9488 @lisp
9489 Wrong type argument: integer-or-marker-p, x
9490 @end lisp
9492 @samp{@error{}} itself is not part of the error message.
9495 @node Equivalence, Point Glyph, Error Glyph, Glyphs
9496 @subsection @code{@@equiv@{@}} (@equiv{}): Indicating Equivalence
9497 @cindex Equivalence, indicating it
9499 Sometimes two expressions produce identical results.  You can indicate the
9500 exact equivalence of two forms with the @code{@@equiv@{@}} command.@refill
9502 @iftex
9503 The @code{@@equiv@{@}} command is displayed as @samp{==} in Info and
9504 as @samp{@equiv{}} in the printed output.
9505 @end iftex
9506 @ifinfo
9507 The @code{@@equiv@{@}} command is displayed as @samp{@equiv{}} in Info
9508 and as a three parallel horizontal lines in the printed output.@refill
9509 @end ifinfo
9511 Thus,
9513 @example
9514 @@lisp
9515 (make-sparse-keymap) @@equiv@{@} (list 'keymap)
9516 @@end lisp
9517 @end example
9519 @noindent
9520 produces
9522 @lisp
9523 (make-sparse-keymap) @equiv{} (list 'keymap)
9524 @end lisp
9526 @noindent
9527 This indicates that evaluating @code{(make-sparse-keymap)} produces
9528 identical results to evaluating @code{(list 'keymap)}.
9531 @node Point Glyph,  , Equivalence, Glyphs
9532 @subsection @code{@@point@{@}} (@point{}): Indicating Point in a Buffer
9533 @cindex Point, indicating it in a buffer
9535 Sometimes you need to show an example of text in an Emacs buffer.  In
9536 such examples, the convention is to include the entire contents of the
9537 buffer in question between two lines of dashes containing the buffer
9538 name.@refill
9540 You can use the @samp{@@point@{@}} command to show the location of point
9541 in the text in the buffer.  (The symbol for point, of course, is not
9542 part of the text in the buffer; it indicates the place @emph{between}
9543 two characters where point is located.)@refill
9545 @iftex
9546 The @code{@@point@{@}} command is displayed as @samp{-!-} in Info and
9547 as @samp{@point{}} in the printed output.
9548 @end iftex
9549 @ifinfo
9550 The @code{@@point@{@}} command is displayed as @samp{@point{}} in Info
9551 and as a small five pointed star in the printed output.@refill
9552 @end ifinfo
9554 The following example shows the contents of buffer @file{foo} before
9555 and after evaluating a Lisp command to insert the word @code{changed}.@refill
9557 @example
9558 @group
9559 ---------- Buffer: foo ----------
9560 This is the @point{}contents of foo.
9561 ---------- Buffer: foo ----------
9563 @end group
9564 @end example
9566 @example
9567 @group
9568 (insert "changed ")
9569      @result{} nil
9570 ---------- Buffer: foo ----------
9571 This is the changed @point{}contents of foo.
9572 ---------- Buffer: foo ----------
9574 @end group
9575 @end example
9577 In a Texinfo source file, the example is written like this:@refill
9579 @example
9580 @@example
9581 ---------- Buffer: foo ----------
9582 This is the @@point@{@}contents of foo.
9583 ---------- Buffer: foo ----------
9585 (insert "changed ")
9586      @@result@{@} nil
9587 ---------- Buffer: foo ----------
9588 This is the changed @@point@{@}contents of foo.
9589 ---------- Buffer: foo ----------
9590 @@end example
9591 @end example
9594 @c this should be described with figures when we have them
9595 @c perhaps in the quotation/example chapter.
9596 @node Images,  , Glyphs, Insertions
9597 @section Inserting Images
9599 @cindex Images, inserting
9600 @cindex Pictures, inserting
9601 @findex image
9603 You can insert an image in an external file with the @code{@@image}
9604 command:
9606 @example
9607 @@image@{@var{filename}, @r{[}@var{width}@r{]}, @r{[}@var{height}@r{]}@}
9608 @end example
9610 @cindex Formats for images
9611 @cindex Image formats
9612 The @var{filename} argument is mandatory, and must not have an
9613 extension, because the different processors support different formats:
9614 @TeX{} reads the file @file{@var{filename}.eps} (Encapsulated PostScript
9615 format); @code{makeinfo} uses @file{@var{filename}.txt} verbatim for
9616 Info output (more or less as if it was an @code{@@example}).  HTML
9617 output requires @file{@var{filename}.jpg}.
9619 @cindex Width of images
9620 @cindex Height of images
9621 @cindex Aspect ratio of images
9622 @cindex Distorting images
9623 The optional @var{width} and @var{height} arguments specify the size to
9624 scale the image to (they are ignored for Info output).  If they are both
9625 specified, the image is presented in its natural size (given in the
9626 file); if only one is specified, the other is scaled proportionately;
9627 and if both are specified, both are respected, thus possibly distorting
9628 the original image by changing its aspect ratio.
9630 @cindex Dimensions and image sizes
9631 The @var{width} and @var{height} may be specified using any valid @TeX{}
9632 dimension, namely:
9634 @table @asis
9635 @item pt
9636 @cindex Points (dimension)
9637 point (72.27pt = 1in)
9638 @item pc
9639 @cindex Picas
9640 pica (1pc = 12pt)
9641 @item bp
9642 @cindex Big points
9643 big point (72bp = 1in)
9644 @item in
9645 @cindex Inches
9646 inch
9647 @item cm
9648 @cindex Centimeters
9649 centimeter (2.54cm = 1in)
9650 @item mm
9651 @cindex Millimeters
9652 millimeter (10mm = 1cm)
9653 @item dd
9654 @cindex Did@^ot points
9655 did@^ot point (1157dd = 1238pt)
9656 @item cc
9657 @cindex Ciceros
9658 cicero (1cc = 12dd)
9659 @item sp
9660 @cindex Scaled points
9661 scaled point (65536sp = 1pt)
9662 @end table
9664 @pindex ridt.eps
9665 For example, the following will scale a file @file{ridt.eps} to one
9666 inch vertically, with the width scaled proportionately:
9668 @example
9669 @@image@{ridt,,1in@}
9670 @end example
9672 @pindex epsf.tex
9673 For @code{@@image} to work with @TeX{}, the file @file{epsf.tex} must be
9674 installed somewhere that @TeX{} can find it.  This file is included in
9675 the Texinfo distribution and is available from
9676 @uref{ftp://ftp.tug.org/tex/epsf.tex}.
9679 @node Breaks, Definition Commands, Insertions, Top
9680 @chapter Making and Preventing Breaks
9681 @cindex Making line and page breaks
9682 @cindex Preventing line and page breaks
9684 Usually, a Texinfo file is processed both by @TeX{} and by one of the
9685 Info formatting commands.  Line, paragraph, or page breaks sometimes
9686 occur in the `wrong' place in one or other form of output.  You must
9687 ensure that text looks right both in the printed manual and in the
9688 Info file.@refill
9690 For example, in a printed manual, page breaks may occur awkwardly in
9691 the middle of an example; to prevent this, you can hold text together
9692 using a grouping command that keeps the text from being split across
9693 two pages.  Conversely, you may want to force a page break where none
9694 would occur normally.  Fortunately, problems like these do not often
9695 arise.  When they do, use the break, break prevention, or pagination
9696 commands.@refill
9698 @menu
9699 * Break Commands::              Cause and prevent splits.
9700 * Line Breaks::                 How to force a single line to use two lines.
9701 * - and hyphenation::           How to tell TeX about hyphenation points.
9702 * w::                           How to prevent unwanted line breaks.
9703 * sp::                          How to insert blank lines.
9704 * page::                        How to force the start of a new page.
9705 * group::                       How to prevent unwanted page breaks.
9706 * need::                        Another way to prevent unwanted page breaks.
9707 @end menu
9709 @ifinfo
9710 @node Break Commands, Line Breaks, Breaks, Breaks
9711 @heading The Break Commands
9712 @end ifinfo
9713 @iftex
9714 @sp 1
9715 @end iftex
9717 The break commands create or allow line and paragraph breaks:@refill
9719 @table @code
9720 @item @@*
9721 Force a line break.
9723 @item @@sp @var{n}
9724 Skip @var{n} blank lines.@refill
9726 @item @@-
9727 Insert a discretionary hyphen.
9729 @item @@hyphenation@{@var{hy-phen-a-ted words}@}
9730 Define hyphen points in @var{hy-phen-a-ted words}.
9731 @end table
9733 The line-break-prevention command holds text together all on one
9734 line:@refill
9736 @table @code
9737 @item @@w@{@var{text}@}
9738 Prevent @var{text} from being split and hyphenated across two lines.@refill
9739 @end table
9740 @iftex
9741 @sp 1
9742 @end iftex
9744 The pagination commands apply only to printed output, since Info
9745 files do not have pages.@refill
9747 @table @code
9748 @item @@page
9749 Start a new page in the printed manual.@refill
9751 @item @@group
9752 Hold text together that must appear on one printed page.@refill
9754 @item @@need @var{mils}
9755 Start a new printed page if not enough space on this one.@refill
9756 @end table
9758 @node Line Breaks, - and hyphenation, Break Commands, Breaks
9759 @comment  node-name,  next,  previous,  up
9760 @section @code{@@*}: Generate Line Breaks
9761 @findex * @r{(force line break)}
9762 @cindex Line breaks
9763 @cindex Breaks in a line
9765 The @code{@@*} command forces a line break in both the printed manual and
9766 in Info.@refill
9768 @need 700
9769 For example,
9771 @example
9772 This line @@* is broken @@*in two places.
9773 @end example
9775 @noindent
9776 produces
9778 @example
9779 @group
9780 This line
9781  is broken
9782 in two places.
9783 @end group
9784 @end example
9786 @noindent
9787 (Note that the space after the first @code{@@*} command is faithfully
9788 carried down to the next line.)@refill
9790 @need 800
9791 The @code{@@*} command is often used in a file's copyright page:@refill
9793 @example
9794 @group
9795 This is edition 2.0 of the Texinfo documentation,@@*
9796 and is for @dots{}
9797 @end group
9798 @end example
9800 @noindent
9801 In this case, the @code{@@*} command keeps @TeX{} from stretching the
9802 line across the whole page in an ugly manner.@refill
9804 @quotation
9805 @strong{Please note:} Do not write braces after an @code{@@*} command;
9806 they are not needed.@refill
9808 Do not write an @code{@@refill} command at the end of a paragraph
9809 containing an @code{@@*} command; it will cause the paragraph to be
9810 refilled after the line break occurs, negating the effect of the line
9811 break.@refill
9812 @end quotation
9814 @node - and hyphenation, w, Line Breaks, Breaks
9815 @section @code{@@-} and @code{@@hyphenation}: Helping @TeX{} hyphenate
9817 @findex -
9818 @findex hyphenation
9819 @cindex Hyphenation, helping @TeX{} do
9820 @cindex Fine-tuning, and hyphenation
9822 Although @TeX{}'s hyphenation algorithm is generally pretty good, it
9823 does miss useful hyphenation points from time to time.  (Or, far more
9824 rarely, insert an incorrect hyphenation.)  So, for documents with an
9825 unusual vocabulary or when fine-tuning for a printed edition, you may
9826 wish to help @TeX{} out.  Texinfo supports two commands for this:
9828 @table @code
9829 @item @@-
9830 Insert a discretionary hyphen, i.e., a place where @TeX{} can (but does
9831 not have to) hyphenate.  This is especially useful when you notice
9832 an overfull hbox is due to @TeX{} missing a hyphenation (@pxref{Overfull
9833 hboxes}).  @TeX{} will not insert any hyphenation points in a word
9834 containing @code{@@-}.
9836 @item @@hyphenation@{@var{hy-phen-a-ted words}@}
9837 Tell @TeX{} how to hyphenate @var{hy-phen-a-ted words}.  As shown, you
9838 put a @samp{-} at each hyphenation point.  For example:
9839 @example
9840 @@hyphenation@{man-u-script man-u-scripts@}
9841 @end example
9842 @noindent @TeX{} only uses the specified hyphenation points when the
9843 words match exactly, so give all necessary variants.
9844 @end table
9846 Info output is not hyphenated, so these commands have no effect there.
9848 @node w, sp, - and hyphenation, Breaks
9849 @comment  node-name,  next,  previous,  up
9850 @section @code{@@w}@{@var{text}@}: Prevent Line Breaks
9851 @findex w @r{(prevent line break)}
9852 @cindex Line breaks, preventing
9853 @cindex Hyphenation, preventing
9855 @code{@@w@{@var{text}@}} outputs @var{text} and prohibits line breaks
9856 within @var{text}.@refill
9858 You can use the @code{@@w} command to prevent @TeX{} from automatically
9859 hyphenating a long name or phrase that happens to fall near the end of a
9860 line.@refill
9862 @example
9863 You can copy GNU software from @@w@{@@samp@{ftp.gnu.ai.mit.edu@}@}.
9864 @end example
9866 @noindent
9867 produces
9869 @quotation
9870 You can copy GNU software from @w{@samp{ftp.gnu.ai.mit.edu}}.
9871 @end quotation
9873 @quotation
9874 @strong{Caution:} Do not write an @code{@@refill} command at the end
9875 of a paragraph containing an @code{@@w} command; it will cause the
9876 paragraph to be refilled and may thereby negate the effect of the
9877 @code{@@w} command.@refill
9878 @end quotation
9880 @node sp, page, w, Breaks
9881 @comment  node-name,  next,  previous,  up
9882 @section @code{@@sp} @var{n}: Insert Blank Lines
9883 @findex sp @r{(line spacing)}
9884 @cindex Spaces (blank lines)
9885 @cindex Blank lines
9886 @cindex Line spacing
9888 A line beginning with and containing only @code{@@sp @var{n}}
9889 generates @var{n} blank lines of space in both the printed manual and
9890 the Info file.  @code{@@sp} also forces a paragraph break.  For
9891 example,@refill
9893 @example
9894 @@sp 2
9895 @end example
9897 @noindent
9898 generates two blank lines.
9900 The @code{@@sp} command is most often used in the title page.@refill
9902 @ignore
9903 @c node br, page, sp, Breaks
9904 @comment  node-name,  next,  previous,  up
9905 @c section @code{@@br}: Generate Paragraph Breaks
9906 @findex br @r{(paragraph breaks)}
9907 @cindex Paragraph breaks
9908 @cindex Breaks in a paragraph
9910 The @code{@@br} command forces a paragraph break.  It inserts a blank
9911 line.  You can use the command within or at the end of a line.  If
9912 used within a line, the @code{@@br@{@}} command must be followed by
9913 left and right braces (as shown here) to mark the end of the
9914 command.@refill
9916 @need 700
9917 For example,
9919 @example
9920 @group
9921 This line @@br@{@}contains and is ended by paragraph breaks@@br
9922 and is followed by another line.
9923 @end group
9924 @end example
9926 @noindent
9927 produces
9929 @example
9930 @group
9931 This line
9933 contains and is ended by paragraph breaks
9935 and is followed by another line.
9936 @end group
9937 @end example
9939 The @code{@@br} command is seldom used.
9940 @end ignore
9942 @node page, group, sp, Breaks
9943 @comment  node-name,  next,  previous,  up
9944 @section @code{@@page}: Start a New Page
9945 @cindex Page breaks
9946 @findex page
9948 A line containing only @code{@@page} starts a new page in a printed
9949 manual.  The command has no effect on Info files since they are not
9950 paginated.  An @code{@@page} command is often used in the @code{@@titlepage}
9951 section of a Texinfo file to start the copyright page.@refill
9953 @node group, need, page, Breaks
9954 @comment  node-name,  next,  previous,  up
9955 @section @code{@@group}: Prevent Page Breaks
9956 @cindex Group (hold text together vertically)
9957 @cindex Holding text together vertically
9958 @cindex Vertically holding text together
9959 @findex group
9961 The @code{@@group} command (on a line by itself) is used inside an
9962 @code{@@example} or similar construct to begin an unsplittable vertical
9963 group, which will appear entirely on one page in the printed output.
9964 The group is terminated by a line containing only @code{@@end group}.
9965 These two lines produce no output of their own, and in the Info file
9966 output they have no effect at all.@refill
9968 @c Once said that these environments
9969 @c turn off vertical spacing between ``paragraphs''.
9970 @c Also, quotation used to work, but doesn't in texinfo-2.72
9971 Although @code{@@group} would make sense conceptually in a wide
9972 variety of contexts, its current implementation works reliably only
9973 within @code{@@example} and variants, and within @code{@@display},
9974 @code{@@format}, @code{@@flushleft} and @code{@@flushright}.
9975 @xref{Quotations and Examples}.  (What all these commands have in
9976 common is that each line of input produces a line of output.)  In
9977 other contexts, @code{@@group} can cause anomalous vertical
9978 spacing.@refill
9980 @need 750
9981 This formatting requirement means that you should write:
9983 @example
9984 @group
9985 @@example
9986 @@group
9987 @dots{}
9988 @@end group
9989 @@end example
9990 @end group
9991 @end example
9993 @noindent
9994 with the @code{@@group} and @code{@@end group} commands inside the
9995 @code{@@example} and @code{@@end example} commands.
9997 The @code{@@group} command is most often used to hold an example
9998 together on one page.  In this Texinfo manual, more than 100 examples
9999 contain text that is enclosed between @code{@@group} and @code{@@end
10000 group}.
10002 If you forget to end a group, you may get strange and unfathomable
10003 error messages when you run @TeX{}.  This is because @TeX{} keeps
10004 trying to put the rest of the Texinfo file onto the one page and does
10005 not start to generate error messages until it has processed
10006 considerable text.  It is a good rule of thumb to look for a missing
10007 @code{@@end group} if you get incomprehensible error messages in
10008 @TeX{}.@refill
10010 @node need,  , group, Breaks
10011 @comment  node-name,  next,  previous,  up
10012 @section @code{@@need @var{mils}}: Prevent Page Breaks
10013 @cindex Need space at page bottom
10014 @findex need
10016 A line containing only @code{@@need @var{n}} starts
10017 a new page in a printed manual if fewer than @var{n} mils (thousandths
10018 of an inch) remain on the current page.  Do not use
10019 braces around the argument @var{n}.  The @code{@@need} command has no
10020 effect on Info files since they are not paginated.@refill
10022 @need 800
10023 This paragraph is preceded by an @code{@@need} command that tells
10024 @TeX{} to start a new page if fewer than 800 mils (eight-tenths
10025 inch) remain on the page.  It looks like this:@refill
10027 @example
10028 @group
10029 @@need 800
10030 This paragraph is preceded by @dots{}
10031 @end group
10032 @end example
10034 The @code{@@need} command is useful for preventing orphans (single
10035 lines at the bottoms of printed pages).@refill
10037 @node Definition Commands, Footnotes, Breaks, Top
10038 @chapter Definition Commands
10039 @cindex Definition commands
10041 The @code{@@deffn} command and the other @dfn{definition commands}
10042 enable you to describe functions, variables, macros, commands, user
10043 options, special forms and other such artifacts in a uniform
10044 format.@refill
10046 In the Info file, a definition causes the entity
10047 category---`Function', `Variable', or whatever---to appear at the
10048 beginning of the first line of the definition, followed by the
10049 entity's name and arguments.  In the printed manual, the command
10050 causes @TeX{} to print the entity's name and its arguments on the left
10051 margin and print the category next to the right margin.  In both
10052 output formats, the body of the definition is indented.  Also, the
10053 name of the entity is entered into the appropriate index:
10054 @code{@@deffn} enters the name into the index of functions,
10055 @code{@@defvr} enters it into the index of variables, and so
10056 on.@refill
10058 A manual need not and should not contain more than one definition for
10059 a given name.  An appendix containing a summary should use
10060 @code{@@table} rather than the definition commands.@refill
10062 @menu
10063 * Def Cmd Template::            How to structure a description using a
10064                                   definition command.
10065 * Optional Arguments::          How to handle optional and repeated arguments.
10066 * deffnx::                      How to group two or more `first' lines.
10067 * Def Cmds in Detail::          All the definition commands.
10068 * Def Cmd Conventions::         Conventions for writing definitions.
10069 * Sample Function Definition::  
10070 @end menu
10072 @node Def Cmd Template, Optional Arguments, Definition Commands, Definition Commands
10073 @section The Template for a Definition
10074 @cindex Definition template
10075 @cindex Template for a definition
10077 The @code{@@deffn} command is used for definitions of entities that
10078 resemble functions.  To write a definition using the @code{@@deffn}
10079 command, write the @code{@@deffn} command at the beginning of a line
10080 and follow it on the same line by the category of the entity, the name
10081 of the entity itself, and its arguments (if any).  Then write the body
10082 of the definition on succeeding lines.  (You may embed examples in the
10083 body.)  Finally, end the definition with an @code{@@end deffn} command
10084 written on a line of its own.  (The other definition commands follow
10085 the same format.)@refill
10087 The template for a definition looks like this:
10089 @example
10090 @group
10091 @@deffn @var{category} @var{name} @var{arguments}@dots{}
10092 @var{body-of-definition}
10093 @@end deffn
10094 @end group
10095 @end example
10097 @need 700
10098 @noindent
10099 For example,
10101 @example
10102 @group
10103 @@deffn Command forward-word count
10104 This command moves point forward @@var@{count@} words
10105 (or backward if @@var@{count@} is negative). @dots{}
10106 @@end deffn
10107 @end group
10108 @end example
10110 @noindent
10111 produces
10113 @quotation
10114 @deffn Command forward-word count
10115 This function moves point forward @var{count} words
10116 (or backward if @var{count} is negative). @dots{}
10117 @end deffn
10118 @end quotation
10120 Capitalize the category name like a title.  If the name of the
10121 category contains spaces, as in the phrase `Interactive Command',
10122 write braces around it.  For example:@refill
10124 @example
10125 @group
10126 @@deffn @{Interactive Command@} isearch-forward
10127 @dots{}
10128 @@end deffn
10129 @end group
10130 @end example
10132 @noindent
10133 Otherwise, the second word will be mistaken for the name of the
10134 entity.@refill
10136 Some of the definition commands are more general than others.  The
10137 @code{@@deffn} command, for example, is the general definition command
10138 for functions and the like---for entities that may take arguments.  When
10139 you use this command, you specify the category to which the entity
10140 belongs.  The @code{@@deffn} command possesses three predefined,
10141 specialized variations, @code{@@defun}, @code{@@defmac}, and
10142 @code{@@defspec}, that specify the category for you: ``Function'',
10143 ``Macro'', and ``Special Form'' respectively.  (In Lisp, a special form
10144 is an entity much like a function.)  The @code{@@defvr} command also is
10145 accompanied by several predefined, specialized variations for describing
10146 particular kinds of variables.@refill
10148 The template for a specialized definition, such as @code{@@defun}, is
10149 similar to the template for a generalized definition, except that you
10150 do not need to specify the category:@refill
10152 @example
10153 @group
10154 @@defun @var{name} @var{arguments}@dots{}
10155 @var{body-of-definition}
10156 @@end defun
10157 @end group
10158 @end example
10160 @noindent
10161 Thus,
10163 @example
10164 @group
10165 @@defun buffer-end flag
10166 This function returns @@code@{(point-min)@} if @@var@{flag@}
10167 is less than 1, @@code@{(point-max)@} otherwise.
10168 @dots{}
10169 @@end defun
10170 @end group
10171 @end example
10173 @noindent
10174 produces
10176 @quotation
10177 @defun buffer-end flag
10178 This function returns @code{(point-min)} if @var{flag} is less than 1,
10179 @code{(point-max)} otherwise.  @dots{}
10180 @end defun
10181 @end quotation
10183 @noindent
10184 @xref{Sample Function Definition, Sample Function Definition, A Sample
10185 Function Definition}, for a more detailed example of a function
10186 definition, including the use of @code{@@example} inside the
10187 definition.@refill
10189 The other specialized commands work like @code{@@defun}.@refill
10191 @node Optional Arguments, deffnx, Def Cmd Template, Definition Commands
10192 @section Optional and Repeated Arguments
10193 @cindex Optional and repeated arguments
10194 @cindex Repeated and optional arguments
10195 @cindex Arguments, repeated and optional
10196 @cindex Syntax, optional & repeated arguments
10197 @cindex Meta-syntactic chars for arguments
10199 Some entities take optional or repeated arguments, which may be
10200 specified by a distinctive glyph that uses square brackets and
10201 ellipses.  For @w{example}, a special form often breaks its argument list
10202 into separate arguments in more complicated ways than a
10203 straightforward function.@refill
10205 @iftex
10206 An argument enclosed within square brackets is optional.
10207 Thus, the phrase
10208 @samp{@code{@r{[}@var{optional-arg}@r{]}}} means that
10209 @var{optional-arg} is optional.
10210 An argument followed by an ellipsis is optional
10211 and may be repeated more than once.
10212 @c This is consistent with Emacs Lisp Reference manual
10213 Thus, @samp{@var{repeated-args}@dots{}} stands for zero or more arguments.
10214 Parentheses are used when several arguments are grouped
10215 into additional levels of list structure in Lisp.
10216 @end iftex
10217 @c The following looks better in Info (no `r', `samp' and `code'):
10218 @ifinfo
10219 An argument enclosed within square brackets is optional.
10220 Thus, [@var{optional-arg}] means that @var{optional-arg} is optional.
10221 An argument followed by an ellipsis is optional
10222 and may be repeated more than once.
10223 @c This is consistent with Emacs Lisp Reference manual
10224 Thus, @var{repeated-args}@dots{} stands for zero or more arguments.
10225 Parentheses are used when several arguments are grouped
10226 into additional levels of list structure in Lisp.
10227 @end ifinfo
10229 Here is the @code{@@defspec} line of an example of an imaginary
10230 special form:@refill
10232 @quotation
10233 @defspec foobar (@var{var} [@var{from} @var{to} [@var{inc}]]) @var{body}@dots{}
10234 @end defspec
10235 @tex
10236 \vskip \parskip
10237 @end tex
10238 @end quotation
10240 @noindent
10241 In this example, the arguments @var{from} and @var{to} are optional,
10242 but must both be present or both absent.  If they are present,
10243 @var{inc} may optionally be specified as well.  These arguments are
10244 grouped with the argument @var{var} into a list, to distinguish them
10245 from @var{body}, which includes all remaining elements of the
10246 form.@refill
10248 In a Texinfo source file, this @code{@@defspec} line is written like
10249 this (except it would not be split over two lines, as it is in this
10250 example).@refill
10252 @example
10253 @group
10254 @@defspec foobar (@@var@{var@} [@@var@{from@} @@var@{to@}
10255      [@@var@{inc@}]]) @@var@{body@}@@dots@{@}
10256 @end group
10257 @end example
10259 @noindent
10260 The function is listed in the Command and Variable Index under
10261 @samp{foobar}.@refill
10263 @node deffnx, Def Cmds in Detail, Optional Arguments, Definition Commands
10264 @section Two or More `First' Lines
10265 @cindex Two `First' Lines for @code{@@deffn}
10266 @cindex Grouping two definitions together
10267 @cindex Definitions grouped together
10268 @findex deffnx
10270 To create two or more `first' or header lines for a definition, follow
10271 the first @code{@@deffn} line by a line beginning with @code{@@deffnx}.
10272 The @code{@@deffnx} command works exactly like @code{@@deffn}
10273 except that it does not generate extra vertical white space between it
10274 and the preceding line.@refill
10276 @need 1000
10277 For example,
10279 @example
10280 @group
10281 @@deffn @{Interactive Command@} isearch-forward
10282 @@deffnx @{Interactive Command@} isearch-backward
10283 These two search commands are similar except @dots{}
10284 @@end deffn
10285 @end group
10286 @end example
10288 @noindent
10289 produces
10291 @deffn {Interactive Command} isearch-forward
10292 @deffnx {Interactive Command} isearch-backward
10293 These two search commands are similar except @dots{}
10294 @end deffn
10296 Each of the other definition commands has an `x' form: @code{@@defunx},
10297 @code{@@defvrx}, @code{@@deftypefunx}, etc.
10299 The `x' forms work just like @code{@@itemx}; see @ref{itemx, , @code{@@itemx}}.
10301 @node Def Cmds in Detail, Def Cmd Conventions, deffnx, Definition Commands
10302 @section The Definition Commands
10304 Texinfo provides more than a dozen definition commands, all of which
10305 are described in this section.@refill
10307 The definition commands automatically enter the name of the entity in
10308 the appropriate index: for example, @code{@@deffn}, @code{@@defun},
10309 and @code{@@defmac} enter function names in the index of functions;
10310 @code{@@defvr} and @code{@@defvar} enter variable names in the index
10311 of variables.@refill
10313 Although the examples that follow mostly illustrate Lisp, the commands
10314 can be used for other programming languages.@refill
10316 @menu
10317 * Functions Commands::          Commands for functions and similar entities.
10318 * Variables Commands::          Commands for variables and similar entities.
10319 * Typed Functions::             Commands for functions in typed languages.
10320 * Typed Variables::             Commands for variables in typed languages.
10321 * Abstract Objects::            Commands for object-oriented programming.
10322 * Data Types::                  The definition command for data types.
10323 @end menu
10325 @node Functions Commands, Variables Commands, Def Cmds in Detail, Def Cmds in Detail
10326 @subsection Functions and Similar Entities
10328 This section describes the commands for describing functions and similar
10329 entities:@refill
10331 @table @code
10332 @findex deffn
10333 @item @@deffn @var{category} @var{name} @var{arguments}@dots{}
10334 The @code{@@deffn} command is the general definition command for
10335 functions, interactive commands, and similar entities that may take
10336 arguments.  You must choose a term to describe the category of entity
10337 being defined; for example, ``Function'' could be used if the entity is
10338 a function.  The @code{@@deffn} command is written at the beginning of a
10339 line and is followed on the same line by the category of entity being
10340 described, the name of this particular entity, and its arguments, if
10341 any.  Terminate the definition with @code{@@end deffn} on a line of its
10342 own.@refill
10344 @need 750
10345 For example, here is a definition:
10347 @example
10348 @group
10349 @@deffn Command forward-char nchars
10350 Move point forward @@var@{nchars@} characters.
10351 @@end deffn
10352 @end group
10353 @end example
10355 @noindent
10356 This shows a rather terse definition for a ``command'' named
10357 @code{forward-char} with one argument, @var{nchars}.
10359 @code{@@deffn} prints argument names such as @var{nchars} in italics or
10360 upper case, as if @code{@@var} had been used, because we think of these
10361 names as metasyntactic variables---they stand for the actual argument
10362 values.  Within the text of the description, write an argument name
10363 explicitly with @code{@@var} to refer to the value of the argument.  In
10364 the example above, we used @samp{@@var@{nchars@}} in this way.
10366 The template for @code{@@deffn} is:
10368 @example
10369 @group
10370 @@deffn @var{category} @var{name} @var{arguments}@dots{}
10371 @var{body-of-definition}
10372 @@end deffn
10373 @end group
10374 @end example
10376 @findex defun
10377 @item @@defun @var{name} @var{arguments}@dots{}
10378 The @code{@@defun} command is the definition command for functions.
10379 @code{@@defun} is equivalent to @samp{@@deffn Function
10380 @dots{}}.@refill
10382 @need 800
10383 @noindent
10384 For example,
10386 @example
10387 @group
10388 @@defun set symbol new-value
10389 Change the value of the symbol @@var@{symbol@}
10390 to @@var@{new-value@}.
10391 @@end defun
10392 @end group
10393 @end example
10395 @noindent
10396 shows a rather terse definition for a function @code{set} whose
10397 arguments are @var{symbol} and @var{new-value}.  The argument names on
10398 the @code{@@defun} line automatically appear in italics or upper case as
10399 if they were enclosed in @code{@@var}.  Terminate the definition with
10400 @code{@@end defun} on a line of its own.@refill
10402 The template is:
10404 @example
10405 @group
10406 @@defun @var{function-name} @var{arguments}@dots{}
10407 @var{body-of-definition}
10408 @@end defun
10409 @end group
10410 @end example
10412 @code{@@defun} creates an entry in the index of functions.
10414 @findex defmac
10415 @item @@defmac @var{name} @var{arguments}@dots{}
10416 The @code{@@defmac} command is the definition command for macros.
10417 @code{@@defmac} is equivalent to @samp{@@deffn Macro @dots{}} and
10418 works like @code{@@defun}.@refill
10420 @findex defspec
10421 @item @@defspec @var{name} @var{arguments}@dots{}
10422 The @code{@@defspec} command is the definition command for special
10423 forms.  (In Lisp, a special form is an entity much like a function,
10424 @pxref{Special Forms,,, elisp, GNU Emacs Lisp Reference Manual}.)
10425 @code{@@defspec} is equivalent to @samp{@@deffn @{Special Form@}
10426 @dots{}} and works like @code{@@defun}.@refill
10427 @end table
10429 @node Variables Commands, Typed Functions, Functions Commands, Def Cmds in Detail
10430 @subsection Variables and Similar Entities
10432 Here are the commands for defining variables and similar
10433 entities:@refill
10435 @table @code
10436 @findex defvr
10437 @item @@defvr @var{category} @var{name}
10438 The @code{@@defvr} command is a general definition command for
10439 something like a variable---an entity that records a value.  You must
10440 choose a term to describe the category of entity being defined; for
10441 example, ``Variable'' could be used if the entity is a variable.
10442 Write the @code{@@defvr} command at the beginning of a line and
10443 followed it on the same line by the category of the entity and the
10444 name of the entity.@refill
10446 Capitalize the category name like a title.  If the name of the category
10447 contains spaces, as in the name ``User Option'', enclose it in braces.
10448 Otherwise, the second word will be mistaken for the name of the entity.
10449 For example,
10451 @example
10452 @group
10453 @@defvr @{User Option@} fill-column
10454 This buffer-local variable specifies
10455 the maximum width of filled lines.
10456 @dots{}
10457 @@end defvr
10458 @end group
10459 @end example
10461 Terminate the definition with @code{@@end defvr} on a line of its
10462 own.@refill
10464 The template is:
10466 @example
10467 @group
10468 @@defvr @var{category} @var{name}
10469 @var{body-of-definition}
10470 @@end defvr
10471 @end group
10472 @end example
10474 @code{@@defvr} creates an entry in the index of variables for @var{name}.
10476 @findex defvar
10477 @item @@defvar @var{name}
10478 The @code{@@defvar} command is the definition command for variables.
10479 @code{@@defvar} is equivalent to @samp{@@defvr Variable
10480 @dots{}}.@refill
10482 @need 750
10483 For example:
10485 @example
10486 @group
10487 @@defvar kill-ring
10488 @dots{}
10489 @@end defvar
10490 @end group
10491 @end example
10493 The template is:
10495 @example
10496 @group
10497 @@defvar @var{name}
10498 @var{body-of-definition}
10499 @@end defvar
10500 @end group
10501 @end example
10503 @code{@@defvar} creates an entry in the index of variables for
10504 @var{name}.@refill
10506 @findex defopt
10507 @item @@defopt @var{name}
10508 @cindex User options, marking
10509 The @code{@@defopt} command is the definition command for @dfn{user
10510 options}, i.e., variables intended for users to change according to
10511 taste; Emacs has many such (@pxref{Variables,,, emacs, The GNU Emacs
10512 Manual}).  @code{@@defopt} is equivalent to @samp{@@defvr @{User
10513 Option@} @dots{}} and works like @code{@@defvar}.@refill
10514 @end table
10517 @node Typed Functions, Typed Variables, Variables Commands, Def Cmds in Detail
10518 @subsection Functions in Typed Languages
10520 The @code{@@deftypefn} command and its variations are for describing
10521 functions in languages in which you must declare types of variables and
10522 functions, such as C and C++.
10524 @table @code
10525 @findex deftypefn
10526 @item @@deftypefn @var{category} @var{data-type} @var{name} @var{arguments}@dots{}
10527 The @code{@@deftypefn} command is the general definition command for
10528 functions and similar entities that may take arguments and that are
10529 typed.  The @code{@@deftypefn} command is written at the beginning of
10530 a line and is followed on the same line by the category of entity
10531 being described, the type of the returned value, the name of this
10532 particular entity, and its arguments, if any.@refill
10534 @need 800
10535 @noindent
10536 For example,
10538 @example
10539 @group
10540 @@deftypefn @{Library Function@} int foobar
10541    (int @@var@{foo@}, float @@var@{bar@})
10542 @dots{}
10543 @@end deftypefn
10544 @end group
10545 @end example
10547 @need 1000
10548 @noindent
10549 (where the text before the ``@dots{}'', shown above as two lines, would
10550 actually be a single line in a real Texinfo file) produces the following
10551 in Info:
10553 @smallexample
10554 @group
10555 -- Library Function: int foobar (int FOO, float BAR)
10556 @dots{}
10557 @end group
10558 @end smallexample
10559 @iftex
10561 In a printed manual, it produces:
10563 @quotation
10564 @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
10565 @dots{}
10566 @end deftypefn
10567 @end quotation
10568 @end iftex
10570 This means that @code{foobar} is a ``library function'' that returns an
10571 @code{int}, and its arguments are @var{foo} (an @code{int}) and
10572 @var{bar} (a @code{float}).@refill
10574 The argument names that you write in @code{@@deftypefn} are not subject
10575 to an implicit @code{@@var}---since the actual names of the arguments in
10576 @code{@@deftypefn} are typically scattered among data type names and
10577 keywords, Texinfo cannot find them without help.  Instead, you must write
10578 @code{@@var} explicitly around the argument names.  In the example
10579 above, the argument names are @samp{foo} and @samp{bar}.@refill
10581 The template for @code{@@deftypefn} is:@refill
10583 @example
10584 @group
10585 @@deftypefn @var{category} @var{data-type} @var{name} @var{arguments} @dots{}
10586 @var{body-of-description}
10587 @@end deftypefn
10588 @end group
10589 @end example
10591 @noindent
10592 Note that if the @var{category} or @var{data type} is more than one
10593 word then it must be enclosed in braces to make it a single argument.@refill
10595 If you are describing a procedure in a language that has packages,
10596 such as Ada, you might consider using @code{@@deftypefn} in a manner
10597 somewhat contrary to the convention described in the preceding
10598 paragraphs.@refill
10600 @need 800
10601 @noindent
10602 For example:
10604 @example
10605 @group
10606 @@deftypefn stacks private push
10607         (@@var@{s@}:in out stack;
10608         @@var@{n@}:in integer)
10609 @dots{}
10610 @@end deftypefn
10611 @end group
10612 @end example
10614 @noindent
10615 (The @code{@@deftypefn} arguments are shown split into three lines, but
10616 would be a single line in a real Texinfo file.)
10618 In this instance, the procedure is classified as belonging to the
10619 package @code{stacks} rather than classified as a `procedure' and its
10620 data type is described as @code{private}.  (The name of the procedure
10621 is @code{push}, and its arguments are @var{s} and @var{n}.)@refill
10623 @code{@@deftypefn} creates an entry in the index of functions for
10624 @var{name}.@refill
10626 @item @@deftypefun @var{data-type} @var{name} @var{arguments}@dots{}
10627 @findex deftypefun
10628 The @code{@@deftypefun} command is the specialized definition command
10629 for functions in typed languages.  The command is equivalent to
10630 @samp{@@deftypefn Function @dots{}}.@refill
10632 @need 800
10633 @noindent
10634 Thus,
10636 @smallexample
10637 @group
10638 @@deftypefun int foobar (int @@var@{foo@}, float @@var@{bar@})
10639 @dots{}
10640 @@end deftypefun
10641 @end group
10642 @end smallexample
10644 @noindent
10645 produces the following in Info:
10647 @example
10648 @group
10649 -- Function: int foobar (int FOO, float BAR)
10650 @dots{}
10651 @end group
10652 @end example
10653 @iftex
10655 @need 800
10656 @noindent
10657 and the following in a printed manual:
10659 @quotation
10660 @deftypefun int foobar (int @var{foo}, float @var{bar})
10661 @dots{}
10662 @end deftypefun
10663 @end quotation
10664 @end iftex
10666 @need 800
10667 The template is:
10669 @example
10670 @group
10671 @@deftypefun @var{type} @var{name} @var{arguments}@dots{}
10672 @var{body-of-description}
10673 @@end deftypefun
10674 @end group
10675 @end example
10677 @code{@@deftypefun} creates an entry in the index of functions for
10678 @var{name}.@refill
10680 @item @@deftypemethod @var{class} @var{data-type} @var{method-name} @var{arguments}@dots{}
10681 @findex deftypefun
10682 The @code{@@deftypemethod} command is the definition command for methods
10683 in object-oriented typed languages, such as C++ and Java.  It is similar
10684 to the @code{@@deftypefn} with the addition of the @var{class} parameter
10685 to specify the class containing the method.
10687 @end table
10690 @node Typed Variables, Abstract Objects, Typed Functions, Def Cmds in Detail
10691 @subsection Variables in Typed Languages
10693 Variables in typed languages are handled in a manner similar to
10694 functions in typed languages.  @xref{Typed Functions}.  The general
10695 definition command @code{@@deftypevr} corresponds to
10696 @code{@@deftypefn} and the specialized definition command
10697 @code{@@deftypevar} corresponds to @code{@@deftypefun}.@refill
10699 @table @code
10700 @findex deftypevr
10701 @item @@deftypevr @var{category} @var{data-type} @var{name}
10702 The @code{@@deftypevr} command is the general definition command for
10703 something like a variable in a typed language---an entity that records
10704 a value.  You must choose a term to describe the category of the
10705 entity being defined; for example, ``Variable'' could be used if the
10706 entity is a variable.@refill
10708 The @code{@@deftypevr} command is written at the beginning of a line
10709 and is followed on the same line by the category of the entity
10710 being described, the data type, and the name of this particular
10711 entity.@refill
10713 @need 800
10714 @noindent
10715 For example:
10717 @example
10718 @group
10719 @@deftypevr @{Global Flag@} int enable
10720 @dots{}
10721 @@end deftypevr
10722 @end group
10723 @end example
10725 @noindent
10726 produces the following in Info:
10728 @example
10729 @group
10730 -- Global Flag: int enable
10731 @dots{}
10732 @end group
10733 @end example
10734 @iftex
10736 @noindent
10737 and the following in a printed manual:
10739 @quotation
10740 @deftypevr {Global Flag} int enable
10741 @dots{}
10742 @end deftypevr
10743 @end quotation
10744 @end iftex
10746 @need 800
10747 The template is:
10749 @example
10750 @@deftypevr @var{category} @var{data-type} @var{name}
10751 @var{body-of-description}
10752 @@end deftypevr
10753 @end example
10755 @code{@@deftypevr} creates an entry in the index of variables for
10756 @var{name}.@refill
10758 @findex deftypevar
10759 @item @@deftypevar @var{data-type} @var{name}
10760 The @code{@@deftypevar} command is the specialized definition command
10761 for variables in typed languages.  @code{@@deftypevar} is equivalent
10762 to @samp{@@deftypevr Variable @dots{}}.@refill
10764 @need 800
10765 @noindent
10766 For example:
10768 @example
10769 @group
10770 @@deftypevar int fubar
10771 @dots{}
10772 @@end deftypevar
10773 @end group
10774 @end example
10776 @noindent
10777 produces the following in Info:
10779 @example
10780 @group
10781 -- Variable: int fubar
10782 @dots{}
10783 @end group
10784 @end example
10785 @iftex
10787 @need 800
10788 @noindent
10789 and the following in a printed manual:
10791 @quotation
10792 @deftypevar int fubar
10793 @dots{}
10794 @end deftypevar
10795 @end quotation
10796 @end iftex
10798 @need 800
10799 @noindent
10800 The template is:
10802 @example
10803 @group
10804 @@deftypevar @var{data-type} @var{name}
10805 @var{body-of-description}
10806 @@end deftypevar
10807 @end group
10808 @end example
10810 @code{@@deftypevar} creates an entry in the index of variables for
10811 @var{name}.@refill
10812 @end table
10814 @node Abstract Objects, Data Types, Typed Variables, Def Cmds in Detail
10815 @subsection Object-Oriented Programming
10817 Here are the commands for formatting descriptions about abstract
10818 objects, such as are used in object-oriented programming.  A class is
10819 a defined type of abstract object.  An instance of a class is a
10820 particular object that has the type of the class.  An instance
10821 variable is a variable that belongs to the class but for which each
10822 instance has its own value.@refill
10824 In a definition, if the name of a class is truly a name defined in the
10825 programming system for a class, then you should write an @code{@@code}
10826 around it.  Otherwise, it is printed in the usual text font.@refill
10828 @table @code
10829 @findex defcv
10830 @item @@defcv @var{category} @var{class} @var{name}
10831 The @code{@@defcv} command is the general definition command for
10832 variables associated with classes in object-oriented programming.  The
10833 @code{@@defcv} command is followed by three arguments: the category of
10834 thing being defined, the class to which it belongs, and its
10835 name.  Thus,@refill
10837 @example
10838 @group
10839 @@defcv @{Class Option@} Window border-pattern
10840 @dots{}
10841 @@end defcv
10842 @end group
10843 @end example
10845 @noindent
10846 illustrates how you would write the first line of a definition of the
10847 @code{border-pattern} class option of the class @code{Window}.@refill
10849 The template is
10851 @example
10852 @group
10853 @@defcv @var{category} @var{class} @var{name}
10854 @dots{}
10855 @@end defcv
10856 @end group
10857 @end example
10859 @code{@@defcv} creates an entry in the index of variables.
10861 @findex defivar
10862 @item @@defivar @var{class} @var{name}
10863 The @code{@@defivar} command is the definition command for instance
10864 variables in object-oriented programming.  @code{@@defivar} is
10865 equivalent to @samp{@@defcv @{Instance Variable@} @dots{}}@refill
10867 The template is:
10869 @example
10870 @group
10871 @@defivar @var{class} @var{instance-variable-name}
10872 @var{body-of-definition}
10873 @@end defivar
10874 @end group
10875 @end example
10877 @code{@@defivar} creates an entry in the index of variables.
10879 @findex defop
10880 @item @@defop @var{category} @var{class} @var{name} @var{arguments}@dots{}
10881 The @code{@@defop} command is the general definition command for
10882 entities that may resemble methods in object-oriented programming.
10883 These entities take arguments, as functions do, but are associated
10884 with particular classes of objects.@refill
10886 For example, some systems have constructs called @dfn{wrappers} that
10887 are associated with classes as methods are, but that act more like
10888 macros than like functions.  You could use @code{@@defop Wrapper} to
10889 describe one of these.@refill
10891 Sometimes it is useful to distinguish methods and @dfn{operations}.
10892 You can think of an operation as the specification for a method.
10893 Thus, a window system might specify that all window classes have a
10894 method named @code{expose}; we would say that this window system
10895 defines an @code{expose} operation on windows in general.  Typically,
10896 the operation has a name and also specifies the pattern of arguments;
10897 all methods that implement the operation must accept the same
10898 arguments, since applications that use the operation do so without
10899 knowing which method will implement it.@refill
10901 Often it makes more sense to document operations than methods.  For
10902 example, window application developers need to know about the
10903 @code{expose} operation, but need not be concerned with whether a
10904 given class of windows has its own method to implement this operation.
10905 To describe this operation, you would write:@refill
10907 @example
10908 @@defop Operation windows expose
10909 @end example
10911 The @code{@@defop} command is written at the beginning of a line and
10912 is followed on the same line by the overall name of the category of
10913 operation, the name of the class of the operation, the name of the
10914 operation, and its arguments, if any.@refill
10916 @need 800
10917 @noindent
10918 The template is:
10920 @example
10921 @group
10922 @@defop @var{category} @var{class} @var{name} @var{arguments}@dots{}
10923 @var{body-of-definition}
10924 @@end defop
10925 @end group
10926 @end example
10928 @code{@@defop} creates an entry, such as `@code{expose} on
10929 @code{windows}', in the index of functions.@refill
10931 @item @@defmethod @var{class} @var{name} @var{arguments}@dots{}
10932 @findex defmethod
10933 The @code{@@defmethod} command is the definition command for methods
10934 in object-oriented programming.  A method is a kind of function that
10935 implements an operation for a particular class of objects and its
10936 subclasses.  In the Lisp Machine, methods actually were functions, but
10937 they were usually defined with @code{defmethod}.
10939 @code{@@defmethod} is equivalent to @samp{@@defop Method @dots{}}.
10940 The command is written at the beginning of a line and is followed by
10941 the name of the class of the method, the name of the method, and its
10942 arguments, if any.@refill
10944 @need 800
10945 @noindent
10946 For example,
10948 @example
10949 @group
10950 @@defmethod @code{bar-class} bar-method argument
10951 @dots{}
10952 @@end defmethod
10953 @end group
10954 @end example
10956 @noindent
10957 illustrates the definition for a method called @code{bar-method} of
10958 the class @code{bar-class}.  The method takes an argument.@refill
10960 The template is:
10962 @example
10963 @group
10964 @@defmethod @var{class} @var{method-name} @var{arguments}@dots{}
10965 @var{body-of-definition}
10966 @@end defmethod
10967 @end group
10968 @end example
10970 @code{@@defmethod} creates an entry, such as `@code{bar-method} on
10971 @code{bar-class}', in the index of functions.@refill
10973 @item @@deftypemethod @var{class} @var{data-type} @var{name} @var{arguments}@dots{}
10974 @findex defmethod
10975 The @code{@@deftypemethod} command is the definition command for methods
10976 in object-oriented typed languages, such as C++ and Java.  It is similar
10977 to the @code{@@defmethod} command with the addition of the
10978 @var{data-type} parameter to specify the return type of the method.
10980 @end table
10983 @node Data Types,  , Abstract Objects, Def Cmds in Detail
10984 @subsection Data Types
10986 Here is the command for data types:@refill
10988 @table @code
10989 @findex deftp
10990 @item @@deftp @var{category} @var{name} @var{attributes}@dots{}
10991 The @code{@@deftp} command is the generic definition command for data
10992 types.  The command is written at the beginning of a line and is
10993 followed on the same line by the category, by the name of the type
10994 (which is a word like @code{int} or @code{float}), and then by names of
10995 attributes of objects of that type.  Thus, you could use this command
10996 for describing @code{int} or @code{float}, in which case you could use
10997 @code{data type} as the category.  (A data type is a category of
10998 certain objects for purposes of deciding which operations can be
10999 performed on them.)@refill
11001 In Lisp, for example,  @dfn{pair} names a particular data
11002 type, and an object of that type has two slots called the
11003 @sc{car} and the @sc{cdr}.  Here is how you would write the first line
11004 of a definition of @code{pair}.@refill
11006 @example
11007 @group
11008 @@deftp @{Data type@} pair car cdr
11009 @dots{}
11010 @@end deftp
11011 @end group
11012 @end example
11014 @need 950
11015 The template is:
11017 @example
11018 @group
11019 @@deftp @var{category} @var{name-of-type} @var{attributes}@dots{}
11020 @var{body-of-definition}
11021 @@end deftp
11022 @end group
11023 @end example
11025 @code{@@deftp} creates an entry in the index of data types.
11026 @end table
11028 @node Def Cmd Conventions, Sample Function Definition, Def Cmds in Detail, Definition Commands
11029 @section Conventions for Writing Definitions
11030 @cindex Definition conventions
11031 @cindex Conventions for writing definitions
11033 When you write a definition using @code{@@deffn}, @code{@@defun}, or
11034 one of the other definition commands, please take care to use
11035 arguments that indicate the meaning, as with the @var{count} argument
11036 to the @code{forward-word} function.  Also, if the name of an argument
11037 contains the name of a type, such as @var{integer}, take care that the
11038 argument actually is of that type.@refill
11040 @node Sample Function Definition,  , Def Cmd Conventions, Definition Commands
11041 @section A Sample Function Definition
11042 @cindex Function definitions
11043 @cindex Command definitions
11044 @cindex Macro definitions
11045 @cindex Sample function definition
11047 A function definition uses the @code{@@defun} and @code{@@end defun}
11048 commands.  The name of the function follows immediately after the
11049 @code{@@defun} command and it is followed, on the same line, by the
11050 parameter list.@refill
11052 Here is a definition from @ref{Calling Functions,,, elisp, The GNU Emacs
11053 Lisp Reference Manual}.
11055 @quotation
11056 @defun apply function &rest arguments
11057 @code{apply} calls @var{function} with @var{arguments}, just
11058 like @code{funcall} but with one difference: the last of
11059 @var{arguments} is a list of arguments to give to
11060 @var{function}, rather than a single argument.  We also say
11061 that this list is @dfn{appended} to the other arguments.
11063 @code{apply} returns the result of calling @var{function}.
11064 As with @code{funcall}, @var{function} must either be a Lisp
11065 function or a primitive function; special forms and macros
11066 do not make sense in @code{apply}.
11068 @example
11069 (setq f 'list)
11070      @result{} list
11071 (apply f 'x 'y 'z)
11072 @error{} Wrong type argument: listp, z
11073 (apply '+ 1 2 '(3 4))
11074      @result{} 10
11075 (apply '+ '(1 2 3 4))
11076      @result{} 10
11078 (apply 'append '((a b c) nil (x y z) nil))
11079      @result{} (a b c x y z)
11080 @end example
11082 An interesting example of using @code{apply} is found in the description
11083 of @code{mapcar}.@refill
11084 @end defun
11085 @end quotation
11087 @need 1200
11088 In the Texinfo source file, this example looks like this:
11090 @example
11091 @group
11092 @@defun apply function &rest arguments
11094 @@code@{apply@} calls @@var@{function@} with
11095 @@var@{arguments@}, just like @@code@{funcall@} but with one
11096 difference: the last of @@var@{arguments@} is a list of
11097 arguments to give to @@var@{function@}, rather than a single
11098 argument.  We also say that this list is @@dfn@{appended@}
11099 to the other arguments.
11100 @end group
11102 @group
11103 @@code@{apply@} returns the result of calling
11104 @@var@{function@}.  As with @@code@{funcall@},
11105 @@var@{function@} must either be a Lisp function or a
11106 primitive function; special forms and macros do not make
11107 sense in @@code@{apply@}.
11108 @end group
11110 @group
11111 @@example
11112 (setq f 'list)
11113      @@result@{@} list
11114 (apply f 'x 'y 'z)
11115 @@error@{@} Wrong type argument: listp, z
11116 (apply '+ 1 2 '(3 4))
11117      @@result@{@} 10
11118 (apply '+ '(1 2 3 4))
11119      @@result@{@} 10
11121 (apply 'append '((a b c) nil (x y z) nil))
11122      @@result@{@} (a b c x y z)
11123 @@end example
11124 @end group
11126 @group
11127 An interesting example of using @@code@{apply@} is found
11128 in the description of @@code@{mapcar@}.@@refill
11129 @@end defun
11130 @end group
11131 @end example
11133 @noindent
11134 In this manual, this function is listed in the Command and Variable
11135 Index under @code{apply}.@refill
11137 Ordinary variables and user options are described using a format like
11138 that for functions except that variables do not take arguments.
11141 @node Footnotes, Conditionals, Definition Commands, Top
11142 @chapter Footnotes
11143 @cindex Footnotes
11144 @findex footnote
11146 A @dfn{footnote} is for a reference that documents or elucidates the
11147 primary text.@footnote{A footnote should complement or expand upon
11148 the primary text, but a reader should not need to read a footnote to
11149 understand the primary text.  For a thorough discussion of footnotes,
11150 see @cite{The Chicago Manual of Style}, which is published by the
11151 University of Chicago Press.}@refill
11153 @menu
11154 * Footnote Commands::           How to write a footnote in Texinfo.
11155 * Footnote Styles::             Controlling how footnotes appear in Info.
11156 @end menu
11158 @node Footnote Commands, Footnote Styles, Footnotes, Footnotes
11159 @section Footnote Commands
11161 In Texinfo, footnotes are created with the @code{@@footnote} command.
11162 This command is followed immediately by a left brace, then by the text
11163 of the footnote, and then by a terminating right brace.  Footnotes may
11164 be of any length (they will be broken across pages if necessary), but
11165 are usually short.  The template is:
11167 @example
11168 ordinary text@@footnote@{@var{text of footnote}@}
11169 @end example
11171 As shown here, the @code{@@footnote} command should come right after the
11172 text being footnoted, with no intervening space; otherwise, the
11173 formatters the footnote mark might end up starting up a line.
11175 For example, this clause is followed by a sample
11176 footnote@footnote{Here is the sample footnote.}; in the Texinfo
11177 source, it looks like this:@refill
11179 @example
11180 @dots{}a sample footnote@@footnote@{Here is the sample
11181 footnote.@}; in the Texinfo source@dots{}
11182 @end example
11184 @strong{Warning:} Don't use footnotes in the argument of the
11185 @code{@@item} command for a @code{@@table} table.  This doesn't work, and
11186 because of limitations of @TeX{}, there is no way to fix it.  You must
11187 put the footnote into the body text of the table.
11189 In a printed manual or book, the reference mark for a footnote is a
11190 small, superscripted number; the text of the footnote appears at the
11191 bottom of the page, below a horizontal line.@refill
11193 In Info, the reference mark for a footnote is a pair of parentheses
11194 with the footnote number between them, like this: @samp{(1)}.@refill
11197 @node Footnote Styles,  , Footnote Commands, Footnotes
11198 @section Footnote Styles
11200 Info has two footnote styles, which determine where the text of the
11201 footnote is located:@refill
11203 @itemize @bullet
11204 @cindex @samp{@r{End}} node footnote style
11205 @item
11206 In the `End' node style, all the footnotes for a single node
11207 are placed at the end of that node.  The footnotes are separated from
11208 the rest of the node by a line of dashes with the word
11209 @samp{Footnotes} within it.  Each footnote begins with an
11210 @samp{(@var{n})} reference mark.@refill
11212 @need 700
11213 @noindent
11214 Here is an example of a single footnote in the end of node style:@refill
11216 @example
11217 @group
11218  --------- Footnotes ---------
11220 (1)  Here is a sample footnote.
11221 @end group
11222 @end example
11224 @cindex @samp{@r{Separate}} footnote style
11225 @item
11226 In the `Separate' node style, all the footnotes for a single
11227 node are placed in an automatically constructed node of
11228 their own.  In this style, a ``footnote reference'' follows
11229 each @samp{(@var{n})} reference mark in the body of the
11230 node.  The footnote reference is actually a cross reference
11231 which you use to reach the footnote node.@refill
11233 The name of the node containing the footnotes is constructed
11234 by appending @w{@samp{-Footnotes}} to the name of the node
11235 that contains the footnotes. (Consequently, the footnotes'
11236 node for the @file{Footnotes} node is
11237 @w{@file{Footnotes-Footnotes}}!)  The footnotes' node has an
11238 `Up' node pointer that leads back to its parent node.@refill
11240 @noindent
11241 Here is how the first footnote in this manual looks after being
11242 formatted for Info in the separate node style:@refill
11244 @smallexample
11245 @group
11246 File: texinfo.info  Node: Overview-Footnotes, Up: Overview
11248 (1) Note that the first syllable of "Texinfo" is
11249 pronounced like "speck", not "hex". @dots{}
11250 @end group
11251 @end smallexample
11252 @end itemize
11254 A Texinfo file may be formatted into an Info file with either footnote
11255 style.@refill
11257 @findex footnotestyle
11258 Use the @code{@@footnotestyle} command to specify an Info file's
11259 footnote style.  Write this command at the beginning of a line followed
11260 by an argument, either @samp{end} for the end node style or
11261 @samp{separate} for the separate node style.
11263 @need 700
11264 For example,
11266 @example
11267 @@footnotestyle end
11268 @end example
11269 @noindent
11271 @example
11272 @@footnotestyle separate
11273 @end example
11275 Write an @code{@@footnotestyle} command before or shortly after the
11276 end-of-header line at the beginning of a Texinfo file.  (If you
11277 include the @code{@@footnotestyle} command between the start-of-header
11278 and end-of-header lines, the region formatting commands will format
11279 footnotes as specified.)@refill
11281 If you do not specify a footnote style, the formatting commands use
11282 their default style.  Currently, @code{texinfo-format-buffer} and
11283 @code{texinfo-format-region} use the `separate' style and
11284 @code{makeinfo} uses the `end' style.@refill
11286 @c !!! note: makeinfo's --footnote-style option overrides footnotestyle
11287 @ignore
11288 If you use @code{makeinfo} to create the Info file, the
11289 @samp{--footnote-style} option determines which style is used,
11290 @samp{end} for the end of node style or @samp{separate} for the
11291 separate node style.  Thus, to format the Texinfo manual in the
11292 separate node style, you would use the following shell command:@refill
11294 @example
11295 makeinfo --footnote-style=separate texinfo.texi
11296 @end example
11298 @noindent
11299 To format the Texinfo manual in the end of node style, you would
11300 type:@refill
11302 @example
11303 makeinfo --footnote-style=end texinfo.texi
11304 @end example
11305 @end ignore
11306 @ignore
11307 If you use @code{texinfo-format-buffer} or
11308 @code{texinfo-format-region} to create the Info file, the value of the
11309 @code{texinfo-footnote-style} variable controls the footnote style.
11310 It can be either @samp{"separate"} for the separate node style or
11311 @samp{"end"} for the end of node style.  (You can change the value of
11312 this variable with the @kbd{M-x edit-options} command (@pxref{Edit
11313 Options, , Editing Variable Values, emacs, The GNU Emacs Manual}), or
11314 with the @kbd{M-x set-variable} command (@pxref{Examining, , Examining
11315 and Setting Variables, emacs, The GNU Emacs Manual}).@refill
11317 The @code{texinfo-footnote-style} variable also controls the style if
11318 you use the @kbd{M-x makeinfo-region} or @kbd{M-x makeinfo-buffer}
11319 command in Emacs.@refill
11320 @end ignore
11321 This chapter contains two footnotes.@refill
11324 @node Conditionals, Macros, Footnotes, Top
11325 @comment  node-name,  next,  previous,  up
11326 @chapter Conditionally Visible Text
11327 @cindex Conditionally visible text
11328 @cindex Text, conditionally visible
11329 @cindex Visibility of conditional text
11330 @cindex If text conditionally visible
11332 Sometimes it is good to use different text for a printed manual and
11333 its corresponding Info file.  In this case, you can use the
11334 @dfn{conditional commands} to specify which text is for the printed manual
11335 and which is for the Info file.@refill
11337 @menu
11338 * Conditional Commands::        Specifying text for HTML, Info, or @TeX{}.
11339 * Conditional Not Commands::    Specifying text for not HTML, Info, or @TeX{}.
11340 * Raw Formatter Commands::      Using raw @TeX{} or HTML commands.
11341 * set clear value::             Designating which text to format (for
11342                                   all output formats); and how to set a
11343                                   flag to a string that you can insert.
11344 @end menu
11346 @node Conditional Commands, Conditional Not Commands, Conditionals, Conditionals
11347 @ifinfo
11348 @heading Conditional Commands
11349 @end ifinfo
11351 @findex ifinfo
11352 @code{@@ifinfo} begins segments of text that should be ignored
11353 by @TeX{} when it
11354 typesets the printed manual.  The segment of text appears only
11355 in the Info file.
11356 The @code{@@ifinfo} command should appear on a line by itself;  end
11357 the Info-only text with a line containing @code{@@end ifinfo} by
11358 itself.  At the beginning of a Texinfo file, the Info permissions are
11359 contained within a region marked by @code{@@ifinfo} and @code{@@end
11360 ifinfo}. (@xref{Info Summary and Permissions}.)@refill
11362 @findex iftex
11363 @findex ifhtml
11364 The @code{@@iftex} and @code{@@end iftex} commands are similar to the
11365 @code{@@ifinfo} and @code{@@end ifinfo} commands, except that they
11366 specify text that will appear in the printed manual but not in the Info
11367 file.  Likewise for @code{@@ifhtml} and @code{@@end ifhtml}, which
11368 specify text to appear only in HTML output.@refill
11370 For example,
11372 @example
11373 @@iftex
11374 This text will appear only in the printed manual.
11375 @@end iftex
11376 @@ifinfo
11377 However, this text will appear only in Info.
11378 @@end ifinfo
11379 @end example
11381 @noindent
11382 The preceding example produces the following line:
11383 @iftex
11384 This text will appear only in the printed manual.
11385 @end iftex
11386 @ifinfo
11387 However, this text will appear only in Info.
11388 @end ifinfo
11390 @noindent
11391 Note how you only see one of the two lines, depending on whether you
11392 are reading the Info version or the printed version of this
11393 manual.@refill
11395 The @code{@@titlepage} command is a special variant of @code{@@iftex} that
11396 is used for making the title and copyright pages of the printed
11397 manual.  (@xref{titlepage, , @code{@@titlepage}}.) @refill
11400 @node Conditional Not Commands, Raw Formatter Commands, Conditional Commands, Conditionals
11401 @section Conditional Not Commands
11402 @findex ifnothtml
11403 @findex ifnotinfo
11404 @findex ifnottex
11406 You can specify text to be included in any output format @emph{other}
11407 than some given one with the @code{@@ifnot@dots{}} commands:
11408 @example
11409 @@ifnothtml @dots{} @@end ifnothtml
11410 @@ifnotinfo @dots{} @@end ifnotinfo
11411 @@ifnottex @dots{} @@end ifnottex
11412 @end example
11413 @noindent
11414 (The @code{@@ifnot@dots{}} command and the @code{@@end} command must
11415 actually appear on lines by themselves.)
11417 If the output file is not being made for the given format, the region is
11418 included.  Otherwise, it is ignored.
11420 The regions delimited by these commands are ordinary Texinfo source as
11421 with @code{@@iftex}, not raw formatter source as with @code{@@tex}.
11424 @node Raw Formatter Commands, set clear value, Conditional Not Commands, Conditionals
11425 @section Raw Formatter Commands
11426 @cindex @TeX{} commands, using ordinary
11427 @cindex HTML commands, using ordinary
11428 @cindex Raw formatter commands
11429 @cindex Ordinary @TeX{} commands, using
11430 @cindex Ordinary HTML commands, using
11431 @cindex Commands using raw @TeX{}
11432 @cindex Commands using raw HTML
11433 @cindex plain @TeX{}
11435 Inside a region delineated by @code{@@iftex} and @code{@@end iftex}, you
11436 can embed some raw @TeX{} commands.  Info will ignore these commands
11437 since they are only in that part of the file which is seen by @TeX{}.
11438 You can write the @TeX{} commands as you would write them in a normal
11439 @TeX{} file, except that you must replace the @samp{\} used by @TeX{}
11440 with an @samp{@@}.  For example, in the @code{@@titlepage} section of a
11441 Texinfo file, you can use the @TeX{} command @code{@@vskip} to format
11442 the copyright page.  (The @code{@@titlepage} command causes Info to
11443 ignore the region automatically, as it does with the @code{@@iftex}
11444 command.)
11446 However, many features of plain @TeX{} will not work, as they are
11447 overridden by Texinfo features.
11449 @findex tex
11450 You can enter plain @TeX{} completely, and use @samp{\} in the @TeX{}
11451 commands, by delineating a region with the @code{@@tex} and @code{@@end
11452 tex} commands.  (The @code{@@tex} command also causes Info to ignore the
11453 region, like the @code{@@iftex} command.)  The sole exception is that
11454 @code{@@} chracter still introduces a command, so that @code{@@end tex}
11455 can be recognized properly.
11457 @cindex Mathematical expressions
11458 For example, here is a mathematical expression written in
11459 plain @TeX{}:
11461 @example
11462 @@tex
11463 $$ \chi^2 = \sum_@{i=1@}^N
11464           \left (y_i - (a + b x_i)
11465           \over \sigma_i\right)^2 $$
11466 @@end tex
11467 @end example
11469 @noindent
11470 The output of this example will appear only in a printed manual.  If
11471 you are reading this in Info, you will not see the equation that appears
11472 in the printed manual.
11473 @iftex
11474 In a printed manual, the above expression looks like
11475 this:
11476 @end iftex
11478 @tex
11479 $$ \chi^2 = \sum_{i=1}^N
11480           \left(y_i - (a + b x_i)
11481           \over \sigma_i\right)^2 $$
11482 @end tex
11484 @findex ifhtml
11485 @findex html
11486 Analogously, you can use @code{@@ifhtml @dots{} @@end ifhtml} to delimit
11487 a region to be included in HTML output only, and @code{@@html @dots{}
11488 @@end ifhtml} for a region of raw HTML (again, except that @code{@@} is
11489 still the escape character, so the @code{@@end} command can be
11490 recognized.)
11493 @node set clear value,  , Raw Formatter Commands, Conditionals
11494 @comment  node-name,  next,  previous,  up
11495 @section @code{@@set}, @code{@@clear}, and @code{@@value}
11497 You can direct the Texinfo formatting commands to format or ignore parts
11498 of a Texinfo file with the @code{@@set}, @code{@@clear}, @code{@@ifset},
11499 and @code{@@ifclear} commands.@refill
11501 In addition, you can use the @code{@@set @var{flag}} command to set the
11502 value of @var{flag} to a string of characters; and use
11503 @code{@@value@{@var{flag}@}} to insert that string.  You can use
11504 @code{@@set}, for example, to set a date and use @code{@@value} to
11505 insert the date in several places in the Texinfo file.@refill
11507 @menu
11508 * ifset ifclear::               Format a region if a flag is set.
11509 * value::                       Replace a flag with a string.
11510 * value Example::               An easy way to update edition information.
11511 @end menu
11514 @node ifset ifclear, value, set clear value, set clear value
11515 @subsection @code{@@ifset} and @code{@@ifclear}
11517 @findex ifset
11518 When a @var{flag} is set, the Texinfo formatting commands format text
11519 between subsequent pairs of @code{@@ifset @var{flag}} and @code{@@end
11520 ifset} commands.  When the @var{flag} is cleared, the Texinfo formatting
11521 commands do @emph{not} format the text.
11523 Use the @code{@@set @var{flag}} command to turn on, or @dfn{set}, a
11524 @var{flag}; a @dfn{flag} can be any single word.  The format for the
11525 command looks like this:@refill
11526 @findex set
11528 @example
11529 @@set @var{flag}
11530 @end example
11532 Write the conditionally formatted text between @code{@@ifset @var{flag}}
11533 and @code{@@end ifset} commands, like this:@refill
11535 @example
11536 @group
11537 @@ifset @var{flag}
11538 @var{conditional-text}
11539 @@end ifset
11540 @end group
11541 @end example
11543 For example, you can create one document that has two variants, such as
11544 a manual for a `large' and `small' model:@refill
11546 @example
11547 You can use this machine to dig up shrubs
11548 without hurting them.
11550 @@set large
11552 @@ifset large
11553 It can also dig up fully grown trees.
11554 @@end ifset
11556 Remember to replant promptly @dots{}
11557 @end example
11559 @noindent
11560 In the example, the formatting commands will format the text between
11561 @code{@@ifset large} and @code{@@end ifset} because the @code{large}
11562 flag is set.@refill
11564 @findex clear
11565 Use the @code{@@clear @var{flag}} command to turn off, or @dfn{clear},
11566 a flag.  Clearing a flag is the opposite of setting a flag.  The
11567 command looks like this:@refill
11569 @example
11570 @@clear @var{flag}
11571 @end example
11573 @noindent
11574 Write the command on a line of its own.
11576 When @var{flag} is cleared, the Texinfo formatting commands do
11577 @emph{not} format the text between @code{@@ifset @var{flag}} and
11578 @code{@@end ifset}; that text is ignored and does not appear in either
11579 printed or Info output.@refill
11581 For example, if you clear the flag of the preceding example by writing
11582 an @code{@@clear large} command after the @code{@@set large} command
11583 (but before the conditional text), then the Texinfo formatting commands
11584 ignore the text between the @code{@@ifset large} and @code{@@end ifset}
11585 commands.  In the formatted output, that text does not appear; in both
11586 printed and Info output, you see only the lines that say, ``You can use
11587 this machine to dig up shrubs without hurting them.  Remember to replant
11588 promptly @dots{}''.
11590 @findex ifclear
11591 If a flag is cleared with an @code{@@clear @var{flag}} command, then
11592 the formatting commands format text between subsequent pairs of
11593 @code{@@ifclear} and @code{@@end ifclear} commands.  But if the flag
11594 is set with @code{@@set @var{flag}}, then the formatting commands do
11595 @emph{not} format text between an @code{@@ifclear} and an @code{@@end
11596 ifclear} command; rather, they ignore that text.  An @code{@@ifclear}
11597 command looks like this:@refill
11599 @example
11600 @@ifclear @var{flag}
11601 @end example
11603 @need 700
11604 In brief, the commands are:@refill
11606 @table @code
11607 @item @@set @var{flag}
11608 Tell the Texinfo formatting commands that @var{flag} is set.@refill
11610 @item @@clear @var{flag}
11611 Tell the Texinfo formatting commands that @var{flag} is cleared.@refill
11613 @item @@ifset @var{flag}
11614 If @var{flag} is set, tell the Texinfo formatting commands to format
11615 the text up to the following @code{@@end ifset} command.@refill
11617 If @var{flag} is cleared, tell the Texinfo formatting commands to
11618 ignore text up to the following @code{@@end ifset} command.@refill
11620 @item @@ifclear @var{flag}
11621 If @var{flag} is set, tell the Texinfo formatting commands to ignore
11622 the text up to the following @code{@@end ifclear} command.@refill
11624 If @var{flag} is cleared, tell the Texinfo formatting commands to
11625 format the text up to the following @code{@@end ifclear}
11626 command.@refill
11627 @end table
11629 @node value, value Example, ifset ifclear, set clear value
11630 @subsection @code{@@value}
11631 @findex value
11633 You can use the @code{@@set} command to specify a value for a flag,
11634 which is expanded by the @code{@@value} command.  The value is a string
11635 a characters.
11637 Write the @code{@@set} command like this:
11639 @example
11640 @@set foo This is a string.
11641 @end example
11643 @noindent
11644 This sets the value of @code{foo} to ``This is a string.''
11646 The Texinfo formatters replace an @code{@@value@{@var{flag}@}} command with
11647 the string to which @var{flag} is set.@refill
11649 Thus, when @code{foo} is set as shown above, the Texinfo formatters convert
11651 @example
11652 @group
11653 @@value@{foo@}
11654 @exdent @r{to}
11655 This is a string.
11656 @end group
11657 @end example
11659 You can write an @code{@@value} command within a paragraph; but you
11660 must write an @code{@@set} command on a line of its own.
11662 If you write the @code{@@set} command like this:
11664 @example
11665 @@set foo
11666 @end example
11668 @noindent
11669 without specifying a string, the value of @code{foo} is an empty string.
11671 If you clear a previously set flag with an @code{@@clear @var{flag}}
11672 command, a subsequent @code{@@value@{flag@}} command is invalid and the
11673 string is replaced with an error message that says @samp{@{No value for
11674 "@var{flag}"@}}.
11676 For example, if you set @code{foo} as follows:@refill
11678 @example
11679 @@set how-much very, very, very
11680 @end example
11682 @noindent
11683 then the formatters transform
11685 @example
11686 @group
11687 It is a @@value@{how-much@} wet day.
11688 @exdent @r{into}
11689 It is a very, very, very wet day.
11690 @end group
11691 @end example
11693 If you write
11695 @example
11696 @@clear how-much
11697 @end example
11699 @noindent
11700 then the formatters transform
11702 @example
11703 @group
11704 It is a @@value@{how-much@} wet day.
11705 @exdent @r{into}
11706 It is a @{No value for "how-much"@} wet day.
11707 @end group
11708 @end example
11710 @node value Example,  , value, set clear value
11711 @subsection @code{@@value} Example
11713 You can use the @code{@@value} command to limit the number of places you
11714 need to change when you record an update to a manual.
11715 Here is how it is done in @cite{The GNU Make Manual}:
11717 @need 1000
11718 @noindent
11719 Set the flags:
11721 @example
11722 @group
11723 @@set EDITION 0.35 Beta
11724 @@set VERSION 3.63 Beta
11725 @@set UPDATED 14 August 1992
11726 @@set UPDATE-MONTH August 1992
11727 @end group
11728 @end example
11730 @need 750
11731 @noindent
11732 Write text for the first @code{@@ifinfo} section, for people reading the
11733 Texinfo file:
11735 @example
11736 @group
11737 This is Edition @@value@{EDITION@},
11738 last updated @@value@{UPDATED@},
11739 of @@cite@{The GNU Make Manual@},
11740 for @@code@{make@}, Version @@value@{VERSION@}.
11741 @end group
11742 @end example
11744 @need 1000
11745 @noindent
11746 Write text for the title page, for people reading the printed manual:
11747 @c List only the month and the year since that looks less fussy on a
11748 @c printed cover than a date that lists the day as well.
11750 @example
11751 @group
11752 @@title GNU Make
11753 @@subtitle A Program for Directing Recompilation
11754 @@subtitle Edition @@value@{EDITION@}, @dots{}
11755 @@subtitle @@value@{UPDATE-MONTH@}
11756 @end group
11757 @end example
11759 @noindent
11760 (On a printed cover, a date listing the month and the year looks less
11761 fussy than a date listing the day as well as the month and year.)
11763 @need 750
11764 @noindent
11765 Write text for the Top node, for people reading the Info file:
11767 @example
11768 @group
11769 This is Edition @@value@{EDITION@}
11770 of the @@cite@{GNU Make Manual@},
11771 last updated @@value@{UPDATED@}
11772 for @@code@{make@} Version @@value@{VERSION@}.
11773 @end group
11774 @end example
11776 @need 950
11777 After you format the manual, the text in the first @code{@@ifinfo}
11778 section looks like this:
11780 @example
11781 @group
11782 This is Edition 0.35 Beta, last updated 14 August 1992,
11783 of `The GNU Make Manual', for `make', Version 3.63 Beta.
11784 @end group
11785 @end example
11787 When you update the manual, change only the values of the flags; you do
11788 not need to rewrite the three sections.
11791 @node Macros, Format/Print Hardcopy, Conditionals, Top
11792 @chapter Macros: Defining New Texinfo Commands
11793 @cindex Macros
11794 @cindex Defining new Texinfo commands
11795 @cindex New Texinfo commands, defining
11796 @cindex Texinfo commands, defining new
11797 @cindex User-defined Texinfo commands
11799 A Texinfo @dfn{macro} allows you to define a new Texinfo command as any
11800 sequence of text and/or existing commands (including other macros).  The
11801 macro can have any number of @dfn{parameters}---text you supply each
11802 time you use the macro.  (This has nothing to do with the
11803 @code{@@defmac} command, which is for documenting macros in the subject
11804 of the manual; @pxref{Def Cmd Template}.)
11806 @menu
11807 * Defining Macros::             Both defining and undefining new commands.
11808 * Invoking Macros::             Using a macro, once you've defined it.
11809 @end menu
11812 @node Defining Macros, Invoking Macros, Macros, Macros
11813 @section Defining Macros
11814 @cindex Defining macros
11815 @cindex Macro definitions
11817 @findex macro
11818 You use the Texinfo @code{@@macro} command to define a macro.  For example:
11820 @example
11821 @@macro @var{macro-name}@{@var{param1}, @var{param2}, @dots{}@}
11822 @var{text} @dots{} \@var{param1}\ @dots{}
11823 @@end macro
11824 @end example
11826 The @dfn{parameters} @var{param1}, @var{param2}, @dots{} correspond to
11827 arguments supplied when the macro is subsequently used in the document
11828 (see the next section).
11830 If a macro needs no parameters, you can define it either with an empty
11831 list (@samp{@@macro foo @{@}}) or with no braces at all (@samp{@@macro
11832 foo}).
11834 @cindex Body of a macro
11835 @cindex Mutually recursive macros
11836 @cindex Recursion, mutual
11837 The definition or @dfn{body} of the macro can contain any Texinfo
11838 commands, including previously-defined macros.  (It is not possible to
11839 have mutually recursive Texinfo macros.)  In the body, instances of a
11840 parameter name surrounded by backslashes, as in @samp{\@var{param1}\} in
11841 the example above, are replaced by the corresponding argument from the
11842 macro invocation.
11844 @findex unmacro
11845 @cindex Macros, undefining
11846 @cindex Undefining macros
11847 You can undefine a macro @var{foo} with @code{@@unmacro @var{foo}}.
11848 It is not an error to undefine a macro that is already undefined.
11849 For example:
11851 @example
11852 @@unmacro foo
11853 @end example
11856 @node Invoking Macros,  , Defining Macros, Macros
11857 @section Invoking Macros
11858 @cindex Invoking macros
11859 @cindex Macro invocation
11861 After a macro is defined (see the previous section), you can use
11862 (@dfn{invoke}) it in your document like this:
11864 @example
11865 @@@var{macro-name} @{@var{arg1}, @var{arg2}, @dots{}@}
11866 @end example
11868 @noindent and the result will be just as if you typed the body of
11869 @var{macro-name} at that spot.  For example:
11871 @example
11872 @@macro foo @{p, q@}
11873 Together: \p\ & \q\.
11874 @@end macro
11875 @@foo@{a, b@}
11876 @end example
11878 @noindent produces:
11880 @display
11881 Together: a & b.
11882 @end display
11884 @cindex Backslash, and macros
11885 Thus, the arguments and parameters are separated by commas and delimited
11886 by braces; any whitespace after (but not before) a comma is ignored.  To
11887 insert a comma, brace, or backslash in an argument, prepend a backslash,
11888 as in
11890 @example
11891 @@@var{macro-name} @{\\\@{\@}\,@}
11892 @end example
11894 @noindent
11895 which will pass the (almost certainly error-producing) argument
11896 @samp{\@{@},} to @var{macro-name}.
11898 If the macro is defined to take a single argument, and is invoked
11899 without any braces, the entire rest of the line after the macro name is
11900 supplied as the argument.  For example:
11902 @example
11903 @@macro bar @{p@}
11904 Twice: \p\, \p\.
11905 @@end macro
11906 @@bar aah
11907 @end example
11909 @noindent produces:
11911 @display
11912 Twice: aah, aah.
11913 @end display
11916 @node Format/Print Hardcopy, Create an Info File, Macros, Top
11917 @comment  node-name,  next,  previous,  up
11918 @chapter Format and Print Hardcopy
11919 @cindex Format and print hardcopy
11920 @cindex Hardcopy, printing it
11921 @cindex Making a printed manual
11922 @cindex Sorting indices
11923 @cindex Indices, sorting
11924 @cindex @TeX{} index sorting
11925 @pindex texindex
11927 There are three major shell commands for making a printed manual from a
11928 Texinfo file: one for converting the Texinfo file into a file that will be
11929 printed, a second for sorting indices, and a third for printing the
11930 formatted document.  When you use the shell commands, you can either
11931 work directly in the operating system shell or work within a shell
11932 inside GNU Emacs.@refill
11934 If you are using GNU Emacs, you can use commands provided by Texinfo
11935 mode instead of shell commands.  In addition to the three commands to
11936 format a file, sort the indices, and print the result, Texinfo mode
11937 offers key bindings for commands to recenter the output buffer, show the
11938 print queue, and delete a job from the print queue.@refill
11940 @menu
11941 * Use TeX::                     Use @TeX{} to format for hardcopy.
11942 * Format with tex/texindex::    How to format in a shell.
11943 * Format with texi2dvi::        A simpler way to use the shell.
11944 * Print with lpr::              How to print.
11945 * Within Emacs::                How to format and print from an Emacs shell.
11946 * Texinfo Mode Printing::       How to format and print in Texinfo mode.
11947 * Compile-Command::             How to print using Emacs's compile command.
11948 * Requirements Summary::        @TeX{} formatting requirements summary.
11949 * Preparing for TeX::           What you need to do to use @TeX{}.
11950 * Overfull hboxes::             What are and what to do with overfull hboxes.
11951 * smallbook::                   How to print small format books and manuals.
11952 * A4 Paper::                    How to print on European A4 paper.
11953 * Cropmarks and Magnification::  How to print marks to indicate the size
11954                                 of pages and how to print scaled up output.
11955 @end menu
11957 @node Use TeX, Format with tex/texindex, Format/Print Hardcopy, Format/Print Hardcopy
11958 @ifinfo
11959 @heading Use @TeX{}
11960 @end ifinfo
11962 The typesetting program called @TeX{} is used for formatting a Texinfo
11963 file.  @TeX{} is a very powerful typesetting program and, if used right,
11964 does an exceptionally good job.  (@xref{Obtaining TeX, , How to Obtain
11965 @TeX{}}, for information on how to obtain @TeX{}.)
11967 The @code{makeinfo}, @code{texinfo-format-region}, and
11968 @code{texinfo-format-buffer} commands read the very same @@-commands
11969 in the Texinfo file as does @TeX{}, but process them differently to
11970 make an Info file; see @ref{Create an Info File}.@refill
11972 @node Format with tex/texindex, Format with texi2dvi, Use TeX, Format/Print Hardcopy
11973 @comment  node-name,  next,  previous,  up
11974 @section Format using @code{tex} and @code{texindex}
11975 @cindex Shell formatting with @code{tex} and @code{texindex}
11976 @cindex Formatting with @code{tex} and @code{texindex}
11977 @cindex DVI file
11979 Format the Texinfo file with the shell command @code{tex} followed by
11980 the name of the Texinfo file.  For example:
11982 @example
11983 tex foo.texi
11984 @end example
11986 @noindent @TeX{} will produce a @dfn{DVI file} as well as several auxiliary
11987 files containing information for indices, cross references, etc.  The
11988 DVI file (for @dfn{DeVice Independent} file) can be printed on virtually
11989 any printe (see the following sections).
11991 @pindex texindex
11992 The @code{tex} formatting command itself does not sort the indices; it
11993 writes an output file of unsorted index data.  (The @code{texi2dvi}
11994 command automatically generates indices; see @ref{Format with texi2dvi,,
11995 Format using @code{texi2dvi}}.)  To generate a printed index after
11996 running the @code{tex} command, you first need a sorted index to work
11997 from.  The @code{texindex} command sorts indices.  (The source file
11998 @file{texindex.c} comes as part of the standard Texinfo distribution,
11999 among other places.)@refill
12001 @cindex Names of index files
12002 The @code{tex} formatting command outputs unsorted index files under
12003 names that obey a standard convention: the name of your main input file
12004 with any @samp{.tex} (or similar, @pxref{tex invocation,,, web2c,
12005 Web2c}) extension removed, followed by the two letter names of indices.
12006 For example, the raw index output files for the input file
12007 @file{foo.texinfo} would be @file{foo.cp}, @file{foo.vr}, @file{foo.fn},
12008 @file{foo.tp}, @file{foo.pg} and @file{foo.ky}.  Those are exactly the
12009 arguments to give to @code{texindex}.@refill
12011 @need 1000
12012 @cindex Wildcards
12013 @cindex Globbing
12014 Instead of specifying all the unsorted index file names explicitly, you
12015 can use @samp{??} as shell wildcards and give the command in this
12016 form:@refill
12018 @example
12019 texindex foo.??
12020 @end example
12022 @noindent
12023 This command will run @code{texindex} on all the unsorted index files,
12024 including any that you have defined yourself using @code{@@defindex}
12025 or @code{@@defcodeindex}.  (You may execute @samp{texindex foo.??}
12026 even if there are similarly named files with two letter extensions
12027 that are not index files, such as @samp{foo.el}.  The @code{texindex}
12028 command reports but otherwise ignores such files.)@refill
12030 For each file specified, @code{texindex} generates a sorted index file
12031 whose name is made by appending @samp{s} to the input file name.  The
12032 @code{@@printindex} command knows to look for a file of that name
12033 (@pxref{Printing Indices & Menus}).  @code{texindex} does not alter the
12034 raw index output file.@refill
12036 After you have sorted the indices, you need to rerun the @code{tex}
12037 formatting command on the Texinfo file.  This regenerates the DVI file,
12038 this time with up-to-date index entries.
12040 Finally, you may need to run @code{tex} one more time, to get the page
12041 numbers in the cross-references correct.
12043 To summarize, this is a four step process:
12045 @enumerate
12046 @item
12047 Run @code{tex} on your Texinfo file.  This generates a DVI file (with
12048 undefined cross-references and no indices), and the raw index files
12049 (with two letter extensions).
12051 @item
12052 Run @code{texindex} on the raw index files.  This creates the
12053 corresponding sorted index files (with three letter extensions).
12055 @item
12056 Run @code{tex} again on your Texinfo file.  This regenerates the DVI
12057 file, this time with indices and defined cross-references, but with page
12058 numbers for the cross-references from last time, generally incorrect.
12060 @item
12061 Run @code{tex} one last time.  This time the correct page numbers are
12062 written for the cross-references.
12063 @end enumerate
12065 @pindex texi2dvi
12066 Alternatively, it's a one-step process: run @code{texi2dvi}.
12068 You need not run @code{texindex} each time after you run @code{tex}.  If
12069 you do not, on the next run, the @code{tex} formatting command will use
12070 whatever sorted index files happen to exist from the previous use of
12071 @code{texindex}.  This is usually ok while you are
12072 debugging.@refill
12074 @node Format with texi2dvi, Print with lpr, Format with tex/texindex, Format/Print Hardcopy
12075 @comment  node-name,  next,  previous,  up
12076 @section Format using @code{texi2dvi}
12077 @pindex texi2dvi @r{(shell script)}
12079 The @code{texi2dvi} command is a shell script that automatically runs
12080 both @code{tex} and @code{texindex} as many times as necessary to
12081 produce a DVI file with up-to-date, sorted indices.  It simplifies the
12082 @code{tex}---@code{texindex}---@code{tex} sequence described in the
12083 previous section.
12085 @need 1000
12086 The syntax for @code{texi2dvi} is like this (where @samp{prompt$} is the
12087 shell prompt):@refill
12089 @example
12090 prompt$ @kbd{texi2dvi @var{filename}@dots{}}
12091 @end example
12093 @node Print with lpr, Within Emacs, Format with texi2dvi, Format/Print Hardcopy
12094 @comment  node-name,  next,  previous,  up
12095 @section Shell Print Using @code{lpr -d}
12096 @pindex lpr @r{(DVI print command)}
12098 The precise command to print a DVI file depends on your system
12099 installation, but @samp{lpr -d} is common.  The command may require the
12100 DVI file name without any extension or with a @samp{.dvi}
12101 extension.  (If it is @samp{lpr}, you must include the @samp{.dvi}.)
12103 The following commands, for example, will (probably) suffice to sort the
12104 indices, format, and print the @cite{Bison Manual}:
12106 @example
12107 @group
12108 tex bison.texinfo
12109 texindex bison.??
12110 tex bison.texinfo
12111 lpr -d bison.dvi
12112 @end group
12113 @end example
12115 @noindent
12116 (Remember that the shell commands may be different at your site; but
12117 these are commonly used versions.)@refill
12119 @need 1000
12120 Using the @code{texi2dvi} shell script, you simply need type:@refill
12122 @example
12123 @group
12124 texi2dvi bison.texinfo
12125 lpr -d bison.dvi
12126 @end group
12127 @end example
12129 @node Within Emacs, Texinfo Mode Printing, Print with lpr, Format/Print Hardcopy
12130 @comment  node-name,  next,  previous,  up
12131 @section From an Emacs Shell
12132 @cindex Print, format from Emacs shell
12133 @cindex Format, print from Emacs shell
12134 @cindex Shell, format, print from
12135 @cindex Emacs shell, format, print from
12136 @cindex GNU Emacs shell, format, print from
12138 You can give formatting and printing commands from a shell within GNU
12139 Emacs.  To create a shell within Emacs, type @kbd{M-x shell}.  In this
12140 shell, you can format and print the document.  @xref{Format/Print
12141 Hardcopy, , Format and Print Hardcopy}, for details.@refill
12143 You can switch to and from the shell buffer while @code{tex} is
12144 running and do other editing.  If you are formatting a long document
12145 on a slow machine, this can be very convenient.@refill
12147 You can also use @code{texi2dvi} from an Emacs shell.  For example,
12148 here is how to use @code{texi2dvi} to format and print @cite{Using and
12149 Porting GNU CC} from a shell within Emacs:
12151 @example
12152 @group
12153 texi2dvi gcc.texinfo
12154 lpr -d gcc.dvi
12155 @end group
12156 @end example
12157 @ifinfo
12159 @xref{Texinfo Mode Printing}, for more information about formatting
12160 and printing in Texinfo mode.@refill
12161 @end ifinfo
12163 @node Texinfo Mode Printing, Compile-Command, Within Emacs, Format/Print Hardcopy
12164 @section Formatting and Printing in Texinfo Mode
12165 @cindex Region printing in Texinfo mode
12166 @cindex Format and print in Texinfo mode
12167 @cindex Print and format in Texinfo mode
12169 Texinfo mode provides several predefined key commands for @TeX{}
12170 formatting and printing.  These include commands for sorting indices,
12171 looking at the printer queue, killing the formatting job, and
12172 recentering the display of the buffer in which the operations
12173 occur.@refill
12175 @table @kbd
12176 @item C-c C-t C-b
12177 @itemx M-x texinfo-tex-buffer
12178 Run @code{texi2dvi} on the current buffer.@refill
12180 @item C-c C-t C-r
12181 @itemx M-x texinfo-tex-region
12182 Run @TeX{} on the current region.@refill
12184 @item C-c C-t C-i
12185 @itemx M-x texinfo-texindex
12186 Sort the indices of a Texinfo file formatted with
12187 @code{texinfo-tex-region}.@refill
12189 @item C-c C-t C-p
12190 @itemx M-x texinfo-tex-print
12191 Print a DVI file that was made with @code{texinfo-tex-region} or
12192 @code{texinfo-tex-buffer}.@refill
12194 @item C-c C-t C-q
12195 @itemx M-x tex-show-print-queue
12196 Show the print queue.@refill
12198 @item C-c C-t C-d
12199 @itemx M-x texinfo-delete-from-print-queue
12200 Delete a job from the print queue; you will be prompted for the job
12201 number shown by a preceding @kbd{C-c C-t C-q} command
12202 (@code{texinfo-show-tex-print-queue}).@refill
12204 @item C-c C-t C-k
12205 @itemx M-x tex-kill-job
12206 Kill the currently running @TeX{} job started by
12207 @code{texinfo-tex-region} or @code{texinfo-tex-buffer}, or any other
12208 process running in the Texinfo shell buffer.@refill
12210 @item C-c C-t C-x
12211 @itemx M-x texinfo-quit-job
12212 Quit a @TeX{} formatting job that has stopped because of an error by
12213 sending an @key{x} to it.  When you do this, @TeX{} preserves a record
12214 of what it did in a @file{.log} file.@refill
12216 @item C-c C-t C-l
12217 @itemx M-x tex-recenter-output-buffer
12218 Redisplay the shell buffer in which the @TeX{} printing and formatting
12219 commands are run to show its most recent output.@refill
12220 @end table
12222 @need 1000
12223 Thus, the usual sequence of commands for formatting a buffer is as
12224 follows (with comments to the right):@refill
12226 @example
12227 @group
12228 C-c C-t C-b             @r{Run @code{texi2dvi} on the buffer.}
12229 C-c C-t C-p             @r{Print the DVI file.}
12230 C-c C-t C-q             @r{Display the printer queue.}
12231 @end group
12232 @end example
12234 The Texinfo mode @TeX{} formatting commands start a subshell in Emacs
12235 called the @file{*tex-shell*}.  The @code{texinfo-tex-command},
12236 @code{texinfo-texindex-command}, and @code{tex-dvi-print-command}
12237 commands are all run in this shell.
12239 You can watch the commands operate in the @samp{*tex-shell*} buffer,
12240 and you can switch to and from and use the @samp{*tex-shell*} buffer
12241 as you would any other shell buffer.@refill
12243 @need 1500
12244 The formatting and print commands depend on the values of several variables.
12245 The default values are:@refill
12247 @example
12248 @group
12249      @r{Variable}                              @r{Default value}
12251 texinfo-texi2dvi-command                  "texi2dvi"
12252 texinfo-tex-command                       "tex"
12253 texinfo-texindex-command                  "texindex"
12254 texinfo-delete-from-print-queue-command   "lprm"
12255 texinfo-tex-trailer                       "@@bye"
12256 tex-start-of-header                       "%**start"
12257 tex-end-of-header                         "%**end"
12258 tex-dvi-print-command                     "lpr -d"
12259 tex-show-queue-command                    "lpq"
12260 @end group
12261 @end example
12263 You can change the values of these variables with the @kbd{M-x
12264 edit-options} command (@pxref{Edit Options, , Editing Variable Values,
12265 emacs, The GNU Emacs Manual}), with the @kbd{M-x set-variable} command
12266 (@pxref{Examining, , Examining and Setting Variables, emacs, The GNU
12267 Emacs Manual}), or with your @file{.emacs} initialization file
12268 (@pxref{Init File, , , emacs, The GNU Emacs Manual}).@refill
12270 @node Compile-Command, Requirements Summary, Texinfo Mode Printing, Format/Print Hardcopy
12271 @comment  node-name,  next,  previous,  up
12272 @section Using the Local Variables List
12273 @cindex Local variables
12274 @cindex Compile command for formatting
12275 @cindex Format with the compile command
12277 Yet another way to apply the @TeX{} formatting command to a Texinfo file
12278 is to put that command in a @dfn{local variables list} at the end of the
12279 Texinfo file.  You can then specify the @code{tex} or @code{texi2dvi}
12280 commands as a @code{compile-command} and have Emacs run it by typing
12281 @kbd{M-x compile}.  This creates a special shell called the
12282 @file{*compilation*} buffer in which Emacs runs the compile command.
12283 For example, at the end of the @file{gdb.texinfo} file, after the
12284 @code{@@bye}, you could put the following:@refill
12286 @example
12287 @group
12288 Local Variables:
12289 compile-command: "texi2dvi gdb.texinfo"
12290 End:
12291 @end group
12292 @end example
12294 @noindent
12295 This technique is most often used by programmers who also compile programs
12296 this way; see @ref{Compilation, , , emacs, The GNU Emacs Manual}.@refill
12299 @node Requirements Summary, Preparing for TeX, Compile-Command, Format/Print Hardcopy
12300 @comment  node-name,  next,  previous,  up
12301 @section @TeX{} Formatting Requirements Summary
12302 @cindex Requirements for formatting
12303 @cindex Minimal requirements for formatting
12304 @cindex Formatting requirements
12306 Every Texinfo file that is to be input to @TeX{} must begin with a
12307 @code{\input} command and must contain an @code{@@setfilename} command:
12309 @example
12310 \input texinfo
12311 @@setfilename @var{arg-not-used-by-@TeX{}}
12312 @end example
12314 @noindent
12315 The first command instructs @TeX{} to load the macros it needs to
12316 process a Texinfo file and the second command opens auxiliary files.
12318 Every Texinfo file must end with a line that terminates @TeX{}'s
12319 processing and forces out unfinished pages:
12321 @example
12322 @@bye
12323 @end example
12325 Strictly speaking, these lines are all a Texinfo file needs to be
12326 processed successfully by @TeX{}.  
12328 Usually, however, the beginning includes an @code{@@settitle} command to
12329 define the title of the printed manual, an @code{@@setchapternewpage}
12330 command, a title page, a copyright page, and permissions.  Besides an
12331 @code{@@bye}, the end of a file usually includes indices and a table of
12332 contents.  (And of course most manuals contain a body of text as well.)
12334 @iftex
12335 For more information, see
12336 @ref{settitle, , @code{@@settitle}},
12337 @ref{setchapternewpage, , @code{@@setchapternewpage}},
12338 @ref{Headings, ,Page Headings},
12339 @ref{Titlepage & Copyright Page},
12340 @ref{Printing Indices & Menus}, and
12341 @ref{Contents}.
12342 @end iftex
12343 @noindent
12344 @ifinfo
12345 For more information, see@*
12346 @ref{settitle, , @code{@@settitle}},@*
12347 @ref{setchapternewpage, , @code{@@setchapternewpage}},@*
12348 @ref{Headings, ,Page Headings},@*
12349 @ref{Titlepage & Copyright Page},@*
12350 @ref{Printing Indices & Menus}, and@*
12351 @ref{Contents}.
12352 @end ifinfo
12355 @node Preparing for TeX, Overfull hboxes, Requirements Summary, Format/Print Hardcopy
12356 @comment  node-name,  next,  previous,  up
12357 @section Preparing to Use @TeX{}
12358 @cindex Preparing to use @TeX{}
12359 @cindex @TeX{} input initialization
12360 @cindex @code{TEXINPUTS} environment variable
12361 @vindex TEXINPUTS
12362 @cindex @b{.profile} initialization file
12363 @cindex @b{.cshrc} initialization file
12364 @cindex Initialization file for @TeX{} input
12366 @TeX{} needs to know where to find the @file{texinfo.tex} file that you
12367 have told it to input with the @samp{\input texinfo} command at the
12368 beginning of the first line.  The @file{texinfo.tex} file tells @TeX{}
12369 how to handle @@-commands; it is included in all standard GNU
12370 distributions.
12372 @pindex texinfo.tex@r{, installing}
12373 Usually, the @file{texinfo.tex} file is put under the default directory
12374 that contains @TeX{} macros
12375 (@file{/usr/local/share/texmf/tex/texinfo/texinfo.tex} by default) when
12376 GNU Emacs or other GNU software is installed.  In this case, @TeX{} will
12377 find the file and you do not need to do anything special.
12378 Alternatively, you can put @file{texinfo.tex} in the current directory
12379 when you run @TeX{}, and @TeX{} will find it there.
12381 @pindex epsf.tex@r{, installing}
12382 Also, you should install @file{epsf.tex} in the same place as
12383 @file{texinfo.tex}, if it is not already installed from another
12384 distribution.  This file is needed to support the @code{@@image} command
12385 (@pxref{Images}).
12387 @pindex texinfo.cnf @r{installation}
12388 @cindex Customizing of @TeX{} for Texinfo
12389 @cindex Site-wide Texinfo configuration file
12390 Optionally, you may create an additional @file{texinfo.cnf}, and install
12391 it as well.  This file is read by @TeX{} at the @code{@@setfilename}
12392 command (@pxref{setfilename,, @code{@@setfilename}}).  You can put any
12393 commands you like there according to local site-wide conventions, and
12394 they will be read by @TeX{} when processing any Texinfo document.  For
12395 example, if @file{texinfo.cnf} contains the a single line
12396 @samp{@@afourpaper} (@pxref{A4 Paper}), then all Texinfo documents will
12397 be processed with that page size in effect.  If you have nothing to put
12398 in @file{texinfo.cnf}, you do not need to create it.
12400 @vindex TEXINPUTS
12401 If neither of the above locations for these system files suffice for
12402 you, you can specify the directories explicitly.  For
12403 @file{texinfo.tex}, you can do this by writing the complete path for the
12404 file after the @code{\input} command.  Another way, that works for both
12405 @file{texinfo.tex} and @file{texinfo.cnf} (and any other file @TeX{}
12406 might read), is to set the @code{TEXINPUTS} environment variable in your
12407 @file{.cshrc} or @file{.profile} file.
12409 Which you use of @file{.cshrc} or @file{.profile} depends on
12410 whether you use a Bourne shell-compatible (@code{sh}, @code{bash},
12411 @code{ksh}, @dots{}) or C shell-compatible (@code{csh}, @code{tcsh})
12412 command interpreter.  The latter read the @file{.cshrc} file for
12413 initialization information, and the former read @file{.profile}.
12415 In a @file{.cshrc} file, you could use the following @code{csh} command
12416 sequence:
12418 @example
12419 setenv TEXINPUTS .:/home/me/mylib:/usr/lib/tex/macros
12420 @end example
12422 @need 1000
12423 In a @file{.profile} file, you could use the following @code{sh} command
12424 sequence:
12426 @example
12427 @group
12428 TEXINPUTS=.:/home/me/mylib:/usr/lib/tex/macros
12429 export TEXINPUTS
12430 @end group
12431 @end example
12433 @noindent
12434 This would cause @TeX{} to look for @file{\input} file first in the current
12435 directory, indicated by the @samp{.}, then in a hypothetical user's
12436 @file{me/mylib} directory, and finally in a system directory.
12439 @node Overfull hboxes, smallbook, Preparing for TeX, Format/Print Hardcopy
12440 @comment  node-name,  next,  previous,  up
12441 @section Overfull ``hboxes''
12442 @cindex Overfull @samp{hboxes}
12443 @cindex @samp{hboxes}, overfull
12444 @cindex Final output
12446 @TeX{} is sometimes unable to typeset a line without extending it into
12447 the right margin.  This can occur when @TeX{} comes upon what it
12448 interprets as a long word that it cannot hyphenate, such as an
12449 electronic mail network address or a very long title.  When this
12450 happens, @TeX{} prints an error message like this:@refill
12452 @example
12453 Overfull \hbox (20.76302pt too wide)
12454 @end example
12456 @noindent
12457 (In @TeX{}, lines are in ``horizontal boxes'', hence the term, ``hbox''.
12458 The backslash, @samp{\}, is the @TeX{} equivalent of @samp{@@}.)@refill
12460 @TeX{} also provides the line number in the Texinfo source file and
12461 the text of the offending line, which is marked at all the places that
12462 @TeX{} knows how to hyphenate words.
12463 @xref{Debugging with TeX, , Catching Errors with @TeX{} Formatting},
12464 for more information about typesetting errors.@refill
12466 If the Texinfo file has an overfull hbox, you can rewrite the sentence
12467 so the overfull hbox does not occur, or you can decide to leave it.  A
12468 small excursion into the right margin often does not matter and may not
12469 even be noticeable.@refill
12471 @cindex Black rectangle in hardcopy
12472 @cindex Rectangle, ugly, black in hardcopy
12473 However, unless told otherwise, @TeX{} will print a large, ugly, black
12474 rectangle beside the line that contains the overfull hbox.  This is so
12475 you will notice the location of the problem if you are correcting a
12476 draft.@refill
12478 @need 1000
12479 @findex finalout
12480 To prevent such a monstrosity from marring your final printout, write
12481 the following in the beginning of the Texinfo file on a line of its own,
12482 before the @code{@@titlepage} command:@refill
12484 @example
12485 @@finalout
12486 @end example
12488 @node smallbook, A4 Paper, Overfull hboxes, Format/Print Hardcopy
12489 @comment  node-name,  next,  previous,  up
12490 @section Printing ``Small'' Books
12491 @findex smallbook
12492 @cindex Small book size
12493 @cindex Book, printing small
12494 @cindex Page sizes for books
12495 @cindex Size of printed book
12497 By default, @TeX{} typesets pages for printing in an 8.5 by 11 inch
12498 format.  However, you can direct @TeX{} to typeset a document in a 7 by
12499 9.25 inch format that is suitable for bound books by inserting the
12500 following command on a line by itself at the beginning of the Texinfo
12501 file, before the title page:@refill
12503 @example
12504 @@smallbook
12505 @end example
12507 @noindent
12508 (Since regular sized books are often about 7 by 9.25 inches, this
12509 command might better have been called the @code{@@regularbooksize}
12510 command, but it came to be called the @code{@@smallbook} command by
12511 comparison to the 8.5 by 11 inch format.)@refill
12513 If you write the @code{@@smallbook} command between the
12514 start-of-header and end-of-header lines, the Texinfo mode @TeX{}
12515 region formatting command, @code{texinfo-tex-region}, will format the
12516 region in ``small'' book size (@pxref{Start of Header}).@refill
12518 The Free Software Foundation distributes printed copies of @cite{The GNU
12519 Emacs Manual} and other manuals in the ``small'' book size.
12520 @xref{smallexample & smalllisp, , @code{@@smallexample} and
12521 @code{@@smalllisp}}, for information about commands that make it easier
12522 to produce examples for a smaller manual.@refill
12524 Alternatively, to avoid embedding this physical paper size in your
12525 document, use @code{texi2dvi} to format your document (@pxref{Format
12526 with texi2dvi}), and supply @samp{-t @@smallbook} as an argument.  Then
12527 other people do not have to change the document source file to format it
12528 differently.
12531 @node A4 Paper, Cropmarks and Magnification, smallbook, Format/Print Hardcopy
12532 @comment  node-name,  next,  previous,  up
12533 @section Printing on A4 Paper
12534 @cindex A4 paper, printing on
12535 @cindex Paper size, European A4
12536 @cindex European A4 paper
12537 @findex afourpaper
12539 You can tell @TeX{} to typeset a document for printing on European size
12540 A4 paper with the @code{@@afourpaper} command.  Write the command on a
12541 line by itself between @code{@@iftex} and @code{@@end iftex} lines near
12542 the beginning of the Texinfo file, before the title page:@refill
12544 For example, this is how you would write the header for this manual:@refill
12546 @example
12547 @group
12548 \input texinfo    @@c -*-texinfo-*-
12549 @@c %**start of header
12550 @@setfilename texinfo
12551 @@settitle Texinfo
12552 @@syncodeindex vr fn
12553 @@iftex
12554 @@afourpaper
12555 @@end iftex
12556 @@c %**end of header
12557 @end group
12558 @end example
12560 Alternatively, to avoid embedding this physical paper size in your
12561 document, use @code{texi2dvi} to format your document (@pxref{Format
12562 with texi2dvi}), and supply @samp{-t @@afourpaper} as an argument.  Then
12563 other people do not have to change the document source file to format it
12564 differently.
12566 @pindex texinfo.cnf
12567 Another alternative: put the @code{@@afourpaper} command in the file
12568 @file{texinfo.cnf} that @TeX{} will read.  (No need for @code{@@iftex}
12569 there.)  This will automatically typeset all the Texinfo documents at
12570 your site with that paper size in effect.
12573 @node Cropmarks and Magnification,  , A4 Paper, Format/Print Hardcopy
12574 @comment  node-name,  next,  previous,  up
12575 @section Cropmarks and Magnification
12577 @findex cropmarks
12578 @cindex Cropmarks for printing
12579 @cindex Printing cropmarks
12580 You can attempt to direct @TeX{} to print cropmarks at the corners of
12581 pages with the @code{@@cropmarks} command.  Write the @code{@@cropmarks}
12582 command on a line by itself between @code{@@iftex} and @code{@@end
12583 iftex} lines near the beginning of the Texinfo file, before the title
12584 page, like this:@refill
12586 @example
12587 @group
12588 @@iftex
12589 @@cropmarks
12590 @@end iftex
12591 @end group
12592 @end example
12594 This command is mainly for printers that typeset several pages on one
12595 sheet of film; but you can attempt to use it to mark the corners of a
12596 book set to 7 by 9.25 inches with the @code{@@smallbook} command.
12597 (Printers will not produce cropmarks for regular sized output that is
12598 printed on regular sized paper.)  Since different printing machines work
12599 in different ways, you should explore the use of this command with a
12600 spirit of adventure.  You may have to redefine the command in the
12601 @file{texinfo.tex} definitions file.@refill
12603 @findex mag @r{(@TeX{} command)}
12604 @cindex Magnified printing
12605 @cindex Larger or smaller pages
12606 You can attempt to direct @TeX{} to typeset pages larger or smaller than
12607 usual with the @code{\mag} @TeX{} command.  Everything that is typeset
12608 is scaled proportionally larger or smaller.  (@code{\mag} stands for
12609 ``magnification''.)  This is @emph{not} a Texinfo @@-command, but is a
12610 plain @TeX{} command that is prefixed with a backslash.  You have to
12611 write this command between @code{@@tex} and @code{@@end tex}
12612 (@pxref{Raw Formatter Commands}).
12614 Follow the @code{\mag} command with an @samp{=} and then a number that
12615 is 1000 times the magnification you desire.  For example, to print pages
12616 at 1.2 normal size, write the following near the beginning of the
12617 Texinfo file, before the title page:@refill
12619 @example
12620 @group
12621 @@tex
12622 \mag=1200
12623 @@end tex
12624 @end group
12625 @end example
12627 With some printing technologies, you can print normal-sized copies that
12628 look better than usual by using a larger-than-normal master.@refill
12630 Depending on your system, @code{\mag} may not work or may work only at
12631 certain magnifications.  Be prepared to experiment.@refill
12633 @node Create an Info File, Install an Info File, Format/Print Hardcopy, Top
12634 @comment  node-name,  next,  previous,  up
12635 @chapter Creating an Info File
12636 @cindex Creating an Info file
12637 @cindex Info, creating an on-line file
12638 @cindex Formatting a file for Info
12640 @code{makeinfo} is a utility that converts a Texinfo file into an Info
12641 file; @code{texinfo-format-region} and @code{texinfo-format-buffer} are
12642 GNU Emacs functions that do the same.@refill
12644 A Texinfo file must contain an @code{@@setfilename} line near its
12645 beginning, otherwise the Info formatting commands will fail.
12647 For information on installing the Info file in the Info system, see
12648 @ref{Install an Info File}.@refill
12650 @menu
12651 * makeinfo advantages::         @code{makeinfo} provides better error checking.
12652 * Invoking makeinfo::           How to run @code{makeinfo} from a shell.
12653 * makeinfo options::            Specify fill-column and other options.
12654 * Pointer Validation::          How to check that pointers point somewhere.
12655 * makeinfo in Emacs::           How to run @code{makeinfo} from Emacs.
12656 * texinfo-format commands::     Two Info formatting commands written
12657                                   in Emacs Lisp are an alternative
12658                                   to @code{makeinfo}.
12659 * Batch Formatting::            How to format for Info in Emacs Batch mode.
12660 * Tag and Split Files::         How tagged and split files help Info
12661                                   to run better.
12662 @end menu
12664 @node makeinfo advantages, Invoking makeinfo, Create an Info File, Create an Info File
12665 @ifinfo
12666 @heading @code{makeinfo} Preferred
12667 @end ifinfo
12669 The @code{makeinfo} utility creates an Info file from a Texinfo source
12670 file more quickly than either of the Emacs formatting commands and
12671 provides better error messages.  We recommend it.  @code{makeinfo} is a
12672 C program that is independent of Emacs.  You do not need to run Emacs to
12673 use @code{makeinfo}, which means you can use @code{makeinfo} on machines
12674 that are too small to run Emacs. You can run @code{makeinfo} in
12675 any one of three ways: from an operating system shell, from a shell
12676 inside Emacs, or by typing a key command in Texinfo mode in Emacs.
12677 @refill
12679 The @code{texinfo-format-region} and the @code{texinfo-format-buffer}
12680 commands are useful if you cannot run @code{makeinfo}.  Also, in some
12681 circumstances, they format short regions or buffers more quickly than
12682 @code{makeinfo}.@refill
12684 @node Invoking makeinfo, makeinfo options, makeinfo advantages, Create an Info File
12685 @section Running @code{makeinfo} from a Shell
12687 To create an Info file from a Texinfo file, type @code{makeinfo}
12688 followed by the name of the Texinfo file.  Thus, to create the Info
12689 file for Bison, type the following to the shell:
12690 is the prompt):@refill
12692 @example
12693 makeinfo bison.texinfo
12694 @end example
12696 (You can run a shell inside Emacs by typing @kbd{M-x shell}.)@refill
12698 @ifinfo
12699 Sometimes you will want to specify options.  For example, if you wish
12700 to discover which version of @code{makeinfo} you are using,
12701 type:@refill
12703 @example
12704 makeinfo --version
12705 @end example
12707 @xref{makeinfo options}, for more information.
12708 @end ifinfo
12711 @node makeinfo options, Pointer Validation, Invoking makeinfo, Create an Info File
12712 @comment  node-name,  next,  previous,  up
12713 @section Options for @code{makeinfo}
12714 @cindex @code{makeinfo} options
12715 @cindex Options for @code{makeinfo}
12717 The @code{makeinfo} command takes a number of options.  Most often,
12718 options are used to set the value of the fill column and specify the
12719 footnote style.  Each command line option is a word preceded by
12720 @samp{--} or a letter preceded by @samp{-}.  You can use abbreviations
12721 for the long option names as long as they are unique.@refill
12723 For example, you could use the following shell command to create an Info
12724 file for @file{bison.texinfo} in which each line is filled to only 68
12725 columns:@refill
12727 @example
12728 makeinfo --fill-column=68 bison.texinfo
12729 @end example
12731 You can write two or more options in sequence, like this:@refill
12733 @example
12734 makeinfo --no-split --fill-column=70 @dots{}
12735 @end example
12737 @noindent
12738 This would keep the Info file together as one possibly very long
12739 file and would also set the fill column to 70.@refill
12741 The options are:
12743 @table @code
12745 @item -D @var{var}
12746 @opindex -D @var{var}
12747 Cause the variable @var{var} to be defined.  This is equivalent to
12748 @code{@@set @var{var}} in the Texinfo file (@pxref{set clear value}).
12750 @item --error-limit=@var{limit}
12751 @opindex --error-limit=@var{limit}
12752 Set the maximum number of errors that @code{makeinfo} will report
12753 before exiting (on the assumption that continuing would be useless);
12754 default 100.
12756 @need 150
12757 @item --fill-column=@var{width}
12758 @opindex --fill-column=@var{width}
12759 Specify the maximum number of columns in a line; this is the right-hand
12760 edge of a line.  Paragraphs that are filled will be filled to this
12761 width.  (Filling is the process of breaking up and connecting lines so
12762 that lines are the same length as or shorter than the number specified
12763 as the fill column.  Lines are broken between words.) The default value
12764 is 72.
12766 @item --footnote-style=@var{style}
12767 @opindex --footnote-style=@var{style}
12768 Set the footnote style to @var{style}, either @samp{end} for the end
12769 node style (the default) or @samp{separate} for the separate node style.
12770 The value set by this option overrides the value set in a Texinfo file
12771 by an @code{@@footnotestyle} command (@pxref{Footnotes}).  When the
12772 footnote style is @samp{separate}, @code{makeinfo} makes a new node
12773 containing the footnotes found in the current node.  When the footnote
12774 style is @samp{end}, @code{makeinfo} places the footnote references at
12775 the end of the current node.
12777 @item --force
12778 @opindex --force
12779 Ordinarily, if the input file has errors, the output files are not
12780 created.  With this option, they are preserved.
12782 @item --help
12783 @opindex --help
12784 Print a usage message listing all available options, then exit successfully.
12786 @item -I @var{dir}
12787 @opindex -I @var{dir}
12788 Add @code{dir} to the directory search list for finding files that are
12789 included using the @code{@@include} command.  By default,
12790 @code{makeinfo} searches only the current directory.
12792 @item --no-headers
12793 @opindex --no-headers
12794 Do not include menus or node lines in the output.  This results in an
12795 @sc{ascii} file that you cannot read in Info since it does not contain
12796 the requisite nodes or menus. It is primarily useful to extract certain
12797 pieces of a manual into separate files to be included in a distribution,
12798 such as @file{INSTALL} files.
12800 @item --no-split
12801 @opindex --no-split
12802 Suppress the splitting stage of @code{makeinfo}.  By default, large
12803 output files (where the size is greater than 70k bytes) are split into
12804 smaller subfiles, each one approximately 50k bytes.
12806 @item --no-pointer-validate
12807 @itemx --no-validate
12808 @opindex --no-pointer-validate
12809 @opindex --no-validate
12810 Suppress the pointer-validation phase of @code{makeinfo}.  Normally,
12811 after a Texinfo file is processed, some consistency checks are made to
12812 ensure that cross references can be resolved, etc.
12813 @xref{Pointer Validation}.@refill
12815 @item --no-warn
12816 @opindex --no-warn
12817 Suppress warning messages (but @emph{not} error messages).  You might
12818 want this if the file you are creating has examples of Texinfo cross
12819 references within it, and the nodes that are referenced do not actually
12820 exist.
12822 @item --no-number-footnotes
12823 @opindex --no-number-footnotes
12824 Suppress automatic footnote numbering.  By default, @code{makeinfo}
12825 numbers each footnote sequentially in a single node, resetting the
12826 current footnote number to 1 at the start of each node.
12828 @item --output=@var{file}
12829 @itemx -o @var{file}
12830 @opindex --output=@var{file}
12831 @opindex -o @var{file}
12832 Specify that the output should be directed to @var{file} and not to the
12833 file name specified in the @code{@@setfilename} command found in the
12834 Texinfo source (@pxref{setfilename}).  If @var{file} is @samp{-}, output
12835 goes to standard output and @samp{--no-split} is implied.
12837 @item -P @var{dir}
12838 @opindex -P @var{dir}
12839 Prepend @code{dir} to the directory search list for @code{@@include}.
12840 See @samp{-I} for more details.
12842 @item --paragraph-indent=@var{indent}
12843 @opindex --paragraph-indent=@var{indent}
12844 Set the paragraph indentation style to @var{indent}.  The value set by
12845 this option overrides the value set in a Texinfo file by an
12846 @code{@@paragraphindent} command (@pxref{paragraphindent}).  The value
12847 of @var{indent} is interpreted as follows:
12849 @table @asis
12850 @item @samp{asis}
12851 Preserve any existing indentation at the starts of paragraphs.
12853 @item @samp{0} or @samp{none}
12854 Delete any existing indentation.
12856 @item @var{num}
12857 Indent each paragraph by that number of spaces.
12858 @end table
12860 @item --reference-limit=@var{limit}
12861 @opindex --reference-limit=@var{limit}
12862 Set the value of the number of references to a node that
12863 @code{makeinfo} will make without reporting a warning.  If a node has more
12864 than this number of references in it, @code{makeinfo} will make the
12865 references but also report a warning.  The default is 1000.
12867 @item -U @var{var}
12868 Cause @var{var} to be undefined.  This is equivalent to
12869 @code{@@clear @var{var}} in the Texinfo file (@pxref{set clear value}).
12871 @item --verbose
12872 @opindex --verbose
12873 Cause @code{makeinfo} to display messages saying what it is doing.
12874 Normally, @code{makeinfo} only outputs messages if there are errors or
12875 warnings.
12877 @item --version
12878 @opindex --version
12879 Print the version number, then exit successfully.
12881 @end table
12884 @node Pointer Validation, makeinfo in Emacs, makeinfo options, Create an Info File
12885 @section Pointer Validation
12886 @cindex Pointer validation with @code{makeinfo}
12887 @cindex Validation of pointers
12889 If you do not suppress pointer-validation, @code{makeinfo} will check
12890 the validity of the final Info file.  Mostly, this means ensuring that
12891 nodes you have referenced really exist.  Here is a complete list of what
12892 is checked:@refill
12894 @enumerate
12895 @item
12896 If a `Next', `Previous', or `Up' node reference is a reference to a
12897 node in the current file and is not an external reference such as to
12898 @file{(dir)}, then the referenced node must exist.@refill
12900 @item
12901 In every node, if the `Previous' node is different from the `Up' node,
12902 then the `Previous' node must also be pointed to by a `Next' node.@refill
12904 @item
12905 Every node except the `Top' node must have an `Up' pointer.@refill
12907 @item
12908 The node referenced by an `Up' pointer must contain a reference to the
12909 current node in some manner other than through a `Next' reference.
12910 This includes menu entries and cross references.@refill
12912 @item
12913 If the `Next' reference of a node is not the same as the `Next' reference
12914 of the `Up' reference, then the node referenced by the `Next' pointer
12915 must have a `Previous' pointer that points back to the current node.
12916 This rule allows the last node in a section to point to the first node
12917 of the next chapter.@refill
12918 @end enumerate
12920 @node makeinfo in Emacs, texinfo-format commands, Pointer Validation, Create an Info File
12921 @section Running @code{makeinfo} inside Emacs
12922 @cindex Running @code{makeinfo} in Emacs
12923 @cindex @code{makeinfo} inside Emacs
12924 @cindex Shell, running @code{makeinfo} in
12926 You can run @code{makeinfo} in GNU Emacs Texinfo mode by using either the
12927 @code{makeinfo-region} or the @code{makeinfo-buffer} commands.  In
12928 Texinfo mode, the commands are bound to @kbd{C-c C-m C-r} and @kbd{C-c
12929 C-m C-b} by default.@refill
12931 @table @kbd
12932 @item C-c C-m C-r
12933 @itemx M-x makeinfo-region
12934 Format the current region for Info.@refill
12935 @findex makeinfo-region
12937 @item C-c C-m C-b
12938 @itemx M-x makeinfo-buffer
12939 Format the current buffer for Info.@refill
12940 @findex makeinfo-buffer
12941 @end table
12943 When you invoke either @code{makeinfo-region} or
12944 @code{makeinfo-buffer}, Emacs prompts for a file name, offering the
12945 name of the visited file as the default.  You can edit the default
12946 file name in the minibuffer if you wish, before pressing @key{RET} to
12947 start the @code{makeinfo} process.@refill
12949 The Emacs @code{makeinfo-region} and @code{makeinfo-buffer} commands
12950 run the @code{makeinfo} program in a temporary shell buffer.  If
12951 @code{makeinfo} finds any errors, Emacs displays the error messages in
12952 the temporary buffer.@refill
12954 @cindex Errors, parsing
12955 @cindex Parsing errors
12956 @findex next-error
12957 You can parse the error messages by typing @kbd{C-x `}
12958 (@code{next-error}).  This causes Emacs to go to and position the
12959 cursor on the line in the Texinfo source that @code{makeinfo} thinks
12960 caused the error.  @xref{Compilation, , Running @code{make} or
12961 Compilers Generally, emacs, The GNU Emacs Manual}, for more
12962 information about using the @code{next-error} command.@refill
12964 In addition, you can kill the shell in which the @code{makeinfo}
12965 command is running or make the shell buffer display its most recent
12966 output.@refill
12968 @table @kbd
12969 @item C-c C-m C-k
12970 @itemx M-x makeinfo-kill-job
12971 @findex makeinfo-kill-job
12972 Kill the current running @code{makeinfo} job created by
12973 @code{makeinfo-region} or @code{makeinfo-buffer}.@refill
12975 @item C-c C-m C-l
12976 @itemx M-x makeinfo-recenter-output-buffer
12977 @findex makeinfo-recenter-output-buffer
12978 Redisplay the @code{makeinfo} shell buffer to display its most recent
12979 output.@refill
12980 @end table
12982 @noindent
12983 (Note that the parallel commands for killing and recentering a @TeX{}
12984 job are @kbd{C-c C-t C-k} and @kbd{C-c C-t C-l}.  @xref{Texinfo Mode
12985 Printing}.)@refill
12987 You can specify options for @code{makeinfo} by setting the
12988 @code{makeinfo-options} variable with either the @kbd{M-x
12989 edit-options} or the @kbd{M-x set-variable} command, or by setting the
12990 variable in your @file{.emacs} initialization file.@refill
12992 For example, you could write the following in your @file{.emacs} file:@refill
12994 @example
12995 @group
12996 (setq makeinfo-options
12997       "--paragraph-indent=0 --no-split
12998        --fill-column=70 --verbose")
12999 @end group
13000 @end example
13002 @c If you write these three cross references using xref, you see
13003 @c three references to the same named manual, which looks strange.
13004 @iftex
13005 For more information, see @ref{makeinfo options, , Options for
13006 @code{makeinfo}}, as well as ``Editing Variable Values,''``Examining and
13007 Setting Variables,'' and ``Init File'' in the @cite{The GNU Emacs
13008 Manual}.
13009 @end iftex
13010 @noindent
13011 @ifinfo
13012 For more information, see@*
13013 @ref{Edit Options, , Editing Variable Values, emacs, The GNU Emacs Manual},@*
13014 @ref{Examining, , Examining and Setting Variables, emacs, The GNU Emacs Manual},@*
13015 @ref{Init File, , , emacs, The GNU Emacs Manual}, and@*
13016 @ref{makeinfo options, , Options for @code{makeinfo}}.
13017 @end ifinfo
13019 @node texinfo-format commands, Batch Formatting, makeinfo in Emacs, Create an Info File
13020 @comment  node-name,  next,  previous,  up
13021 @section The @code{texinfo-format@dots{}} Commands
13022 @findex texinfo-format-region
13023 @findex texinfo-format-buffer
13025 In GNU Emacs in Texinfo mode, you can format part or all of a Texinfo
13026 file with the @code{texinfo-format-region} command.  This formats the
13027 current region and displays the formatted text in a temporary buffer
13028 called @samp{*Info Region*}.@refill
13030 Similarly, you can format a buffer with the
13031 @code{texinfo-format-buffer} command.  This command creates a new
13032 buffer and generates the Info file in it.  Typing @kbd{C-x C-s} will
13033 save the Info file under the name specified by the
13034 @code{@@setfilename} line which must be near the beginning of the
13035 Texinfo file.@refill
13037 @table @kbd
13038 @item C-c C-e C-r
13039 @itemx @code{texinfo-format-region}
13040 Format the current region for Info.
13041 @findex texinfo-format-region
13043 @item C-c C-e C-b
13044 @itemx @code{texinfo-format-buffer}
13045 Format the current buffer for Info.
13046 @findex texinfo-format-buffer
13047 @end table
13049 The @code{texinfo-format-region} and @code{texinfo-format-buffer}
13050 commands provide you with some error checking, and other functions can
13051 provide you with further help in finding formatting errors.  These
13052 procedures are described in an appendix; see @ref{Catching Mistakes}.
13053 However, the @code{makeinfo} program is often faster and
13054 provides better error checking (@pxref{makeinfo in Emacs}).@refill
13056 @node Batch Formatting, Tag and Split Files, texinfo-format commands, Create an Info File
13057 @comment  node-name,  next,  previous,  up
13058 @section Batch Formatting
13059 @cindex Batch formatting for Info
13060 @cindex Info batch formatting
13062 You can format Texinfo files for Info using @code{batch-texinfo-format}
13063 and Emacs Batch mode.  You can run Emacs in Batch mode from any shell,
13064 including a shell inside of Emacs.  (@xref{Command Switches, , Command
13065 Line Switches and Arguments, emacs, The GNU Emacs Manual}.)@refill
13067 Here is a shell command to format all the files that end in
13068 @file{.texinfo} in the current directory:
13070 @example
13071 emacs -batch -funcall batch-texinfo-format *.texinfo
13072 @end example
13074 @noindent
13075 Emacs processes all the files listed on the command line, even if an
13076 error occurs while attempting to format some of them.@refill
13078 Run @code{batch-texinfo-format} only with Emacs in Batch mode as shown;
13079 it is not interactive.  It kills the Batch mode Emacs on completion.@refill
13081 @code{batch-texinfo-format} is convenient if you lack @code{makeinfo}
13082 and want to format several Texinfo files at once.  When you use Batch
13083 mode, you create a new Emacs process.  This frees your current Emacs, so
13084 you can continue working in it.  (When you run
13085 @code{texinfo-format-region} or @code{texinfo-format-buffer}, you cannot
13086 use that Emacs for anything else until the command finishes.)@refill
13088 @node Tag and Split Files,  , Batch Formatting, Create an Info File
13089 @comment  node-name,  next,  previous,  up
13090 @section Tag Files and Split Files
13091 @cindex Making a tag table automatically
13092 @cindex Tag table, making automatically
13094 If a Texinfo file has more than 30,000 bytes,
13095 @code{texinfo-format-buffer} automatically creates a tag table
13096 for its Info file;  @code{makeinfo} always creates a tag table.  With
13097 a @dfn{tag table}, Info can jump to new nodes more quickly than it can
13098 otherwise.@refill
13100 @cindex Indirect subfiles
13101 In addition, if the Texinfo file contains more than about 70,000
13102 bytes, @code{texinfo-format-buffer} and @code{makeinfo} split the
13103 large Info file into shorter @dfn{indirect} subfiles of about 50,000
13104 bytes each.  Big files are split into smaller files so that Emacs does
13105 not need to make a large buffer to hold the whole of a large Info
13106 file; instead, Emacs allocates just enough memory for the small, split
13107 off file that is needed at the time.  This way, Emacs avoids wasting
13108 memory when you run Info.  (Before splitting was implemented, Info
13109 files were always kept short and @dfn{include files} were designed as
13110 a way to create a single, large printed manual out of the smaller Info
13111 files.  @xref{Include Files}, for more information.  Include files are
13112 still used for very large documents, such as @cite{The Emacs Lisp
13113 Reference Manual}, in which each chapter is a separate file.)@refill
13115 When a file is split, Info itself makes use of a shortened version of
13116 the original file that contains just the tag table and references to
13117 the files that were split off.  The split off files are called
13118 @dfn{indirect} files.@refill
13120 The split off files have names that are created by appending @w{@samp{-1}},
13121 @w{@samp{-2}}, @w{@samp{-3}} and so on to the file name specified by the
13122 @code{@@setfilename} command.  The shortened version of the original file
13123 continues to have the name specified by @code{@@setfilename}.@refill
13125 At one stage in writing this document, for example, the Info file was saved
13126 as @file{test-texinfo} and that file looked like this:@refill
13128 @example
13129 @group
13130 Info file: test-texinfo,    -*-Text-*-
13131 produced by texinfo-format-buffer
13132 from file: new-texinfo-manual.texinfo
13135 Indirect:
13136 test-texinfo-1: 102
13137 test-texinfo-2: 50422
13138 @end group
13139 @group
13140 test-texinfo-3: 101300
13141 ^_^L
13142 Tag table:
13143 (Indirect)
13144 Node: overview^?104
13145 Node: info file^?1271
13146 @end group
13147 @group
13148 Node: printed manual^?4853
13149 Node: conventions^?6855
13150 @dots{}
13151 @end group
13152 @end example
13154 @noindent
13155 (But @file{test-texinfo} had far more nodes than are shown here.)  Each of
13156 the split off, indirect files, @file{test-texinfo-1},
13157 @file{test-texinfo-2}, and @file{test-texinfo-3}, is listed in this file
13158 after the line that says @samp{Indirect:}.  The tag table is listed after
13159 the line that says @samp{Tag table:}. @refill
13161 In the list of indirect files, the number following the file name
13162 records the cumulative number of bytes in the preceding indirect files,
13163 not counting the file list itself, the tag table, or the permissions
13164 text in each file.  In the tag table, the number following the node name
13165 records the location of the beginning of the node, in bytes from the
13166 beginning.@refill
13168 If you are using @code{texinfo-format-buffer} to create Info files,
13169 you may want to run the @code{Info-validate} command.  (The
13170 @code{makeinfo} command does such a good job on its own, you do not
13171 need @code{Info-validate}.)  However, you cannot run the @kbd{M-x
13172 Info-validate} node-checking command on indirect files.  For
13173 information on how to prevent files from being split and how to
13174 validate the structure of the nodes, see @ref{Using
13175 Info-validate}.@refill
13178 @node Install an Info File, Command List, Create an Info File, Top
13179 @comment  node-name,  next,  previous,  up
13180 @chapter Installing an Info File
13181 @cindex Installing an Info file
13182 @cindex Info file installation
13183 @cindex @file{dir} directory for Info installation
13185 Info files are usually kept in the @file{info} directory.  You can read
13186 Info files using the standalone Info program or the Info reader built
13187 into Emacs.  (@inforef{Top, info, info}, for an introduction to Info.)
13189 @menu
13190 * Directory file::              The top level menu for all Info files.
13191 * New Info File::               Listing a new info file.
13192 * Other Info Directories::      How to specify Info files that are
13193                                   located in other directories.
13194 * Installing Dir Entries::      How to specify what menu entry to add
13195                                   to the Info directory.
13196 * Invoking install-info::       @code{install-info} options.
13197 @end menu
13199 @node Directory file, New Info File, Install an Info File, Install an Info File
13200 @ifinfo
13201 @heading The @file{dir} File
13202 @end ifinfo
13204 For Info to work, the @file{info} directory must contain a file that
13205 serves as a top level directory for the Info system.  By convention,
13206 this file is called @file{dir}.  (You can find the location of this file
13207 within Emacs by typing @kbd{C-h i} to enter Info and then typing
13208 @kbd{C-x C-f} to see the pathname to the @file{info} directory.)
13210 The @file{dir} file is itself an Info file.  It contains the top level
13211 menu for all the Info files in the system.  The menu looks like
13212 this:@refill
13214 @example
13215 @group
13216 * Menu:
13218 * Info:    (info).     Documentation browsing system.
13219 * Emacs:   (emacs).    The extensible, self-documenting
13220                        text editor.
13221 * Texinfo: (texinfo).  With one source file, make
13222                        either a printed manual using
13223                        TeX or an Info file.
13224 @dots{}
13225 @end group
13226 @end example
13228 Each of these menu entries points to the `Top' node of the Info file
13229 that is named in parentheses.  (The menu entry does not need to
13230 specify the `Top' node, since Info goes to the `Top' node if no node
13231 name is mentioned.  @xref{Other Info Files, , Nodes in Other Info
13232 Files}.)@refill
13234 Thus, the @samp{Info} entry points to the `Top' node of the
13235 @file{info} file and the @samp{Emacs} entry points to the `Top' node
13236 of the @file{emacs} file.@refill
13238 In each of the Info files, the `Up' pointer of the `Top' node refers
13239 back to the @code{dir} file.  For example, the line for the `Top'
13240 node of the Emacs manual looks like this in Info:@refill
13242 @example
13243 File: emacs  Node: Top, Up: (DIR), Next: Distrib
13244 @end example
13246 @noindent
13247 (Note that in this case, the @file{dir} file name is written in upper
13248 case letters---it can be written in either upper or lower case.  Info
13249 has a feature that it will change the case of the file name to lower
13250 case if it cannot find the name as written.)@refill
13251 @c !!! Can any file name be written in upper or lower case,
13252 @c     or is dir a special case?
13253 @c     Yes, apparently so, at least with Gillespie's Info.  --rjc 24mar92
13256 @node New Info File, Other Info Directories, Directory file, Install an Info File
13257 @section Listing a New Info File
13258 @cindex Adding a new info file
13259 @cindex Listing a new info file
13260 @cindex New info file, listing it in @file{dir} file
13261 @cindex Info file, listing new one
13262 @cindex @file{dir} file listing
13264 To add a new Info file to your system, you must write a menu entry to
13265 add to the menu in the @file{dir} file in the @file{info} directory.
13266 For example, if you were adding documentation for GDB, you would write
13267 the following new entry:@refill
13269 @example
13270 * GDB: (gdb).           The source-level C debugger.
13271 @end example
13273 @noindent
13274 The first part of the menu entry is the menu entry name, followed by a
13275 colon.  The second part is the name of the Info file, in parentheses,
13276 followed by a period.  The third part is the description.
13278 The name of an Info file often has a @file{.info} extension.  Thus, the
13279 Info file for GDB might be called either @file{gdb} or @file{gdb.info}.
13280 The Info reader programs automatically try the file name both with and
13281 without @file{.info}; so it is better to avoid clutter and not to write
13282 @samp{.info} explicitly in the menu entry.  For example, the GDB menu
13283 entry should use just @samp{gdb} for the file name, not @samp{gdb.info}.
13286 @node Other Info Directories, Installing Dir Entries, New Info File, Install an Info File
13287 @comment  node-name,  next,  previous,  up
13288 @section Info Files in Other Directories
13289 @cindex Installing Info in another directory
13290 @cindex Info installed in another directory
13291 @cindex Another Info directory
13293 If an Info file is not in the @file{info} directory, there are three
13294 ways to specify its location:@refill
13296 @itemize @bullet
13297 @item
13298 Write the pathname in the @file{dir} file as the second part of the
13299 menu.@refill
13301 @item
13302 If you are using Emacs, list the name of the file in a second @file{dir}
13303 file, in its directory; and then add the name of that directory to the
13304 @code{Info-directory-list} variable in your personal or site
13305 initialization file.
13307 This tells Emacs where to look for @file{dir} files.  Emacs merges the
13308 files named @file{dir} from each of the listed directories.  (In Emacs
13309 version 18, you can set the @code{Info-directory} variable to the name
13310 of only one directory.)@refill
13312 @item
13313 Specify the Info directory name in the @code{INFOPATH} environment
13314 variable in your @file{.profile} or @file{.cshrc} initialization file.
13315 (Only you and others who set this environment variable will be able to
13316 find Info files whose location is specified this way.)@refill
13317 @end itemize
13319 For example, to reach a test file in the @file{/home/bob/manuals}
13320 directory, you could add an entry like this to the menu in the
13321 @file{dir} file:@refill
13323 @example
13324 * Test: (/home/bob/manuals/info-test).  Bob's own test file.
13325 @end example
13327 @noindent
13328 In this case, the absolute file name of the @file{info-test} file is
13329 written as the second part of the menu entry.@refill
13331 @vindex Info-directory-list
13332 Alternatively, you could write the following in your @file{.emacs}
13333 file:@refill
13335 @example
13336 @group
13337 (setq Info-directory-list
13338       '("/home/bob/manuals"
13339         "/usr/local/info"))
13340 @end group
13341 @end example
13343 @c reworded to avoid overfill hbox
13344 This tells Emacs to merge the @file{dir} file from the
13345 @file{/home/bob/manuals} directory with the @file{dir} file from the
13346 @file{/usr/local/info} directory.  Info will list the
13347 @file{/home/bob/manuals/info-test} file as a menu entry in the
13348 @file{/home/bob/manuals/dir} file.@refill
13350 @vindex INFOPATH
13351 Finally, you can tell Info where to look by setting the @code{INFOPATH}
13352 environment variable in your @file{.cshrc} or @file{.profile} file.  If
13353 you use a Bourne-compatible shell such as @code{sh} or @code{bash} for
13354 your shell command interpreter, you set the @code{INFOPATH} environment
13355 variable in the @file{.profile} initialization file; but if you use
13356 @code{csh} or @code{tcsh}, you must set the variable in the
13357 @file{.cshrc} initialization file.  The two types of shells use
13358 different syntax.
13360 @itemize @bullet
13361 @item
13362 In a @file{.cshrc} file, you could set the @code{INFOPATH}
13363 variable as follows:@refill
13365 @smallexample
13366 setenv INFOPATH .:~/manuals:/usr/local/emacs/info
13367 @end smallexample
13369 @item
13370 In a @file{.profile} file, you would achieve the same effect by
13371 writing:@refill
13373 @smallexample
13374 INFOPATH=.:$HOME/manuals:/usr/local/emacs/info
13375 export INFOPATH
13376 @end smallexample
13377 @end itemize
13379 @noindent
13380 The @samp{.} indicates the current directory as usual.  Emacs uses the
13381 @code{INFOPATH} environment variable to initialize the value of Emacs's
13382 own @code{Info-directory-list} variable.
13384 @cindex @samp{:} @r{last in @code{INFOPATH}}
13385 However you set @code{INFOPATH}, if its last character is a colon, this
13386 is replaced by the default (compiled-in) path.  This gives you a way to
13387 augment the default path with new directories without having to list all
13388 the standard places.  For example (using @code{sh} syntax:
13390 @example
13391 INFOPATH=/local/info:
13392 export INFOPATH
13393 @end example
13395 @noindent
13396 will search @file{/local/info} first, then the standard directories.
13397 Leading or doubled colons are not treated specially.
13400 @node Installing Dir Entries, Invoking install-info, Other Info Directories, Install an Info File
13401 @section Installing Info Directory Files
13403 When you install an Info file onto your system, you can use the program
13404 @code{install-info} to update the Info directory file @file{dir}.
13405 Normally the makefile for the package runs @code{install-info}, just
13406 after copying the Info file into its proper installed location.
13408 @findex dircategory
13409 @findex direntry
13410 In order for the Info file to work with @code{install-info}, you should
13411 use the commands @code{@@dircategory} and @code{@@direntry} in the
13412 Texinfo source file.  Use @code{@@direntry} to specify the menu entry to
13413 add to the Info directory file, and use @code{@@dircategory} to specify
13414 which part of the Info directory to put it in.  Here is how these
13415 commands are used in this manual:
13417 @smallexample
13418 @@dircategory Texinfo documentation system
13419 @@direntry
13420 * Texinfo: (texinfo).           The GNU documentation format.
13421 * install-info: (texinfo)Invoking install-info. @dots{}
13422 @dots{}
13423 @@end direntry
13424 @end smallexample
13426 Here's what this produces in the Info file:
13428 @smallexample
13429 INFO-DIR-SECTION Texinfo documentation system
13430 START-INFO-DIR-ENTRY
13431 * Texinfo: (texinfo).           The GNU documentation format.
13432 * install-info: (texinfo)Invoking install-info. @dots{}
13433 @dots{}
13434 END-INFO-DIR-ENTRY
13435 @end smallexample
13437 @noindent
13438 The @code{install-info} program sees these lines in the Info file, and
13439 that is how it knows what to do.
13441 Always use the @code{@@direntry} and @code{@@dircategory} commands near
13442 the beginning of the Texinfo input, before the first @code{@@node}
13443 command.  If you use them later on in the input, @code{install-info}
13444 will not notice them.
13446 If you use @code{@@dircategory} more than once in the Texinfo source,
13447 each usage specifies one category; the new menu entry is added to the
13448 Info directory file in each of the categories you specify.  If you use
13449 @code{@@direntry} more than once, each usage specifies one menu entry;
13450 each of these menu entries is added to the directory in each of the
13451 specified categories.
13454 @node Invoking install-info,  , Installing Dir Entries, Install an Info File
13455 @section Invoking install-info
13457 @pindex install-info
13459 @code{install-info} inserts menu entries from an Info file into the
13460 top-level @file{dir} file in the Info system (see the previous sections
13461 for an explanation of how the @file{dir} file works).  It's most often
13462 run as part of software installation, or when constructing a dir file
13463 for all manuals on a system.  Synopsis:
13465 @example
13466 install-info [@var{option}]@dots{} [@var{info-file} [@var{dir-file}]]
13467 @end example
13469 If @var{info-file} or @var{dir-file} are not specified, the various
13470 options (described below) that define them must be.  There are no
13471 compile-time defaults, and standard input is never used.
13472 @code{install-info} can read only one info file and write only one dir
13473 file per invocation.
13475 @cindex @file{dir}, created by @code{install-info}
13476 If @var{dir-file} (however specified) does not exist,
13477 @code{install-info} creates it if possible (with no entries).
13479 Options:
13481 @table @code
13482 @item --delete
13483 @opindex --delete
13484 Delete the entries in @var{info-file} from @var{dir-file}.  The file
13485 name in the entry in @var{dir-file} must be @var{info-file} (except for
13486 an optional @samp{.info} in either one).  Don't insert any new entries.
13488 @item --dir-file=@var{name}
13489 @opindex --dir-file=@var{name}
13490 Specify file name of the Info directory file.  This is equivalent to
13491 using the @var{dir-file} argument.
13493 @item --entry=@var{text}
13494 @opindex --entry=@var{text}
13495 Insert @var{text} as an Info directory entry; @var{text} should have the
13496 form of an Info menu item line plus zero or more extra lines starting
13497 with whitespace.  If you specify more than one entry, they are all
13498 added.  If you don't specify any entries, they are determined from
13499 information in the Info file itself.
13501 @item --help
13502 @opindex --help
13503 Display a usage message listing basic usage and all available options,
13504 then exit successfully.
13506 @item --info-file=@var{file}
13507 @opindex --info-file=@var{file}
13508 Specify Info file to install in the directory.
13509 This is equivalent to using the @var{info-file} argument.
13511 @item --info-dir=@var{dir}
13512 @opindex --info-dir=@var{dir}
13513 Equivalent to @samp{--dir-file=@var{dir}/dir}.
13515 @item --item=@var{text}
13516 @opindex --item=@var{text}
13517 Same as @samp{--entry=@var{text}}.  An Info directory entry is actually
13518 a menu item.
13520 @item --quiet
13521 @opindex --quiet
13522 Suppress warnings.
13524 @item --remove
13525 @opindex --remove
13526 Same as @samp{--delete}.
13528 @item --section=@var{sec}
13529 @opindex --section=@var{sec}
13530 Put this file's entries in section @var{sec} of the directory.  If you
13531 specify more than one section, all the entries are added in each of the
13532 sections.  If you don't specify any sections, they are determined from
13533 information in the Info file itself.
13535 @item --version
13536 @opindex --version
13537 @cindex version number, finding
13538 Display version information and exit successfully.
13540 @end table
13543 @node Command List, Tips, Install an Info File, Top
13544 @appendix @@-Command List
13545 @cindex Alphabetical @@-command list
13546 @cindex List of  @@-commands
13547 @cindex @@-command list
13549 Here is an alphabetical list of the @@-commands in Texinfo.  Square
13550 brackets, @t{[}@w{ }@t{]}, indicate optional arguments; an ellipsis,
13551 @samp{@dots{}}, indicates repeated text.@refill
13553 @sp 1
13554 @table @code
13555 @item @@@var{whitespace}
13556 An @code{@@} followed by a space, tab, or newline produces a normal,
13557 stretchable, interword space.  @xref{Multiple Spaces}.
13559 @item @@!
13560 Generate an exclamation point that really does end a sentence (usually
13561 after an end-of-sentence capital letter).  @xref{Ending a Sentence}.
13563 @item @@"
13564 @itemx @@'
13565 Generate an umlaut or acute accent, respectively, over the next
13566 character, as in @"o and @'o.  @xref{Inserting Accents}.
13568 @item @@*
13569 Force a line break. Do not end a paragraph that uses @code{@@*} with
13570 an @code{@@refill} command.  @xref{Line Breaks}.@refill
13572 @item @@,@{@var{c}@}
13573 Generate a cedilla accent under @var{c}, as in @,{c}.  @xref{Inserting
13574 Accents}.
13576 @item @@-
13577 Insert a discretionary hyphenation point.  @xref{- and hyphenation}.
13579 @item @@.
13580 Produce a period that really does end a sentence (usually after an
13581 end-of-sentence capital letter).  @xref{Ending a Sentence}.
13583 @item @@:
13584 Indicate to @TeX{} that an immediately preceding period, question
13585 mark, exclamation mark, or colon does not end a sentence.  Prevent
13586 @TeX{} from inserting extra whitespace as it does at the end of a
13587 sentence.  The command has no effect on the Info file output.
13588 @xref{Not Ending a Sentence}.@refill
13590 @item @@=
13591 Generate a macro (bar) accent over the next character, as in @=o.
13592 @xref{Inserting Accents}.
13594 @item @@?
13595 Generate a question mark that really does end a sentence (usually after
13596 an end-of-sentence capital letter).  @xref{Ending a Sentence}.
13598 @item @@@@
13599 Stands for an at sign, @samp{@@}.
13600 @xref{Braces Atsigns, , Inserting @@ and braces}.
13602 @item @@^
13603 @itemx @@`
13604 Generate a circumflex (hat) or grave accent, respectively, over the next
13605 character, as in @^o.
13606 @xref{Inserting Accents}.
13608 @item @@@{
13609 Stands for a left brace, @samp{@{}.
13610 @xref{Braces Atsigns, , Inserting @@ and braces}.
13612 @item @@@}
13613 Stands for a right-hand brace, @samp{@}}.@*
13614 @xref{Braces Atsigns, , Inserting @@ and braces}.
13616 @item @@=
13617 Generate a tilde accent over the next character, as in @~N.
13618 @xref{Inserting Accents}.
13620 @item @@AA@{@}
13621 @itemx @@aa@{@}
13622 Generate the uppercase and lowercase Scandinavian A-ring letters,
13623 respectively: @AA{}, @aa{}.  @xref{Inserting Accents}.
13625 @item @@AE@{@}
13626 @itemx @@ae@{@}
13627 Generate the uppercase and lowercase AE ligatures, respectively:
13628 @AE{}, @ae{}.  @xref{Inserting Accents}.
13630 @item @@afourpaper
13631 Change page dimensions for the A4 paper size.  
13632 Only allowed inside @code{@@iftex} @dots{} @code{@@end iftex}.  
13633 @xref{A4 Paper}.
13635 @item @@appendix @var{title}
13636 Begin an appendix.  The title appears in the table
13637 of contents of a printed manual.  In Info, the title is
13638 underlined with asterisks.  @xref{unnumbered & appendix, , The
13639 @code{@@unnumbered} and @code{@@appendix} Commands}.@refill
13641 @item @@appendixsec @var{title}
13642 @itemx @@appendixsection @var{title}
13643 Begin an appendix section within an appendix.  The section title appears
13644 in the table of contents of a printed manual.  In Info, the title is
13645 underlined with equal signs.  @code{@@appendixsection} is a longer
13646 spelling of the @code{@@appendixsec} command.  @xref{unnumberedsec
13647 appendixsec heading, , Section Commands}.@refill
13649 @item @@appendixsubsec @var{title}
13650 Begin an appendix subsection within an appendix.  The title appears
13651 in the table of contents of a printed manual.  In Info, the title is
13652 underlined with hyphens.  @xref{unnumberedsubsec appendixsubsec
13653 subheading, , Subsection Commands}.@refill
13655 @item @@appendixsubsubsec @var{title}
13656 Begin an appendix subsubsection within an appendix subsection.  The
13657 title appears in the table of contents of a printed manual.  In Info,
13658 the title is underlined with periods.  @xref{subsubsection,, The
13659 `subsub' Commands}.@refill
13661 @item @@asis
13662 Used following @code{@@table}, @code{@@ftable}, and @code{@@vtable} to
13663 print the table's first column without highlighting (``as is'').
13664 @xref{Two-column Tables, , Making a Two-column Table}.@refill
13666 @item @@author @var{author}
13667 Typeset @var{author} flushleft and underline it.  @xref{title
13668 subtitle author, , The @code{@@title} and @code{@@author}
13669 Commands}.@refill
13671 @item @@b@{@var{text}@}
13672 Print @var{text} in @b{bold} font.  No effect in Info.  @xref{Fonts}.@refill
13674 @ignore
13675 @item @@br
13676 Force a paragraph break.  If used within a line, follow @code{@@br}
13677 with braces.  @xref{br, , @code{@@br}}.@refill
13678 @end ignore
13680 @item @@bullet@{@}
13681 Generate a large round dot, or the closest possible
13682 thing to one.  @xref{bullet, , @code{@@bullet}}.@refill
13684 @item @@bye
13685 Stop formatting a file.  The formatters do not see the contents of a
13686 file following an @code{@@bye} command.  @xref{Ending a File}.@refill
13688 @item @@c @var{comment}
13689 Begin a comment in Texinfo.  The rest of the line does not appear in
13690 either the Info file or the printed manual.  A synonym for
13691 @code{@@comment}.  @xref{Comments, , Comments}.@refill
13693 @item @@cartouche
13694 Highlight an example or quotation by drawing a box with rounded
13695 corners around it.  Pair with @code{@@end cartouche}.  No effect in
13696 Info.  @xref{cartouche, , Drawing Cartouches Around Examples}.)@refill
13698 @item @@center @var{line-of-text}
13699 Center the line of text following the command.
13700 @xref{titlefont center sp, , @code{@@center}}.@refill
13702 @item @@centerchap @var{line-of-text}
13703 Like @code{@@chapter}, but centers the chapter title.  @xref{chapter,,
13704 @code{@@chapter}}.
13706 @item @@chapheading @var{title}
13707 Print a chapter-like heading in the text, but not in the table of
13708 contents of a printed manual.  In Info, the title is underlined with
13709 asterisks.  @xref{majorheading & chapheading, , @code{@@majorheading}
13710 and @code{@@chapheading}}.@refill
13712 @item @@chapter @var{title}
13713 Begin a chapter.  The chapter title appears in the table of
13714 contents of a printed manual.  In Info, the title is underlined with
13715 asterisks.  @xref{chapter, , @code{@@chapter}}.@refill
13717 @item @@cindex @var{entry}
13718 Add @var{entry} to the index of concepts.  @xref{Index Entries, ,
13719 Defining the Entries of an Index}.@refill
13721 @item @@cite@{@var{reference}@}
13722 Highlight the name of a book or other reference that lacks a
13723 companion Info file.  @xref{cite, , @code{@@cite}}.@refill
13725 @item @@clear @var{flag}
13726 Unset @var{flag}, preventing the Texinfo formatting commands from
13727 formatting text between subsequent pairs of @code{@@ifset @var{flag}}
13728 and @code{@@end ifset} commands, and preventing
13729 @code{@@value@{@var{flag}@}} from expanding to the value to which
13730 @var{flag} is set.
13731 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
13733 @item @@code@{@var{sample-code}@}
13734 Highlight text that is an expression, a syntactically complete token
13735 of a program, or a program name.  @xref{code, , @code{@@code}}.@refill
13737 @item @@comment @var{comment}
13738 Begin a comment in Texinfo.  The rest of the line does not appear in
13739 either the Info file or the printed manual.  A synonym for @code{@@c}.
13740 @xref{Comments, , Comments}.@refill
13742 @item @@contents
13743 Print a complete table of contents.  Has no effect in Info, which uses
13744 menus instead.  @xref{Contents, , Generating a Table of
13745 Contents}.@refill
13747 @item @@copyright@{@}
13748 Generate a copyright symbol.  @xref{copyright symbol, ,
13749 @code{@@copyright}}.@refill
13751 @ignore
13752 @item @@ctrl@{@var{ctrl-char}@}
13753 Describe an @sc{ascii} control character.  Insert actual control character
13754 into Info file.  @xref{ctrl, , @code{@@ctrl}}.@refill
13755 @end ignore
13757 @item @@defcodeindex @var{index-name}
13758 Define a new index and its indexing command.  Print entries in an
13759 @code{@@code} font.  @xref{New Indices, , Defining New
13760 Indices}.@refill
13762 @item @@defcv @var{category} @var{class} @var{name}
13763 @itemx @@defcvx @var{category} @var{class} @var{name}
13764 Format a description for a variable associated with a class in
13765 object-oriented programming.  Takes three arguments: the category of
13766 thing being defined, the class to which it belongs, and its name.
13767 @xref{Definition Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13769 @item @@deffn @var{category} @var{name} @var{arguments}@dots{}
13770 @itemx @@deffnx @var{category} @var{name} @var{arguments}@dots{}
13771 Format a description for a function, interactive command, or similar
13772 entity that may take arguments.  @code{@@deffn} takes as arguments the
13773 category of entity being described, the name of this particular
13774 entity, and its arguments, if any.  @xref{Definition Commands}.@refill
13776 @item @@defindex @var{index-name}
13777 Define a new index and its indexing command.  Print entries in a roman
13778 font.  @xref{New Indices, , Defining New Indices}.@refill
13780 @c Unused so far as I can see and unsupported by makeinfo -- karl, 15sep96.
13781 @item @@definfoenclose @var{new-command}, @var{before}, @var{after},
13782 Create new @@-command for Info that marks text by enclosing it in
13783 strings that precede and follow the text.  Write definition inside of
13784 @code{@@ifinfo} @dots{} @code{@@end ifinfo}. @xref{Customized
13785 Highlighting}.@refill
13787 @item @@defivar @var{class} @var{instance-variable-name}
13788 @itemx @@defivarx @var{class} @var{instance-variable-name}
13789 This command formats a description for an instance variable in
13790 object-oriented programming.  The command is equivalent to @samp{@@defcv
13791 @{Instance Variable@} @dots{}}.  @xref{Definition Commands}, and
13792 @ref{deffnx,, Def Cmds in Detail}.
13794 @item @@defmac @var{macro-name} @var{arguments}@dots{}
13795 @itemx @@defmacx @var{macro-name} @var{arguments}@dots{}
13796 Format a description for a macro.  The command is equivalent to
13797 @samp{@@deffn Macro @dots{}}.  @xref{Definition Commands}, and
13798 @ref{deffnx,, Def Cmds in Detail}.
13800 @item @@defmethod @var{class} @var{method-name} @var{arguments}@dots{}
13801 @itemx @@defmethodx @var{class} @var{method-name} @var{arguments}@dots{}
13802 Format a description for a method in object-oriented programming.  The
13803 command is equivalent to @samp{@@defop Method @dots{}}.  Takes as
13804 arguments the name of the class of the method, the name of the
13805 method, and its arguments, if any.  @xref{Definition Commands}, and
13806 @ref{deffnx,, Def Cmds in Detail}.
13808 @item @@defop @var{category} @var{class} @var{name} @var{arguments}@dots{}
13809 @itemx @@defopx @var{category} @var{class} @var{name} @var{arguments}@dots{}
13810 Format a description for an operation in object-oriented programming.
13811 @code{@@defop} takes as arguments the overall name of the category of
13812 operation, the name of the class of the operation, the name of the
13813 operation, and its arguments, if any.  @xref{Definition
13814 Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13816 @item @@defopt @var{option-name}
13817 @itemx @@defoptx @var{option-name}
13818 Format a description for a user option.  The command is equivalent to
13819 @samp{@@defvr @{User Option@} @dots{}}.  @xref{Definition Commands}, and
13820 @ref{deffnx,, Def Cmds in Detail}.
13822 @item @@defspec @var{special-form-name} @var{arguments}@dots{}
13823 @itemx @@defspecx @var{special-form-name} @var{arguments}@dots{}
13824 Format a description for a special form.  The command is equivalent to
13825 @samp{@@deffn @{Special Form@} @dots{}}.  @xref{Definition Commands},
13826 and @ref{deffnx,, Def Cmds in Detail}.
13828 @item @@deftp @var{category} @var{name-of-type} @var{attributes}@dots{}
13829 @itemx @@deftpx @var{category} @var{name-of-type} @var{attributes}@dots{}
13830 Format a description for a data type.  @code{@@deftp} takes as arguments
13831 the category, the name of the type (which is a word like @samp{int} or
13832 @samp{float}), and then the names of attributes of objects of that type.
13833 @xref{Definition Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13835 @item @@deftypefn @var{classification} @var{data-type} @var{name} @var{arguments}@dots{}
13836 @itemx @@deftypefnx @var{classification} @var{data-type} @var{name} @var{arguments}@dots{}
13837 Format a description for a function or similar entity that may take
13838 arguments and that is typed.  @code{@@deftypefn} takes as arguments the
13839 classification of entity being described, the type, the name of the
13840 entity, and its arguments, if any.  @xref{Definition Commands}, and
13841 @ref{deffnx,, Def Cmds in Detail}.
13843 @item @@deftypefun @var{data-type} @var{function-name} @var{arguments}@dots{}
13844 @itemx @@deftypefunx @var{data-type} @var{function-name} @var{arguments}@dots{}
13845 Format a description for a function in a typed language.
13846 The command is equivalent to @samp{@@deftypefn Function @dots{}}.
13847 @xref{Definition Commands},
13848 and @ref{deffnx,, Def Cmds in Detail}.
13850 @item @@deftypemethod @var{class} @var{data-type} @var{method-name} @var{arguments}@dots{}
13851 @itemx @@deftypemethodx @var{class} @var{data-type} @var{method-name} @var{arguments}@dots{}
13852 Format a description for a typed method in object-oriented programming.
13853 Takes as arguments the name of the class of the method, the return type
13854 of the method, the name of the method, and its arguments, if any.
13855 @xref{Definition Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13857 @item @@deftypevr @var{classification} @var{data-type} @var{name}
13858 @itemx @@deftypevrx @var{classification} @var{data-type} @var{name}
13859 Format a description for something like a variable in a typed
13860 language---an entity that records a value.  Takes as arguments the
13861 classification of entity being described, the type, and the name of the
13862 entity.  @xref{Definition Commands}, and @ref{deffnx,, Def Cmds in
13863 Detail}.
13865 @item @@deftypevar @var{data-type} @var{variable-name}
13866 @itemx @@deftypevarx @var{data-type} @var{variable-name}
13867 Format a description for a variable in a typed language.  The command is
13868 equivalent to @samp{@@deftypevr Variable @dots{}}.  @xref{Definition
13869 Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13871 @item @@defun @var{function-name} @var{arguments}@dots{}
13872 @itemx @@defunx @var{function-name} @var{arguments}@dots{}
13873 Format a description for functions.  The command is equivalent to
13874 @samp{@@deffn Function @dots{}}.  @xref{Definition Commands}, and
13875 @ref{deffnx,, Def Cmds in Detail}.
13877 @item @@defvar @var{variable-name}
13878 @itemx @@defvarx @var{variable-name}
13879 Format a description for variables.  The command is equivalent to
13880 @samp{@@defvr Variable @dots{}}.  @xref{Definition Commands}, and
13881 @ref{deffnx,, Def Cmds in Detail}.
13883 @item @@defvr @var{category} @var{name}
13884 @itemx @@defvrx @var{category} @var{name}
13885 Format a description for any kind of variable.  @code{@@defvr} takes
13886 as arguments the category of the entity and the name of the entity.
13887 @xref{Definition Commands},
13888 and @ref{deffnx,, Def Cmds in Detail}.
13890 @item @@detailmenu@{@}
13891 Avoid @code{makeinfo} confusion stemming from the detailed node listing
13892 in a master menu.  @xref{Master Menu Parts}.
13894 @item @@dfn@{@var{term}@}
13895 Highlight the introductory or defining use of a term.
13896 @xref{dfn, , @code{@@dfn}}.@refill
13898 @item @@dircategory @var{dirpart}
13899 Specify a part of the Info directory menu where this file's entry should
13900 go.  @xref{Installing Dir Entries}.
13902 @item @@direntry
13903 Begin the Info directory menu entry for this file.
13904 @xref{Installing Dir Entries}.
13906 @need 100
13907 @item @@display
13908 Begin a kind of example.  Indent text, do not fill, do not select a
13909 new font.  Pair with @code{@@end display}.  @xref{display, ,
13910 @code{@@display}}.@refill
13912 @item @@dmn@{@var{dimension}@}
13913 Format a unit of measure, as in 12@dmn{pt}.  Causes @TeX{} to insert a
13914 thin space before @var{dimension}.  No effect in Info.
13915 @xref{dmn, , @code{@@dmn}}.@refill
13917 @item @@dotaccent@{@var{c}@}
13918 Generate a dot accent over the character @var{c}, as in @dotaccent{oo}.
13919 @xref{Inserting Accents}.
13921 @item @@dots@{@}
13922 Insert an ellipsis: @samp{@dots{}}.
13923 @xref{dots, , @code{@@dots}}.@refill
13925 @item @@email@{@var{address}[, @var{displayed-text}]@}
13926 Indicate an electronic mail address.
13927 @xref{email, , @code{@@email}}.@refill
13929 @need 100
13930 @item @@emph@{@var{text}@}
13931 Highlight @var{text}; text is displayed in @emph{italics} in printed
13932 output, and surrounded by asterisks in Info.  @xref{Emphasis, ,
13933 Emphasizing Text}.
13935 @item @@end @var{environment}
13936 Ends @var{environment}, as in @samp{@@end example}.  @xref{Formatting
13937 Commands,,@@-commands}.
13939 @item @@enddots@{@}
13940 Generate an end-of-sentence of ellipsis, like this @enddots{}
13941 @xref{dots,,@code{@@dots@{@}}}.
13943 @need 100
13944 @item @@enumerate [@var{number-or-letter}]
13945 Begin a numbered list, using @code{@@item} for each entry.
13946 Optionally, start list with @var{number-or-letter}.  Pair with
13947 @code{@@end enumerate}.  @xref{enumerate, ,
13948 @code{@@enumerate}}.@refill
13950 @need 100
13951 @item @@equiv@{@}
13952 Indicate to the reader the exact equivalence of two forms with a
13953 glyph: @samp{@equiv{}}.  @xref{Equivalence}.@refill
13955 @item @@error@{@}
13956 Indicate to the reader with a glyph that the following text is
13957 an error message: @samp{@error{}}.  @xref{Error Glyph}.@refill
13959 @item  @@evenfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
13960 @itemx @@evenheading [@var{left}] @@| [@var{center}] @@| [@var{right}]
13961 Specify page footings resp.@: headings for even-numbered (left-hand)
13962 pages.  Only allowed inside @code{@@iftex}.  @xref{Custom Headings, ,
13963 How to Make Your Own Headings}.@refill
13965 @item @@everyfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
13966 @itemx @@everyheading [@var{left}] @@| [@var{center}] @@| [@var{right}]
13967 Specify page footings resp.@: headings for every page.  Not relevant to
13968 Info.  @xref{Custom Headings, , How to Make Your Own Headings}.@refill
13970 @item @@example
13971 Begin an example.  Indent text, do not fill, and select fixed-width font.
13972 Pair with @code{@@end example}.  @xref{example, ,
13973 @code{@@example}}.@refill
13975 @item @@exclamdown@{@}
13976 Produce an upside-down exclamation point.  @xref{Inserting Accents}.
13978 @item @@exdent @var{line-of-text}
13979 Remove any indentation a line might have.  @xref{exdent, ,
13980 Undoing the Indentation of a Line}.@refill
13982 @item @@expansion@{@}
13983 Indicate the result of a macro expansion to the reader with a special
13984 glyph: @samp{@expansion{}}.
13985 @xref{expansion, , @expansion{} Indicating an Expansion}.@refill
13987 @item @@file@{@var{filename}@}
13988 Highlight the name of a file, buffer, node, or directory.  @xref{file, ,
13989 @code{@@file}}.@refill
13991 @item @@finalout
13992 Prevent @TeX{} from printing large black warning rectangles beside
13993 over-wide lines.  @xref{Overfull hboxes}.@refill
13995 @need 100
13996 @item @@findex @var{entry}
13997 Add @var{entry} to the index of functions.  @xref{Index Entries, ,
13998 Defining the Entries of an Index}.@refill
14000 @need 200
14001 @item @@flushleft
14002 @itemx @@flushright
14003 Left justify every line but leave the right end ragged.
14004 Leave font as is.  Pair with @code{@@end flushleft}.
14005 @code{@@flushright} analogous.
14006 @xref{flushleft & flushright, , @code{@@flushleft} and
14007 @code{@@flushright}}.@refill
14009 @need 200
14010 @item @@footnote@{@var{text-of-footnote}@}
14011 Enter a footnote.  Footnote text is printed at the bottom of the page
14012 by @TeX{}; Info may format in either `End' node or `Separate' node style.
14013 @xref{Footnotes}.@refill
14015 @item @@footnotestyle @var{style}
14016 Specify an Info file's footnote style, either @samp{end} for the end
14017 node style or @samp{separate} for the separate node style.
14018 @xref{Footnotes}.@refill
14020 @item @@format
14021 Begin a kind of example.  Like @code{@@example} or @code{@@display},
14022 but do not narrow the margins and do not select the fixed-width font.
14023 Pair with @code{@@end format}.  @xref{example, ,
14024 @code{@@example}}.@refill
14026 @item @@ftable @var{formatting-command}
14027 Begin a two-column table, using @code{@@item} for each entry.
14028 Automatically enter each of the items in the first column into the
14029 index of functions.  Pair with @code{@@end ftable}.  The same as
14030 @code{@@table}, except for indexing.  @xref{ftable vtable, ,
14031 @code{@@ftable} and @code{@@vtable}}.@refill
14033 @item @@group
14034 Hold text together that must appear on one printed page.  Pair with
14035 @code{@@end group}.  Not relevant to Info.  @xref{group, ,
14036 @code{@@group}}.@refill
14038 @item @@H@{@var{c}@}
14039 Generate the long Hungarian umlaut accent over @var{c}, as in @H{o}.
14041 @item @@heading @var{title}
14042 Print an unnumbered section-like heading in the text, but not in the
14043 table of contents of a printed manual.  In Info, the title is
14044 underlined with equal signs.  @xref{unnumberedsec appendixsec heading,
14045 , Section Commands}.@refill
14047 @item @@headings @var{on-off-single-double}
14048 Turn page headings on or off, and/or specify single-sided or double-sided
14049 page headings for printing.  @xref{headings on off, , The
14050 @code{@@headings} Command}.
14052 @item @@html
14053 Enter HTML completely.  Pair with @code{@@end html}.  @xref{Raw
14054 Formatter Commands}.
14056 @item @@hyphenation@{@var{hy-phen-a-ted words}@}
14057 Explicitly define hyphenation points.  @xref{- and hyphenation,,
14058 @code{@@-} and @code{@@hyphenation}}.
14060 @item @@i@{@var{text}@}
14061 Print @var{text} in @i{italic} font.  No effect in Info.
14062 @xref{Fonts}.@refill
14064 @item @@ifclear @var{flag}
14065 If @var{flag} is cleared, the Texinfo formatting commands format text
14066 between @code{@@ifclear @var{flag}} and the following @code{@@end
14067 ifclear} command.
14068 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
14070 @item @@ifhtml
14071 @itemx @@ifinfo
14072 Begin a stretch of text that will be ignored by @TeX{} when it typesets
14073 the printed manual.  The text appears only in the HTML resp.@: Info
14074 file.  Pair with @code{@@end ifhtml} resp.@: @code{@@end ifinfo}.
14075 @xref{Conditionals}.
14077 @item @@ifnothtml
14078 @itemx @@ifnotinfo
14079 @itemx @@ifnottex
14080 Begin a stretch of text that will be ignored in one output format but
14081 not the others.  The text appears only in the format not specified.
14082 Pair with @code{@@end ifnothtml} resp.@: @code{@@end ifnotinfo} resp.@:
14083 @code{@@end ifnotinfo}.  @xref{Conditionals}.
14085 @item @@ifset @var{flag}
14086 If @var{flag} is set, the Texinfo formatting commands format text
14087 between @code{@@ifset @var{flag}} and the following @code{@@end ifset}
14088 command.
14089 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
14091 @item @@iftex
14092 Begin a stretch of text that will not appear in the Info file, but
14093 will be processed only by @TeX{}.  Pair with @code{@@end iftex}.
14094 @xref{Conditionals, , Conditionally Visible Text}.@refill
14096 @item @@ignore
14097 Begin a stretch of text that will not appear in either the Info file
14098 or the printed output.  Pair with @code{@@end ignore}.
14099 @xref{Comments, , Comments and Ignored Text}.@refill
14101 @item @@image@{@var{filename}, [@var{width}], [@var{height}]@}
14102 Include graphics image in external @var{filename} scaled to the given
14103 @var{width} and/or @var{height}.  @xref{Images}.
14105 @item @@include @var{filename}
14106 Incorporate the contents of the file @var{filename} into the Info file
14107 or printed document.  @xref{Include Files}.@refill
14109 @item @@inforef@{@var{node-name}, [@var{entry-name}], @var{info-file-name}@}
14110 Make a cross reference to an Info file for which there is no printed
14111 manual.  @xref{inforef, , Cross references using
14112 @code{@@inforef}}.@refill
14114 @item \input @var{macro-definitions-file}
14115 Use the specified macro definitions file.  This command is used only
14116 in the first line of a Texinfo file to cause @TeX{} to make use of the
14117 @file{texinfo} macro definitions file.  The backslash in @code{\input}
14118 is used instead of an @code{@@} because @TeX{} does not
14119 recognize @code{@@} until after it has read the definitions file.
14120 @xref{Header, , The Texinfo File Header}.@refill
14122 @item @@item
14123 Indicate the beginning of a marked paragraph for @code{@@itemize} and
14124 @code{@@enumerate}; indicate the beginning of the text of a first column
14125 entry for @code{@@table}, @code{@@ftable}, and @code{@@vtable}.
14126 @xref{Lists and Tables}.@refill
14128 @item @@itemize  @var{mark-generating-character-or-command}
14129 Produce a sequence of indented paragraphs, with a mark inside the left
14130 margin at the beginning of each paragraph.  Pair with @code{@@end
14131 itemize}.  @xref{itemize, , @code{@@itemize}}.@refill
14133 @item @@itemx
14134 Like @code{@@item} but do not generate extra vertical space above the
14135 item text.  @xref{itemx, , @code{@@itemx}}.@refill
14137 @item @@kbd@{@var{keyboard-characters}@}
14138 Indicate text that is characters of input to be typed by
14139 users.  @xref{kbd, , @code{@@kbd}}.@refill
14141 @item @@kbdinputstyle @var{style}
14142 Specify when @code{@@kbd} should use a font distinct from @code{@@code}.
14143 @xref{kbd, , @code{@@kbd}}.@refill
14145 @item @@key@{@var{key-name}@}
14146 Indicate a name for a key on a keyboard.
14147 @xref{key, , @code{@@key}}.@refill
14149 @item @@kindex @var{entry}
14150 Add @var{entry} to the index of keys.
14151 @xref{Index Entries, , Defining the Entries of an Index}.@refill
14153 @item @@L@{@}
14154 @itemx @@l@{@}
14155 Generate the uppercase and lowercase Polish suppressed-L letters,
14156 respectively: @L{}, @l{}.
14158 @c Possibly this can be tossed now that we have macros.  --karl, 16sep96.
14159 @c Yes, let's toss it, it's pretty weird.  --karl, 15jun97.
14160 @c @item @@global@@let@var{new-command}=@var{existing-command}
14161 @c Equate a new highlighting command with an existing one.  Only for
14162 @c @TeX{}.  Write definition inside of @code{@@iftex} @dots{} @code{@@end
14163 @c iftex}.  @xref{Customized Highlighting}.@refill
14165 @item @@lisp
14166 Begin an example of Lisp code.  Indent text, do not fill, and select
14167 fixed-width font.  Pair with @code{@@end lisp}.  @xref{Lisp Example, ,
14168 @code{@@lisp}}.@refill
14170 @item @@lowersections
14171 Change subsequent chapters to sections, sections to subsections, and so
14172 on. @xref{Raise/lower sections, , @code{@@raisesections} and
14173 @code{@@lowersections}}.@refill
14175 @item @@macro @var{macro-name} @{@var{params}@}
14176 Define a new Texinfo command @code{@@@var{macro-name}@{@var{params}@}}.
14177 Only supported by @code{makeinfo} and @code{texi2dvi}.  @xref{Defining
14178 Macros}.
14180 @item @@majorheading @var{title}
14181 Print a chapter-like heading in the text, but not in the table of
14182 contents of a printed manual.  Generate more vertical whitespace before
14183 the heading than the @code{@@chapheading} command.  In Info, the chapter
14184 heading line is underlined with asterisks.  @xref{majorheading &
14185 chapheading, , @code{@@majorheading} and @code{@@chapheading}}.@refill
14187 @item @@math@{@var{mathematical-expression}@}
14188 Format a mathematical expression.
14189 @xref{math, , @code{@@math}: Inserting Mathematical Expressions}.
14191 @item @@menu
14192 Mark the beginning of a menu of nodes in Info.  No effect in a printed
14193 manual.  Pair with @code{@@end menu}.  @xref{Menus}.@refill
14195 @item @@minus@{@}
14196 Generate a minus sign, `@minus{}'.  @xref{minus, , @code{@@minus}}.@refill
14198 @item @@multitable @var{column-width-spec}
14199 Begin a multi-column table.  Pair with @code{@@end multitable}.
14200 @xref{Multitable Column Widths}.
14202 @item @@need @var{n}
14203 Start a new page in a printed manual if fewer than @var{n} mils
14204 (thousandths of an inch) remain on the current page.  @xref{need, ,
14205 @code{@@need}}.@refill
14207 @item @@node @var{name, next, previous, up}
14208 Define the beginning of a new node in Info, and serve as a locator for
14209 references for @TeX{}.  @xref{node, , @code{@@node}}.@refill
14211 @item @@noindent
14212 Prevent text from being indented as if it were a new paragraph.
14213 @xref{noindent, , @code{@@noindent}}.@refill
14215 @item @@O@{@}
14216 @itemx @@o@{@}
14217 Generate the uppercase and lowercase O-with-slash letters, respectively:
14218 @O{}, @o{}.
14220 @item  @@oddfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
14221 @itemx @@oddheading [@var{left}] @@| [@var{center}] @@| [@var{right}]
14222 Specify page footings resp.@: headings for odd-numbered (right-hand)
14223 pages.  Only allowed inside @code{@@iftex}.  @xref{Custom Headings, ,
14224 How to Make Your Own Headings}.@refill
14226 @item @@OE@{@}
14227 @itemx @@oe@{@}
14228 Generate the uppercase and lowercase OE ligatures, respectively:
14229 @OE{}, @oe{}.  @xref{Inserting Accents}.
14231 @item @@page
14232 Start a new page in a printed manual.  No effect in Info.
14233 @xref{page, , @code{@@page}}.@refill
14235 @item @@paragraphindent @var{indent}
14236 Indent paragraphs by @var{indent} number of spaces; delete indentation
14237 if the value of @var{indent} is 0; and do not change indentation if
14238 @var{indent} is @code{asis}. @xref{paragraphindent, , Paragraph
14239 Indenting}.@refill
14241 @item @@pindex @var{entry}
14242 Add @var{entry} to the index of programs.  @xref{Index Entries, , Defining
14243 the Entries of an Index}.@refill
14245 @item @@point@{@}
14246 Indicate the position of point in a buffer to the reader with a
14247 glyph: @samp{@point{}}.  @xref{Point Glyph, , Indicating
14248 Point in a Buffer}.@refill
14250 @item @@pounds@{@}
14251 Generate the pounds sterling currency sign.
14252 @xref{pounds,,@code{@@pounds@{@}}}.
14254 @item @@print@{@}
14255 Indicate printed output to the reader with a glyph:
14256 @samp{@print{}}.  @xref{Print Glyph}.@refill
14258 @item @@printindex @var{index-name}
14259 Print an alphabetized two-column index in a printed manual or generate
14260 an alphabetized menu of index entries for Info.  @xref{Printing
14261 Indices & Menus}.@refill
14263 @item @@pxref@{@var{node-name}, [@var{entry}], [@var{topic-or-title}], [@var{info-file}], [@var{manual}]@}
14264 Make a reference that starts with a lower case `see' in a printed
14265 manual.  Use within parentheses only.  Do not follow command with a
14266 punctuation mark---the Info formatting commands automatically insert
14267 terminating punctuation as needed.  Only the first argument is mandatory.
14268 @xref{pxref, , @code{@@pxref}}.@refill
14270 @item @@questiondown@{@}
14271 Generate an upside-down question mark.  @xref{Inserting Accents}.
14273 @item @@quotation
14274 Narrow the margins to indicate text that is quoted from another real
14275 or imaginary work.  Write command on a line of its own.  Pair with
14276 @code{@@end quotation}.  @xref{quotation, ,
14277 @code{@@quotation}}.@refill
14279 @need 100
14280 @item @@r@{@var{text}@}
14281 Print @var{text} in @r{roman} font.  No effect in Info.
14282 @xref{Fonts}.@refill
14284 @item @@raisesections
14285 Change subsequent sections to chapters, subsections to sections, and so
14286 on.  @xref{Raise/lower sections, , @code{@@raisesections} and
14287 @code{@@lowersections}}.@refill
14289 @need 300
14290 @item @@ref@{@var{node-name}, [@var{entry}], [@var{topic-or-title}], [@var{info-file}], [@var{manual}]@}
14291 Make a reference.  In a printed manual, the reference does not start
14292 with a `See'.  Follow command with a punctuation mark.  Only the first
14293 argument is mandatory.  @xref{ref, , @code{@@ref}}.@refill
14295 @need 300
14296 @item @@refill
14297 In Info, refill and indent the paragraph after all the other processing
14298 has been done.  No effect on @TeX{}, which always refills.  This command
14299 is no longer needed, since all formatters now automatically refill.
14300 @xref{Refilling Paragraphs}.@refill
14302 @need 300
14303 @item @@result@{@}
14304 Indicate the result of an expression to the reader with a special
14305 glyph: @samp{@result{}}.  @xref{result, , @code{@@result}}.@refill
14307 @item @@ringaccent@{@var{c}@}
14308 Generate a ring accent over the next character, as in @ringaccent{o}.
14309 @xref{Inserting Accents}.
14311 @item @@samp@{@var{text}@}
14312 Highlight @var{text} that is a literal example of a sequence of
14313 characters.  Used for single characters, for statements, and often for
14314 entire shell commands.  @xref{samp, , @code{@@samp}}.@refill
14316 @item @@sc@{@var{text}@}
14317 Set @var{text} in a printed output in @sc{the small caps font} and
14318 set text in the Info file in uppercase letters.
14319 @xref{Smallcaps}.@refill
14321 @item @@section @var{title}
14322 Begin a section within a chapter.  In a printed manual, the section
14323 title is numbered and appears in the table of contents.  In Info, the
14324 title is underlined with equal signs.  @xref{section, ,
14325 @code{@@section}}.@refill
14327 @item @@set @var{flag} [@var{string}]
14328 Make @var{flag} active, causing the Texinfo formatting commands to
14329 format text between subsequent pairs of @code{@@ifset @var{flag}} and
14330 @code{@@end ifset} commands.  Optionally, set value of @var{flag} to
14331 @var{string}.
14332 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
14334 @item @@setchapternewpage @var{on-off-odd}
14335 Specify whether chapters start on new pages, and if so, whether on
14336 odd-numbered (right-hand) new pages.  @xref{setchapternewpage, ,
14337 @code{@@setchapternewpage}}.@refill
14339 @item @@setfilename @var{info-file-name}
14340 Provide a name to be used by the Info file.  This command is essential
14341 for @TeX{} formatting as well, even though it produces no output.
14342 @xref{setfilename, , @code{@@setfilename}}.@refill
14344 @item @@settitle @var{title}
14345 Provide a title for page headers in a printed manual.
14346 @xref{settitle, , @code{@@settitle}}.@refill
14348 @item @@shortcontents
14349 Print a short table of contents.  Not relevant to Info, which uses
14350 menus rather than tables of contents.  A synonym for
14351 @code{@@summarycontents}.  @xref{Contents, , Generating a Table of
14352 Contents}.@refill
14354 @item @@shorttitlepage@{@var{title}@}
14355 Generate a minimal title page.  @xref{titlepage,,@code{@@titlepage}}.
14357 @need 400
14358 @item @@smallbook
14359 Cause @TeX{} to produce a printed manual in a 7 by 9.25 inch format
14360 rather than the regular 8.5 by 11 inch format.  @xref{smallbook, ,
14361 Printing Small Books}.  Also, see @ref{smallexample & smalllisp, ,
14362 @code{@@smallexample} and @code{@@smalllisp}}.@refill
14364 @need 400
14365 @item @@smallexample
14366 Indent text to indicate an example.  Do not fill, select fixed-width
14367 font.  In @code{@@smallbook} format, print text in a smaller font than
14368 with @code{@@example}.  Pair with @code{@@end smallexample}.
14369 @xref{smallexample & smalllisp, , @code{@@smallexample} and
14370 @code{@@smalllisp}}.@refill
14372 @need 400
14373 @item @@smalllisp
14374 Begin an example of Lisp code.  Indent text, do not fill, select
14375 fixed-width font.  In @code{@@smallbook} format, print text in a
14376 smaller font.  Pair with @code{@@end smalllisp}.  @xref{smallexample &
14377 smalllisp, , @code{@@smallexample} and @code{@@smalllisp}}.@refill
14379 @need 700
14380 @item @@sp @var{n}
14381 Skip @var{n} blank lines.  @xref{sp, , @code{@@sp}}.@refill
14383 @item @@ss@{@}
14384 Generate the German sharp-S es-zet letter, @ss{}.  @xref{Inserting Accents}.
14386 @need 700
14387 @item @@strong @var{text}
14388 Emphasize @var{text} by typesetting it in a @strong{bold} font for the
14389 printed manual and by surrounding it with asterisks for Info.
14390 @xref{emph & strong, , Emphasizing Text}.@refill
14392 @item @@subheading @var{title}
14393 Print an unnumbered subsection-like heading in the text, but not in
14394 the table of contents of a printed manual.  In Info, the title is
14395 underlined with hyphens.  @xref{unnumberedsubsec appendixsubsec
14396 subheading, , @code{@@unnumberedsubsec} @code{@@appendixsubsec}
14397 @code{@@subheading}}.@refill
14399 @item @@subsection @var{title}
14400 Begin a subsection within a section.  In a printed manual, the
14401 subsection title is numbered and appears in the table of contents.  In
14402 Info, the title is underlined with hyphens.  @xref{subsection, ,
14403 @code{@@subsection}}.@refill
14405 @item @@subsubheading @var{title}
14406 Print an unnumbered subsubsection-like heading in the text, but not in
14407 the table of contents of a printed manual.  In Info, the title is
14408 underlined with periods.  @xref{subsubsection, , The `subsub'
14409 Commands}.@refill
14411 @item @@subsubsection @var{title}
14412 Begin a subsubsection within a subsection.  In a printed manual,
14413 the subsubsection title is numbered and appears in the table of
14414 contents.  In Info, the title is underlined with periods.
14415 @xref{subsubsection, , The `subsub' Commands}.@refill
14417 @item @@subtitle @var{title}
14418 In a printed manual, set a subtitle in a normal sized font flush to
14419 the right-hand side of the page.  Not relevant to Info, which does not
14420 have title pages.  @xref{title subtitle author, , @code{@@title}
14421 @code{@@subtitle} and @code{@@author} Commands}.@refill
14423 @item @@summarycontents
14424 Print a short table of contents.  Not relevant to Info, which uses
14425 menus rather than tables of contents.  A synonym for
14426 @code{@@shortcontents}.  @xref{Contents, , Generating a Table of
14427 Contents}.@refill
14429 @need 300
14430 @item @@syncodeindex @var{from-index} @var{into-index}
14431 Merge the index named in the first argument into the index named in
14432 the second argument, printing the entries from the first index in
14433 @code{@@code} font.  @xref{Combining Indices}.@refill
14435 @need 300
14436 @item @@synindex @var{from-index} @var{into-index}
14437 Merge the index named in the first argument into the index named in
14438 the second argument.  Do not change the font of @var{from-index}
14439 entries.  @xref{Combining Indices}.@refill
14441 @need 100
14442 @item @@t@{@var{text}@}
14443 Print @var{text} in a @t{fixed-width}, typewriter-like font.
14444 No effect in Info.  @xref{Fonts}.@refill
14446 @item @@tab
14447 Separate columns in a multitable.  @xref{Multitable Rows}.
14449 @need 400
14450 @item @@table @var{formatting-command}
14451 Begin a two-column table, using @code{@@item} for each entry.  Write
14452 each first column entry on the same line as @code{@@item}.  First
14453 column entries are printed in the font resulting from
14454 @var{formatting-command}.  Pair with @code{@@end table}.
14455 @xref{Two-column Tables, , Making a Two-column Table}.
14456 Also see @ref{ftable vtable, , @code{@@ftable} and @code{@@vtable}},
14457 and @ref{itemx, , @code{@@itemx}}.@refill
14459 @item @@TeX@{@}
14460 Insert the logo @TeX{}.  @xref{TeX and copyright, , Inserting @TeX{}
14461 and @copyright{}}.@refill
14463 @item @@tex
14464 Enter @TeX{} completely.  Pair with @code{@@end tex}.  @xref{Raw
14465 Formatter Commands}.
14467 @item @@thischapter
14468 @itemx @@thischaptername
14469 @itemx @@thisfile
14470 @itemx @@thispage
14471 @itemx @@thistitle
14472 Only allowed in a heading or footing.  Stands for the number and name of
14473 the current chapter (in the format `Chapter 1: Title'), the chapter name
14474 only, the filename, the current page number, and the title of the
14475 document, respectively.  @xref{Custom Headings, , How to Make Your Own
14476 Headings}.@refill
14478 @item @@tieaccent@{@var{cc}@}
14479 Generate a tie-after accent over the next two characters @var{cc}, as in
14480 `@tieaccent{oo}'.  @xref{Inserting Accents}.
14482 @item @@tindex @var{entry}
14483 Add @var{entry} to the index of data types.  @xref{Index Entries, ,
14484 Defining the Entries of an Index}.@refill
14486 @item @@title @var{title}
14487 In a printed manual, set a title flush to the left-hand side of the
14488 page in a larger than normal font and underline it with a black rule.
14489 Not relevant to Info, which does not have title pages.  @xref{title
14490 subtitle author, , The @code{@@title} @code{@@subtitle} and
14491 @code{@@author} Commands}.@refill
14493 @need 400
14494 @item @@titlefont@{@var{text}@}
14495 In a printed manual, print @var{text} in a larger than normal font.
14496 Not relevant to Info, which does not have title pages.
14497 @xref{titlefont center sp, , The @code{@@titlefont} @code{@@center}
14498 and @code{@@sp} Commands}.@refill
14500 @need 300
14501 @item @@titlepage
14502 Indicate to Texinfo the beginning of the title page.  Write command on
14503 a line of its own.  Pair with @code{@@end titlepage}.  Nothing between
14504 @code{@@titlepage} and @code{@@end titlepage} appears in Info.
14505 @xref{titlepage, , @code{@@titlepage}}.@refill
14507 @need 150
14508 @item @@today@{@}
14509 Insert the current date, in `1 Jan 1900' style.  @xref{Custom
14510 Headings, , How to Make Your Own Headings}.@refill
14512 @item @@top @var{title}
14513 In a Texinfo file to be formatted with @code{makeinfo}, identify the
14514 topmost @code{@@node} line in the file, which must be written on the line
14515 immediately preceding the @code{@@top} command.  Used for
14516 @code{makeinfo}'s node pointer insertion feature.  The title is
14517 underlined with asterisks.  Both the @code{@@node} line and the @code{@@top}
14518 line normally should be enclosed by @code{@@ifinfo} and @code{@@end
14519 ifinfo}.  In @TeX{} and @code{texinfo-format-buffer}, the @code{@@top}
14520 command is merely a synonym for @code{@@unnumbered}.  @xref{makeinfo
14521 Pointer Creation, , Creating Pointers with @code{makeinfo}}.
14523 @item @@u@{@var{c}@}
14524 @itemx @@ubaraccent@{@var{c}@}
14525 @itemx @@udotaccent@{@var{c}@}
14526 Generate a breve, underbar, or underdot accent, respectively, over or
14527 under the character @var{c}, as in @u{o}, @ubaraccent{o},
14528 @udotaccent{o}.  @xref{Inserting Accents}.
14530 @item @@unnumbered @var{title}
14531 In a printed manual, begin a chapter that appears without chapter
14532 numbers of any kind.  The title appears in the table of contents of a
14533 printed manual.  In Info, the title is underlined with asterisks.
14534 @xref{unnumbered & appendix, , @code{@@unnumbered} and
14535 @code{@@appendix}}.@refill
14537 @item @@unnumberedsec @var{title}
14538 In a printed manual, begin a section that appears without section
14539 numbers of any kind.  The title appears in the table of contents of a
14540 printed manual.  In Info, the title is underlined with equal signs.
14541 @xref{unnumberedsec appendixsec heading, , Section Commands}.@refill
14543 @item @@unnumberedsubsec @var{title}
14544 In a printed manual, begin an unnumbered subsection within a
14545 chapter.  The title appears in the table of contents of a printed
14546 manual.  In Info, the title is underlined with hyphens.
14547 @xref{unnumberedsubsec appendixsubsec subheading, ,
14548 @code{@@unnumberedsubsec} @code{@@appendixsubsec}
14549 @code{@@subheading}}.@refill
14551 @item @@unnumberedsubsubsec @var{title}
14552 In a printed manual, begin an unnumbered subsubsection within a
14553 chapter.  The title appears in the table of contents of a printed
14554 manual.  In Info, the title is underlined with periods.
14555 @xref{subsubsection, , The `subsub' Commands}.@refill
14557 @item @@uref@{@var{url}[, @var{displayed-text}@}
14558 Define a cross reference to an external uniform resource locator for the
14559 World Wide Web.  @xref{url, , @code{@@url}}.@refill
14561 @item @@url@{@var{url}@}
14562 Indicate text that is a uniform resource locator for the World Wide
14563 Web.  @xref{url, , @code{@@url}}.@refill
14565 @item @@v@{@var{c}@}
14566 Generate check accent over the character @var{c}, as in @v{o}.
14567 @xref{Inserting Accents}.
14569 @item @@value@{@var{flag}@}
14570 Replace @var{flag} with the value to which it is set by @code{@@set
14571 @var{flag}}.
14572 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
14574 @item @@var@{@var{metasyntactic-variable}@}
14575 Highlight a metasyntactic variable, which is something that stands for
14576 another piece of text.  @xref{var, , Indicating Metasyntactic
14577 Variables}.@refill
14579 @need 400
14580 @item @@vindex @var{entry}
14581 Add @var{entry} to the index of variables.  @xref{Index Entries, ,
14582 Defining the Entries of an Index}.@refill
14584 @need 400
14585 @item @@vskip @var{amount}
14586 In a printed manual, insert whitespace so as to push text on the
14587 remainder of the page towards the bottom of the page.  Used in
14588 formatting the copyright page with the argument @samp{0pt plus
14589 1filll}.  (Note spelling of @samp{filll}.)  @code{@@vskip} may be used
14590 only in contexts ignored for Info.  @xref{Copyright & Permissions, ,
14591 The Copyright Page and Printed Permissions}.@refill
14593 @need 400
14594 @item @@vtable @var{formatting-command}
14595 Begin a two-column table, using @code{@@item} for each entry.
14596 Automatically enter each of the items in the first column into the
14597 index of variables.  Pair with @code{@@end vtable}.  The same as
14598 @code{@@table}, except for indexing.  @xref{ftable vtable, ,
14599 @code{@@ftable} and @code{@@vtable}}.@refill
14601 @need 400
14602 @item @@w@{@var{text}@}
14603 Prevent @var{text} from being split across two lines.  Do not end a
14604 paragraph that uses @code{@@w} with an @code{@@refill} command.
14605 @xref{w, , @code{@@w}}.@refill
14607 @need 400
14608 @item @@xref@{@var{node-name}, [@var{entry}], [@var{topic-or-title}], [@var{info-file}], [@var{manual}]@}
14609 Make a reference that starts with `See' in a printed manual.  Follow
14610 command with a punctuation mark.  Only the first argument is
14611 mandatory.  @xref{xref, , @code{@@xref}}.@refill
14612 @end table
14615 @node Tips, Sample Texinfo File, Command List, Top
14616 @appendix Tips and Hints
14618 Here are some tips for writing Texinfo documentation:@refill
14620 @cindex Tips
14621 @cindex Usage tips
14622 @cindex Hints
14623 @itemize @bullet
14624 @item
14625 Write in the present tense, not in the past or the future.
14627 @item
14628 Write actively!  For example, write ``We recommend that @dots{}'' rather
14629 than ``It is recommended that @dots{}''.
14631 @item
14632 Use 70 or 72 as your fill column.  Longer lines are hard to read.
14634 @item
14635 Include a copyright notice and copying permissions.
14636 @end itemize
14638 @subsubheading Index, Index, Index!
14640 Write many index entries, in different ways.
14641 Readers like indices; they are helpful and convenient.
14643 Although it is easiest to write index entries as you write the body of
14644 the text, some people prefer to write entries afterwards.  In either
14645 case, write an entry before the paragraph to which it applies.  This
14646 way, an index entry points to the first page of a paragraph that is
14647 split across pages.
14649 Here are more hints we have found valuable:
14651 @itemize @bullet
14652 @item
14653 Write each index entry differently, so each entry refers to a different
14654 place in the document.
14656 @item
14657 Write index entries only where a topic is discussed significantly.  For
14658 example, it is not useful to index ``debugging information'' in a
14659 chapter on reporting bugs.  Someone who wants to know about debugging
14660 information will certainly not find it in that chapter.
14662 @item
14663 Consistently capitalize the first word of every concept index entry,
14664 or else consistently use lower case.  Terse entries often call for
14665 lower case; longer entries for capitalization.  Whichever case
14666 convention you use, please use one or the other consistently!  Mixing
14667 the two styles looks bad.
14669 @item
14670 Always capitalize or use upper case for those words in an index for
14671 which this is proper, such as names of countries or acronyms.  Always
14672 use the appropriate case for case-sensitive names, such as those in C or
14673 Lisp.
14675 @item
14676 Write the indexing commands that refer to a whole section immediately
14677 after the section command, and write the indexing commands that refer to
14678 the paragraph before the paragraph.
14680 @need 1000
14681 In the example that follows, a blank line comes after the index
14682 entry for ``Leaping'':
14684 @example
14685 @group
14686 @@section The Dog and the Fox
14687 @@cindex Jumping, in general
14688 @@cindex Leaping
14690 @@cindex Dog, lazy, jumped over
14691 @@cindex Lazy dog jumped over
14692 @@cindex Fox, jumps over dog
14693 @@cindex Quick fox jumps over dog
14694 The quick brown fox jumps over the lazy dog.
14695 @end group
14696 @end example
14698 @noindent
14699 (Note that the example shows entries for the same concept that are
14700 written in different ways---@samp{Lazy dog}, and @samp{Dog, lazy}---so
14701 readers can look up the concept in different ways.)
14702 @end itemize
14704 @subsubheading Blank Lines
14706 @itemize @bullet
14707 @item
14708 Insert a blank line between a sectioning command and the first following
14709 sentence or paragraph, or between the indexing commands associated with
14710 the sectioning command and the first following sentence or paragraph, as
14711 shown in the tip on indexing.  Otherwise, a formatter may fold title and
14712 paragraph together.
14714 @item
14715 Always insert a blank line before an @code{@@table} command and after an
14716 @code{@@end table} command; but never insert a blank line after an
14717 @code{@@table} command or before an @code{@@end table} command.
14719 @need 1000
14720 For example,
14722 @example
14723 @group
14724 Types of fox:
14726 @@table @@samp
14727 @@item Quick
14728 Jump over lazy dogs.
14729 @end group
14731 @group
14732 @@item Brown
14733 Also jump over lazy dogs.
14734 @@end table
14736 @end group
14737 @group
14738 @@noindent
14739 On the other hand, @dots{}
14740 @end group
14741 @end example
14743 Insert blank lines before and after @code{@@itemize} @dots{} @code{@@end
14744 itemize} and @code{@@enumerate} @dots{} @code{@@end enumerate} in the
14745 same way.
14746 @end itemize
14748 @subsubheading Complete Phrases
14750 Complete phrases are easier to read than @dots{}
14752 @itemize @bullet
14753 @item
14754 Write entries in an itemized list as complete sentences; or at least, as
14755 complete phrases.  Incomplete expressions @dots{} awkward @dots{} like
14756 this.
14758 @item
14759 Write the prefatory sentence or phrase for a multi-item list or table as
14760 a complete expression.  Do not write ``You can set:''; instead, write
14761 ``You can set these variables:''.  The former expression sounds cut off.
14762 @end itemize
14764 @subsubheading Editions, Dates and Versions
14766 Write the edition and version numbers and date in three places in every
14767 manual:
14769 @enumerate
14770 @item
14771 In the first @code{@@ifinfo} section, for people reading the Texinfo file.
14773 @item
14774 In the @code{@@titlepage} section, for people reading the printed manual.
14776 @item
14777 In the `Top' node, for people reading the Info file.
14778 @end enumerate
14780 @noindent
14781 Also, it helps to write a note before the first @code{@@ifinfo}
14782 section to explain what you are doing.
14784 @need 800
14785 @noindent
14786 For example:
14788 @example
14789 @group
14790 @@c ===> NOTE! <==
14791 @@c Specify the edition and version numbers and date
14792 @@c in *three* places:
14793 @@c   1. First ifinfo section  2. title page  3. top node
14794 @@c To find the locations, search for !!set
14795 @end group
14797 @group
14798 @@ifinfo
14799 @@c !!set edition, date, version
14800 This is Edition 4.03, January 1992,
14801 of the @@cite@{GDB Manual@} for GDB Version 4.3.
14802 @dots{}
14803 @end group
14804 @end example
14806 @noindent
14807 ---or use @code{@@set} and @code{@@value}
14808 (@pxref{value Example, , @code{@@value} Example}).
14810 @subsubheading Definition Commands
14812 Definition commands are @code{@@deffn}, @code{@@defun},
14813 @code{@@defmac}, and the like, and enable you to write descriptions in
14814 a uniform format.@refill
14816 @itemize @bullet
14817 @item
14818 Write just one definition command for each entity you define with a
14819 definition command.  The automatic indexing feature creates an index
14820 entry that leads the reader to the definition.
14822 @item
14823 Use @code{@@table} @dots{} @code{@@end table} in an appendix that
14824 contains a summary of functions, not @code{@@deffn} or other definition
14825 commands.
14826 @end itemize
14828 @subsubheading Capitalization
14830 @itemize @bullet
14831 @item
14832 Capitalize ``Texinfo''; it is a name.  Do not write the @samp{x} or
14833 @samp{i} in upper case.
14835 @item
14836 Capitalize ``Info''; it is a name.
14838 @item
14839 Write @TeX{} using the @code{@@TeX@{@}} command.  Note the uppercase
14840 @samp{T} and @samp{X}.  This command causes the formatters to
14841 typeset the name according to the wishes of Donald Knuth, who wrote
14842 @TeX{}.
14843 @end itemize
14845 @subsubheading Spaces
14847 Do not use spaces to format a Texinfo file, except inside of
14848 @code{@@example} @dots{} @code{@@end example} and similar commands.
14850 @need 700
14851 For example, @TeX{} fills the following:
14853 @example
14854 @group
14855     @@kbd@{C-x v@}
14856     @@kbd@{M-x vc-next-action@}
14857        Perform the next logical operation
14858        on the version-controlled file
14859        corresponding to the current buffer.
14860 @end group
14861 @end example
14863 @need 950
14864 @noindent
14865 so it looks like this:
14867 @iftex
14868 @quotation
14869     @kbd{C-x v}
14870     @kbd{M-x vc-next-action}
14871        Perform the next logical operation on the version-controlled file
14872        corresponding to the current buffer.
14873 @end quotation
14874 @end iftex
14875 @ifinfo
14876 @quotation
14877 `C-x v' `M-x vc-next-action' Perform the next logical operation on the
14878 version-controlled file corresponding to the current buffer.
14879 @end quotation
14880 @end ifinfo
14882 @noindent
14883 In this case, the text should be formatted with
14884 @code{@@table}, @code{@@item}, and @code{@@itemx}, to create a table.
14886 @subsubheading @@code, @@samp, @@var, and @samp{---}
14888 @itemize @bullet
14889 @item
14890 Use @code{@@code} around Lisp symbols, including command names.
14891 For example,
14893 @example
14894 The main function is @@code@{vc-next-action@}, @dots{}
14895 @end example
14897 @item
14898 Avoid putting letters such as @samp{s} immediately after an
14899 @samp{@@code}.  Such letters look bad.
14901 @item
14902 Use @code{@@var} around meta-variables.  Do not write angle brackets
14903 around them.
14905 @item
14906 Use three hyphens in a row, @samp{---}, to indicate a long dash.  @TeX{}
14907 typesets these as a long dash and the Info formatters reduce three
14908 hyphens to two.
14909 @end itemize
14911 @subsubheading Periods Outside of Quotes
14913 Place periods and other punctuation marks @emph{outside} of quotations,
14914 unless the punctuation is part of the quotation.  This practice goes
14915 against publishing conventions in the United States, but enables the
14916 reader to distinguish between the contents of the quotation and the
14917 whole passage.
14919 For example, you should write the following sentence with the period
14920 outside the end quotation marks:
14922 @example
14923 Evidently, @samp{au} is an abbreviation for ``author''.
14924 @end example
14926 @noindent
14927 since @samp{au} does @emph{not} serve as an  abbreviation for
14928 @samp{author.} (with a period following the word).
14930 @subsubheading Introducing New Terms
14932 @itemize @bullet
14933 @item
14934 Introduce new terms so that a reader who does not know them can
14935 understand them from context; or write a definition for the term.
14937 For example, in the following, the terms ``check in'', ``register'' and
14938 ``delta'' are all appearing for the first time; the example sentence should be
14939 rewritten so they are understandable.
14941 @quotation
14942 The major function assists you in checking in a file to your
14943 version control system and registering successive sets of changes to
14944 it as deltas.
14945 @end quotation
14947 @item
14948 Use the @code{@@dfn} command around a word being introduced, to indicate
14949 that the reader should not expect to know the meaning already, and
14950 should expect to learn the meaning from this passage.
14951 @end itemize
14953 @subsubheading @@pxref
14955 @c !!! maybe include this in the tips on pxref
14956 @ignore
14957 By the way, it is okay to use pxref with something else in front of
14958 it within the parens, as long as the pxref is followed by the close
14959 paren, and the material inside the parens is not part of a larger
14960 sentence.  Also, you can use xref inside parens as part of a complete
14961 sentence so long as you terminate the cross reference with punctuation.
14962 @end ignore
14963 Absolutely never use @code{@@pxref} except in the special context for
14964 which it is designed: inside parentheses, with the closing parenthesis
14965 following immediately after the closing brace.  One formatter
14966 automatically inserts closing punctuation and the other does not.  This
14967 means that the output looks right both in printed output and in an Info
14968 file, but only when the command is used inside parentheses.
14970 @subsubheading Invoking from a Shell
14972 You can invoke programs such as Emacs, GCC, and @code{gawk} from a
14973 shell.  The documentation for each program should contain a section that
14974 describes this.  Unfortunately, if the node names and titles for these
14975 sections are all different, readers find it hard to search for the
14976 section.@refill
14978 Name such sections with a phrase beginning with the word
14979 @w{`Invoking @dots{}'}, as in `Invoking Emacs'; this way
14980 users can find the section easily.
14982 @subsubheading ANSI C Syntax
14984 When you use @code{@@example} to describe a C function's calling
14985 conventions, use the ANSI C syntax, like this:@refill
14987 @example
14988 void dld_init (char *@@var@{path@});
14989 @end example
14991 @noindent
14992 And in the subsequent discussion, refer to the argument values by
14993 writing the same argument names, again highlighted with
14994 @code{@@var}.@refill
14996 @need 800
14997 Avoid the obsolete style that looks like this:@refill
14999 @example
15000 #include <dld.h>
15002 dld_init (path)
15003 char *path;
15004 @end example
15006 Also, it is best to avoid writing @code{#include} above the
15007 declaration just to indicate that the function is declared in a
15008 header file.  The practice may give the misimpression that the
15009 @code{#include} belongs near the declaration of the function.  Either
15010 state explicitly which header file holds the declaration or, better
15011 yet, name the header file used for a group of functions at the
15012 beginning of the section that describes the functions.@refill
15014 @subsubheading Bad Examples
15016 Here are several examples of bad writing to avoid:
15018 In this example, say, `` @dots{} you must @code{@@dfn}@{check
15019 in@} the new version.''  That flows better.
15021 @quotation
15022 When you are done editing the file, you must perform a
15023 @code{@@dfn}@{check in@}.
15024 @end quotation
15026 In the following example, say, ``@dots{} makes a unified interface such as VC
15027 mode possible.''
15029 @quotation
15030 SCCS, RCS and other version-control systems all perform similar
15031 functions in broadly similar ways (it is this resemblance which makes
15032 a unified control mode like this possible).
15033 @end quotation
15035 And in this example, you should specify what `it' refers to:
15037 @quotation
15038 If you are working with other people, it assists in coordinating
15039 everyone's changes so they do not step on each other.
15040 @end quotation
15042 @subsubheading And Finally @dots{}
15044 @itemize @bullet
15045 @item
15046 Pronounce @TeX{} as if the @samp{X} were a Greek `chi', as the last
15047 sound in the name `Bach'.  But pronounce Texinfo as in `speck':
15048 ``teckinfo''.
15050 @item
15051 Write notes for yourself at the very end of a Texinfo file after the
15052 @code{@@bye}.  None of the formatters process text after the
15053 @code{@@bye}; it is as if the text were within @code{@@ignore} @dots{}
15054 @code{@@end ignore}.
15055 @end itemize
15058 @node Sample Texinfo File, Sample Permissions, Tips, Top
15059 @appendix A Sample Texinfo File
15060 @cindex Sample Texinfo file, no comments
15062 Here is a complete, short sample Texinfo file, without any commentary.
15063 You can see this file, with comments, in the first chapter.
15064 @xref{Short Sample, , A Short Sample Texinfo File}.
15066 @sp 1
15067 @example
15068 \input texinfo   @@c -*-texinfo-*-
15069 @@c %**start of header
15070 @@setfilename sample.info
15071 @@settitle Sample Document
15072 @@c %**end of header
15074 @@setchapternewpage odd
15076 @@ifinfo
15077 This is a short example of a complete Texinfo file.
15079 Copyright 1990 Free Software Foundation, Inc.
15080 @@end ifinfo
15082 @@titlepage
15083 @@sp 10
15084 @@comment The title is printed in a large font.
15085 @@center @@titlefont@{Sample Title@}
15087 @@c The following two commands start the copyright page.
15088 @@page
15089 @@vskip 0pt plus 1filll
15090 Copyright @@copyright@{@} 1990 Free Software Foundation, Inc.
15091 @@end titlepage
15093 @@node    Top,       First Chapter,         , (dir)
15094 @@comment node-name, next,          previous, up
15096 @@menu
15097 * First Chapter::    The first chapter is the
15098                      only chapter in this sample.
15099 * Concept Index::    This index has two entries.
15100 @@end menu
15102 @@node    First Chapter, Concept Index, Top,      Top
15103 @@comment node-name,     next,          previous, up
15104 @@chapter First Chapter
15105 @@cindex Sample index entry
15107 This is the contents of the first chapter.
15108 @@cindex Another sample index entry
15110 Here is a numbered list.
15112 @@enumerate
15113 @@item
15114 This is the first item.
15116 @@item
15117 This is the second item.
15118 @@end enumerate
15120 The @@code@{makeinfo@} and @@code@{texinfo-format-buffer@}
15121 commands transform a Texinfo file such as this into
15122 an Info file; and @@TeX@{@} typesets it for a printed
15123 manual.
15125 @@node    Concept Index,    ,  First Chapter, Top
15126 @@comment node-name,    next,  previous,      up
15127 @@unnumbered Concept Index
15129 @@printindex cp
15131 @@contents
15132 @@bye
15133 @end example
15136 @node Sample Permissions, Include Files, Sample Texinfo File, Top
15137 @appendix Sample Permissions
15138 @cindex Permissions
15139 @cindex Copying permissions
15141 Texinfo files should contain sections that tell the readers that they
15142 have the right to copy and distribute the Texinfo file, the Info file,
15143 and the printed manual.@refill
15145 Also, if you are writing a manual about software, you should explain
15146 that the software is free and either include the GNU General Public
15147 License (GPL) or provide a reference to it.  @xref{Distrib, ,
15148 Distribution, emacs, The GNU Emacs Manual}, for an example of the text
15149 that could be used in the software ``Distribution'', ``General Public
15150 License'', and ``NO WARRANTY'' sections of a document.  @xref{Copying,
15151 , Texinfo Copying Conditions}, for an example of a brief explanation
15152 of how the copying conditions provide you with rights. @refill
15154 @menu
15155 * Inserting Permissions::       How to put permissions in your document.
15156 * ifinfo Permissions::          Sample @samp{ifinfo} copying permissions.
15157 * Titlepage Permissions::       Sample Titlepage copying permissions.
15158 @end menu
15160 @node Inserting Permissions, ifinfo Permissions, Sample Permissions, Sample Permissions
15161 @ifinfo
15162 @appendixsec Inserting Permissions
15163 @end ifinfo
15165 In a Texinfo file, the first @code{@@ifinfo} section usually begins
15166 with a line that says what the file documents.  This is what a person
15167 reading the unprocessed Texinfo file or using the advanced Info
15168 command @kbd{g *} sees first.  @inforef{Expert, Advanced Info
15169 commands, info}, for more information. (A reader using the regular
15170 Info commands usually starts reading at the first node and skips
15171 this first section, which is not in a node.)@refill
15173 In the @code{@@ifinfo} section, the summary sentence is followed by a
15174 copyright notice and then by the copying permission notice.  One of
15175 the copying permission paragraphs is enclosed in @code{@@ignore} and
15176 @code{@@end ignore} commands.  This paragraph states that the Texinfo
15177 file can be processed through @TeX{} and printed, provided the printed
15178 manual carries the proper copying permission notice.  This paragraph
15179 is not made part of the Info file since it is not relevant to the Info
15180 file; but it is a mandatory part of the Texinfo file since it permits
15181 people to process the Texinfo file in @TeX{} and print the
15182 results.@refill
15184 In the printed manual, the Free Software Foundation copying permission
15185 notice follows the copyright notice and publishing information and is
15186 located within the region delineated by the @code{@@titlepage} and
15187 @code{@@end titlepage} commands.  The copying permission notice is exactly
15188 the same as the notice in the @code{@@ifinfo} section except that the
15189 paragraph enclosed in @code{@@ignore} and @code{@@end ignore} commands is
15190 not part of the notice.@refill
15192 To make it simple to insert a permission notice into each section of
15193 the Texinfo file, sample permission notices for each section are
15194 reproduced in full below.@refill
15196 Note that you may need to specify the correct name of a section
15197 mentioned in the permission notice.  For example, in @cite{The GDB
15198 Manual}, the name of the section referring to the General Public
15199 License is called the ``GDB General Public License'', but in the
15200 sample shown below, that section is referred to generically as the
15201 ``GNU General Public License''.  If the Texinfo file does not carry a
15202 copy of the General Public License, leave out the reference to it, but
15203 be sure to include the rest of the sentence.@refill
15205 @node ifinfo Permissions, Titlepage Permissions, Inserting Permissions, Sample Permissions
15206 @comment  node-name,  next,  previous,  up
15207 @appendixsec @samp{ifinfo} Copying Permissions
15208 @cindex @samp{ifinfo} permissions
15210 In the @code{@@ifinfo} section of a Texinfo file, the standard Free
15211 Software Foundation permission notice reads as follows:@refill
15213 @example
15214 This file documents @dots{}
15216 Copyright 1997 Free Software Foundation, Inc.
15218 Permission is granted to make and distribute verbatim
15219 copies of this manual provided the copyright notice and
15220 this permission notice are preserved on all copies.
15222 @@ignore
15223 Permission is granted to process this file through TeX
15224 and print the results, provided the printed document
15225 carries a copying permission notice identical to this
15226 one except for the removal of this paragraph (this
15227 paragraph not being relevant to the printed manual).
15229 @@end ignore
15230 Permission is granted to copy and distribute modified
15231 versions of this manual under the conditions for
15232 verbatim copying, provided also that the sections
15233 entitled ``Copying'' and ``GNU General Public License''
15234 are included exactly as in the original, and provided
15235 that the entire resulting derived work is distributed
15236 under the terms of a permission notice identical to this
15237 one.
15239 Permission is granted to copy and distribute
15240 translations of this manual into another language,
15241 under the above conditions for modified versions,
15242 except that this permission notice may be stated in a
15243 translation approved by the Free Software Foundation.
15244 @end example
15246 @node Titlepage Permissions,  , ifinfo Permissions, Sample Permissions
15247 @comment  node-name,  next,  previous,  up
15248 @appendixsec Titlepage Copying Permissions
15249 @cindex Titlepage permissions
15251 In the @code{@@titlepage} section of a Texinfo file, the standard Free
15252 Software Foundation copying permission notice follows the copyright
15253 notice and publishing information.  The standard phrasing is as
15254 follows:@refill
15256 @example
15257 Permission is granted to make and distribute verbatim
15258 copies of this manual provided the copyright notice and
15259 this permission notice are preserved on all copies.
15261 Permission is granted to copy and distribute modified
15262 versions of this manual under the conditions for
15263 verbatim copying, provided also that the sections
15264 entitled ``Copying'' and ``GNU General Public License''
15265 are included exactly as in the original, and provided
15266 that the entire resulting derived work is distributed
15267 under the terms of a permission notice identical to this
15268 one.
15270 Permission is granted to copy and distribute
15271 translations of this manual into another language,
15272 under the above conditions for modified versions,
15273 except that this permission notice may be stated in a
15274 translation approved by the Free Software Foundation.
15275 @end example
15278 @node Include Files, Headings, Sample Permissions, Top
15279 @appendix Include Files
15280 @cindex Include files
15282 When @TeX{} or an Info formatting command sees an @code{@@include}
15283 command in a Texinfo file, it processes the contents of the file named
15284 by the command and incorporates them into the DVI or Info file being
15285 created.  Index entries from the included file are incorporated into
15286 the indices of the output file.@refill
15288 Include files let you keep a single large document as a collection of
15289 conveniently small parts.@refill
15291 @menu
15292 * Using Include Files::         How to use the @code{@@include} command.
15293 * texinfo-multiple-files-update::  How to create and update nodes and
15294                                   menus when using included files.
15295 * Include File Requirements::   What @code{texinfo-multiple-files-update} expects.
15296 * Sample Include File::         A sample outer file with included files
15297                                   within it; and a sample included file.
15298 * Include Files Evolution::     How use of the @code{@@include} command
15299                                   has changed over time.
15300 @end menu
15302 @node Using Include Files, texinfo-multiple-files-update, Include Files, Include Files
15303 @appendixsec How to Use Include Files
15304 @findex include
15306 To include another file within a Texinfo file, write the
15307 @code{@@include} command at the beginning of a line and follow it on
15308 the same line by the name of a file to be included.  For
15309 example:@refill
15311 @example
15312 @@include buffers.texi
15313 @end example
15315 An included file should simply be a segment of text that you expect to
15316 be included as is into the overall or @dfn{outer} Texinfo file; it
15317 should not contain the standard beginning and end parts of a Texinfo
15318 file.  In particular, you should not start an included file with a
15319 line saying @samp{\input texinfo}; if you do, that phrase is inserted
15320 into the output file as is.  Likewise, you should not end an included
15321 file with an @code{@@bye} command; nothing after @code{@@bye} is
15322 formatted.@refill
15324 In the past, you were required to write an @code{@@setfilename} line at the
15325 beginning of an included file, but no longer.  Now, it does not matter
15326 whether you write such a line.  If an @code{@@setfilename} line exists
15327 in an included file, it is ignored.@refill
15329 Conventionally, an included file begins with an @code{@@node} line that
15330 is followed by an @code{@@chapter} line.  Each included file is one
15331 chapter.  This makes it easy to use the regular node and menu creating
15332 and updating commands to create the node pointers and menus within the
15333 included file.  However, the simple Emacs node and menu creating and
15334 updating commands do not work with multiple Texinfo files.  Thus you
15335 cannot use these commands to fill in the `Next', `Previous', and `Up'
15336 pointers of the @code{@@node} line that begins the included file.  Also,
15337 you cannot use the regular commands to create a master menu for the
15338 whole file.  Either you must insert the menus and the `Next',
15339 `Previous', and `Up' pointers by hand, or you must use the GNU Emacs
15340 Texinfo mode command, @code{texinfo-multiple-files-update}, that is
15341 designed for @code{@@include} files.@refill
15343 @node texinfo-multiple-files-update, Include File Requirements, Using Include Files, Include Files
15344 @appendixsec @code{texinfo-multiple-files-update}
15345 @findex texinfo-multiple-files-update
15347 GNU Emacs Texinfo mode provides the @code{texinfo-multiple-files-update}
15348 command.  This command creates or updates `Next', `Previous', and `Up'
15349 pointers of included files as well as those in the outer or overall
15350 Texinfo file, and it creates or updates a main menu in the outer file.
15351 Depending whether you call it with optional arguments, the command
15352 updates only the pointers in the first @code{@@node} line of the
15353 included files or all of them:@refill
15355 @table @kbd
15356 @item M-x texinfo-multiple-files-update
15357 Called without any arguments:@refill
15359 @itemize @minus
15360 @item
15361 Create or update the `Next', `Previous', and `Up' pointers of the
15362 first @code{@@node} line in each file included in an outer or overall
15363 Texinfo file.@refill
15365 @item
15366 Create or update the `Top' level node pointers of the outer or
15367 overall file.@refill
15369 @item
15370 Create or update a main menu in the outer file.@refill
15371 @end itemize
15373 @item C-u M-x texinfo-multiple-files-update
15374 Called with @kbd{C-u} as a prefix argument:
15376 @itemize @minus{}
15377 @item
15378 Create or update pointers in the first @code{@@node} line in each
15379 included file.
15381 @item
15382 Create or update the `Top' level node pointers of the outer file.
15384 @item
15385 Create and insert a master menu in the outer file.  The master menu
15386 is made from all the menus in all the included files.@refill
15387 @end itemize
15389 @item C-u 8 M-x texinfo-multiple-files-update
15390 Called with a numeric prefix argument, such as @kbd{C-u 8}:
15392 @itemize @minus
15393 @item
15394 Create or update @strong{all} the `Next', `Previous', and `Up' pointers
15395 of all the included files.@refill
15397 @item
15398 Create or update @strong{all} the menus of all the included
15399 files.@refill
15401 @item
15402 Create or update the `Top' level node pointers of the outer or
15403 overall file.@refill
15405 @item
15406 And then create a master menu in the outer file.  This is similar to
15407 invoking @code{texinfo-master-menu} with an argument when you are
15408 working with just one file.@refill
15409 @end itemize
15410 @end table
15412 Note the use of the prefix argument in interactive use: with a regular
15413 prefix argument, just @w{@kbd{C-u}}, the
15414 @code{texinfo-multiple-files-update} command inserts a master menu;
15415 with a numeric prefix argument, such as @kbd{C-u 8}, the command
15416 updates @strong{every} pointer and menu in @strong{all} the files and then inserts a
15417 master menu.@refill
15419 @node Include File Requirements, Sample Include File, texinfo-multiple-files-update, Include Files
15420 @appendixsec Include File Requirements
15421 @cindex Include file requirements
15422 @cindex Requirements for include files
15424 If you plan to use the @code{texinfo-multiple-files-update} command,
15425 the outer Texinfo file that lists included files within it should
15426 contain nothing but the beginning and end parts of a Texinfo file, and
15427 a number of @code{@@include} commands listing the included files.  It
15428 should not even include indices, which should be listed in an included
15429 file of their own.@refill
15431 Moreover, each of the included files must contain exactly one highest
15432 level node (conventionally, @code{@@chapter} or equivalent),
15433 and this node must be the first node in the included file.
15434 Furthermore, each of these highest level nodes in each included file
15435 must be at the same hierarchical level in the file structure.
15436 Usually, each is an @code{@@chapter}, an @code{@@appendix}, or an
15437 @code{@@unnumbered} node.  Thus, normally, each included file contains
15438 one, and only one, chapter or equivalent-level node.@refill
15440 The outer file should contain only @emph{one} node, the `Top' node.  It
15441 should @emph{not} contain any nodes besides the single `Top' node.  The
15442 @code{texinfo-multiple-files-update} command will not process
15443 them.@refill
15445 @node Sample Include File, Include Files Evolution, Include File Requirements, Include Files
15446 @appendixsec Sample File with @code{@@include}
15447 @cindex Sample @code{@@include} file
15448 @cindex Include file sample
15449 @cindex @code{@@include} file sample
15451 Here is an example of a complete outer Texinfo file with @code{@@include} files
15452 within it before running @code{texinfo-multiple-files-update}, which
15453 would insert a main or master menu:@refill
15455 @example
15456 @group
15457 \input texinfo @@c -*-texinfo-*-
15458 @c %**start of header
15459 @@setfilename  include-example.info
15460 @@settitle Include Example
15461 @c %**end of header
15462 @end group
15464 @group
15465 @@setchapternewpage odd
15466 @@titlepage
15467 @@sp 12
15468 @@center @@titlefont@{Include Example@}
15469 @@sp 2
15470 @@center by Whom Ever
15471 @end group
15473 @group
15474 @@page
15475 @@vskip 0pt plus 1filll
15476 Copyright @@copyright@{@} 1997 Free Software Foundation, Inc.
15477 @@end titlepage
15478 @end group
15480 @group
15481 @@ifinfo
15482 @@node Top, First, , (dir)
15483 @@top Master Menu
15484 @@end ifinfo
15485 @end group
15487 @group
15488 @@include foo.texinfo
15489 @@include bar.texinfo
15490 @@include concept-index.texinfo
15491 @end group
15493 @group
15494 @@summarycontents
15495 @@contents
15497 @@bye
15498 @end group
15499 @end example
15501 An included file, such as @file{foo.texinfo}, might look like
15502 this:@refill
15504 @example
15505 @group
15506 @@node First, Second, , Top
15507 @@chapter First Chapter
15509 Contents of first chapter @dots{}
15510 @end group
15511 @end example
15513 The full contents of @file{concept-index.texinfo} might be as simple as this:
15515 @example
15516 @group
15517 @@node Concept Index, , Second, Top
15518 @@unnumbered Concept Index
15520 @@printindex cp
15521 @end group
15522 @end example
15524 The outer Texinfo source file for @cite{The GNU Emacs Lisp Reference
15525 Manual} is named @file{elisp.texi}.  This outer file contains a master
15526 menu with 417 entries and a list of 41 @code{@@include}
15527 files.@refill
15529 @node Include Files Evolution,  , Sample Include File, Include Files
15530 @comment  node-name,  next,  previous,  up
15531 @appendixsec Evolution of Include Files
15533 When Info was first created, it was customary to create many small
15534 Info files on one subject.  Each Info file was formatted from its own
15535 Texinfo source file.  This custom meant that Emacs did not need to
15536 make a large buffer to hold the whole of a large Info file when
15537 someone wanted information; instead, Emacs allocated just enough
15538 memory for the small Info file that contained the particular
15539 information sought.  This way, Emacs could avoid wasting memory.@refill
15541 References from one file to another were made by referring to the file
15542 name as well as the node name. (@xref{Other Info Files, , Referring to
15543 Other Info Files}.  Also, see @ref{Four and Five Arguments, ,
15544 @code{@@xref} with Four and Five Arguments}.)@refill
15546 Include files were designed primarily as a way to create a single,
15547 large printed manual out of several smaller Info files.  In a printed
15548 manual, all the references were within the same document, so @TeX{}
15549 could automatically determine the references' page numbers.  The Info
15550 formatting commands used include files only for creating joint
15551 indices; each of the individual Texinfo files had to be formatted for
15552 Info individually.  (Each, therefore, required its own
15553 @code{@@setfilename} line.)@refill
15555 However, because large Info files are now split automatically, it is
15556 no longer necessary to keep them small.@refill
15558 Nowadays, multiple Texinfo files are used mostly for large documents,
15559 such as @cite{The GNU Emacs Lisp Reference Manual}, and for projects
15560 in which several different people write different sections of a
15561 document simultaneously.@refill
15563 In addition, the Info formatting commands have been extended to work
15564 with the @code{@@include} command so as to create a single large Info
15565 file that is split into smaller files if necessary.  This means that
15566 you can write menus and cross references without naming the different
15567 Texinfo files.@refill
15570 @node Headings, Catching Mistakes, Include Files, Top
15571 @appendix Page Headings
15572 @cindex Headings
15573 @cindex Footings
15574 @cindex Page numbering
15575 @cindex Page headings
15576 @cindex Formatting headings and footings
15578 Most printed manuals contain headings along the top of every page
15579 except the title and copyright pages.  Some manuals also contain
15580 footings.  (Headings and footings have no meaning to Info, which is
15581 not paginated.)@refill
15583 @menu
15584 * Headings Introduced::         Conventions for using page headings.
15585 * Heading Format::              Standard page heading formats.
15586 * Heading Choice::              How to specify the type of page heading.
15587 * Custom Headings::             How to create your own headings and footings.
15588 @end menu
15590 @node Headings Introduced, Heading Format, Headings, Headings
15591 @ifinfo
15592 @heading Headings Introduced
15593 @end ifinfo
15595 Texinfo provides standard page heading formats for manuals that are
15596 printed on one side of each sheet of paper and for manuals that are
15597 printed on both sides of the paper.  Typically, you will use these
15598 formats, but you can specify your own format if you wish.@refill
15600 In addition, you can specify whether chapters should begin on a new
15601 page, or merely continue the same page as the previous chapter; and if
15602 chapters begin on new pages, you can specify whether they must be
15603 odd-numbered pages.@refill
15605 By convention, a book is printed on both sides of each sheet of paper.
15606 When you open a book, the right-hand page is odd-numbered, and
15607 chapters begin on right-hand pages---a preceding left-hand page is
15608 left blank if necessary.  Reports, however, are often printed on just
15609 one side of paper, and chapters begin on a fresh page immediately
15610 following the end of the preceding chapter.  In short or informal
15611 reports, chapters often do not begin on a new page at all, but are
15612 separated from the preceding text by a small amount of whitespace.@refill
15614 The @code{@@setchapternewpage} command controls whether chapters begin
15615 on new pages, and whether one of the standard heading formats is used.
15616 In addition, Texinfo has several heading and footing commands that you
15617 can use to generate your own heading and footing formats.@refill
15619 In Texinfo, headings and footings are single lines at the tops and
15620 bottoms of pages; you cannot create multiline headings or footings.
15621 Each header or footer line is divided into three parts: a left part, a
15622 middle part, and a right part.  Any part, or a whole line, may be left
15623 blank.  Text for the left part of a header or footer line is set
15624 flushleft; text for the middle part is centered; and, text for the
15625 right part is set flushright.@refill
15627 @node Heading Format, Heading Choice, Headings Introduced, Headings
15628 @comment  node-name,  next,  previous,  up
15629 @appendixsec Standard Heading Formats
15631 Texinfo provides two standard heading formats, one for manuals printed
15632 on one side of each sheet of paper, and the other for manuals printed
15633 on both sides of the paper.
15635 By default, nothing is specified for the footing of a Texinfo file,
15636 so the footing remains blank.@refill
15638 The standard format for single-sided printing consists of a header
15639 line in which the left-hand part contains the name of the chapter, the
15640 central part is blank, and the right-hand part contains the page
15641 number.@refill
15643 @need 950
15644 A single-sided page looks like this:
15646 @example
15647 @group
15648    _______________________
15649   |                       |
15650   | chapter   page number |
15651   |                       |
15652   | Start of text ...     |
15653   | ...                   |
15654   |                       |
15656 @end group
15657 @end example
15659 The standard format for two-sided printing depends on whether the page
15660 number is even or odd.  By convention, even-numbered pages are on the
15661 left- and odd-numbered pages are on the right.  (@TeX{} will adjust the
15662 widths of the left- and right-hand margins.  Usually, widths are
15663 correct, but during double-sided printing, it is wise to check that
15664 pages will bind properly---sometimes a printer will produce output in
15665 which the even-numbered pages have a larger right-hand margin than the
15666 odd-numbered pages.)@refill
15668 In the standard double-sided format, the left part of the left-hand
15669 (even-numbered) page contains the page number, the central part is
15670 blank, and the right part contains the title (specified by the
15671 @code{@@settitle} command).  The left part of the right-hand
15672 (odd-numbered) page contains the name of the chapter, the central part
15673 is blank, and the right part contains the page number.@refill
15675 @need 750
15676 Two pages, side by side as in an open book, look like this:@refill
15678 @example
15679 @group
15680    _______________________     _______________________
15681   |                       |   |                       |
15682   | page number     title |   | chapter   page number |
15683   |                       |   |                       |
15684   | Start of text ...     |   | More  text ...        |
15685   | ...                   |   | ...                   |
15686   |                       |   |                       |
15688 @end group
15689 @end example
15691 @noindent
15692 The chapter name is preceded by the word ``Chapter'', the chapter number
15693 and a colon.  This makes it easier to keep track of where you are in the
15694 manual.@refill
15696 @node Heading Choice, Custom Headings, Heading Format, Headings
15697 @comment  node-name,  next,  previous,  up
15698 @appendixsec Specifying the Type of Heading
15700 @TeX{} does not begin to generate page headings for a standard Texinfo
15701 file until it reaches the @code{@@end titlepage} command.  Thus, the
15702 title and copyright pages are not numbered.  The @code{@@end
15703 titlepage} command causes @TeX{} to begin to generate page headings
15704 according to a standard format specified by the
15705 @code{@@setchapternewpage} command that precedes the
15706 @code{@@titlepage} section.@refill
15708 @need 1000
15709 There are four possibilities:@refill
15711 @table @asis
15712 @item No @code{@@setchapternewpage} command
15713 Cause @TeX{} to specify the single-sided heading format, with chapters
15714 on new pages. This is the same as @code{@@setchapternewpage on}.@refill
15716 @item @code{@@setchapternewpage on}
15717 Specify the single-sided heading format, with chapters on new pages.@refill
15719 @item @code{@@setchapternewpage off}
15720 Cause @TeX{} to start a new chapter on the same page as the last page of
15721 the preceding chapter, after skipping some vertical whitespace.  Also
15722 cause @TeX{} to typeset for single-sided printing.  (You can override
15723 the headers format with the @code{@@headings double} command; see
15724 @ref{headings on off, , The @code{@@headings} Command}.)@refill
15726 @item @code{@@setchapternewpage odd}
15727 Specify the double-sided heading format, with chapters on new pages.@refill
15728 @end table
15730 @noindent
15731 Texinfo lacks an @code{@@setchapternewpage even} command.@refill
15733 @node Custom Headings,  , Heading Choice, Headings
15734 @comment  node-name,  next,  previous,  up
15735 @appendixsec How to Make Your Own Headings
15737 You can use the standard headings provided with Texinfo or specify
15738 your own.  By default, Texinfo has no footers, so if you specify them,
15739 the available page size for the main text will be slightly reduced.
15741 @c Following paragraph is verbose to prevent overfull hboxes.
15742 Texinfo provides six commands for specifying headings and
15743 footings.  The @code{@@everyheading} command and
15744 @code{@@everyfooting} command generate page headers and footers
15745 that are the same for both even- and odd-numbered pages.
15746 The @code{@@evenheading} command and @code{@@evenfooting}
15747 command generate headers and footers for even-numbered
15748 (left-hand) pages; and the @code{@@oddheading} command and
15749 @code{@@oddfooting} command generate headers and footers for
15750 odd-numbered (right-hand) pages.@refill
15752 Write custom heading specifications in the Texinfo file immediately
15753 after the @code{@@end titlepage} command.  Enclose your specifications
15754 between @code{@@iftex} and @code{@@end iftex} commands since the
15755 @code{texinfo-format-buffer} command may not recognize them.  Also,
15756 you must cancel the predefined heading commands with the
15757 @code{@@headings off} command before defining your own
15758 specifications.@refill
15760 @need 1000
15761 Here is how to tell @TeX{} to place the chapter name at the left, the
15762 page number in the center, and the date at the right of every header
15763 for both even- and odd-numbered pages:@refill
15765 @example
15766 @group
15767 @@iftex
15768 @@headings off
15769 @@everyheading @@thischapter @@| @@thispage @@| @@today@{@}
15770 @@end iftex
15771 @end group
15772 @end example
15774 @noindent
15775 You need to divide the left part from the central part and the central
15776 part from the right part by inserting @samp{@@|} between parts.
15777 Otherwise, the specification command will not be able to tell where
15778 the text for one part ends and the next part begins.@refill
15780 Each part can contain text or @@-commands.  The text
15781 is printed as if the part were within an ordinary paragraph in the
15782 body of the page.  The @@-commands replace
15783 themselves with the page number, date, chapter name, or
15784 whatever.@refill
15786 @need 950
15787 Here are the six heading and footing commands:@refill
15789 @findex everyheading
15790 @findex everyfooting
15791 @table @code
15792 @item @@everyheading @var{left} @@| @var{center} @@| @var{right}
15793 @itemx @@everyfooting @var{left} @@| @var{center} @@| @var{right}
15795 The `every' commands specify the format for both even- and odd-numbered
15796 pages.  These commands are for documents that are printed on one side
15797 of each sheet of paper, or for documents in which you want symmetrical
15798 headers or footers.@refill
15800 @findex evenheading
15801 @findex evenfooting
15802 @findex oddheading
15803 @findex oddfooting
15804 @item @@evenheading @var{left} @@| @var{center} @@| @var{right}
15805 @itemx @@oddheading  @var{left} @@| @var{center} @@| @var{right}
15807 @itemx @@evenfooting @var{left} @@| @var{center} @@| @var{right}
15808 @itemx @@oddfooting  @var{left} @@| @var{center} @@| @var{right}
15810 The `even' and `odd' commands specify the format for even-numbered
15811 pages and odd-numbered pages.  These commands are for books and
15812 manuals that are printed on both sides of each sheet of paper.
15813 @end table
15815 Use the @samp{@@this@dots{}} series of @@-commands to
15816 provide the names of chapters
15817 and sections and the page number.  You can use the
15818 @samp{@@this@dots{}} commands in the left, center, or right portions
15819 of headers and footers, or anywhere else in a Texinfo file so long as
15820 they are between @code{@@iftex} and @code{@@end iftex} commands.@refill
15822 @need 1000
15823 Here are the @samp{@@this@dots{}} commands:@refill
15825 @table @code
15826 @findex thispage
15827 @item @@thispage
15828 Expands to the current page number.@refill
15829 @c !!! Karl Berry says that `thissection' can fail on page breaks.
15830 @ignore
15831 @item @@thissection
15832 Expands to the name of the current section.@refill
15833 @end ignore
15835 @findex thischaptername
15836 @item @@thischaptername
15837 Expands to the name of the current chapter.@refill
15839 @findex thischapter
15840 @item @@thischapter
15841 Expands to the number and name of the current
15842 chapter, in the format `Chapter 1: Title'.@refill
15844 @findex thistitle
15845 @item @@thistitle
15846 Expands to the name of the document, as specified by the
15847 @code{@@settitle} command.@refill
15849 @findex thisfile
15850 @item @@thisfile
15851 For @code{@@include} files only: expands to the name of the current
15852 @code{@@include} file.  If the current Texinfo source file is not an
15853 @code{@@include} file, this command has no effect.  This command does
15854 @emph{not} provide the name of the current Texinfo source file unless
15855 it is an @code{@@include} file.  (@xref{Include Files}, for more
15856 information about @code{@@include} files.)@refill
15857 @end table
15859 @noindent
15860 You can also use the @code{@@today@{@}} command, which expands to the
15861 current date, in `1 Jan 1900' format.@refill
15862 @findex today
15864 Other @@-commands and text are printed in a header or footer just as
15865 if they were in the body of a page.  It is useful to incorporate text,
15866 particularly when you are writing drafts:@refill
15868 @example
15869 @group
15870 @@iftex
15871 @@headings off
15872 @@everyheading @@emph@{Draft!@} @@| @@thispage @@| @@thischapter
15873 @@everyfooting @@| @@| Version: 0.27: @@today@{@}
15874 @@end iftex
15875 @end group
15876 @end example
15878 Beware of overlong titles: they may overlap another part of the
15879 header or footer and blot it out.@refill
15882 @node Catching Mistakes, Refilling Paragraphs, Headings, Top
15883 @appendix Formatting Mistakes
15884 @cindex Structure, catching mistakes in
15885 @cindex Nodes, catching mistakes
15886 @cindex Catching mistakes
15887 @cindex Correcting mistakes
15888 @cindex Mistakes, catching
15889 @cindex Problems, catching
15890 @cindex Debugging the Texinfo structure
15892 Besides mistakes in the content of your documentation, there
15893 are two kinds of mistake you can make with Texinfo:  you can make mistakes
15894 with @@-commands, and you can make mistakes with the structure of the
15895 nodes and chapters.@refill
15897 Emacs has two tools for catching the @@-command mistakes and two for
15898 catching structuring mistakes.@refill
15900 For finding problems with @@-commands, you can run @TeX{} or a region
15901 formatting command on the region that has a problem; indeed, you can
15902 run these commands on each region as you write it.@refill
15904 For finding problems with the structure of nodes and chapters, you can use
15905 @kbd{C-c C-s} (@code{texinfo-show-structure}) and the related @code{occur}
15906 command and you can use the @kbd{M-x Info-validate} command.@refill
15908 @menu
15909 * makeinfo Preferred::          @code{makeinfo} finds errors.
15910 * Debugging with Info::         How to catch errors with Info formatting.
15911 * Debugging with TeX::          How to catch errors with @TeX{} formatting.
15912 * Using texinfo-show-structure::  How to use @code{texinfo-show-structure}.
15913 * Using occur::                 How to list all lines containing a pattern.
15914 * Running Info-Validate::       How to find badly referenced nodes.
15915 @end menu
15917 @node makeinfo Preferred, Debugging with Info, Catching Mistakes, Catching Mistakes
15918 @ifinfo
15919 @heading @code{makeinfo} Find Errors
15920 @end ifinfo
15922 The @code{makeinfo} program does an excellent job of catching errors
15923 and reporting them---far better than @code{texinfo-format-region} or
15924 @code{texinfo-format-buffer}.  In addition, the various functions for
15925 automatically creating and updating node pointers and menus remove
15926 many opportunities for human error.@refill
15928 If you can, use the updating commands to create and insert pointers
15929 and menus.  These prevent many errors.  Then use @code{makeinfo} (or
15930 its Texinfo mode manifestations, @code{makeinfo-region} and
15931 @code{makeinfo-buffer}) to format your file and check for other
15932 errors.  This is the best way to work with Texinfo.  But if you
15933 cannot use @code{makeinfo}, or your problem is very puzzling, then you
15934 may want to use the tools described in this appendix.@refill
15936 @node Debugging with Info, Debugging with TeX, makeinfo Preferred, Catching Mistakes
15937 @comment  node-name,  next,  previous,  up
15938 @appendixsec Catching Errors with Info Formatting
15939 @cindex Catching errors with Info formatting
15940 @cindex Debugging with Info formatting
15942 After you have written part of a Texinfo file, you can use the
15943 @code{texinfo-format-region} or the @code{makeinfo-region} command to
15944 see whether the region formats properly.@refill
15946 Most likely, however, you are reading this section because for some
15947 reason you cannot use the @code{makeinfo-region} command; therefore, the
15948 rest of this section presumes that you are using
15949 @code{texinfo-format-region}.@refill
15951 If you have made a mistake with an @@-command,
15952 @code{texinfo-format-region} will stop processing at or after the
15953 error and display an error message.  To see where in the buffer the
15954 error occurred, switch to the @samp{*Info Region*} buffer; the cursor
15955 will be in a position that is after the location of the error.  Also,
15956 the text will not be formatted after the place where the error
15957 occurred (or more precisely, where it was detected).@refill
15959 For example, if you accidentally end a menu with the command @code{@@end
15960 menus} with an `s' on the end, instead of with @code{@@end menu}, you
15961 will see an error message that says:@refill
15963 @example
15964 @@end menus is not handled by texinfo
15965 @end example
15967 @noindent
15968 The cursor will stop at the point in the buffer where the error
15969 occurs, or not long after it.  The buffer will look like this:@refill
15971 @example
15972 @group
15973 ---------- Buffer: *Info Region* ----------
15974 * Menu:
15976 * Using texinfo-show-structure::  How to use
15977                                   `texinfo-show-structure'
15978                                   to catch mistakes.
15979 * Running Info-Validate::         How to check for
15980                                   unreferenced nodes.
15981 @@end menus
15982 @point{}
15983 ---------- Buffer: *Info Region* ----------
15984 @end group
15985 @end example
15987 The @code{texinfo-format-region} command sometimes provides slightly
15988 odd error messages.  For example, the following cross reference fails to format:@refill
15990 @example
15991 (@@xref@{Catching Mistakes, for more info.)
15992 @end example
15994 @noindent
15995 In this case, @code{texinfo-format-region} detects the missing closing
15996 brace but displays a message that says @samp{Unbalanced parentheses}
15997 rather than @samp{Unbalanced braces}.  This is because the formatting
15998 command looks for mismatches between braces as if they were
15999 parentheses.@refill
16001 Sometimes @code{texinfo-format-region} fails to detect mistakes.  For
16002 example, in the following, the closing brace is swapped with the
16003 closing parenthesis:@refill
16005 @example
16006 (@@xref@{Catching Mistakes), for more info.@}
16007 @end example
16009 @noindent
16010 Formatting produces:
16011 @example
16012 (*Note for more info.: Catching Mistakes)
16013 @end example
16015 The only way for you to detect this error is to realize that the
16016 reference should have looked like this:@refill
16018 @example
16019 (*Note Catching Mistakes::, for more info.)
16020 @end example
16022 Incidentally, if you are reading this node in Info and type @kbd{f
16023 @key{RET}} (@code{Info-follow-reference}), you will generate an error
16024 message that says:
16026 @example
16027 No such node: "Catching Mistakes) The only way @dots{}
16028 @end example
16030 @noindent
16031 This is because Info perceives the example of the error as the first
16032 cross reference in this node and if you type a @key{RET} immediately
16033 after typing the Info @kbd{f} command, Info will attempt to go to the
16034 referenced node.  If you type @kbd{f catch @key{TAB} @key{RET}}, Info
16035 will complete the node name of the correctly written example and take
16036 you to the `Catching Mistakes' node.  (If you try this, you can return
16037 from the `Catching Mistakes' node by typing @kbd{l}
16038 (@code{Info-last}).)
16040 @c !!! section on using Elisp debugger ignored.
16041 @ignore
16042 Sometimes @code{texinfo-format-region} will stop long after the
16043 original error; this is because it does not discover the problem until
16044 then.  In this case, you will need to backtrack.@refill
16046 @c menu
16047 @c * Using the Emacs Lisp Debugger::  How to use the Emacs Lisp debugger.
16048 @c end menu
16050 @c node Using the Emacs Lisp Debugger
16051 @c appendixsubsec Using the Emacs Lisp Debugger
16052 @c index Using the Emacs Lisp debugger
16053 @c index Emacs Lisp debugger
16054 @c index Debugger, using the Emacs Lisp
16056 If an error is especially elusive, you can turn on the Emacs Lisp
16057 debugger and look at the backtrace; this tells you where in the
16058 @code{texinfo-format-region} function the problem occurred.  You can
16059 turn on the debugger with the command:@refill
16061 @example
16062 M-x set-variable @key{RET} debug-on-error @key{RET} t @key{RET}
16063 @end example
16065 @noindent
16066 and turn it off with
16068 @example
16069 M-x set-variable @key{RET} debug-on-error @key{RET} nil @key{RET}
16070 @end example
16072 Often, when you are using the debugger, it is easier to follow what is
16073 going on if you use the Emacs Lisp files that are not byte-compiled.
16074 The byte-compiled sources send octal numbers to the debugger that may
16075 look mysterious.  To use the uncompiled source files, load
16076 @file{texinfmt.el} and @file{texinfo.el} with the @kbd{M-x load-file}
16077 command.@refill
16079 The debugger will not catch an error if @code{texinfo-format-region}
16080 does not detect one.  In the example shown above,
16081 @code{texinfo-format-region} did not find the error when the whole
16082 list was formatted, but only when part of the list was formatted.
16083 When @code{texinfo-format-region} did not find an error, the debugger
16084 did not find one either. @refill
16086 However, when @code{texinfo-format-region} did report an error, it
16087 invoked the debugger.  This is the backtrace it produced:@refill
16089 @example
16090 ---------- Buffer: *Backtrace* ----------
16091 Signalling: (search-failed "[@},]")
16092   re-search-forward("[@},]")
16093   (while ...)
16094   (let ...)
16095   texinfo-format-parse-args()
16096   (let ...)
16097   texinfo-format-xref()
16098   funcall(texinfo-format-xref)
16099   (if ...)
16100   (let ...)
16101   (if ...)
16102   (while ...)
16103   texinfo-format-scan()
16104   (save-excursion ...)
16105   (let ...)
16106   texinfo-format-region(103370 103631)
16107 * call-interactively(texinfo-format-region)
16108 ---------- Buffer: *Backtrace* ----------
16109 @end example
16111 The backtrace is read from the bottom up.
16112 @code{texinfo-format-region} was called interactively; and it, in
16113 turn, called various functions, including @code{texinfo-format-scan},
16114 @code{texinfo-format-xref} and @code{texinfo-format-parse-args}.
16115 Inside the function @code{texinfo-format-parse-args}, the function
16116 @code{re-search-forward} was called; it was this function that could
16117 not find the missing right-hand brace.@refill
16119 @xref{Lisp Debug, , Debugging Emacs Lisp, emacs, The GNU Emacs
16120 Manual}, for more information.@refill
16121 @end ignore
16123 @node Debugging with TeX, Using texinfo-show-structure, Debugging with Info, Catching Mistakes
16124 @comment  node-name,  next,  previous,  up
16125 @appendixsec Catching Errors with @TeX{} Formatting
16126 @cindex Catching errors with @TeX{} formatting
16127 @cindex Debugging with @TeX{} formatting
16129 You can also catch mistakes when you format a file with @TeX{}.@refill
16131 Usually, you will want to do this after you have run
16132 @code{texinfo-format-buffer} (or, better, @code{makeinfo-buffer}) on
16133 the same file, because @code{texinfo-format-buffer} sometimes displays
16134 error messages that make more sense than @TeX{}.  (@xref{Debugging
16135 with Info}, for more information.)@refill
16137 For example, @TeX{} was run on a Texinfo file, part of which is shown
16138 here:@refill
16140 @example
16141 ---------- Buffer: texinfo.texi ----------
16142 name of the Texinfo file as an extension.  The
16143 @@samp@{??@} are `wildcards' that cause the shell to
16144 substitute all the raw index files.  (@@xref@{sorting
16145 indices, for more information about sorting
16146 indices.)@@refill
16147 ---------- Buffer: texinfo.texi ----------
16148 @end example
16150 @noindent
16151 (The cross reference lacks a closing brace.)
16152 @TeX{} produced the following output, after which it stopped:@refill
16154 @example
16155 ---------- Buffer: *tex-shell* ----------
16156 Runaway argument?
16157 @{sorting indices, for more information about sorting
16158 indices.) @@refill @@ETC.
16159 ! Paragraph ended before @@xref was complete.
16160 <to be read again>
16161                    @@par
16162 l.27
16165 ---------- Buffer: *tex-shell* ----------
16166 @end example
16168 In this case, @TeX{} produced an accurate and
16169 understandable error message:
16171 @example
16172 Paragraph ended before @@xref was complete.
16173 @end example
16175 @noindent
16176 @samp{@@par} is an internal @TeX{} command of no relevance to Texinfo.
16177 @samp{l.27} means that @TeX{} detected the problem on line 27 of the
16178 Texinfo file.  The @samp{?} is the prompt @TeX{} uses in this
16179 circumstance.@refill
16181 Unfortunately, @TeX{} is not always so helpful, and sometimes you must
16182 truly be a Sherlock Holmes to discover what went wrong.@refill
16184 In any case, if you run into a problem like this, you can do one of three
16185 things.@refill
16187 @enumerate
16188 @item
16189 You can tell @TeX{} to continue running and ignore just this error by
16190 typing @key{RET} at the @samp{?} prompt.@refill
16192 @item
16193 You can tell @TeX{} to continue running and to ignore all errors as best
16194 it can by typing @kbd{r @key{RET}} at the @samp{?} prompt.@refill
16196 This is often the best thing to do.  However, beware: the one error
16197 may produce a cascade of additional error messages as its consequences
16198 are felt through the rest of the file.  To stop @TeX{} when it is
16199 producing such an avalanche of error messages, type @kbd{C-c} (or
16200 @kbd{C-c C-c}, if you are running a shell inside Emacs).
16202 @item
16203 You can tell @TeX{} to stop this run by typing @kbd{x @key{RET}}
16204 at the @samp{?} prompt.@refill
16205 @end enumerate
16207 Please note that if you are running @TeX{} inside Emacs, you need to
16208 switch to the shell buffer and line at which @TeX{} offers the @samp{?}
16209 prompt.@refill
16211 Sometimes @TeX{} will format a file without producing error messages even
16212 though there is a problem.  This usually occurs if a command is not ended
16213 but @TeX{} is able to continue processing anyhow.  For example, if you fail
16214 to end an itemized list with the @code{@@end itemize} command, @TeX{} will
16215 write a DVI file that you can print out.  The only error message that
16216 @TeX{} will give you is the somewhat mysterious comment that@refill
16218 @example
16219 (@@end occurred inside a group at level 1)
16220 @end example
16222 @noindent
16223 However, if you print the DVI file, you will find that the text
16224 of the file that follows the itemized list is entirely indented as if
16225 it were part of the last item in the itemized list.  The error message
16226 is the way @TeX{} says that it expected to find an @code{@@end}
16227 command somewhere in the file; but that it could not determine where
16228 it was needed.@refill
16230 Another source of notoriously hard-to-find errors is a missing
16231 @code{@@end group} command.  If you ever are stumped by
16232 incomprehensible errors, look for a missing @code{@@end group} command
16233 first.@refill
16235 If the Texinfo file lacks header lines,
16236 @TeX{} may stop in the
16237 beginning of its run and display output that looks like the following.
16238 The @samp{*} indicates that @TeX{} is waiting for input.@refill
16240 @example
16241 This is TeX, Version 3.14159 (Web2c 7.0)
16242 (test.texinfo [1])
16244 @end example
16246 @noindent
16247 In this case, simply type @kbd{\end @key{RET}} after the asterisk.  Then
16248 write the header lines in the Texinfo file and run the @TeX{} command
16249 again. (Note the use of the backslash, @samp{\}.  @TeX{} uses @samp{\}
16250 instead of @samp{@@}; and in this circumstance, you are working
16251 directly with @TeX{}, not with Texinfo.)@refill
16253 @node Using texinfo-show-structure, Using occur, Debugging with TeX, Catching Mistakes
16254 @comment  node-name,  next,  previous,  up
16255 @appendixsec Using @code{texinfo-show-structure}
16256 @cindex Showing the structure of a file
16257 @findex texinfo-show-structure
16259 It is not always easy to keep track of the nodes, chapters, sections, and
16260 subsections of a Texinfo file.  This is especially true if you are revising
16261 or adding to a Texinfo file that someone else has written.@refill
16263 In GNU Emacs, in Texinfo mode, the @code{texinfo-show-structure}
16264 command lists all the lines that begin with the @@-commands that
16265 specify the structure: @code{@@chapter}, @code{@@section},
16266 @code{@@appendix}, and so on.  With an argument (@w{@kbd{C-u}}
16267 as prefix argument, if interactive),
16268 the command also shows the @code{@@node} lines.  The
16269 @code{texinfo-show-structure} command is bound to @kbd{C-c C-s} in
16270 Texinfo mode, by default.@refill
16272 The lines are displayed in a buffer called the @samp{*Occur*} buffer,
16273 indented by hierarchical level.  For example, here is a part of what was
16274 produced by running @code{texinfo-show-structure} on this manual:@refill
16276 @example
16277 @group
16278  Lines matching "^@@\\(chapter \\|sect\\|subs\\|subh\\|
16279  unnum\\|major\\|chapheading \\|heading \\|appendix\\)"
16280  in buffer texinfo.texi.
16281  @dots{}
16282  4177:@@chapter Nodes
16283  4198:    @@heading Two Paths
16284  4231:    @@section Node and Menu Illustration
16285  4337:    @@section The @@code@{@@@@node@} Command
16286  4393:        @@subheading Choosing Node and Pointer Names
16287  4417:        @@subsection How to Write an @@code@{@@@@node@} Line
16288  4469:        @@subsection @@code@{@@@@node@} Line Tips
16289  @dots{}
16290 @end group
16291 @end example
16293 This says that lines 4337, 4393, and 4417 of @file{texinfo.texi} begin
16294 with the @code{@@section}, @code{@@subheading}, and @code{@@subsection}
16295 commands respectively.  If you move your cursor into the @samp{*Occur*}
16296 window, you can position the cursor over one of the lines and use the
16297 @kbd{C-c C-c} command (@code{occur-mode-goto-occurrence}), to jump to
16298 the corresponding spot in the Texinfo file.  @xref{Other Repeating
16299 Search, , Using Occur, emacs, The GNU Emacs Manual}, for more
16300 information about @code{occur-mode-goto-occurrence}.@refill
16302 The first line in the @samp{*Occur*} window describes the @dfn{regular
16303 expression} specified by @var{texinfo-heading-pattern}.  This regular
16304 expression is the pattern that @code{texinfo-show-structure} looks for.
16305 @xref{Regexps, , Using Regular Expressions, emacs, The GNU Emacs Manual},
16306 for more information.@refill
16308 When you invoke the @code{texinfo-show-structure} command, Emacs will
16309 display the structure of the whole buffer.  If you want to see the
16310 structure of just a part of the buffer, of one chapter, for example,
16311 use the @kbd{C-x n n} (@code{narrow-to-region}) command to mark the
16312 region.  (@xref{Narrowing, , , emacs, The GNU Emacs Manual}.)  This is
16313 how the example used above was generated.  (To see the whole buffer
16314 again, use @kbd{C-x n w} (@code{widen}).)@refill
16316 If you call @code{texinfo-show-structure} with a prefix argument by
16317 typing @w{@kbd{C-u C-c C-s}}, it will list lines beginning with
16318 @code{@@node} as well as the lines beginning with the @@-sign commands
16319 for @code{@@chapter}, @code{@@section}, and the like.@refill
16321 You can remind yourself of the structure of a Texinfo file by looking at
16322 the list in the @samp{*Occur*} window; and if you have mis-named a node
16323 or left out a section, you can correct the mistake.@refill
16325 @node Using occur, Running Info-Validate, Using texinfo-show-structure, Catching Mistakes
16326 @comment  node-name,  next,  previous,  up
16327 @appendixsec Using @code{occur}
16328 @cindex Occurrences, listing with @code{@@occur}
16329 @findex occur
16331 Sometimes the @code{texinfo-show-structure} command produces too much
16332 information.  Perhaps you want to remind yourself of the overall structure
16333 of a Texinfo file, and are overwhelmed by the detailed list produced by
16334 @code{texinfo-show-structure}.  In this case, you can use the @code{occur}
16335 command directly.  To do this, type@refill
16337 @example
16338 @kbd{M-x occur}
16339 @end example
16341 @noindent
16342 and then, when prompted, type a @dfn{regexp}, a regular expression for
16343 the pattern you want to match.  (@xref{Regexps, , Regular Expressions,
16344 emacs, The GNU Emacs Manual}.)  The @code{occur} command works from
16345 the current location of the cursor in the buffer to the end of the
16346 buffer.  If you want to run @code{occur} on the whole buffer, place
16347 the cursor at the beginning of the buffer.@refill
16349 For example, to see all the lines that contain the word
16350 @samp{@@chapter} in them, just type @samp{@@chapter}.  This will
16351 produce a list of the chapters.  It will also list all the sentences
16352 with @samp{@@chapter} in the middle of the line.@refill
16354 If you want to see only those lines that start with the word
16355 @samp{@@chapter}, type @samp{^@@chapter} when prompted by
16356 @code{occur}.  If you want to see all the lines that end with a word
16357 or phrase, end the last word with a @samp{$}; for example,
16358 @samp{catching mistakes$}.  This can be helpful when you want to see
16359 all the nodes that are part of the same chapter or section and
16360 therefore have the same `Up' pointer.@refill
16362 @xref{Other Repeating Search, , Using Occur, emacs , The GNU Emacs Manual},
16363 for more information.@refill
16365 @node Running Info-Validate,  , Using occur, Catching Mistakes
16366 @comment  node-name,  next,  previous,  up
16367 @appendixsec Finding Badly Referenced Nodes
16368 @findex Info-validate
16369 @cindex Nodes, checking for badly referenced
16370 @cindex Checking for badly referenced nodes
16371 @cindex Looking for badly referenced nodes
16372 @cindex Finding badly referenced nodes
16373 @cindex Badly referenced nodes
16375 You can use the @code{Info-validate} command to check whether any of
16376 the `Next', `Previous', `Up' or other node pointers fail to point to a
16377 node.  This command checks that every node pointer points to an
16378 existing node.  The @code{Info-validate} command works only on Info
16379 files, not on Texinfo files.@refill
16381 The @code{makeinfo} program validates pointers automatically, so you
16382 do not need to use the @code{Info-validate} command if you are using
16383 @code{makeinfo}.  You only may need to use @code{Info-validate} if you
16384 are unable to run @code{makeinfo} and instead must create an Info file
16385 using @code{texinfo-format-region} or @code{texinfo-format-buffer}, or
16386 if you write an Info file from scratch.@refill
16388 @menu
16389 * Using Info-validate::         How to run @code{Info-validate}.
16390 * Unsplit::                     How to create an unsplit file.
16391 * Tagifying::                   How to tagify a file.
16392 * Splitting::                   How to split a file manually.
16393 @end menu
16395 @node Using Info-validate, Unsplit, Running Info-Validate, Running Info-Validate
16396 @appendixsubsec Running @code{Info-validate}
16397 @cindex Running @code{Info-validate}
16398 @cindex Info validating a large file
16399 @cindex Validating a large file
16401 To use @code{Info-validate}, visit the Info file you wish to check and
16402 type:@refill
16404 @example
16405 M-x Info-validate
16406 @end example
16408 @noindent
16409 (Note that the @code{Info-validate} command requires an upper case
16410 `I'.  You may also need to create a tag table before running
16411 @code{Info-validate}.  @xref{Tagifying}.)@refill
16413 If your file is valid, you will receive a message that says ``File appears
16414 valid''.  However, if you have a pointer that does not point to a node,
16415 error messages will be displayed in a buffer called @samp{*problems in
16416 info file*}.@refill
16418 For example, @code{Info-validate} was run on a test file that contained
16419 only the first node of this manual.  One of the messages said:@refill
16421 @example
16422 In node "Overview", invalid Next: Texinfo Mode
16423 @end example
16425 @noindent
16426 This meant that the node called @samp{Overview} had a `Next' pointer that
16427 did not point to anything (which was true in this case, since the test file
16428 had only one node in it).@refill
16430 Now suppose we add a node named @samp{Texinfo Mode} to our test case
16431 but we do not specify a `Previous' for this node.  Then we will get
16432 the following error message:@refill
16434 @example
16435 In node "Texinfo Mode", should have Previous: Overview
16436 @end example
16438 @noindent
16439 This is because every `Next' pointer should be matched by a
16440 `Previous' (in the node where the `Next' points) which points back.@refill
16442 @code{Info-validate} also checks that all menu entries and cross references
16443 point to actual nodes.@refill
16445 Note that @code{Info-validate} requires a tag table and does not work
16446 with files that have been split.  (The @code{texinfo-format-buffer}
16447 command automatically splits large files.)  In order to use
16448 @code{Info-validate} on a large file, you must run
16449 @code{texinfo-format-buffer} with an argument so that it does not split
16450 the Info file; and you must create a tag table for the unsplit
16451 file.@refill
16453 @node Unsplit, Tagifying, Using Info-validate, Running Info-Validate
16454 @comment  node-name,  next,  previous,  up
16455 @appendixsubsec Creating an Unsplit File
16456 @cindex Creating an unsplit file
16457 @cindex Unsplit file creation
16459 You can run @code{Info-validate} only on a single Info file that has a
16460 tag table.  The command will not work on the indirect subfiles that
16461 are generated when a master file is split.  If you have a large file
16462 (longer than 70,000 bytes or so), you need to run the
16463 @code{texinfo-format-buffer} or @code{makeinfo-buffer} command in such
16464 a way that it does not create indirect subfiles.  You will also need
16465 to create a tag table for the Info file.  After you have done this,
16466 you can run @code{Info-validate} and look for badly referenced
16467 nodes.@refill
16469 The first step is to create an unsplit Info file.  To prevent
16470 @code{texinfo-format-buffer} from splitting a Texinfo file into
16471 smaller Info files, give a prefix to the @kbd{M-x
16472 texinfo-format-buffer} command:@refill
16474 @example
16475 C-u M-x texinfo-format-buffer
16476 @end example
16478 @noindent
16479 or else
16481 @example
16482 C-u C-c C-e C-b
16483 @end example
16485 @noindent
16486 When you do this, Texinfo will not split the file and will not create
16487 a tag table for it. @refill
16488 @cindex Making a tag table manually
16489 @cindex Tag table, making manually
16491 @node Tagifying, Splitting, Unsplit, Running Info-Validate
16492 @appendixsubsec Tagifying a File
16494 After creating an unsplit Info file, you must create a tag table for
16495 it.  Visit the Info file you wish to tagify and type:@refill
16497 @example
16498 M-x Info-tagify
16499 @end example
16501 @noindent
16502 (Note the upper case @samp{I} in @code{Info-tagify}.)  This creates an
16503 Info file with a tag table that you can validate.@refill
16505 The third step is to validate the Info file:@refill
16507 @example
16508 M-x Info-validate
16509 @end example
16511 @noindent
16512 (Note the upper case @samp{I} in @code{Info-validate}.)
16513 In brief, the steps are:@refill
16515 @example
16516 @group
16517 C-u M-x texinfo-format-buffer
16518 M-x Info-tagify
16519 M-x Info-validate
16520 @end group
16521 @end example
16523 After you have validated the node structure, you can rerun
16524 @code{texinfo-format-buffer} in the normal way so it will construct a
16525 tag table and split the file automatically, or you can make the tag
16526 table and split the file manually.@refill
16528 @node Splitting,  , Tagifying, Running Info-Validate
16529 @comment  node-name,  next,  previous,  up
16530 @appendixsubsec Splitting a File Manually
16531 @cindex Splitting an Info file manually
16532 @cindex Info file, splitting manually
16534 You should split a large file or else let the
16535 @code{texinfo-format-buffer} or @code{makeinfo-buffer} command do it
16536 for you automatically.  (Generally you will let one of the formatting
16537 commands do this job for you.  @xref{Create an Info File}.)@refill
16539 The split-off files are called the indirect subfiles.@refill
16541 Info files are split to save memory.  With smaller files, Emacs does not
16542 have make such a large buffer to hold the information.@refill
16544 If an Info file has more than 30 nodes, you should also make a tag
16545 table for it. @xref{Using Info-validate}, for information
16546 about creating a tag table.  (Again, tag tables are usually created
16547 automatically by the formatting command; you only need to create a tag
16548 table yourself if you are doing the job manually.  Most likely, you
16549 will do this for a large, unsplit file on which you have run
16550 @code{Info-validate}.)@refill
16552 @c Info-split is autoloaded in `loaddefs.el' in Emacs 18.51
16553 @ignore
16554 Before running @code{Info-split}, you need to load the @code{info} library
16555 into Emacs by giving the command @kbd{M-x load-library @key{RET} info
16556 @key{RET}}.
16557 @end ignore
16559 Visit the Info file you wish to tagify and split and type the two
16560 commands:@refill
16562 @example
16563 M-x Info-tagify
16564 M-x Info-split
16565 @end example
16567 @noindent
16568 (Note that the @samp{I} in @samp{Info} is upper case.)@refill
16570 When you use the @code{Info-split} command, the buffer is modified into a
16571 (small) Info file which lists the indirect subfiles.  This file should be
16572 saved in place of the original visited file.  The indirect subfiles are
16573 written in the same directory the original file is in, with names generated
16574 by appending @samp{-} and a number to the original file name.@refill
16576 The primary file still functions as an Info file, but it contains just
16577 the tag table and a directory of subfiles.@refill
16580 @node Refilling Paragraphs, Command Syntax, Catching Mistakes, Top
16581 @appendix Refilling Paragraphs
16582 @cindex Refilling paragraphs
16583 @cindex Filling paragraphs
16584 @findex refill
16586 The @code{@@refill} command refills and, optionally, indents the first
16587 line of a paragraph.@footnote{Perhaps the command should have been
16588 called the @code{@@refillandindent} command, but @code{@@refill} is
16589 shorter and the name was chosen before indenting was possible.} The
16590 @code{@@refill} command is no longer important, but we describe it here
16591 because you once needed it.  You will see it in many old Texinfo
16592 files.@refill
16594 Without refilling, paragraphs containing long @@-constructs may look
16595 bad after formatting because the formatter removes @@-commands and
16596 shortens some lines more than others.  In the past, neither the
16597 @code{texinfo-format-region} command nor the
16598 @code{texinfo-format-buffer} command refilled paragraphs
16599 automatically.  The @code{@@refill} command had to be written at the
16600 end of every paragraph to cause these formatters to fill them.  (Both
16601 @TeX{} and @code{makeinfo} have always refilled paragraphs
16602 automatically.)  Now, all the Info formatters automatically fill and
16603 indent those paragraphs that need to be filled and indented.@refill
16605 The @code{@@refill} command causes @code{texinfo-format-region} and
16606 @code{texinfo-format-buffer} to refill a paragraph in the Info file
16607 @emph{after} all the other processing has been done.  For this reason,
16608 you can not use @code{@@refill} with a paragraph containing either
16609 @code{@@*} or @code{@@w@{ @dots{} @}} since the refilling action will
16610 override those two commands.@refill
16612 The @code{texinfo-format-region} and @code{texinfo-format-buffer}
16613 commands now automatically append @code{@@refill} to the end of each
16614 paragraph that should be filled.  They do not append @code{@@refill} to
16615 the ends of paragraphs that contain @code{@@*} or @w{@code{@@w@{ @dots{}@}}}
16616 and therefore do not refill or indent them.@refill
16619 @node Command Syntax, Obtaining TeX, Refilling Paragraphs, Top
16620 @comment node-name,  next,  previous,  up
16621 @appendix @@-Command Syntax
16622 @cindex @@-command syntax
16624 The character @samp{@@} is used to start special Texinfo commands.
16625 (It has the same meaning that @samp{\} has in plain @TeX{}.)  Texinfo
16626 has four types of @@-command:@refill
16628 @table @asis
16629 @item 1. Non-alphabetic commands.
16630 These commands consist of an @@ followed by a punctuation mark or other
16631 character that is not part of the alphabet.  Non-alphabetic commands are
16632 almost always part of the text within a paragraph, and never take any
16633 argument.  The two characters (@@ and the other one) are complete in
16634 themselves; none is followed by braces.  The non-alphabetic commands
16635 are: @code{@@.}, @code{@@:}, @code{@@*}, @code{@@@kbd{SPACE}},
16636 @code{@@@kbd{TAB}}, @code{@@@kbd{NL}}, @code{@@@@}, @code{@@@{}, and
16637 @code{@@@}}.@refill
16639 @item 2. Alphabetic commands that do not require arguments.
16640 These commands start with @@ followed by a word followed by left- and
16641 right-hand braces.  These commands insert special symbols in the
16642 document; they do not require arguments.  For example,
16643 @code{@@dots@{@}} @result{} @samp{@dots{}}, @code{@@equiv@{@}}
16644 @result{} @samp{@equiv{}}, @code{@@TeX@{@}} @result{} `@TeX{}',
16645 and @code{@@bullet@{@}} @result{} @samp{@bullet{}}.@refill
16647 @item 3. Alphabetic commands that require arguments within braces.
16648 These commands start with @@ followed by a letter or a word, followed by an
16649 argument within braces.  For example, the command @code{@@dfn} indicates
16650 the introductory or defining use of a term; it is used as follows: @samp{In
16651 Texinfo, @@@@-commands are @@dfn@{mark-up@} commands.}@refill
16653 @item 4. Alphabetic commands that occupy an entire line.
16654 These commands occupy an entire line.  The line starts with @@,
16655 followed by the name of the command (a word); for example, @code{@@center}
16656 or @code{@@cindex}.  If no argument is needed, the word is followed by
16657 the end of the line.  If there is an argument, it is separated from
16658 the command name by a space.  Braces are not used.@refill
16659 @end table
16661 @cindex Braces and argument syntax
16662 Thus, the alphabetic commands fall into classes that have
16663 different argument syntaxes.  You cannot tell to which class a command
16664 belongs by the appearance of its name, but you can tell by the
16665 command's meaning: if the command stands for a glyph, it is in
16666 class 2 and does not require an argument; if it makes sense to use the
16667 command together with other text as part of a paragraph, the command
16668 is in class 3 and must be followed by an argument in braces;
16669 otherwise, it is in class 4 and uses the rest of the line as its
16670 argument.@refill
16672 The purpose of having a different syntax for commands of classes 3 and
16673 4 is to make Texinfo files easier to read, and also to help the GNU
16674 Emacs paragraph and filling commands work properly.  There is only one
16675 exception to this rule: the command @code{@@refill}, which is always
16676 used at the end of a paragraph immediately following the final period
16677 or other punctuation character.  @code{@@refill} takes no argument and
16678 does @emph{not} require braces.  @code{@@refill} never confuses the
16679 Emacs paragraph commands because it cannot appear at the beginning of
16680 a line.@refill
16683 @node Obtaining TeX, Command and Variable Index, Command Syntax, Top
16684 @appendix How to Obtain @TeX{}
16685 @cindex Obtaining @TeX{}
16686 @cindex @TeX{}, how to obtain
16688 @c !!! Here is information about obtaining TeX.  Update it whenever.
16689 @c !!! Also consider updating TeX.README on prep.
16690 @c     Updated by RJC on 1 March 1995, conversation with MacKay.
16691 @c     Updated by kb@cs.umb.edu on 29 July 1996.
16692 @c     Updated by kb@cs.umb.edu on 25 April 1997.
16693 @TeX{} is freely redistributable.  You can obtain @TeX{} for Unix
16694 systems via anonymous ftp or on physical media.  The core material
16695 consists of the Web2c @TeX{} distribution (@uref{http://www.tug.org/web2c}).
16697 Instructions for retrieval by anonymous ftp and information on other
16698 available distributions:
16699 @example
16700 @uref{ftp://ftp.tug.org/tex/unixtex.ftp}
16701 @uref{http://www.tug.org/unixtex.ftp}
16702 @end example
16704 The Free Software Foundation provides a core distribution on its Source
16705 Code CD-ROM suitable for printing Texinfo manuals; the University of
16706 Washington maintains and supports a tape distribution; the @TeX{} Users
16707 Group co-sponsors a complete CD-ROM @TeX{} distribution.
16709 @itemize @bullet
16711 @item
16712 For the FSF Source Code CD-ROM, please contact:
16714 @iftex
16715 @display
16716 @group
16717 Free Software Foundation, Inc.
16718 59 Temple Place Suite 330
16719 Boston, MA @ @ 02111-1307
16721 Telephone: @w{@t{+}1--617--542--5942}
16722 Fax: (including Japan) @w{@t{+}1--617--542--2652}
16723 Free Dial Fax (in Japan):
16724 @w{ } @w{ } @w{ } 0031--13--2473 (KDD)
16725 @w{ } @w{ } @w{ } 0066--3382--0158 (IDC)
16726 Electronic mail: @code{gnu@@prep.ai.mit.edu}
16727 @end group
16728 @end display
16729 @end iftex
16730 @ifinfo
16731 @display
16732 @group
16733 Free Software Foundation, Inc.
16734 59 Temple Place Suite 330
16735 Boston, MA @w{ } 02111-1307
16738 Telephone: @w{@t{+}1-617-542-5942}
16739 Fax: (including Japan) @w{@t{+}1-617-542-2652}
16740 Free Dial Fax (in Japan):
16741 @w{ } @w{ } @w{ } 0031-13-2473 (KDD)
16742 @w{ } @w{ } @w{ } 0066-3382-0158 (IDC)
16743 Electronic mail: @code{gnu@@prep.ai.mit.edu}
16744 @end group
16745 @end display
16746 @end ifinfo
16748 @item
16749 To order a complete distribution on CD-ROM, please see
16750 @uref{http://www.tug.org/tex-live.html}.  (This distribution is also
16751 available by FTP; see the URL's above.)
16753 @item
16754 To order a full distribution from the University of Washington on either
16755 a 1/4@dmn{in} 4-track QIC-24 cartridge or a 4@dmn{mm} DAT cartridge,
16756 send $210 to:
16758 @display
16759 @group
16760 Pierre A. MacKay
16761 Denny Hall, Mail Stop DH-10
16762 University of Washington
16763 Seattle, WA @w{ } 98195
16765 Telephone: @t{+}1--206--543--2268
16766 Electronic mail: @code{mackay@@cs.washington.edu}
16767 @end group
16768 @end display
16770 @noindent Please make checks payable to the University of Washington.
16771 Checks must be in U.S.@: dollars, drawn on a U.S.@: bank.  Overseas
16772 sites: please add to the base cost, if desired, $20.00 for shipment via
16773 air parcel post, or $30.00 for shipment via courier.
16775 @end itemize
16777 Many other @TeX{} distributions are available; see
16778 @uref{http://www.tug.org/}.
16781 @c These are no longer ``new'', and the explanations
16782 @c are all given elsewhere anyway, I think.  --karl, 25apr97.
16783 @ignore (the entire appendix)
16784 @c node New Features, Command and Variable Index, Obtaining TeX, Top
16785 @c appendix Second Edition Features
16787 @tex
16788 % Widen the space for the first column so three control-character
16789 % strings fit in the first column.  Switched back to default .8in
16790 % value at end of chapter.
16791 \global\tableindent=1.0in
16792 @end tex
16794 The second edition of the Texinfo manual describes more than 20 new
16795 Texinfo mode commands and more than 50 previously undocumented Texinfo
16796 @@-commands.  This edition is more than twice the length of the first
16797 edition.@refill
16799 Here is a brief description of the new commands.@refill
16801 @menu
16802 * New Texinfo Mode Commands::   The updating commands are especially useful.
16803 * New Commands::                Many newly described @@-commands.
16804 @end menu
16806 @c node New Texinfo Mode Commands, New Commands, Obtaining TeX, Obtaining TeX
16807 @c appendixsec New Texinfo Mode Commands
16809 Texinfo mode provides commands and features especially designed for
16810 working with Texinfo files.  More than 20 new commands have been
16811 added, including commands for automatically creating and updating
16812 both nodes and menus.  This is a tedious task when done by hand.@refill
16814 The keybindings are intended to be somewhat mnemonic.@refill
16816 @c subheading Update all nodes and menus
16818 The @code{texinfo-master-menu} command is the primary command:
16820 @table @kbd
16821 @item C-c C-u m
16822 @itemx M-x texinfo-master-menu
16823 Create or update a master menu.
16824 With @kbd{C-u} as a prefix argument,
16825 first create or update all nodes
16826 and regular menus.
16827 @end table
16829 @c subheading Update Pointers
16831 @noindent
16832 Create or update `Next', `Previous', and `Up' node pointers.@refill
16834 @noindent
16835 @xref{Updating Nodes and Menus}.
16837 @table @kbd
16838 @item C-c C-u C-n
16839 @itemx M-x texinfo-update-node
16840 Update a node.
16842 @item C-c C-u C-e
16843 @itemx M-x texinfo-every-node-update
16844 Update every node in the buffer.
16845 @end table
16847 @c subheading Update Menus
16849 @noindent
16850 Create or update menus.@refill
16852 @noindent
16853 @xref{Updating Nodes and Menus}.
16855 @table @kbd
16856 @item C-c C-u C-m
16857 @itemx M-x texinfo-make-menu
16858 Make or update a menu.
16860 @item C-c C-u C-a
16861 @itemx M-x texinfo-all-menus-update
16862 Make or update all the menus in a buffer.
16863 With @kbd{C-u} as a prefix argument,
16864 first update all the nodes.
16865 @end table
16867 @c subheading Insert Title as Description
16869 @noindent
16870 Insert a node's chapter or section title in the space for the
16871 description in a menu entry line; position point so you can edit the
16872 insert.  (This command works somewhat differently than the other
16873 insertion commands, which insert only a predefined string.)@refill
16875 @noindent
16876 @xref{Inserting, Inserting Frequently Used Commands}.
16878 @table @kbd
16879 @item C-c C-c C-d
16880 Insert title.
16881 @end table
16883 @c subheading Format for Info
16885 @noindent
16886 Provide keybindings both for the Info formatting commands that are
16887 written in Emacs Lisp and for @code{makeinfo} that is written in
16888 C.@refill
16890 @noindent
16891 @xref{Info Formatting}.
16893 @noindent
16894 Use the Emacs lisp @code{texinfo-format@dots{}} commands:
16896 @table @kbd
16897 @item C-c C-e C-r
16898 Format the region.
16900 @item C-c C-e C-b
16901 Format the buffer.
16902 @end table
16904 @noindent
16905 Use @code{makeinfo}:
16907 @table @kbd
16908 @item C-c C-m C-r
16909 Format the region.
16911 @item C-c C-m C-b
16912 Format the buffer.
16914 @item C-c C-m C-l
16915 Recenter the @code{makeinfo} output buffer.
16917 @item C-c C-m C-k
16918 Kill the @code{makeinfo} formatting job.
16919 @end table
16921 @c subheading Typeset and Print
16923 @noindent
16924 Typeset and print Texinfo documents from within Emacs.@refill
16926 @ifinfo
16927 @noindent
16928 @xref{Printing}.
16929 @end ifinfo
16930 @iftex
16931 @noindent
16932 @xref{Printing, , Formatting and Printing}.
16933 @end iftex
16935 @table @kbd
16936 @item C-c C-t C-b
16937 Run @code{texi2dvi} on the buffer.
16939 @item C-c C-t C-r
16940 Run @TeX{} on the region.
16942 @item C-c C-t C-i
16943 Run @code{texindex}.
16945 @item C-c C-t C-p
16946 Print the DVI file.
16948 @item C-c C-t C-q
16949 Show the print queue.
16951 @item C-c C-t C-d
16952 Delete a job from the print queue.
16954 @item C-c C-t C-k
16955 Kill the current @TeX{} formatting job.
16957 @item C-c C-t C-x
16958 Quit a currently stopped @TeX{} formatting job.
16960 @item C-c C-t C-l
16961 Recenter the output buffer.
16962 @end table
16964 @c subheading Other Updating Commands
16966 @noindent
16967 The ``other updating commands'' do not have standard keybindings because
16968 they are used less frequently.@refill
16970 @noindent
16971 @xref{Other Updating Commands}.
16973 @table @kbd
16974 @item M-x texinfo-insert-node-lines
16975 Insert missing @code{@@node} lines using
16976 section titles as node names.
16978 @item M-x texinfo-multiple-files-update
16979 Update a multi-file document.
16980 With a numeric prefix, such as @kbd{C-u 8},
16981 update  @strong{every} pointer and
16982 menu in @strong{all} the files and
16983 then insert a master menu.
16985 @item M-x texinfo-indent-menu-description
16986 Indent descriptions in menus.
16988 @item M-x texinfo-sequential-node-update
16989 Insert node pointers in strict sequence.
16990 @end table
16992 @c node New Commands,  , New Texinfo Mode Commands, Obtaining TeX
16993 @c appendixsec New Texinfo @@-Commands
16995 The second edition of the Texinfo manual describes more than 50
16996 commands that were not described in the first edition.  A third or so
16997 of these commands existed in Texinfo but were not documented in the
16998 manual; the others are new.  Here is a listing, with brief
16999 descriptions of them:@refill
17001 @c subheading Indexing
17003 @noindent
17004 Create your own index, and merge indices.@refill
17006 @noindent
17007 @xref{Indices}.
17009 @table @kbd
17010 @item @@defindex @var{index-name}
17011 Define a new index and its indexing command.
17012 See also the @code{@@defcodeindex} command.
17014 @c written verbosely to avoid overfull hbox
17015 @item @@synindex @var{from-index} @var{into-index}
17016 Merge the @var{from-index} index into the @var{into-index} index.
17017 See also the @code{@@syncodeindex} command.
17018 @end table
17020 @c subheading Definitions
17022 @noindent
17023 Describe functions, variables, macros,
17024 commands, user options, special forms, and other such artifacts in a
17025 uniform format.@refill
17027 @noindent
17028 @xref{Definition Commands}.
17030 @table @kbd
17031 @item @@deffn @var{category} @var{name} @var{arguments}@dots{}
17032 Format a description for functions, interactive
17033 commands, and similar entities.
17035 @item @@defvr, @@defop, @dots{}
17036 15 other related commands.
17037 @end table
17039 @c subheading Glyphs
17041 @noindent
17042 Indicate the results of evaluation, expansion,
17043 printed output, an error message, equivalence of expressions, and the
17044 location of point.@refill
17046 @noindent
17047 @xref{Glyphs}.
17049 @table @kbd
17050 @item @@equiv@{@}
17051 @itemx @equiv{}
17052 Equivalence:
17054 @item @@error@{@}
17055 @itemx @error{}
17056 Error message
17058 @item @@expansion@{@}
17059 @itemx @expansion{}
17060 Macro expansion
17062 @item @@point@{@}
17063 @itemx @point{}
17064 Position of point
17066 @item @@print@{@}
17067 @itemx @print{}
17068 Printed output
17070 @item @@result@{@}
17071 @itemx @result{}
17072 Result of an expression
17073 @end table
17075 @c subheading Page Headings
17077 @noindent
17078 Customize page headings.
17080 @noindent
17081 @xref{Headings}.
17083 @table @kbd
17084 @item @@headings @var{on-off-single-double}
17085 Headings on or off, single, or double-sided.
17087 @item @@evenfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
17088 Footings for even-numbered (left-hand) pages.
17090 @item @@evenheading, @@everyheading, @@oddheading, @dots{}
17091 Five other related commands.
17093 @item @@thischapter
17094 Insert name of chapter and chapter number.
17096 @item @@thischaptername, @@thisfile, @@thistitle, @@thispage
17097 Related commands.
17098 @end table
17100 @c subheading Formatting
17102 @noindent
17103 Format blocks of text.
17105 @noindent
17106 @xref{Quotations and Examples}, and@*
17107 @ref{Lists and Tables, , Making Lists and Tables}.
17109 @table @kbd
17110 @item @@cartouche
17111 Draw rounded box surrounding text (not in Info).
17113 @item @@enumerate @var{optional-arg}
17114 Enumerate a list with letters or numbers.
17116 @item @@exdent @var{line-of-text}
17117 Remove indentation.
17119 @item @@flushleft
17120 Left justify.
17122 @item @@flushright
17123 Right justify.
17125 @item @@format
17126 Do not narrow nor change font.
17128 @item @@ftable @var{formatting-command}
17129 @itemx @@vtable @var{formatting-command}
17130 Two-column table with indexing.
17132 @item @@lisp
17133 For an example of Lisp code.
17135 @item @@smallexample
17136 @itemx @@smalllisp
17137 Like @@table and @@lisp @r{but for} @@smallbook.
17138 @end table
17140 @c subheading Conditionals
17142 @noindent
17143 Conditionally format text.
17145 @noindent
17146 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
17148 @table @kbd
17149 @item @@set @var{flag} [@var{string}]
17150 Set a flag.  Optionally, set value
17151 of @var{flag} to @var{string}.
17153 @item @@clear @var{flag}
17154 Clear a flag.
17156 @item @@value@{@var{flag}@}
17157 Replace with value to which @var{flag} is set.
17159 @item @@ifset @var{flag}
17160 Format, if @var{flag} is set.
17162 @item @@ifclear @var{flag}
17163 Ignore, if @var{flag} is set.
17164 @end table
17166 @c subheading @@heading series for Titles
17168 @noindent
17169 Produce unnumbered headings that do not appear in a table of contents.
17171 @noindent
17172 @xref{Structuring}.
17174 @table @kbd
17175 @item @@heading @var{title}
17176 Unnumbered section-like heading not listed
17177 in the table of contents of a printed manual.
17179 @item @@chapheading, @@majorheading, @@c subheading, @@subsubheading
17180 Related commands.
17181 @end table
17183 @need 1000
17184 @c subheading Font commands
17186 @need 1000
17187 @noindent
17188 @xref{Smallcaps}, and @*
17189 @ref{Fonts}.
17191 @table @kbd
17192 @item @@r@{@var{text}@}
17193 Print in roman font.
17195 @item @@sc@{@var{text}@}
17196 Print in @sc{small caps} font.
17197 @end table
17199 @c subheading Miscellaneous
17201 @noindent
17202 See @ref{title subtitle author, , @code{@@title} @code{@@subtitle} and @code{@@author} Commands},@*
17203 see @ref{Customized Highlighting},@*
17204 see @ref{Overfull hboxes},@*
17205 see @ref{Footnotes},@*
17206 see @ref{dmn, , Format a Dimension},@*
17207 see @ref{Raise/lower sections, , @code{@@raisesections} and @code{@@lowersections}},@*
17208 see @ref{math, , @code{@@math}: Inserting Mathematical Expressions}.@*
17209 see @ref{minus, , Inserting a Minus Sign},@*
17210 see @ref{paragraphindent, , Paragraph Indenting},@*
17211 see @ref{Cross Reference Commands},@*
17212 see @ref{title subtitle author, , @code{@@title} @code{@@subtitle} and @code{@@author}}, and@*
17213 see @ref{Custom Headings, , How to Make Your Own Headings}.
17215 @table @kbd
17216 @item @@author @var{author}
17217 Typeset author's name.
17219 @c @item @@definfoenclose @var{new-command}, @var{before}, @var{after},
17220 @c Define a highlighting command for Info.  (Info only.)
17222 @item @@finalout
17223 Produce cleaner printed output.
17225 @item @@footnotestyle @var{end-or-separate}
17226 Specify footnote style.
17228 @item @@dmn@{@var{dimension}@}
17229 Format a dimension.
17231 @item @@global@@let@var{new-cmd}=@var{existing-cmd}
17232 Define a highlighting command for @TeX{}. (@TeX{} only.)
17234 @item @@lowersections
17235 Reduce hierarchical level of sectioning commands.
17237 @item @@math@{@var{mathematical-expression}@}
17238 Format a mathematical expression.
17240 @item @@minus@{@}
17241 Generate a minus sign.
17243 @item @@paragraphindent @var{asis-or-number}
17244 Specify paragraph indentation.
17246 @item @@raisesections
17247 Raise hierarchical level of sectioning commands.
17249 @item @@ref@{@var{node-name}, @r{[}@var{entry}@r{]}, @r{[}@var{topic-or-title}@r{]}, @r{[}@var{info-file}@r{]}, @r{[}@var{manual}@r{]}@}
17250 Make a reference.  In the printed manual, the
17251 reference does not start with the word `see'.
17253 @item @@title @var{title}
17254 Typeset @var{title} in the alternative
17255 title page format.
17257 @item @@subtitle @var{subtitle}
17258 Typeset @var{subtitle} in the alternative
17259 title page format.
17261 @item @@today@{@}
17262 Insert the current date.
17263 @end table
17264 @tex
17265 % Switch width of first column of tables back to default value
17266 \global\tableindent=.8in
17267 @end tex
17268 @end ignore
17270 @node Command and Variable Index, Concept Index, Obtaining TeX, Top
17271 @comment  node-name,  next,  previous,  up
17272 @unnumbered Command and Variable Index
17274 This is an alphabetical list of all the @@-commands, assorted Emacs Lisp
17275 functions, and several variables.  To make the list easier to use, the
17276 commands are listed without their preceding @samp{@@}.@refill
17278 @printindex fn
17281 @node Concept Index,  , Command and Variable Index, Top
17282 @unnumbered Concept Index
17284 @printindex cp
17287 @summarycontents
17288 @contents
17289 @bye