* config/i386/i386.md (mmx_pinsrw): Output operands in correct
[official-gcc.git] / texinfo / doc / texinfo.txi
blob41050a75e74cb6d47256095167b5f029deebc29d
1 \input texinfo.tex    @c -*-texinfo-*-
2 @c $Id: texinfo.txi,v 1.1.1.1 1998/03/25 02:20:38 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 @c Edition number is now the same as the Texinfo distribution version number.
10 @set edition 3.12
11 @set update-month February 1998
12 @set update-date 27 @value{update-month}
14 @c Define a new index for options.
15 @defcodeindex op
16 @c Put everything except function (command, in this case) names in one
17 @c index (arbitrarily chosen to be the concept index).
18 @syncodeindex op cp
19 @syncodeindex vr cp
20 @syncodeindex pg cp
22 @footnotestyle separate
23 @paragraphindent 2
24 @finalout
25 @comment %**end of header
27 @c Before release, run C-u C-c C-u C-a (texinfo-all-menus-update with a
28 @c prefix arg).  This updates the node pointers, which texinfmt.el needs.
30 @dircategory Texinfo documentation system
31 @direntry
32 * Texinfo: (texinfo).           The GNU documentation format.
33 * install-info: (texinfo)Invoking install-info. Updating info/dir entries.
34 * texi2dvi: (texinfo)Format with texi2dvi.      Printing Texinfo documentation.
35 * texindex: (texinfo)Format with tex/texindex.  Sorting Texinfo index files.
36 * makeinfo: (texinfo)makeinfo Preferred.        Translate Texinfo source.
37 @end direntry
39 @c Set smallbook if printing in smallbook format so the example of the
40 @c smallbook font is actually written using smallbook; in bigbook, a kludge
41 @c is used for TeX output.  Do this through the -t option to texi2dvi,
42 @c so this same source can be used for other paper sizes as well.
43 @c smallbook
44 @c set smallbook
45 @c @@clear smallbook
47 @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, 98
55 Free Software Foundation, Inc.
57 This edition is for Texinfo version @value{edition}.
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 for Texinfo version @value{edition}
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, 98
101 Free Software Foundation, Inc.
103 Published by the Free Software Foundation @*
104 59 Temple Place Suite 330 @*
105 Boston, MA 02111-1307 @*
106 USA @*
107 ISBN 1-882114-65-5
108 @c ISBN 1-882114-63-9 is for edition 2.20 of 28 February 1995
109 @c ISBN 1-882114-64-7 is for edition 2.24 of November 1996.
111 Permission is granted to make and distribute verbatim copies of
112 this manual provided the copyright notice and this permission notice
113 are preserved on all copies.
115 Permission is granted to copy and distribute modified versions of this
116 manual under the conditions for verbatim copying, provided that the entire
117 resulting derived work is distributed under the terms of a permission
118 notice identical to this one.
120 Permission is granted to copy and distribute translations of this manual
121 into another language, under the above conditions for modified versions,
122 except that this permission notice may be stated in a translation approved
123 by the Free Software Foundation.
124 @sp 2
125 Cover art by Etienne Suvasa.
126 @end titlepage
128 @ifinfo
129 @node Top, Copying, (dir), (dir)
130 @top Texinfo
132 Texinfo is a documentation system that uses a single source file to
133 produce both on-line information and printed output.@refill
135 The first part of this master menu lists the major nodes in this Info
136 document, including the @@-command and concept indices.  The rest of
137 the menu lists all the lower level nodes in the document.@refill
139 This is Edition @value{edition} of the Texinfo documentation,
140 @w{@value{update-date}}.
141 @end ifinfo
143 @c Here is a spare copy of the chapter menu entry descriptions,
144 @c in case they are accidently deleted
145 @ignore
146 Your rights.
147 Texinfo in brief.
148 How to use Texinfo mode.
149 What is at the beginning of a Texinfo file?
150 What is at the end of a Texinfo file?
151 How to create chapters, sections, subsections,
152   appendices, and other parts.
153 How to provide structure for a document.
154 How to write nodes.
155 How to write menus.
156 How to write cross references.
157 How to mark words and phrases as code,
158   keyboard input, meta-syntactic
159   variables, and the like.
160 How to write quotations, examples, etc.
161 How to write lists and tables.
162 How to create indices.
163 How to insert @@-signs, braces, etc.
164 How to indicate results of evaluation,
165   expansion of macros, errors, etc.
166 How to force and prevent line and page breaks.
167 How to describe functions and the like in a uniform manner.
168 How to write footnotes.
169 How to specify text for either @TeX{} or Info.
170 How to print hardcopy.
171 How to create an Info file.
172 How to install an Info file
173 A list of all the Texinfo @@-commands.
174 Hints on how to write a Texinfo document.
175 A sample Texinfo file to look at.
176 Tell readers they have the right to copy
177   and distribute.
178 How to incorporate other Texinfo files.
179 How to write page headings and footings.
180 How to find formatting mistakes.
181 All about paragraph refilling.
182 A description of @@-Command syntax.
183 Texinfo second edition features.
184 A menu containing commands and variables.
185 A menu covering many topics.
186 @end ignore
188 @menu
189 * Copying::                     Your rights.
190 * Overview::                    Texinfo in brief.
191 * Texinfo Mode::                How to use Texinfo mode.
192 * Beginning a File::            What is at the beginning of a Texinfo file?
193 * Ending a File::               What is at the end of a Texinfo file?
194 * Structuring::                 How to create chapters, sections, subsections,
195                                   appendices, and other parts.
196 * Nodes::                       How to write nodes.
197 * Menus::                       How to write menus.
198 * Cross References::            How to write cross references.
199 * Marking Text::                How to mark words and phrases as code,
200                                   keyboard input, meta-syntactic
201                                   variables, and the like.
202 * Quotations and Examples::     How to write quotations, examples, etc.
203 * Lists and Tables::            How to write lists and tables.
204 * Indices::                     How to create indices.
205 * Insertions::                  How to insert @@-signs, braces, etc.
206 * Breaks::                      How to force and prevent line and page breaks.
207 * Definition Commands::         How to describe functions and the like
208                                   in a uniform manner.
209 * Footnotes::                   How to write footnotes.
210 * Conditionals::                How to specify text for either @TeX{} or Info.
211 * Macros::                      Defining new Texinfo commands.
212 * Format/Print Hardcopy::       How to convert a Texinfo file to a file
213                                   for printing and how to print that file.
214 * Create an Info File::         Convert a Texinfo file into an Info file.
215 * Install an Info File::        Make an Info file accessible to users.
216 * Command List::                All the Texinfo @@-commands.
217 * Tips::                        Hints on how to write a Texinfo document.
218 * Sample Texinfo File::         A sample Texinfo file to look at.
219 * Sample Permissions::          Tell readers they have the right to copy
220                                   and distribute.
221 * Include Files::               How to incorporate other Texinfo files.
222 * Headings::                    How to write page headings and footings.
223 * Catching Mistakes::           How to find formatting mistakes.
224 * Refilling Paragraphs::        All about paragraph refilling.
225 * Command Syntax::              A description of @@-Command syntax.
226 * Obtaining TeX::               How to Obtain @TeX{}.
227 * Command and Variable Index::  A menu containing commands and variables.
228 * Concept Index::               A menu covering many topics.
230 @detailmenu
232  --- The Detailed Node Listing ---
234 Overview of Texinfo
236 * Using Texinfo::               Create a conventional printed book
237                                   or an Info file.
238 * Info Files::                  What is an Info file?
239 * Printed Books::               Characteristics of a printed book or manual.
240 * Formatting Commands::         @@-commands are used for formatting.
241 * Conventions::                 General rules for writing a Texinfo file.
242 * Comments::                    How to write comments and mark regions that
243                                   the formatting commands will ignore.
244 * Minimum::                     What a Texinfo file must have.
245 * Six Parts::                   Usually, a Texinfo file has six parts.
246 * Short Sample::                A short sample Texinfo file.
247 * Acknowledgements::            
249 Using Texinfo Mode
251 * Texinfo Mode Overview::       How Texinfo mode can help you.
252 * Emacs Editing::               Texinfo mode adds to GNU Emacs' general
253                                   purpose editing features.
254 * Inserting::                   How to insert frequently used @@-commands.
255 * Showing the Structure::       How to show the structure of a file.
256 * Updating Nodes and Menus::    How to update or create new nodes and menus.
257 * Info Formatting::             How to format for Info.
258 * Printing::                    How to format and print part or all of a file.
259 * Texinfo Mode Summary::        Summary of all the Texinfo mode commands.
261 Updating Nodes and Menus
263 * Updating Commands::           Five major updating commands.
264 * Updating Requirements::       How to structure a Texinfo file for
265                                   using the updating command.
266 * Other Updating Commands::     How to indent descriptions, insert
267                                   missing nodes lines, and update
268                                   nodes in sequence.
270 Beginning a Texinfo File
272 * Four Parts::                  Four parts begin a Texinfo file.
273 * Sample Beginning::            Here is a sample beginning for a Texinfo file.
274 * Header::                      The very beginning of a Texinfo file.
275 * Info Summary and Permissions::  Summary and copying permissions for Info.
276 * Titlepage & Copyright Page::  Creating the title and copyright pages.
277 * The Top Node::                Creating the `Top' node and master menu.
278 * Software Copying Permissions::  Ensure that you and others continue to
279                                   have the right to use and share software.
281 The Texinfo File Header
283 * First Line::                  The first line of a Texinfo file.
284 * Start of Header::             Formatting a region requires this.
285 * setfilename::                 Tell Info the name of the Info file.
286 * settitle::                    Create a title for the printed work.
287 * setchapternewpage::           Start chapters on right-hand pages.
288 * paragraphindent::             An option to specify paragraph indentation.
289 * End of Header::               Formatting a region requires this.
291 The Title and Copyright Pages
293 * titlepage::                   Create a title for the printed document.
294 * titlefont center sp::         The @code{@@titlefont}, @code{@@center},
295                                   and @code{@@sp} commands.
296 * title subtitle author::       The @code{@@title}, @code{@@subtitle},
297                                   and @code{@@author} commands.
298 * Copyright & Permissions::     How to write the copyright notice and
299                                   include copying permissions.
300 * end titlepage::               Turn on page headings after the title and
301                                   copyright pages.
302 * headings on off::             An option for turning headings on and off
303                                   and double or single sided printing.
305 The `Top' Node and Master Menu
307 * Title of Top Node::           Sketch what the file is about.
308 * Master Menu Parts::           A master menu has three or more parts.
310 Ending a Texinfo File
312 * Printing Indices & Menus::    How to print an index in hardcopy and
313                                   generate index menus in Info.
314 * Contents::                    How to create a table of contents.
315 * File End::                    How to mark the end of a file.
317 Chapter Structuring
319 * Tree Structuring::            A manual is like an upside down tree @dots{}
320 * Structuring Command Types::   How to divide a manual into parts.
321 * makeinfo top::                The @code{@@top} command, part of the `Top' node.
322 * chapter::                     
323 * unnumbered & appendix::       
324 * majorheading & chapheading::  
325 * section::                     
326 * unnumberedsec appendixsec heading::  
327 * subsection::                  
328 * unnumberedsubsec appendixsubsec subheading::  
329 * subsubsection::               Commands for the lowest level sections.
330 * Raise/lower sections::        How to change commands' hierarchical level.
332 Nodes
334 * Two Paths::                   Different commands to structure
335                                   Info output and printed output.
336 * Node Menu Illustration::      A diagram, and sample nodes and menus.
337 * node::                        How to write a node, in detail.
338 * makeinfo Pointer Creation::   How to create node pointers with @code{makeinfo}.
340 The @code{@@node} Command
342 * Node Names::                  How to choose node and pointer names.
343 * Writing a Node::              How to write an @code{@@node} line.
344 * Node Line Tips::              Keep names short.
345 * Node Line Requirements::      Keep names unique, without @@-commands.
346 * First Node::                  How to write a `Top' node.
347 * makeinfo top command::        How to use the @code{@@top} command.
348 * Top Node Summary::            Write a brief description for readers.
350 Menus
352 * Menu Location::               Put a menu in a short node.
353 * Writing a Menu::              What is a menu?
354 * Menu Parts::                  A menu entry has three parts.
355 * Less Cluttered Menu Entry::   Two part menu entry.
356 * Menu Example::                Two and three part menu entries.
357 * Other Info Files::            How to refer to a different Info file.
359 Cross References
361 * References::                  What cross references are for.
362 * Cross Reference Commands::    A summary of the different commands.
363 * Cross Reference Parts::       A cross reference has several parts.
364 * xref::                        Begin a reference with `See' @dots{}
365 * Top Node Naming::             How to refer to the beginning of another file.
366 * ref::                         A reference for the last part of a sentence.
367 * pxref::                       How to write a parenthetical cross reference.
368 * inforef::                     How to refer to an Info-only file.
369 * uref::                        How to refer to a uniform resource locator.
371 @code{@@xref}
373 * Reference Syntax::            What a reference looks like and requires.
374 * One Argument::                @code{@@xref} with one argument.
375 * Two Arguments::               @code{@@xref} with two arguments.
376 * Three Arguments::             @code{@@xref} with three arguments.
377 * Four and Five Arguments::     @code{@@xref} with four and five arguments.
379 Marking Words and Phrases
381 * Indicating::                  How to indicate definitions, files, etc.
382 * Emphasis::                    How to emphasize text.
384 Indicating Definitions, Commands, etc.
386 * Useful Highlighting::         Highlighting provides useful information.
387 * code::                        How to indicate code.
388 * kbd::                         How to show keyboard input.
389 * key::                         How to specify keys.
390 * samp::                        How to show a literal sequence of characters.
391 * var::                         How to indicate a metasyntactic variable.
392 * file::                        How to indicate the name of a file.
393 * dfn::                         How to specify a definition.
394 * cite::                        How to refer to a book that is not in Info.
395 * url::                         How to indicate a world wide web reference.
396 * email::                       How to indicate an electronic mail address.
398 Emphasizing Text
400 * emph & strong::               How to emphasize text in Texinfo.
401 * Smallcaps::                   How to use the small caps font.
402 * Fonts::                       Various font commands for printed output.
403 * Customized Highlighting::     How to define highlighting commands.
405 Quotations and Examples
407 * Block Enclosing Commands::    Use different constructs for
408                                   different purposes.
409 * quotation::                   How to write a quotation.
410 * example::                     How to write an example in a fixed-width font.
411 * noindent::                    How to prevent paragraph indentation.
412 * Lisp Example::                How to illustrate Lisp code.
413 * smallexample & smalllisp::    Forms for the @code{@@smallbook} option.
414 * display::                     How to write an example in the current font.
415 * format::                      How to write an example that does not narrow
416                                   the margins.
417 * exdent::                      How to undo the indentation of a line.
418 * flushleft & flushright::      How to push text flushleft or flushright.
419 * cartouche::                   How to draw cartouches around examples.
421 Lists and Tables
423 * Introducing Lists::           Texinfo formats lists for you.
424 * itemize::                     How to construct a simple list.
425 * enumerate::                   How to construct a numbered list.
426 * Two-column Tables::           How to construct a two-column table.
427 * Multi-column Tables::         How to construct generalized tables.
429 Making a Two-column Table
431 * table::                       How to construct a two-column table.
432 * ftable vtable::               Automatic indexing for two-column tables.
433 * itemx::                       How to put more entries in the first column.
435 Multi-column Tables
437 * Multitable Column Widths::    Defining multitable column widths.
438 * Multitable Rows::             Defining multitable rows, with examples.
440 Creating Indices
442 * Index Entries::               Choose different words for index entries.
443 * Predefined Indices::          Use different indices for different kinds
444                                   of entry.
445 * Indexing Commands::           How to make an index entry.
446 * Combining Indices::           How to combine indices.
447 * New Indices::                 How to define your own indices.
449 Combining Indices
451 * syncodeindex::                How to merge two indices, using @code{@@code}
452                                   font for the merged-from index.
453 * synindex::                    How to merge two indices, using the
454                                   default font of the merged-to index.
456 Special Insertions
458 * Braces Atsigns::              How to insert braces, @samp{@@}.
459 * Inserting Space::             How to insert the right amount of space
460                                   within a sentence.
461 * Inserting Accents::           How to insert accents and special characters.
462 * Dots Bullets::                How to insert dots and bullets.
463 * TeX and copyright::           How to insert the @TeX{} logo
464                                   and the copyright symbol.
465 * pounds::                      How to insert the pounds currency symbol.
466 * minus::                       How to insert a minus sign.
467 * math::                        How to format a mathematical expression.
468 * Glyphs::                      How to indicate results of evaluation,
469                                   expansion of macros, errors, etc.
470 * Images::                      How to include graphics.
472 Inserting @@ and Braces
474 * Inserting An Atsign::         How to insert @samp{@@}.
475 * Inserting Braces::            How to insert @samp{@{} and @samp{@}}.
477 Inserting Space
479 * Not Ending a Sentence::       Sometimes a . doesn't end a sentence.
480 * Ending a Sentence::           Sometimes it does.
481 * Multiple Spaces::             Inserting multiple spaces.
482 * dmn::                         How to format a dimension.
484 Inserting Ellipsis, Dots, and Bullets
486 * dots::                        How to insert dots @dots{}
487 * bullet::                      How to insert a bullet.
489 Inserting @TeX{} and the Copyright Symbol
491 * tex::                         How to insert the @TeX{} logo.
492 * copyright symbol::            How to use @code{@@copyright}@{@}.
494 Glyphs for Examples
496 * Glyphs Summary::              
497 * result::                      How to show the result of expression.
498 * expansion::                   How to indicate an expansion.
499 * Print Glyph::                 How to indicate printed output.
500 * Error Glyph::                 How to indicate an error message.
501 * Equivalence::                 How to indicate equivalence.
502 * Point Glyph::                 How to indicate the location of point.
504 Glyphs Summary
506 * result::                      
507 * expansion::                   
508 * Print Glyph::                 
509 * Error Glyph::                 
510 * Equivalence::                 
511 * Point Glyph::                 
513 Making and Preventing Breaks
515 * Break Commands::              Cause and prevent splits.
516 * Line Breaks::                 How to force a single line to use two lines.
517 * - and hyphenation::           How to tell TeX about hyphenation points.
518 * w::                           How to prevent unwanted line breaks.
519 * sp::                          How to insert blank lines.
520 * page::                        How to force the start of a new page.
521 * group::                       How to prevent unwanted page breaks.
522 * need::                        Another way to prevent unwanted page breaks.
524 Definition Commands
526 * Def Cmd Template::            How to structure a description using a
527                                   definition command.
528 * Optional Arguments::          How to handle optional and repeated arguments.
529 * deffnx::                      How to group two or more `first' lines.
530 * Def Cmds in Detail::          All the definition commands.
531 * Def Cmd Conventions::         Conventions for writing definitions.
532 * Sample Function Definition::  
534 The Definition Commands
536 * Functions Commands::          Commands for functions and similar entities.
537 * Variables Commands::          Commands for variables and similar entities.
538 * Typed Functions::             Commands for functions in typed languages.
539 * Typed Variables::             Commands for variables in typed languages.
540 * Abstract Objects::            Commands for object-oriented programming.
541 * Data Types::                  The definition command for data types.
543 Footnotes
545 * Footnote Commands::           How to write a footnote in Texinfo.
546 * Footnote Styles::             Controlling how footnotes appear in Info.
548 Conditionally Visible Text
550 * Conditional Commands::        Specifying text for HTML, Info, or @TeX{}.
551 * Conditional Not Commands::    Specifying text for not HTML, Info, or @TeX{}.
552 * Raw Formatter Commands::      Using raw @TeX{} or HTML commands.
553 * set clear value::             Designating which text to format (for
554                                   all output formats); and how to set a
555                                   flag to a string that you can insert.
557 @code{@@set}, @code{@@clear}, and @code{@@value}
559 * ifset ifclear::               Format a region if a flag is set.
560 * value::                       Replace a flag with a string.
561 * value Example::               An easy way to update edition information.
563 Macros: Defining New Texinfo Commands
565 * Defining Macros::             Both defining and undefining new commands.
566 * Invoking Macros::             Using a macro, once you've defined it.
568 Format and Print Hardcopy
570 * Use TeX::                     Use @TeX{} to format for hardcopy.
571 * Format with tex/texindex::    How to format in a shell.
572 * Format with texi2dvi::        A simpler way to use the shell.
573 * Print with lpr::              How to print.
574 * Within Emacs::                How to format and print from an Emacs shell.
575 * Texinfo Mode Printing::       How to format and print in Texinfo mode.
576 * Compile-Command::             How to print using Emacs's compile command.
577 * Requirements Summary::        @TeX{} formatting requirements summary.
578 * Preparing for TeX::           What you need to do to use @TeX{}.
579 * Overfull hboxes::             What are and what to do with overfull hboxes.
580 * smallbook::                   How to print small format books and manuals.
581 * A4 Paper::                    How to print on European A4 paper.
582 * Cropmarks and Magnification::  How to print marks to indicate the size
583                                 of pages and how to print scaled up output.
585 Creating an Info File
587 * makeinfo advantages::         @code{makeinfo} provides better error checking.
588 * Invoking makeinfo::           How to run @code{makeinfo} from a shell.
589 * makeinfo options::            Specify fill-column and other options.
590 * Pointer Validation::          How to check that pointers point somewhere.
591 * makeinfo in Emacs::           How to run @code{makeinfo} from Emacs.
592 * texinfo-format commands::     Two Info formatting commands written
593                                   in Emacs Lisp are an alternative
594                                   to @code{makeinfo}.
595 * Batch Formatting::            How to format for Info in Emacs Batch mode.
596 * Tag and Split Files::         How tagged and split files help Info
597                                   to run better.
599 Installing an Info File
601 * Directory file::              The top level menu for all Info files.
602 * New Info File::               Listing a new info file.
603 * Other Info Directories::      How to specify Info files that are
604                                   located in other directories.
605 * Installing Dir Entries::      How to specify what menu entry to add
606                                   to the Info directory.
607 * Invoking install-info::       @code{install-info} options.
609 Sample Permissions
611 * Inserting Permissions::       How to put permissions in your document.
612 * ifinfo Permissions::          Sample @samp{ifinfo} copying permissions.
613 * Titlepage Permissions::       Sample Titlepage copying permissions.
615 Include Files
617 * Using Include Files::         How to use the @code{@@include} command.
618 * texinfo-multiple-files-update::  How to create and update nodes and
619                                   menus when using included files.
620 * Include File Requirements::   What @code{texinfo-multiple-files-update} expects.
621 * Sample Include File::         A sample outer file with included files
622                                   within it; and a sample included file.
623 * Include Files Evolution::     How use of the @code{@@include} command
624                                   has changed over time.
626 Page Headings
628 * Headings Introduced::         Conventions for using page headings.
629 * Heading Format::              Standard page heading formats.
630 * Heading Choice::              How to specify the type of page heading.
631 * Custom Headings::             How to create your own headings and footings.
633 Formatting Mistakes
635 * makeinfo Preferred::          @code{makeinfo} finds errors.
636 * Debugging with Info::         How to catch errors with Info formatting.
637 * Debugging with TeX::          How to catch errors with @TeX{} formatting.
638 * Using texinfo-show-structure::  How to use @code{texinfo-show-structure}.
639 * Using occur::                 How to list all lines containing a pattern.
640 * Running Info-Validate::       How to find badly referenced nodes.
642 Finding Badly Referenced Nodes
644 * Using Info-validate::         How to run @code{Info-validate}.
645 * Unsplit::                     How to create an unsplit file.
646 * Tagifying::                   How to tagify a file.
647 * Splitting::                   How to split a file manually.
649 How to Obtain @TeX{}
651 * New Texinfo Mode Commands::   The updating commands are especially useful.
652 * New Commands::                Many newly described @@-commands.
653 @end detailmenu
654 @end menu
656 @node Copying, Overview, Top, Top
657 @comment  node-name, next, previous,  up
658 @unnumbered Texinfo Copying Conditions
659 @cindex Copying conditions
660 @cindex Conditions for copying Texinfo
662 The programs currently being distributed that relate to Texinfo include
663 portions of GNU Emacs, plus other separate programs (including
664 @code{makeinfo}, @code{info}, @code{texindex}, and @file{texinfo.tex}).
665 These programs are @dfn{free}; this means that everyone is free to use
666 them and free to redistribute them on a free basis.  The Texinfo-related
667 programs are not in the public domain; they are copyrighted and there
668 are restrictions on their distribution, but these restrictions are
669 designed to permit everything that a good cooperating citizen would want
670 to do.  What is not allowed is to try to prevent others from further
671 sharing any version of these programs that they might get from
672 you.@refill
674   Specifically, we want to make sure that you have the right to give
675 away copies of the programs that relate to Texinfo, that you receive
676 source code or else can get it if you want it, that you can change these
677 programs or use pieces of them in new free programs, and that you know
678 you can do these things.@refill
680   To make sure that everyone has such rights, we have to forbid you to
681 deprive anyone else of these rights.  For example, if you distribute
682 copies of the Texinfo related programs, you must give the recipients all
683 the rights that you have.  You must make sure that they, too, receive or
684 can get the source code.  And you must tell them their rights.@refill
686   Also, for our own protection, we must make certain that everyone finds
687 out that there is no warranty for the programs that relate to Texinfo.
688 If these programs are modified by someone else and passed on, we want
689 their recipients to know that what they have is not what we distributed,
690 so that any problems introduced by others will not reflect on our
691 reputation.@refill
693   The precise conditions of the licenses for the programs currently
694 being distributed that relate to Texinfo are found in the General Public
695 Licenses that accompany them.@refill
697 @node Overview, Texinfo Mode, Copying, Top
698 @comment  node-name,  next,  previous,  up
699 @chapter Overview of Texinfo
700 @cindex Overview of Texinfo
701 @cindex Texinfo overview
703 @dfn{Texinfo}@footnote{Note that the first syllable of ``Texinfo'' is
704 pronounced like ``speck'', not ``hex''.  This odd pronunciation is
705 derived from, but is not the same as, the pronunciation of @TeX{}.  In
706 the word @TeX{}, the @samp{X} is actually the Greek letter ``chi''
707 rather than the English letter ``ex''.  Pronounce @TeX{} as if the
708 @samp{X} were the last sound in the name `Bach'; but pronounce Texinfo
709 as if the @samp{x} were a `k'.  Spell ``Texinfo'' with a capital ``T''
710 and write the other letters in lower case.}
711 is a documentation system that uses a single source file to produce both
712 on-line information and printed output.  This means that instead of
713 writing two different documents, one for the on-line help or other on-line
714 information and the other for a typeset manual or other printed work, you
715 need write only one document.  When the work is revised, you need revise
716 only one document.  (You can read the on-line information, known as an
717 @dfn{Info file}, with an Info documentation-reading program.)@refill
719 @menu
720 * Using Texinfo::               Create a conventional printed book
721                                   or an Info file.
722 * Info Files::                  What is an Info file?
723 * Printed Books::               Characteristics of a printed book or manual.
724 * Formatting Commands::         @@-commands are used for formatting.
725 * Conventions::                 General rules for writing a Texinfo file.
726 * Comments::                    How to write comments and mark regions that
727                                   the formatting commands will ignore.
728 * Minimum::                     What a Texinfo file must have.
729 * Six Parts::                   Usually, a Texinfo file has six parts.
730 * Short Sample::                A short sample Texinfo file.
731 * Acknowledgements::            
732 @end menu
734 @node Using Texinfo, Info Files, Overview, Overview
735 @ifinfo
736 @heading Using Texinfo
737 @end ifinfo
739 Using Texinfo, you can create a printed document with the normal
740 features of a book, including chapters, sections, cross references,
741 and indices.  From the same Texinfo source file, you can create a
742 menu-driven, on-line Info file with nodes, menus, cross references,
743 and indices.  You can, if you wish, make the chapters and sections of
744 the printed document correspond to the nodes of the on-line
745 information; and you use the same cross references and indices for
746 both the Info file and the printed work.  @cite{The GNU
747 Emacs Manual} is a good example of a Texinfo file, as is this manual.@refill
749 To make a printed document, you process a Texinfo source file with the
750 @TeX{} typesetting program.  This creates a DVI file that you can
751 typeset and print as a book or report.  (Note that the Texinfo language
752 is completely different from @TeX{}'s usual language, plain @TeX{}.)  If
753 you do not have @TeX{}, but do have @code{troff} or @code{nroff}, you
754 can use the @code{texi2roff} program instead.@refill
756 To make an Info file, you process a Texinfo source file with the
757 @code{makeinfo} utility or Emacs's @code{texinfo-format-buffer} command;
758 this creates an Info file that you can install on-line.@refill
760 @TeX{} and @code{texi2roff} work with many types of printers; similarly,
761 Info works with almost every type of computer terminal.  This power
762 makes Texinfo a general purpose system, but brings with it a constraint,
763 which is that a Texinfo file may contain only the customary
764 ``typewriter'' characters (letters, numbers, spaces, and punctuation
765 marks) but no special graphics.@refill
767 A Texinfo file is a plain @sc{ascii} file containing text and
768 @dfn{@@-commands} (words preceded by an @samp{@@}) that tell the
769 typesetting and formatting programs what to do.  You may edit a
770 Texinfo file with any text editor; but it is especially convenient to
771 use GNU Emacs since that editor has a special mode, called Texinfo
772 mode, that provides various Texinfo-related features.  (@xref{Texinfo
773 Mode}.)@refill
775 Before writing a Texinfo source file, you should become familiar with
776 the Info documentation reading program and learn about nodes,
777 menus, cross references, and the rest.  (@inforef{Top, info, info},
778 for more information.)@refill
780 You can use Texinfo to create both on-line help and printed manuals;
781 moreover, Texinfo is freely redistributable.  For these reasons, Texinfo
782 is the format in which documentation for GNU utilities and libraries is
783 written.@refill
785 @node Info Files, Printed Books, Using Texinfo, Overview
786 @comment  node-name,  next,  previous,  up
787 @section Info files
788 @cindex Info files
790 An Info file is a Texinfo file formatted so that the Info documentation
791 reading program can operate on it.  (@code{makeinfo}
792 and @code{texinfo-format-buffer} are two commands that convert a Texinfo file
793 into an Info file.)@refill
795 Info files are divided into pieces called @dfn{nodes}, each of which
796 contains the discussion of one topic.  Each node has a name, and
797 contains both text for the user to read and pointers to other nodes,
798 which are identified by their names.  The Info program displays one node
799 at a time, and provides commands with which the user can move to other
800 related nodes.@refill
802 @ifinfo
803 @inforef{Top, info, info}, for more information about using Info.@refill
804 @end ifinfo
806 Each node of an Info file may have any number of child nodes that
807 describe subtopics of the node's topic.  The names of child
808 nodes are listed in a @dfn{menu} within the parent node; this
809 allows you to use certain Info commands to move to one of the child
810 nodes.  Generally, an Info file is organized like a book.  If a node
811 is at the logical level of a chapter, its child nodes are at the level
812 of sections; likewise, the child nodes of sections are at the level
813 of subsections.@refill
815 All the children of any one parent are linked together in a
816 bidirectional chain of `Next' and `Previous' pointers.  The `Next'
817 pointer provides a link to the next section, and the `Previous' pointer
818 provides a link to the previous section.  This means that all the nodes
819 that are at the level of sections within a chapter are linked together.
820 Normally the order in this chain is the same as the order of the
821 children in the parent's menu.  Each child node records the parent node
822 name as its `Up' pointer.  The last child has no `Next' pointer, and the
823 first child has the parent both as its `Previous' and as its `Up'
824 pointer.@footnote{In some documents, the first child has no `Previous'
825 pointer.  Occasionally, the last child has the node name of the next
826 following higher level node as its `Next' pointer.}@refill
828 The book-like structuring of an Info file into nodes that correspond
829 to chapters, sections, and the like is a matter of convention, not a
830 requirement.  The `Up', `Previous', and `Next' pointers of a node can
831 point to any other nodes, and a menu can contain any other nodes.
832 Thus, the node structure can be any directed graph.  But it is usually
833 more comprehensible to follow a structure that corresponds to the
834 structure of chapters and sections in a printed book or report.@refill
836 In addition to menus and to `Next', `Previous', and `Up' pointers, Info
837 provides pointers of another kind, called references, that can be
838 sprinkled throughout the text.  This is usually the best way to
839 represent links that do not fit a hierarchical structure.@refill
841 Usually, you will design a document so that its nodes match the
842 structure of chapters and sections in the printed output.  But
843 occasionally there are times when this is not right for the material
844 being discussed.  Therefore, Texinfo uses separate commands to specify
845 the node structure for the Info file and the section structure for the
846 printed output.@refill
848 Generally, you enter an Info file through a node that by convention is
849 named `Top'.  This node normally contains just a brief summary of the
850 file's purpose, and a large menu through which the rest of the file is
851 reached.  From this node, you can either traverse the file
852 systematically by going from node to node, or you can go to a specific
853 node listed in the main menu, or you can search the index menus and then
854 go directly to the node that has the information you want.  Alternatively,
855 with the standalone Info program, you can specify specific menu items on
856 the command line (@pxref{Top,,, info, Info}).
858 If you want to read through an Info file in sequence, as if it were a
859 printed manual, you can hit @key{SPC} repeatedly, or you get the whole
860 file with the advanced Info command @kbd{g *}.  (@inforef{Expert,
861 Advanced Info commands, info}.)@refill
863 @c !!! dir file may be located in one of many places:
864 @c     /usr/local/emacs/info            mentioned in info.c DEFAULT_INFOPATH
865 @c     /usr/local/lib/emacs/info        mentioned in info.c DEFAULT_INFOPATH
866 @c     /usr/gnu/info                    mentioned in info.c DEFAULT_INFOPATH
867 @c     /usr/local/info
868 @c     /usr/local/lib/info
869 The @file{dir} file in the @file{info} directory serves as the
870 departure point for the whole Info system.  From it, you can reach the
871 `Top' nodes of each of the documents in a complete Info system.@refill
873 @node Printed Books, Formatting Commands, Info Files, Overview
874 @comment  node-name,  next,  previous,  up
875 @section Printed Books
876 @cindex Printed book and manual characteristics
877 @cindex Manual characteristics, printed
878 @cindex Book characteristics, printed
879 @cindex Texinfo printed book characteristics
880 @cindex Characteristics, printed books or manuals
882 @cindex Knuth, Donald
883 A Texinfo file can be formatted and typeset as a printed book or manual.
884 To do this, you need @TeX{}, a powerful, sophisticated typesetting
885 program written by Donald Knuth.@footnote{You can also use the
886 @code{texi2roff} program if you do not have @TeX{}; since Texinfo is
887 designed for use with @TeX{}, @code{texi2roff} is not described here.
888 @code{texi2roff} is not part of the standard GNU distribution.}
890 A Texinfo-based book is similar to any other typeset, printed work: it
891 can have a title page, copyright page, table of contents, and preface,
892 as well as chapters, numbered or unnumbered sections and subsections,
893 page headers, cross references, footnotes, and indices.@refill
895 You can use Texinfo to write a book without ever having the intention
896 of converting it into on-line information.  You can use Texinfo for
897 writing a printed novel, and even to write a printed memo, although
898 this latter application is not recommended since electronic mail is so
899 much easier.@refill
901 @TeX{} is a general purpose typesetting program.  Texinfo provides a
902 file called @file{texinfo.tex} that contains information (definitions or
903 @dfn{macros}) that @TeX{} uses when it typesets a Texinfo file.
904 (@file{texinfo.tex} tells @TeX{} how to convert the Texinfo @@-commands
905 to @TeX{} commands, which @TeX{} can then process to create the typeset
906 document.)  @file{texinfo.tex} contains the specifications for printing
907 a document.@refill
909 Most often, documents are printed on 8.5 inch by 11 inch
910 pages (216@dmn{mm} by 280@dmn{mm}; this is the default size), but you
911 can also print for 7 inch by 9.25 inch pages (178@dmn{mm} by
912 235@dmn{mm}; the @code{@@smallbook} size) or on European A4 size paper
913 (@code{@@afourpaper}).  (@xref{smallbook, , Printing ``Small'' Books}.
914 Also, see @ref{A4 Paper, ,Printing on A4 Paper}.)@refill
916 By changing the parameters in @file{texinfo.tex}, you can change the
917 size of the printed document.  In addition, you can change the style in
918 which the printed document is formatted; for example, you can change the
919 sizes and fonts used, the amount of indentation for each paragraph, the
920 degree to which words are hyphenated, and the like.  By changing the
921 specifications, you can make a book look dignified, old and serious, or
922 light-hearted, young and cheery.@refill
924 @TeX{} is freely distributable.  It is written in a superset of Pascal
925 called WEB and can be compiled either in Pascal or (by using a
926 conversion program that comes with the @TeX{} distribution) in C.
927 (@xref{TeX Mode, ,@TeX{} Mode, emacs, The GNU Emacs Manual}, for information
928 about @TeX{}.)@refill
930 @TeX{} is very powerful and has a great many features.  Because a
931 Texinfo file must be able to present information both on a
932 character-only terminal in Info form and in a typeset book, the
933 formatting commands that Texinfo supports are necessarily
934 limited.@refill
936 @xref{Obtaining TeX, , How to Obtain @TeX{}}.
939 @node Formatting Commands, Conventions, Printed Books, Overview
940 @comment  node-name,  next,  previous,  up
941 @section @@-commands
942 @cindex @@-commands
943 @cindex Formatting commands
945 In a Texinfo file, the commands that tell @TeX{} how to typeset the
946 printed manual and tell @code{makeinfo} and
947 @code{texinfo-format-buffer} how to create an Info file are preceded
948 by @samp{@@}; they are called @dfn{@@-commands}.  For example,
949 @code{@@node} is the command to indicate a node and @code{@@chapter}
950 is the command to indicate the start of a chapter.@refill
952 @quotation
953 @strong{Please note:} All the @@-commands, with the exception of the
954 @code{@@TeX@{@}} command, must be written entirely in lower
955 case.@refill
956 @end quotation
958 The Texinfo @@-commands are a strictly limited set of constructs.  The
959 strict limits make it possible for Texinfo files to be understood both
960 by @TeX{} and by the code that converts them into Info files.  You can
961 display Info files on any terminal that displays alphabetic and
962 numeric characters.  Similarly, you can print the output generated by
963 @TeX{} on a wide variety of printers.@refill
965 Depending on what they do or what arguments@footnote{The word
966 @dfn{argument} comes from the way it is used in mathematics and does
967 not refer to a disputation between two people; it refers to the
968 information presented to the command.  According to the @cite{Oxford
969 English Dictionary}, the word derives from the Latin for @dfn{to make
970 clear, prove}; thus it came to mean `the evidence offered as proof',
971 which is to say, `the information offered', which led to its
972 mathematical meaning.  In its other thread of derivation, the word
973 came to mean `to assert in a manner against which others may make
974 counter assertions', which led to the meaning of `argument' as a
975 disputation.} they take, you need to write @@-commands on lines of
976 their own or as part of sentences:@refill
978 @itemize @bullet
979 @item
980 Write a command such as @code{@@noindent} at the beginning of a line as
981 the only text on the line.  (@code{@@noindent} prevents the beginning of
982 the next line from being indented as the beginning of a
983 paragraph.)@refill
985 @item
986 Write a command such as @code{@@chapter} at the beginning of a line
987 followed by the command's arguments, in this case the chapter title, on
988 the rest of the line.  (@code{@@chapter} creates chapter titles.)@refill
990 @item
991 Write a command such as @code{@@dots@{@}} wherever you wish but usually
992 within a sentence. (@code{@@dots@{@}} creates dots @dots{})@refill
994 @item
995 Write a command such as @code{@@code@{@var{sample-code}@}} wherever you
996 wish (but usually within a sentence) with its argument,
997 @var{sample-code} in this example, between the braces.  (@code{@@code}
998 marks text as being code.)@refill
1000 @item
1001 Write a command such as @code{@@example} at the beginning of a line of
1002 its own; write the body-text on following lines; and write the matching
1003 @code{@@end} command, @code{@@end example} in this case, at the
1004 beginning of a line of its own after the body-text. (@code{@@example}
1005 @dots{} @code{@@end example} indents and typesets body-text as an
1006 example.)@refill
1007 @end itemize
1009 @noindent
1010 @cindex Braces, when to use
1011 As a general rule, a command requires braces if it mingles among other
1012 text; but it does not need braces if it starts a line of its own.  The
1013 non-alphabetic commands, such as @code{@@:}, are exceptions to the rule;
1014 they do not need braces.@refill
1016 As you gain experience with Texinfo, you will rapidly learn how to
1017 write the different commands: the different ways to write commands
1018 make it easier to write and read Texinfo files than if all commands
1019 followed exactly the same syntax.  (For details about @@-command
1020 syntax, see @ref{Command Syntax, , @@-Command Syntax}.)@refill
1022 @node Conventions, Comments, Formatting Commands, Overview
1023 @comment  node-name,  next,  previous,  up
1024 @section General Syntactic Conventions
1025 @cindex General syntactic conventions
1026 @cindex Syntactic conventions
1027 @cindex Conventions, syntactic
1029 All printable @sc{ascii} characters except @samp{@@}, @samp{@{} and
1030 @samp{@}} can appear in a Texinfo file and stand for themselves.
1031 @samp{@@} is the escape character which introduces commands.
1032 @samp{@{} and @samp{@}} should be used only to surround arguments to
1033 certain commands.  To put one of these special characters into the
1034 document, put an @samp{@@} character in front of it, like this:
1035 @samp{@@@@}, @samp{@@@{}, and @samp{@@@}}.@refill
1037 @ifinfo
1038 It is customary in @TeX{} to use doubled single-quote characters to
1039 begin and end quotations: ` ` and ' ' (but without a space between the
1040 two single-quote characters).  This convention should be followed in
1041 Texinfo files.  @TeX{} converts doubled single-quote characters to
1042 left- and right-hand doubled quotation marks and Info converts doubled
1043 single-quote characters to @sc{ascii} double-quotes: ` ` and ' ' to " .@refill
1044 @end ifinfo
1045 @iftex
1046 It is customary in @TeX{} to use doubled single-quote characters to
1047 begin and end quotations: @w{@tt{ `` }} and @w{@tt{ '' }}.  This
1048 convention should be followed in Texinfo files.  @TeX{} converts
1049 doubled single-quote characters to left- and right-hand doubled
1050 quotation marks, ``like this'', and Info converts doubled single-quote
1051 characters to @sc{ascii} double-quotes: @w{@tt{ `` }} and
1052 @w{@tt{ '' }} to @w{@tt{ " }}.@refill
1053 @end iftex
1055 Use three hyphens in a row, @samp{---}, for a dash---like this.  In
1056 @TeX{}, a single or double hyphen produces a printed dash that is
1057 shorter than the usual typeset dash. Info reduces three hyphens to two
1058 for display on the screen.
1060 To prevent a paragraph from being indented in the printed manual, put
1061 the command @code{@@noindent} on a line by itself before the
1062 paragraph.@refill
1064 If you mark off a region of the Texinfo file with the @code{@@iftex}
1065 and @w{@code{@@end iftex}} commands, that region will appear only in
1066 the printed copy; in that region, you can use certain commands
1067 borrowed from plain @TeX{} that you cannot use in Info.  Likewise, if
1068 you mark off a region with the @code{@@ifinfo} and @code{@@end ifinfo}
1069 commands, that region will appear only in the Info file; in that
1070 region, you can use Info commands that you cannot use in @TeX{}.
1071 Similarly for @code{@@ifhtml @dots{} @@end ifhtml},
1072 @code{@@ifnothtml @dots{} @@end ifnothtml},
1073 @code{@@ifnotinfo @dots{} @@end ifnotinfo},
1074 @code{@@ifnottex @dots{} @@end ifnottex},
1075 @xref{Conditionals}.
1077 @cindex Tabs; don't use!
1078 @quotation
1079 @strong{Caution:} Do not use tabs in a Texinfo file!  @TeX{} uses
1080 variable-width fonts, which means that it cannot predefine a tab to work
1081 in all circumstances.  Consequently, @TeX{} treats tabs like single
1082 spaces, and that is not what they look like.  Furthermore,
1083 @code{makeinfo} does nothing special with tabs, and thus a tab character
1084 in your input file may appear differently in the output.
1086 @noindent
1087 To avoid this problem, Texinfo mode causes GNU Emacs to insert multiple
1088 spaces when you press the @key{TAB} key.@refill
1090 @noindent
1091 Also, you can run @code{untabify} in Emacs to convert tabs in a region
1092 to multiple spaces.@refill
1094 @noindent
1095 Don't use tabs.
1096 @end quotation
1098 @node Comments, Minimum, Conventions, Overview
1099 @comment  node-name,  next,  previous,  up
1100 @section Comments
1102 You can write comments in a Texinfo file that will not appear in
1103 either the Info file or the printed manual by using the
1104 @code{@@comment} command (which may be abbreviated to @code{@@c}).
1105 Such comments are for the person who reads the Texinfo file.  All the
1106 text on a line that follows either @code{@@comment} or @code{@@c} is a
1107 comment; the rest of the line does not appear in either the Info file
1108 or the printed manual. (Often, you can write the @code{@@comment} or
1109 @code{@@c} in the middle of a line, and only the text that follows after
1110 the @code{@@comment} or @code{@@c} command does not appear; but some
1111 commands, such as @code{@@settitle} and @code{@@setfilename}, work on a
1112 whole line.  You cannot use @code{@@comment} or @code{@@c} in a line
1113 beginning with such a command.)@refill
1114 @cindex Comments
1115 @findex comment
1116 @findex c @r{(comment)}
1118 You can write long stretches of text that will not appear in either
1119 the Info file or the printed manual by using the @code{@@ignore} and
1120 @code{@@end ignore} commands.  Write each of these commands on a line
1121 of its own, starting each command at the beginning of the line.  Text
1122 between these two commands does not appear in the processed output.
1123 You can use @code{@@ignore} and @code{@@end ignore} for writing
1124 comments.  Often, @code{@@ignore} and @code{@@end ignore} is used
1125 to enclose a part of the copying permissions that applies to the
1126 Texinfo source file of a document, but not to the Info or printed
1127 version of the document.@refill
1128 @cindex Ignored text
1129 @cindex Unprocessed text
1130 @findex ignore
1131 @c !!! Perhaps include this comment about ignore and ifset:
1132 @ignore
1133 Text enclosed by @code{@@ignore} or by failing @code{@@ifset} or
1134 @code{@@ifclear} conditions is ignored in the sense that it will not
1135 contribute to the formatted output.  However, TeX and makeinfo must
1136 still parse the ignored text, in order to understand when to
1137 @emph{stop} ignoring text from the source file; that means that you
1138 will still get error messages if you have invalid Texinfo markup
1139 within ignored text.
1140 @end ignore
1142 @node Minimum, Six Parts, Comments, Overview
1143 @comment  node-name,  next,  previous,  up
1144 @section What a Texinfo File Must Have
1145 @cindex Minimal Texinfo file (requirements)
1146 @cindex Must have in Texinfo file
1147 @cindex Required in Texinfo file
1148 @cindex Texinfo file minimum
1150 By convention, the names of Texinfo files end with one of the
1151 extensions @file{.texinfo}, @file{.texi}, or @file{.tex}.  The longer
1152 extension is preferred since it describes more clearly to a human
1153 reader the nature of the file.  The shorter extensions are for
1154 operating systems that cannot handle long file names.@refill
1156 In order to be made into a printed manual and an Info file, a Texinfo
1157 file @strong{must} begin with lines like this:@refill
1159 @example
1160 @group
1161 \input texinfo
1162 @@setfilename @var{info-file-name}
1163 @@settitle @var{name-of-manual}
1164 @end group
1165 @end example
1167 @noindent
1168 The contents of the file follow this beginning, and then you @strong{must} end
1169 a Texinfo file with a line like this:@refill
1171 @example
1172 @@bye
1173 @end example
1175 @findex input @r{(@TeX{} command)}
1176 @noindent
1177 The @samp{\input texinfo} line tells @TeX{} to use the
1178 @file{texinfo.tex} file, which tells @TeX{} how to translate the Texinfo
1179 @@-commands into @TeX{} typesetting commands.  (Note the use of the
1180 backslash, @samp{\}; this is correct for @TeX{}.)  The
1181 @samp{@@setfilename} line provides a name for the Info file and tells
1182 @TeX{} to open auxiliary files.  The @samp{@@settitle} line specifies a
1183 title for the page headers (or footers) of the printed manual.@refill
1185 The @code{@@bye} line at the end of the file on a line of its own tells
1186 the formatters that the file is ended and to stop formatting.@refill
1188 Usually, you will not use quite such a spare format, but will include
1189 mode setting and start-of-header and end-of-header lines at the
1190 beginning of a Texinfo file, like this:@refill
1192 @example
1193 @group
1194 \input texinfo   @@c -*-texinfo-*-
1195 @@c %**start of header
1196 @@setfilename @var{info-file-name}
1197 @@settitle @var{name-of-manual}
1198 @@c %**end of header
1199 @end group
1200 @end example
1202 @noindent
1203 In the first line, @samp{-*-texinfo-*-} causes Emacs to switch into
1204 Texinfo mode when you edit the file.
1206 The @code{@@c} lines which surround the @samp{@@setfilename} and
1207 @samp{@@settitle} lines are optional, but you need them in order to
1208 run @TeX{} or Info on just part of the file.  (@xref{Start of Header},
1209 for more information.)@refill
1211 Furthermore, you will usually provide a Texinfo file with a title
1212 page, indices, and the like.  But the minimum, which can be useful
1213 for short documents, is just the three lines at the beginning and the
1214 one line at the end.@refill
1216 @node Six Parts, Short Sample, Minimum, Overview
1217 @comment  node-name,  next,  previous,  up
1218 @section Six Parts of a Texinfo File
1220 Generally, a Texinfo file contains more than the minimal
1221 beginning and end---it usually contains six parts:@refill
1223 @table @r
1224 @item 1. Header
1225 The @dfn{Header} names the file, tells @TeX{} which definitions' file to
1226 use, and performs other ``housekeeping'' tasks.@refill
1228 @item 2. Summary Description and Copyright
1229 The @dfn{Summary Description and Copyright} segment describes the document
1230 and contains the copyright notice and copying permissions for the Info
1231 file.  The segment must be enclosed between @code{@@ifinfo} and
1232 @code{@@end ifinfo} commands so that the formatters place it only in the Info
1233 file.@refill
1235 @item 3. Title and Copyright
1236 The @dfn{Title and Copyright} segment contains the title and copyright pages
1237 and copying permissions for the printed manual.  The segment must be
1238 enclosed between @code{@@titlepage} and @code{@@end titlepage} commands.
1239 The title and copyright page appear only in the printed @w{manual}.@refill
1241 @item 4. `Top' Node and Master Menu
1242 The @dfn{Master Menu} contains a complete menu of all the nodes in the whole
1243 Info file.  It appears only in the Info file, in the `Top' node.@refill
1245 @item 5. Body
1246 The @dfn{Body} of the document may be structured like a traditional book or
1247 encyclopedia or it may be free form.@refill
1249 @item 6. End
1250 The @dfn{End} contains commands for printing indices and generating
1251 the table of contents, and the @code{@@bye} command on a line of its
1252 own.@refill
1253 @end table
1255 @node Short Sample, Acknowledgements, Six Parts, Overview
1256 @comment  node-name,  next,  previous,  up
1257 @section A Short Sample Texinfo File
1258 @cindex Sample Texinfo file
1260 Here is a complete but very short Texinfo file, in six parts.  The first
1261 three parts of the file, from @samp{\input texinfo} through to
1262 @samp{@@end titlepage}, look more intimidating than they are.  Most of
1263 the material is standard boilerplate; when you write a manual, simply
1264 insert the names for your own manual in this segment. (@xref{Beginning a
1265 File}.)@refill
1267 @noindent
1268 In the following, the sample text is @emph{indented}; comments on it are
1269 not.  The complete file, without any comments, is shown in
1270 @ref{Sample Texinfo File}.
1272 @subheading Part 1: Header
1274 @noindent
1275 The header does not appear in either the Info file or the
1276 printed output.  It sets various parameters, including the
1277 name of the Info file and the title used in the header.
1279 @example
1280 @group
1281 \input texinfo   @@c -*-texinfo-*-
1282 @@c %**start of header
1283 @@setfilename sample.info
1284 @@settitle Sample Document
1285 @@c %**end of header
1287 @@setchapternewpage odd
1288 @end group
1289 @end example
1291 @subheading Part 2: Summary Description and Copyright
1293 @noindent
1294 The summary description and copyright segment does not
1295 appear in the printed document.
1297 @example
1298 @group
1299 @@ifinfo
1300 This is a short example of a complete Texinfo file.
1302 Copyright @@copyright@{@} 1990 Free Software Foundation, Inc.
1303 @@end ifinfo
1304 @end group
1305 @end example
1307 @subheading Part 3: Titlepage and Copyright
1309 @noindent
1310 The titlepage segment does not appear in the Info file.
1312 @example
1313 @group
1314 @@titlepage
1315 @@sp 10
1316 @@comment The title is printed in a large font.
1317 @@center @@titlefont@{Sample Title@}
1318 @end group
1320 @group
1321 @@c The following two commands start the copyright page.
1322 @@page
1323 @@vskip 0pt plus 1filll
1324 Copyright @@copyright@{@} 1990 Free Software Foundation, Inc.
1325 @@end titlepage
1326 @end group
1327 @end example
1329 @subheading Part 4: `Top' Node and Master Menu
1331 @noindent
1332 The `Top' node contains the master menu for the Info file.
1333 Since a printed manual uses a table of contents rather than
1334 a menu, the master menu appears only in the Info file.
1336 @example
1337 @group
1338 @@node    Top,       First Chapter, ,         (dir)
1339 @@comment node-name, next,          previous, up
1340 @end group
1341 @end example
1343 @example
1344 @group
1345 @@menu
1346 * First Chapter::    The first chapter is the
1347                      only chapter in this sample.
1348 * Concept Index::    This index has two entries.
1349 @@end menu
1350 @end group
1351 @end example
1353 @subheading Part 5:  The Body of the Document
1355 @noindent
1356 The body segment contains all the text of the document, but not the
1357 indices or table of contents.  This example illustrates a node and a
1358 chapter containing an enumerated list.@refill
1360 @example
1361 @group
1362 @@node    First Chapter, Concept Index, Top,      Top
1363 @@comment node-name,     next,          previous, up
1364 @@chapter First Chapter
1365 @@cindex Sample index entry
1366 @end group
1368 @group
1369 This is the contents of the first chapter.
1370 @@cindex Another sample index entry
1371 @end group
1373 @group
1374 Here is a numbered list.
1376 @@enumerate
1377 @@item
1378 This is the first item.
1380 @@item
1381 This is the second item.
1382 @@end enumerate
1383 @end group
1385 @group
1386 The @@code@{makeinfo@} and @@code@{texinfo-format-buffer@}
1387 commands transform a Texinfo file such as this into
1388 an Info file; and @@TeX@{@} typesets it for a printed
1389 manual.
1390 @end group
1391 @end example
1393 @subheading Part 6: The End of the Document
1395 @noindent
1396 The end segment contains commands both for generating an index in a node
1397 and unnumbered chapter of its own and for generating the table of
1398 contents; and it contains the @code{@@bye} command that marks the end of
1399 the document.@refill
1401 @example
1402 @group
1403 @@node    Concept Index,    ,  First Chapter, Top
1404 @@comment node-name,    next,  previous,      up
1405 @@unnumbered Concept Index
1406 @end group
1408 @group
1409 @@printindex cp
1411 @@contents
1412 @@bye
1413 @end group
1414 @end example
1416 @subheading The Results
1418 Here is what the contents of the first chapter of the sample look like:
1420 @sp 1
1421 @need 700
1422 @quotation
1423 This is the contents of the first chapter.
1425 Here is a numbered list.
1427 @enumerate
1428 @item
1429 This is the first item.
1431 @item
1432 This is the second item.
1433 @end enumerate
1435 The @code{makeinfo} and @code{texinfo-format-buffer}
1436 commands transform a Texinfo file such as this into
1437 an Info file; and @TeX{} typesets it for a printed
1438 manual.
1439 @end quotation
1441 @node Acknowledgements,  , Short Sample, Overview
1442 @comment  node-name,  next,  previous,  up
1443 @section Acknowledgements
1445 @cindex Stallman, Richard M.
1446 @cindex Chassell, Robert J.
1447 @cindex Berry, Karl
1448 Richard M.@: Stallman wrote Edition 1.0 of this manual.  @w{Robert J.@:
1449 Chassell} revised and extended it, starting with Edition 1.1.  Karl
1450 Berry made updates for the Texinfo 3.8 and subsequent releases, starting
1451 with Edition 2.22.
1453 @cindex Pinard, Fran@,{c}ois
1454 @cindex Zuhn, David D.
1455 @cindex Weisshaus, Melissa
1456 Our thanks go out to all who helped improve this work, particularly to
1457 Fran@,{c}ois Pinard and @w{David D.@: Zuhn}, who tirelessly recorded and
1458 reported mistakes and obscurities; our special thanks go to Melissa
1459 Weisshaus for her frequent and often tedious reviews of nearly similar
1460 editions.  Our mistakes are our own.
1462 Please send suggestions and corrections to:
1464 @example
1465 @group
1466 @r{Internet address:}
1467     bug-texinfo@@gnu.org
1468 @end group
1469 @end example
1471 @noindent
1472 Please include the manual's edition number and update date in your messages.
1474 @node Texinfo Mode, Beginning a File, Overview, Top
1475 @comment  node-name,  next,  previous,  up
1476 @chapter Using Texinfo Mode
1477 @cindex Texinfo mode
1478 @cindex Mode, using Texinfo
1479 @cindex GNU Emacs
1480 @cindex Emacs
1482 You may edit a Texinfo file with any text editor you choose.  A Texinfo
1483 file is no different from any other @sc{ascii} file.  However, GNU Emacs
1484 comes with a special mode, called Texinfo
1485 mode, that provides  Emacs commands and tools to help ease your work.@refill
1487 This chapter describes features of GNU Emacs' Texinfo mode but not any
1488 features of the Texinfo formatting language.  If you are reading this
1489 manual straight through from the beginning, you may want to skim through
1490 this chapter briefly and come back to it after reading succeeding
1491 chapters which describe the Texinfo formatting language in
1492 detail.@refill
1494 @menu
1495 * Texinfo Mode Overview::       How Texinfo mode can help you.
1496 * Emacs Editing::               Texinfo mode adds to GNU Emacs' general
1497                                   purpose editing features.
1498 * Inserting::                   How to insert frequently used @@-commands.
1499 * Showing the Structure::       How to show the structure of a file.
1500 * Updating Nodes and Menus::    How to update or create new nodes and menus.
1501 * Info Formatting::             How to format for Info.
1502 * Printing::                    How to format and print part or all of a file.
1503 * Texinfo Mode Summary::        Summary of all the Texinfo mode commands.
1504 @end menu
1506 @node Texinfo Mode Overview, Emacs Editing, Texinfo Mode, Texinfo Mode
1507 @ifinfo
1508 @heading Texinfo Mode Overview
1509 @end ifinfo
1511 Texinfo mode provides special features for working with Texinfo
1512 files:@refill
1514 @itemize @bullet
1515 @item
1516 Insert frequently used @@-commands. @refill
1518 @item
1519 Automatically create @code{@@node} lines.
1521 @item
1522 Show the structure of a Texinfo source file.@refill
1524 @item
1525 Automatically create or update the `Next',
1526 `Previous', and `Up' pointers of a node.
1528 @item
1529 Automatically create or update menus.@refill
1531 @item
1532 Automatically create a master menu.@refill
1534 @item
1535 Format a part or all of a file for Info.@refill
1537 @item
1538 Typeset and print part or all of a file.@refill
1539 @end itemize
1541 Perhaps the two most helpful features are those for inserting frequently
1542 used @@-commands and for creating node pointers and menus.@refill
1544 @node Emacs Editing, Inserting, Texinfo Mode Overview, Texinfo Mode
1545 @section The Usual GNU Emacs Editing Commands
1547 In most cases, the usual Text mode commands work the same in Texinfo
1548 mode as they do in Text mode.  Texinfo mode adds new editing commands
1549 and tools to GNU Emacs' general purpose editing features.  The major
1550 difference concerns filling.  In Texinfo mode, the paragraph
1551 separation variable and syntax table are redefined so that Texinfo
1552 commands that should be on lines of their own are not inadvertently
1553 included in paragraphs.  Thus, the @kbd{M-q} (@code{fill-paragraph})
1554 command will refill a paragraph but not mix an indexing command on a
1555 line adjacent to it into the paragraph.@refill
1557 In addition, Texinfo mode sets the @code{page-delimiter} variable to
1558 the value of @code{texinfo-chapter-level-regexp}; by default, this is
1559 a regular expression matching the commands for chapters and their
1560 equivalents, such as appendices.  With this value for the page
1561 delimiter, you can jump from chapter title to chapter title with the
1562 @kbd{C-x ]} (@code{forward-page}) and @kbd{C-x [}
1563 (@code{backward-page}) commands and narrow to a chapter with the
1564 @kbd{C-x p} (@code{narrow-to-page}) command.  (@xref{Pages, , ,emacs,
1565 The GNU Emacs Manual}, for details about the page commands.)@refill
1567 You may name a Texinfo file however you wish, but the convention is to
1568 end a Texinfo file name with one of the three extensions
1569 @file{.texinfo}, @file{.texi}, or @file{.tex}.  A longer extension is
1570 preferred, since it is explicit, but a shorter extension may be
1571 necessary for operating systems that limit the length of file names.
1572 GNU Emacs automatically enters Texinfo mode when you visit a file with
1573 a @file{.texinfo} or  @file{.texi}
1574 extension.  Also, Emacs switches to Texinfo mode
1575 when you visit a
1576 file that has @samp{-*-texinfo-*-} in its first line.  If ever you are
1577 in another mode and wish to switch to Texinfo mode, type @code{M-x
1578 texinfo-mode}.@refill
1580 Like all other Emacs features, you can customize or enhance Texinfo
1581 mode as you wish.  In particular, the keybindings are very easy to
1582 change.  The keybindings described here are the default or standard
1583 ones.@refill
1585 @node Inserting, Showing the Structure, Emacs Editing, Texinfo Mode
1586 @comment  node-name,  next,  previous,  up
1587 @section Inserting Frequently Used Commands
1588 @cindex Inserting frequently used commands
1589 @cindex Frequently used commands, inserting
1590 @cindex Commands, inserting them
1592 Texinfo mode provides commands to insert various frequently used
1593 @@-commands into the buffer.  You can use these commands to save
1594 keystrokes.@refill
1596 The insert commands are invoked by typing @kbd{C-c} twice and then the
1597 first letter of the @@-command:@refill
1599 @table @kbd
1600 @item  C-c C-c c
1601 @itemx M-x texinfo-insert-@@code
1602 @findex texinfo-insert-@@code
1603 Insert @code{@@code@{@}} and put the
1604 cursor between the braces.@refill
1606 @item  C-c C-c d
1607 @itemx M-x texinfo-insert-@@dfn
1608 @findex texinfo-insert-@@dfn
1609 Insert @code{@@dfn@{@}} and put the
1610 cursor between the braces.@refill
1612 @item  C-c C-c e
1613 @itemx M-x texinfo-insert-@@end
1614 @findex texinfo-insert-@@end
1615 Insert @code{@@end} and attempt to insert the correct following word,
1616 such as @samp{example} or @samp{table}.  (This command does not handle
1617 nested lists correctly, but inserts the word appropriate to the
1618 immediately preceding list.)@refill
1620 @item  C-c C-c i
1621 @itemx M-x texinfo-insert-@@item
1622 @findex texinfo-insert-@@item
1623 Insert @code{@@item} and put the
1624 cursor at the beginning of the next line.@refill
1626 @item  C-c C-c k
1627 @itemx M-x texinfo-insert-@@kbd
1628 @findex texinfo-insert-@@kbd
1629 Insert @code{@@kbd@{@}} and put the
1630 cursor between the braces.@refill
1632 @item  C-c C-c n
1633 @itemx M-x texinfo-insert-@@node
1634 @findex texinfo-insert-@@node
1635 Insert @code{@@node} and a comment line
1636 listing the sequence for the `Next',
1637 `Previous', and `Up' nodes.
1638 Leave point after the @code{@@node}.@refill
1640 @item  C-c C-c o
1641 @itemx M-x texinfo-insert-@@noindent
1642 @findex texinfo-insert-@@noindent
1643 Insert @code{@@noindent} and put the
1644 cursor at the beginning of the next line.@refill
1646 @item  C-c C-c s
1647 @itemx M-x texinfo-insert-@@samp
1648 @findex texinfo-insert-@@samp
1649 Insert @code{@@samp@{@}} and put the
1650 cursor between the braces.@refill
1652 @item  C-c C-c t
1653 @itemx M-x texinfo-insert-@@table
1654 @findex texinfo-insert-@@table
1655 Insert @code{@@table} followed by a @key{SPC}
1656 and leave the cursor after the @key{SPC}.@refill
1658 @item  C-c C-c v
1659 @itemx M-x texinfo-insert-@@var
1660 @findex texinfo-insert-@@var
1661 Insert @code{@@var@{@}} and put the
1662 cursor between the braces.@refill
1664 @item  C-c C-c x
1665 @itemx M-x texinfo-insert-@@example
1666 @findex texinfo-insert-@@example
1667 Insert @code{@@example} and put the
1668 cursor at the beginning of the next line.@refill
1670 @c M-@{  was the binding for texinfo-insert-braces;
1671 @c in Emacs 19, backward-paragraph will take this binding.
1672 @item C-c C-c @{
1673 @itemx M-x texinfo-insert-braces
1674 @findex texinfo-insert-braces
1675 Insert @code{@{@}} and put the cursor between the braces.@refill
1677 @item C-c C-c @}
1678 @itemx C-c C-c ]
1679 @itemx M-x up-list
1680 @findex up-list
1681 Move from between a pair of braces forward past the closing brace.
1682 Typing @kbd{C-c C-c ]} is easier than typing @kbd{C-c C-c @}}, which
1683 is, however, more mnemonic; hence the two keybindings.  (Also, you can
1684 move out from between braces by typing @kbd{C-f}.)@refill
1685 @end table
1687 To put a command such as @w{@code{@@code@{@dots{}@}}} around an
1688 @emph{existing} word, position the cursor in front of the word and type
1689 @kbd{C-u 1 C-c C-c c}.  This makes it easy to edit existing plain text.
1690 The value of the prefix argument tells Emacs how many words following
1691 point to include between braces---@samp{1} for one word, @samp{2} for
1692 two words, and so on.  Use a negative argument to enclose the previous
1693 word or words.  If you do not specify a prefix argument, Emacs inserts
1694 the @@-command string and positions the cursor between the braces.  This
1695 feature works only for those @@-commands that operate on a word or words
1696 within one line, such as @code{@@kbd} and @code{@@var}.@refill
1698 This set of insert commands was created after analyzing the frequency
1699 with which different @@-commands are used in the @cite{GNU Emacs
1700 Manual} and the @cite{GDB Manual}.  If you wish to add your own insert
1701 commands, you can bind a keyboard macro to a key, use abbreviations,
1702 or extend the code in @file{texinfo.el}.@refill
1704 @findex texinfo-start-menu-description
1705 @cindex Menu description, start
1706 @cindex Description for menu, start
1707 @kbd{C-c C-c C-d} (@code{texinfo-start-menu-description}) is an insert
1708 command that works differently from the other insert commands.  It
1709 inserts a node's section or chapter title in the space for the
1710 description in a menu entry line.  (A menu entry has three parts, the
1711 entry name, the node name, and the description.  Only the node name is
1712 required, but a description helps explain what the node is about.
1713 @xref{Menu Parts, , The Parts of a Menu}.)@refill
1715 To use @code{texinfo-start-menu-description}, position point in a menu
1716 entry line and type @kbd{C-c C-c C-d}.  The command looks for and copies
1717 the title that goes with the node name, and inserts the title as a
1718 description; it positions point at beginning of the inserted text so you
1719 can edit it.  The function does not insert the title if the menu entry
1720 line already contains a description.@refill
1722 This command is only an aid to writing descriptions; it does not do the
1723 whole job.  You must edit the inserted text since a title tends to use
1724 the same words as a node name but a useful description uses different
1725 words.@refill
1727 @node Showing the Structure, Updating Nodes and Menus, Inserting, Texinfo Mode
1728 @comment  node-name,  next,  previous,  up
1729 @section Showing the Section Structure of a File
1730 @cindex Showing the section structure of a file
1731 @cindex Section structure of a file, showing it
1732 @cindex Structure of a file, showing it
1733 @cindex Outline of file structure, showing it
1734 @cindex Contents-like outline of file structure
1735 @cindex File section structure, showing it
1736 @cindex Texinfo file section structure, showing it
1738 You can show the section structure of a Texinfo file by using the
1739 @kbd{C-c C-s} command (@code{texinfo-show-structure}).  This command
1740 shows the section structure of a Texinfo file by listing the lines
1741 that begin with the @@-commands for @code{@@chapter},
1742 @code{@@section}, and the like.  It constructs what amounts
1743 to a table of contents.  These lines are displayed in another buffer
1744 called the @samp{*Occur*} buffer.  In that buffer, you can position
1745 the cursor over one of the lines and use the @kbd{C-c C-c} command
1746 (@code{occur-mode-goto-occurrence}), to jump to the corresponding spot
1747 in the Texinfo file.@refill
1749 @table @kbd
1750 @item  C-c C-s
1751 @itemx M-x texinfo-show-structure
1752 @findex texinfo-show-structure
1753 Show the @code{@@chapter}, @code{@@section}, and such lines of a
1754 Texinfo file.@refill
1756 @item  C-c C-c
1757 @itemx M-x occur-mode-goto-occurrence
1758 @findex occur-mode-goto-occurrence
1759 Go to the line in the Texinfo file corresponding to the line under the
1760 cursor in the @file{*Occur*} buffer.@refill
1761 @end table
1763 If you call @code{texinfo-show-structure} with a prefix argument by
1764 typing @w{@kbd{C-u C-c C-s}}, it will list not only those lines with the
1765 @@-commands for @code{@@chapter}, @code{@@section}, and the like,
1766 but also the @code{@@node} lines.  (This is how the
1767 @code{texinfo-show-structure} command worked without an argument in
1768 the first version of Texinfo.  It was changed because @code{@@node}
1769 lines clutter up the @samp{*Occur*} buffer and are usually not
1770 needed.)  You can use @code{texinfo-show-structure} with a prefix
1771 argument to check whether the `Next', `Previous', and `Up' pointers of
1772 an @code{@@node} line are correct.@refill
1774 Often, when you are working on a manual, you will be interested only
1775 in the structure of the current chapter.  In this case, you can mark
1776 off the region of the buffer that you are interested in by using the
1777 @kbd{C-x n n} (@code{narrow-to-region}) command and
1778 @code{texinfo-show-structure} will work on only that region.  To see
1779 the whole buffer again, use @w{@kbd{C-x n w}} (@code{widen}).
1780 (@xref{Narrowing, , , emacs, The GNU Emacs Manual}, for more
1781 information about the narrowing commands.)@refill
1783 @vindex page-delimiter
1784 @cindex Page delimiter in Texinfo mode
1785 In addition to providing the @code{texinfo-show-structure} command,
1786 Texinfo mode sets the value of the page delimiter variable to match
1787 the chapter-level @@-commands.  This enables you to use the @kbd{C-x
1788 ]} (@code{forward-page}) and @kbd{C-x [} (@code{backward-page})
1789 commands to move forward and backward by chapter, and to use the
1790 @kbd{C-x p} (@code{narrow-to-page}) command to narrow to a chapter.
1791 @xref{Pages, , , emacs, The GNU Emacs Manual}, for more information
1792 about the page commands.@refill
1794 @node Updating Nodes and Menus, Info Formatting, Showing the Structure, Texinfo Mode
1795 @comment  node-name,  next,  previous,  up
1796 @section Updating Nodes and Menus
1797 @cindex Updating nodes and menus
1798 @cindex Create nodes, menus automatically
1799 @cindex Insert nodes, menus automatically
1800 @cindex Automatically insert nodes, menus
1802 Texinfo mode provides commands for automatically creating or updating
1803 menus and node pointers.  The commands are called ``update'' commands
1804 because their most frequent use is for updating a Texinfo file after
1805 you have worked on it; but you can use them to insert the `Next',
1806 `Previous', and `Up' pointers into an @code{@@node} line that has none and to
1807 create menus in a file that has none.@refill
1809 If you do not use the updating commands, you need to write menus and
1810 node pointers by hand, which is a tedious task.@refill
1812 @menu
1813 * Updating Commands::           Five major updating commands.
1814 * Updating Requirements::       How to structure a Texinfo file for
1815                                   using the updating command.
1816 * Other Updating Commands::     How to indent descriptions, insert
1817                                   missing nodes lines, and update
1818                                   nodes in sequence.
1819 @end menu
1821 @node Updating Commands, Updating Requirements, Updating Nodes and Menus, Updating Nodes and Menus
1822 @ifinfo
1823 @subheading The Updating Commands
1824 @end ifinfo
1826 You can use the updating commands@refill
1828 @itemize @bullet
1829 @item
1830 to insert or update the `Next', `Previous', and `Up' pointers of a
1831 node,@refill
1833 @item
1834 to insert or update the menu for a section, and@refill
1836 @item
1837 to create a master menu for a Texinfo source file.@refill
1838 @end itemize
1840 You can also use the commands to update all the nodes and menus in a
1841 region or in a whole Texinfo file.@refill
1843 The updating commands work only with conventional Texinfo files, which
1844 are structured hierarchically like books.  In such files, a structuring
1845 command line must follow closely after each @code{@@node} line, except
1846 for the `Top' @code{@@node} line.  (A @dfn{structuring command line} is
1847 a line beginning with @code{@@chapter}, @code{@@section}, or other
1848 similar command.)
1850 You can write the structuring command line on the line that follows
1851 immediately after an @code{@@node} line or else on the line that
1852 follows after a single @code{@@comment} line or a single
1853 @code{@@ifinfo} line.  You cannot interpose more than one line between
1854 the @code{@@node} line and the structuring command line; and you may
1855 interpose only an @code{@@comment} line or an @code{@@ifinfo} line.
1857 Commands which work on a whole buffer require that the `Top' node be
1858 followed by a node with an @code{@@chapter} or equivalent-level command.
1859 Note that the menu updating commands will not create a main or master
1860 menu for a Texinfo file that has only @code{@@chapter}-level nodes!  The
1861 menu updating commands only create menus @emph{within} nodes for lower level
1862 nodes.  To create a menu of chapters, you must provide a `Top'
1863 node.@refill
1865 The menu updating commands remove menu entries that refer to other Info
1866 files since they do not refer to nodes within the current buffer.  This
1867 is a deficiency.  Rather than use menu entries, you can use cross
1868 references to refer to other Info files.  None of the updating commands
1869 affect cross references.@refill
1871 Texinfo mode has five updating commands that are used most often: two
1872 are for updating the node pointers or menu of a single node (or a
1873 region); two are for updating every node pointer and menu in a file;
1874 and one, the @code{texinfo-master-menu} command, is for creating a
1875 master menu for a complete file, and optionally, for updating every
1876 node and menu in the whole Texinfo file.@refill
1878 The @code{texinfo-master-menu} command is the primary command:@refill
1880 @table @kbd
1881 @item C-c C-u m
1882 @itemx M-x texinfo-master-menu
1883 @findex texinfo-master-menu
1884 Create or update a master menu that includes all the other menus
1885 (incorporating the descriptions from pre-existing menus, if
1886 any).@refill
1888 With an argument (prefix argument, @kbd{C-u,} if interactive), first create or
1889 update all the nodes and all the regular menus in the buffer before
1890 constructing the master menu.  (@xref{The Top Node, , The Top Node and
1891 Master Menu}, for more about a master menu.)@refill
1893 For @code{texinfo-master-menu} to work, the Texinfo file must have a
1894 `Top' node and at least one subsequent node.@refill
1896 After extensively editing a Texinfo file, you can type the following:
1898 @example
1899 C-u M-x texinfo-master-menu
1900 @exdent or
1901 C-u C-c C-u m
1902 @end example
1904 @noindent
1905 This updates all the nodes and menus completely and all at once.@refill
1906 @end table
1908 The other major updating commands do smaller jobs and are designed for
1909 the person  who updates nodes and menus as he or she writes a Texinfo
1910 file.@refill
1912 @need 1000
1913 The commands are:@refill
1915 @table @kbd
1916 @item C-c C-u C-n
1917 @itemx M-x texinfo-update-node
1918 @findex texinfo-update-node
1919 Insert the `Next', `Previous', and `Up' pointers for the node that point is
1920 within (i.e., for the @code{@@node} line preceding point).  If the
1921 @code{@@node} line has pre-existing `Next', `Previous', or `Up'
1922 pointers in it, the old pointers are removed and new ones inserted.
1923 With an argument (prefix argument, @kbd{C-u}, if interactive), this command
1924 updates all @code{@@node} lines in the region (which is the text
1925 between point and mark).@refill
1927 @item C-c C-u C-m
1928 @itemx M-x texinfo-make-menu
1929 @findex texinfo-make-menu
1930 Create or update the menu in the node that point is within.
1931 With an argument (@kbd{C-u} as prefix argument, if
1932 interactive), the command makes or updates menus for the
1933 nodes which are either within or a part of the
1934 region.@refill
1936 Whenever @code{texinfo-make-menu} updates an existing menu, the
1937 descriptions from that menu are incorporated into the new menu.  This
1938 is done by copying descriptions from the existing menu to the entries
1939 in the new menu that have the same node names.  If the node names are
1940 different, the descriptions are not copied to the new menu.@refill
1942 @item C-c C-u C-e
1943 @itemx M-x texinfo-every-node-update
1944 @findex texinfo-every-node-update
1945 Insert or update the `Next', `Previous', and `Up' pointers for every
1946 node in the buffer.@refill
1948 @item C-c C-u C-a
1949 @itemx M-x texinfo-all-menus-update
1950 @findex texinfo-all-menus-update
1951 Create or update all the menus in the buffer.  With an argument
1952 (@kbd{C-u} as prefix argument, if interactive), first insert
1953 or update all the node
1954 pointers before working on the menus.@refill
1956 If a master menu exists, the @code{texinfo-all-menus-update} command
1957 updates it; but the command does not create a new master menu if none
1958 already exists.  (Use the @code{texinfo-master-menu} command for
1959 that.)@refill
1961 When working on a document that does not merit a master menu, you can
1962 type the following:
1964 @example
1965 C-u C-c C-u C-a
1966 @exdent or
1967 C-u M-x texinfo-all-menus-update
1968 @end example
1970 @noindent
1971 This updates all the nodes and menus.@refill
1972 @end table
1974 The @code{texinfo-column-for-description} variable specifies the
1975 column to which menu descriptions are indented.  By default, the value
1976 is 32 although it is often useful to reduce it to as low as 24.  You
1977 can set the variable with the @kbd{M-x edit-options} command
1978 (@pxref{Edit Options, , Editing Variable Values, emacs, The GNU Emacs
1979 Manual}) or with the @kbd{M-x set-variable} command (@pxref{Examining,
1980 , Examining and Setting Variables, emacs, The GNU Emacs
1981 Manual}).@refill
1983 Also, the @code{texinfo-indent-menu-description} command may be used to
1984 indent existing menu descriptions to a specified column.  Finally, if
1985 you wish, you can use the @code{texinfo-insert-node-lines} command to
1986 insert missing @code{@@node} lines into a file.  (@xref{Other Updating
1987 Commands}, for more information.)@refill
1989 @node Updating Requirements, Other Updating Commands, Updating Commands, Updating Nodes and Menus
1990 @comment  node-name,  next,  previous,  up
1991 @subsection Updating Requirements
1992 @cindex Updating requirements
1993 @cindex Requirements for updating commands
1995 To use the updating commands, you must organize the Texinfo file
1996 hierarchically with chapters, sections, subsections, and the like.
1997 When you construct the hierarchy of the manual, do not `jump down'
1998 more than one level at a time: you can follow the `Top' node with a
1999 chapter, but not with a section; you can follow a chapter with a
2000 section, but not with a subsection.  However, you may `jump up' any
2001 number of levels at one time---for example, from a subsection to a
2002 chapter.@refill
2004 Each @code{@@node} line, with the exception of the line for the `Top'
2005 node, must be followed by a line with a structuring command such as
2006 @code{@@chapter}, @code{@@section}, or
2007 @code{@@unnumberedsubsec}.@refill
2009 Each @code{@@node} line/structuring-command line combination
2010 must look either like this:@refill
2012 @example
2013 @group
2014 @@node     Comments,  Minimum, Conventions, Overview
2015 @@comment  node-name, next,    previous,    up
2016 @@section Comments
2017 @end group
2018 @end example
2020 or like this (without the @code{@@comment} line):
2022 @example
2023 @group
2024 @@node Comments, Minimum, Conventions, Overview
2025 @@section Comments
2026 @end group
2027 @end example
2029 @noindent
2030 In this example, `Comments' is the name of both the node and the
2031 section.  The next node is called `Minimum' and the previous node is
2032 called `Conventions'.  The `Comments' section is within the `Overview'
2033 node, which is specified by the `Up' pointer.  (Instead of an
2034 @code{@@comment} line, you can write an @code{@@ifinfo} line.)@refill
2036 If a file has a `Top' node, it must be called @samp{top} or @samp{Top}
2037 and be the first node in the file.@refill
2039 The menu updating commands create a menu of sections within a chapter,
2040 a menu of subsections within a section, and so on.  This means that
2041 you must have a `Top' node if you want a menu of chapters.@refill
2043 Incidentally, the @code{makeinfo} command will create an Info file for
2044 a hierarchically organized Texinfo file that lacks `Next', `Previous'
2045 and `Up' pointers.  Thus, if you can be sure that your Texinfo file
2046 will be formatted with @code{makeinfo}, you have no need for the
2047 `update node' commands.  (@xref{Create an Info File, , Creating an
2048 Info File}, for more information about @code{makeinfo}.)  However,
2049 both @code{makeinfo} and the @code{texinfo-format-@dots{}} commands
2050 require that you insert menus in the file.@refill
2052 @node Other Updating Commands,  , Updating Requirements, Updating Nodes and Menus
2053 @comment  node-name,  next,  previous,  up
2054 @subsection Other Updating Commands
2056 In addition to the five major updating commands, Texinfo mode
2057 possesses several less frequently used updating commands:@refill
2059 @table @kbd
2060 @item M-x texinfo-insert-node-lines
2061 @findex texinfo-insert-node-lines
2062 Insert @code{@@node} lines before the @code{@@chapter},
2063 @code{@@section}, and other sectioning commands wherever they are
2064 missing throughout a region in a Texinfo file.@refill
2066 With an argument (@kbd{C-u} as prefix argument, if interactive), the
2067 @code{texinfo-insert-node-lines} command not only inserts
2068 @code{@@node} lines but also inserts the chapter or section titles as
2069 the names of the corresponding nodes.  In addition, it inserts the
2070 titles as node names in pre-existing @code{@@node} lines that lack
2071 names.  Since node names should be more concise than section or
2072 chapter titles, you must manually edit node names so inserted.@refill
2074 For example, the following marks a whole buffer as a region and inserts
2075 @code{@@node} lines and titles throughout:@refill
2077 @example
2078 C-x h C-u M-x texinfo-insert-node-lines
2079 @end example
2081 (Note that this command inserts titles as node names in @code{@@node}
2082 lines; the @code{texinfo-start-menu-description} command
2083 (@pxref{Inserting, Inserting Frequently Used Commands}) inserts titles
2084 as descriptions in menu entries, a different action.  However, in both
2085 cases, you need to edit the inserted text.)@refill
2087 @item M-x texinfo-multiple-files-update
2088 @findex texinfo-multiple-files-update @r{(in brief)}
2089 Update nodes and menus in a document built from several separate files.
2090 With @kbd{C-u} as a prefix argument, create and insert a master menu in
2091 the outer file.  With a numeric prefix argument, such as @kbd{C-u 2}, first
2092 update all the menus and all the `Next', `Previous', and `Up' pointers
2093 of all the included files before creating and inserting a master menu in
2094 the outer file.  The @code{texinfo-multiple-files-update} command is
2095 described in the appendix on @code{@@include} files.
2096 @ifinfo
2097 @xref{texinfo-multiple-files-update}.@refill
2098 @end ifinfo
2099 @iftex
2100 @xref{texinfo-multiple-files-update, ,
2101 @code{texinfo-multiple-files-update}}.@refill
2102 @end iftex
2104 @item M-x texinfo-indent-menu-description
2105 @findex texinfo-indent-menu-description
2106 Indent every description in the menu following point to the specified
2107 column.  You can use this command to give yourself more space for
2108 descriptions.  With an argument (@kbd{C-u} as prefix argument, if
2109 interactive), the @code{texinfo-indent-menu-description} command indents
2110 every description in every menu in the region.  However, this command
2111 does not indent the second and subsequent lines of a multi-line
2112 description.@refill
2114 @item M-x texinfo-sequential-node-update
2115 @findex texinfo-sequential-node-update
2116 Insert the names of the nodes immediately following and preceding the
2117 current node as the `Next' or `Previous' pointers regardless of those
2118 nodes' hierarchical level.  This means that the `Next' node of a
2119 subsection may well be the next chapter.  Sequentially ordered nodes are
2120 useful for novels and other documents that you read through
2121 sequentially.  (However, in Info, the @kbd{g *} command lets
2122 you look through the file sequentially, so sequentially ordered nodes
2123 are not strictly necessary.)  With an argument (prefix argument, if
2124 interactive), the @code{texinfo-sequential-node-update} command
2125 sequentially updates all the nodes in the region.@refill
2126 @end table
2128 @node Info Formatting, Printing, Updating Nodes and Menus, Texinfo Mode
2129 @comment  node-name,  next,  previous,  up
2130 @section Formatting for Info
2131 @cindex Formatting for Info
2132 @cindex Running an Info formatter
2133 @cindex Info formatting
2135 Texinfo mode provides several commands for formatting part or all of a
2136 Texinfo file for Info.  Often, when you are writing a document, you
2137 want to format only part of a file---that is, a region.@refill
2139 You can use either the @code{texinfo-format-region} or the
2140 @code{makeinfo-region} command to format a region:@refill
2142 @table @kbd
2143 @findex texinfo-format-region
2144 @item  C-c C-e C-r
2145 @itemx M-x texinfo-format-region
2146 @itemx C-c C-m C-r
2147 @itemx M-x makeinfo-region
2148 Format the current region for Info.@refill
2149 @end table
2151 You can use either the @code{texinfo-format-buffer} or the
2152 @code{makeinfo-buffer} command to format a whole buffer:@refill
2154 @table @kbd
2155 @findex texinfo-format-buffer
2156 @item  C-c C-e C-b
2157 @itemx M-x texinfo-format-buffer
2158 @itemx C-c C-m C-b
2159 @itemx M-x makeinfo-buffer
2160 Format the current buffer for Info.@refill
2161 @end table
2163 @need 1000
2164 For example, after writing a Texinfo file, you can type the following:
2166 @example
2167 C-u C-c C-u m
2168 @exdent or
2169 C-u M-x texinfo-master-menu
2170 @end example
2172 @noindent
2173 This updates all the nodes and menus.  Then type the following to create
2174 an Info file:
2176 @example
2177 C-c C-m C-b
2178 @exdent or
2179 M-x makeinfo-buffer
2180 @end example
2182 For @TeX{} or the Info formatting commands to work, the file @emph{must}
2183 include a line that has @code{@@setfilename} in its header.@refill
2185 @xref{Create an Info File}, for details about Info formatting.@refill
2187 @node Printing, Texinfo Mode Summary, Info Formatting, Texinfo Mode
2188 @comment node-name,  next,  previous,  up
2189 @section Formatting and Printing
2190 @cindex Formatting for printing
2191 @cindex Printing a region or buffer
2192 @cindex Region formatting and printing
2193 @cindex Buffer formatting and printing
2194 @cindex Part of file formatting and printing
2196 Typesetting and printing a Texinfo file is a multi-step process in which
2197 you first create a file for printing (called a DVI file), and then
2198 print the file.  Optionally, you may also create indices.  To do this,
2199 you must run the @code{texindex} command after first running the
2200 @code{tex} typesetting command; and then you must run the @code{tex}
2201 command again.  Or else run the @code{texi2dvi} command which
2202 automatically creates indices as needed (@pxref{Format with texi2dvi}).
2204 Often, when you are writing a document, you want to typeset and print
2205 only part of a file to see what it will look like.  You can use the
2206 @code{texinfo-tex-region} and related commands for this purpose.  Use
2207 the @code{texinfo-tex-buffer} command to format all of a
2208 buffer.@refill
2210 @table @kbd
2211 @item  C-c C-t C-b
2212 @itemx M-x texinfo-tex-buffer
2213 @findex texinfo-tex-buffer
2214 Run @code{texi2dvi} on the buffer.  In addition to running @TeX{} on the
2215 buffer, this command automatically creates or updates indices as
2216 needed.@refill
2218 @item  C-c C-t C-r
2219 @itemx M-x texinfo-tex-region
2220 @findex texinfo-tex-region
2221 Run @TeX{} on the region.@refill
2223 @item C-c C-t C-i
2224 @itemx M-x texinfo-texindex
2225 Run @code{texindex} to sort the indices of a Texinfo file formatted with
2226 @code{texinfo-tex-region}.  The @code{texinfo-tex-region} command does
2227 not run @code{texindex} automatically; it only runs the @code{tex}
2228 typesetting command.  You must run the @code{texinfo-tex-region} command
2229 a second time after sorting the raw index files with the @code{texindex}
2230 command.  (Usually, you do not format an index when you format a region,
2231 only when you format a buffer.  Now that the @code{texi2dvi} command
2232 exists, there is little or no need for this command.)@refill
2234 @item C-c C-t C-p
2235 @itemx M-x texinfo-tex-print
2236 @findex texinfo-tex-print
2237 Print the file (or the part of the file) previously formatted with
2238 @code{texinfo-tex-buffer} or @code{texinfo-tex-region}.@refill
2239 @end table
2241 For @code{texinfo-tex-region} or @code{texinfo-tex-buffer} to work, the
2242 file @emph{must} start with a @samp{\input texinfo} line and must
2243 include an @code{@@settitle} line.  The file must end with @code{@@bye}
2244 on a line by itself.  (When you use @code{texinfo-tex-region}, you must
2245 surround the @code{@@settitle} line with start-of-header and
2246 end-of-header lines.)@refill
2248 @xref{Format/Print Hardcopy}, for a description of the other @TeX{} related
2249 commands, such as @code{tex-show-print-queue}.@refill
2251 @node Texinfo Mode Summary,  , Printing, Texinfo Mode
2252 @comment  node-name,  next,  previous,  up
2253 @section Texinfo Mode Summary
2255 In Texinfo mode, each set of commands has default keybindings that
2256 begin with the same keys.  All the commands that are custom-created
2257 for Texinfo mode begin with @kbd{C-c}.  The keys are somewhat
2258 mnemonic.@refill
2260 @subheading Insert Commands
2262 The insert commands are invoked by typing @kbd{C-c} twice and then the
2263 first letter of the @@-command to be inserted.  (It might make more
2264 sense mnemonically to use @kbd{C-c C-i}, for `custom insert', but
2265 @kbd{C-c C-c} is quick to type.)@refill
2267 @example
2268 C-c C-c c       @r{Insert} @samp{@@code}.
2269 C-c C-c d       @r{Insert} @samp{@@dfn}.
2270 C-c C-c e       @r{Insert} @samp{@@end}.
2271 C-c C-c i       @r{Insert} @samp{@@item}.
2272 C-c C-c n       @r{Insert} @samp{@@node}.
2273 C-c C-c s       @r{Insert} @samp{@@samp}.
2274 C-c C-c v       @r{Insert} @samp{@@var}.
2275 C-c C-c @{       @r{Insert braces.}
2276 C-c C-c ]
2277 C-c C-c @}       @r{Move out of enclosing braces.}
2279 @group
2280 C-c C-c C-d     @r{Insert a node's section title}
2281                 @r{in the space for the description}
2282                 @r{in a menu entry line.}
2283 @end group
2284 @end example
2286 @subheading Show Structure
2288 The @code{texinfo-show-structure} command is often used within a
2289 narrowed region.@refill
2291 @example
2292 C-c C-s         @r{List all the headings.}
2293 @end example
2295 @subheading The Master Update Command
2297 The @code{texinfo-master-menu} command creates a master menu; and can
2298 be used to update every node and menu in a file as well.@refill
2300 @example
2301 @group
2302 C-c C-u m
2303 M-x texinfo-master-menu
2304                 @r{Create or update a master menu.}
2305 @end group
2307 @group
2308 C-u C-c C-u m   @r{With @kbd{C-u} as a prefix argument, first}
2309                 @r{create or update all nodes and regular}
2310                 @r{menus, and then create a master menu.}
2311 @end group
2312 @end example
2314 @subheading Update Pointers
2316 The update pointer commands are invoked by typing @kbd{C-c C-u} and
2317 then either @kbd{C-n} for @code{texinfo-update-node} or @kbd{C-e} for
2318 @code{texinfo-every-node-update}.@refill
2320 @example
2321 C-c C-u C-n     @r{Update a node.}
2322 C-c C-u C-e     @r{Update every node in the buffer.}
2323 @end example
2325 @subheading Update Menus
2327 Invoke the  update menu commands by typing @kbd{C-c C-u}
2328 and then either @kbd{C-m} for @code{texinfo-make-menu} or
2329 @kbd{C-a} for @code{texinfo-all-menus-update}.  To update
2330 both nodes and menus at the same time, precede @kbd{C-c C-u
2331 C-a} with @kbd{C-u}.@refill
2333 @example
2334 C-c C-u C-m     @r{Make or update a menu.}
2336 @group
2337 C-c C-u C-a     @r{Make or update all}
2338                 @r{menus in a buffer.}
2339 @end group
2341 @group
2342 C-u C-c C-u C-a @r{With @kbd{C-u} as a prefix argument,}
2343                 @r{first create or update all nodes and}
2344                 @r{then create or update all menus.}
2345 @end group
2346 @end example
2348 @subheading Format for Info
2350 The Info formatting commands that are written in Emacs Lisp are
2351 invoked by typing @kbd{C-c C-e} and then either @kbd{C-r} for a region
2352 or @kbd{C-b} for the whole buffer.@refill
2354 The Info formatting commands that are written in C and based on the
2355 @code{makeinfo} program are invoked by typing @kbd{C-c C-m} and then
2356 either @kbd{C-r} for a region or @kbd{C-b} for the whole buffer.@refill
2358 @need 800
2359 @noindent
2360 Use the @code{texinfo-format@dots{}} commands:
2362 @example
2363 @group
2364 C-c C-e C-r     @r{Format the region.}
2365 C-c C-e C-b     @r{Format the buffer.}
2366 @end group
2367 @end example
2369 @need 750
2370 @noindent
2371 Use @code{makeinfo}:
2373 @example
2374 C-c C-m C-r     @r{Format the region.}
2375 C-c C-m C-b     @r{Format the buffer.}
2376 C-c C-m C-l     @r{Recenter the @code{makeinfo} output buffer.}
2377 C-c C-m C-k     @r{Kill the @code{makeinfo} formatting job.}
2378 @end example
2380 @subheading Typeset and Print
2382 The @TeX{} typesetting and printing commands are invoked by typing
2383 @kbd{C-c C-t} and then another control command: @kbd{C-r} for
2384 @code{texinfo-tex-region}, @kbd{C-b} for @code{texinfo-tex-buffer},
2385 and so on.@refill
2387 @example
2388 C-c C-t C-r     @r{Run @TeX{} on the region.}
2389 C-c C-t C-b     @r{Run} @code{texi2dvi} @r{on the buffer.}
2390 C-c C-t C-i     @r{Run} @code{texindex}.
2391 C-c C-t C-p     @r{Print the DVI file.}
2392 C-c C-t C-q     @r{Show the print queue.}
2393 C-c C-t C-d     @r{Delete a job from the print queue.}
2394 C-c C-t C-k     @r{Kill the current @TeX{} formatting job.}
2395 C-c C-t C-x     @r{Quit a currently stopped @TeX{} formatting job.}
2396 C-c C-t C-l     @r{Recenter the output buffer.}
2397 @end example
2399 @subheading Other Updating Commands
2401 The `other updating commands' do not have standard keybindings because
2402 they are rarely used.
2404 @example
2405 @group
2406 M-x texinfo-insert-node-lines
2407                 @r{Insert missing @code{@@node} lines in region.}
2408                 @r{With @kbd{C-u} as a prefix argument,}
2409                 @r{use section titles as node names.}
2410 @end group
2412 @group
2413 M-x texinfo-multiple-files-update
2414                 @r{Update a multi-file document.}
2415                 @r{With @kbd{C-u 2} as a prefix argument,}
2416                 @r{create or update all nodes and menus}
2417                 @r{in all included files first.}
2418 @end group
2420 @group
2421 M-x texinfo-indent-menu-description
2422                 @r{Indent descriptions.}
2423 @end group
2425 @group
2426 M-x texinfo-sequential-node-update
2427                 @r{Insert node pointers in strict sequence.}
2428 @end group
2429 @end example
2431 @node Beginning a File, Ending a File, Texinfo Mode, Top
2432 @comment  node-name,  next,  previous,  up
2433 @chapter Beginning a Texinfo File
2434 @cindex Beginning a Texinfo file
2435 @cindex Texinfo file beginning
2436 @cindex File beginning
2438 Certain pieces of information must be provided at the beginning of a
2439 Texinfo file, such as the name of the file and the title of the
2440 document.@refill
2442 @menu
2443 * Four Parts::                  Four parts begin a Texinfo file.
2444 * Sample Beginning::            Here is a sample beginning for a Texinfo file.
2445 * Header::                      The very beginning of a Texinfo file.
2446 * Info Summary and Permissions::  Summary and copying permissions for Info.
2447 * Titlepage & Copyright Page::  Creating the title and copyright pages.
2448 * The Top Node::                Creating the `Top' node and master menu.
2449 * Software Copying Permissions::  Ensure that you and others continue to
2450                                   have the right to use and share software.
2451 @end menu
2453 @node Four Parts, Sample Beginning, Beginning a File, Beginning a File
2454 @ifinfo
2455 @heading Four Parts Begin a File
2456 @end ifinfo
2458 Generally, the beginning of a Texinfo file has four parts:@refill
2460 @enumerate
2461 @item
2462 The header, delimited by special comment lines, that includes the
2463 commands for naming the Texinfo file and telling @TeX{} what
2464 definitions file to use when processing the Texinfo file.@refill
2466 @item
2467 A short statement of what the file is about, with a copyright notice
2468 and copying permissions.  This is enclosed in @code{@@ifinfo} and
2469 @code{@@end ifinfo} commands so that the formatters place it only
2470 in the Info file.@refill
2472 @item
2473 A title page and copyright page, with a copyright notice and copying
2474 permissions.  This is enclosed between @code{@@titlepage} and
2475 @code{@@end titlepage} commands.  The title and copyright page appear
2476 only in the printed @w{manual}.@refill
2478 @item
2479 The `Top' node that contains a menu for the whole Info file.  The
2480 contents of this node appear only in the Info file.@refill
2481 @end enumerate
2483 Also, optionally, you may include the copying conditions for a program
2484 and a warranty disclaimer.  The copying section will be followed by an
2485 introduction or else by the first chapter of the manual.@refill
2487 Since the copyright notice and copying permissions for the Texinfo
2488 document (in contrast to the copying permissions for a program) are in
2489 parts that appear only in the Info file or only in the printed manual,
2490 this information must be given twice.@refill
2492 @node Sample Beginning, Header, Four Parts, Beginning a File
2493 @comment  node-name,  next,  previous,  up
2494 @section Sample Texinfo File Beginning
2496 The following sample shows what is needed.@refill
2498 @example
2499 \input texinfo   @@c -*-texinfo-*-
2500 @@c %**start of header
2501 @@setfilename @var{name-of-info-file}
2502 @@settitle @var{name-of-manual}
2503 @@setchapternewpage odd
2504 @@c %**end of header
2506 @@ifinfo
2507 This file documents @dots{}
2509 Copyright @var{year} @var{copyright-owner}
2511 @group
2512 Permission is granted to @dots{}
2513 @@end ifinfo
2514 @end group
2516 @group
2517 @@c  This title page illustrates only one of the
2518 @@c  two methods of forming a title page.
2519 @end group
2521 @group
2522 @@titlepage
2523 @@title @var{name-of-manual-when-printed}
2524 @@subtitle @var{subtitle-if-any}
2525 @@subtitle @var{second-subtitle}
2526 @@author @var{author}
2527 @end group
2529 @group
2530 @@c  The following two commands
2531 @@c  start the copyright page.
2532 @@page
2533 @@vskip 0pt plus 1filll
2534 Copyright @@copyright@{@} @var{year} @var{copyright-owner}
2535 @end group
2537 Published by @dots{}
2539 Permission is granted to @dots{}
2540 @@end titlepage
2542 @@node Top, Overview, , (dir)
2544 @@ifinfo
2545 This document describes @dots{}
2547 This document applies to version @dots{}
2548 of the program named @dots{}
2549 @@end ifinfo
2551 @group
2552 @@menu
2553 * Copying::          Your rights and freedoms.
2554 * First Chapter::    Getting started @dots{}
2555 * Second Chapter::              @dots{}
2556   @dots{}
2557   @dots{}
2558 @@end menu
2559 @end group
2561 @group
2562 @@node    First Chapter, Second Chapter, top,      top
2563 @@comment node-name,     next,           previous, up
2564 @@chapter First Chapter
2565 @@cindex Index entry for First Chapter
2566 @end group
2567 @end example
2569 @node Header, Info Summary and Permissions, Sample Beginning, Beginning a File
2570 @comment  node-name,  next,  previous,  up
2571 @section The Texinfo File Header
2572 @cindex Header for Texinfo files
2573 @cindex Texinfo file header
2575 Texinfo files start with at least three lines that provide Info and
2576 @TeX{} with necessary information.  These are the @code{\input
2577 texinfo} line, the @code{@@settitle} line, and the
2578 @code{@@setfilename} line.  If you want to run @TeX{} on just a part
2579 of the Texinfo File, you must write the @code{@@settitle}
2580 and @code{@@setfilename} lines between start-of-header and end-of-header
2581 lines.@refill
2583 Thus, the beginning of a Texinfo file looks like this:
2585 @example
2586 @group
2587 \input texinfo   @@c -*-texinfo-*-
2588 @@setfilename sample.info
2589 @@settitle Sample Document
2590 @end group
2591 @end example
2593 @noindent
2594 or else like this:
2596 @example
2597 @group
2598 \input texinfo   @@c -*-texinfo-*-
2599 @@c %**start of header
2600 @@setfilename sample.info
2601 @@settitle Sample Document
2602 @@c %**end of header
2603 @end group
2604 @end example
2606 @menu
2607 * First Line::                  The first line of a Texinfo file.
2608 * Start of Header::             Formatting a region requires this.
2609 * setfilename::                 Tell Info the name of the Info file.
2610 * settitle::                    Create a title for the printed work.
2611 * setchapternewpage::           Start chapters on right-hand pages.
2612 * paragraphindent::             An option to specify paragraph indentation.
2613 * End of Header::               Formatting a region requires this.
2614 @end menu
2616 @node First Line, Start of Header, Header, Header
2617 @comment  node-name,  next,  previous,  up
2618 @subsection The First Line of a Texinfo File
2619 @cindex First line of a Texinfo file
2620 @cindex Beginning line of a Texinfo file
2621 @cindex Header of a Texinfo file
2623 Every Texinfo file that is to be the top-level input to @TeX{} must begin
2624 with a line that looks like this:@refill
2626 @example
2627 \input texinfo   @@c -*-texinfo-*-
2628 @end example
2630 @noindent
2631 This line serves two functions:
2633 @enumerate
2634 @item
2635 When the file is processed by @TeX{}, the @samp{\input texinfo} command
2636 tells @TeX{} to load the macros needed for processing a Texinfo file.
2637 These are in a file called @file{texinfo.tex}, which is usually located
2638 in the @file{/usr/lib/tex/macros} directory.  @TeX{} uses the backslash,
2639 @samp{\}, to mark the beginning of a command, just as Texinfo uses
2640 @samp{@@}.  The @file{texinfo.tex} file causes the switch from @samp{\}
2641 to @samp{@@}; before the switch occurs, @TeX{} requires @samp{\}, which
2642 is why it appears at the beginning of the file.@refill
2644 @item
2645 When the file is edited in GNU Emacs, the @samp{-*-texinfo-*-} mode
2646 specification tells Emacs to use Texinfo mode.@refill
2647 @end enumerate
2649 @node Start of Header, setfilename, First Line, Header
2650 @comment  node-name,  next,  previous,  up
2651 @subsection Start of Header
2652 @cindex Start of header line
2654 Write a start-of-header line on the second line of a Texinfo file.
2655 Follow the start-of-header line with @code{@@setfilename} and
2656 @code{@@settitle} lines and, optionally, with other command lines, such
2657 as @code{@@smallbook} or @code{@@footnotestyle}; and then by an
2658 end-of-header line (@pxref{End of Header}).@refill
2660 With these lines, you can format part of a Texinfo file for Info or
2661 typeset part for printing.@refill
2663 A start-of-header line looks like this:@refill
2665 @example
2666 @@c %**start of header
2667 @end example
2669 The odd string of characters, @samp{%**}, is to ensure that no other
2670 comment is accidentally taken for a start-of-header line.@refill
2672 @node setfilename, settitle, Start of Header, Header
2673 @comment  node-name,  next,  previous,  up
2674 @subsection @code{@@setfilename}
2675 @cindex Info file requires @code{@@setfilename}
2676 @findex setfilename
2678 In order to serve as the primary input file for either @code{makeinfo}
2679 or @TeX{}, a Texinfo file must contain a line that looks like this:
2681 @example
2682 @@setfilename @var{info-file-name}
2683 @end example
2685 Write the @code{@@setfilename} command at the beginning of a line and
2686 follow it on the same line by the Info file name.  Do not write anything
2687 else on the line; anything on the line after the command is considered
2688 part of the file name, including what would otherwise be a
2689 comment.
2691 The @code{@@setfilename} line specifies the name of the Info file to be
2692 generated.  This name should be different from the name of the Texinfo
2693 file.  There are two conventions for choosing the name: you can either
2694 remove the @samp{.texi} extension from the input file name, or replace
2695 it with the @samp{.info} extension.
2697 Some operating systems cannot handle long file names.  You can run into
2698 a problem even when the file name you specify is itself short enough.
2699 This occurs because the Info formatters split a long Info file into
2700 short indirect subfiles, and name them by appending @samp{-1},
2701 @samp{-2}, @dots{}, @samp{-10}, @samp{-11}, and so on, to the original
2702 file name.  (@xref{Tag and Split Files, , Tag Files and Split Files}.)
2703 The subfile name @file{texinfo.info-10}, for example, is too long for
2704 some systems; so the Info file name for this document is @file{texinfo}
2705 rather than @file{texinfo.info}.
2707 @cindex Ignored before @code{@@setfilename}
2708 The Info formatting commands ignore everything written before the
2709 @code{@@setfilename} line, which is why the very first line of
2710 the file (the @code{\input} line) does not show up in the output.
2712 @pindex texinfo.cnf
2713 The @code{@@setfilename} line produces no output when you typeset a
2714 manual with @TeX{}, but it nevertheless is essential: it opens the
2715 index, cross-reference, and other auxiliary files used by Texinfo, and
2716 also reads @file{texinfo.cnf} if that file is present on your system
2717 (@pxref{Preparing for TeX,, Preparing to Use @TeX{}}).
2720 @node settitle, setchapternewpage, setfilename, Header
2721 @comment  node-name,  next,  previous,  up
2722 @subsection @code{@@settitle}
2723 @findex settitle
2725 In order to be made into a printed manual, a Texinfo file must contain
2726 a line that looks like this:@refill
2728 @example
2729 @@settitle @var{title}
2730 @end example
2732 Write the @code{@@settitle} command at the beginning of a line and
2733 follow it on the same line by the title.  This tells @TeX{} the title
2734 to use in a header or footer.  Do not write anything else on the line;
2735 anything on the line after the command is considered part of the
2736 title, including a comment.@refill
2738 Conventionally, when @TeX{} formats a Texinfo file for double-sided
2739 output, the title is printed in the left-hand (even-numbered) page
2740 headings and the current chapter title is printed in the right-hand
2741 (odd-numbered) page headings.  (@TeX{} learns the title of each chapter
2742 from each @code{@@chapter} command.)  Page footers are not
2743 printed.@refill
2745 Even if you are printing in a single-sided style, @TeX{} looks for an
2746 @code{@@settitle} command line, in case you include the manual title
2747 in the heading. @refill
2749 The @code{@@settitle} command should precede everything that generates
2750 actual output in @TeX{}.@refill
2752 Although the title in the @code{@@settitle} command is usually the
2753 same as the title on the title page, it does not affect the title as
2754 it appears on the title page.  Thus, the two do not need not match
2755 exactly;  and the title in the @code{@@settitle} command can be a
2756 shortened or expanded version of the title as it appears on the title
2757 page. (@xref{titlepage, , @code{@@titlepage}}.)@refill
2759 @TeX{} prints page headings only for that text that comes after the
2760 @code{@@end titlepage} command in the Texinfo file, or that comes
2761 after an @code{@@headings} command that turns on headings.
2762 (@xref{headings on off, , The @code{@@headings} Command}, for more
2763 information.)@refill
2765 You may, if you wish, create your own, customized headings and
2766 footings.  @xref{Headings, , Page Headings}, for a detailed discussion
2767 of this process.@refill
2769 @node setchapternewpage, paragraphindent, settitle, Header
2770 @comment  node-name,  next,  previous,  up
2771 @subsection @code{@@setchapternewpage}
2772 @cindex Starting chapters
2773 @cindex Pages, starting odd
2774 @findex setchapternewpage
2776 In a book or a manual, text is usually printed on both sides of the
2777 paper, chapters start on right-hand pages, and right-hand pages have
2778 odd numbers.  But in short reports, text often is printed only on one
2779 side of the paper.  Also in short reports, chapters sometimes do not
2780 start on new pages, but are printed on the same page as the end of the
2781 preceding chapter, after a small amount of vertical whitespace.@refill
2783 You can use the @code{@@setchapternewpage} command with various
2784 arguments to specify how @TeX{} should start chapters and whether it
2785 should typeset pages for printing on one or both sides of the paper
2786 (single-sided or double-sided printing).@refill
2788 Write the @code{@@setchapternewpage} command at the beginning of a
2789 line followed by its argument.@refill
2791 For example, you would write the following to cause each chapter to
2792 start on a fresh odd-numbered page:@refill
2794 @example
2795 @@setchapternewpage odd
2796 @end example
2798 You can specify one of three alternatives with the
2799 @code{@@setchapternewpage} command:@refill
2801 @table @asis
2802 @ignore
2803 @item No @code{@@setchapternewpage} command
2804 If the Texinfo file does not contain an @code{@@setchapternewpage}
2805 command before the @code{@@titlepage} command, @TeX{} automatically
2806 begins chapters on new pages and prints headings in the standard
2807 format for single-sided printing.  This is the conventional format for
2808 single-sided printing.@refill
2810 The result is exactly the same as when you write
2811 @code{@@setchapternewpage on}.@refill
2812 @end ignore
2813 @item @code{@@setchapternewpage off}
2814 Cause @TeX{} to typeset a new chapter on the same page as the last
2815 chapter, after skipping some vertical whitespace.  Also, cause @TeX{} to
2816 format page headers for single-sided printing. (You can override the
2817 headers format with the @code{@@headings double} command; see
2818 @ref{headings on off, , The @code{@@headings} Command}.)@refill
2820 @item @code{@@setchapternewpage on}
2821 Cause @TeX{} to start new chapters on new pages and to typeset page
2822 headers for single-sided printing.  This is the form most often
2823 used for short reports.@refill
2825 This alternative is the default.@refill
2827 @item @code{@@setchapternewpage odd}
2828 Cause @TeX{} to start new chapters on new, odd-numbered pages
2829 (right-handed pages) and to typeset for double-sided printing.  This is
2830 the form most often used for books and manuals.@refill
2831 @end table
2833 @noindent
2834 Texinfo does not have an @code{@@setchapternewpage even} command.@refill
2836 @noindent
2837 (You can countermand or modify an @code{@@setchapternewpage} command
2838 with an @code{@@headings} command.  @xref{headings on off, , The
2839 @code{@@headings} Command}.)@refill
2841 At the beginning of a manual or book, pages are not numbered---for
2842 example, the title and copyright pages of a book are not numbered.
2843 By convention, table of contents pages are numbered with roman
2844 numerals and not in sequence with the rest of the document.@refill
2846 Since an Info file does not have pages, the @code{@@setchapternewpage}
2847 command has no effect on it.@refill
2849 Usually, you do not write an @code{@@setchapternewpage} command for
2850 single-sided printing, but accept the default which is to typeset for
2851 single-sided printing and to start new chapters on new pages.  Usually,
2852 you write an @code{@@setchapternewpage odd} command for double-sided
2853 printing.@refill
2855 @node paragraphindent, End of Header, setchapternewpage, Header
2856 @comment  node-name,  next,  previous,  up
2857 @subsection Paragraph Indenting
2858 @cindex Indenting paragraphs
2859 @cindex Paragraph indentation
2860 @findex paragraphindent
2862 The Info formatting commands may insert spaces at the beginning of the
2863 first line of each paragraph, thereby indenting that paragraph.  You
2864 can use the @code{@@paragraphindent} command to specify the
2865 indentation.  Write an @code{@@paragraphindent} command at the
2866 beginning of a line followed by either @samp{asis} or a number.  The
2867 template is:@refill
2869 @example
2870 @@paragraphindent @var{indent}
2871 @end example
2873 The Info formatting commands indent according to the value of
2874 @var{indent}:@refill
2876 @itemize @bullet
2877 @item
2878 If the value of @var{indent} is @samp{asis}, the Info formatting
2879 commands do not change the existing indentation.@refill
2881 @item
2882 If the value of @var{indent} is zero, the Info formatting commands delete
2883 existing indentation.@refill
2885 @item
2886 If the value of @var{indent} is greater than zero, the Info formatting
2887 commands indent the paragraph by that number of spaces.@refill
2888 @end itemize
2890 The default value of @var{indent} is @samp{asis}.@refill
2892 Write the @code{@@paragraphindent} command before or shortly after the
2893 end-of-header line at the beginning of a Texinfo file.  (If you write
2894 the command between the start-of-header and end-of-header lines, the
2895 region formatting commands indent paragraphs as specified.)@refill
2897 A peculiarity of the @code{texinfo-format-buffer} and
2898 @code{texinfo-format-region} commands is that they do not indent (nor
2899 fill) paragraphs that contain @code{@@w} or @code{@@*} commands.
2900 @xref{Refilling Paragraphs}, for a detailed description of what goes
2901 on.@refill
2903 @node End of Header,  , paragraphindent, Header
2904 @comment  node-name,  next,  previous,  up
2905 @subsection End of Header
2906 @cindex End of header line
2908 Follow the header lines with an @w{end-of-header} line.
2909 An end-of-header line looks like this:@refill
2911 @example
2912 @@c %**end of header
2913 @end example
2915 If you include the @code{@@setchapternewpage} command between the
2916 start-of-header and end-of-header lines, @TeX{} will typeset a region as
2917 that command specifies.  Similarly, if you include an @code{@@smallbook}
2918 command between the start-of-header and end-of-header lines, @TeX{} will
2919 typeset a region in the ``small'' book format.@refill
2921 @ifinfo
2922 The reason for the odd string of characters (@samp{%**}) is so that the
2923 @code{texinfo-tex-region} command does not accidentally find
2924 something that it should not when it is looking for the header.@refill
2926 The start-of-header line and the end-of-header line are Texinfo mode
2927 variables that you can change.@refill
2928 @end ifinfo
2930 @iftex
2931 @xref{Start of Header}.
2932 @end iftex
2934 @node Info Summary and Permissions, Titlepage & Copyright Page, Header, Beginning a File
2935 @comment  node-name,  next,  previous,  up
2936 @section Summary and Copying Permissions for Info
2938 The title page and the copyright page appear only in the printed copy of
2939 the manual; therefore, the same information must be inserted in a
2940 section that appears only in the Info file.  This section usually
2941 contains a brief description of the contents of the Info file, a
2942 copyright notice, and copying permissions.@refill
2944 The copyright notice should read:@refill
2946 @example
2947 Copyright @var{year} @var{copyright-owner}
2948 @end example
2950 @noindent
2951 and be put on a line by itself.@refill
2953 Standard text for the copyright permissions is contained in an appendix
2954 to this manual; see @ref{ifinfo Permissions, , @samp{ifinfo} Copying
2955 Permissions}, for the complete text.@refill
2957 The permissions text appears in an Info file @emph{before} the first
2958 node.  This mean that a reader does @emph{not} see this text when
2959 reading the file using Info, except when using the advanced Info command
2960 @kbd{g *}.
2962 @node Titlepage & Copyright Page, The Top Node, Info Summary and Permissions, Beginning a File
2963 @comment  node-name,  next,  previous,  up
2964 @section The Title and Copyright Pages
2966 A manual's name and author are usually printed on a title page.
2967 Sometimes copyright information is printed on the title page as well;
2968 more often, copyright information is printed on the back of the title
2969 page.
2971 The title and copyright pages appear in the printed manual, but not in the
2972 Info file.  Because of this, it is possible to use several slightly
2973 obscure @TeX{} typesetting commands that cannot be used in an Info file.
2974 In addition, this part of the beginning of a Texinfo file contains the text
2975 of the copying permissions that will appear in the printed manual.@refill
2977 @xref{Titlepage Permissions, , Titlepage Copying Permissions}, for the
2978 standard text for the copyright permissions.@refill
2980 @menu
2981 * titlepage::                   Create a title for the printed document.
2982 * titlefont center sp::         The @code{@@titlefont}, @code{@@center},
2983                                   and @code{@@sp} commands.
2984 * title subtitle author::       The @code{@@title}, @code{@@subtitle},
2985                                   and @code{@@author} commands.
2986 * Copyright & Permissions::     How to write the copyright notice and
2987                                   include copying permissions.
2988 * end titlepage::               Turn on page headings after the title and
2989                                   copyright pages.
2990 * headings on off::             An option for turning headings on and off
2991                                   and double or single sided printing.
2992 @end menu
2994 @node titlepage, titlefont center sp, Titlepage & Copyright Page, Titlepage & Copyright Page
2995 @comment  node-name,  next,  previous,  up
2996 @subsection @code{@@titlepage}
2997 @cindex Title page
2998 @findex titlepage
3000 Start the material for the title page and following copyright page
3001 with @code{@@titlepage} on a line by itself and end it with
3002 @code{@@end titlepage} on a line by itself.@refill
3004 The @code{@@end titlepage} command starts a new page and turns on page
3005 numbering.  (@xref{Headings, , Page Headings}, for details about how to
3006 generate page headings.)  All the material that you want to
3007 appear on unnumbered pages should be put between the
3008 @code{@@titlepage} and @code{@@end titlepage} commands.  By using the
3009 @code{@@page} command you can force a page break within the region
3010 delineated by the @code{@@titlepage} and @code{@@end titlepage}
3011 commands and thereby create more than one unnumbered page.  This is
3012 how the copyright page is produced.  (The @code{@@titlepage} command
3013 might perhaps have been better named the
3014 @code{@@titleandadditionalpages} command, but that would have been
3015 rather long!)@refill
3017 @c !!! append refill to footnote when makeinfo can handle it.
3018 When you write a manual about a computer program, you should write the
3019 version of the program to which the manual applies on the title
3020 page.  If the manual changes more frequently than the program or is
3021 independent of it, you should also include an edition
3022 number@footnote{We have found that it is helpful to refer to versions
3023 of manuals as `editions' and versions of programs as `versions';
3024 otherwise, we find we are liable to confuse each other in conversation
3025 by referring to both the documentation and the software with the same
3026 words.} for the manual.  This helps readers keep track of which manual
3027 is for which version of the program.  (The `Top' node
3028 should also contain this information; see @ref{makeinfo top, ,
3029 @code{@@top}}.)@refill
3031 Texinfo provides two main methods for creating a title page.  One method
3032 uses the @code{@@titlefont}, @code{@@sp}, and @code{@@center} commands
3033 to generate a title page in which the words on the page are
3034 centered.@refill
3036 The second method uses the @code{@@title}, @code{@@subtitle}, and
3037 @code{@@author} commands to create a title page with black rules under
3038 the title and author lines and the subtitle text set flush to the
3039 right hand side of the page.  With this method, you do not specify any
3040 of the actual formatting of the title page.  You specify the text
3041 you want, and Texinfo does the formatting.  You may use either
3042 method.@refill
3044 @findex shorttitlepage
3045 For extremely simple applications, Texinfo also provides a command
3046 @code{@@shorttitlepage} which takes a single argument as the title.
3047 The argument is typeset on a page by itself and followed by a blank
3048 page.
3051 @node titlefont center sp, title subtitle author, titlepage, Titlepage & Copyright Page
3052 @comment  node-name,  next,  previous,  up
3053 @subsection @code{@@titlefont}, @code{@@center}, and @code{@@sp}
3054 @findex titlefont
3055 @findex center
3056 @findex sp @r{(titlepage line spacing)}
3058 You can use the @code{@@titlefont}, @code{@@sp}, and @code{@@center}
3059 commands to create a title page for a printed document.  (This is the
3060 first of the two methods for creating a title page in Texinfo.)@refill
3062 Use the @code{@@titlefont} command to select a large font suitable for
3063 the title itself.@refill
3065 @need 700
3066 For example:
3068 @example
3069 @@titlefont@{Texinfo@}
3070 @end example
3072 Use the @code{@@center} command at the beginning of a line to center
3073 the remaining text on that line.  Thus,@refill
3075 @example
3076 @@center @@titlefont@{Texinfo@}
3077 @end example
3079 @noindent
3080 centers the title, which in this example is ``Texinfo'' printed
3081 in the title font.@refill
3083 Use the @code{@@sp} command to insert vertical space.  For example:@refill
3085 @example
3086 @@sp 2
3087 @end example
3089 @noindent
3090 This inserts two blank lines on the printed page.  (@xref{sp, ,
3091 @code{@@sp}}, for more information about the @code{@@sp}
3092 command.)@refill
3094 A template for this method looks like this:@refill
3096 @example
3097 @group
3098 @@titlepage
3099 @@sp 10
3100 @@center @@titlefont@{@var{name-of-manual-when-printed}@}
3101 @@sp 2
3102 @@center @var{subtitle-if-any}
3103 @@sp 2
3104 @@center @var{author}
3105 @dots{}
3106 @@end titlepage
3107 @end group
3108 @end example
3110 The spacing of the example fits an 8 1/2 by 11 inch manual.@refill
3112 @node title subtitle author, Copyright & Permissions, titlefont center sp, Titlepage & Copyright Page
3113 @comment  node-name,  next,  previous,  up
3114 @subsection @code{@@title}, @code{@@subtitle}, and @code{@@author}
3115 @findex title
3116 @findex subtitle
3117 @findex author
3119 You can use the @code{@@title}, @code{@@subtitle}, and @code{@@author}
3120 commands to create a title page in which the vertical and horizontal
3121 spacing is done for you automatically.  This contrasts with the method
3122 described in
3123 the previous section, in which the @code{@@sp} command is needed to
3124 adjust vertical spacing.@refill
3126 Write the @code{@@title}, @code{@@subtitle}, or @code{@@author}
3127 commands at the beginning of a line followed by the title, subtitle,
3128 or author.@refill
3130 The @code{@@title} command produces a line in which the title is set
3131 flush to the left-hand side of the page in a larger than normal font.
3132 The title is underlined with a black rule.@refill
3134 The @code{@@subtitle} command sets subtitles in a normal-sized font
3135 flush to the right-hand side of the page.@refill
3137 The @code{@@author} command sets the names of the author or authors in
3138 a middle-sized font flush to the left-hand side of the page on a line
3139 near the bottom of the title page.  The names are underlined with a
3140 black rule that is thinner than the rule that underlines the title.
3141 (The black rule only occurs if the @code{@@author} command line is
3142 followed by an @code{@@page} command line.)@refill
3144 There are two ways to use the @code{@@author} command: you can write
3145 the name or names on the remaining part of the line that starts with
3146 an @code{@@author} command:@refill
3148 @example
3149 @@author by Jane Smith and John Doe
3150 @end example
3152 @noindent
3153 or you can write the names one above each other by using two (or more)
3154 @code{@@author} commands:@refill
3156 @example
3157 @group
3158 @@author Jane Smith
3159 @@author John Doe
3160 @end group
3161 @end example
3163 @noindent
3164 (Only the bottom name is underlined with a black rule.)@refill
3166 @need 950
3167 A template for this method looks like this:@refill
3169 @example
3170 @group
3171 @@titlepage
3172 @@title @var{name-of-manual-when-printed}
3173 @@subtitle @var{subtitle-if-any}
3174 @@subtitle @var{second-subtitle}
3175 @@author @var{author}
3176 @@page
3177 @dots{}
3178 @@end titlepage
3179 @end group
3180 @end example
3182 @ifinfo
3183 @noindent
3184 Contrast this form with the form of a title page written using the
3185 @code{@@sp}, @code{@@center}, and @code{@@titlefont} commands:@refill
3187 @example
3188 @@titlepage
3189 @@sp 10
3190 @@center @@titlefont@{Name of Manual When Printed@}
3191 @@sp 2
3192 @@center Subtitle, If Any
3193 @@sp 1
3194 @@center Second subtitle
3195 @@sp 2
3196 @@center Author
3197 @@page
3198 @dots{}
3199 @@end titlepage
3200 @end example
3201 @end ifinfo
3203 @node Copyright & Permissions, end titlepage, title subtitle author, Titlepage & Copyright Page
3204 @comment  node-name,  next,  previous,  up
3205 @subsection Copyright Page and Permissions
3206 @cindex Copyright page
3207 @cindex Printed permissions
3208 @cindex Permissions, printed
3210 By international treaty, the copyright notice for a book should be
3211 either on the title page or on the back of the title page.  The
3212 copyright notice should include the year followed by the name of the
3213 organization or person who owns the copyright.@refill
3215 When the copyright notice is on the back of the title page, that page
3216 is customarily not numbered.  Therefore, in Texinfo, the information
3217 on the copyright page should be within @code{@@titlepage} and
3218 @code{@@end titlepage} commands.@refill
3220 @findex vskip
3221 @findex filll
3222 @cindex Vertical whitespace (@samp{vskip})
3223 Use the @code{@@page} command to cause a page break.  To push the
3224 copyright notice and the other text on the copyright page towards the
3225 bottom of the page, you can write a somewhat mysterious line after the
3226 @code{@@page} command that reads like this:@refill
3228 @example
3229 @@vskip 0pt plus 1filll
3230 @end example
3232 @noindent
3233 This is a @TeX{} command that is not supported by the Info formatting
3234 commands.  The @code{@@vskip} command inserts whitespace.  The
3235 @samp{0pt plus 1filll} means to put in zero points of mandatory whitespace,
3236 and as much optional whitespace as needed to push the
3237 following text to the bottom of the page.  Note the use of three
3238 @samp{l}s in the word @samp{filll}; this is the correct usage in
3239 @TeX{}.@refill
3241 @findex copyright
3242 In a printed manual, the @code{@@copyright@{@}} command generates a
3243 @samp{c} inside a circle.  (In Info, it generates @samp{(C)}.)  The
3244 copyright notice itself has the following legally defined sequence:@refill
3246 @example
3247 Copyright @copyright{} @var{year} @var{copyright-owner}
3248 @end example
3250 It is customary to put information on how to get a manual after the
3251 copyright notice, followed by the copying permissions for the
3252 manual.@refill
3254 Note that permissions must be given here as well as in the summary
3255 segment within @code{@@ifinfo} and @code{@@end ifinfo} that
3256 immediately follows the header since this text appears only in the
3257 printed manual and the @samp{ifinfo} text appears only in the Info
3258 file.@refill
3260 @xref{Sample Permissions}, for the standard text.@refill
3262 @node end titlepage, headings on off, Copyright & Permissions, Titlepage & Copyright Page
3263 @comment  node-name,  next,  previous,  up
3264 @subsection Heading Generation
3265 @findex end titlepage
3266 @cindex Headings, page, begin to appear
3267 @cindex Titlepage end starts headings
3268 @cindex End titlepage starts headings
3270 An @code{@@end titlepage} command on a line by itself not only marks
3271 the end of the title and copyright pages, but also causes @TeX{} to start
3272 generating page headings and page numbers.
3274 To repeat what is said elsewhere,  Texinfo has two standard page heading
3275 formats, one for documents which are printed on one side of each sheet of paper
3276 (single-sided printing), and the other for documents which are printed on both
3277 sides of each sheet (double-sided printing).
3278 (@xref{setchapternewpage, ,@code{@@setchapternewpage}}.)
3279 You can specify these formats in different ways:@refill
3281 @itemize @bullet
3282 @item
3283 The conventional way is to write an @code{@@setchapternewpage} command
3284 before the title page commands, and then have the @code{@@end
3285 titlepage} command start generating page headings in the manner desired.
3286 (@xref{setchapternewpage, , @code{@@setchapternewpage}}.)@refill
3288 @item
3289 Alternatively, you can use the @code{@@headings} command to prevent page
3290 headings from being generated or to start them for either single or
3291 double-sided printing.  (Write an @code{@@headings} command immediately
3292 after the @code{@@end titlepage} command.  @xref{headings on off, , The
3293 @code{@@headings} Command}, for more information.)@refill
3295 @item
3296 Or, you may specify your own page heading and footing format.
3297 @xref{Headings, , Page Headings}, for detailed
3298 information about page headings and footings.@refill
3299 @end itemize
3301 Most documents are formatted with the standard single-sided or
3302 double-sided format, using @code{@@setchapternewpage odd} for
3303 double-sided printing and no @code{@@setchapternewpage} command for
3304 single-sided printing.@refill
3306 @node headings on off,  , end titlepage, Titlepage & Copyright Page
3307 @comment  node-name,  next,  previous,  up
3308 @subsection The @code{@@headings} Command
3309 @findex headings
3311 The @code{@@headings} command is rarely used.  It specifies what kind of
3312 page headings and footings to print on each page.  Usually, this is
3313 controlled by the @code{@@setchapternewpage} command.  You need the
3314 @code{@@headings} command only if the @code{@@setchapternewpage} command
3315 does not do what you want, or if you want to turn off pre-defined page
3316 headings prior to defining your own.  Write an @code{@@headings} command
3317 immediately after the @code{@@end titlepage} command.@refill
3319 You can use @code{@@headings} as follows:@refill
3321 @table @code
3322 @item @@headings off
3323 Turn off printing of page headings.@refill
3325 @item @@headings single
3326 Turn on page headings appropriate for single-sided printing.
3327 @refill
3329 @item @@headings double
3330 Turn on page headings appropriate for double-sided printing.  The two
3331 commands, @code{@@headings on} and @code{@@headings double}, are
3332 synonymous.@refill
3334 @item @@headings singleafter
3335 @itemx @@headings doubleafter
3336 Turn on @code{single} or @code{double} headings, respectively, after the
3337 current page is output.
3339 @item @@headings on
3340 Turn on page headings: @code{single} if @samp{@@setchapternewpage
3341 on}, @code{double} otherwise.
3342 @end table
3344 For example, suppose you write @code{@@setchapternewpage off} before the
3345 @code{@@titlepage} command to tell @TeX{} to start a new chapter on the
3346 same page as the end of the last chapter.  This command also causes
3347 @TeX{} to typeset page headers for single-sided printing.  To cause
3348 @TeX{} to typeset for double sided printing, write @code{@@headings
3349 double} after the @code{@@end titlepage} command.
3351 You can stop @TeX{} from generating any page headings at all by
3352 writing @code{@@headings off} on a line of its own immediately after the
3353 line containing the @code{@@end titlepage} command, like this:@refill
3355 @example
3356 @@end titlepage
3357 @@headings off
3358 @end example
3360 @noindent
3361 The @code{@@headings off} command overrides the @code{@@end titlepage}
3362 command, which would otherwise cause @TeX{} to print page
3363 headings.@refill
3365 You can also specify your own style of page heading and footing.
3366 @xref{Headings, , Page Headings}, for more information.@refill
3368 @node The Top Node, Software Copying Permissions, Titlepage & Copyright Page, Beginning a File
3369 @comment  node-name,  next,  previous,  up
3370 @section The `Top' Node and Master Menu
3371 @cindex @samp{@r{Top}} node
3372 @cindex Master menu
3373 @cindex Node, `Top'
3375 The `Top' node is the node from which you enter an Info file.@refill
3377 A `Top' node should contain a brief description of the Info file and an
3378 extensive, master menu for the whole Info file.
3379 This helps the reader understand what the Info file is
3380 about.  Also, you should write the version number of the program to
3381 which the Info file applies; or, at least, the edition number.@refill
3383 The contents of the `Top' node should appear only in the Info file; none
3384 of it should appear in printed output, so enclose it between
3385 @code{@@ifinfo} and @code{@@end ifinfo} commands.  (@TeX{} does not
3386 print either an @code{@@node} line or a menu; they appear only in Info;
3387 strictly speaking, you are not required to enclose these parts between
3388 @code{@@ifinfo} and @code{@@end ifinfo}, but it is simplest to do so.
3389 @xref{Conditionals, , Conditionally Visible Text}.)@refill
3391 @menu
3392 * Title of Top Node::           Sketch what the file is about.
3393 * Master Menu Parts::           A master menu has three or more parts.
3394 @end menu
3396 @node Title of Top Node, Master Menu Parts, The Top Node, The Top Node
3397 @ifinfo
3398 @subheading `Top' Node Title
3399 @end ifinfo
3401 Sometimes, you will want to place an @code{@@top} sectioning command
3402 line containing the title of the document immediately after the
3403 @code{@@node Top} line (@pxref{makeinfo top command, , The @code{@@top}
3404 Sectioning Command}, for more information).@refill
3406 For example, the beginning of the Top node of this manual contains an
3407 @code{@@top} sectioning command, a short description, and edition and
3408 version information.  It looks like this:@refill
3410 @example
3411 @group
3412 @dots{}
3413 @@end titlepage
3415 @@ifinfo
3416 @@node Top, Copying, , (dir)
3417 @@top Texinfo
3419 Texinfo is a documentation system@dots{}
3420 @end group
3422 @group
3423 This is edition@dots{}
3424 @dots{}
3425 @@end ifinfo
3426 @end group
3428 @group
3429 @@menu
3430 * Copying::                 Texinfo is freely
3431                               redistributable.
3432 * Overview::                What is Texinfo?
3433 @dots{}
3434 @end group
3435 @@end menu
3436 @end example
3438 In a `Top' node, the `Previous', and `Up' nodes usually refer to the top
3439 level directory of the whole Info system, which is called @samp{(dir)}.
3440 The `Next' node refers to the first node that follows the main or master
3441 menu, which is usually the copying permissions, introduction, or first
3442 chapter.@refill
3444 @node Master Menu Parts,  , Title of Top Node, The Top Node
3445 @subsection Parts of a Master Menu
3446 @cindex Master menu parts
3447 @cindex Parts of a master menu
3449 A @dfn{master menu} is a detailed main menu listing all the nodes in a
3450 file.
3452 A master menu is enclosed in @code{@@menu} and @code{@@end menu}
3453 commands and does not appear in the printed document.@refill
3455 Generally, a master menu is divided into parts.@refill
3457 @itemize @bullet
3458 @item
3459 The first part contains the major nodes in the Texinfo file: the nodes
3460 for the chapters, chapter-like sections, and the appendices.@refill
3462 @item
3463 The second part contains nodes for the indices.@refill
3465 @item
3466 The third and subsequent parts contain a listing of the other, lower
3467 level nodes, often ordered by chapter.  This way, rather than go
3468 through an intermediary menu, an inquirer can go directly to a
3469 particular node when searching for specific information.  These menu
3470 items are not required; add them if you think they are a
3471 convenience.  If you do use them, put @code{@@detailmenu} before the
3472 first one, and @code{@@end detailmenu} after the last; otherwise,
3473 @code{makeinfo} will get confused.
3474 @end itemize
3476 Each section in the menu can be introduced by a descriptive line.  So
3477 long as the line does not begin with an asterisk, it will not be
3478 treated as a menu entry.  (@xref{Writing a Menu}, for more
3479 information.)@refill
3481 For example, the master menu for this manual looks like the following
3482 (but has many more entries):@refill
3484 @example
3485 @group
3486 @@menu
3487 * Copying::             Texinfo is freely
3488                           redistributable.
3489 * Overview::            What is Texinfo?
3490 * Texinfo Mode::        Special features in GNU Emacs.
3491 @dots{}
3492 @dots{}
3493 @end group
3494 @group
3495 * Command and Variable Index::
3496                         An entry for each @@-command.
3497 * Concept Index::       An entry for each concept.
3498 @end group
3500 @group
3501 @@detailmenu
3502  --- The Detailed Node Listing ---
3504 Overview of Texinfo
3506 * Info Files::          What is an Info file?
3507 * Printed Manuals::     Characteristics of
3508                           a printed manual.
3509 @dots{}
3510 @dots{}
3511 @end group
3513 @group
3514 Using Texinfo Mode
3516 * Info on a Region::    Formatting part of a file
3517                           for Info.
3518 @dots{}
3519 @dots{}
3520 @@end detailmenu
3521 @@end menu
3522 @end group
3523 @end example
3525 @node Software Copying Permissions,  , The Top Node, Beginning a File
3526 @comment  node-name,  next,  previous,  up
3527 @section Software Copying Permissions
3528 @cindex Software copying permissions
3529 @cindex Copying software
3530 @cindex Distribution
3531 @cindex License agreement
3533 If the Texinfo file has a section containing the ``General Public
3534 License'' and the distribution information and a warranty disclaimer
3535 for the software that is documented, this section usually follows the
3536 `Top' node.  The General Public License is very important to Project
3537 GNU software.  It ensures that you and others will continue to have a
3538 right to use and share the software.@refill
3540 The copying and distribution information and the disclaimer are
3541 followed by an introduction or else by the first chapter of the
3542 manual.@refill
3544 @cindex Introduction, as part of file
3545 Although an introduction is not a required part of a Texinfo file, it
3546 is very helpful.  Ideally, it should state clearly and concisely what
3547 the file is about and who would be interested in reading it.  In
3548 general, an introduction would follow the licensing and distribution
3549 information, although sometimes people put it earlier in the document.
3550 Usually, an introduction is put in an @code{@@unnumbered} section.
3551 (@xref{unnumbered & appendix, , The @code{@@unnumbered} and
3552 @code{@@appendix} Commands}.)@refill
3554 @node Ending a File, Structuring, Beginning a File, Top
3555 @comment  node-name,  next,  previous,  up
3556 @chapter Ending a Texinfo File
3557 @cindex Ending a Texinfo file
3558 @cindex Texinfo file ending
3559 @cindex File ending
3560 @findex bye
3562 The end of a Texinfo file should include the commands that create
3563 indices and generate detailed and summary tables of contents.
3564 And it must include the @code{@@bye} command that marks the last line
3565 processed by @TeX{}.@refill
3567 @need 700
3568 For example:
3570 @example
3571 @@node    Concept Index,     , Variables Index, Top
3572 @@c        node-name,    next, previous,        up
3573 @@unnumbered Concept Index
3575 @@printindex cp
3577 @@contents
3578 @@bye
3579 @end example
3581 @menu
3582 * Printing Indices & Menus::    How to print an index in hardcopy and
3583                                   generate index menus in Info.
3584 * Contents::                    How to create a table of contents.
3585 * File End::                    How to mark the end of a file.
3586 @end menu
3588 @node Printing Indices & Menus, Contents, Ending a File, Ending a File
3589 @comment  node-name,  next,  previous,  up
3590 @section Index Menus and Printing an Index
3591 @findex printindex
3592 @cindex Printing an index
3593 @cindex Indices, printing and menus
3594 @cindex Generating menus with indices
3595 @cindex Menus generated with indices
3597 To print an index means to include it as part of a manual or Info
3598 file.  This does not happen automatically just because you use
3599 @code{@@cindex} or other index-entry generating commands in the
3600 Texinfo file; those just cause the raw data for the index to be
3601 accumulated.  To generate an index, you must include the
3602 @code{@@printindex} command at the place in the document where you
3603 want the index to appear.  Also, as part of the process of creating a
3604 printed manual, you must run a program called @code{texindex}
3605 (@pxref{Format/Print Hardcopy}) to sort the raw data to produce a sorted
3606 index file.  The sorted index file is what is actually used to
3607 print the index.@refill
3609 Texinfo offers six different types of predefined index: the concept
3610 index, the function index, the variables index, the keystroke index, the
3611 program index, and the data type index (@pxref{Predefined Indices}).  Each
3612 index type has a two-letter name: @samp{cp}, @samp{fn}, @samp{vr},
3613 @samp{ky}, @samp{pg}, and @samp{tp}.  You may merge indices, or put them
3614 into separate sections (@pxref{Combining Indices}); or you may define
3615 your own indices (@pxref{New Indices, , Defining New Indices}).@refill
3617 The @code{@@printindex} command takes a two-letter index name, reads
3618 the corresponding sorted index file and formats it appropriately into
3619 an index.@refill
3621 @ignore
3622 The two-letter index names are:
3624 @table @samp
3625 @item cp
3626 concept index
3627 @item fn
3628 function index
3629 @item vr
3630 variable index
3631 @item ky
3632 key index
3633 @item pg
3634 program index
3635 @item tp
3636 data type index
3637 @end table
3638 @end ignore
3639 The @code{@@printindex} command does not generate a chapter heading
3640 for the index.  Consequently, you should precede the
3641 @code{@@printindex} command with a suitable section or chapter command
3642 (usually @code{@@unnumbered}) to supply the chapter heading and put
3643 the index into the table of contents.  Precede the @code{@@unnumbered}
3644 command with an @code{@@node} line.@refill
3646 @need 1200
3647 For example:
3649 @smallexample
3650 @group
3651 @@node Variable Index, Concept Index, Function Index, Top
3652 @@comment    node-name,         next,       previous, up
3653 @@unnumbered Variable Index
3655 @@printindex vr
3656 @end group
3658 @group
3659 @@node     Concept Index,     , Variable Index, Top
3660 @@comment      node-name, next,       previous, up
3661 @@unnumbered Concept Index
3663 @@printindex cp
3664 @end group
3666 @group
3667 @@summarycontents
3668 @@contents
3669 @@bye
3670 @end group
3671 @end smallexample
3673 @noindent
3674 (Readers often prefer that the concept index come last in a book,
3675 since that makes it easiest to find.)@refill
3677 @ignore
3678 @c TeX can do sorting, just not conveniently enough to handle sorting
3679 @c Texinfo indexes. --karl, 5may97.
3680 In @TeX{}, the @code{@@printindex} command needs a sorted index file
3681 to work from.  @TeX{} does not know how to do sorting; this is a
3682 deficiency.  @TeX{} writes output files of raw index data; use the
3683 @code{texindex} program to convert these files to sorted index files.
3684 (@xref{Format/Print Hardcopy}, for more information.)@refill
3685 @end ignore
3688 @node Contents, File End, Printing Indices & Menus, Ending a File
3689 @comment  node-name,  next,  previous,  up
3690 @section Generating a Table of Contents
3691 @cindex Table of contents
3692 @cindex Contents, Table of
3693 @findex contents
3694 @findex summarycontents
3695 @findex shortcontents
3697 The @code{@@chapter}, @code{@@section}, and other structuring commands
3698 supply the information to make up a table of contents, but they do not
3699 cause an actual table to appear in the manual.  To do this, you must
3700 use the @code{@@contents} and @code{@@summarycontents}
3701 commands:@refill
3703 @table @code
3704 @item @@contents
3705 Generate a table of contents in a printed manual, including all
3706 chapters, sections, subsections, etc., as well as appendices and
3707 unnumbered chapters.  (Headings generated by the @code{@@heading}
3708 series of commands do not appear in the table of contents.)  The
3709 @code{@@contents} command should be written on a line by
3710 itself.@refill
3712 @item @@shortcontents
3713 @itemx @@summarycontents
3714 (@code{@@summarycontents} is a synonym for @code{@@shortcontents}; the
3715 two commands are exactly the same.)@refill
3717 Generate a short or summary table of contents that lists only the
3718 chapters (and appendices and unnumbered chapters).  Omit sections, subsections
3719 and subsubsections.  Only a long manual needs a short table
3720 of contents in addition to the full table of contents.@refill
3722 Write the @code{@@shortcontents} command on a line by itself right
3723 @emph{before} the @code{@@contents} command.@refill
3724 @end table
3726 The table of contents commands automatically generate a chapter-like
3727 heading at the top of the first table of contents page.  Write the table
3728 of contents commands at the very end of a Texinfo file, just before the
3729 @code{@@bye} command, following any index sections---anything in the
3730 Texinfo file after the table of contents commands will be omitted from
3731 the table of contents.@refill
3733 When you print a manual with a table of contents, the table of
3734 contents are printed last and numbered with roman numerals.  You need
3735 to place those pages in their proper place, after the title page,
3736 yourself.  (This is the only collating you need to do for a printed
3737 manual.  The table of contents is printed last because it is generated
3738 after the rest of the manual is typeset.)@refill
3740 @need 700
3741 Here is an example of where to write table of contents commands:@refill
3743 @example
3744 @group
3745 @var{indices}@dots{}
3746 @@shortcontents
3747 @@contents
3748 @@bye
3749 @end group
3750 @end example
3752 Since an Info file uses menus instead of tables of contents, the Info
3753 formatting commands ignore the @code{@@contents} and
3754 @code{@@shortcontents} commands.@refill
3756 @node File End,  , Contents, Ending a File
3757 @comment  node-name,  next,  previous,  up
3758 @section @code{@@bye} File Ending
3759 @findex bye
3761 An @code{@@bye} command terminates @TeX{} or Info formatting.  None of
3762 the formatting commands see any of the file following @code{@@bye}.
3763 The @code{@@bye} command should be on a line by itself.@refill
3765 If you wish, you may follow the @code{@@bye} line with notes. These notes
3766 will not be formatted and will not appear in either Info or a printed
3767 manual; it is as if text after @code{@@bye} were within @code{@@ignore}
3768 @dots{} @code{@@end ignore}.  Also, you may follow the @code{@@bye} line
3769 with a local variables list.  @xref{Compile-Command, , Using Local
3770 Variables and the Compile Command}, for more information.@refill
3772 @node Structuring, Nodes, Ending a File, Top
3773 @comment  node-name,  next,  previous,  up
3774 @chapter Chapter Structuring
3775 @cindex Chapter structuring
3776 @cindex Structuring of chapters
3778 The @dfn{chapter structuring} commands divide a document into a hierarchy of
3779 chapters, sections, subsections, and subsubsections.  These commands
3780 generate large headings; they also provide information for the table
3781 of contents of a printed manual (@pxref{Contents, , Generating a Table
3782 of Contents}).@refill
3784 The chapter structuring commands do not create an Info node structure,
3785 so normally you should put an @code{@@node} command immediately before
3786 each chapter structuring command (@pxref{Nodes}).  The only time you
3787 are likely to use the chapter structuring commands without using the
3788 node structuring commands is if you are writing a document that
3789 contains no cross references and will never be transformed into Info
3790 format.@refill
3792 It is unlikely that you will ever write a Texinfo file that is
3793 intended only as an Info file and not as a printable document.  If you
3794 do, you might still use chapter structuring commands to create a
3795 heading at the top of each node---but you don't need to.@refill
3797 @menu
3798 * Tree Structuring::            A manual is like an upside down tree @dots{}
3799 * Structuring Command Types::   How to divide a manual into parts.
3800 * makeinfo top::                The @code{@@top} command, part of the `Top' node.
3801 * chapter::                     
3802 * unnumbered & appendix::       
3803 * majorheading & chapheading::  
3804 * section::                     
3805 * unnumberedsec appendixsec heading::  
3806 * subsection::                  
3807 * unnumberedsubsec appendixsubsec subheading::  
3808 * subsubsection::               Commands for the lowest level sections.
3809 * Raise/lower sections::        How to change commands' hierarchical level.
3810 @end menu
3812 @node Tree Structuring, Structuring Command Types, Structuring, Structuring
3813 @comment  node-name,  next,  previous,  up
3814 @section Tree Structure of Sections
3815 @cindex Tree structuring
3817 A Texinfo file is usually structured like a book with chapters,
3818 sections, subsections, and the like.  This structure can be visualized
3819 as a tree (or rather as an upside-down tree) with the root at the top
3820 and the levels corresponding to chapters, sections, subsection, and
3821 subsubsections.@refill
3823 Here is a diagram that shows a Texinfo file with three chapters,
3824 each of which has two sections.@refill
3826 @example
3827 @group
3828                           Top
3829                            |
3830          -------------------------------------
3831         |                  |                  |
3832      Chapter 1          Chapter 2          Chapter 3
3833         |                  |                  |
3834      --------           --------           --------
3835     |        |         |        |         |        |
3836  Section  Section   Section  Section   Section  Section
3837    1.1      1.2       2.1      2.2       3.1      3.2
3839 @end group
3840 @end example
3842 In a Texinfo file that has this structure, the beginning of Chapter 2
3843 looks like this:@refill
3845 @example
3846 @group
3847 @@node    Chapter 2,  Chapter 3, Chapter 1, top
3848 @@chapter Chapter 2
3849 @end group
3850 @end example
3852 The chapter structuring commands are described in the sections that
3853 follow; the @code{@@node} and @code{@@menu} commands are described in
3854 following chapters. (@xref{Nodes}, and see @ref{Menus}.)@refill
3856 @node Structuring Command Types, makeinfo top, Tree Structuring, Structuring
3857 @comment  node-name,  next,  previous,  up
3858 @section Types of Structuring Commands
3860 The chapter structuring commands fall into four groups or series, each
3861 of which contains structuring commands corresponding to the
3862 hierarchical levels of chapters, sections, subsections, and
3863 subsubsections.@refill
3865 The four groups are the @code{@@chapter} series, the
3866 @code{@@unnumbered} series, the @code{@@appendix} series, and the
3867 @code{@@heading} series.@refill
3869 Each command produces titles that have a different appearance on the
3870 printed page or Info file; only some of the commands produce
3871 titles that are listed in the table of contents of a printed book or
3872 manual.@refill
3874 @itemize @bullet
3875 @item
3876 The @code{@@chapter} and @code{@@appendix} series of commands produce
3877 numbered or lettered entries both in the body of a printed work and in
3878 its table of contents.@refill
3880 @item
3881 The @code{@@unnumbered} series of commands produce unnumbered entries
3882 both in the body of a printed work and in its table of contents.  The
3883 @code{@@top} command, which has a special use, is a member of this
3884 series (@pxref{makeinfo top, , @code{@@top}}).@refill
3886 @item
3887 The @code{@@heading} series of commands produce unnumbered headings
3888 that do not appear in a table of contents.  The heading commands never
3889 start a new page.@refill
3891 @item
3892 The @code{@@majorheading} command produces results similar to using
3893 the @code{@@chapheading} command but generates a larger vertical
3894 whitespace before the heading.@refill
3896 @item
3897 When an @code{@@setchapternewpage} command says to do so, the
3898 @code{@@chapter}, @code{@@unnumbered}, and @code{@@appendix} commands
3899 start new pages in the printed manual; the @code{@@heading} commands
3900 do not.@refill
3901 @end itemize
3903 @need 1000
3904 Here are the four groups of chapter structuring commands:@refill
3906 @c Slightly different formatting for regular sized books and smallbooks.
3907 @ifset smallbook
3908 @sp 1
3909 @tex
3910 {\let\rm=\indrm \let\tt=\indtt
3911 \halign{\hskip\itemindent#\hfil&  \hskip.5em#\hfil&  \hskip.5em#\hfil&
3912 \hskip.5em#\hfil\cr
3914 & & &                                                \rm No new pages\cr
3915 \rm Numbered&    \rm Unnumbered&  \rm Lettered and numbered& \rm Unnumbered\cr
3916 \rm In contents&  \rm In contents&  \rm In contents&  \rm Not in contents\cr
3918 & & & \cr
3919  &              \tt  @@top&            &               \tt @@majorheading\cr
3920 \tt @@chapter& \tt @@unnumbered&    \tt @@appendix&     \tt @@chapheading\cr
3921 \tt @@section&   \tt @@unnumberedsec&   \tt @@appendixsec&   \tt @@heading\cr
3922 \tt @@subsection&\tt @@unnumberedsubsec&\tt @@appendixsubsec&
3923 \tt @@subheading\cr
3924 \tt @@subsubsection& \tt @@unnumberedsubsubsec& \tt @@appendixsubsubsec&
3925 \tt @@subsubheading\cr}}
3926 @end tex
3927 @end ifset
3928 @ifclear smallbook
3929 @sp 1
3930 @tex
3931 \vbox{
3932 \halign{\hskip\itemindent\hskip.5em#\hfil&  \hskip.5em#\hfil&
3933 \hskip.5em#\hfil& \hskip.5em #\hfil\cr
3935 & & & \cr
3936 & & &                                                \rm No new pages\cr
3937 \rm Numbered&    \rm Unnumbered&  \rm Lettered and numbered& \rm Unnumbered\cr
3938 \rm In contents&  \rm In contents&  \rm In contents&  \rm Not in contents\cr
3940 & & & \cr
3941  &              \tt  @@top&            &               \tt @@majorheading\cr
3942 \tt @@chapter& \tt @@unnumbered&    \tt @@appendix&     \tt @@chapheading\cr
3943 \tt @@section&   \tt @@unnumberedsec&   \tt @@appendixsec&   \tt @@heading\cr
3944 \tt @@subsection&\tt @@unnumberedsubsec&\tt @@appendixsubsec&
3945 \tt @@subheading\cr
3946 \tt @@subsubsection& \tt @@unnumberedsubsubsec& \tt @@appendixsubsubsec&
3947 \tt @@subsubheading\cr}}
3948 @end tex
3949 @end ifclear
3950 @ifinfo
3951 @example
3952 @group
3953                                                        @r{No new pages}
3954 @r{Numbered}       @r{Unnumbered}       @r{Lettered and numbered}  @r{Unnumbered}
3955 @r{In contents}    @r{In contents}          @r{In contents}        @r{Not in contents}
3957                @@top                                    @@majorheading
3958 @@chapter       @@unnumbered          @@appendix          @@chapheading
3959 @@section       @@unnumberedsec       @@appendixsec       @@heading
3960 @@subsection    @@unnumberedsubsec    @@appendixsubsec    @@subheading
3961 @@subsubsection @@unnumberedsubsubsec @@appendixsubsubsec @@subsubheading
3962 @end group
3963 @end example
3964 @end ifinfo
3966 @c Cannot line up columns properly inside of an example because of roman
3967 @c proportional fonts.
3968 @ignore
3969 @ifset smallbook
3970 @iftex
3971 @smallexample
3972 @group
3973                                                        @r{No new pages}
3974 @r{Numbered}      @r{Unnumbered}       @r{Lettered and numbered}  @r{Unnumbered}
3975 @r{In contents}      @r{In contents}           @r{In contents}         @r{Not in contents}
3977                @@top                                    @@majorheading
3978 @@chapter       @@unnumbered          @@appendix          @@chapheading
3979 @@section       @@unnumberedsec       @@appendixsec       @@heading
3980 @@subsection    @@unnumberedsubsec    @@appendixsubsec    @@subheading
3981 @@subsubsection @@unnumberedsubsubsec @@appendixsubsubsec @@subsubheading
3982 @end group
3983 @end smallexample
3984 @end iftex
3985 @end ifset
3986 @ifclear smallbook
3987 @iftex
3988 @smallexample
3989 @group
3990                                                       @r{No new pages}
3991 @r{Numbered}      @r{Unnumbered}       @r{Lettered and numbered}  @r{Unnumbered}
3992 @r{In contents}      @r{In contents}           @r{In contents}         @r{Not in contents}
3994                @@top                                    @@majorheading
3995 @@chapter       @@unnumbered          @@appendix          @@chapheading
3996 @@section       @@unnumberedsec       @@appendixsec       @@heading
3997 @@subsection    @@unnumberedsubsec    @@appendixsubsec    @@subheading
3998 @@subsubsection @@unnumberedsubsubsec @@appendixsubsubsec @@subsubheading
3999 @end group
4000 @end smallexample
4001 @end iftex
4002 @end ignore
4004 @node makeinfo top, chapter, Structuring Command Types, Structuring
4005 @comment  node-name,  next,  previous,  up
4006 @section @code{@@top}
4008 The @code{@@top} command is a special sectioning command that you use
4009 only after an @samp{@@node Top} line at the beginning of a Texinfo file.
4010 The @code{@@top} command tells the @code{makeinfo} formatter
4011 which node is the `Top'
4012 node.  It has the same typesetting effect as @code{@@unnumbered}
4013 (@pxref{unnumbered & appendix, , @code{@@unnumbered}, @code{@@appendix}}).
4014 For detailed information, see
4015 @ref{makeinfo top command, , The @code{@@top} Command}.@refill
4017 @node chapter, unnumbered & appendix, makeinfo top, Structuring
4018 @comment  node-name,  next,  previous,  up
4019 @section @code{@@chapter}
4020 @findex chapter
4022 @code{@@chapter} identifies a chapter in the document.  Write the
4023 command at the beginning of a line and follow it on the same line by
4024 the title of the chapter.@refill
4026 For example, this chapter in this manual is entitled ``Chapter
4027 Structuring''; the @code{@@chapter} line looks like this:@refill
4029 @example
4030 @@chapter Chapter Structuring
4031 @end example
4033 In @TeX{}, the @code{@@chapter} command creates a chapter in the
4034 document, specifying the chapter title.  The chapter is numbered
4035 automatically.@refill
4037 In Info, the @code{@@chapter} command causes the title to appear on a
4038 line by itself, with a line of asterisks inserted underneath.  Thus,
4039 in Info, the above example produces the following output:@refill
4041 @example
4042 Chapter Structuring
4043 *******************
4044 @end example
4046 @findex centerchap
4047 Texinfo also provides a command @code{@@centerchap}, which is analogous
4048 to @code{@@unnumbered}, but centers its argument in the printed output.
4049 This kind of stylistic choice is not usually offered by Texinfo.
4050 @c but the Hacker's Dictionary wanted it ...
4053 @node unnumbered & appendix, majorheading & chapheading, chapter, Structuring
4054 @comment  node-name,  next,  previous,  up
4055 @section @code{@@unnumbered}, @code{@@appendix}
4056 @findex unnumbered
4057 @findex appendix
4059 Use the @code{@@unnumbered} command to create a chapter that appears
4060 in a printed manual without chapter numbers of any kind.  Use the
4061 @code{@@appendix} command to create an appendix in a printed manual
4062 that is labelled by letter instead of by number.@refill
4064 For Info file output, the @code{@@unnumbered} and @code{@@appendix}
4065 commands are equivalent to @code{@@chapter}: the title is printed on a
4066 line by itself with a line of asterisks underneath.  (@xref{chapter, ,
4067 @code{@@chapter}}.)@refill
4069 To create an appendix or an unnumbered chapter, write an
4070 @code{@@appendix} or @code{@@unnumbered} command at the beginning of a
4071 line and follow it on the same line by the title, as you would if you
4072 were creating a chapter.@refill
4075 @node majorheading & chapheading, section, unnumbered & appendix, Structuring
4076 @section @code{@@majorheading}, @code{@@chapheading}
4077 @findex majorheading
4078 @findex chapheading
4080 The @code{@@majorheading} and @code{@@chapheading} commands put
4081 chapter-like headings in the body of a document.@refill
4083 However, neither command causes @TeX{} to produce a numbered heading
4084 or an entry in the table of contents; and neither command causes
4085 @TeX{} to start a new page in a printed manual.@refill
4087 In @TeX{}, an @code{@@majorheading} command generates a larger vertical
4088 whitespace before the heading than an @code{@@chapheading} command but
4089 is otherwise the same.@refill
4091 In Info,
4092 the @code{@@majorheading} and
4093 @code{@@chapheading} commands are equivalent to
4094 @code{@@chapter}: the title is printed on a line by itself with a line
4095 of asterisks underneath.  (@xref{chapter, , @code{@@chapter}}.)@refill
4097 @node section, unnumberedsec appendixsec heading, majorheading & chapheading, Structuring
4098 @comment  node-name,  next,  previous,  up
4099 @section @code{@@section}
4100 @findex section
4102 In a printed manual, an @code{@@section} command identifies a
4103 numbered section within a chapter.  The section title appears in the
4104 table of contents.  In Info, an @code{@@section} command provides a
4105 title for a segment of text, underlined with @samp{=}.@refill
4107 This section is headed with an @code{@@section} command and looks like
4108 this in the Texinfo file:@refill
4110 @example
4111 @@section @@code@{@@@@section@}
4112 @end example
4114 To create a section, write the @code{@@section} command at the
4115 beginning of a line and follow it on the same line by the section
4116 title.@refill
4118 Thus,
4120 @example
4121 @@section This is a section
4122 @end example
4124 @noindent
4125 produces
4127 @example
4128 @group
4129 This is a section
4130 =================
4131 @end group
4132 @end example
4134 @noindent
4135 in Info.
4137 @node unnumberedsec appendixsec heading, subsection, section, Structuring
4138 @comment  node-name,  next,  previous,  up
4139 @section @code{@@unnumberedsec}, @code{@@appendixsec}, @code{@@heading}
4140 @findex unnumberedsec
4141 @findex appendixsec
4142 @findex heading
4144 The @code{@@unnumberedsec}, @code{@@appendixsec}, and @code{@@heading}
4145 commands are, respectively, the unnumbered, appendix-like, and
4146 heading-like equivalents of the @code{@@section} command.
4147 (@xref{section, , @code{@@section}}.)@refill
4149 @table @code
4150 @item @@unnumberedsec
4151 The @code{@@unnumberedsec} command may be used within an
4152 unnumbered chapter or within a regular chapter or appendix to
4153 provide an unnumbered section.@refill
4155 @item @@appendixsec
4156 @itemx @@appendixsection
4157 @code{@@appendixsection} is a longer spelling of the
4158 @code{@@appendixsec} command; the two are synonymous.@refill
4159 @findex appendixsection
4161 Conventionally, the @code{@@appendixsec} or @code{@@appendixsection}
4162 command is used only within appendices.@refill
4164 @item @@heading
4165 You may use the @code{@@heading} command anywhere you wish for a
4166 section-style heading that will not appear in the table of contents.@refill
4167 @end table
4169 @node subsection, unnumberedsubsec appendixsubsec subheading, unnumberedsec appendixsec heading, Structuring
4170 @comment  node-name,  next,  previous,  up
4171 @section The @code{@@subsection} Command
4172 @findex subsection
4174 Subsections are to sections as sections are to chapters.
4175 (@xref{section, , @code{@@section}}.)  In Info, subsection titles are
4176 underlined with @samp{-}.  For example,@refill
4178 @example
4179 @@subsection This is a subsection
4180 @end example
4182 @noindent
4183 produces
4185 @example
4186 @group
4187 This is a subsection
4188 --------------------
4189 @end group
4190 @end example
4192 In a printed manual, subsections are listed in the table of contents
4193 and are numbered three levels deep.@refill
4195 @node unnumberedsubsec appendixsubsec subheading, subsubsection, subsection, Structuring
4196 @comment  node-name,  next,  previous,  up
4197 @section The @code{@@subsection}-like Commands
4198 @cindex Subsection-like commands
4199 @findex unnumberedsubsec
4200 @findex appendixsubsec
4201 @findex subheading
4203 The @code{@@unnumberedsubsec}, @code{@@appendixsubsec}, and
4204 @code{@@subheading} commands are, respectively, the unnumbered,
4205 appendix-like, and heading-like equivalents of the @code{@@subsection}
4206 command.  (@xref{subsection, , @code{@@subsection}}.)@refill
4208 In Info, the @code{@@subsection}-like commands generate a title
4209 underlined with hyphens.  In a printed manual, an @code{@@subheading}
4210 command produces a heading like that of a subsection except that it is
4211 not numbered and does not appear in the table of contents.  Similarly,
4212 an @code{@@unnumberedsubsec} command produces an unnumbered heading like
4213 that of a subsection and an @code{@@appendixsubsec} command produces a
4214 subsection-like heading labelled with a letter and numbers; both of
4215 these commands produce headings that appear in the table of
4216 contents.@refill
4218 @node subsubsection, Raise/lower sections, unnumberedsubsec appendixsubsec subheading, Structuring
4219 @comment  node-name,  next,  previous,  up
4220 @section The `subsub' Commands
4221 @cindex Subsub commands
4222 @findex subsubsection
4223 @findex unnumberedsubsubsec
4224 @findex appendixsubsubsec
4225 @findex subsubheading
4227 The fourth and lowest level sectioning commands in Texinfo are the
4228 `subsub' commands.  They are:@refill
4230 @table @code
4231 @item @@subsubsection
4232 Subsubsections are to subsections as subsections are to sections.
4233 (@xref{subsection, , @code{@@subsection}}.)  In a printed manual,
4234 subsubsection titles appear in the table of contents and are numbered
4235 four levels deep.@refill
4237 @item @@unnumberedsubsubsec
4238 Unnumbered subsubsection titles appear in the table of contents of a
4239 printed manual, but lack numbers.  Otherwise, unnumbered
4240 subsubsections are the same as subsubsections.  In Info, unnumbered
4241 subsubsections look exactly like ordinary subsubsections.@refill
4243 @item @@appendixsubsubsec
4244 Conventionally, appendix commands are used only for appendices and are
4245 lettered and numbered appropriately in a printed manual.  They also
4246 appear in the table of contents.  In Info, appendix subsubsections look
4247 exactly like ordinary subsubsections.@refill
4249 @item @@subsubheading
4250 The @code{@@subsubheading} command may be used anywhere that you need
4251 a small heading that will not appear in the table of contents.  In
4252 Info, subsubheadings look exactly like ordinary subsubsection
4253 headings.@refill
4254 @end table
4256 In Info,  `subsub' titles are underlined with periods.
4257 For example,@refill
4259 @example
4260 @@subsubsection This is a subsubsection
4261 @end example
4263 @noindent
4264 produces
4266 @example
4267 @group
4268 This is a subsubsection
4269 .......................
4270 @end group
4271 @end example
4273 @node Raise/lower sections,  , subsubsection, Structuring
4274 @comment  node-name,  next,  previous,  up
4275 @section @code{@@raisesections} and @code{@@lowersections}
4276 @findex raisesections
4277 @findex lowersections
4278 @cindex Raising and lowering sections
4279 @cindex Sections, raising and lowering
4281 The @code{@@raisesections} and @code{@@lowersections} commands raise and
4282 lower the hierarchical level of chapters, sections, subsections and the
4283 like.  The @code{@@raisesections} command changes sections to chapters,
4284 subsections to sections, and so on.  The @code{@@lowersections} command
4285 changes chapters to sections, sections to subsections, and so on.
4287 @cindex Include files, and section levels
4288 An @code{@@lowersections} command is useful if you wish to include text
4289 that is written as an outer or standalone Texinfo file in another
4290 Texinfo file as an inner, included file.  If you write the command at
4291 the beginning of the file, all your @code{@@chapter} commands are
4292 formatted as if they were @code{@@section} commands, all your
4293 @code{@@section} command are formatted as if they were
4294 @code{@@subsection} commands, and so on.
4296 @need 1000
4297 @code{@@raisesections} raises a command one level in the chapter
4298 structuring hierarchy:@refill
4300 @example
4301 @group
4302   @r{Change}           @r{To}
4304 @@subsection     @@section,
4305 @@section        @@chapter,
4306 @@heading        @@chapheading,
4307           @r{etc.}
4308 @end group
4309 @end example
4311 @need 1000
4312 @code{@@lowersections} lowers a command one level in the chapter
4313 structuring hierarchy:@refill
4315 @example
4316 @group
4317   @r{Change}           @r{To}
4319 @@chapter        @@section,
4320 @@subsection     @@subsubsection,
4321 @@heading        @@subheading,
4322           @r{etc.}
4323 @end group
4324 @end example
4326 An @code{@@raisesections} or @code{@@lowersections} command changes only
4327 those structuring commands that follow the command in the Texinfo file.
4328 Write an @code{@@raisesections} or @code{@@lowersections} command on a
4329 line of its own.
4331 An @code{@@lowersections} command cancels an @code{@@raisesections}
4332 command, and vice versa.  Typically, the commands are used like this:
4334 @example
4335 @@lowersections
4336 @@include somefile.texi
4337 @@raisesections
4338 @end example
4340 Without the @code{@@raisesections}, all the subsequent sections in your
4341 document will be lowered.
4343 Repeated use of the commands continue to raise or lower the hierarchical
4344 level a step at a time.
4346 An attempt to raise above `chapters' reproduces chapter commands; an
4347 attempt to lower below `subsubsections' reproduces subsubsection
4348 commands.
4350 @node Nodes, Menus, Structuring, Top
4351 @comment  node-name,  next,  previous,  up
4352 @chapter Nodes
4354 @dfn{Nodes} are the primary segments of a Texinfo file.  They do not
4355 themselves impose a hierarchic or any other kind of structure on a file.
4356 Nodes contain @dfn{node pointers} that name other nodes, and can contain
4357 @dfn{menus} which are lists of nodes.  In Info, the movement commands
4358 can carry you to a pointed-to node or to a node listed in a menu.  Node
4359 pointers and menus provide structure for Info files just as chapters,
4360 sections, subsections, and the like, provide structure for printed
4361 books.@refill
4363 @menu
4364 * Two Paths::                   Different commands to structure
4365                                   Info output and printed output.
4366 * Node Menu Illustration::      A diagram, and sample nodes and menus.
4367 * node::                        How to write a node, in detail.
4368 * makeinfo Pointer Creation::   How to create node pointers with @code{makeinfo}.
4369 @end menu
4371 @node Two Paths, Node Menu Illustration, Nodes, Nodes
4372 @ifinfo
4373 @heading Two Paths
4374 @end ifinfo
4376 The node and menu commands and the chapter structuring commands are
4377 independent of each other:
4379 @itemize @bullet
4380 @item
4381 In Info, node and menu commands provide structure.  The chapter
4382 structuring commands generate headings with different kinds of
4383 underlining---asterisks for chapters, hyphens for sections, and so on;
4384 they do nothing else.@refill
4386 @item
4387 In @TeX{}, the chapter structuring commands generate chapter and section
4388 numbers and tables of contents.  The node and menu commands provide
4389 information for cross references; they do nothing else.@refill
4390 @end itemize
4392 You can use node pointers and menus to structure an Info file any way
4393 you want; and you can write a Texinfo file so that its Info output has a
4394 different structure than its printed output.  However, most Texinfo
4395 files are written such that the structure for the Info output
4396 corresponds to the structure for the printed output.  It is not
4397 convenient to do otherwise.@refill
4399 Generally, printed output is structured in a tree-like hierarchy in
4400 which the chapters are the major limbs from which the sections branch
4401 out.  Similarly, node pointers and menus are organized to create a
4402 matching structure in the Info output.@refill
4404 @node Node Menu Illustration, node, Two Paths, Nodes
4405 @comment  node-name,  next,  previous,  up
4406 @section Node and Menu Illustration
4408 Here is a copy of the diagram shown earlier that illustrates a Texinfo
4409 file with three chapters, each of which contains two sections.@refill
4411 Note that the ``root'' is at the top of the diagram and the ``leaves''
4412 are at the bottom.  This is how such a diagram is drawn conventionally;
4413 it illustrates an upside-down tree.  For this reason, the root node is
4414 called the `Top' node, and `Up' node pointers carry you closer to the
4415 root.@refill
4417 @example
4418 @group
4419                           Top
4420                            |
4421          -------------------------------------
4422         |                  |                  |
4423      Chapter 1          Chapter 2          Chapter 3
4424         |                  |                  |
4425      --------           --------           --------
4426     |        |         |        |         |        |
4427  Section  Section   Section  Section   Section  Section
4428    1.1      1.2       2.1      2.2       3.1      3.2
4430 @end group
4431 @end example
4433 Write the beginning of the node for Chapter 2 like this:@refill
4435 @example
4436 @group
4437 @@node     Chapter 2,  Chapter 3, Chapter 1, top
4438 @@comment  node-name,  next,      previous,  up
4439 @end group
4440 @end example
4442 @noindent
4443 This @code{@@node} line says that the name of this node is ``Chapter 2'', the
4444 name of the `Next' node is ``Chapter 3'', the name of the `Previous'
4445 node is ``Chapter 1'', and the name of the `Up' node is ``Top''.
4447 @quotation
4448 @strong{Please Note:} `Next' refers to the next node at the same
4449 hierarchical level in the manual, not necessarily to the next node
4450 within the Texinfo file.  In the Texinfo file, the subsequent node may
4451 be at a lower level---a section-level node may follow a chapter-level
4452 node, and a subsection-level node may follow a section-level node.
4453 `Next' and `Previous' refer to nodes at the @emph{same} hierarchical
4454 level.  (The `Top' node contains the exception to this rule.  Since the
4455 `Top' node is the only node at that level, `Next' refers to the first
4456 following node, which is almost always a chapter or chapter-level
4457 node.)@refill
4458 @end quotation
4460 To go to Sections 2.1 and 2.2 using Info, you need a menu inside Chapter
4461 2.  (@xref{Menus}.)  You would write the menu just
4462 before the beginning of Section 2.1, like this:@refill
4464 @example
4465 @group
4466     @@menu
4467     * Sect. 2.1::    Description of this section.
4468     * Sect. 2.2::
4469     @@end menu
4470 @end group
4471 @end example
4473 Write the node for Sect. 2.1 like this:@refill
4475 @example
4476 @group
4477     @@node     Sect. 2.1, Sect. 2.2, Chapter 2, Chapter 2
4478     @@comment  node-name, next,      previous,  up
4479 @end group
4480 @end example
4482 In Info format, the `Next' and `Previous' pointers of a node usually
4483 lead to other nodes at the same level---from chapter to chapter or from
4484 section to section (sometimes, as shown, the `Previous' pointer points
4485 up); an `Up' pointer usually leads to a node at the level above (closer
4486 to the `Top' node); and a `Menu' leads to nodes at a level below (closer
4487 to `leaves').  (A cross reference can point to a node at any level;
4488 see @ref{Cross References}.)@refill
4490 Usually, an @code{@@node} command and a chapter structuring command are
4491 used in sequence, along with indexing commands.  (You may follow the
4492 @code{@@node} line with a comment line that reminds you which pointer is
4493 which.)@refill
4495 Here is the beginning of the chapter in this manual called ``Ending a
4496 Texinfo File''.  This shows an @code{@@node} line followed by a comment
4497 line, an @code{@@chapter} line, and then by indexing lines.@refill
4499 @example
4500 @group
4501 @@node    Ending a File, Structuring, Beginning a File, Top
4502 @@comment node-name,     next,        previous,         up
4503 @@chapter Ending a Texinfo File
4504 @@cindex Ending a Texinfo file
4505 @@cindex Texinfo file ending
4506 @@cindex File ending
4507 @end group
4508 @end example
4510 @node node, makeinfo Pointer Creation, Node Menu Illustration, Nodes
4511 @comment  node-name,  next,  previous,  up
4512 @section The @code{@@node} Command
4514 @cindex Node, defined
4515 A @dfn{node} is a segment of text that begins at an @code{@@node}
4516 command and continues until the next @code{@@node} command.  The
4517 definition of node is different from that for chapter or section.  A
4518 chapter may contain sections and a section may contain subsections;
4519 but a node cannot contain subnodes; the text of a node continues only
4520 until the next @code{@@node} command in the file.  A node usually
4521 contains only one chapter structuring command, the one that follows
4522 the @code{@@node} line.  On the other hand, in printed output nodes
4523 are used only for cross references, so a chapter or section may
4524 contain any number of nodes.  Indeed, a chapter usually contains
4525 several nodes, one for each section, subsection, and
4526 subsubsection.@refill
4528 To create a node, write an @code{@@node} command at the beginning of a
4529 line, and follow it with four arguments, separated by commas, on the
4530 rest of the same line.  These arguments are the name of the node, and
4531 the names of the `Next', `Previous', and `Up' pointers, in that order.
4532 You may insert spaces before each pointer if you wish; the spaces are
4533 ignored.  You must write the name of the node, and the names of the
4534 `Next', `Previous', and `Up' pointers, all on the same line.  Otherwise,
4535 the formatters fail.  (@inforef{Top, info, info}, for more information
4536 about nodes in Info.)@refill
4538 Usually, you write one of the chapter-structuring command lines
4539 immediately after an @code{@@node} line---for example, an
4540 @code{@@section} or @code{@@subsection} line.  (@xref{Structuring
4541 Command Types, , Types of Structuring Commands}.)@refill
4543 @quotation
4544 @strong{Please note:} The GNU Emacs Texinfo mode updating commands work
4545 only with Texinfo files in which @code{@@node} lines are followed by chapter
4546 structuring lines.  @xref{Updating Requirements}.@refill
4547 @end quotation
4549 @TeX{} uses @code{@@node} lines to identify the names to use for cross
4550 references.  For this reason, you must write @code{@@node} lines in a
4551 Texinfo file that you intend to format for printing, even if you do not
4552 intend to format it for Info.  (Cross references, such as the one at the
4553 end of this sentence, are made with @code{@@xref} and its related
4554 commands; see @ref{Cross References}.)@refill
4556 @menu
4557 * Node Names::                  How to choose node and pointer names.
4558 * Writing a Node::              How to write an @code{@@node} line.
4559 * Node Line Tips::              Keep names short.
4560 * Node Line Requirements::      Keep names unique, without @@-commands.
4561 * First Node::                  How to write a `Top' node.
4562 * makeinfo top command::        How to use the @code{@@top} command.
4563 * Top Node Summary::            Write a brief description for readers.
4564 @end menu
4566 @node Node Names, Writing a Node, node, node
4567 @ifinfo
4568 @subheading Choosing Node and Pointer Names
4569 @end ifinfo
4571 The name of a node identifies the node.  The pointers enable
4572 you to reach other nodes and consist of the names of those nodes.@refill
4574 Normally, a node's `Up' pointer contains the name of the node whose menu
4575 mentions that node.  The node's `Next' pointer contains the name of the
4576 node that follows that node in that menu and its `Previous' pointer
4577 contains the name of the node that precedes it in that menu.  When a
4578 node's `Previous' node is the same as its `Up' node, both node pointers
4579 name the same node.@refill
4581 Usually, the first node of a Texinfo file is the `Top' node, and its
4582 `Up' and `Previous' pointers point to the @file{dir} file, which
4583 contains the main menu for all of Info.@refill
4585 The `Top' node itself contains the main or master menu for the manual.
4586 Also, it is helpful to include a brief description of the manual in the
4587 `Top' node.  @xref{First Node}, for information on how to write the
4588 first node of a Texinfo file.@refill
4590 @node Writing a Node, Node Line Tips, Node Names, node
4591 @comment  node-name,  next,  previous,  up
4592 @subsection How to Write an @code{@@node} Line
4593 @cindex Writing an @code{@@node} line
4594 @cindex @code{@@node} line writing
4595 @cindex Node line writing
4597 The easiest way to write an @code{@@node} line is to write @code{@@node}
4598 at the beginning of a line and then the name of the node, like
4599 this:@refill
4601 @example
4602 @@node @var{node-name}
4603 @end example
4605 If you are using GNU Emacs, you can use the update node commands
4606 provided by Texinfo mode to insert the names of the pointers; or you
4607 can leave the pointers out of the Texinfo file and let @code{makeinfo}
4608 insert node pointers into the Info file it creates.  (@xref{Texinfo
4609 Mode}, and @ref{makeinfo Pointer Creation}.)@refill
4611 Alternatively, you can insert the `Next', `Previous', and `Up'
4612 pointers yourself.  If you do this, you may find it helpful to use the
4613 Texinfo mode keyboard command @kbd{C-c C-c n}.  This command inserts
4614 @samp{@@node} and a comment line listing the names of the pointers in
4615 their proper order.  The comment line helps you keep track of which
4616 arguments are for which pointers.  This comment line is especially useful
4617 if you are not familiar with Texinfo.@refill
4619 The template for a node line with `Next', `Previous', and `Up' pointers
4620 looks like this:@refill
4622 @example
4623 @@node @var{node-name}, @var{next}, @var{previous}, @var{up}
4624 @end example
4626 If you wish, you can ignore @code{@@node} lines altogether in your first
4627 draft and then use the @code{texinfo-insert-node-lines} command to
4628 create @code{@@node} lines for you.  However, we do not
4629 recommend this practice.  It is better to name the node itself
4630 at the same time that you
4631 write a segment so you can easily make cross references.  A large number
4632 of cross references are an especially important feature of a good Info
4633 file.@refill
4635 After you have inserted an @code{@@node} line, you should immediately
4636 write an @@-command for the chapter or section and insert its name.
4637 Next (and this is important!), put in several index entries.  Usually,
4638 you will find at least two and often as many as four or five ways of
4639 referring to the node in the index.  Use them all.  This will make it
4640 much easier for people to find the node.@refill
4642 @node Node Line Tips, Node Line Requirements, Writing a Node, node
4643 @comment  node-name,  next,  previous,  up
4644 @subsection @code{@@node} Line Tips
4646 Here are three suggestions:
4648 @itemize @bullet
4649 @item
4650 Try to pick node names that are informative but short.@refill
4652 In the Info file, the file name, node name, and pointer names are all
4653 inserted on one line, which may run into the right edge of the window.
4654 (This does not cause a problem with Info, but is ugly.)@refill
4656 @item
4657 Try to pick node names that differ from each other near the beginnings
4658 of their names.  This way, it is easy to use automatic name completion in
4659 Info.@refill
4661 @item
4662 By convention, node names are capitalized just as they would be for
4663 section or chapter titles---initial and significant words are
4664 capitalized; others are not.@refill
4665 @end itemize
4667 @node Node Line Requirements, First Node, Node Line Tips, node
4668 @comment  node-name,  next,  previous,  up
4669 @subsection @code{@@node} Line Requirements
4671 @cindex Node line requirements
4672 Here are several requirements for @code{@@node} lines:
4674 @itemize @bullet
4675 @cindex Unique nodename requirement
4676 @cindex Nodename must be unique
4677 @item
4678 All the node names for a single Info file must be unique.@refill
4680 Duplicates confuse the Info movement commands.  This means, for
4681 example, that if you end every chapter with a summary, you must name
4682 each summary node differently.  You cannot just call each one
4683 ``Summary''.  You may, however, duplicate the titles of chapters, sections,
4684 and the like.  Thus you can end each chapter in a book with a section
4685 called ``Summary'', so long as the node names for those sections are all
4686 different.@refill
4688 @item
4689 A pointer name must be the name of a node.@refill
4691 The node to which a pointer points may come before or after the
4692 node containing the pointer.@refill
4694 @cindex @@-command in nodename
4695 @cindex Nodename, cannot contain
4696 @item
4697 You cannot use any of the Texinfo @@-commands in a node name;
4698 @w{@@-commands} confuse Info.@refill
4700 @need 750
4701 Thus, the beginning of the section called @code{@@chapter} looks like
4702 this:@refill
4704 @smallexample
4705 @group
4706 @@node  chapter, unnumbered & appendix, makeinfo top, Structuring
4707 @@comment  node-name,  next,  previous,  up
4708 @@section @@code@{@@@@chapter@}
4709 @@findex chapter
4710 @end group
4711 @end smallexample
4713 @cindex Comma in nodename
4714 @cindex Apostrophe in nodename
4715 @item
4716 You cannot use commas or apostrophes within a node name; these
4717 confuse @TeX{} or the Info formatters.@refill
4719 @need 700
4720 For example, the following is a section title:
4722 @smallexample
4723 @@code@{@@@@unnumberedsec@}, @@code@{@@@@appendixsec@}, @@code@{@@@@heading@}
4724 @end smallexample
4726 @noindent
4727 The corresponding node name is:
4729 @smallexample
4730 unnumberedsec appendixsec heading
4731 @end smallexample
4733 @cindex Case in nodename
4734 @item
4735 Case is significant.
4736 @end itemize
4739 @node First Node, makeinfo top command, Node Line Requirements, node
4740 @comment  node-name,  next,  previous,  up
4741 @subsection The First Node
4742 @cindex Top node is first
4743 @cindex First node
4745 The first node of a Texinfo file is the @dfn{Top} node, except in an
4746 included file (@pxref{Include Files}).  The Top node contains the main
4747 or master menu for the document, and a short summary of the document
4748 (@pxref{Top Node Summary}).
4750 @cindex Up node of Top node
4751 @cindex (dir) as Up node of Top node
4752 The Top node (which must be named @samp{top} or @samp{Top}) should have
4753 as its `Up' node the name of a node in another file, where there is a
4754 menu that leads to this file.  Specify the file name in parentheses.  If
4755 the file is to be installed directly in the Info directory file, use
4756 @samp{(dir)} as the parent of the Top node; this is short for
4757 @samp{(dir)top}, and specifies the Top node in the @file{dir} file,
4758 which contains the main menu for the Info system as a whole.  For
4759 example, the @code{@@node Top} line of this manual looks like this:
4761 @example
4762 @@node Top, Copying, , (dir)
4763 @end example
4765 @noindent
4766 (You can use the Texinfo updating commands or the @code{makeinfo}
4767 utility to insert these pointers automatically.)
4769 @cindex Previous node of Top node
4770 Do not define the `Previous' node of the Top node to be @samp{(dir)}, as
4771 it causes confusing behavior for users: if you are in the Top node and
4772 hits @key{DEL} to go backwards, you wind up in the middle of the
4773 some other entry in the @file{dir} file, which has nothing to do with
4774 what you were reading.
4776 @xref{Install an Info File}, for more information about installing
4777 an Info file in the @file{info} directory.
4780 @node makeinfo top command, Top Node Summary, First Node, node
4781 @comment  node-name,  next,  previous,  up
4782 @subsection The @code{@@top} Sectioning Command
4783 @findex top @r{(@@-command)}
4785 A special sectioning command, @code{@@top}, has been created for use
4786 with the @code{@@node Top} line.  The @code{@@top} sectioning command tells
4787 @code{makeinfo} that it marks the `Top' node in the file.  It provides
4788 the information that @code{makeinfo} needs to insert node
4789 pointers automatically.  Write the @code{@@top} command at the
4790 beginning of the line immediately following the @code{@@node Top}
4791 line.  Write the title on the remaining part of the same line as the
4792 @code{@@top} command.@refill
4794 In Info, the @code{@@top} sectioning command causes the title to appear on a
4795 line by itself, with a line of asterisks inserted underneath.@refill
4797 In @TeX{} and @code{texinfo-format-buffer}, the @code{@@top}
4798 sectioning command is merely a synonym for @code{@@unnumbered}.
4799 Neither of these formatters require an @code{@@top} command, and do
4800 nothing special with it.  You can use @code{@@chapter} or
4801 @code{@@unnumbered} after the @code{@@node Top} line when you use
4802 these formatters.  Also, you can use @code{@@chapter} or
4803 @code{@@unnumbered} when you use the Texinfo updating commands to
4804 create or update pointers and menus.@refill
4807 @node Top Node Summary,  , makeinfo top command, node
4808 @subsection The `Top' Node Summary
4809 @cindex @samp{@r{Top}} node summary
4811 You can help readers by writing a summary in the `Top' node, after the
4812 @code{@@top} line, before the main or master menu.  The summary should
4813 briefly describe the document.  In Info, this summary will appear just
4814 before the master menu.  In a printed manual, this summary will appear
4815 on a page of its own.@refill
4817 If you do not want the summary to appear on a page of its own in a
4818 printed manual, you can enclose the whole of the `Top' node, including
4819 the @code{@@node Top} line and the @code{@@top} sectioning command line
4820 or other sectioning command line between @code{@@ifinfo} and @code{@@end
4821 ifinfo}.  This prevents any of the text from appearing in the printed
4822 output. (@pxref{Conditionals, , Conditionally Visible Text}).  You can
4823 repeat the brief description from the `Top' node within @code{@@iftex}
4824 @dots{} @code{@@end iftex} at the beginning of the first chapter, for
4825 those who read the printed manual.  This saves paper and may look
4826 neater.@refill
4828 You should write the version number of the program to which the manual
4829 applies in the summary.  This helps the reader keep track of which
4830 manual is for which version of the program.  If the manual changes more
4831 frequently than the program or is independent of it, you should also
4832 include an edition number for the manual.  (The title page should also
4833 contain this information: see @ref{titlepage, ,
4834 @code{@@titlepage}}.)@refill
4836 @node makeinfo Pointer Creation,  , node, Nodes
4837 @section Creating Pointers with @code{makeinfo}
4838 @cindex Creating pointers with @code{makeinfo}
4839 @cindex Pointer creation with @code{makeinfo}
4840 @cindex Automatic pointer creation with @code{makeinfo}
4842 The @code{makeinfo} program has a feature for automatically creating
4843 node pointers for a hierarchically organized file that lacks
4844 them.@refill
4846 When you take advantage of this feature, you do not need to write the
4847 `Next', `Previous', and `Up' pointers after the name of a node.
4848 However, you must write a sectioning command, such as @code{@@chapter}
4849 or @code{@@section}, on the line immediately following each truncated
4850 @code{@@node} line.  You cannot write a comment line after a node
4851 line; the section line must follow it immediately.@refill
4853 In addition, you must follow the `Top' @code{@@node} line with a line beginning
4854 with @code{@@top} to mark the `Top' node in the file. @xref{makeinfo
4855 top, , @code{@@top}}.
4857 Finally, you must write the name of each node (except for the `Top'
4858 node) in a menu that is one or more hierarchical levels above the
4859 node's hierarchical level.@refill
4861 This node pointer insertion feature in @code{makeinfo} is an
4862 alternative to the menu and pointer creation and update commands in
4863 Texinfo mode.  (@xref{Updating Nodes and Menus}.)  It is especially
4864 helpful to people who do not use GNU Emacs for writing Texinfo
4865 documents.@refill
4867 @node Menus, Cross References, Nodes, Top
4868 @comment  node-name,  next,  previous,          up
4869 @chapter Menus
4870 @cindex Menus
4871 @findex menu
4873 @dfn{Menus} contain pointers to subordinate
4874 nodes.@footnote{Menus can carry you to any node, regardless
4875 of the hierarchical structure; even to nodes in a different
4876 Info file.  However, the GNU Emacs Texinfo mode updating
4877 commands work only to create menus of subordinate nodes.
4878 Conventionally, cross references are used to refer to other
4879 nodes.} In Info, you use menus to go to such nodes.  Menus
4880 have no effect in printed manuals and do not appear in
4881 them.@refill
4883 By convention, a menu is put at the end of a node since a reader who
4884 uses the menu may not see text that follows it.@refill
4886 @ifinfo
4887 A node that has a menu should @emph{not} contain much text.  If you
4888 have a lot of text and a menu, move most of the text into a new
4889 subnode---all but a few lines.@refill
4890 @end ifinfo
4891 @iftex
4892 @emph{A node that has a menu should not contain much text.} If you
4893 have a lot of text and a menu, move most of the text into a new
4894 subnode---all but a few lines.  Otherwise, a reader with a terminal
4895 that displays only a few lines may miss the menu and its associated
4896 text.  As a practical matter, you should locate a menu within 20 lines
4897 of the beginning of the node.@refill
4898 @end iftex
4900 @menu
4901 * Menu Location::               Put a menu in a short node.
4902 * Writing a Menu::              What is a menu?
4903 * Menu Parts::                  A menu entry has three parts.
4904 * Less Cluttered Menu Entry::   Two part menu entry.
4905 * Menu Example::                Two and three part menu entries.
4906 * Other Info Files::            How to refer to a different Info file.
4907 @end menu
4909 @node Menu Location, Writing a Menu, Menus, Menus
4910 @ifinfo
4911 @heading Menus Need Short Nodes
4912 @end ifinfo
4913 @cindex Menu location
4914 @cindex Location of menus
4915 @cindex Nodes for menus are short
4916 @cindex Short nodes for menus
4918 @ifinfo
4919 A reader can easily see a menu that is close to the beginning of the
4920 node.  The node should be short.  As a practical matter, you should
4921 locate a menu within 20 lines of the beginning of the node.
4922 Otherwise, a reader with a terminal that displays only a few lines may
4923 miss the menu and its associated text.@refill
4924 @end ifinfo
4926 The short text before a menu may look awkward in a printed manual.  To
4927 avoid this, you can write a menu near the beginning of its node and
4928 follow the menu by an @code{@@node} line, and then an @code{@@heading}
4929 line located within @code{@@ifinfo} and @code{@@end ifinfo}.  This way,
4930 the menu, @code{@@node} line, and title appear only in the Info file,
4931 not the printed document.@refill
4933 For example, the preceding two paragraphs follow an Info-only menu,
4934 @code{@@node} line, and heading, and look like this:@refill
4936 @example
4937 @group
4938 @@menu
4939 * Menu Location::             Put a menu in a short node.
4940 * Writing a Menu::            What is a menu?
4941 * Menu Parts::                A menu entry has three parts.
4942 * Less Cluttered Menu Entry:: Two part menu entry.
4943 * Menu Example::              Two and three part entries.
4944 * Other Info Files::          How to refer to a different
4945                                 Info file.
4946 @@end menu
4948 @@node Menu Location, Writing a Menu, , Menus
4949 @@ifinfo
4950 @@heading Menus Need Short Nodes
4951 @@end ifinfo
4952 @end group
4953 @end example
4955 The Texinfo file for this document contains more than a dozen
4956 examples of this procedure.  One is at the beginning of this chapter;
4957 another is at the beginning of the ``Cross References'' chapter.@refill
4959 @node Writing a Menu, Menu Parts, Menu Location, Menus
4960 @section Writing a Menu
4961 @cindex Writing a menu
4962 @cindex Menu writing
4964 A menu consists of an @code{@@menu} command on a line by
4965 itself followed by menu entry lines or menu comment lines
4966 and then by an @code{@@end menu} command on a line by
4967 itself.@refill
4969 A menu looks like this:@refill
4971 @example
4972 @group
4973 @@menu
4974 Larger Units of Text
4976 * Files::                       All about handling files.
4977 * Multiples: Buffers.           Multiple buffers; editing
4978                                   several files at once.
4979 @@end menu
4980 @end group
4981 @end example
4983 In a menu, every line that begins with an @w{@samp{* }} is a
4984 @dfn{menu entry}.  (Note the space after the asterisk.)  A
4985 line that does not start with an @w{@samp{* }} may also
4986 appear in a menu.  Such a line is not a menu entry but is a
4987 menu comment line that appears in the Info file.  In
4988 the example above, the line @samp{Larger Units of Text} is a
4989 menu comment line; the two lines starting with @w{@samp{* }}
4990 are menu entries.
4992 @node Menu Parts, Less Cluttered Menu Entry, Writing a Menu, Menus
4993 @section The Parts of a Menu
4994 @cindex Parts of a menu
4995 @cindex Menu parts
4996 @cindex @code{@@menu} parts
4998 A menu entry has three parts, only the second of which is required:
5000 @enumerate
5001 @item
5002 The menu entry name (optional).
5004 @item
5005 The name of the node (required).
5007 @item
5008 A description of the item (optional).
5009 @end enumerate
5011 The template for a menu entry looks like this:@refill
5013 @example
5014 * @var{menu-entry-name}: @var{node-name}.   @var{description}
5015 @end example
5017 Follow the menu entry name with a single colon and follow the node name
5018 with tab, comma, period, or newline.@refill
5020 In Info, a user selects a node with the @kbd{m} (@code{Info-menu})
5021 command.  The menu entry name is what the user types after the @kbd{m}
5022 command.@refill
5024 The third part of a menu entry is a descriptive phrase or sentence.
5025 Menu entry names and node names are often short; the description
5026 explains to the reader what the node is about.  A useful description
5027 complements the node name rather than repeats it.  The description,
5028 which is optional, can spread over two or more lines; if it does, some
5029 authors prefer to indent the second line while others prefer to align it
5030 with the first (and all others).  It's up to you.
5033 @node Less Cluttered Menu Entry, Menu Example, Menu Parts, Menus
5034 @comment  node-name,  next,  previous,  up
5035 @section Less Cluttered Menu Entry
5036 @cindex Two part menu entry
5037 @cindex Double-colon menu entries
5038 @cindex Menu entries with two colons
5039 @cindex Less cluttered menu entry
5040 @cindex Uncluttered menu entry
5042 When the menu entry name and node name are the same, you can write
5043 the name immediately after the asterisk and space at the beginning of
5044 the line and follow the name with two colons.@refill
5046 @need 800
5047 For example, write
5049 @example
5050 * Name::                                    @var{description}
5051 @end example
5053 @need 800
5054 @noindent
5055 instead of
5057 @example
5058 * Name: Name.                               @var{description}
5059 @end example
5061 You should use the node name for the menu entry name whenever possible,
5062 since it reduces visual clutter in the menu.@refill
5064 @node Menu Example, Other Info Files, Less Cluttered Menu Entry, Menus
5065 @comment  node-name,  next,  previous,  up
5066 @section A Menu Example
5067 @cindex Menu example
5068 @cindex Example menu
5070 A menu looks like this in Texinfo:@refill
5072 @example
5073 @group
5074 @@menu
5075 * menu entry name: Node name.   A short description.
5076 * Node name::                   This form is preferred.
5077 @@end menu
5078 @end group
5079 @end example
5081 @need 800
5082 @noindent
5083 This produces:
5085 @example
5086 @group
5087 * menu:
5089 * menu entry name: Node name.   A short description.
5090 * Node name::                   This form is preferred.
5091 @end group
5092 @end example
5094 @need 700
5095 Here is an example as you might see it in a Texinfo file:@refill
5097 @example
5098 @group
5099 @@menu
5100 Larger Units of Text
5102 * Files::                       All about handling files.
5103 * Multiples: Buffers.           Multiple buffers; editing
5104                                   several files at once.
5105 @@end menu
5106 @end group
5107 @end example
5109 @need 800
5110 @noindent
5111 This produces:
5113 @example
5114 @group
5115 * menu:
5116 Larger Units of Text
5118 * Files::                       All about handling files.
5119 * Multiples: Buffers.           Multiple buffers; editing
5120                                   several files at once.
5121 @end group
5122 @end example
5124 In this example, the menu has two entries.  @samp{Files} is both a menu
5125 entry name and the name of the node referred to by that name.
5126 @samp{Multiples} is the menu entry name; it refers to the node named
5127 @samp{Buffers}. The line @samp{Larger Units of Text} is a comment; it
5128 appears in the menu, but is not an entry.@refill
5130 Since no file name is specified with either @samp{Files} or
5131 @samp{Buffers}, they must be the names of nodes in the same Info file
5132 (@pxref{Other Info Files, , Referring to Other Info Files}).@refill
5134 @node Other Info Files,  , Menu Example, Menus
5135 @comment  node-name,  next,  previous,  up
5136 @section Referring to Other Info Files
5137 @cindex Referring to other Info files
5138 @cindex Nodes in other Info files
5139 @cindex Other Info files' nodes
5140 @cindex Going to other Info files' nodes
5141 @cindex Info; other files' nodes
5143 You can create a menu entry that enables a reader in Info to go to a
5144 node in another Info file by writing the file name in parentheses just
5145 before the node name.  In this case, you should use the three-part menu
5146 entry format, which saves the reader from having to type the file
5147 name.@refill
5149 @need 800
5150 The format looks like this:@refill
5152 @example
5153 @group
5154 @@menu
5155 * @var{first-entry-name}:(@var{filename})@var{nodename}.     @var{description}
5156 * @var{second-entry-name}:(@var{filename})@var{second-node}. @var{description}
5157 @@end menu
5158 @end group
5159 @end example
5161 For example, to refer directly to the @samp{Outlining} and
5162 @samp{Rebinding} nodes in the @cite{Emacs Manual}, you would write a
5163 menu like this:@refill
5165 @example
5166 @group
5167 @@menu
5168 * Outlining: (emacs)Outline Mode. The major mode for
5169                                   editing outlines.
5170 * Rebinding: (emacs)Rebinding.    How to redefine the
5171                                   meaning of a key.
5172 @@end menu
5173 @end group
5174 @end example
5176 If you do not list the node name, but only name the file, then Info
5177 presumes that you are referring to the `Top' node.@refill
5179 The @file{dir} file that contains the main menu for Info has menu
5180 entries that list only file names.  These take you directly to the `Top'
5181 nodes of each Info document.  (@xref{Install an Info File}.)@refill
5183 @need 700
5184 For example:
5186 @example
5187 @group
5188 * Info: (info).         Documentation browsing system.
5189 * Emacs: (emacs).       The extensible, self-documenting
5190                         text editor.
5191 @end group
5192 @end example
5194 @noindent
5195 (The @file{dir} top level directory for the Info system is an Info file,
5196 not a Texinfo file, but a menu entry looks the same in both types of
5197 file.)@refill
5199 Note that the GNU Emacs Texinfo mode menu updating commands only work
5200 with nodes within the current buffer, so you cannot use them to create
5201 menus that refer to other files.  You must write such menus by hand.@refill
5203 @node Cross References, Marking Text, Menus, Top
5204 @comment  node-name,  next,  previous,  up
5205 @chapter Cross References
5206 @cindex Making cross references
5207 @cindex Cross references
5208 @cindex References
5210 @dfn{Cross references} are used to refer the reader to other parts of the
5211 same or different Texinfo files.  In Texinfo, nodes are the
5212 places to which cross references can refer.@refill
5214 @menu
5215 * References::                  What cross references are for.
5216 * Cross Reference Commands::    A summary of the different commands.
5217 * Cross Reference Parts::       A cross reference has several parts.
5218 * xref::                        Begin a reference with `See' @dots{}
5219 * Top Node Naming::             How to refer to the beginning of another file.
5220 * ref::                         A reference for the last part of a sentence.
5221 * pxref::                       How to write a parenthetical cross reference.
5222 * inforef::                     How to refer to an Info-only file.
5223 * uref::                        How to refer to a uniform resource locator.
5224 @end menu
5226 @node References, Cross Reference Commands, Cross References, Cross References
5227 @ifinfo
5228 @heading What References Are For
5229 @end ifinfo
5231 Often, but not always, a printed document should be designed so that
5232 it can be read sequentially.  People tire of flipping back and forth
5233 to find information that should be presented to them as they need
5234 it.@refill
5236 However, in any document, some information will be too detailed for
5237 the current context, or incidental to it; use cross references to
5238 provide access to such information.  Also, an on-line help system or a
5239 reference manual is not like a novel; few read such documents in
5240 sequence from beginning to end.  Instead, people look up what they
5241 need.  For this reason, such creations should contain many cross
5242 references to help readers find other information that they may not
5243 have read.@refill
5245 In a printed manual, a cross reference results in a page reference,
5246 unless it is to another manual altogether, in which case the cross
5247 reference names that manual.@refill
5249 In Info, a cross reference results in an entry that you can follow using
5250 the Info @samp{f} command.  (@inforef{Help-Adv, Some advanced Info
5251 commands, info}.)@refill
5253 The various cross reference commands use nodes to define cross
5254 reference locations.  This is evident in Info, in which a cross
5255 reference takes you to the specified node.  @TeX{} also uses nodes to
5256 define cross reference locations, but the action is less obvious.  When
5257 @TeX{} generates a DVI file, it records nodes' page numbers and
5258 uses the page numbers in making references.  Thus, if you are writing
5259 a manual that will only be printed, and will not be used on-line, you
5260 must nonetheless write @code{@@node} lines to name the places to which
5261 you make cross references.@refill
5263 @need 800
5264 @node Cross Reference Commands, Cross Reference Parts, References, Cross References
5265 @comment  node-name,  next,  previous,  up
5266 @section Different Cross Reference Commands
5267 @cindex Different cross reference commands
5269 There are four different cross reference commands:@refill
5271 @table @code
5272 @item @@xref
5273 Used to start a sentence in the printed manual saying @w{`See @dots{}'}
5274 or an Info cross-reference saying @samp{*Note @var{name}: @var{node}.}.
5276 @item @@ref
5277 Used within or, more often, at the end of a sentence; same as
5278 @code{@@xref} for Info; produces just the reference in the printed
5279 manual without a preceding `See'.@refill
5281 @item @@pxref
5282 Used within parentheses to make a reference that suits both an Info
5283 file and a printed book.  Starts with a lower case `see' within the
5284 printed manual. (@samp{p} is for `parenthesis'.)@refill
5286 @item @@inforef
5287 Used to make a reference to an Info file for which there is no printed
5288 manual.@refill
5289 @end table
5291 @noindent
5292 (The @code{@@cite} command is used to make references to books and
5293 manuals for which there is no corresponding Info file and, therefore,
5294 no node to which to point.   @xref{cite, , @code{@@cite}}.)@refill
5296 @node Cross Reference Parts, xref, Cross Reference Commands, Cross References
5297 @comment  node-name,  next,  previous,  up
5298 @section Parts of a Cross Reference
5299 @cindex Cross reference parts
5300 @cindex Parts of a cross reference
5302 A cross reference command requires only one argument, which is the
5303 name of the node to which it refers.  But a cross reference command
5304 may contain up to four additional arguments.  By using these
5305 arguments, you can provide a cross reference name for Info, a topic
5306 description or section title for the printed output, the name of a
5307 different Info file, and the name of a different printed
5308 manual.@refill
5310 Here is a simple cross reference example:@refill
5312 @example
5313 @@xref@{Node name@}.
5314 @end example
5316 @noindent
5317 which produces
5319 @example
5320 *Note Node name::.
5321 @end example
5323 @noindent
5326 @quotation
5327 See Section @var{nnn} [Node name], page @var{ppp}.
5328 @end quotation
5330 @need 700
5331 Here is an example of a full five-part cross reference:@refill
5333 @example
5334 @group
5335 @@xref@{Node name, Cross Reference Name, Particular Topic,
5336 info-file-name, A Printed Manual@}, for details.
5337 @end group
5338 @end example
5340 @noindent
5341 which produces
5343 @example
5344 *Note Cross Reference Name: (info-file-name)Node name,
5345 for details.
5346 @end example
5348 @noindent
5349 in Info and
5351 @quotation
5352 See section ``Particular Topic'' in @i{A Printed Manual}, for details.
5353 @end quotation
5355 @noindent
5356 in a printed book.
5358 The five possible arguments for a cross reference are:@refill
5360 @enumerate
5361 @item
5362 The node name (required).  This is the node to which the
5363 cross reference takes you.  In a printed document, the location of the
5364 node provides the page reference only for references within the same
5365 document.@refill
5367 @item
5368 The cross reference name for the Info reference, if it is to be different
5369 from the node name.  If you include this argument, it becomes
5370 the first part of the cross reference.  It is usually omitted.@refill
5372 @item
5373 A topic description or section name.  Often, this is the title of the
5374 section.  This is used as the name of the reference in the printed
5375 manual.  If omitted, the node name is used.@refill
5377 @item
5378 The name of the Info file in which the reference is located, if it is
5379 different from the current file.  You need not include any @samp{.info}
5380 suffix on the file name, since Info readers try appending it
5381 automatically.
5383 @item
5384 The name of a printed manual from a different Texinfo file.@refill
5385 @end enumerate
5387 The template for a full five argument cross reference looks like
5388 this:@refill
5390 @example
5391 @group
5392 @@xref@{@var{node-name}, @var{cross-reference-name}, @var{title-or-topic},
5393 @var{info-file-name}, @var{printed-manual-title}@}.
5394 @end group
5395 @end example
5397 Cross references with one, two, three, four, and five arguments are
5398 described separately following the description of @code{@@xref}.@refill
5400 Write a node name in a cross reference in exactly the same way as in
5401 the @code{@@node} line, including the same capitalization; otherwise, the
5402 formatters may not find the reference.@refill
5404 You can write cross reference commands within a paragraph, but note
5405 how Info and @TeX{} format the output of each of the various commands:
5406 write @code{@@xref} at the beginning of a sentence; write
5407 @code{@@pxref} only within parentheses, and so on.@refill
5409 @node xref, Top Node Naming, Cross Reference Parts, Cross References
5410 @comment  node-name,  next,  previous,  up
5411 @section @code{@@xref}
5412 @findex xref
5413 @cindex Cross references using @code{@@xref}
5414 @cindex References using @code{@@xref}
5416 The @code{@@xref} command generates a cross reference for the
5417 beginning of a sentence.  The Info formatting commands convert it into
5418 an Info cross reference, which the Info @samp{f} command can use to
5419 bring you directly to another node.  The @TeX{} typesetting commands
5420 convert it into a page reference, or a reference to another book or
5421 manual.@refill
5423 @menu
5424 * Reference Syntax::            What a reference looks like and requires.
5425 * One Argument::                @code{@@xref} with one argument.
5426 * Two Arguments::               @code{@@xref} with two arguments.
5427 * Three Arguments::             @code{@@xref} with three arguments.
5428 * Four and Five Arguments::     @code{@@xref} with four and five arguments.
5429 @end menu
5431 @node Reference Syntax, One Argument, xref, xref
5432 @ifinfo
5433 @subheading What a Reference Looks Like and Requires
5434 @end ifinfo
5436 Most often, an Info cross reference looks like this:@refill
5438 @example
5439 *Note @var{node-name}::.
5440 @end example
5442 @noindent
5443 or like this
5445 @example
5446 *Note @var{cross-reference-name}: @var{node-name}.
5447 @end example
5449 @noindent
5450 In @TeX{}, a cross reference looks like this:
5452 @example
5453 See Section @var{section-number} [@var{node-name}], page @var{page}.
5454 @end example
5456 @noindent
5457 or like this
5459 @example
5460 See Section @var{section-number} [@var{title-or-topic}], page @var{page}.
5461 @end example
5463 The @code{@@xref} command does not generate a period or comma to end
5464 the cross reference in either the Info file or the printed output.
5465 You must write that period or comma yourself; otherwise, Info will not
5466 recognize the end of the reference.  (The @code{@@pxref} command works
5467 differently.  @xref{pxref, , @code{@@pxref}}.)@refill
5469 @quotation
5470 @strong{Please note:} A period or comma @strong{must} follow the closing
5471 brace of an @code{@@xref}.  It is required to terminate the cross
5472 reference.  This period or comma will appear in the output, both in
5473 the Info file and in the printed manual.@refill
5474 @end quotation
5476 @code{@@xref} must refer to an Info node by name.  Use @code{@@node}
5477 to define the node (@pxref{Writing a Node}).@refill
5479 @code{@@xref} is followed by several arguments inside braces, separated by
5480 commas.  Whitespace before and after these commas is ignored.@refill
5482 A cross reference requires only the name of a node; but it may contain
5483 up to four additional arguments.  Each of these variations produces a
5484 cross reference that looks somewhat different.@refill
5486 @quotation
5487 @strong{Please note:} Commas separate arguments in a cross reference;
5488 avoid including them in the title or other part lest the formatters
5489 mistake them for separators.@refill
5490 @end quotation
5492 @node One Argument, Two Arguments, Reference Syntax, xref
5493 @subsection @code{@@xref} with One Argument
5495 The simplest form of @code{@@xref} takes one argument, the name of
5496 another node in the same Info file.    The Info formatters produce
5497 output that the Info readers can use to jump to the reference; @TeX{}
5498 produces output that specifies the page and section number for you.@refill
5500 @need 700
5501 @noindent
5502 For example,
5504 @example
5505 @@xref@{Tropical Storms@}.
5506 @end example
5508 @noindent
5509 produces
5511 @example
5512 *Note Tropical Storms::.
5513 @end example
5515 @noindent
5518 @quotation
5519 See Section 3.1 [Tropical Storms], page 24.
5520 @end quotation
5522 @noindent
5523 (Note that in the preceding example the closing brace is followed by a
5524 period.)@refill
5526 You can write a clause after the cross reference, like this:@refill
5528 @example
5529 @@xref@{Tropical Storms@}, for more info.
5530 @end example
5532 @noindent
5533 which produces
5535 @example
5536 *Note Tropical Storms::, for more info.
5537 @end example
5539 @quotation
5540 See Section 3.1 [Tropical Storms], page 24, for more info.
5541 @end quotation
5543 @noindent
5544 (Note that in the preceding example the closing brace is followed by a
5545 comma, and then by the clause, which is followed by a period.)@refill
5547 @node Two Arguments, Three Arguments, One Argument, xref
5548 @subsection @code{@@xref} with Two Arguments
5550 With two arguments, the second is used as the name of the Info cross
5551 reference, while the first is still the name of the node to which the
5552 cross reference points.@refill
5554 @need 750
5555 @noindent
5556 The template is like this:
5558 @example
5559 @@xref@{@var{node-name}, @var{cross-reference-name}@}.
5560 @end example
5562 @need 700
5563 @noindent
5564 For example,
5566 @example
5567 @@xref@{Electrical Effects, Lightning@}.
5568 @end example
5570 @noindent
5571 produces:
5573 @example
5574 *Note Lightning: Electrical Effects.
5575 @end example
5577 @noindent
5580 @quotation
5581 See Section 5.2 [Electrical Effects], page 57.
5582 @end quotation
5584 @noindent
5585 (Note that in the preceding example the closing brace is followed by a
5586 period; and that the node name is printed, not the cross reference name.)@refill
5588 You can write a clause after the cross reference, like this:@refill
5590 @example
5591 @@xref@{Electrical Effects, Lightning@}, for more info.
5592 @end example
5594 @noindent
5595 which produces
5596 @example
5597 *Note Lightning: Electrical Effects, for more info.
5598 @end example
5600 @noindent
5603 @quotation
5604 See Section 5.2 [Electrical Effects], page 57, for more info.
5605 @end quotation
5607 @noindent
5608 (Note that in the preceding example the closing brace is followed by a
5609 comma, and then by the clause, which is followed by a period.)@refill
5611 @node Three Arguments, Four and Five Arguments, Two Arguments, xref
5612 @subsection @code{@@xref} with Three Arguments
5614 A third argument replaces the node name in the @TeX{} output.  The third
5615 argument should be the name of the section in the printed output, or
5616 else state the topic discussed by that section.  Often, you will want to
5617 use initial upper case letters so it will be easier to read when the
5618 reference is printed.  Use a third argument when the node name is
5619 unsuitable because of syntax or meaning.@refill
5621 Remember to avoid placing a comma within the title or topic section of
5622 a cross reference, or within any other section.  The formatters divide
5623 cross references into arguments according to the commas; a comma
5624 within a title or other section will divide it into two arguments.  In
5625 a reference, you need to write a title such as ``Clouds, Mist, and
5626 Fog'' without the commas.@refill
5628 Also, remember to write a comma or period after the closing brace of a
5629 @code{@@xref} to terminate the cross reference.  In the following
5630 examples, a clause follows a terminating comma.@refill
5633 @need 750
5634 @noindent
5635 The template is like this:
5637 @example
5638 @group
5639 @@xref@{@var{node-name}, @var{cross-reference-name}, @var{title-or-topic}@}.
5640 @end group
5641 @end example
5643 @need 700
5644 @noindent
5645 For example,
5647 @example
5648 @group
5649 @@xref@{Electrical Effects, Lightning, Thunder and Lightning@},
5650 for details.
5651 @end group
5652 @end example
5654 @noindent
5655 produces
5657 @example
5658 *Note Lightning: Electrical Effects, for details.
5659 @end example
5661 @noindent
5664 @quotation
5665 See Section 5.2 [Thunder and Lightning], page 57, for details.
5666 @end quotation
5668 If a third argument is given and the second one is empty, then the
5669 third argument serves both.  (Note how two commas, side by side, mark
5670 the empty second argument.)@refill
5672 @example
5673 @group
5674 @@xref@{Electrical Effects, , Thunder and Lightning@},
5675 for details.
5676 @end group
5677 @end example
5679 @noindent
5680 produces
5682 @example
5683 *Note Thunder and Lightning: Electrical Effects, for details.
5684 @end example
5686 @noindent
5689 @quotation
5690 See Section 5.2 [Thunder and Lightning], page 57, for details.
5691 @end quotation
5693 As a practical matter, it is often best to write cross references with
5694 just the first argument if the node name and the section title are the
5695 same, and with the first and third arguments if the node name and title
5696 are different.@refill
5698 Here are several examples from @cite{The GNU Awk User's Guide}:@refill
5700 @smallexample
5701 @@xref@{Sample Program@}.
5702 @@xref@{Glossary@}.
5703 @@xref@{Case-sensitivity, ,Case-sensitivity in Matching@}.
5704 @@xref@{Close Output, , Closing Output Files and Pipes@},
5705    for more information.
5706 @@xref@{Regexp, , Regular Expressions as Patterns@}.
5707 @end smallexample
5709 @node Four and Five Arguments,  , Three Arguments, xref
5710 @subsection @code{@@xref} with Four and Five Arguments
5712 In a cross reference, a fourth argument specifies the name of another
5713 Info file, different from the file in which the reference appears, and
5714 a fifth argument specifies its title as a printed manual.@refill
5716 Remember that a comma or period must follow the closing brace of an
5717 @code{@@xref} command to terminate the cross reference.  In the
5718 following examples, a clause follows a terminating comma.@refill
5720 @need 800
5721 @noindent
5722 The template is:
5724 @example
5725 @group
5726 @@xref@{@var{node-name}, @var{cross-reference-name}, @var{title-or-topic},
5727 @var{info-file-name}, @var{printed-manual-title}@}.
5728 @end group
5729 @end example
5731 @need 700
5732 @noindent
5733 For example,
5735 @example
5736 @@xref@{Electrical Effects, Lightning, Thunder and Lightning,
5737 weather, An Introduction to Meteorology@}, for details.
5738 @end example
5740 @noindent
5741 produces
5743 @example
5744 *Note Lightning: (weather)Electrical Effects, for details.
5745 @end example
5747 @noindent
5748 The name of the Info file is enclosed in parentheses and precedes
5749 the name of the node.
5751 @noindent
5752 In a printed manual, the reference looks like this:@refill
5754 @quotation
5755 See section ``Thunder and Lightning'' in @i{An Introduction to
5756 Meteorology}, for details.
5757 @end quotation
5759 @noindent
5760 The title of the printed manual is typeset in italics; and the
5761 reference lacks a page number since @TeX{} cannot know to which page a
5762 reference refers when that reference is to another manual.@refill
5764 Often, you will leave out the second argument when you use the long
5765 version of @code{@@xref}.  In this case, the third argument, the topic
5766 description, will be used as the cross reference name in Info.@refill
5768 @noindent
5769 The template looks like this:
5771 @example
5772 @@xref@{@var{node-name}, , @var{title-or-topic}, @var{info-file-name},
5773 @var{printed-manual-title}@}, for details.
5774 @end example
5776 @noindent
5777 which produces
5779 @example
5780 *Note @var{title-or-topic}: (@var{info-file-name})@var{node-name}, for details.
5781 @end example
5783 @noindent
5786 @quotation
5787 See section @var{title-or-topic} in @var{printed-manual-title}, for details.
5788 @end quotation
5790 @need 700
5791 @noindent
5792 For example,
5794 @example
5795 @@xref@{Electrical Effects, , Thunder and Lightning,
5796 weather, An Introduction to Meteorology@}, for details.
5797 @end example
5799 @noindent
5800 produces
5802 @example
5803 @group
5804 *Note Thunder and Lightning: (weather)Electrical Effects,
5805 for details.
5806 @end group
5807 @end example
5809 @noindent
5812 @quotation
5813 See section ``Thunder and Lightning'' in @i{An Introduction to
5814 Meteorology}, for details.
5815 @end quotation
5817 On rare occasions, you may want to refer to another Info file that
5818 is within a single printed manual---when multiple Texinfo files are
5819 incorporated into the same @TeX{} run but make separate Info files.
5820 In this case, you need to specify only the fourth argument, and not
5821 the fifth.@refill
5823 @node Top Node Naming, ref, xref, Cross References
5824 @section Naming a `Top' Node
5825 @cindex Naming a `Top' Node in references
5826 @cindex @samp{@r{Top}} node naming for references
5828 In a cross reference, you must always name a node.  This means that in
5829 order to refer to a whole manual, you must identify the `Top' node by
5830 writing it as the first argument to the @code{@@xref} command.  (This
5831 is different from the way you write a menu entry; see @ref{Other Info
5832 Files, , Referring to Other Info Files}.)  At the same time, to
5833 provide a meaningful section topic or title in the printed cross
5834 reference (instead of the word `Top'), you must write an appropriate
5835 entry for the third argument to the @code{@@xref} command.
5836 @refill
5838 @noindent
5839 Thus, to make a cross reference to @cite{The GNU Make Manual},
5840 write:@refill
5842 @example
5843 @@xref@{Top, , Overview, make, The GNU Make Manual@}.
5844 @end example
5846 @noindent
5847 which produces
5849 @example
5850 *Note Overview: (make)Top.
5851 @end example
5853 @noindent
5856 @quotation
5857 See section ``Overview'' in @i{The GNU Make Manual}.
5858 @end quotation
5860 @noindent
5861 In this example, @samp{Top} is the name of the first node, and
5862 @samp{Overview} is the name of the first section of the manual.@refill
5863 @node ref, pxref, Top Node Naming, Cross References
5864 @comment  node-name,  next,  previous,  up
5865 @section @code{@@ref}
5866 @cindex Cross references using @code{@@ref}
5867 @cindex References using @code{@@ref}
5868 @findex ref
5870 @code{@@ref} is nearly the same as @code{@@xref} except that it does
5871 not generate a `See' in the printed output, just the reference itself.
5872 This makes it useful as the last part of a sentence.@refill
5874 @need 700
5875 @noindent
5876 For example,
5878 @example
5879 For more information, see @@ref@{Hurricanes@}.
5880 @end example
5882 @noindent
5883 produces
5885 @example
5886 For more information, see *Note Hurricanes.
5887 @end example
5889 @noindent
5892 @quotation
5893 For more information, see Section 8.2 [Hurricanes], page 123.
5894 @end quotation
5896 The @code{@@ref} command sometimes leads writers to express themselves
5897 in a manner that is suitable for a printed manual but looks awkward
5898 in the Info format.  Bear in mind that your audience will be using
5899 both the printed and the Info format.@refill
5901 @need 800
5902 @noindent
5903 For example,
5905 @example
5906 @group
5907 Sea surges are described in @@ref@{Hurricanes@}.
5908 @end group
5909 @end example
5911 @need 800
5912 @noindent
5913 produces
5915 @quotation
5916 Sea surges are described in Section 6.7 [Hurricanes], page 72.
5917 @end quotation
5919 @need 800
5920 @noindent
5921 in a printed document, and the following in Info:
5923 @example
5924 Sea surges are described in *Note Hurricanes::.
5925 @end example
5927 @quotation
5928 @strong{Caution:} You @emph{must} write a period or comma immediately
5929 after an @code{@@ref} command with two or more arguments.  Otherwise,
5930 Info will not find the end of the cross reference entry and its
5931 attempt to follow the cross reference will fail.  As a general rule,
5932 you should write a period or comma after every @code{@@ref} command.
5933 This looks best in both the printed and the Info output.@refill
5934 @end quotation
5936 @node pxref, inforef, ref, Cross References
5937 @comment  node-name,  next,  previous,  up
5938 @section @code{@@pxref}
5939 @cindex Cross references using @code{@@pxref}
5940 @cindex References using @code{@@pxref}
5941 @findex pxref
5943 The parenthetical reference command, @code{@@pxref}, is nearly the
5944 same as @code{@@xref}, but you use it @emph{only} inside parentheses
5945 and you do @emph{not} type a comma or period after the command's
5946 closing brace.  The command differs from @code{@@xref} in two
5947 ways:@refill
5949 @enumerate
5950 @item
5951 @TeX{} typesets the reference for the printed manual with a lower case
5952 `see' rather than an upper case `See'.@refill
5954 @item
5955 The Info formatting commands automatically end the reference with a
5956 closing colon or period.@refill
5957 @end enumerate
5959 Because one type of formatting automatically inserts closing
5960 punctuation and the other does not, you should use @code{@@pxref}
5961 @emph{only} inside parentheses as part of another sentence.  Also, you
5962 yourself should not insert punctuation after the reference, as you do
5963 with @code{@@xref}.@refill
5965 @code{@@pxref} is designed so that the output looks right and works
5966 right between parentheses both in printed output and in an Info file.
5967 In a printed manual, a closing comma or period should not follow a
5968 cross reference within parentheses; such punctuation is wrong.  But in
5969 an Info file, suitable closing punctuation must follow the cross
5970 reference so Info can recognize its end.  @code{@@pxref} spares you
5971 the need to use complicated methods to put a terminator into one form
5972 of the output and not the other.@refill
5974 @noindent
5975 With one argument, a parenthetical cross reference looks like
5976 this:@refill
5978 @example
5979 @dots{} storms cause flooding (@@pxref@{Hurricanes@}) @dots{}
5980 @end example
5982 @need 800
5983 @noindent
5984 which produces
5986 @example
5987 @group
5988 @dots{} storms cause flooding (*Note Hurricanes::) @dots{}
5989 @end group
5990 @end example
5992 @noindent
5995 @quotation
5996 @dots{} storms cause flooding (see Section 6.7 [Hurricanes], page 72) @dots{}
5997 @end quotation
5999 With two arguments, a parenthetical cross reference has this
6000 template:@refill
6002 @example
6003 @dots{} (@@pxref@{@var{node-name}, @var{cross-reference-name}@}) @dots{}
6004 @end example
6006 @noindent
6007 which produces
6009 @example
6010 @dots{} (*Note @var{cross-reference-name}: @var{node-name}.) @dots{}
6011 @end example
6013 @noindent
6016 @need 1500
6017 @quotation
6018 @dots{} (see Section @var{nnn} [@var{node-name}], page @var{ppp}) @dots{}
6019 @end quotation
6021 @code{@@pxref} can be used with up to five arguments just like
6022 @code{@@xref} (@pxref{xref, , @code{@@xref}}).@refill
6024 @quotation
6025 @strong{Please note:} Use @code{@@pxref} only as a parenthetical
6026 reference.  Do not try to use @code{@@pxref} as a clause in a sentence.
6027 It will look bad in either the Info file, the printed output, or
6028 both.@refill
6030 Also, parenthetical cross references look best at the ends of sentences.
6031 Although you may write them in the middle of a sentence, that location
6032 breaks up the flow of text.@refill
6033 @end quotation
6035 @node inforef, uref, pxref, Cross References
6036 @section @code{@@inforef}
6037 @cindex Cross references using @code{@@inforef}
6038 @cindex References using @code{@@inforef}
6039 @findex inforef
6041 @code{@@inforef} is used for cross references to Info files for which
6042 there are no printed manuals.  Even in a printed manual,
6043 @code{@@inforef} generates a reference directing the user to look in
6044 an Info file.@refill
6046 The command takes either two or three arguments, in the following
6047 order:@refill
6049 @enumerate
6050 @item
6051 The node name.
6053 @item
6054 The cross reference name (optional).
6056 @item
6057 The Info file name.
6058 @end enumerate
6060 @noindent
6061 Separate the arguments with commas, as with @code{@@xref}.  Also, you
6062 must terminate the reference with a comma or period after the
6063 @samp{@}}, as you do with @code{@@xref}.@refill
6065 @noindent
6066 The template is:
6068 @example
6069 @@inforef@{@var{node-name}, @var{cross-reference-name}, @var{info-file-name}@},
6070 @end example
6072 @need 800
6073 @noindent
6074 Thus,
6076 @example
6077 @group
6078 @@inforef@{Expert, Advanced Info commands, info@},
6079 for more information.
6080 @end group
6081 @end example
6083 @need 800
6084 @noindent
6085 produces
6087 @example
6088 @group
6089 *Note Advanced Info commands: (info)Expert,
6090 for more information.
6091 @end group
6092 @end example
6094 @need 800
6095 @noindent
6098 @quotation
6099 See Info file @file{info}, node @samp{Expert}, for more information.
6100 @end quotation
6102 @need 800
6103 @noindent
6104 Similarly,
6106 @example
6107 @group
6108 @@inforef@{Expert, , info@}, for more information.
6109 @end group
6110 @end example
6112 @need 800
6113 @noindent
6114 produces
6116 @example
6117 *Note (info)Expert::, for more information.
6118 @end example
6120 @need 800
6121 @noindent
6124 @quotation
6125 See Info file @file{info}, node @samp{Expert}, for more information.
6126 @end quotation
6128 The converse of @code{@@inforef} is @code{@@cite}, which is used to
6129 refer to printed works for which no Info form exists.  @xref{cite, ,
6130 @code{@@cite}}.@refill
6133 @node uref,  , inforef, Cross References
6134 @section @code{@@uref@{@var{url}[, @var{displayed-text}]@}}
6135 @findex uref
6136 @cindex Uniform resource locator, referring to
6137 @cindex URL, referring to
6139 @code{@@uref} produces a reference to a uniform resource locator (URL).
6140 It takes one mandatory argument, the URL, and one optional argument, the
6141 text to display (the default is the URL itself).  In HTML output,
6142 @code{@@uref} produces a link you can follow.  For example:
6144 @example
6145 The official GNU ftp site is
6146 @@uref@{ftp://ftp.gnu.ai.mit.edu/pub/gnu@}
6147 @end example
6149 @noindent produces (in text):
6150 @display
6151 The official GNU ftp site is
6152 @uref{ftp://ftp.gnu.ai.mit.edu/pub/gnu}
6153 @end display
6155 @noindent whereas
6156 @example
6157 The official
6158 @@uref@{ftp://ftp.gnu.ai.mit.edu/pub/gnu,
6159   GNU ftp site@} holds programs and texts.
6160 @end example
6162 @noindent produces (in text):
6163 @display
6164 The official @uref{ftp://ftp.gnu.ai.mit.edu/pub/gnu, GNU ftp site} holds
6165 programs and texts.
6166 @end display
6168 @noindent and (in HTML):
6169 @example
6170 The official <A HREF="ftp://ftp.gnu.ai.mit.edu/pub/gnu">GNU ftp
6171 site</A> holds programs and texts.
6172 @end example
6174 To merely indicate a URL, use @code{@@url} (@pxref{url, @code{@@url}}).
6177 @node Marking Text, Quotations and Examples, Cross References, Top
6178 @comment  node-name,  next,  previous,  up
6179 @chapter Marking Words and Phrases
6180 @cindex Paragraph, marking text within
6181 @cindex Marking words and phrases
6182 @cindex Words and phrases, marking them
6183 @cindex Marking text within a paragraph
6185 In Texinfo, you can mark words and phrases in a variety of ways.
6186 The Texinfo formatters use this information to determine how to
6187 highlight the text.
6188 You can specify, for example, whether a word or phrase is a
6189 defining occurrence, a metasyntactic variable, or a symbol used in a
6190 program.  Also, you can emphasize text.@refill
6192 @menu
6193 * Indicating::                  How to indicate definitions, files, etc.
6194 * Emphasis::                    How to emphasize text.
6195 @end menu
6197 @node Indicating, Emphasis, Marking Text, Marking Text
6198 @comment  node-name,  next,  previous,  up
6199 @section Indicating Definitions, Commands, etc.
6200 @cindex Highlighting text
6201 @cindex Indicating commands, definitions, etc.
6203 Texinfo has commands for indicating just what kind of object a piece of
6204 text refers to.  For example, metasyntactic variables are marked by
6205 @code{@@var}, and code by @code{@@code}.  Since the pieces of text are
6206 labelled by commands that tell what kind of object they are, it is easy
6207 to change the way the Texinfo formatters prepare such text.  (Texinfo is
6208 an @emph{intentional} formatting language rather than a @emph{typesetting}
6209 formatting language.)@refill
6211 For example, in a printed manual,
6212 code is usually illustrated in a typewriter font;
6213 @code{@@code} tells @TeX{} to typeset this text in this font.  But it
6214 would be easy to change the way @TeX{} highlights code to use another
6215 font, and this change would not effect how keystroke examples are
6216 highlighted.  If straight typesetting commands were used in the body
6217 of the file and you wanted to make a change, you would need to check
6218 every single occurrence to make sure that you were changing code and
6219 not something else that should not be changed.@refill
6221 @menu
6222 * Useful Highlighting::         Highlighting provides useful information.
6223 * code::                        How to indicate code.
6224 * kbd::                         How to show keyboard input.
6225 * key::                         How to specify keys.
6226 * samp::                        How to show a literal sequence of characters.
6227 * var::                         How to indicate a metasyntactic variable.
6228 * file::                        How to indicate the name of a file.
6229 * dfn::                         How to specify a definition.
6230 * cite::                        How to refer to a book that is not in Info.
6231 * url::                         How to indicate a world wide web reference.
6232 * email::                       How to indicate an electronic mail address.
6233 @end menu
6235 @node Useful Highlighting, code, Indicating, Indicating
6236 @ifinfo
6237 @subheading Highlighting Commands are Useful
6238 @end ifinfo
6240 The highlighting commands can be used to generate useful information
6241 from the file, such as lists of functions or file names.  It is
6242 possible, for example, to write a program in Emacs Lisp (or a keyboard
6243 macro) to insert an index entry after every paragraph that contains
6244 words or phrases marked by a specified command.  You could do this to
6245 construct an index of functions if you had not already made the
6246 entries.@refill
6248 The commands serve a variety of purposes:@refill
6250 @table @code
6251 @item @@code@{@var{sample-code}@}
6252 Indicate text that is a literal example of a piece of a program.@refill
6254 @item @@kbd@{@var{keyboard-characters}@}
6255 Indicate keyboard input.@refill
6257 @item @@key@{@var{key-name}@}
6258 Indicate the conventional name for a key on a keyboard.@refill
6260 @item @@samp@{@var{text}@}
6261 Indicate text that is a literal example of a sequence of characters.@refill
6263 @item @@var@{@var{metasyntactic-variable}@}
6264 Indicate a metasyntactic variable.@refill
6266 @item @@url@{@var{uniform-resource-locator}@}
6267 Indicate a uniform resource locator for the World Wide Web.
6269 @item @@file@{@var{file-name}@}
6270 Indicate the name of a file.@refill
6272 @item @@email@{@var{email-address}[, @var{displayed-text}]@}
6273 Indicate an electronic mail address.
6275 @item @@dfn@{@var{term}@}
6276 Indicate the introductory or defining use of a term.@refill
6278 @item @@cite@{@var{reference}@}
6279 Indicate the name of a book.@refill
6281 @ignore
6282 @item @@ctrl@{@var{ctrl-char}@}
6283 Use for an @sc{ascii} control character.@refill
6284 @end ignore
6285 @end table
6287 @node code, kbd, Useful Highlighting, Indicating
6288 @comment  node-name,  next,  previous,  up
6289 @subsection @code{@@code}@{@var{sample-code}@}
6290 @findex code
6292 Use the @code{@@code} command to indicate text that is a piece of a
6293 program and which consists of entire syntactic tokens.  Enclose the
6294 text in braces.@refill
6296 Thus, you should use @code{@@code} for an expression in a program, for
6297 the name of a variable or function used in a program, or for a
6298 keyword.  Also, you should use @code{@@code} for the name of a
6299 program, such as @code{diff}, that is a name used in the machine. (You
6300 should write the name of a program in the ordinary text font if you
6301 regard it as a new English word, such as `Emacs' or `Bison'.)@refill
6303 Use @code{@@code} for environment variables such as @code{TEXINPUTS},
6304 and other variables.@refill
6306 Use @code{@@code} for command names in command languages that
6307 resemble programming languages, such as Texinfo or the shell.
6308 For example, @code{@@code} and @code{@@samp} are produced by writing
6309 @samp{@@code@{@@@@code@}} and @samp{@@code@{@@@@samp@}} in the Texinfo
6310 source, respectively.@refill
6312 Note, however, that you should not use @code{@@code} for shell options
6313 such as @samp{-c} when such options stand alone. (Use @code{@@samp}.)
6314 Also, an entire shell command often looks better if written using
6315 @code{@@samp} rather than @code{@@code}.  In this case, the rule is to
6316 choose the more pleasing format.@refill
6318 It is incorrect to alter the case of a word inside an @code{@@code}
6319 command when it appears at the beginning of a sentence.  Most computer
6320 languages are case sensitive.  In C, for example, @code{Printf} is
6321 different from the identifier @code{printf}, and most likely is a
6322 misspelling of it.  Even in languages which are not case sensitive, it
6323 is confusing to a human reader to see identifiers spelled in different
6324 ways.  Pick one spelling and always use that.  If you do not want to
6325 start a sentence with a command written all in lower case, you should
6326 rearrange the sentence.@refill
6328 Do not use the @code{@@code} command for a string of characters shorter
6329 than a syntactic token.  If you are writing about @samp{TEXINPU}, which
6330 is just a part of the name for the @code{TEXINPUTS} environment
6331 variable, you should use @code{@@samp}.@refill
6333 In particular, you should not use the @code{@@code} command when writing
6334 about the characters used in a token; do not, for example, use
6335 @code{@@code} when you are explaining what letters or printable symbols
6336 can be used in the names of functions.  (Use @code{@@samp}.)  Also, you
6337 should not use @code{@@code} to mark text that is considered input to
6338 programs unless the input is written in a language that is like a
6339 programming language.  For example, you should not use @code{@@code} for
6340 the keystroke commands of GNU Emacs (use @code{@@kbd} instead) although
6341 you may use @code{@@code} for the names of the Emacs Lisp functions that
6342 the keystroke commands invoke.@refill
6344 In the printed manual, @code{@@code} causes @TeX{} to typeset the
6345 argument in a typewriter face.  In the Info file, it causes the Info
6346 formatting commands to use single quotation marks around the text.
6348 @need 700
6349 For example,
6351 @example
6352 Use @@code@{diff@} to compare two files.
6353 @end example
6355 @noindent
6356 produces this in the printed manual:@refill
6358 @quotation
6359 Use @code{diff} to compare two files.
6360 @end quotation
6361 @iftex
6363 @noindent
6364 and this in the Info file:@refill
6366 @example
6367 Use `diff' to compare two files.
6368 @end example
6369 @end iftex
6372 @node kbd, key, code, Indicating
6373 @subsection @code{@@kbd}@{@var{keyboard-characters}@}
6374 @findex kbd
6375 @cindex keyboard input
6377 Use the @code{@@kbd} command for characters of input to be typed by
6378 users.  For example, to refer to the characters @kbd{M-a},
6379 write@refill
6381 @example
6382 @@kbd@{M-a@}
6383 @end example
6385 @noindent
6386 and to refer to the characters @kbd{M-x shell}, write@refill
6388 @example
6389 @@kbd@{M-x shell@}
6390 @end example
6392 @cindex user input
6393 @cindex slanted typewriter font, for @code{@@kbd}
6394 The @code{@@kbd} command has the same effect as @code{@@code} in Info,
6395 but by default produces a different font (slanted typewriter instead of
6396 normal typewriter) in the printed manual, so users can distinguish the
6397 characters they are supposed to type from those the computer outputs.
6399 @findex kbdinputstyle
6400 Since the usage of @code{@@kbd} varies from manual to manual, you can
6401 control the font switching with the @code{@@kbdinputstyle} command.
6402 This command has no effect on Info output.  Write this command at the
6403 beginning of a line with a single word as an argument, one of the
6404 following:
6405 @vindex distinct@r{, arg to @@kbdinputstyle}
6406 @vindex example@r{, arg to @@kbdinputstyle}
6407 @vindex code@r{, arg to @@kbdinputstyle}
6408 @table @samp
6409 @item code
6410 Always use the same font for @code{@@kbd} as @code{@@code}.
6411 @item example
6412 Use the distinguishing font for @code{@@kbd} only in @code{@@example}
6413 and similar environments.
6414 @item example
6415 (the default) Always use the distinguishing font for @code{@@kbd}.
6416 @end table
6418 You can embed another @@-command inside the braces of an @code{@@kbd}
6419 command.  Here, for example, is the way to describe a command that
6420 would be described more verbosely as ``press an @samp{r} and then
6421 press the @key{RET} key'':@refill
6423 @example
6424 @@kbd@{r @@key@{RET@}@}
6425 @end example
6427 @noindent
6428 This produces: @kbd{r @key{RET}}
6430 You also use the @code{@@kbd} command if you are spelling out the letters
6431 you type; for example:@refill
6433 @example
6434 To give the @@code@{logout@} command,
6435 type the characters @@kbd@{l o g o u t @@key@{RET@}@}.
6436 @end example
6438 @noindent
6439 This produces:
6441 @quotation
6442 To give the @code{logout} command,
6443 type the characters @kbd{l o g o u t @key{RET}}.
6444 @end quotation
6446 (Also, this example shows that you can add spaces for clarity.  If you
6447 really want to mention a space character as one of the characters of
6448 input, write @kbd{@@key@{SPC@}} for it.)@refill
6451 @node key, samp, kbd, Indicating
6452 @comment  node-name,  next,  previous,  up
6453 @subsection @code{@@key}@{@var{key-name}@}
6454 @findex key
6456 Use the @code{@@key} command for the conventional name for a key on a
6457 keyboard, as in:@refill
6459 @example
6460 @@key@{RET@}
6461 @end example
6463 You can use the @code{@@key} command within the argument of an
6464 @code{@@kbd} command when the sequence of characters to be typed
6465 includes one or more keys that are described by name.@refill
6467 @need 700
6468 For example, to produce @kbd{C-x @key{ESC}} you would type:@refill
6470 @example
6471 @@kbd@{C-x @@key@{ESC@}@}
6472 @end example
6474 Here is a list of the recommended names for keys:
6475 @cindex Recommended names for keys
6476 @cindex Keys, recommended names
6477 @cindex Names recommended for keys
6478 @cindex Abbreviations for keys
6480 @quotation
6481 @table @t
6482 @item SPC
6483 Space
6484 @item RET
6485 Return
6486 @item LFD
6487 Linefeed (however, since most keyboards nowadays do not have a Linefeed key,
6488 it might be better to call this character @kbd{C-j}.
6489 @item TAB
6491 @item BS
6492 Backspace
6493 @item ESC
6494 Escape
6495 @item DEL
6496 Delete
6497 @item SHIFT
6498 Shift
6499 @item CTRL
6500 Control
6501 @item META
6502 Meta
6503 @end table
6504 @end quotation
6506 @cindex META key
6507 There are subtleties to handling words like `meta' or `ctrl' that are
6508 names of modifier keys.  When mentioning a character in which the
6509 modifier key is used, such as @kbd{Meta-a}, use the @code{@@kbd} command
6510 alone; do not use the @code{@@key} command; but when you are referring
6511 to the modifier key in isolation, use the @code{@@key} command.  For
6512 example, write @samp{@@kbd@{Meta-a@}} to produce @kbd{Meta-a} and
6513 @samp{@@key@{META@}} to produce @key{META}.
6515 @c I don't think this is a good explanation.
6516 @c I think it will puzzle readers more than it clarifies matters.  -- rms.
6517 @c In other words, use @code{@@kbd} for what you do, and use @code{@@key}
6518 @c for what you talk about: ``Press @code{@@kbd@{M-a@}} to move point to
6519 @c the beginning of the sentence.  The @code{@@key@{META@}} key is often in
6520 @c the lower left of the keyboard.''@refill
6522 @node samp, var, key, Indicating
6523 @comment  node-name,  next,  previous,  up
6524 @subsection @code{@@samp}@{@var{text}@}
6525 @findex samp
6527 Use the @code{@@samp} command to indicate text that is a literal example
6528 or `sample' of a sequence of characters in a file, string, pattern, etc.
6529 Enclose the text in braces.  The argument appears within single
6530 quotation marks in both the Info file and the printed manual; in
6531 addition, it is printed in a fixed-width font.@refill
6533 @example
6534 To match @@samp@{foo@} at the end of the line,
6535 use the regexp @@samp@{foo$@}.
6536 @end example
6538 @noindent
6539 produces
6541 @quotation
6542 To match @samp{foo} at the end of the line, use the regexp
6543 @samp{foo$}.@refill
6544 @end quotation
6546 Any time you are referring to single characters, you should use
6547 @code{@@samp} unless @code{@@kbd} or @code{@@key} is more appropriate.
6548 Use @code{@@samp} for the names of command-line options (except in an
6549 @code{@@table}, where @code{@@code} seems to read more easily).  Also,
6550 you may use @code{@@samp} for entire statements in C and for entire
6551 shell commands---in this case, @code{@@samp} often looks better than
6552 @code{@@code}.  Basically, @code{@@samp} is a catchall for whatever is
6553 not covered by @code{@@code}, @code{@@kbd}, or @code{@@key}.@refill
6555 Only include punctuation marks within braces if they are part of the
6556 string you are specifying.  Write punctuation marks outside the braces
6557 if those punctuation marks are part of the English text that surrounds
6558 the string.  In the following sentence, for example, the commas and
6559 period are outside of the braces:@refill
6561 @example
6562 @group
6563 In English, the vowels are @@samp@{a@}, @@samp@{e@},
6564 @@samp@{i@}, @@samp@{o@}, @@samp@{u@}, and sometimes
6565 @@samp@{y@}.
6566 @end group
6567 @end example
6569 @noindent
6570 This produces:
6572 @quotation
6573 In English, the vowels are @samp{a}, @samp{e},
6574 @samp{i}, @samp{o}, @samp{u},  and sometimes
6575 @samp{y}.
6576 @end quotation
6578 @node var, file, samp, Indicating
6579 @comment  node-name,  next,  previous,  up
6580 @subsection @code{@@var}@{@var{metasyntactic-variable}@}
6581 @findex var
6583 Use the @code{@@var} command to indicate metasyntactic variables.  A
6584 @dfn{metasyntactic variable} is something that stands for another piece of
6585 text.  For example, you should use a metasyntactic variable in the
6586 documentation of a function to describe the arguments that are passed
6587 to that function.@refill
6589 Do not use @code{@@var} for the names of particular variables in
6590 programming languages.  These are specific names from a program, so
6591 @code{@@code} is correct for them.  For example, the Emacs Lisp variable
6592 @code{texinfo-tex-command} is not a metasyntactic variable; it is
6593 properly formatted using @code{@@code}.@refill
6595 The effect of @code{@@var} in the Info file is to change the case of
6596 the argument to all upper case; in the printed manual, to italicize it.
6598 @need 700
6599 For example,
6601 @example
6602 To delete file @@var@{filename@},
6603 type @@code@{rm @@var@{filename@}@}.
6604 @end example
6606 @noindent
6607 produces
6609 @quotation
6610 To delete file @var{filename}, type @code{rm @var{filename}}.
6611 @end quotation
6613 @noindent
6614 (Note that @code{@@var} may appear inside @code{@@code},
6615 @code{@@samp}, @code{@@file}, etc.)@refill
6617 Write a metasyntactic variable all in lower case without spaces, and
6618 use hyphens to make it more readable.  Thus, the Texinfo source for
6619 the illustration of how to begin a Texinfo manual looks like
6620 this:@refill
6622 @example
6623 @group
6624 \input texinfo
6625 @@@@setfilename @@var@{info-file-name@}
6626 @@@@settitle @@var@{name-of-manual@}
6627 @end group
6628 @end example
6630 @noindent
6631 This produces:
6633 @example
6634 @group
6635 \input texinfo
6636 @@setfilename @var{info-file-name}
6637 @@settitle @var{name-of-manual}
6638 @end group
6639 @end example
6641 In some documentation styles, metasyntactic variables are shown with
6642 angle brackets, for example:@refill
6644 @example
6645 @dots{}, type rm <filename>
6646 @end example
6648 @noindent
6649 However, that is not the style that Texinfo uses.  (You can, of
6650 course, modify the sources to @TeX{} and the Info formatting commands
6651 to output the @code{<@dots{}>} format if you wish.)@refill
6653 @node file, dfn, var, Indicating
6654 @comment  node-name,  next,  previous,  up
6655 @subsection @code{@@file}@{@var{file-name}@}
6656 @findex file
6658 Use the @code{@@file} command to indicate text that is the name of a
6659 file, buffer, or directory, or is the name of a node in Info.  You can
6660 also use the command for file name suffixes.  Do not use @code{@@file}
6661 for symbols in a programming language; use @code{@@code}.
6663 Currently, @code{@@file} is equivalent to @code{@@samp} in its effects.
6664 For example,@refill
6666 @example
6667 The @@file@{.el@} files are in
6668 the @@file@{/usr/local/emacs/lisp@} directory.
6669 @end example
6671 @noindent
6672 produces
6674 @quotation
6675 The @file{.el} files are in
6676 the @file{/usr/local/emacs/lisp} directory.
6677 @end quotation
6679 @node dfn, cite, file, Indicating
6680 @comment  node-name,  next,  previous,  up
6681 @subsection @code{@@dfn}@{@var{term}@}
6682 @findex dfn
6684 Use the @code{@@dfn} command to identify the introductory or defining
6685 use of a technical term.  Use the command only in passages whose
6686 purpose is to introduce a term which will be used again or which the
6687 reader ought to know.  Mere passing mention of a term for the first
6688 time does not deserve @code{@@dfn}.  The command generates italics in
6689 the printed manual, and double quotation marks in the Info file.  For
6690 example:@refill
6692 @example
6693 Getting rid of a file is called @@dfn@{deleting@} it.
6694 @end example
6696 @noindent
6697 produces
6699 @quotation
6700 Getting rid of a file is called @dfn{deleting} it.
6701 @end quotation
6703 As a general rule, a sentence containing the defining occurrence of a
6704 term should be a definition of the term.  The sentence does not need
6705 to say explicitly that it is a definition, but it should contain the
6706 information of a definition---it should make the meaning clear.
6708 @node cite, url, dfn, Indicating
6709 @comment  node-name,  next,  previous,  up
6710 @subsection @code{@@cite}@{@var{reference}@}
6711 @findex cite
6713 Use the @code{@@cite} command for the name of a book that lacks a
6714 companion Info file. The command produces italics in the printed
6715 manual, and quotation marks in the Info file.@refill
6717 (If a book is written in Texinfo, it is better to use a cross reference
6718 command since a reader can easily follow such a reference in Info.
6719 @xref{xref, , @code{@@xref}}.)@refill
6721 @ignore
6722 @c node ctrl, , cite, Indicating
6723 @comment  node-name,  next,  previous,  up
6724 @c subsection @code{@@ctrl}@{@var{ctrl-char}@}
6725 @findex ctrl
6727 The @code{@@ctrl} command is seldom used.  It describes an @sc{ascii}
6728 control character by inserting the actual character into the Info
6729 file.
6731 Usually, in Texinfo, you talk what you type as keyboard entry by
6732 describing it with @code{@@kbd}: thus, @samp{@@kbd@{C-a@}} for
6733 @kbd{C-a}.  Use @code{@@kbd} in this way when talking about a control
6734 character that is typed on the keyboard by the user.  When talking
6735 about a control character appearing in a file or a string, do not use
6736 @code{@@kbd} since the control character is not typed.  Also, do not
6737 use @samp{C-} but spell out @code{control-}, as in @samp{control-a},
6738 to make it easier for a reader to understand.@refill
6740 @code{@@ctrl} is an idea from the beginnings of Texinfo which may not
6741 really fit in to the scheme of things.  But there may be times when
6742 you want to use the command.  The pattern is
6743 @code{@@ctrl@{@var{ch}@}}, where @var{ch} is an @sc{ascii} character
6744 whose control-equivalent is wanted.  For example, to specify
6745 @samp{control-f}, you would enter@refill
6747 @example
6748 @@ctrl@{f@}
6749 @end example
6751 @noindent
6752 produces
6754 @quotation
6755 @ctrl{f}
6756 @end quotation
6758 In the Info file, this generates the specified control character, output
6759 literally into the file.  This is done so a user can copy the specified
6760 control character (along with whatever else he or she wants) into another
6761 Emacs buffer and use it.  Since the `control-h',`control-i', and
6762 `control-j' characters are formatting characters, they should not be
6763 indicated with @code{@@ctrl}.@refill
6765 In a printed manual, @code{@@ctrl} generates text to describe or
6766 identify that control character: an uparrow followed by the character
6767 @var{ch}.@refill
6768 @end ignore
6771 @node url, email, cite, Indicating
6772 @subsection @code{@@url}@{@var{uniform-resource-locator}@}
6773 @findex url
6774 @cindex Uniform resource locator, indicating
6775 @cindex URL, indicating
6777 Use the @code{@@url} to indicate a uniform resource locator on the World
6778 Wide Web.  This is analogous to @code{@@file}, @code{@@var}, etc., and
6779 is purely for markup purposes.  It does not produce a link you can
6780 follow in HTML output (the @code{@@uref} command does, @pxref{uref,,
6781 @code{@@uref}}).  It is useful for example URL's which do not actually
6782 exist.  For example:
6784 @c Two lines because one is too long for smallbook format.
6785 @example
6786 For example, the url might be
6787 @@url@{http://host.domain.org/path@}.
6788 @end example
6791 @node email,  , url, Indicating
6792 @subsection @code{@@email}@{@var{email-address}[, @var{displayed-text}]@}
6793 @findex email
6795 Use the @code{@@email} command to indicate an electronic mail address.
6796 It takes one mandatory argument, the address, and one optional argument, the
6797 text to display (the default is the address itself).
6799 @cindex mailto link
6800 In Info and @TeX{}, the address is shown in angle brackets, preceded by
6801 the text to display if any.  In HTML output, @code{@@email} produces a
6802 @samp{mailto} link that usually brings up a mail composition window.
6803 For example:
6805 @example
6806 Send bug reports to @@email@{bug-texinfo@@@@gnu.org@}.
6807 Send suggestions to the @@email@{bug-texinfo@@@@gnu.org, same place@}.
6808 @end example
6809 @noindent produces
6810 @example
6811 Send bug reports to @email{bug-texinfo@@gnu.org}.
6812 Send suggestions to the @email{bug-texinfo@@gnu.org, same place}.
6813 @end example
6816 @node Emphasis,  , Indicating, Marking Text
6817 @comment node-name,  next,  previous,  up
6818 @section Emphasizing Text
6819 @cindex Emphasizing text
6821 Usually, Texinfo changes the font to mark words in the text according to
6822 what category the words belong to; an example is the @code{@@code} command.
6823 Most often, this is the best way to mark words.
6824 However, sometimes you will want to emphasize text without indicating a
6825 category.  Texinfo has two commands to do this.  Also, Texinfo has
6826 several commands that specify the font in which @TeX{} will typeset
6827 text.  These commands have no affect on Info and only one of them,
6828 the @code{@@r} command, has any regular use.@refill
6830 @menu
6831 * emph & strong::               How to emphasize text in Texinfo.
6832 * Smallcaps::                   How to use the small caps font.
6833 * Fonts::                       Various font commands for printed output.
6834 * Customized Highlighting::     How to define highlighting commands.
6835 @end menu
6837 @node emph & strong, Smallcaps, Emphasis, Emphasis
6838 @comment  node-name,  next,  previous,  up
6839 @subsection @code{@@emph}@{@var{text}@} and @code{@@strong}@{@var{text}@}
6840 @cindex Emphasizing text, font for
6841 @findex emph
6842 @findex strong
6844 The @code{@@emph} and @code{@@strong} commands are for emphasis;
6845 @code{@@strong} is stronger.  In printed output, @code{@@emph}
6846 produces @emph{italics} and @code{@@strong} produces
6847 @strong{bold}.@refill
6849 @need 800
6850 For example,
6852 @example
6853 @group
6854 @@quotation
6855 @@strong@{Caution:@} @@samp@{rm * .[^.]*@} removes @@emph@{all@}
6856 files in the directory.
6857 @@end quotation
6858 @end group
6859 @end example
6861 @iftex
6862 @noindent
6863 produces the following in printed output:
6865 @quotation
6866 @strong{Caution}: @code{rm * .[^.]*} removes @emph{all}
6867 files in the directory.
6868 @end quotation
6870 @noindent
6871 and the following in Info:
6872 @end iftex
6873 @ifinfo
6874 @noindent
6875 produces:
6876 @end ifinfo
6878 @example
6879      *Caution*: `rm * .[^.]*' removes *all*
6880      files in the directory.
6881 @end example
6883 The @code{@@strong} command is seldom used except to mark what is, in
6884 effect, a typographical element, such as the word `Caution' in the
6885 preceding example.
6887 In the Info file, both @code{@@emph} and @code{@@strong} put asterisks
6888 around the text.@refill
6890 @quotation
6891 @strong{Caution:} Do not use @code{@@emph} or @code{@@strong} with the
6892 word @samp{Note}; Info will mistake the combination for a cross
6893 reference.  Use a phrase such as @strong{Please note} or
6894 @strong{Caution} instead.@refill
6895 @end quotation
6897 @node Smallcaps, Fonts, emph & strong, Emphasis
6898 @subsection @code{@@sc}@{@var{text}@}: The Small Caps Font
6899 @cindex Small caps font
6900 @findex sc @r{(small caps font)}
6902 @iftex
6903 Use the @samp{@@sc} command to set text in the printed output in @sc{a
6904 small caps font} and set text in the Info file in upper case letters.@refill
6905 @end iftex
6906 @ifinfo
6907 Use the @samp{@@sc} command to set text in the printed output in a
6908 small caps font and set text in the Info file in upper case letters.@refill
6909 @end ifinfo
6911 Write the text between braces in lower case, like this:@refill
6913 @example
6914 The @@sc@{acm@} and @@sc@{ieee@} are technical societies.
6915 @end example
6917 @noindent
6918 This produces:
6920 @display
6921 The @sc{acm} and @sc{ieee} are technical societies.
6922 @end display
6924 @TeX{} typesets the small caps font in a manner that prevents the
6925 letters from `jumping out at you on the page'.  This makes small caps
6926 text easier to read than text in all upper case.  The Info formatting
6927 commands set all small caps text in upper case.@refill
6929 @ifinfo
6930 If the text between the braces of an @code{@@sc} command is upper case,
6931 @TeX{} typesets in full-size capitals.  Use full-size capitals
6932 sparingly.@refill
6933 @end ifinfo
6934 @iftex
6935 If the text between the braces of an @code{@@sc} command is upper case,
6936 @TeX{} typesets in @sc{FULL-SIZE CAPITALS}.  Use full-size capitals
6937 sparingly.@refill
6938 @end iftex
6940 You may also use the small caps font for a jargon word such as
6941 @sc{ato} (a @sc{nasa} word meaning `abort to orbit').@refill
6943 There are subtleties to using the small caps font with a jargon word
6944 such as @sc{cdr}, a word used in Lisp programming.  In this case, you
6945 should use the small caps font when the word refers to the second and
6946 subsequent elements of a list (the @sc{cdr} of the list), but you
6947 should use @samp{@@code} when the word refers to the Lisp function of
6948 the same spelling.@refill
6950 @node Fonts, Customized Highlighting, Smallcaps, Emphasis
6951 @comment node-name,  next,  previous,  up
6952 @subsection Fonts for Printing, Not Info
6953 @cindex Fonts for printing, not for Info
6954 @findex i @r{(italic font)}
6955 @findex b @r{(bold font)}
6956 @findex t @r{(typewriter font)}
6957 @findex r @r{(Roman font)}
6959 Texinfo provides four font commands that specify font changes in the
6960 printed manual but have no effect in the Info file.  @code{@@i}
6961 requests @i{italic} font (in some versions of @TeX{}, a slanted font
6962 is used), @code{@@b} requests @b{bold} face, @code{@@t} requests the
6963 @t{fixed-width}, typewriter-style font used by @code{@@code}, and @code{@@r} requests a
6964 @r{roman} font, which is the usual font in which text is printed.  All
6965 four commands apply to an argument that follows, surrounded by
6966 braces.@refill
6968 Only the @code{@@r} command has much use: in example programs, you
6969 can use the @code{@@r} command to convert code comments from the
6970 fixed-width font to a roman font.  This looks better in printed
6971 output.@refill
6973 @need 700
6974 For example,
6976 @example
6977 @group
6978 @@lisp
6979 (+ 2 2)    ; @@r@{Add two plus two.@}
6980 @@end lisp
6981 @end group
6982 @end example
6984 @noindent
6985 produces
6987 @lisp
6988 (+ 2 2)    ; @r{Add two plus two.}
6989 @end lisp
6991 If possible, you should avoid using the other three font commands.  If
6992 you need to use one, it probably indicates a gap in the Texinfo
6993 language.@refill
6995 @node Customized Highlighting,  , Fonts, Emphasis
6996 @comment node-name,  next,  previous,  up
6997 @subsection Customized Highlighting
6998 @cindex Highlighting, customized
6999 @cindex Customized highlighting
7001 @c I think this whole section is obsolete with the advent of macros
7002 @c --karl, 15sep96.
7003 You can use regular @TeX{} commands inside of @code{@@iftex} @dots{}
7004 @code{@@end iftex} to create your own customized highlighting commands
7005 for Texinfo.  The easiest way to do this is to equate your customized
7006 commands with pre-existing commands, such as those for italics.  Such
7007 new commands work only with @TeX{}.@refill
7009 @findex definfoenclose
7010 @cindex Enclosure command for Info
7011 You can use the @code{@@definfoenclose} command inside of
7012 @code{@@ifinfo} @dots{} @code{@@end ifinfo} to define commands for Info
7013 with the same names as new commands for @TeX{}.
7014 @code{@@definfoenclose} creates new commands for Info that mark text by
7015 enclosing it in strings that precede and follow the text.
7016 @footnote{Currently, @code{@@definfoenclose} works only with
7017 @code{texinfo-format-buffer} and @code{texinfo-format-region}, not with
7018 @code{makeinfo}.}@refill
7020 Here is how to create a new @@-command called @code{@@phoo} that causes
7021 @TeX{} to typeset its argument in italics and causes Info to display the
7022 argument between @samp{//} and @samp{\\}.@refill
7024 @need 1300
7025 For @TeX{}, write the following to equate the @code{@@phoo} command with
7026 the existing @code{@@i} italics command:@refill
7028 @example
7029 @group
7030 @@iftex
7031 @@global@@let@@phoo=@@i
7032 @@end iftex
7033 @end group
7034 @end example
7036 @noindent
7037 This defines @code{@@phoo} as a command that causes @TeX{} to typeset
7038 the argument to @code{@@phoo} in italics.  @code{@@global@@let} tells
7039 @TeX{} to equate the next argument with the argument that follows the
7040 equals sign.
7042 @need 1300
7043 For Info, write the following to tell the Info formatters to enclose the
7044 argument between @samp{//} and @samp{\\}:
7046 @example
7047 @group
7048 @@ifinfo
7049 @@definfoenclose phoo, //, \\
7050 @@end ifinfo
7051 @end group
7052 @end example
7054 @noindent
7055 Write the @code{@@definfoenclose} command on a line and follow it with
7056 three arguments separated by commas (commas are used as separators in an
7057 @code{@@node} line in the same way).@refill
7059 @itemize @bullet
7060 @item
7061 The first argument to @code{@@definfoenclose} is the @@-command name
7062 @strong{without} the @samp{@@};
7064 @item
7065 the second argument is the Info start delimiter string; and,
7067 @item
7068 the third argument is the Info end delimiter string.
7069 @end itemize
7071 @noindent
7072 The latter two arguments enclose the highlighted text in the Info file.
7073 A delimiter string may contain spaces.  Neither the start nor end
7074 delimiter is required.  However, if you do not provide a start
7075 delimiter, you must follow the command name with two commas in a row;
7076 otherwise, the Info formatting commands will misinterpret the end
7077 delimiter string as a start delimiter string.@refill
7079 After you have defined @code{@@phoo} both for @TeX{} and for Info, you
7080 can then write @code{@@phoo@{bar@}} to see @samp{//bar\\}
7081 in Info and see
7082 @ifinfo
7083 @samp{bar} in italics in printed output.
7084 @end ifinfo
7085 @iftex
7086 @i{bar} in italics in printed output.
7087 @end iftex
7089 Note that each definition applies to its own formatter: one for @TeX{},
7090 the other for Info.
7092 @need 1200
7093 Here is another example:
7095 @example
7096 @group
7097 @@ifinfo
7098 @@definfoenclose headword, , :
7099 @@end ifinfo
7100 @@iftex
7101 @@global@@let@@headword=@@b
7102 @@end iftex
7103 @end group
7104 @end example
7106 @noindent
7107 This defines @code{@@headword} as an Info formatting command that
7108 inserts nothing before and a colon after the argument and as a @TeX{}
7109 formatting command to typeset its argument in bold.
7111 @node Quotations and Examples, Lists and Tables, Marking Text, Top
7112 @comment  node-name,  next,  previous,  up
7113 @chapter Quotations and Examples
7115 Quotations and examples are blocks of text consisting of one or more
7116 whole paragraphs that are set off from the bulk of the text and
7117 treated differently.  They are usually indented.@refill
7119 In Texinfo, you always begin a quotation or example by writing an
7120 @@-command at the beginning of a line by itself, and end it by writing
7121 an @code{@@end} command that is also at the beginning of a line by
7122 itself.  For instance, you begin an example by writing @code{@@example}
7123 by itself at the beginning of a line and end the example by writing
7124 @code{@@end example} on a line by itself, at the beginning of that
7125 line.@refill
7126 @findex end
7128 @menu
7129 * Block Enclosing Commands::    Use different constructs for
7130                                   different purposes.
7131 * quotation::                   How to write a quotation.
7132 * example::                     How to write an example in a fixed-width font.
7133 * noindent::                    How to prevent paragraph indentation.
7134 * Lisp Example::                How to illustrate Lisp code.
7135 * smallexample & smalllisp::    Forms for the @code{@@smallbook} option.
7136 * display::                     How to write an example in the current font.
7137 * format::                      How to write an example that does not narrow
7138                                   the margins.
7139 * exdent::                      How to undo the indentation of a line.
7140 * flushleft & flushright::      How to push text flushleft or flushright.
7141 * cartouche::                   How to draw cartouches around examples.
7142 @end menu
7144 @node Block Enclosing Commands, quotation, Quotations and Examples, Quotations and Examples
7145 @section The Block Enclosing Commands
7147 Here are commands for quotations and examples:@refill
7149 @table @code
7150 @item @@quotation
7151 Indicate text that is quoted. The text is filled, indented, and
7152 printed in a roman font by default.@refill
7154 @item @@example
7155 Illustrate code, commands, and the like. The text is printed
7156 in a fixed-width font, and indented but not filled.@refill
7158 @item @@lisp
7159 Illustrate Lisp code. The text is printed in a fixed-width font,
7160 and indented but not filled.@refill
7162 @item @@smallexample
7163 Illustrate code, commands, and the like.  Similar to
7164 @code{@@example}, except that in @TeX{} this command typesets text in
7165 a smaller font for the smaller @code{@@smallbook} format than for the
7166 8.5 by 11 inch format.@refill
7168 @item @@smalllisp
7169 Illustrate Lisp code.  Similar to @code{@@lisp}, except that
7170 in @TeX{} this command typesets text in a smaller font for the smaller
7171 @code{@@smallbook} format than for the 8.5 by 11 inch format.@refill
7173 @item @@display
7174 Display illustrative text.  The text is indented but not filled, and
7175 no font is specified (so, by default, the font is roman).@refill
7177 @item @@format
7178 Print illustrative text.  The text is not indented and not filled
7179 and no font is specified (so, by default, the font is roman).@refill
7180 @end table
7182 The @code{@@exdent} command is used within the above constructs to
7183 undo the indentation of a line.
7185 The @code{@@flushleft} and @code{@@flushright} commands are used to line
7186 up the left or right margins of unfilled text.@refill
7188 The @code{@@noindent} command may be used after one of the above
7189 constructs to prevent the following text from being indented as a new
7190 paragraph.@refill
7192 You can use the @code{@@cartouche} command within one of the above
7193 constructs to highlight the example or quotation by drawing a box with
7194 rounded corners around it.  (The @code{@@cartouche} command affects
7195 only the printed manual; it has no effect in the Info file; see
7196 @ref{cartouche, , Drawing Cartouches Around Examples}.)@refill
7198 @node quotation, example, Block Enclosing Commands, Quotations and Examples
7199 @comment  node-name,  next,  previous,  up
7200 @section @code{@@quotation}
7201 @cindex Quotations
7202 @findex quotation
7204 The text of a quotation is
7205 processed normally except that:@refill
7207 @itemize @bullet
7208 @item
7209 the margins are closer to the center of the page, so the whole of the
7210 quotation is indented;@refill
7212 @item
7213 the first lines of paragraphs are indented no more than other
7214 lines;@refill
7216 @item
7217 in the printed output, interparagraph spacing is reduced.@refill
7218 @end itemize
7220 @quotation
7221 This is an example of text written between an @code{@@quotation}
7222 command and an @code{@@end quotation} command.  An @code{@@quotation}
7223 command is most often used to indicate text that is excerpted from
7224 another (real or hypothetical) printed work.@refill
7225 @end quotation
7227 Write an @code{@@quotation} command as text on a line by itself.  This
7228 line will disappear from the output.  Mark the end of the quotation
7229 with a line beginning with and containing only @code{@@end quotation}.
7230 The @code{@@end quotation} line will likewise disappear from the
7231 output.  Thus, the following,@refill
7233 @example
7234 @@quotation
7235 This is
7236 a foo.
7237 @@end quotation
7238 @end example
7240 @noindent
7241 produces
7243 @quotation
7244 This is a foo.
7245 @end quotation
7247 @node example, noindent, quotation, Quotations and Examples
7248 @comment  node-name,  next,  previous,  up
7249 @section @code{@@example}
7250 @cindex Examples, formatting them
7251 @cindex Formatting examples
7252 @findex example
7254 The @code{@@example} command is used to indicate an example that is
7255 not part of the running text, such as computer input or output.@refill
7257 @example
7258 @group
7259 This is an example of text written between an
7260 @code{@@example} command
7261 and an @code{@@end example} command.
7262 The text is indented but not filled.
7263 @end group
7265 @group
7266 In the printed manual, the text is typeset in a
7267 fixed-width font, and extra spaces and blank lines are
7268 significant.  In the Info file, an analogous result is
7269 obtained by indenting each line with five spaces.
7270 @end group
7271 @end example
7273 Write an @code{@@example} command at the beginning of a line by itself.
7274 This line will disappear from the output.  Mark the end of the example
7275 with an @code{@@end example} command, also written at the beginning of a
7276 line by itself.  The @code{@@end example} will disappear from the
7277 output.@refill
7279 @need 700
7280 For example,
7282 @example
7283 @@example
7284 mv foo bar
7285 @@end example
7286 @end example
7288 @noindent
7289 produces
7291 @example
7292 mv foo bar
7293 @end example
7295 Since the lines containing @code{@@example} and @code{@@end example}
7296 will disappear, you should put a blank line before the
7297 @code{@@example} and another blank line after the @code{@@end
7298 example}.  (Remember that blank lines between the beginning
7299 @code{@@example} and the ending @code{@@end example} will appear in
7300 the output.)@refill
7302 @quotation
7303 @strong{Caution:} Do not use tabs in the lines of an example (or anywhere
7304 else in Texinfo, for that matter)!  @TeX{} treats tabs as single
7305 spaces, and that is not what they look like.  This is a problem with
7306 @TeX{}.  (If necessary, in Emacs, you can use @kbd{M-x untabify} to
7307 convert tabs in a region to multiple spaces.)@refill
7308 @end quotation
7310 Examples are often, logically speaking, ``in the middle'' of a
7311 paragraph, and the text continues after an example should not be
7312 indented.  The @code{@@noindent} command prevents a piece of text from
7313 being indented as if it were a new paragraph.
7314 @ifinfo
7315 (@xref{noindent}.)
7316 @end ifinfo
7318 (The @code{@@code} command is used for examples of code that are
7319 embedded within sentences, not set off from preceding and following
7320 text.  @xref{code, , @code{@@code}}.)
7322 @node noindent, Lisp Example, example, Quotations and Examples
7323 @comment  node-name,  next,  previous,  up
7324 @section @code{@@noindent}
7325 @findex noindent
7327 An example or other inclusion can break a paragraph into segments.
7328 Ordinarily, the formatters indent text that follows an example as a new
7329 paragraph.  However, you can prevent this by writing @code{@@noindent}
7330 at the beginning of a line by itself preceding the continuation
7331 text.@refill
7333 @need 1500
7334 For example:
7336 @example
7337 @group
7338 @@example
7339 This is an example
7340 @@end example
7342 @@noindent
7343 This line is not indented.  As you can see, the
7344 beginning of the line is fully flush left with the line
7345 that follows after it.  (This whole example is between
7346 @@code@{@@@@display@} and @@code@{@@@@end display@}.)
7347 @end group
7348 @end example
7350 @noindent
7351 produces
7353 @display
7354 @example
7355 This is an example
7356 @end example
7357 @tex
7358 % Remove extra vskip; this is a kludge to counter the effect of display
7359 \vskip-3.5\baselineskip
7360 @end tex
7362 @noindent
7363 This line is not indented.  As you can see, the
7364 beginning of the line is fully flush left with the line
7365 that follows after it.  (This whole example is between
7366 @code{@@display} and @code{@@end display}.)
7367 @end display
7369 To adjust the number of blank lines properly in the Info file output,
7370 remember that the line containing @code{@@noindent} does not generate a
7371 blank line, and neither does the @code{@@end example} line.@refill
7373 In the Texinfo source file for this manual, each line that says
7374 `produces' is preceded by a line containing @code{@@noindent}.@refill
7376 Do not put braces after an @code{@@noindent} command; they are not
7377 necessary, since @code{@@noindent} is a command used outside of
7378 paragraphs (@pxref{Command Syntax}).@refill
7380 @node Lisp Example, smallexample & smalllisp, noindent, Quotations and Examples
7381 @comment  node-name,  next,  previous,  up
7382 @section @code{@@lisp}
7383 @cindex Lisp example
7384 @findex lisp
7386 The @code{@@lisp} command is used for Lisp code.  It is synonymous
7387 with the @code{@@example} command.
7389 @lisp
7390 This is an example of text written between an
7391 @code{@@lisp} command and an @code{@@end lisp} command.
7392 @end lisp
7394 Use @code{@@lisp} instead of @code{@@example} to preserve information
7395 regarding the nature of the example.  This is useful, for example, if
7396 you write a function that evaluates only and all the Lisp code in a
7397 Texinfo file.  Then you can use the Texinfo file as a Lisp
7398 library.@footnote{It would be straightforward to extend Texinfo to work
7399 in a similar fashion for C, Fortran, or other languages.}@refill
7401 Mark the end of @code{@@lisp} with @code{@@end lisp} on a line by
7402 itself.@refill
7404 @node smallexample & smalllisp, display, Lisp Example, Quotations and Examples
7405 @comment  node-name,  next,  previous,  up
7406 @section @code{@@smallexample} and @code{@@smalllisp}
7407 @cindex Small book example
7408 @cindex Example for a small book
7409 @cindex Lisp example for a small book
7410 @findex smallexample
7411 @findex smalllisp
7413 In addition to the regular @code{@@example} and @code{@@lisp} commands,
7414 Texinfo has two other ``example-style'' commands.  These are the
7415 @code{@@smallexample} and @code{@@smalllisp} commands.  Both these
7416 commands are designed for use with the @code{@@smallbook} command that
7417 causes @TeX{} to produce a printed manual in a 7 by 9.25 inch format
7418 rather than the regular 8.5 by 11 inch format.@refill
7420 In @TeX{}, the @code{@@smallexample} and @code{@@smalllisp} commands
7421 typeset text in a smaller font for the smaller @code{@@smallbook}
7422 format than for the 8.5 by 11 inch format.  Consequently, many examples
7423 containing long lines fit in a narrower, @code{@@smallbook} page
7424 without needing to be shortened.  Both commands typeset in the normal
7425 font size when you format for the 8.5 by 11 inch size; indeed,
7426 in this situation, the @code{@@smallexample} and @code{@@smalllisp}
7427 commands are defined to be the @code{@@example} and @code{@@lisp}
7428 commands.@refill
7430 In Info, the @code{@@smallexample} and @code{@@smalllisp} commands are
7431 equivalent to the @code{@@example} and @code{@@lisp} commands, and work
7432 exactly the same.@refill
7434 Mark the end of @code{@@smallexample} or @code{@@smalllisp} with
7435 @code{@@end smallexample} or @code{@@end smalllisp},
7436 respectively.@refill
7438 @iftex
7439 Here is an example written in the small font used by the
7440 @code{@@smallexample} and @code{@@smalllisp} commands:
7442 @ifclear smallbook
7443 @display
7444 @tex
7445 % Remove extra vskip; this is a kludge to counter the effect of display
7446 \vskip-3\baselineskip
7447 {\ninett
7448 \dots{} to make sure that you have the freedom to
7449 distribute copies of free software (and charge for
7450 this service if you wish), that you receive source
7451 code or can get it if you want it, that you can
7452 change the software or use pieces of it in new free
7453 programs; and that you know you can do these things.}
7454 @end tex
7455 @end display
7456 @end ifclear
7457 @end iftex
7458 @ifset smallbook
7459 @iftex
7460 @smallexample
7461 This is an example of text written between @code{@@smallexample} and
7462 @code{@@end smallexample}.  In Info and in an 8.5 by 11 inch manual,
7463 this text appears in its normal size; but in a 7 by 9.25 inch manual,
7464 this text appears in a smaller font.
7465 @end smallexample
7466 @end iftex
7467 @end ifset
7468 @ifinfo
7469 @smallexample
7470 This is an example of text written between @code{@@smallexample} and
7471 @code{@@end smallexample}.  In Info and in an 8.5 by 11 inch manual,
7472 this text appears in its normal size; but in a 7 by 9.25 inch manual,
7473 this text appears in a smaller font.
7474 @end smallexample
7475 @end ifinfo
7477 The @code{@@smallexample} and @code{@@smalllisp} commands make it
7478 easier to prepare smaller format manuals without forcing you to edit
7479 examples by hand to fit them onto narrower pages.@refill
7481 As a general rule, a printed document looks better if you write all the
7482 examples in a chapter consistently in @code{@@example} or in
7483 @code{@@smallexample}.  Only occasionally should you mix the two
7484 formats.@refill
7486 @xref{smallbook, , Printing ``Small'' Books}, for more information
7487 about the @code{@@smallbook} command.@refill
7489 @node display, format, smallexample & smalllisp, Quotations and Examples
7490 @comment  node-name,  next,  previous,  up
7491 @section @code{@@display}
7492 @cindex Display formatting
7493 @findex display
7495 The @code{@@display} command begins a kind of example.  It is like the
7496 @code{@@example} command
7497 except that, in
7498 a printed manual, @code{@@display} does not select the fixed-width
7499 font.  In fact, it does not specify the font at all, so that the text
7500 appears in the same font it would have appeared in without the
7501 @code{@@display} command.@refill
7503 @display
7504 This is an example of text written between an @code{@@display} command
7505 and an @code{@@end display} command.  The @code{@@display} command
7506 indents the text, but does not fill it.
7507 @end display
7509 @node format, exdent, display, Quotations and Examples
7510 @comment  node-name,  next,  previous,  up
7511 @section @code{@@format}
7512 @findex format
7514 The @code{@@format} command is similar to @code{@@example} except
7515 that, in the printed manual, @code{@@format} does not select the
7516 fixed-width font and does not narrow the margins.@refill
7518 @format
7519 This is an example of text written between an @code{@@format} command
7520 and an @code{@@end format} command.  As you can see
7521 from this example,
7522 the @code{@@format} command does not fill the text.
7523 @end format
7525 @node exdent, flushleft & flushright, format, Quotations and Examples
7526 @section @code{@@exdent}: Undoing a Line's Indentation
7527 @cindex Indentation undoing
7528 @findex exdent
7530 The @code{@@exdent} command removes any indentation a line might have.
7531 The command is written at the beginning of a line and applies only to
7532 the text that follows the command that is on the same line.  Do not use
7533 braces around the text.  In a printed manual, the text on an
7534 @code{@@exdent} line is printed in the roman font.@refill
7536 @code{@@exdent} is usually used within examples.  Thus,@refill
7538 @example
7539 @group
7540 @@example
7541 This line follows an @@@@example command.
7542 @@exdent This line is exdented.
7543 This line follows the exdented line.
7544 The @@@@end example comes on the next line.
7545 @@end group
7546 @end group
7547 @end example
7549 @noindent
7550 produces
7552 @example
7553 @group
7554 This line follows an @@example command.
7555 @exdent This line is exdented.
7556 This line follows the exdented line.
7557 The @@end example comes on the next line.
7558 @end group
7559 @end example
7561 In practice, the @code{@@exdent} command is rarely used.
7562 Usually, you un-indent text by ending the example and
7563 returning the page to its normal width.@refill
7565 @node flushleft & flushright, cartouche, exdent, Quotations and Examples
7566 @section @code{@@flushleft} and @code{@@flushright}
7567 @findex flushleft
7568 @findex flushright
7570 The @code{@@flushleft} and @code{@@flushright} commands line up the
7571 ends of lines on the left and right margins of a page,
7572 but do not fill the text.  The commands are written on lines of their
7573 own, without braces.  The @code{@@flushleft} and @code{@@flushright}
7574 commands are ended by @code{@@end flushleft} and @code{@@end
7575 flushright} commands on lines of their own.@refill
7577 @need 1500
7578 For example,
7580 @example
7581 @group
7582 @@flushleft
7583 This text is
7584 written flushleft.
7585 @@end flushleft
7586 @end group
7587 @end example
7589 @noindent
7590 produces
7592 @quotation
7593 @flushleft
7594 This text is
7595 written flushleft.
7596 @end flushleft
7597 @end quotation
7600 @code{@@flushright} produces the type of indentation often used in the
7601 return address of letters.  For example,
7603 @example
7604 @group
7605 @@flushright
7606 Here is an example of text written
7607 flushright.  The @@code@{@@flushright@} command
7608 right justifies every line but leaves the
7609 left end ragged.
7610 @@end flushright
7611 @end group
7612 @end example
7614 @noindent
7615 produces
7617 @flushright
7618 Here is an example of text written
7619 flushright.  The @code{@@flushright} command
7620 right justifies every line but leaves the
7621 left end ragged.
7622 @end flushright
7624 @node cartouche,  , flushleft & flushright, Quotations and Examples
7625 @section Drawing Cartouches Around Examples
7626 @findex cartouche
7627 @cindex Box with rounded corners
7629 In a printed manual, the @code{@@cartouche} command draws a box with
7630 rounded corners around its contents.  You can use this command to
7631 further highlight an example or quotation.  For instance, you could
7632 write a manual in which one type of example is surrounded by a cartouche
7633 for emphasis.@refill
7635 The @code{@@cartouche} command affects only the printed manual; it has
7636 no effect in the Info file.@refill
7638 @need 1500
7639 For example,
7641 @example
7642 @group
7643 @@example
7644 @@cartouche
7645 % pwd
7646 /usr/local/share/emacs
7647 @@end cartouche
7648 @@end example
7649 @end group
7650 @end example
7652 @noindent
7653 surrounds the two-line example with a box with rounded corners, in the
7654 printed manual.
7656 @iftex
7657 In a printed manual, the example looks like this:@refill
7659 @example
7660 @group
7661 @cartouche
7662 % pwd
7663 /usr/local/lib/emacs/info
7664 @end cartouche
7665 @end group
7666 @end example
7667 @end iftex
7670 @node Lists and Tables, Indices, Quotations and Examples, Top
7671 @chapter Lists and Tables
7672 @cindex Making lists and tables
7673 @cindex Lists and tables, making
7674 @cindex Tables and lists, making
7676 Texinfo has several ways of making lists and tables.  Lists can be
7677 bulleted or numbered; two-column tables can highlight the items in
7678 the first column; multi-column tables are also supported.
7680 @menu
7681 * Introducing Lists::           Texinfo formats lists for you.
7682 * itemize::                     How to construct a simple list.
7683 * enumerate::                   How to construct a numbered list.
7684 * Two-column Tables::           How to construct a two-column table.
7685 * Multi-column Tables::         How to construct generalized tables.
7686 @end menu
7688 @ifinfo
7689 @node Introducing Lists, itemize, Lists and Tables, Lists and Tables
7690 @heading Introducing Lists
7691 @end ifinfo
7693 Texinfo automatically indents the text in lists or tables, and numbers
7694 an enumerated list.  This last feature is useful if you modify the
7695 list, since you do not need to renumber it yourself.@refill
7697 Numbered lists and tables begin with the appropriate @@-command at the
7698 beginning of a line, and end with the corresponding @code{@@end}
7699 command on a line by itself.  The table and itemized-list commands
7700 also require that you write formatting information on the same line as
7701 the beginning @@-command.@refill
7703 Begin an enumerated list, for example, with an @code{@@enumerate}
7704 command and end the list with an @code{@@end enumerate} command.
7705 Begin an itemized list with an @code{@@itemize} command, followed on
7706 the same line by a formatting command such as @code{@@bullet}, and end
7707 the list with an @code{@@end itemize} command.@refill
7708 @findex end
7710 Precede each element of a list with an @code{@@item} or @code{@@itemx}
7711 command.@refill
7713 @sp 1
7714 @noindent
7715 Here is an itemized list of the different kinds of table and lists:@refill
7717 @itemize @bullet
7718 @item
7719 Itemized lists with and without bullets.
7721 @item
7722 Enumerated lists, using numbers or letters.
7724 @item
7725 Two-column tables with highlighting.
7726 @end itemize
7728 @sp 1
7729 @noindent
7730 Here is an enumerated list with the same items:@refill
7732 @enumerate
7733 @item
7734 Itemized lists with and without bullets.
7736 @item
7737 Enumerated lists, using numbers or letters.
7739 @item
7740 Two-column tables with highlighting.
7741 @end enumerate
7743 @sp 1
7744 @noindent
7745 And here is a two-column table with the same items and their
7746 @w{@@-commands}:@refill
7748 @table @code
7749 @item @@itemize
7750 Itemized lists with and without bullets.
7752 @item @@enumerate
7753 Enumerated lists, using numbers or letters.
7755 @item @@table
7756 @itemx @@ftable
7757 @itemx @@vtable
7758 Two-column tables with indexing.
7759 @end table
7761 @node itemize, enumerate, Introducing Lists, Lists and Tables
7762 @comment  node-name,  next,  previous,  up
7763 @section Making an Itemized List
7764 @cindex Itemization
7765 @findex itemize
7767 The @code{@@itemize} command produces sequences of indented
7768 paragraphs, with a bullet or other mark inside the left margin
7769 at the beginning of each paragraph for which such a mark is desired.@refill
7771 Begin an itemized list by writing @code{@@itemize} at the beginning of
7772 a line.  Follow the command, on the same line, with a character or a
7773 Texinfo command that generates a mark.  Usually, you will write
7774 @code{@@bullet} after @code{@@itemize}, but you can use
7775 @code{@@minus}, or any character or any special symbol that results in
7776 a single character in the Info file.  (When you write @code{@@bullet}
7777 or @code{@@minus} after an @code{@@itemize} command, you may omit the
7778 @samp{@{@}}.)@refill
7780 Write the text of the indented paragraphs themselves after the
7781 @code{@@itemize}, up to another line that says @code{@@end
7782 itemize}.@refill
7784 Before each paragraph for which a mark in the margin is desired, write
7785 a line that says just @code{@@item}.  Do not write any other text on this
7786 line.@refill
7787 @findex item
7789 Usually, you should put a blank line before an @code{@@item}.  This
7790 puts a blank line in the Info file. (@TeX{} inserts the proper
7791 interline whitespace in either case.)  Except when the entries are
7792 very brief, these blank lines make the list look better.@refill
7794 Here is an example of the use of @code{@@itemize}, followed by the
7795 output it produces.  Note that @code{@@bullet} produces an @samp{*} in
7796 Info and a round dot in @TeX{}.@refill
7798 @example
7799 @group
7800 @@itemize @@bullet
7801 @@item
7802 Some text for foo.
7804 @@item
7805 Some text
7806 for bar.
7807 @@end itemize
7808 @end group
7809 @end example
7811 @noindent
7812 This produces:
7814 @quotation
7815 @itemize @bullet
7816 @item
7817 Some text for foo.
7819 @item
7820 Some text
7821 for bar.
7822 @end itemize
7823 @end quotation
7825 Itemized lists may be embedded within other itemized lists.  Here is a
7826 list marked with dashes embedded in a list marked with bullets:@refill
7828 @example
7829 @group
7830 @@itemize @@bullet
7831 @@item
7832 First item.
7834 @@itemize @@minus
7835 @@item
7836 Inner item.
7838 @@item
7839 Second inner item.
7840 @@end itemize
7842 @@item
7843 Second outer item.
7844 @@end itemize
7845 @end group
7846 @end example
7848 @noindent
7849 This produces:
7851 @quotation
7852 @itemize @bullet
7853 @item
7854 First item.
7856 @itemize @minus
7857 @item
7858 Inner item.
7860 @item
7861 Second inner item.
7862 @end itemize
7864 @item
7865 Second outer item.
7866 @end itemize
7867 @end quotation
7869 @node enumerate, Two-column Tables, itemize, Lists and Tables
7870 @comment  node-name,  next,  previous,  up
7871 @section Making a Numbered or Lettered List
7872 @cindex Enumeration
7873 @findex enumerate
7875 @code{@@enumerate} is like @code{@@itemize} (@pxref{itemize,,
7876 @code{@@itemize}}), except that the labels on the items are
7877 successive integers or letters instead of bullets.
7879 Write the @code{@@enumerate} command at the beginning of a line.  The
7880 command does not require an argument, but accepts either a number or a
7881 letter as an option.  Without an argument, @code{@@enumerate} starts the
7882 list with the number @samp{1}.  With a numeric argument, such as
7883 @samp{3}, the command starts the list with that number.  With an upper
7884 or lower case letter, such as @samp{a} or @samp{A}, the command starts
7885 the list with that letter.@refill
7887 Write the text of the enumerated list in the same way you write an
7888 itemized list: put @code{@@item} on a line of its own before the start
7889 of each paragraph that you want enumerated.  Do not write any other text
7890 on the line beginning with @code{@@item}.@refill
7892 You should put a blank line between entries in the list.
7893 This generally makes it easier to read the Info file.@refill
7895 @need 1500
7896 Here is an example of @code{@@enumerate} without an argument:@refill
7898 @example
7899 @group
7900 @@enumerate
7901 @@item
7902 Underlying causes.
7904 @@item
7905 Proximate causes.
7906 @@end enumerate
7907 @end group
7908 @end example
7910 @noindent
7911 This produces:
7913 @enumerate
7914 @item
7915 Underlying causes.
7917 @item
7918 Proximate causes.
7919 @end enumerate
7920 @sp 1
7921 Here is an example with an argument of @kbd{3}:@refill
7922 @sp 1
7923 @example
7924 @group
7925 @@enumerate 3
7926 @@item
7927 Predisposing causes.
7929 @@item
7930 Precipitating causes.
7932 @@item
7933 Perpetuating causes.
7934 @@end enumerate
7935 @end group
7936 @end example
7938 @noindent
7939 This produces:
7941 @enumerate 3
7942 @item
7943 Predisposing causes.
7945 @item
7946 Precipitating causes.
7948 @item
7949 Perpetuating causes.
7950 @end enumerate
7951 @sp 1
7952 Here is a brief summary of the alternatives.  The summary is constructed
7953 using @code{@@enumerate} with an argument of @kbd{a}.@refill
7954 @sp 1
7955 @enumerate a
7956 @item
7957 @code{@@enumerate}
7959 Without an argument, produce a numbered list, starting with the number
7960 1.@refill
7962 @item
7963 @code{@@enumerate @var{positive-integer}}
7965 With a (positive) numeric argument, start a numbered list with that
7966 number.  You can use this to continue a list that you interrupted with
7967 other text.@refill
7969 @item
7970 @code{@@enumerate @var{upper-case-letter}}
7972 With an upper case letter as argument, start a list
7973 in which each item is marked
7974 by a letter, beginning with that upper case letter.@refill
7976 @item
7977 @code{@@enumerate @var{lower-case-letter}}
7979 With a lower case letter as argument, start a list
7980 in which each item is marked by
7981 a letter, beginning with that lower case letter.@refill
7982 @end enumerate
7984 You can also nest enumerated lists, as in an outline.@refill
7986 @node Two-column Tables, Multi-column Tables, enumerate, Lists and Tables
7987 @section Making a Two-column Table
7988 @cindex Tables, making two-column
7989 @findex table
7991 @code{@@table} is similar to @code{@@itemize} (@pxref{itemize,,
7992 @code{@@itemize}}), but allows you to specify a name or heading line for
7993 each item.  The @code{@@table} command is used to produce two-column
7994 tables, and is especially useful for glossaries, explanatory
7995 exhibits, and command-line option summaries.
7997 @menu
7998 * table::                       How to construct a two-column table.
7999 * ftable vtable::               Automatic indexing for two-column tables.
8000 * itemx::                       How to put more entries in the first column.
8001 @end menu
8003 @ifinfo
8004 @node table, ftable vtable, Two-column Tables, Two-column Tables
8005 @subheading Using the @code{@@table} Command
8007 Use the @code{@@table} command to produce two-column tables.@refill
8008 @end ifinfo
8010 Write the @code{@@table} command at the beginning of a line and follow
8011 it on the same line with an argument that is a Texinfo ``indicating''
8012 command such as @code{@@code}, @code{@@samp}, @code{@@var}, or
8013 @code{@@kbd} (@pxref{Indicating}).  Although these commands are usually
8014 followed by arguments in braces, in this case you use the command name
8015 without an argument because @code{@@item} will supply the argument.
8016 This command will be applied to the text that goes into the first column
8017 of each item and determines how it will be highlighted.  For example,
8018 @code{@@code} will cause the text in the first column to be highlighted
8019 with an @code{@@code} command.  (We recommend @code{@@code} for
8020 @code{@@table}'s of command-line options.)
8022 @findex asis
8023 You may also choose to use the @code{@@asis} command as an argument to
8024 @code{@@table}.  @code{@@asis} is a command that does nothing; if you
8025 use this command after @code{@@table}, @TeX{} and the Info formatting
8026 commands output the first column entries without added highlighting
8027 (``as is'').@refill
8029 (The @code{@@table} command may work with other commands besides those
8030 listed here.  However, you can only use commands that normally take
8031 arguments in braces.)@refill
8033 Begin each table entry with an @code{@@item} command at the beginning
8034 of a line.  Write the first column text on the same line as the
8035 @code{@@item} command.  Write the second column text on the line
8036 following the @code{@@item} line and on subsequent lines.  (You do not
8037 need to type anything for an empty second column entry.)  You may
8038 write as many lines of supporting text as you wish, even several
8039 paragraphs.  But only text on the same line as the @code{@@item} will
8040 be placed in the first column.@refill
8041 @findex item
8043 Normally, you should put a blank line before an @code{@@item} line.
8044 This puts a blank like in the Info file.  Except when the entries are
8045 very brief, a blank line looks better.@refill
8047 @need 1500
8048 The following table, for example, highlights the text in the first
8049 column with an @code{@@samp} command:@refill
8051 @example
8052 @group
8053 @@table @@samp
8054 @@item foo
8055 This is the text for
8056 @@samp@{foo@}.
8058 @@item bar
8059 Text for @@samp@{bar@}.
8060 @@end table
8061 @end group
8062 @end example
8064 @noindent
8065 This produces:
8067 @table @samp
8068 @item foo
8069 This is the text for
8070 @samp{foo}.
8071 @item bar
8072 Text for @samp{bar}.
8073 @end table
8075 If you want to list two or more named items with a single block of
8076 text, use the @code{@@itemx} command.  (@xref{itemx, ,
8077 @code{@@itemx}}.)@refill
8079 @node ftable vtable, itemx, table, Two-column Tables
8080 @comment  node-name,  next,  previous,  up
8081 @subsection @code{@@ftable} and @code{@@vtable}
8082 @cindex Tables with indexes
8083 @cindex Indexing table entries automatically
8084 @findex ftable
8085 @findex vtable
8087 The @code{@@ftable} and @code{@@vtable} commands are the same as the
8088 @code{@@table} command except that @code{@@ftable} automatically enters
8089 each of the items in the first column of the table into the index of
8090 functions and @code{@@vtable} automatically enters each of the items in
8091 the first column of the table into the index of variables.  This
8092 simplifies the task of creating indices.  Only the items on the same
8093 line as the @code{@@item} commands are indexed, and they are indexed in
8094 exactly the form that they appear on that line.  @xref{Indices, ,
8095 Creating Indices}, for more information about indices.@refill
8097 Begin a two-column table using @code{@@ftable} or @code{@@vtable} by
8098 writing the @@-command at the beginning of a line, followed on the same
8099 line by an argument that is a Texinfo command such as @code{@@code},
8100 exactly as you would for an @code{@@table} command; and end the table
8101 with an @code{@@end ftable} or @code{@@end vtable} command on a line by
8102 itself.
8104 See the example for @code{@@table} in the previous section.
8106 @node itemx,  , ftable vtable, Two-column Tables
8107 @comment  node-name,  next,  previous,  up
8108 @subsection @code{@@itemx}
8109 @cindex Two named items for @code{@@table}
8110 @findex itemx
8112 Use the @code{@@itemx} command inside a table when you have two or more
8113 first column entries for the same item, each of which should appear on a
8114 line of its own.  Use @code{@@itemx} for all but the first entry;
8115 @code{@@itemx} should always follow an @code{@@item} command.  The
8116 @code{@@itemx} command works exactly like @code{@@item} except that it
8117 does not generate extra vertical space above the first column text.
8119 @need 1000
8120 For example,
8122 @example
8123 @group
8124 @@table @@code
8125 @@item upcase
8126 @@itemx downcase
8127 These two functions accept a character or a string as
8128 argument, and return the corresponding upper case (lower
8129 case) character or string.
8130 @@end table
8131 @end group
8132 @end example
8134 @noindent
8135 This produces:
8137 @table @code
8138 @item upcase
8139 @itemx downcase
8140 These two functions accept a character or a string as
8141 argument, and return the corresponding upper case (lower
8142 case) character or string.@refill
8143 @end table
8145 @noindent
8146 (Note also that this example illustrates multi-line supporting text in
8147 a two-column table.)@refill
8150 @node Multi-column Tables,  , Two-column Tables, Lists and Tables
8151 @section Multi-column Tables
8152 @cindex Tables, making multi-column
8153 @findex multitable
8155 @code{@@multitable} allows you to construct tables with any number of
8156 columns, with each column having any width you like.
8158 You define the column widths on the @code{@@multitable} line itself, and
8159 write each row of the actual table following an @code{@@item} command,
8160 with columns separated by an @code{@@tab} command.  Finally, @code{@@end
8161 multitable} completes the table.  Details in the sections below.
8163 @menu
8164 * Multitable Column Widths::    Defining multitable column widths.
8165 * Multitable Rows::             Defining multitable rows, with examples.
8166 @end menu
8168 @node Multitable Column Widths, Multitable Rows, Multi-column Tables, Multi-column Tables
8169 @subsection Multitable Column Widths
8170 @cindex Multitable column widths
8171 @cindex Column widths, defining for multitables
8172 @cindex Widths, defining multitable column
8174 You can define the column widths for a multitable in two ways: as
8175 fractions of the line length; or with a prototype row.  Mixing the two
8176 methods is not supported.  In either case, the widths are defined
8177 entirely on the same line as the @code{@@multitable} command.
8179 @enumerate
8180 @item
8181 @findex columnfractions
8182 @cindex Line length, column widths as fraction of
8183 To specify column widths as fractions of the line length, write
8184 @code{@@columnfractions} and the decimal numbers (presumably less than
8185 1) after the @code{@@multitable} command, as in:
8187 @example
8188 @@multitable @@columnfractions .33 .33 .33
8189 @end example
8191 @noindent The fractions need not add up exactly to 1.0, as these do
8192 not.  This allows you to produce tables that do not need the full line
8193 length.
8195 @item
8196 @cindex Prototype row, column widths defined by
8197 To specify a prototype row, write the longest entry for each column
8198 enclosed in braces after the @code{@@multitable} command.  For example:
8200 @example
8201 @@multitable @{some text for column one@} @{for column two@}
8202 @end example
8204 @noindent
8205 The first column will then have the width of the typeset `some text for
8206 column one', and the second column the width of `for column two'.
8208 The prototype entries need not appear in the table itself.
8210 Although we used simple text in this example, the prototype entries can
8211 contain Texinfo commands; markup commands such as @code{@@code} are
8212 particularly likely to be useful.
8214 @end enumerate
8217 @node Multitable Rows,  , Multitable Column Widths, Multi-column Tables
8218 @subsection Multitable Rows
8219 @cindex Multitable rows
8220 @cindex Rows, of a multitable
8222 @findex item
8223 @cindex tab
8224 After the @code{@@multitable} command defining the column widths (see
8225 the previous section), you begin each row in the body of a multitable
8226 with @code{@@item}, and separate the column entries with @code{@@tab}.
8227 Line breaks are not special within the table body, and you may break
8228 input lines in your source file as necessary.
8230 Here is a complete example of a multi-column table (the text is from
8231 @cite{The GNU Emacs Manual}, @pxref{Split Window,, Splitting Windows,
8232 emacs, The GNU Emacs Manual}):
8234 @example
8235 @@multitable @@columnfractions .15 .45 .4
8236 @@item Key @@tab Command @@tab Description
8237 @@item C-x 2
8238 @@tab @@code@{split-window-vertically@}
8239 @@tab Split the selected window into two windows,
8240 with one above the other.
8241 @@item C-x 3
8242 @@tab @@code@{split-window-horizontally@}
8243 @@tab Split the selected window into two windows
8244 positioned side by side.
8245 @@item C-Mouse-2
8246 @@tab
8247 @@tab In the mode line or scroll bar of a window,
8248 split that window.
8249 @@end multitable
8250 @end example
8252 @noindent produces:
8254 @multitable @columnfractions .15 .45 .4
8255 @item Key @tab Command @tab Description
8256 @item C-x 2
8257 @tab @code{split-window-vertically}
8258 @tab Split the selected window into two windows,
8259 with one above the other.
8260 @item C-x 3
8261 @tab @code{split-window-horizontally}
8262 @tab Split the selected window into two windows
8263 positioned side by side.
8264 @item C-Mouse-2
8265 @tab
8266 @tab In the mode line or scroll bar of a window,
8267 split that window.
8268 @end multitable
8271 @node Indices, Insertions, Lists and Tables, Top
8272 @comment node-name,  next,  previous,  up
8273 @chapter Creating Indices
8274 @cindex Indices
8275 @cindex Creating indices
8277 Using Texinfo, you can generate indices without having to sort and
8278 collate entries manually.  In an index, the entries are listed in
8279 alphabetical order, together with information on how to find the
8280 discussion of each entry.  In a printed manual, this information
8281 consists of page numbers.  In an Info file, this information is a menu
8282 entry leading to the first node referenced.@refill
8284 Texinfo provides several predefined kinds of index: an index
8285 for functions, an index for variables, an index for concepts, and so
8286 on.  You can combine indices or use them for other than their
8287 canonical purpose.  If you wish, you can define your own indices.@refill
8289 @menu
8290 * Index Entries::               Choose different words for index entries.
8291 * Predefined Indices::          Use different indices for different kinds
8292                                   of entry.
8293 * Indexing Commands::           How to make an index entry.
8294 * Combining Indices::           How to combine indices.
8295 * New Indices::                 How to define your own indices.
8296 @end menu
8298 @node Index Entries, Predefined Indices, Indices, Indices
8299 @comment  node-name,  next,  previous,  up
8300 @section Making Index Entries
8301 @cindex Index entries, making
8302 @cindex Entries, making index
8304 When you are making index entries, it is good practice to think of the
8305 different ways people may look for something.  Different people
8306 @emph{do not} think of the same words when they look something up.  A
8307 helpful index will have items indexed under all the different words
8308 that people may use.  For example, one reader may think it obvious that
8309 the two-letter names for indices should be listed under ``Indices,
8310 two-letter names'', since the word ``Index'' is the general concept.
8311 But another reader may remember the specific concept of two-letter
8312 names and search for the entry listed as ``Two letter names for
8313 indices''.  A good index will have both entries and will help both
8314 readers.@refill
8316 Like typesetting, the construction of an index is a highly skilled,
8317 professional art, the subtleties of which are not appreciated until you
8318 need to do it yourself.@refill
8320 @xref{Printing Indices & Menus}, for information about printing an index
8321 at the end of a book or creating an index menu in an Info file.@refill
8323 @node Predefined Indices, Indexing Commands, Index Entries, Indices
8324 @comment  node-name,  next,  previous,  up
8325 @section Predefined Indices
8327 Texinfo provides six predefined indices:@refill
8329 @itemize @bullet
8330 @item
8331 A @dfn{concept index} listing concepts that are discussed.@refill
8333 @item
8334 A @dfn{function index} listing functions (such as entry points of
8335 libraries).@refill
8337 @item
8338 A @dfn{variables index} listing variables (such as global variables
8339 of libraries).@refill
8341 @item
8342 A @dfn{keystroke index} listing keyboard commands.@refill
8344 @item
8345 A @dfn{program index} listing names of programs.@refill
8347 @item
8348 A @dfn{data type index} listing data types (such as structures defined in
8349 header files).@refill
8350 @end itemize
8352 @noindent
8353 Not every manual needs all of these, and most manuals use two or three
8354 of them.  This manual has two indices: a
8355 concept index and an @@-command index (that is actually the function
8356 index but is called a command index in the chapter heading).  Two or
8357 more indices can be combined into one using the @code{@@synindex} or
8358 @code{@@syncodeindex} commands.  @xref{Combining Indices}.@refill
8360 @node Indexing Commands, Combining Indices, Predefined Indices, Indices
8361 @comment  node-name,  next,  previous,  up
8362 @section Defining the Entries of an Index
8363 @cindex Defining indexing entries
8364 @cindex Index entries
8365 @cindex Entries for an index
8366 @cindex Specifying index entries
8367 @cindex Creating index entries
8369 The data to make an index come from many individual indexing commands
8370 scattered throughout the Texinfo source file.  Each command says to add
8371 one entry to a particular index; after formatting, the index will give
8372 the current page number or node name as the reference.@refill
8374 An index entry consists of an indexing command at the beginning of a
8375 line followed, on the rest of the line, by the entry.@refill
8377 For example, this section begins with the following five entries for
8378 the concept index:@refill
8380 @example
8381 @@cindex Defining indexing entries
8382 @@cindex Index entries
8383 @@cindex Entries for an index
8384 @@cindex Specifying index entries
8385 @@cindex Creating index entries
8386 @end example
8388 Each predefined index has its own indexing command---@code{@@cindex}
8389 for the concept index, @code{@@findex} for the function index, and so
8390 on.@refill
8392 @cindex Writing index entries
8393 @cindex Index entry writing
8394 Concept index entries consist of text.  The best way to write an index
8395 is to choose entries that are terse yet clear.  If you can do this,
8396 the index often looks better if the entries are not capitalized, but
8397 written just as they would appear in the middle of a sentence.
8398 (Capitalize proper names and acronyms that always call for upper case
8399 letters.)  This is the case convention we use in most GNU manuals'
8400 indices.
8402 If you don't see how to make an entry terse yet clear, make it longer
8403 and clear---not terse and confusing.  If many of the entries are several
8404 words long, the index may look better if you use a different convention:
8405 to capitalize the first word of each entry.  But do not capitalize a
8406 case-sensitive name such as a C or Lisp function name or a shell
8407 command; that would be a spelling error.
8409 Whichever case convention you use, please use it consistently!
8411 @ignore
8412 Concept index entries consist of English text.  The usual convention
8413 is to capitalize the first word of each such index entry, unless that
8414 word is the name of a function, variable, or other such entity that
8415 should not be capitalized.  However, if your concept index entries are
8416 consistently short (one or two words each) it may look better for each
8417 regular entry to start with a lower case letter, aside from proper
8418 names and acronyms that always call for upper case letters.  Whichever
8419 convention you adapt, please be consistent!
8420 @end ignore
8422 Entries in indices other than the concept index are symbol names in
8423 programming languages, or program names; these names are usually
8424 case-sensitive, so use upper and lower case as required for them.
8426 By default, entries for a concept index are printed in a small roman
8427 font and entries for the other indices are printed in a small
8428 @code{@@code} font.  You may change the way part of an entry is
8429 printed with the usual Texinfo commands, such as @code{@@file} for
8430 file names and @code{@@emph} for emphasis (@pxref{Marking
8431 Text}).@refill
8432 @cindex Index font types
8434 @cindex Predefined indexing commands
8435 @cindex Indexing commands, predefined
8436 The six indexing commands for predefined indices are:
8438 @table @code
8439 @item @@cindex @var{concept}
8440 @findex cindex
8441 Make an entry in the concept index for @var{concept}.@refill
8443 @item @@findex @var{function}
8444 @findex findex
8445 Make an entry in the function index for @var{function}.@refill
8447 @item @@vindex @var{variable}
8448 @findex vindex
8449 Make an entry in the variable index for @var{variable}.@refill
8451 @item @@kindex @var{keystroke}
8452 @findex kindex
8453 Make an entry in the key index for @var{keystroke}.@refill
8455 @item @@pindex @var{program}
8456 @findex pindex
8457 Make an entry in the program index for @var{program}.@refill
8459 @item @@tindex @var{data type}
8460 @findex tindex
8461 Make an entry in the data type index for @var{data type}.@refill
8462 @end table
8464 @quotation
8465 @strong{Caution:} Do not use a colon in an index entry.  In Info, a
8466 colon separates the menu entry name from the node name.  An extra
8467 colon confuses Info.
8468 @xref{Menu Parts, , The Parts of a Menu},
8469 for more information about the structure of a menu entry.@refill
8470 @end quotation
8472 If you write several identical index entries in different places in a
8473 Texinfo file, the index in the printed manual will list all the pages to
8474 which those entries refer.  However, the index in the Info file will
8475 list @strong{only} the node that references the @strong{first} of those
8476 index entries.  Therefore, it is best to write indices in which each
8477 entry refers to only one place in the Texinfo file.  Fortunately, this
8478 constraint is a feature rather than a loss since it means that the index
8479 will be easy to use.  Otherwise, you could create an index that lists
8480 several pages for one entry and your reader would not know to which page
8481 to turn.  If you have two identical entries for one topic, change the
8482 topics slightly, or qualify them to indicate the difference.@refill
8484 You are not actually required to use the predefined indices for their
8485 canonical purposes.  For example, suppose you wish to index some C
8486 preprocessor macros.  You could put them in the function index along
8487 with actual functions, just by writing @code{@@findex} commands for
8488 them; then, when you print the ``Function Index'' as an unnumbered
8489 chapter, you could give it the title `Function and Macro Index' and
8490 all will be consistent for the reader.  Or you could put the macros in
8491 with the data types by writing @code{@@tindex} commands for them, and
8492 give that index a suitable title so the reader will understand.
8493 (@xref{Printing Indices & Menus}.)@refill
8495 @node Combining Indices, New Indices, Indexing Commands, Indices
8496 @comment node-name,  next,  previous,  up
8497 @section Combining Indices
8498 @cindex Combining indices
8499 @cindex Indices, combining them
8501 Sometimes you will want to combine two disparate indices such as functions
8502 and concepts, perhaps because you have few enough of one of them that
8503 a separate index for them would look silly.@refill
8505 You could put functions into the concept index by writing
8506 @code{@@cindex} commands for them instead of @code{@@findex} commands,
8507 and produce a consistent manual by printing the concept index with the
8508 title `Function and Concept Index' and not printing the `Function
8509 Index' at all; but this is not a robust procedure.  It works only if
8510 your document is never included as part of another
8511 document that is designed to have a separate function index; if your
8512 document were to be included with such a document, the functions from
8513 your document and those from the other would not end up together.
8514 Also, to make your function names appear in the right font in the
8515 concept index, you would need to enclose every one of them between
8516 the braces of @code{@@code}.@refill
8518 @menu
8519 * syncodeindex::                How to merge two indices, using @code{@@code}
8520                                   font for the merged-from index.
8521 * synindex::                    How to merge two indices, using the
8522                                   default font of the merged-to index.
8523 @end menu
8525 @node syncodeindex, synindex, Combining Indices, Combining Indices
8526 @subsection @code{@@syncodeindex}
8527 @findex syncodeindex
8529 When you want to combine functions and concepts into one index, you
8530 should index the functions with @code{@@findex} and index the concepts
8531 with @code{@@cindex}, and use the @code{@@syncodeindex} command to
8532 redirect the function index entries into the concept index.@refill
8533 @findex syncodeindex
8535 The @code{@@syncodeindex} command takes two arguments; they are the name
8536 of the index to redirect, and the name of the index to redirect it to.
8537 The template looks like this:@refill
8539 @example
8540 @@syncodeindex @var{from} @var{to}
8541 @end example
8543 @cindex Predefined names for indices
8544 @cindex Two letter names for indices
8545 @cindex Indices, two letter names
8546 @cindex Names for indices
8547 For this purpose, the indices are given two-letter names:@refill
8549 @table @samp
8550 @item cp
8551 concept index
8552 @item fn
8553 function index
8554 @item vr
8555 variable index
8556 @item ky
8557 key index
8558 @item pg
8559 program index
8560 @item tp
8561 data type index
8562 @end table
8564 Write an @code{@@syncodeindex} command before or shortly after the
8565 end-of-header line at the beginning of a Texinfo file.  For example,
8566 to merge a function index with a concept index, write the
8567 following:@refill
8569 @example
8570 @@syncodeindex fn cp
8571 @end example
8573 @noindent
8574 This will cause all entries designated for the function index to merge
8575 in with the concept index instead.@refill
8577 To merge both a variables index and a function index into a concept
8578 index, write the following:@refill
8580 @example
8581 @group
8582 @@syncodeindex vr cp
8583 @@syncodeindex fn cp
8584 @end group
8585 @end example
8587 @cindex Fonts for indices
8588 The @code{@@syncodeindex} command puts all the entries from the `from'
8589 index (the redirected index) into the @code{@@code} font, overriding
8590 whatever default font is used by the index to which the entries are
8591 now directed.  This way, if you direct function names from a function
8592 index into a concept index, all the function names are printed in the
8593 @code{@@code} font as you would expect.@refill
8595 @node synindex,  , syncodeindex, Combining Indices
8596 @subsection @code{@@synindex}
8597 @findex synindex
8599 The @code{@@synindex} command is nearly the same as the
8600 @code{@@syncodeindex} command, except that it does not put the
8601 `from' index  entries into the @code{@@code} font; rather it puts
8602 them in the roman font.  Thus, you use @code{@@synindex} when you
8603 merge a concept index into a function index.@refill
8605 @xref{Printing Indices & Menus}, for information about printing an index
8606 at the end of a book or creating an index menu in an Info file.@refill
8608 @node New Indices,  , Combining Indices, Indices
8609 @section Defining New Indices
8610 @cindex Defining new indices
8611 @cindex Indices, defining new
8612 @cindex New index defining
8613 @findex defindex
8614 @findex defcodeindex
8616 In addition to the predefined indices, you may use the
8617 @code{@@defindex} and @code{@@defcodeindex} commands to define new
8618 indices.  These commands create new indexing @@-commands with which
8619 you mark index entries.  The @code{@@defindex }command is used like
8620 this:@refill
8622 @example
8623 @@defindex @var{name}
8624 @end example
8626 The name of an index should be a two letter word, such as @samp{au}.
8627 For example:@refill
8629 @example
8630 @@defindex au
8631 @end example
8633 This defines a new index, called the @samp{au} index.  At the same
8634 time, it creates a new indexing command, @code{@@auindex}, that you
8635 can use to make index entries.  Use the new indexing command just as
8636 you would use a predefined indexing command.@refill
8638 For example, here is a section heading followed by a concept index
8639 entry and two @samp{au} index entries.@refill
8641 @example
8642 @@section Cognitive Semantics
8643 @@cindex kinesthetic image schemas
8644 @@auindex Johnson, Mark
8645 @@auindex Lakoff, George
8646 @end example
8648 @noindent
8649 (Evidently, @samp{au} serves here as an abbreviation for ``author''.)
8650 Texinfo constructs the new indexing command by concatenating the name
8651 of the index with @samp{index}; thus, defining an @samp{au} index
8652 leads to the automatic creation of an @code{@@auindex} command.@refill
8654 Use the @code{@@printindex} command to print the index, as you do with
8655 the predefined indices.  For example:@refill
8657 @example
8658 @group
8659 @@node Author Index, Subject Index, , Top
8660 @@unnumbered Author Index
8662 @@printindex au
8663 @end group
8664 @end example
8666 The @code{@@defcodeindex} is like the @code{@@defindex} command, except
8667 that, in the printed output, it prints entries in an @code{@@code} font
8668 instead of a roman font.  Thus, it parallels the @code{@@findex} command
8669 rather than the @code{@@cindex} command.@refill
8671 You should define new indices within or right after the end-of-header
8672 line of a Texinfo file, before any @code{@@synindex} or
8673 @code{@@syncodeindex} commands (@pxref{Header}).@refill
8675 @node Insertions, Breaks, Indices, Top
8676 @comment  node-name,  next,  previous,  up
8677 @chapter Special Insertions
8678 @cindex Inserting special characters and symbols
8679 @cindex Special insertions
8681 Texinfo provides several commands for inserting characters that have
8682 special meaning in Texinfo, such as braces, and for other graphic
8683 elements that do not correspond to simple characters you can type.
8685 @iftex
8686 These are:
8688 @itemize @bullet
8689 @item Braces, @samp{@@} and periods.
8690 @item Whitespace within and around a sentence.
8691 @item Accents.
8692 @item Dots and bullets.
8693 @item The @TeX{} logo and the copyright symbol.
8694 @item Mathematical expressions.
8695 @end itemize
8696 @end iftex
8698 @menu
8699 * Braces Atsigns::              How to insert braces, @samp{@@}.
8700 * Inserting Space::             How to insert the right amount of space
8701                                   within a sentence.
8702 * Inserting Accents::           How to insert accents and special characters.
8703 * Dots Bullets::                How to insert dots and bullets.
8704 * TeX and copyright::           How to insert the @TeX{} logo
8705                                   and the copyright symbol.
8706 * pounds::                      How to insert the pounds currency symbol.
8707 * minus::                       How to insert a minus sign.
8708 * math::                        How to format a mathematical expression.
8709 * Glyphs::                      How to indicate results of evaluation,
8710                                   expansion of macros, errors, etc.
8711 * Images::                      How to include graphics.
8712 @end menu
8715 @node Braces Atsigns, Inserting Space, Insertions, Insertions
8716 @section Inserting @@ and Braces
8717 @cindex Inserting @@, braces
8718 @cindex Braces, inserting
8719 @cindex Special characters, commands to insert
8720 @cindex Commands to insert special characters
8722 @samp{@@} and curly braces are special characters in Texinfo.  To insert
8723 these characters so they appear in text, you must put an @samp{@@} in
8724 front of these characters to prevent Texinfo from misinterpreting
8725 them.
8727 Do not put braces after any of these commands; they are not
8728 necessary.
8730 @menu
8731 * Inserting An Atsign::         How to insert @samp{@@}.
8732 * Inserting Braces::            How to insert @samp{@{} and @samp{@}}.
8733 @end menu
8735 @node Inserting An Atsign, Inserting Braces, Braces Atsigns, Braces Atsigns
8736 @subsection Inserting @samp{@@} with @@@@
8737 @findex @@ @r{(single @samp{@@})}
8739 @code{@@@@} stands for a single @samp{@@} in either printed or Info
8740 output.
8742 Do not put braces after an @code{@@@@} command.
8744 @node Inserting Braces,  , Inserting An Atsign, Braces Atsigns
8745 @subsection Inserting @samp{@{} and @samp{@}}with @@@{ and @@@}
8746 @findex @{ @r{(single @samp{@{})}
8747 @findex @} @r{(single @samp{@}})}
8749 @code{@@@{} stands for a single @samp{@{} in either printed or Info
8750 output.
8752 @code{@@@}} stands for a single @samp{@}} in either printed or Info
8753 output.
8755 Do not put braces after either an @code{@@@{} or an @code{@@@}}
8756 command.
8759 @node Inserting Space, Inserting Accents, Braces Atsigns, Insertions
8760 @section Inserting Space
8762 @cindex Inserting space
8763 @cindex Spacing, inserting
8764 @cindex Whitespace, inserting
8765 The following sections describe commands that control spacing of various
8766 kinds within and after sentences.
8768 @menu
8769 * Not Ending a Sentence::       Sometimes a . doesn't end a sentence.
8770 * Ending a Sentence::           Sometimes it does.
8771 * Multiple Spaces::             Inserting multiple spaces.
8772 * dmn::                         How to format a dimension.
8773 @end menu
8775 @node Not Ending a Sentence, Ending a Sentence, Inserting Space, Inserting Space
8776 @subsection Not Ending a Sentence
8778 @cindex Not ending a sentence
8779 @cindex Sentence non-ending punctuation
8780 @cindex Periods, inserting
8781 Depending on whether a period or exclamation point or question mark is
8782 inside or at the end of a sentence, less or more space is inserted after
8783 a period in a typeset manual.  Since it is not always possible for
8784 Texinfo to determine when a period ends a sentence and when it is used
8785 in an abbreviation, special commands are needed in some circumstances.
8786 (Usually, Texinfo can guess how to handle periods, so you do not need to
8787 use the special commands; you just enter a period as you would if you
8788 were using a typewriter, which means you put two spaces after the
8789 period, question mark, or exclamation mark that ends a sentence.)
8791 @findex : @r{(suppress widening)}
8792 Use the @code{@@:}@: command after a period, question mark,
8793 exclamation mark, or colon that should not be followed by extra space.
8794 For example, use @code{@@:}@: after periods that end abbreviations
8795 which are not at the ends of sentences.
8797 @need 700
8798 For example,
8800 @example
8801 The s.o.p.@@: has three parts @dots{}
8802 The s.o.p. has three parts @dots{}
8803 @end example
8805 @noindent
8806 @ifinfo
8807 produces
8808 @end ifinfo
8809 @iftex
8810 produces the following.  If you look carefully at this printed output,
8811 you will see a little more whitespace after @samp{s.o.p.} in the second
8812 line.@refill
8813 @end iftex
8815 @quotation
8816 The s.o.p.@: has three parts @dots{}@*
8817 The s.o.p. has three parts @dots{}
8818 @end quotation
8820 @noindent
8821 (Incidentally, @samp{s.o.p.} is an abbreviation for ``Standard Operating
8822 Procedure''.)
8824 @code{@@:} has no effect on the Info output.  Do not put braces after
8825 @code{@@:}.
8828 @node Ending a Sentence, Multiple Spaces, Not Ending a Sentence, Inserting Space
8829 @subsection Ending a Sentence
8831 @cindex Ending a Sentence
8832 @cindex Sentence ending punctuation
8834 @findex .  @r{(end of sentence)}
8835 @findex ! @r{(end of sentence)}
8836 @findex ? @r{(end of sentence)}
8837 Use @code{@@.}@: instead of a period, @code{@@!}@: instead of an
8838 exclamation point, and @code{@@?}@: instead of a question mark at the end
8839 of a sentence that ends with a single capital letter.  Otherwise, @TeX{}
8840 will think the letter is an abbreviation and will not insert the correct
8841 end-of-sentence spacing.  Here is an example:
8843 @example
8844 Give it to M.I.B. and to M.E.W@@.  Also, give it to R.J.C@@.
8845 Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.
8846 @end example
8848 @noindent
8849 @ifinfo
8850 produces
8851 @end ifinfo
8852 @iftex
8853 produces the following.  If you look carefully at this printed output,
8854 you will see a little more whitespace after the @samp{W} in the first
8855 line.
8856 @end iftex
8858 @quotation
8859 Give it to M.I.B. and to M.E.W@.  Also, give it to R.J.C@.@*
8860 Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.
8861 @end quotation
8863 In the Info file output, @code{@@.}@: is equivalent to a simple
8864 @samp{.}; likewise for @code{@@!}@: and @code{@@?}@:.
8866 The meanings of @code{@@:} and @code{@@.}@: in Texinfo are designed to
8867 work well with the Emacs sentence motion commands (@pxref{Sentences,,,
8868 emacs, The GNU Emacs Manual}).  This made it necessary for them to be
8869 incompatible with some other formatting systems that use @@-commands.
8871 Do not put braces after any of these commands.
8874 @node Multiple Spaces, dmn, Ending a Sentence, Inserting Space
8875 @subsection Multiple Spaces
8877 @cindex Multiple spaces
8878 @cindex Whitespace, inserting
8879 @findex (space)
8880 @findex (tab)
8881 @findex (newline)
8883 Ordinarily, @TeX{} collapses multiple whitespace characters (space, tab,
8884 and newline) into a single space.  Info output, on the other hand,
8885 preserves whitespace as you type it, except for changing a newline into
8886 a space; this is why it is important to put two spaces at the end of
8887 sentences in Texinfo documents.
8889 Occasionally, you may want to actually insert several consecutive
8890 spaces, either for purposes of example (what your program does with
8891 multiple spaces as input), or merely for purposes of appearance in
8892 headings or lists.  Texinfo supports three commands:
8893 @code{@@@kbd{SPACE}}, @code{@@@kbd{TAB}}, and @code{@@@kbd{NL}}, all of
8894 which insert a single space into the output.  (Here,
8895 @code{@@@kbd{SPACE}} represents an @samp{@@} character followed by a
8896 space, i.e., @samp{@@ }, and @kbd{TAB} and @kbd{NL} represent the tab
8897 character and end-of-line, i.e., when @samp{@@} is the last character on
8898 a line.)
8900 For example,
8901 @example
8902 Spacey@@ @@ @@ @@
8903 example.
8904 @end example
8906 @noindent produces
8908 @example
8909 Spacey@ @ @ @
8910 example.
8911 @end example
8913 Other possible uses of @code{@@@kbd{SPACE}} have been subsumed by
8914 @code{@@multitable} (@pxref{Multi-column Tables}).
8916 Do not follow any of these commands with braces.
8919 @node dmn,  , Multiple Spaces, Inserting Space
8920 @subsection @code{@@dmn}@{@var{dimension}@}: Format a Dimension
8921 @cindex Thin space between number, dimension
8922 @cindex Dimension formatting
8923 @cindex Format a dimension
8924 @findex dmn
8926 At times, you may want to write @samp{12@dmn{pt}} or
8927 @samp{8.5@dmn{in}} with little or no space between the number and the
8928 abbreviation for the dimension.  You can use the @code{@@dmn} command
8929 to do this.  On seeing the command, @TeX{} inserts just enough space
8930 for proper typesetting; the Info formatting commands insert no space
8931 at all, since the Info file does not require it.@refill
8933 To use the @code{@@dmn} command, write the number and then follow it
8934 immediately, with no intervening space, by @code{@@dmn}, and then by
8935 the dimension within braces.  For example,
8937 @example
8938 A4 paper is 8.27@@dmn@{in@} wide.
8939 @end example
8941 @noindent
8942 produces
8944 @quotation
8945 A4 paper is 8.27@dmn{in} wide.
8946 @end quotation
8948 Not everyone uses this style.  Some people prefer @w{@samp{8.27 in.@@:}}
8949 or @w{@samp{8.27 inches}} to @samp{8.27@@dmn@{in@}} in the Texinfo file.
8950 In these cases, however, the formatters may insert a line break between
8951 the number and the dimension, so use @code{@@w} (@pxref{w}).  Also, if
8952 you write a period after an abbreviation within a sentence, you should
8953 write @samp{@@:} after the period to prevent @TeX{} from inserting extra
8954 whitespace, as shown here.  @xref{Inserting Space}.
8957 @node Inserting Accents, Dots Bullets, Inserting Space, Insertions
8958 @section Inserting Accents
8960 @cindex Inserting accents
8961 @cindex Accents, inserting
8962 @cindex Floating accents, inserting
8964 Here is a table with the commands Texinfo provides for inserting
8965 floating accents.  The commands with non-alphabetic names do not take
8966 braces around their argument (which is taken to be the next character).
8967 (Exception: @code{@@,} @emph{does} take braces around its argument.)
8968 This is so as to make the source as convenient to type and read as
8969 possible, since accented characters are very common in some languages.
8971 @findex "
8972 @cindex Umlaut accent
8973 @findex '
8974 @cindex Acute accent
8975 @findex =
8976 @cindex Macron accent
8977 @findex ^
8978 @cindex Circumflex accent
8979 @findex `
8980 @cindex Grave accent
8981 @findex ~
8982 @cindex Tilde accent
8983 @findex ,
8984 @cindex Cedilla accent
8985 @findex dotaccent
8986 @cindex Dot accent
8987 @findex H
8988 @cindex Hungariam umlaut accent
8989 @findex ringaccent
8990 @cindex Ring accent
8991 @findex tieaccent
8992 @cindex Tie-after accent
8993 @findex u
8994 @cindex Breve accent
8995 @findex ubaraccent
8996 @cindex Underbar accent
8997 @findex udotaccent
8998 @cindex Underdot accent
8999 @findex v
9000 @cindex Check accent
9001 @multitable {@@questiondown@{@}} {Output} {macron/overbar accent}
9002 @item Command               @tab Output         @tab What
9003 @item @t{@@"o}              @tab @"o            @tab umlaut accent
9004 @item @t{@@'o}              @tab @'o            @tab acute accent
9005 @item @t{@@,@{c@}}          @tab @,{c}          @tab cedilla accent
9006 @item @t{@@=o}              @tab @=o            @tab macron/overbar accent
9007 @item @t{@@^o}              @tab @^o            @tab circumflex accent
9008 @item @t{@@`o}              @tab @`o            @tab grave accent
9009 @item @t{@@~o}              @tab @~o            @tab tilde accent
9010 @item @t{@@dotaccent@{o@}}  @tab @dotaccent{o}  @tab overdot accent
9011 @item @t{@@H@{o@}}          @tab @H{o}          @tab long Hungarian umlaut
9012 @item @t{@@ringaccent@{o@}} @tab @ringaccent{o} @tab ring accent
9013 @item @t{@@tieaccent@{oo@}} @tab @tieaccent{oo} @tab tie-after accent
9014 @item @t{@@u@{o@}}          @tab @u{o}          @tab breve accent
9015 @item @t{@@ubaraccent@{o@}} @tab @ubaraccent{o} @tab underbar accent
9016 @item @t{@@udotaccent@{o@}} @tab @udotaccent{o} @tab underdot accent
9017 @item @t{@@v@{o@}}          @tab @v{o}          @tab hacek or check accent
9018 @end multitable
9020 This table lists the Texinfo commands for inserting other characters
9021 commonly used in languages other than English.
9023 @findex questiondown
9024 @cindex @questiondown{}
9025 @findex exclamdown
9026 @cindex @exclamdown{}
9027 @findex aa
9028 @cindex @aa{}
9029 @findex AA
9030 @cindex @AA{}
9031 @findex ae
9032 @cindex @ae{}
9033 @findex AE
9034 @cindex @AE{}
9035 @findex dotless
9036 @cindex @dotless{i}
9037 @cindex @dotless{j}
9038 @cindex Dotless i, j
9039 @findex l
9040 @cindex @l{}
9041 @findex L
9042 @cindex @L{}
9043 @findex o
9044 @cindex @o{}
9045 @findex O
9046 @cindex @O{}
9047 @findex oe
9048 @cindex @oe{}
9049 @findex OE
9050 @cindex @OE{}
9051 @findex ss
9052 @cindex @ss{}
9053 @cindex Es-zet
9054 @cindex Sharp S
9055 @cindex German S
9056 @multitable {@@questiondown@{@}} {oe,OE} {es-zet or sharp S}
9057 @item @t{@@exclamdown@{@}}   @tab @exclamdown{}   @tab upside-down !
9058 @item @t{@@questiondown@{@}} @tab @questiondown{} @tab upside-down ?
9059 @item @t{@@aa@{@},@@AA@{@}}  @tab @aa{},@AA{}     @tab A,a with circle
9060 @item @t{@@ae@{@},@@AE@{@}}  @tab @ae{},@AE{}     @tab ae,AE ligatures
9061 @item @t{@@dotless@{i@}}     @tab @dotless{i}     @tab dotless i
9062 @item @t{@@dotless@{j@}}     @tab @dotless{j}     @tab dotless j
9063 @item @t{@@l@{@},@@L@{@}}    @tab @l{},@L{}       @tab suppressed-L,l
9064 @item @t{@@o@{@},@@O@{@}}    @tab @o{},@O{}       @tab O,o with slash
9065 @item @t{@@oe@{@},@@OE@{@}}  @tab @oe{},@OE{}     @tab OE,oe ligatures
9066 @item @t{@@ss@{@}}           @tab @ss{}           @tab es-zet or sharp S
9067 @end multitable
9070 @node Dots Bullets, TeX and copyright, Inserting Accents, Insertions
9071 @section Inserting Ellipsis, Dots, and Bullets
9072 @cindex Dots, inserting
9073 @cindex Bullets, inserting
9074 @cindex Ellipsis, inserting
9075 @cindex Inserting ellipsis
9076 @cindex Inserting dots
9077 @cindex Special typesetting commands
9078 @cindex Typesetting commands for dots, etc.
9080 An @dfn{ellipsis} (a line of dots) is not typeset as a string of
9081 periods, so a special command is used for ellipsis in Texinfo.  The
9082 @code{@@bullet} command is special, too.  Each of these commands is
9083 followed by a pair of braces, @samp{@{@}}, without any whitespace
9084 between the name of the command and the braces.  (You need to use braces
9085 with these commands because you can use them next to other text; without
9086 the braces, the formatters would be confused.  @xref{Command Syntax, ,
9087 @@-Command Syntax}, for further information.)@refill
9089 @menu
9090 * dots::                        How to insert dots @dots{}
9091 * bullet::                      How to insert a bullet.
9092 @end menu
9095 @node dots, bullet, Dots Bullets, Dots Bullets
9096 @subsection @code{@@dots}@{@} (@dots{})
9097 @findex dots
9098 @cindex Inserting dots
9099 @cindex Dots, inserting
9101 Use the @code{@@dots@{@}} command to generate an ellipsis, which is
9102 three dots in a row, appropriately spaced, like this: `@dots{}'.  Do
9103 not simply write three periods in the input file; that would work for
9104 the Info file output, but would produce the wrong amount of space
9105 between the periods in the printed manual.
9107 Similarly, the @code{@@enddots@{@}} command generates an
9108 end-of-sentence ellipsis (four dots) @enddots{}
9110 @iftex
9111 Here is an ellipsis: @dots{}
9112 Here are three periods in a row: ...
9114 In printed output, the three periods in a row are closer together than
9115 the dots in the ellipsis.
9116 @end iftex
9119 @node bullet,  , dots, Dots Bullets
9120 @subsection @code{@@bullet}@{@} (@bullet{})
9121 @findex bullet
9123 Use the @code{@@bullet@{@}} command to generate a large round dot, or
9124 the closest possible thing to one.  In Info, an asterisk is used.@refill
9126 Here is a bullet: @bullet{}
9128 When you use @code{@@bullet} in @code{@@itemize}, you do not need to
9129 type the braces, because @code{@@itemize} supplies them.
9130 (@xref{itemize, , @code{@@itemize}}.)@refill
9133 @node TeX and copyright, pounds, Dots Bullets, Insertions
9134 @section Inserting @TeX{} and the Copyright Symbol
9136 The logo `@TeX{}' is typeset in a special fashion and it needs an
9137 @@-command.  The copyright symbol, `@copyright{}', is also special.
9138 Each of these commands is followed by a pair of braces, @samp{@{@}},
9139 without any whitespace between the name of the command and the
9140 braces.@refill
9142 @menu
9143 * tex::                         How to insert the @TeX{} logo.
9144 * copyright symbol::            How to use @code{@@copyright}@{@}.
9145 @end menu
9148 @node tex, copyright symbol, TeX and copyright, TeX and copyright
9149 @subsection @code{@@TeX}@{@} (@TeX{})
9150 @findex tex (command)
9152 Use the @code{@@TeX@{@}} command to generate `@TeX{}'.  In a printed
9153 manual, this is a special logo that is different from three ordinary
9154 letters.  In Info, it just looks like @samp{TeX}.  The
9155 @code{@@TeX@{@}} command is unique among Texinfo commands in that the
9156 @kbd{T} and the @kbd{X} are in upper case.@refill
9159 @node copyright symbol,  , tex, TeX and copyright
9160 @subsection @code{@@copyright}@{@} (@copyright{})
9161 @findex copyright
9163 Use the @code{@@copyright@{@}} command to generate `@copyright{}'.  In
9164 a printed manual, this is a @samp{c} inside a circle, and in Info,
9165 this is @samp{(C)}.@refill
9168 @node pounds, minus, TeX and copyright, Insertions
9169 @section @code{@@pounds}@{@} (@pounds{}): Pounds Sterling
9170 @findex pounds
9172 Use the @code{@@pounds@{@}} command to generate `@pounds{}'.  In a
9173 printed manual, this is the symbol for the currency pounds sterling.
9174 In Info, it is a @samp{#}.  Other currency symbols are unfortunately not
9175 available.
9178 @node minus, math, pounds, Insertions
9179 @section @code{@@minus}@{@} (@minus{}): Inserting a Minus Sign
9180 @findex minus
9182 Use the @code{@@minus@{@}} command to generate a minus sign.  In a
9183 fixed-width font, this is a single hyphen, but in a proportional font,
9184 the symbol is the customary length for a minus sign---a little longer
9185 than a hyphen, shorter than an em-dash:
9187 @display
9188 @samp{@minus{}} is a minus sign generated with @samp{@@minus@{@}},
9190 `-' is a hyphen generated with the character @samp{-},
9192 `---' is an em-dash for text.
9193 @end display
9195 @noindent
9196 In the fixed-width font used by Info, @code{@@minus@{@}} is the same
9197 as a hyphen.
9199 You should not use @code{@@minus@{@}} inside @code{@@code} or
9200 @code{@@example} because the width distinction is not made in the
9201 fixed-width font they use.
9203 When you use @code{@@minus} to specify the mark beginning each entry in
9204 an itemized list, you do not need to type the braces
9205 (@pxref{itemize, , @code{@@itemize}}.)
9208 @node math, Glyphs, minus, Insertions
9209 @section @code{@@math}: Inserting Mathematical Expressions
9210 @findex math
9211 @cindex Mathematical expressions
9213 You can write a short mathematical expression with the @code{@@math}
9214 command.  Write the mathematical expression between braces, like this:
9216 @example
9217 @@math@{(a + b)(a + b) = a^2 + 2ab + b^2@}
9218 @end example
9220 @iftex
9221 @need 1000
9222 @noindent
9223 This produces the following in @TeX{}:
9225 @display
9226 @math{(a + b)(a + b) = a^2 + 2ab + b^2}
9227 @end display
9229 @noindent
9230 and the following in Info:
9231 @end iftex
9232 @ifinfo
9233 @noindent
9234 This produces the following in Info:
9235 @end ifinfo
9237 @example
9238 (a + b)(a + b) = a^2 + 2ab + b^2
9239 @end example
9241 Thus, the @code{@@math} command has no effect on the Info output.
9243 For complex mathematical expressions, you can also use @TeX{} directly
9244 (@pxref{Raw Formatter Commands}).  When you use @TeX{} directly,
9245 remember to write the mathematical expression between one or two
9246 @samp{$} (dollar-signs) as appropriate.
9249 @node Glyphs, Images, math, Insertions
9250 @section Glyphs for Examples
9251 @cindex Glyphs
9253 In Texinfo, code is often illustrated in examples that are delimited
9254 by @code{@@example} and @code{@@end example}, or by @code{@@lisp} and
9255 @code{@@end lisp}.  In such examples, you can indicate the results of
9256 evaluation or an expansion using @samp{@result{}} or
9257 @samp{@expansion{}}.  Likewise, there are commands to insert glyphs
9258 to indicate
9259 printed output, error messages, equivalence of expressions, and the
9260 location of point.@refill
9262 The glyph-insertion commands do not need to be used within an example, but
9263 most often they are.  Every  glyph-insertion command is followed by a pair of
9264 left- and right-hand braces.@refill
9266 @menu
9267 * Glyphs Summary::              
9268 * result::                      How to show the result of expression.
9269 * expansion::                   How to indicate an expansion.
9270 * Print Glyph::                 How to indicate printed output.
9271 * Error Glyph::                 How to indicate an error message.
9272 * Equivalence::                 How to indicate equivalence.
9273 * Point Glyph::                 How to indicate the location of point.
9274 @end menu
9276 @node Glyphs Summary, result, Glyphs, Glyphs
9277 @ifinfo
9278 @subheading Glyphs Summary
9280 Here are the different glyph commands:@refill
9281 @end ifinfo
9283 @table @asis
9284 @item @result{}
9285 @code{@@result@{@}} points to the result of an expression.@refill
9287 @item @expansion{}
9288 @code{@@expansion@{@}} shows the results of a macro expansion.@refill
9290 @item @print{}
9291 @code{@@print@{@}} indicates printed output.@refill
9293 @item @error{}
9294 @code{@@error@{@}} indicates that the following text is an error
9295 message.@refill
9297 @item @equiv{}
9298 @code{@@equiv@{@}} indicates the exact equivalence of two forms.@refill
9300 @item @point{}
9301 @code{@@point@{@}} shows the location of point.@refill
9302 @end table
9305 @menu
9306 * result::                      
9307 * expansion::                   
9308 * Print Glyph::                 
9309 * Error Glyph::                 
9310 * Equivalence::                 
9311 * Point Glyph::                 
9312 @end menu
9314 @node result, expansion, Glyphs Summary, Glyphs
9315 @subsection @code{@@result@{@}} (@result{}): Indicating Evaluation
9316 @cindex Result of an expression
9317 @cindex Indicating evaluation
9318 @cindex Evaluation glyph
9319 @cindex Value of an expression, indicating
9321 Use the @code{@@result@{@}} command to indicate the result of
9322 evaluating an expression.@refill
9324 @iftex
9325 The @code{@@result@{@}} command is displayed as @samp{=>} in Info and
9326 as @samp{@result{}} in the printed output.
9327 @end iftex
9328 @ifinfo
9329 The @code{@@result@{@}} command is displayed as @samp{@result{}} in Info
9330 and as a double stemmed arrow in the printed output.@refill
9331 @end ifinfo
9333 Thus, the following,
9335 @lisp
9336 (cdr '(1 2 3))
9337      @result{} (2 3)
9338 @end lisp
9340 @noindent
9341 may be read as ``@code{(cdr '(1 2 3))} evaluates to @code{(2 3)}''.
9344 @node expansion, Print Glyph, result, Glyphs
9345 @subsection @code{@@expansion@{@}} (@expansion{}): Indicating an Expansion
9346 @cindex Expansion, indicating it
9348 When an expression is a macro call, it expands into a new expression.
9349 You can indicate the result of the expansion with the
9350 @code{@@expansion@{@}} command.@refill
9352 @iftex
9353 The @code{@@expansion@{@}} command is displayed as @samp{==>} in Info and
9354 as @samp{@expansion{}} in the printed output.
9355 @end iftex
9356 @ifinfo
9357 The @code{@@expansion@{@}} command is displayed as @samp{@expansion{}}
9358 in Info and as a long arrow with a flat base in the printed output.@refill
9359 @end ifinfo
9361 @need 700
9362 For example, the following
9364 @example
9365 @group
9366 @@lisp
9367 (third '(a b c))
9368      @@expansion@{@} (car (cdr (cdr '(a b c))))
9369      @@result@{@} c
9370 @@end lisp
9371 @end group
9372 @end example
9374 @noindent
9375 produces
9377 @lisp
9378 @group
9379 (third '(a b c))
9380      @expansion{} (car (cdr (cdr '(a b c))))
9381      @result{} c
9382 @end group
9383 @end lisp
9385 @noindent
9386 which may be read as:
9388 @quotation
9389 @code{(third '(a b c))} expands to @code{(car (cdr (cdr '(a b c))))};
9390 the result of evaluating the expression is @code{c}.
9391 @end quotation
9393 @noindent
9394 Often, as in this case, an example looks better if the
9395 @code{@@expansion@{@}} and @code{@@result@{@}} commands are indented
9396 five spaces.@refill
9399 @node Print Glyph, Error Glyph, expansion, Glyphs
9400 @subsection @code{@@print@{@}} (@print{}): Indicating Printed Output
9401 @cindex Printed output, indicating it
9403 Sometimes an expression will print output during its execution.  You
9404 can indicate the printed output with the @code{@@print@{@}} command.@refill
9406 @iftex
9407 The @code{@@print@{@}} command is displayed as @samp{-|} in Info and
9408 as @samp{@print{}} in the printed output.
9409 @end iftex
9410 @ifinfo
9411 The @code{@@print@{@}} command is displayed as @samp{@print{}} in Info
9412 and similarly, as a horizontal dash butting against a vertical bar, in
9413 the printed output.@refill
9414 @end ifinfo
9416 In the following example, the printed text is indicated with
9417 @samp{@print{}}, and the value of the expression follows on the
9418 last line.@refill
9420 @lisp
9421 @group
9422 (progn (print 'foo) (print 'bar))
9423      @print{} foo
9424      @print{} bar
9425      @result{} bar
9426 @end group
9427 @end lisp
9429 @noindent
9430 In a Texinfo source file, this example is written as follows:
9432 @lisp
9433 @group
9434 @@lisp
9435 (progn (print 'foo) (print 'bar))
9436      @@print@{@} foo
9437      @@print@{@} bar
9438      @@result@{@} bar
9439 @@end lisp
9440 @end group
9441 @end lisp
9444 @node Error Glyph, Equivalence, Print Glyph, Glyphs
9445 @subsection @code{@@error@{@}} (@error{}): Indicating an Error Message
9446 @cindex Error message, indicating it
9448 A piece of code may cause an error when you evaluate it.  You can
9449 designate the error message with the @code{@@error@{@}} command.@refill
9451 @iftex
9452 The @code{@@error@{@}} command is displayed as @samp{error-->} in Info
9453 and as @samp{@error{}} in the printed output.
9454 @end iftex
9455 @ifinfo
9456 The @code{@@error@{@}} command is displayed as @samp{@error{}} in Info
9457 and as the word `error' in a box in the printed output.@refill
9458 @end ifinfo
9460 @need 700
9461 Thus,
9463 @example
9464 @@lisp
9465 (+ 23 'x)
9466 @@error@{@} Wrong type argument: integer-or-marker-p, x
9467 @@end lisp
9468 @end example
9470 @noindent
9471 produces
9473 @lisp
9474 (+ 23 'x)
9475 @error{} Wrong type argument: integer-or-marker-p, x
9476 @end lisp
9478 @noindent
9479 This indicates that the following error message is printed
9480 when you evaluate the expression:
9482 @lisp
9483 Wrong type argument: integer-or-marker-p, x
9484 @end lisp
9486 @samp{@error{}} itself is not part of the error message.
9489 @node Equivalence, Point Glyph, Error Glyph, Glyphs
9490 @subsection @code{@@equiv@{@}} (@equiv{}): Indicating Equivalence
9491 @cindex Equivalence, indicating it
9493 Sometimes two expressions produce identical results.  You can indicate the
9494 exact equivalence of two forms with the @code{@@equiv@{@}} command.@refill
9496 @iftex
9497 The @code{@@equiv@{@}} command is displayed as @samp{==} in Info and
9498 as @samp{@equiv{}} in the printed output.
9499 @end iftex
9500 @ifinfo
9501 The @code{@@equiv@{@}} command is displayed as @samp{@equiv{}} in Info
9502 and as a three parallel horizontal lines in the printed output.@refill
9503 @end ifinfo
9505 Thus,
9507 @example
9508 @@lisp
9509 (make-sparse-keymap) @@equiv@{@} (list 'keymap)
9510 @@end lisp
9511 @end example
9513 @noindent
9514 produces
9516 @lisp
9517 (make-sparse-keymap) @equiv{} (list 'keymap)
9518 @end lisp
9520 @noindent
9521 This indicates that evaluating @code{(make-sparse-keymap)} produces
9522 identical results to evaluating @code{(list 'keymap)}.
9525 @node Point Glyph,  , Equivalence, Glyphs
9526 @subsection @code{@@point@{@}} (@point{}): Indicating Point in a Buffer
9527 @cindex Point, indicating it in a buffer
9529 Sometimes you need to show an example of text in an Emacs buffer.  In
9530 such examples, the convention is to include the entire contents of the
9531 buffer in question between two lines of dashes containing the buffer
9532 name.@refill
9534 You can use the @samp{@@point@{@}} command to show the location of point
9535 in the text in the buffer.  (The symbol for point, of course, is not
9536 part of the text in the buffer; it indicates the place @emph{between}
9537 two characters where point is located.)@refill
9539 @iftex
9540 The @code{@@point@{@}} command is displayed as @samp{-!-} in Info and
9541 as @samp{@point{}} in the printed output.
9542 @end iftex
9543 @ifinfo
9544 The @code{@@point@{@}} command is displayed as @samp{@point{}} in Info
9545 and as a small five pointed star in the printed output.@refill
9546 @end ifinfo
9548 The following example shows the contents of buffer @file{foo} before
9549 and after evaluating a Lisp command to insert the word @code{changed}.@refill
9551 @example
9552 @group
9553 ---------- Buffer: foo ----------
9554 This is the @point{}contents of foo.
9555 ---------- Buffer: foo ----------
9557 @end group
9558 @end example
9560 @example
9561 @group
9562 (insert "changed ")
9563      @result{} nil
9564 ---------- Buffer: foo ----------
9565 This is the changed @point{}contents of foo.
9566 ---------- Buffer: foo ----------
9568 @end group
9569 @end example
9571 In a Texinfo source file, the example is written like this:@refill
9573 @example
9574 @@example
9575 ---------- Buffer: foo ----------
9576 This is the @@point@{@}contents of foo.
9577 ---------- Buffer: foo ----------
9579 (insert "changed ")
9580      @@result@{@} nil
9581 ---------- Buffer: foo ----------
9582 This is the changed @@point@{@}contents of foo.
9583 ---------- Buffer: foo ----------
9584 @@end example
9585 @end example
9588 @c this should be described with figures when we have them
9589 @c perhaps in the quotation/example chapter.
9590 @node Images,  , Glyphs, Insertions
9591 @section Inserting Images
9593 @cindex Images, inserting
9594 @cindex Pictures, inserting
9595 @findex image
9597 You can insert an image in an external file with the @code{@@image}
9598 command:
9600 @example
9601 @@image@{@var{filename}, @r{[}@var{width}@r{]}, @r{[}@var{height}@r{]}@}
9602 @end example
9604 @cindex Formats for images
9605 @cindex Image formats
9606 The @var{filename} argument is mandatory, and must not have an
9607 extension, because the different processors support different formats:
9608 @TeX{} reads the file @file{@var{filename}.eps} (Encapsulated PostScript
9609 format); @code{makeinfo} uses @file{@var{filename}.txt} verbatim for
9610 Info output (more or less as if it was an @code{@@example}).  HTML
9611 output requires @file{@var{filename}.jpg}.
9613 @cindex Width of images
9614 @cindex Height of images
9615 @cindex Aspect ratio of images
9616 @cindex Distorting images
9617 The optional @var{width} and @var{height} arguments specify the size to
9618 scale the image to (they are ignored for Info output).  If they are both
9619 specified, the image is presented in its natural size (given in the
9620 file); if only one is specified, the other is scaled proportionately;
9621 and if both are specified, both are respected, thus possibly distorting
9622 the original image by changing its aspect ratio.
9624 @cindex Dimensions and image sizes
9625 The @var{width} and @var{height} may be specified using any valid @TeX{}
9626 dimension, namely:
9628 @table @asis
9629 @item pt
9630 @cindex Points (dimension)
9631 point (72.27pt = 1in)
9632 @item pc
9633 @cindex Picas
9634 pica (1pc = 12pt)
9635 @item bp
9636 @cindex Big points
9637 big point (72bp = 1in)
9638 @item in
9639 @cindex Inches
9640 inch
9641 @item cm
9642 @cindex Centimeters
9643 centimeter (2.54cm = 1in)
9644 @item mm
9645 @cindex Millimeters
9646 millimeter (10mm = 1cm)
9647 @item dd
9648 @cindex Did@^ot points
9649 did@^ot point (1157dd = 1238pt)
9650 @item cc
9651 @cindex Ciceros
9652 cicero (1cc = 12dd)
9653 @item sp
9654 @cindex Scaled points
9655 scaled point (65536sp = 1pt)
9656 @end table
9658 @pindex ridt.eps
9659 For example, the following will scale a file @file{ridt.eps} to one
9660 inch vertically, with the width scaled proportionately:
9662 @example
9663 @@image@{ridt,,1in@}
9664 @end example
9666 @pindex epsf.tex
9667 For @code{@@image} to work with @TeX{}, the file @file{epsf.tex} must be
9668 installed somewhere that @TeX{} can find it.  This file is included in
9669 the Texinfo distribution and is available from
9670 @uref{ftp://ftp.tug.org/tex/epsf.tex}.
9673 @node Breaks, Definition Commands, Insertions, Top
9674 @chapter Making and Preventing Breaks
9675 @cindex Making line and page breaks
9676 @cindex Preventing line and page breaks
9678 Usually, a Texinfo file is processed both by @TeX{} and by one of the
9679 Info formatting commands.  Line, paragraph, or page breaks sometimes
9680 occur in the `wrong' place in one or other form of output.  You must
9681 ensure that text looks right both in the printed manual and in the
9682 Info file.@refill
9684 For example, in a printed manual, page breaks may occur awkwardly in
9685 the middle of an example; to prevent this, you can hold text together
9686 using a grouping command that keeps the text from being split across
9687 two pages.  Conversely, you may want to force a page break where none
9688 would occur normally.  Fortunately, problems like these do not often
9689 arise.  When they do, use the break, break prevention, or pagination
9690 commands.@refill
9692 @menu
9693 * Break Commands::              Cause and prevent splits.
9694 * Line Breaks::                 How to force a single line to use two lines.
9695 * - and hyphenation::           How to tell TeX about hyphenation points.
9696 * w::                           How to prevent unwanted line breaks.
9697 * sp::                          How to insert blank lines.
9698 * page::                        How to force the start of a new page.
9699 * group::                       How to prevent unwanted page breaks.
9700 * need::                        Another way to prevent unwanted page breaks.
9701 @end menu
9703 @ifinfo
9704 @node Break Commands, Line Breaks, Breaks, Breaks
9705 @heading The Break Commands
9706 @end ifinfo
9707 @iftex
9708 @sp 1
9709 @end iftex
9711 The break commands create or allow line and paragraph breaks:@refill
9713 @table @code
9714 @item @@*
9715 Force a line break.
9717 @item @@sp @var{n}
9718 Skip @var{n} blank lines.@refill
9720 @item @@-
9721 Insert a discretionary hyphen.
9723 @item @@hyphenation@{@var{hy-phen-a-ted words}@}
9724 Define hyphen points in @var{hy-phen-a-ted words}.
9725 @end table
9727 The line-break-prevention command holds text together all on one
9728 line:@refill
9730 @table @code
9731 @item @@w@{@var{text}@}
9732 Prevent @var{text} from being split and hyphenated across two lines.@refill
9733 @end table
9734 @iftex
9735 @sp 1
9736 @end iftex
9738 The pagination commands apply only to printed output, since Info
9739 files do not have pages.@refill
9741 @table @code
9742 @item @@page
9743 Start a new page in the printed manual.@refill
9745 @item @@group
9746 Hold text together that must appear on one printed page.@refill
9748 @item @@need @var{mils}
9749 Start a new printed page if not enough space on this one.@refill
9750 @end table
9752 @node Line Breaks, - and hyphenation, Break Commands, Breaks
9753 @comment  node-name,  next,  previous,  up
9754 @section @code{@@*}: Generate Line Breaks
9755 @findex * @r{(force line break)}
9756 @cindex Line breaks
9757 @cindex Breaks in a line
9759 The @code{@@*} command forces a line break in both the printed manual and
9760 in Info.@refill
9762 @need 700
9763 For example,
9765 @example
9766 This line @@* is broken @@*in two places.
9767 @end example
9769 @noindent
9770 produces
9772 @example
9773 @group
9774 This line
9775  is broken
9776 in two places.
9777 @end group
9778 @end example
9780 @noindent
9781 (Note that the space after the first @code{@@*} command is faithfully
9782 carried down to the next line.)@refill
9784 @need 800
9785 The @code{@@*} command is often used in a file's copyright page:@refill
9787 @example
9788 @group
9789 This is edition 2.0 of the Texinfo documentation,@@*
9790 and is for @dots{}
9791 @end group
9792 @end example
9794 @noindent
9795 In this case, the @code{@@*} command keeps @TeX{} from stretching the
9796 line across the whole page in an ugly manner.@refill
9798 @quotation
9799 @strong{Please note:} Do not write braces after an @code{@@*} command;
9800 they are not needed.@refill
9802 Do not write an @code{@@refill} command at the end of a paragraph
9803 containing an @code{@@*} command; it will cause the paragraph to be
9804 refilled after the line break occurs, negating the effect of the line
9805 break.@refill
9806 @end quotation
9808 @node - and hyphenation, w, Line Breaks, Breaks
9809 @section @code{@@-} and @code{@@hyphenation}: Helping @TeX{} hyphenate
9811 @findex -
9812 @findex hyphenation
9813 @cindex Hyphenation, helping @TeX{} do
9814 @cindex Fine-tuning, and hyphenation
9816 Although @TeX{}'s hyphenation algorithm is generally pretty good, it
9817 does miss useful hyphenation points from time to time.  (Or, far more
9818 rarely, insert an incorrect hyphenation.)  So, for documents with an
9819 unusual vocabulary or when fine-tuning for a printed edition, you may
9820 wish to help @TeX{} out.  Texinfo supports two commands for this:
9822 @table @code
9823 @item @@-
9824 Insert a discretionary hyphen, i.e., a place where @TeX{} can (but does
9825 not have to) hyphenate.  This is especially useful when you notice
9826 an overfull hbox is due to @TeX{} missing a hyphenation (@pxref{Overfull
9827 hboxes}).  @TeX{} will not insert any hyphenation points in a word
9828 containing @code{@@-}.
9830 @item @@hyphenation@{@var{hy-phen-a-ted words}@}
9831 Tell @TeX{} how to hyphenate @var{hy-phen-a-ted words}.  As shown, you
9832 put a @samp{-} at each hyphenation point.  For example:
9833 @example
9834 @@hyphenation@{man-u-script man-u-scripts@}
9835 @end example
9836 @noindent @TeX{} only uses the specified hyphenation points when the
9837 words match exactly, so give all necessary variants.
9838 @end table
9840 Info output is not hyphenated, so these commands have no effect there.
9842 @node w, sp, - and hyphenation, Breaks
9843 @comment  node-name,  next,  previous,  up
9844 @section @code{@@w}@{@var{text}@}: Prevent Line Breaks
9845 @findex w @r{(prevent line break)}
9846 @cindex Line breaks, preventing
9847 @cindex Hyphenation, preventing
9849 @code{@@w@{@var{text}@}} outputs @var{text} and prohibits line breaks
9850 within @var{text}.@refill
9852 You can use the @code{@@w} command to prevent @TeX{} from automatically
9853 hyphenating a long name or phrase that happens to fall near the end of a
9854 line.@refill
9856 @example
9857 You can copy GNU software from @@w@{@@samp@{ftp.gnu.ai.mit.edu@}@}.
9858 @end example
9860 @noindent
9861 produces
9863 @quotation
9864 You can copy GNU software from @w{@samp{ftp.gnu.ai.mit.edu}}.
9865 @end quotation
9867 @quotation
9868 @strong{Caution:} Do not write an @code{@@refill} command at the end
9869 of a paragraph containing an @code{@@w} command; it will cause the
9870 paragraph to be refilled and may thereby negate the effect of the
9871 @code{@@w} command.@refill
9872 @end quotation
9874 @node sp, page, w, Breaks
9875 @comment  node-name,  next,  previous,  up
9876 @section @code{@@sp} @var{n}: Insert Blank Lines
9877 @findex sp @r{(line spacing)}
9878 @cindex Spaces (blank lines)
9879 @cindex Blank lines
9880 @cindex Line spacing
9882 A line beginning with and containing only @code{@@sp @var{n}}
9883 generates @var{n} blank lines of space in both the printed manual and
9884 the Info file.  @code{@@sp} also forces a paragraph break.  For
9885 example,@refill
9887 @example
9888 @@sp 2
9889 @end example
9891 @noindent
9892 generates two blank lines.
9894 The @code{@@sp} command is most often used in the title page.@refill
9896 @ignore
9897 @c node br, page, sp, Breaks
9898 @comment  node-name,  next,  previous,  up
9899 @c section @code{@@br}: Generate Paragraph Breaks
9900 @findex br @r{(paragraph breaks)}
9901 @cindex Paragraph breaks
9902 @cindex Breaks in a paragraph
9904 The @code{@@br} command forces a paragraph break.  It inserts a blank
9905 line.  You can use the command within or at the end of a line.  If
9906 used within a line, the @code{@@br@{@}} command must be followed by
9907 left and right braces (as shown here) to mark the end of the
9908 command.@refill
9910 @need 700
9911 For example,
9913 @example
9914 @group
9915 This line @@br@{@}contains and is ended by paragraph breaks@@br
9916 and is followed by another line.
9917 @end group
9918 @end example
9920 @noindent
9921 produces
9923 @example
9924 @group
9925 This line
9927 contains and is ended by paragraph breaks
9929 and is followed by another line.
9930 @end group
9931 @end example
9933 The @code{@@br} command is seldom used.
9934 @end ignore
9936 @node page, group, sp, Breaks
9937 @comment  node-name,  next,  previous,  up
9938 @section @code{@@page}: Start a New Page
9939 @cindex Page breaks
9940 @findex page
9942 A line containing only @code{@@page} starts a new page in a printed
9943 manual.  The command has no effect on Info files since they are not
9944 paginated.  An @code{@@page} command is often used in the @code{@@titlepage}
9945 section of a Texinfo file to start the copyright page.@refill
9947 @node group, need, page, Breaks
9948 @comment  node-name,  next,  previous,  up
9949 @section @code{@@group}: Prevent Page Breaks
9950 @cindex Group (hold text together vertically)
9951 @cindex Holding text together vertically
9952 @cindex Vertically holding text together
9953 @findex group
9955 The @code{@@group} command (on a line by itself) is used inside an
9956 @code{@@example} or similar construct to begin an unsplittable vertical
9957 group, which will appear entirely on one page in the printed output.
9958 The group is terminated by a line containing only @code{@@end group}.
9959 These two lines produce no output of their own, and in the Info file
9960 output they have no effect at all.@refill
9962 @c Once said that these environments
9963 @c turn off vertical spacing between ``paragraphs''.
9964 @c Also, quotation used to work, but doesn't in texinfo-2.72
9965 Although @code{@@group} would make sense conceptually in a wide
9966 variety of contexts, its current implementation works reliably only
9967 within @code{@@example} and variants, and within @code{@@display},
9968 @code{@@format}, @code{@@flushleft} and @code{@@flushright}.
9969 @xref{Quotations and Examples}.  (What all these commands have in
9970 common is that each line of input produces a line of output.)  In
9971 other contexts, @code{@@group} can cause anomalous vertical
9972 spacing.@refill
9974 @need 750
9975 This formatting requirement means that you should write:
9977 @example
9978 @group
9979 @@example
9980 @@group
9981 @dots{}
9982 @@end group
9983 @@end example
9984 @end group
9985 @end example
9987 @noindent
9988 with the @code{@@group} and @code{@@end group} commands inside the
9989 @code{@@example} and @code{@@end example} commands.
9991 The @code{@@group} command is most often used to hold an example
9992 together on one page.  In this Texinfo manual, more than 100 examples
9993 contain text that is enclosed between @code{@@group} and @code{@@end
9994 group}.
9996 If you forget to end a group, you may get strange and unfathomable
9997 error messages when you run @TeX{}.  This is because @TeX{} keeps
9998 trying to put the rest of the Texinfo file onto the one page and does
9999 not start to generate error messages until it has processed
10000 considerable text.  It is a good rule of thumb to look for a missing
10001 @code{@@end group} if you get incomprehensible error messages in
10002 @TeX{}.@refill
10004 @node need,  , group, Breaks
10005 @comment  node-name,  next,  previous,  up
10006 @section @code{@@need @var{mils}}: Prevent Page Breaks
10007 @cindex Need space at page bottom
10008 @findex need
10010 A line containing only @code{@@need @var{n}} starts
10011 a new page in a printed manual if fewer than @var{n} mils (thousandths
10012 of an inch) remain on the current page.  Do not use
10013 braces around the argument @var{n}.  The @code{@@need} command has no
10014 effect on Info files since they are not paginated.@refill
10016 @need 800
10017 This paragraph is preceded by an @code{@@need} command that tells
10018 @TeX{} to start a new page if fewer than 800 mils (eight-tenths
10019 inch) remain on the page.  It looks like this:@refill
10021 @example
10022 @group
10023 @@need 800
10024 This paragraph is preceded by @dots{}
10025 @end group
10026 @end example
10028 The @code{@@need} command is useful for preventing orphans (single
10029 lines at the bottoms of printed pages).@refill
10031 @node Definition Commands, Footnotes, Breaks, Top
10032 @chapter Definition Commands
10033 @cindex Definition commands
10035 The @code{@@deffn} command and the other @dfn{definition commands}
10036 enable you to describe functions, variables, macros, commands, user
10037 options, special forms and other such artifacts in a uniform
10038 format.@refill
10040 In the Info file, a definition causes the entity
10041 category---`Function', `Variable', or whatever---to appear at the
10042 beginning of the first line of the definition, followed by the
10043 entity's name and arguments.  In the printed manual, the command
10044 causes @TeX{} to print the entity's name and its arguments on the left
10045 margin and print the category next to the right margin.  In both
10046 output formats, the body of the definition is indented.  Also, the
10047 name of the entity is entered into the appropriate index:
10048 @code{@@deffn} enters the name into the index of functions,
10049 @code{@@defvr} enters it into the index of variables, and so
10050 on.@refill
10052 A manual need not and should not contain more than one definition for
10053 a given name.  An appendix containing a summary should use
10054 @code{@@table} rather than the definition commands.@refill
10056 @menu
10057 * Def Cmd Template::            How to structure a description using a
10058                                   definition command.
10059 * Optional Arguments::          How to handle optional and repeated arguments.
10060 * deffnx::                      How to group two or more `first' lines.
10061 * Def Cmds in Detail::          All the definition commands.
10062 * Def Cmd Conventions::         Conventions for writing definitions.
10063 * Sample Function Definition::  
10064 @end menu
10066 @node Def Cmd Template, Optional Arguments, Definition Commands, Definition Commands
10067 @section The Template for a Definition
10068 @cindex Definition template
10069 @cindex Template for a definition
10071 The @code{@@deffn} command is used for definitions of entities that
10072 resemble functions.  To write a definition using the @code{@@deffn}
10073 command, write the @code{@@deffn} command at the beginning of a line
10074 and follow it on the same line by the category of the entity, the name
10075 of the entity itself, and its arguments (if any).  Then write the body
10076 of the definition on succeeding lines.  (You may embed examples in the
10077 body.)  Finally, end the definition with an @code{@@end deffn} command
10078 written on a line of its own.  (The other definition commands follow
10079 the same format.)@refill
10081 The template for a definition looks like this:
10083 @example
10084 @group
10085 @@deffn @var{category} @var{name} @var{arguments}@dots{}
10086 @var{body-of-definition}
10087 @@end deffn
10088 @end group
10089 @end example
10091 @need 700
10092 @noindent
10093 For example,
10095 @example
10096 @group
10097 @@deffn Command forward-word count
10098 This command moves point forward @@var@{count@} words
10099 (or backward if @@var@{count@} is negative). @dots{}
10100 @@end deffn
10101 @end group
10102 @end example
10104 @noindent
10105 produces
10107 @quotation
10108 @deffn Command forward-word count
10109 This function moves point forward @var{count} words
10110 (or backward if @var{count} is negative). @dots{}
10111 @end deffn
10112 @end quotation
10114 Capitalize the category name like a title.  If the name of the
10115 category contains spaces, as in the phrase `Interactive Command',
10116 write braces around it.  For example:@refill
10118 @example
10119 @group
10120 @@deffn @{Interactive Command@} isearch-forward
10121 @dots{}
10122 @@end deffn
10123 @end group
10124 @end example
10126 @noindent
10127 Otherwise, the second word will be mistaken for the name of the
10128 entity.@refill
10130 Some of the definition commands are more general than others.  The
10131 @code{@@deffn} command, for example, is the general definition command
10132 for functions and the like---for entities that may take arguments.  When
10133 you use this command, you specify the category to which the entity
10134 belongs.  The @code{@@deffn} command possesses three predefined,
10135 specialized variations, @code{@@defun}, @code{@@defmac}, and
10136 @code{@@defspec}, that specify the category for you: ``Function'',
10137 ``Macro'', and ``Special Form'' respectively.  (In Lisp, a special form
10138 is an entity much like a function.)  The @code{@@defvr} command also is
10139 accompanied by several predefined, specialized variations for describing
10140 particular kinds of variables.@refill
10142 The template for a specialized definition, such as @code{@@defun}, is
10143 similar to the template for a generalized definition, except that you
10144 do not need to specify the category:@refill
10146 @example
10147 @group
10148 @@defun @var{name} @var{arguments}@dots{}
10149 @var{body-of-definition}
10150 @@end defun
10151 @end group
10152 @end example
10154 @noindent
10155 Thus,
10157 @example
10158 @group
10159 @@defun buffer-end flag
10160 This function returns @@code@{(point-min)@} if @@var@{flag@}
10161 is less than 1, @@code@{(point-max)@} otherwise.
10162 @dots{}
10163 @@end defun
10164 @end group
10165 @end example
10167 @noindent
10168 produces
10170 @quotation
10171 @defun buffer-end flag
10172 This function returns @code{(point-min)} if @var{flag} is less than 1,
10173 @code{(point-max)} otherwise.  @dots{}
10174 @end defun
10175 @end quotation
10177 @noindent
10178 @xref{Sample Function Definition, Sample Function Definition, A Sample
10179 Function Definition}, for a more detailed example of a function
10180 definition, including the use of @code{@@example} inside the
10181 definition.@refill
10183 The other specialized commands work like @code{@@defun}.@refill
10185 @node Optional Arguments, deffnx, Def Cmd Template, Definition Commands
10186 @section Optional and Repeated Arguments
10187 @cindex Optional and repeated arguments
10188 @cindex Repeated and optional arguments
10189 @cindex Arguments, repeated and optional
10190 @cindex Syntax, optional & repeated arguments
10191 @cindex Meta-syntactic chars for arguments
10193 Some entities take optional or repeated arguments, which may be
10194 specified by a distinctive glyph that uses square brackets and
10195 ellipses.  For @w{example}, a special form often breaks its argument list
10196 into separate arguments in more complicated ways than a
10197 straightforward function.@refill
10199 @iftex
10200 An argument enclosed within square brackets is optional.
10201 Thus, the phrase
10202 @samp{@code{@r{[}@var{optional-arg}@r{]}}} means that
10203 @var{optional-arg} is optional.
10204 An argument followed by an ellipsis is optional
10205 and may be repeated more than once.
10206 @c This is consistent with Emacs Lisp Reference manual
10207 Thus, @samp{@var{repeated-args}@dots{}} stands for zero or more arguments.
10208 Parentheses are used when several arguments are grouped
10209 into additional levels of list structure in Lisp.
10210 @end iftex
10211 @c The following looks better in Info (no `r', `samp' and `code'):
10212 @ifinfo
10213 An argument enclosed within square brackets is optional.
10214 Thus, [@var{optional-arg}] means that @var{optional-arg} is optional.
10215 An argument followed by an ellipsis is optional
10216 and may be repeated more than once.
10217 @c This is consistent with Emacs Lisp Reference manual
10218 Thus, @var{repeated-args}@dots{} stands for zero or more arguments.
10219 Parentheses are used when several arguments are grouped
10220 into additional levels of list structure in Lisp.
10221 @end ifinfo
10223 Here is the @code{@@defspec} line of an example of an imaginary
10224 special form:@refill
10226 @quotation
10227 @defspec foobar (@var{var} [@var{from} @var{to} [@var{inc}]]) @var{body}@dots{}
10228 @end defspec
10229 @tex
10230 \vskip \parskip
10231 @end tex
10232 @end quotation
10234 @noindent
10235 In this example, the arguments @var{from} and @var{to} are optional,
10236 but must both be present or both absent.  If they are present,
10237 @var{inc} may optionally be specified as well.  These arguments are
10238 grouped with the argument @var{var} into a list, to distinguish them
10239 from @var{body}, which includes all remaining elements of the
10240 form.@refill
10242 In a Texinfo source file, this @code{@@defspec} line is written like
10243 this (except it would not be split over two lines, as it is in this
10244 example).@refill
10246 @example
10247 @group
10248 @@defspec foobar (@@var@{var@} [@@var@{from@} @@var@{to@}
10249      [@@var@{inc@}]]) @@var@{body@}@@dots@{@}
10250 @end group
10251 @end example
10253 @noindent
10254 The function is listed in the Command and Variable Index under
10255 @samp{foobar}.@refill
10257 @node deffnx, Def Cmds in Detail, Optional Arguments, Definition Commands
10258 @section Two or More `First' Lines
10259 @cindex Two `First' Lines for @code{@@deffn}
10260 @cindex Grouping two definitions together
10261 @cindex Definitions grouped together
10262 @findex deffnx
10264 To create two or more `first' or header lines for a definition, follow
10265 the first @code{@@deffn} line by a line beginning with @code{@@deffnx}.
10266 The @code{@@deffnx} command works exactly like @code{@@deffn}
10267 except that it does not generate extra vertical white space between it
10268 and the preceding line.@refill
10270 @need 1000
10271 For example,
10273 @example
10274 @group
10275 @@deffn @{Interactive Command@} isearch-forward
10276 @@deffnx @{Interactive Command@} isearch-backward
10277 These two search commands are similar except @dots{}
10278 @@end deffn
10279 @end group
10280 @end example
10282 @noindent
10283 produces
10285 @deffn {Interactive Command} isearch-forward
10286 @deffnx {Interactive Command} isearch-backward
10287 These two search commands are similar except @dots{}
10288 @end deffn
10290 Each of the other definition commands has an `x' form: @code{@@defunx},
10291 @code{@@defvrx}, @code{@@deftypefunx}, etc.
10293 The `x' forms work just like @code{@@itemx}; see @ref{itemx, , @code{@@itemx}}.
10295 @node Def Cmds in Detail, Def Cmd Conventions, deffnx, Definition Commands
10296 @section The Definition Commands
10298 Texinfo provides more than a dozen definition commands, all of which
10299 are described in this section.@refill
10301 The definition commands automatically enter the name of the entity in
10302 the appropriate index: for example, @code{@@deffn}, @code{@@defun},
10303 and @code{@@defmac} enter function names in the index of functions;
10304 @code{@@defvr} and @code{@@defvar} enter variable names in the index
10305 of variables.@refill
10307 Although the examples that follow mostly illustrate Lisp, the commands
10308 can be used for other programming languages.@refill
10310 @menu
10311 * Functions Commands::          Commands for functions and similar entities.
10312 * Variables Commands::          Commands for variables and similar entities.
10313 * Typed Functions::             Commands for functions in typed languages.
10314 * Typed Variables::             Commands for variables in typed languages.
10315 * Abstract Objects::            Commands for object-oriented programming.
10316 * Data Types::                  The definition command for data types.
10317 @end menu
10319 @node Functions Commands, Variables Commands, Def Cmds in Detail, Def Cmds in Detail
10320 @subsection Functions and Similar Entities
10322 This section describes the commands for describing functions and similar
10323 entities:@refill
10325 @table @code
10326 @findex deffn
10327 @item @@deffn @var{category} @var{name} @var{arguments}@dots{}
10328 The @code{@@deffn} command is the general definition command for
10329 functions, interactive commands, and similar entities that may take
10330 arguments.  You must choose a term to describe the category of entity
10331 being defined; for example, ``Function'' could be used if the entity is
10332 a function.  The @code{@@deffn} command is written at the beginning of a
10333 line and is followed on the same line by the category of entity being
10334 described, the name of this particular entity, and its arguments, if
10335 any.  Terminate the definition with @code{@@end deffn} on a line of its
10336 own.@refill
10338 @need 750
10339 For example, here is a definition:
10341 @example
10342 @group
10343 @@deffn Command forward-char nchars
10344 Move point forward @@var@{nchars@} characters.
10345 @@end deffn
10346 @end group
10347 @end example
10349 @noindent
10350 This shows a rather terse definition for a ``command'' named
10351 @code{forward-char} with one argument, @var{nchars}.
10353 @code{@@deffn} prints argument names such as @var{nchars} in italics or
10354 upper case, as if @code{@@var} had been used, because we think of these
10355 names as metasyntactic variables---they stand for the actual argument
10356 values.  Within the text of the description, write an argument name
10357 explicitly with @code{@@var} to refer to the value of the argument.  In
10358 the example above, we used @samp{@@var@{nchars@}} in this way.
10360 The template for @code{@@deffn} is:
10362 @example
10363 @group
10364 @@deffn @var{category} @var{name} @var{arguments}@dots{}
10365 @var{body-of-definition}
10366 @@end deffn
10367 @end group
10368 @end example
10370 @findex defun
10371 @item @@defun @var{name} @var{arguments}@dots{}
10372 The @code{@@defun} command is the definition command for functions.
10373 @code{@@defun} is equivalent to @samp{@@deffn Function
10374 @dots{}}.@refill
10376 @need 800
10377 @noindent
10378 For example,
10380 @example
10381 @group
10382 @@defun set symbol new-value
10383 Change the value of the symbol @@var@{symbol@}
10384 to @@var@{new-value@}.
10385 @@end defun
10386 @end group
10387 @end example
10389 @noindent
10390 shows a rather terse definition for a function @code{set} whose
10391 arguments are @var{symbol} and @var{new-value}.  The argument names on
10392 the @code{@@defun} line automatically appear in italics or upper case as
10393 if they were enclosed in @code{@@var}.  Terminate the definition with
10394 @code{@@end defun} on a line of its own.@refill
10396 The template is:
10398 @example
10399 @group
10400 @@defun @var{function-name} @var{arguments}@dots{}
10401 @var{body-of-definition}
10402 @@end defun
10403 @end group
10404 @end example
10406 @code{@@defun} creates an entry in the index of functions.
10408 @findex defmac
10409 @item @@defmac @var{name} @var{arguments}@dots{}
10410 The @code{@@defmac} command is the definition command for macros.
10411 @code{@@defmac} is equivalent to @samp{@@deffn Macro @dots{}} and
10412 works like @code{@@defun}.@refill
10414 @findex defspec
10415 @item @@defspec @var{name} @var{arguments}@dots{}
10416 The @code{@@defspec} command is the definition command for special
10417 forms.  (In Lisp, a special form is an entity much like a function,
10418 @pxref{Special Forms,,, elisp, GNU Emacs Lisp Reference Manual}.)
10419 @code{@@defspec} is equivalent to @samp{@@deffn @{Special Form@}
10420 @dots{}} and works like @code{@@defun}.@refill
10421 @end table
10423 @node Variables Commands, Typed Functions, Functions Commands, Def Cmds in Detail
10424 @subsection Variables and Similar Entities
10426 Here are the commands for defining variables and similar
10427 entities:@refill
10429 @table @code
10430 @findex defvr
10431 @item @@defvr @var{category} @var{name}
10432 The @code{@@defvr} command is a general definition command for
10433 something like a variable---an entity that records a value.  You must
10434 choose a term to describe the category of entity being defined; for
10435 example, ``Variable'' could be used if the entity is a variable.
10436 Write the @code{@@defvr} command at the beginning of a line and
10437 followed it on the same line by the category of the entity and the
10438 name of the entity.@refill
10440 Capitalize the category name like a title.  If the name of the category
10441 contains spaces, as in the name ``User Option'', enclose it in braces.
10442 Otherwise, the second word will be mistaken for the name of the entity.
10443 For example,
10445 @example
10446 @group
10447 @@defvr @{User Option@} fill-column
10448 This buffer-local variable specifies
10449 the maximum width of filled lines.
10450 @dots{}
10451 @@end defvr
10452 @end group
10453 @end example
10455 Terminate the definition with @code{@@end defvr} on a line of its
10456 own.@refill
10458 The template is:
10460 @example
10461 @group
10462 @@defvr @var{category} @var{name}
10463 @var{body-of-definition}
10464 @@end defvr
10465 @end group
10466 @end example
10468 @code{@@defvr} creates an entry in the index of variables for @var{name}.
10470 @findex defvar
10471 @item @@defvar @var{name}
10472 The @code{@@defvar} command is the definition command for variables.
10473 @code{@@defvar} is equivalent to @samp{@@defvr Variable
10474 @dots{}}.@refill
10476 @need 750
10477 For example:
10479 @example
10480 @group
10481 @@defvar kill-ring
10482 @dots{}
10483 @@end defvar
10484 @end group
10485 @end example
10487 The template is:
10489 @example
10490 @group
10491 @@defvar @var{name}
10492 @var{body-of-definition}
10493 @@end defvar
10494 @end group
10495 @end example
10497 @code{@@defvar} creates an entry in the index of variables for
10498 @var{name}.@refill
10500 @findex defopt
10501 @item @@defopt @var{name}
10502 @cindex User options, marking
10503 The @code{@@defopt} command is the definition command for @dfn{user
10504 options}, i.e., variables intended for users to change according to
10505 taste; Emacs has many such (@pxref{Variables,,, emacs, The GNU Emacs
10506 Manual}).  @code{@@defopt} is equivalent to @samp{@@defvr @{User
10507 Option@} @dots{}} and works like @code{@@defvar}.@refill
10508 @end table
10511 @node Typed Functions, Typed Variables, Variables Commands, Def Cmds in Detail
10512 @subsection Functions in Typed Languages
10514 The @code{@@deftypefn} command and its variations are for describing
10515 functions in languages in which you must declare types of variables and
10516 functions, such as C and C++.
10518 @table @code
10519 @findex deftypefn
10520 @item @@deftypefn @var{category} @var{data-type} @var{name} @var{arguments}@dots{}
10521 The @code{@@deftypefn} command is the general definition command for
10522 functions and similar entities that may take arguments and that are
10523 typed.  The @code{@@deftypefn} command is written at the beginning of
10524 a line and is followed on the same line by the category of entity
10525 being described, the type of the returned value, the name of this
10526 particular entity, and its arguments, if any.@refill
10528 @need 800
10529 @noindent
10530 For example,
10532 @example
10533 @group
10534 @@deftypefn @{Library Function@} int foobar
10535    (int @@var@{foo@}, float @@var@{bar@})
10536 @dots{}
10537 @@end deftypefn
10538 @end group
10539 @end example
10541 @need 1000
10542 @noindent
10543 (where the text before the ``@dots{}'', shown above as two lines, would
10544 actually be a single line in a real Texinfo file) produces the following
10545 in Info:
10547 @smallexample
10548 @group
10549 -- Library Function: int foobar (int FOO, float BAR)
10550 @dots{}
10551 @end group
10552 @end smallexample
10553 @iftex
10555 In a printed manual, it produces:
10557 @quotation
10558 @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
10559 @dots{}
10560 @end deftypefn
10561 @end quotation
10562 @end iftex
10564 This means that @code{foobar} is a ``library function'' that returns an
10565 @code{int}, and its arguments are @var{foo} (an @code{int}) and
10566 @var{bar} (a @code{float}).@refill
10568 The argument names that you write in @code{@@deftypefn} are not subject
10569 to an implicit @code{@@var}---since the actual names of the arguments in
10570 @code{@@deftypefn} are typically scattered among data type names and
10571 keywords, Texinfo cannot find them without help.  Instead, you must write
10572 @code{@@var} explicitly around the argument names.  In the example
10573 above, the argument names are @samp{foo} and @samp{bar}.@refill
10575 The template for @code{@@deftypefn} is:@refill
10577 @example
10578 @group
10579 @@deftypefn @var{category} @var{data-type} @var{name} @var{arguments} @dots{}
10580 @var{body-of-description}
10581 @@end deftypefn
10582 @end group
10583 @end example
10585 @noindent
10586 Note that if the @var{category} or @var{data type} is more than one
10587 word then it must be enclosed in braces to make it a single argument.@refill
10589 If you are describing a procedure in a language that has packages,
10590 such as Ada, you might consider using @code{@@deftypefn} in a manner
10591 somewhat contrary to the convention described in the preceding
10592 paragraphs.@refill
10594 @need 800
10595 @noindent
10596 For example:
10598 @example
10599 @group
10600 @@deftypefn stacks private push
10601         (@@var@{s@}:in out stack;
10602         @@var@{n@}:in integer)
10603 @dots{}
10604 @@end deftypefn
10605 @end group
10606 @end example
10608 @noindent
10609 (The @code{@@deftypefn} arguments are shown split into three lines, but
10610 would be a single line in a real Texinfo file.)
10612 In this instance, the procedure is classified as belonging to the
10613 package @code{stacks} rather than classified as a `procedure' and its
10614 data type is described as @code{private}.  (The name of the procedure
10615 is @code{push}, and its arguments are @var{s} and @var{n}.)@refill
10617 @code{@@deftypefn} creates an entry in the index of functions for
10618 @var{name}.@refill
10620 @item @@deftypefun @var{data-type} @var{name} @var{arguments}@dots{}
10621 @findex deftypefun
10622 The @code{@@deftypefun} command is the specialized definition command
10623 for functions in typed languages.  The command is equivalent to
10624 @samp{@@deftypefn Function @dots{}}.@refill
10626 @need 800
10627 @noindent
10628 Thus,
10630 @smallexample
10631 @group
10632 @@deftypefun int foobar (int @@var@{foo@}, float @@var@{bar@})
10633 @dots{}
10634 @@end deftypefun
10635 @end group
10636 @end smallexample
10638 @noindent
10639 produces the following in Info:
10641 @example
10642 @group
10643 -- Function: int foobar (int FOO, float BAR)
10644 @dots{}
10645 @end group
10646 @end example
10647 @iftex
10649 @need 800
10650 @noindent
10651 and the following in a printed manual:
10653 @quotation
10654 @deftypefun int foobar (int @var{foo}, float @var{bar})
10655 @dots{}
10656 @end deftypefun
10657 @end quotation
10658 @end iftex
10660 @need 800
10661 The template is:
10663 @example
10664 @group
10665 @@deftypefun @var{type} @var{name} @var{arguments}@dots{}
10666 @var{body-of-description}
10667 @@end deftypefun
10668 @end group
10669 @end example
10671 @code{@@deftypefun} creates an entry in the index of functions for
10672 @var{name}.@refill
10674 @end table
10677 @node Typed Variables, Abstract Objects, Typed Functions, Def Cmds in Detail
10678 @subsection Variables in Typed Languages
10680 Variables in typed languages are handled in a manner similar to
10681 functions in typed languages.  @xref{Typed Functions}.  The general
10682 definition command @code{@@deftypevr} corresponds to
10683 @code{@@deftypefn} and the specialized definition command
10684 @code{@@deftypevar} corresponds to @code{@@deftypefun}.@refill
10686 @table @code
10687 @findex deftypevr
10688 @item @@deftypevr @var{category} @var{data-type} @var{name}
10689 The @code{@@deftypevr} command is the general definition command for
10690 something like a variable in a typed language---an entity that records
10691 a value.  You must choose a term to describe the category of the
10692 entity being defined; for example, ``Variable'' could be used if the
10693 entity is a variable.@refill
10695 The @code{@@deftypevr} command is written at the beginning of a line
10696 and is followed on the same line by the category of the entity
10697 being described, the data type, and the name of this particular
10698 entity.@refill
10700 @need 800
10701 @noindent
10702 For example:
10704 @example
10705 @group
10706 @@deftypevr @{Global Flag@} int enable
10707 @dots{}
10708 @@end deftypevr
10709 @end group
10710 @end example
10712 @noindent
10713 produces the following in Info:
10715 @example
10716 @group
10717 -- Global Flag: int enable
10718 @dots{}
10719 @end group
10720 @end example
10721 @iftex
10723 @noindent
10724 and the following in a printed manual:
10726 @quotation
10727 @deftypevr {Global Flag} int enable
10728 @dots{}
10729 @end deftypevr
10730 @end quotation
10731 @end iftex
10733 @need 800
10734 The template is:
10736 @example
10737 @@deftypevr @var{category} @var{data-type} @var{name}
10738 @var{body-of-description}
10739 @@end deftypevr
10740 @end example
10742 @code{@@deftypevr} creates an entry in the index of variables for
10743 @var{name}.@refill
10745 @findex deftypevar
10746 @item @@deftypevar @var{data-type} @var{name}
10747 The @code{@@deftypevar} command is the specialized definition command
10748 for variables in typed languages.  @code{@@deftypevar} is equivalent
10749 to @samp{@@deftypevr Variable @dots{}}.@refill
10751 @need 800
10752 @noindent
10753 For example:
10755 @example
10756 @group
10757 @@deftypevar int fubar
10758 @dots{}
10759 @@end deftypevar
10760 @end group
10761 @end example
10763 @noindent
10764 produces the following in Info:
10766 @example
10767 @group
10768 -- Variable: int fubar
10769 @dots{}
10770 @end group
10771 @end example
10772 @iftex
10774 @need 800
10775 @noindent
10776 and the following in a printed manual:
10778 @quotation
10779 @deftypevar int fubar
10780 @dots{}
10781 @end deftypevar
10782 @end quotation
10783 @end iftex
10785 @need 800
10786 @noindent
10787 The template is:
10789 @example
10790 @group
10791 @@deftypevar @var{data-type} @var{name}
10792 @var{body-of-description}
10793 @@end deftypevar
10794 @end group
10795 @end example
10797 @code{@@deftypevar} creates an entry in the index of variables for
10798 @var{name}.@refill
10799 @end table
10801 @node Abstract Objects, Data Types, Typed Variables, Def Cmds in Detail
10802 @subsection Object-Oriented Programming
10804 Here are the commands for formatting descriptions about abstract
10805 objects, such as are used in object-oriented programming.  A class is
10806 a defined type of abstract object.  An instance of a class is a
10807 particular object that has the type of the class.  An instance
10808 variable is a variable that belongs to the class but for which each
10809 instance has its own value.@refill
10811 In a definition, if the name of a class is truly a name defined in the
10812 programming system for a class, then you should write an @code{@@code}
10813 around it.  Otherwise, it is printed in the usual text font.@refill
10815 @table @code
10816 @findex defcv
10817 @item @@defcv @var{category} @var{class} @var{name}
10818 The @code{@@defcv} command is the general definition command for
10819 variables associated with classes in object-oriented programming.  The
10820 @code{@@defcv} command is followed by three arguments: the category of
10821 thing being defined, the class to which it belongs, and its
10822 name.  Thus,@refill
10824 @example
10825 @group
10826 @@defcv @{Class Option@} Window border-pattern
10827 @dots{}
10828 @@end defcv
10829 @end group
10830 @end example
10832 @noindent
10833 illustrates how you would write the first line of a definition of the
10834 @code{border-pattern} class option of the class @code{Window}.@refill
10836 The template is
10838 @example
10839 @group
10840 @@defcv @var{category} @var{class} @var{name}
10841 @dots{}
10842 @@end defcv
10843 @end group
10844 @end example
10846 @code{@@defcv} creates an entry in the index of variables.
10848 @findex defivar
10849 @item @@defivar @var{class} @var{name}
10850 The @code{@@defivar} command is the definition command for instance
10851 variables in object-oriented programming.  @code{@@defivar} is
10852 equivalent to @samp{@@defcv @{Instance Variable@} @dots{}}@refill
10854 The template is:
10856 @example
10857 @group
10858 @@defivar @var{class} @var{instance-variable-name}
10859 @var{body-of-definition}
10860 @@end defivar
10861 @end group
10862 @end example
10864 @code{@@defivar} creates an entry in the index of variables.
10866 @findex defop
10867 @item @@defop @var{category} @var{class} @var{name} @var{arguments}@dots{}
10868 The @code{@@defop} command is the general definition command for
10869 entities that may resemble methods in object-oriented programming.
10870 These entities take arguments, as functions do, but are associated
10871 with particular classes of objects.@refill
10873 For example, some systems have constructs called @dfn{wrappers} that
10874 are associated with classes as methods are, but that act more like
10875 macros than like functions.  You could use @code{@@defop Wrapper} to
10876 describe one of these.@refill
10878 Sometimes it is useful to distinguish methods and @dfn{operations}.
10879 You can think of an operation as the specification for a method.
10880 Thus, a window system might specify that all window classes have a
10881 method named @code{expose}; we would say that this window system
10882 defines an @code{expose} operation on windows in general.  Typically,
10883 the operation has a name and also specifies the pattern of arguments;
10884 all methods that implement the operation must accept the same
10885 arguments, since applications that use the operation do so without
10886 knowing which method will implement it.@refill
10888 Often it makes more sense to document operations than methods.  For
10889 example, window application developers need to know about the
10890 @code{expose} operation, but need not be concerned with whether a
10891 given class of windows has its own method to implement this operation.
10892 To describe this operation, you would write:@refill
10894 @example
10895 @@defop Operation windows expose
10896 @end example
10898 The @code{@@defop} command is written at the beginning of a line and
10899 is followed on the same line by the overall name of the category of
10900 operation, the name of the class of the operation, the name of the
10901 operation, and its arguments, if any.@refill
10903 @need 800
10904 @noindent
10905 The template is:
10907 @example
10908 @group
10909 @@defop @var{category} @var{class} @var{name} @var{arguments}@dots{}
10910 @var{body-of-definition}
10911 @@end defop
10912 @end group
10913 @end example
10915 @code{@@defop} creates an entry, such as `@code{expose} on
10916 @code{windows}', in the index of functions.@refill
10918 @item @@defmethod @var{class} @var{name} @var{arguments}@dots{}
10919 @findex defmethod
10920 The @code{@@defmethod} command is the definition command for methods
10921 in object-oriented programming.  A method is a kind of function that
10922 implements an operation for a particular class of objects and its
10923 subclasses.  In the Lisp Machine, methods actually were functions, but
10924 they were usually defined with @code{defmethod}.
10926 @code{@@defmethod} is equivalent to @samp{@@defop Method @dots{}}.
10927 The command is written at the beginning of a line and is followed by
10928 the name of the class of the method, the name of the method, and its
10929 arguments, if any.@refill
10931 @need 800
10932 @noindent
10933 For example,
10935 @example
10936 @group
10937 @@defmethod @code{bar-class} bar-method argument
10938 @dots{}
10939 @@end defmethod
10940 @end group
10941 @end example
10943 @noindent
10944 illustrates the definition for a method called @code{bar-method} of
10945 the class @code{bar-class}.  The method takes an argument.@refill
10947 The template is:
10949 @example
10950 @group
10951 @@defmethod @var{class} @var{method-name} @var{arguments}@dots{}
10952 @var{body-of-definition}
10953 @@end defmethod
10954 @end group
10955 @end example
10957 @code{@@defmethod} creates an entry, such as `@code{bar-method} on
10958 @code{bar-class}', in the index of functions.@refill
10960 @item @@deftypemethod @var{class} @var{data-type} @var{name} @var{arguments}@dots{}
10961 @findex defmethod
10962 The @code{@@deftypemethod} command is the definition command for methods
10963 in object-oriented typed languages, such as C++ and Java.  It is similar
10964 to the @code{@@defmethod} command with the addition of the
10965 @var{data-type} parameter to specify the return type of the method.
10967 @end table
10970 @node Data Types,  , Abstract Objects, Def Cmds in Detail
10971 @subsection Data Types
10973 Here is the command for data types:@refill
10975 @table @code
10976 @findex deftp
10977 @item @@deftp @var{category} @var{name} @var{attributes}@dots{}
10978 The @code{@@deftp} command is the generic definition command for data
10979 types.  The command is written at the beginning of a line and is
10980 followed on the same line by the category, by the name of the type
10981 (which is a word like @code{int} or @code{float}), and then by names of
10982 attributes of objects of that type.  Thus, you could use this command
10983 for describing @code{int} or @code{float}, in which case you could use
10984 @code{data type} as the category.  (A data type is a category of
10985 certain objects for purposes of deciding which operations can be
10986 performed on them.)@refill
10988 In Lisp, for example,  @dfn{pair} names a particular data
10989 type, and an object of that type has two slots called the
10990 @sc{car} and the @sc{cdr}.  Here is how you would write the first line
10991 of a definition of @code{pair}.@refill
10993 @example
10994 @group
10995 @@deftp @{Data type@} pair car cdr
10996 @dots{}
10997 @@end deftp
10998 @end group
10999 @end example
11001 @need 950
11002 The template is:
11004 @example
11005 @group
11006 @@deftp @var{category} @var{name-of-type} @var{attributes}@dots{}
11007 @var{body-of-definition}
11008 @@end deftp
11009 @end group
11010 @end example
11012 @code{@@deftp} creates an entry in the index of data types.
11013 @end table
11015 @node Def Cmd Conventions, Sample Function Definition, Def Cmds in Detail, Definition Commands
11016 @section Conventions for Writing Definitions
11017 @cindex Definition conventions
11018 @cindex Conventions for writing definitions
11020 When you write a definition using @code{@@deffn}, @code{@@defun}, or
11021 one of the other definition commands, please take care to use
11022 arguments that indicate the meaning, as with the @var{count} argument
11023 to the @code{forward-word} function.  Also, if the name of an argument
11024 contains the name of a type, such as @var{integer}, take care that the
11025 argument actually is of that type.@refill
11027 @node Sample Function Definition,  , Def Cmd Conventions, Definition Commands
11028 @section A Sample Function Definition
11029 @cindex Function definitions
11030 @cindex Command definitions
11031 @cindex Macro definitions
11032 @cindex Sample function definition
11034 A function definition uses the @code{@@defun} and @code{@@end defun}
11035 commands.  The name of the function follows immediately after the
11036 @code{@@defun} command and it is followed, on the same line, by the
11037 parameter list.@refill
11039 Here is a definition from @ref{Calling Functions,,, elisp, The GNU Emacs
11040 Lisp Reference Manual}.
11042 @quotation
11043 @defun apply function &rest arguments
11044 @code{apply} calls @var{function} with @var{arguments}, just
11045 like @code{funcall} but with one difference: the last of
11046 @var{arguments} is a list of arguments to give to
11047 @var{function}, rather than a single argument.  We also say
11048 that this list is @dfn{appended} to the other arguments.
11050 @code{apply} returns the result of calling @var{function}.
11051 As with @code{funcall}, @var{function} must either be a Lisp
11052 function or a primitive function; special forms and macros
11053 do not make sense in @code{apply}.
11055 @example
11056 (setq f 'list)
11057      @result{} list
11058 (apply f 'x 'y 'z)
11059 @error{} Wrong type argument: listp, z
11060 (apply '+ 1 2 '(3 4))
11061      @result{} 10
11062 (apply '+ '(1 2 3 4))
11063      @result{} 10
11065 (apply 'append '((a b c) nil (x y z) nil))
11066      @result{} (a b c x y z)
11067 @end example
11069 An interesting example of using @code{apply} is found in the description
11070 of @code{mapcar}.@refill
11071 @end defun
11072 @end quotation
11074 @need 1200
11075 In the Texinfo source file, this example looks like this:
11077 @example
11078 @group
11079 @@defun apply function &rest arguments
11081 @@code@{apply@} calls @@var@{function@} with
11082 @@var@{arguments@}, just like @@code@{funcall@} but with one
11083 difference: the last of @@var@{arguments@} is a list of
11084 arguments to give to @@var@{function@}, rather than a single
11085 argument.  We also say that this list is @@dfn@{appended@}
11086 to the other arguments.
11087 @end group
11089 @group
11090 @@code@{apply@} returns the result of calling
11091 @@var@{function@}.  As with @@code@{funcall@},
11092 @@var@{function@} must either be a Lisp function or a
11093 primitive function; special forms and macros do not make
11094 sense in @@code@{apply@}.
11095 @end group
11097 @group
11098 @@example
11099 (setq f 'list)
11100      @@result@{@} list
11101 (apply f 'x 'y 'z)
11102 @@error@{@} Wrong type argument: listp, z
11103 (apply '+ 1 2 '(3 4))
11104      @@result@{@} 10
11105 (apply '+ '(1 2 3 4))
11106      @@result@{@} 10
11108 (apply 'append '((a b c) nil (x y z) nil))
11109      @@result@{@} (a b c x y z)
11110 @@end example
11111 @end group
11113 @group
11114 An interesting example of using @@code@{apply@} is found
11115 in the description of @@code@{mapcar@}.@@refill
11116 @@end defun
11117 @end group
11118 @end example
11120 @noindent
11121 In this manual, this function is listed in the Command and Variable
11122 Index under @code{apply}.@refill
11124 Ordinary variables and user options are described using a format like
11125 that for functions except that variables do not take arguments.
11128 @node Footnotes, Conditionals, Definition Commands, Top
11129 @chapter Footnotes
11130 @cindex Footnotes
11131 @findex footnote
11133 A @dfn{footnote} is for a reference that documents or elucidates the
11134 primary text.@footnote{A footnote should complement or expand upon
11135 the primary text, but a reader should not need to read a footnote to
11136 understand the primary text.  For a thorough discussion of footnotes,
11137 see @cite{The Chicago Manual of Style}, which is published by the
11138 University of Chicago Press.}@refill
11140 @menu
11141 * Footnote Commands::           How to write a footnote in Texinfo.
11142 * Footnote Styles::             Controlling how footnotes appear in Info.
11143 @end menu
11145 @node Footnote Commands, Footnote Styles, Footnotes, Footnotes
11146 @section Footnote Commands
11148 In Texinfo, footnotes are created with the @code{@@footnote} command.
11149 This command is followed immediately by a left brace, then by the text
11150 of the footnote, and then by a terminating right brace.  Footnotes may
11151 be of any length (they will be broken across pages if necessary), but
11152 are usually short.  The template is:
11154 @example
11155 ordinary text@@footnote@{@var{text of footnote}@}
11156 @end example
11158 As shown here, the @code{@@footnote} command should come right after the
11159 text being footnoted, with no intervening space; otherwise, the
11160 formatters the footnote mark might end up starting up a line.
11162 For example, this clause is followed by a sample
11163 footnote@footnote{Here is the sample footnote.}; in the Texinfo
11164 source, it looks like this:@refill
11166 @example
11167 @dots{}a sample footnote@@footnote@{Here is the sample
11168 footnote.@}; in the Texinfo source@dots{}
11169 @end example
11171 @strong{Warning:} Don't use footnotes in the argument of the
11172 @code{@@item} command for a @code{@@table} table.  This doesn't work, and
11173 because of limitations of @TeX{}, there is no way to fix it.  You must
11174 put the footnote into the body text of the table.
11176 In a printed manual or book, the reference mark for a footnote is a
11177 small, superscripted number; the text of the footnote appears at the
11178 bottom of the page, below a horizontal line.@refill
11180 In Info, the reference mark for a footnote is a pair of parentheses
11181 with the footnote number between them, like this: @samp{(1)}.@refill
11184 @node Footnote Styles,  , Footnote Commands, Footnotes
11185 @section Footnote Styles
11187 Info has two footnote styles, which determine where the text of the
11188 footnote is located:@refill
11190 @itemize @bullet
11191 @cindex @samp{@r{End}} node footnote style
11192 @item
11193 In the `End' node style, all the footnotes for a single node
11194 are placed at the end of that node.  The footnotes are separated from
11195 the rest of the node by a line of dashes with the word
11196 @samp{Footnotes} within it.  Each footnote begins with an
11197 @samp{(@var{n})} reference mark.@refill
11199 @need 700
11200 @noindent
11201 Here is an example of a single footnote in the end of node style:@refill
11203 @example
11204 @group
11205  --------- Footnotes ---------
11207 (1)  Here is a sample footnote.
11208 @end group
11209 @end example
11211 @cindex @samp{@r{Separate}} footnote style
11212 @item
11213 In the `Separate' node style, all the footnotes for a single
11214 node are placed in an automatically constructed node of
11215 their own.  In this style, a ``footnote reference'' follows
11216 each @samp{(@var{n})} reference mark in the body of the
11217 node.  The footnote reference is actually a cross reference
11218 which you use to reach the footnote node.@refill
11220 The name of the node containing the footnotes is constructed
11221 by appending @w{@samp{-Footnotes}} to the name of the node
11222 that contains the footnotes. (Consequently, the footnotes'
11223 node for the @file{Footnotes} node is
11224 @w{@file{Footnotes-Footnotes}}!)  The footnotes' node has an
11225 `Up' node pointer that leads back to its parent node.@refill
11227 @noindent
11228 Here is how the first footnote in this manual looks after being
11229 formatted for Info in the separate node style:@refill
11231 @smallexample
11232 @group
11233 File: texinfo.info  Node: Overview-Footnotes, Up: Overview
11235 (1) Note that the first syllable of "Texinfo" is
11236 pronounced like "speck", not "hex". @dots{}
11237 @end group
11238 @end smallexample
11239 @end itemize
11241 A Texinfo file may be formatted into an Info file with either footnote
11242 style.@refill
11244 @findex footnotestyle
11245 Use the @code{@@footnotestyle} command to specify an Info file's
11246 footnote style.  Write this command at the beginning of a line followed
11247 by an argument, either @samp{end} for the end node style or
11248 @samp{separate} for the separate node style.
11250 @need 700
11251 For example,
11253 @example
11254 @@footnotestyle end
11255 @end example
11256 @noindent
11258 @example
11259 @@footnotestyle separate
11260 @end example
11262 Write an @code{@@footnotestyle} command before or shortly after the
11263 end-of-header line at the beginning of a Texinfo file.  (If you
11264 include the @code{@@footnotestyle} command between the start-of-header
11265 and end-of-header lines, the region formatting commands will format
11266 footnotes as specified.)@refill
11268 If you do not specify a footnote style, the formatting commands use
11269 their default style.  Currently, @code{texinfo-format-buffer} and
11270 @code{texinfo-format-region} use the `separate' style and
11271 @code{makeinfo} uses the `end' style.@refill
11273 @c !!! note: makeinfo's --footnote-style option overrides footnotestyle
11274 @ignore
11275 If you use @code{makeinfo} to create the Info file, the
11276 @samp{--footnote-style} option determines which style is used,
11277 @samp{end} for the end of node style or @samp{separate} for the
11278 separate node style.  Thus, to format the Texinfo manual in the
11279 separate node style, you would use the following shell command:@refill
11281 @example
11282 makeinfo --footnote-style=separate texinfo.texi
11283 @end example
11285 @noindent
11286 To format the Texinfo manual in the end of node style, you would
11287 type:@refill
11289 @example
11290 makeinfo --footnote-style=end texinfo.texi
11291 @end example
11292 @end ignore
11293 @ignore
11294 If you use @code{texinfo-format-buffer} or
11295 @code{texinfo-format-region} to create the Info file, the value of the
11296 @code{texinfo-footnote-style} variable controls the footnote style.
11297 It can be either @samp{"separate"} for the separate node style or
11298 @samp{"end"} for the end of node style.  (You can change the value of
11299 this variable with the @kbd{M-x edit-options} command (@pxref{Edit
11300 Options, , Editing Variable Values, emacs, The GNU Emacs Manual}), or
11301 with the @kbd{M-x set-variable} command (@pxref{Examining, , Examining
11302 and Setting Variables, emacs, The GNU Emacs Manual}).@refill
11304 The @code{texinfo-footnote-style} variable also controls the style if
11305 you use the @kbd{M-x makeinfo-region} or @kbd{M-x makeinfo-buffer}
11306 command in Emacs.@refill
11307 @end ignore
11308 This chapter contains two footnotes.@refill
11311 @node Conditionals, Macros, Footnotes, Top
11312 @comment  node-name,  next,  previous,  up
11313 @chapter Conditionally Visible Text
11314 @cindex Conditionally visible text
11315 @cindex Text, conditionally visible
11316 @cindex Visibility of conditional text
11317 @cindex If text conditionally visible
11319 Sometimes it is good to use different text for a printed manual and
11320 its corresponding Info file.  In this case, you can use the
11321 @dfn{conditional commands} to specify which text is for the printed manual
11322 and which is for the Info file.@refill
11324 @menu
11325 * Conditional Commands::        Specifying text for HTML, Info, or @TeX{}.
11326 * Conditional Not Commands::    Specifying text for not HTML, Info, or @TeX{}.
11327 * Raw Formatter Commands::      Using raw @TeX{} or HTML commands.
11328 * set clear value::             Designating which text to format (for
11329                                   all output formats); and how to set a
11330                                   flag to a string that you can insert.
11331 @end menu
11333 @node Conditional Commands, Conditional Not Commands, Conditionals, Conditionals
11334 @ifinfo
11335 @heading Conditional Commands
11336 @end ifinfo
11338 @findex ifinfo
11339 @code{@@ifinfo} begins segments of text that should be ignored
11340 by @TeX{} when it
11341 typesets the printed manual.  The segment of text appears only
11342 in the Info file.
11343 The @code{@@ifinfo} command should appear on a line by itself;  end
11344 the Info-only text with a line containing @code{@@end ifinfo} by
11345 itself.  At the beginning of a Texinfo file, the Info permissions are
11346 contained within a region marked by @code{@@ifinfo} and @code{@@end
11347 ifinfo}. (@xref{Info Summary and Permissions}.)@refill
11349 @findex iftex
11350 @findex ifhtml
11351 The @code{@@iftex} and @code{@@end iftex} commands are similar to the
11352 @code{@@ifinfo} and @code{@@end ifinfo} commands, except that they
11353 specify text that will appear in the printed manual but not in the Info
11354 file.  Likewise for @code{@@ifhtml} and @code{@@end ifhtml}, which
11355 specify text to appear only in HTML output.@refill
11357 For example,
11359 @example
11360 @@iftex
11361 This text will appear only in the printed manual.
11362 @@end iftex
11363 @@ifinfo
11364 However, this text will appear only in Info.
11365 @@end ifinfo
11366 @end example
11368 @noindent
11369 The preceding example produces the following line:
11370 @iftex
11371 This text will appear only in the printed manual.
11372 @end iftex
11373 @ifinfo
11374 However, this text will appear only in Info.
11375 @end ifinfo
11377 @noindent
11378 Note how you only see one of the two lines, depending on whether you
11379 are reading the Info version or the printed version of this
11380 manual.@refill
11382 The @code{@@titlepage} command is a special variant of @code{@@iftex} that
11383 is used for making the title and copyright pages of the printed
11384 manual.  (@xref{titlepage, , @code{@@titlepage}}.) @refill
11387 @node Conditional Not Commands, Raw Formatter Commands, Conditional Commands, Conditionals
11388 @section Conditional Not Commands
11389 @findex ifnothtml
11390 @findex ifnotinfo
11391 @findex ifnottex
11393 You can specify text to be included in any output format @emph{other}
11394 than some given one with the @code{@@ifnot@dots{}} commands:
11395 @example
11396 @@ifnothtml @dots{} @@end ifnothtml
11397 @@ifnotinfo @dots{} @@end ifnotinfo
11398 @@ifnottex @dots{} @@end ifnottex
11399 @end example
11400 @noindent
11401 (The @code{@@ifnot@dots{}} command and the @code{@@end} command must
11402 actually appear on lines by themselves.)
11404 If the output file is not being made for the given format, the region is
11405 included.  Otherwise, it is ignored.
11407 The regions delimited by these commands are ordinary Texinfo source as
11408 with @code{@@iftex}, not raw formatter source as with @code{@@tex}.
11411 @node Raw Formatter Commands, set clear value, Conditional Not Commands, Conditionals
11412 @section Raw Formatter Commands
11413 @cindex @TeX{} commands, using ordinary
11414 @cindex HTML commands, using ordinary
11415 @cindex Raw formatter commands
11416 @cindex Ordinary @TeX{} commands, using
11417 @cindex Ordinary HTML commands, using
11418 @cindex Commands using raw @TeX{}
11419 @cindex Commands using raw HTML
11420 @cindex plain @TeX{}
11422 Inside a region delineated by @code{@@iftex} and @code{@@end iftex}, you
11423 can embed some raw @TeX{} commands.  Info will ignore these commands
11424 since they are only in that part of the file which is seen by @TeX{}.
11425 You can write the @TeX{} commands as you would write them in a normal
11426 @TeX{} file, except that you must replace the @samp{\} used by @TeX{}
11427 with an @samp{@@}.  For example, in the @code{@@titlepage} section of a
11428 Texinfo file, you can use the @TeX{} command @code{@@vskip} to format
11429 the copyright page.  (The @code{@@titlepage} command causes Info to
11430 ignore the region automatically, as it does with the @code{@@iftex}
11431 command.)
11433 However, many features of plain @TeX{} will not work, as they are
11434 overridden by Texinfo features.
11436 @findex tex
11437 You can enter plain @TeX{} completely, and use @samp{\} in the @TeX{}
11438 commands, by delineating a region with the @code{@@tex} and @code{@@end
11439 tex} commands.  (The @code{@@tex} command also causes Info to ignore the
11440 region, like the @code{@@iftex} command.)  The sole exception is that
11441 @code{@@} chracter still introduces a command, so that @code{@@end tex}
11442 can be recognized properly.
11444 @cindex Mathematical expressions
11445 For example, here is a mathematical expression written in
11446 plain @TeX{}:
11448 @example
11449 @@tex
11450 $$ \chi^2 = \sum_@{i=1@}^N
11451           \left (y_i - (a + b x_i)
11452           \over \sigma_i\right)^2 $$
11453 @@end tex
11454 @end example
11456 @noindent
11457 The output of this example will appear only in a printed manual.  If
11458 you are reading this in Info, you will not see the equation that appears
11459 in the printed manual.
11460 @iftex
11461 In a printed manual, the above expression looks like
11462 this:
11463 @end iftex
11465 @tex
11466 $$ \chi^2 = \sum_{i=1}^N
11467           \left(y_i - (a + b x_i)
11468           \over \sigma_i\right)^2 $$
11469 @end tex
11471 @findex ifhtml
11472 @findex html
11473 Analogously, you can use @code{@@ifhtml @dots{} @@end ifhtml} to delimit
11474 a region to be included in HTML output only, and @code{@@html @dots{}
11475 @@end ifhtml} for a region of raw HTML (again, except that @code{@@} is
11476 still the escape character, so the @code{@@end} command can be
11477 recognized.)
11480 @node set clear value,  , Raw Formatter Commands, Conditionals
11481 @comment  node-name,  next,  previous,  up
11482 @section @code{@@set}, @code{@@clear}, and @code{@@value}
11484 You can direct the Texinfo formatting commands to format or ignore parts
11485 of a Texinfo file with the @code{@@set}, @code{@@clear}, @code{@@ifset},
11486 and @code{@@ifclear} commands.@refill
11488 In addition, you can use the @code{@@set @var{flag}} command to set the
11489 value of @var{flag} to a string of characters; and use
11490 @code{@@value@{@var{flag}@}} to insert that string.  You can use
11491 @code{@@set}, for example, to set a date and use @code{@@value} to
11492 insert the date in several places in the Texinfo file.@refill
11494 @menu
11495 * ifset ifclear::               Format a region if a flag is set.
11496 * value::                       Replace a flag with a string.
11497 * value Example::               An easy way to update edition information.
11498 @end menu
11501 @node ifset ifclear, value, set clear value, set clear value
11502 @subsection @code{@@ifset} and @code{@@ifclear}
11504 @findex ifset
11505 When a @var{flag} is set, the Texinfo formatting commands format text
11506 between subsequent pairs of @code{@@ifset @var{flag}} and @code{@@end
11507 ifset} commands.  When the @var{flag} is cleared, the Texinfo formatting
11508 commands do @emph{not} format the text.
11510 Use the @code{@@set @var{flag}} command to turn on, or @dfn{set}, a
11511 @var{flag}; a @dfn{flag} can be any single word.  The format for the
11512 command looks like this:@refill
11513 @findex set
11515 @example
11516 @@set @var{flag}
11517 @end example
11519 Write the conditionally formatted text between @code{@@ifset @var{flag}}
11520 and @code{@@end ifset} commands, like this:@refill
11522 @example
11523 @group
11524 @@ifset @var{flag}
11525 @var{conditional-text}
11526 @@end ifset
11527 @end group
11528 @end example
11530 For example, you can create one document that has two variants, such as
11531 a manual for a `large' and `small' model:@refill
11533 @example
11534 You can use this machine to dig up shrubs
11535 without hurting them.
11537 @@set large
11539 @@ifset large
11540 It can also dig up fully grown trees.
11541 @@end ifset
11543 Remember to replant promptly @dots{}
11544 @end example
11546 @noindent
11547 In the example, the formatting commands will format the text between
11548 @code{@@ifset large} and @code{@@end ifset} because the @code{large}
11549 flag is set.@refill
11551 @findex clear
11552 Use the @code{@@clear @var{flag}} command to turn off, or @dfn{clear},
11553 a flag.  Clearing a flag is the opposite of setting a flag.  The
11554 command looks like this:@refill
11556 @example
11557 @@clear @var{flag}
11558 @end example
11560 @noindent
11561 Write the command on a line of its own.
11563 When @var{flag} is cleared, the Texinfo formatting commands do
11564 @emph{not} format the text between @code{@@ifset @var{flag}} and
11565 @code{@@end ifset}; that text is ignored and does not appear in either
11566 printed or Info output.@refill
11568 For example, if you clear the flag of the preceding example by writing
11569 an @code{@@clear large} command after the @code{@@set large} command
11570 (but before the conditional text), then the Texinfo formatting commands
11571 ignore the text between the @code{@@ifset large} and @code{@@end ifset}
11572 commands.  In the formatted output, that text does not appear; in both
11573 printed and Info output, you see only the lines that say, ``You can use
11574 this machine to dig up shrubs without hurting them.  Remember to replant
11575 promptly @dots{}''.
11577 @findex ifclear
11578 If a flag is cleared with an @code{@@clear @var{flag}} command, then
11579 the formatting commands format text between subsequent pairs of
11580 @code{@@ifclear} and @code{@@end ifclear} commands.  But if the flag
11581 is set with @code{@@set @var{flag}}, then the formatting commands do
11582 @emph{not} format text between an @code{@@ifclear} and an @code{@@end
11583 ifclear} command; rather, they ignore that text.  An @code{@@ifclear}
11584 command looks like this:@refill
11586 @example
11587 @@ifclear @var{flag}
11588 @end example
11590 @need 700
11591 In brief, the commands are:@refill
11593 @table @code
11594 @item @@set @var{flag}
11595 Tell the Texinfo formatting commands that @var{flag} is set.@refill
11597 @item @@clear @var{flag}
11598 Tell the Texinfo formatting commands that @var{flag} is cleared.@refill
11600 @item @@ifset @var{flag}
11601 If @var{flag} is set, tell the Texinfo formatting commands to format
11602 the text up to the following @code{@@end ifset} command.@refill
11604 If @var{flag} is cleared, tell the Texinfo formatting commands to
11605 ignore text up to the following @code{@@end ifset} command.@refill
11607 @item @@ifclear @var{flag}
11608 If @var{flag} is set, tell the Texinfo formatting commands to ignore
11609 the text up to the following @code{@@end ifclear} command.@refill
11611 If @var{flag} is cleared, tell the Texinfo formatting commands to
11612 format the text up to the following @code{@@end ifclear}
11613 command.@refill
11614 @end table
11616 @node value, value Example, ifset ifclear, set clear value
11617 @subsection @code{@@value}
11618 @findex value
11620 You can use the @code{@@set} command to specify a value for a flag,
11621 which is expanded by the @code{@@value} command.  The value is a string
11622 a characters.
11624 Write the @code{@@set} command like this:
11626 @example
11627 @@set foo This is a string.
11628 @end example
11630 @noindent
11631 This sets the value of @code{foo} to ``This is a string.''
11633 The Texinfo formatters replace an @code{@@value@{@var{flag}@}} command with
11634 the string to which @var{flag} is set.@refill
11636 Thus, when @code{foo} is set as shown above, the Texinfo formatters convert
11638 @example
11639 @group
11640 @@value@{foo@}
11641 @exdent @r{to}
11642 This is a string.
11643 @end group
11644 @end example
11646 You can write an @code{@@value} command within a paragraph; but you
11647 must write an @code{@@set} command on a line of its own.
11649 If you write the @code{@@set} command like this:
11651 @example
11652 @@set foo
11653 @end example
11655 @noindent
11656 without specifying a string, the value of @code{foo} is an empty string.
11658 If you clear a previously set flag with an @code{@@clear @var{flag}}
11659 command, a subsequent @code{@@value@{flag@}} command is invalid and the
11660 string is replaced with an error message that says @samp{@{No value for
11661 "@var{flag}"@}}.
11663 For example, if you set @code{foo} as follows:@refill
11665 @example
11666 @@set how-much very, very, very
11667 @end example
11669 @noindent
11670 then the formatters transform
11672 @example
11673 @group
11674 It is a @@value@{how-much@} wet day.
11675 @exdent @r{into}
11676 It is a very, very, very wet day.
11677 @end group
11678 @end example
11680 If you write
11682 @example
11683 @@clear how-much
11684 @end example
11686 @noindent
11687 then the formatters transform
11689 @example
11690 @group
11691 It is a @@value@{how-much@} wet day.
11692 @exdent @r{into}
11693 It is a @{No value for "how-much"@} wet day.
11694 @end group
11695 @end example
11697 @node value Example,  , value, set clear value
11698 @subsection @code{@@value} Example
11700 You can use the @code{@@value} command to limit the number of places you
11701 need to change when you record an update to a manual.
11702 Here is how it is done in @cite{The GNU Make Manual}:
11704 @need 1000
11705 @noindent
11706 Set the flags:
11708 @example
11709 @group
11710 @@set EDITION 0.35 Beta
11711 @@set VERSION 3.63 Beta
11712 @@set UPDATED 14 August 1992
11713 @@set UPDATE-MONTH August 1992
11714 @end group
11715 @end example
11717 @need 750
11718 @noindent
11719 Write text for the first @code{@@ifinfo} section, for people reading the
11720 Texinfo file:
11722 @example
11723 @group
11724 This is Edition @@value@{EDITION@},
11725 last updated @@value@{UPDATED@},
11726 of @@cite@{The GNU Make Manual@},
11727 for @@code@{make@}, Version @@value@{VERSION@}.
11728 @end group
11729 @end example
11731 @need 1000
11732 @noindent
11733 Write text for the title page, for people reading the printed manual:
11734 @c List only the month and the year since that looks less fussy on a
11735 @c printed cover than a date that lists the day as well.
11737 @example
11738 @group
11739 @@title GNU Make
11740 @@subtitle A Program for Directing Recompilation
11741 @@subtitle Edition @@value@{EDITION@}, @dots{}
11742 @@subtitle @@value@{UPDATE-MONTH@}
11743 @end group
11744 @end example
11746 @noindent
11747 (On a printed cover, a date listing the month and the year looks less
11748 fussy than a date listing the day as well as the month and year.)
11750 @need 750
11751 @noindent
11752 Write text for the Top node, for people reading the Info file:
11754 @example
11755 @group
11756 This is Edition @@value@{EDITION@}
11757 of the @@cite@{GNU Make Manual@},
11758 last updated @@value@{UPDATED@}
11759 for @@code@{make@} Version @@value@{VERSION@}.
11760 @end group
11761 @end example
11763 @need 950
11764 After you format the manual, the text in the first @code{@@ifinfo}
11765 section looks like this:
11767 @example
11768 @group
11769 This is Edition 0.35 Beta, last updated 14 August 1992,
11770 of `The GNU Make Manual', for `make', Version 3.63 Beta.
11771 @end group
11772 @end example
11774 When you update the manual, change only the values of the flags; you do
11775 not need to rewrite the three sections.
11778 @node Macros, Format/Print Hardcopy, Conditionals, Top
11779 @chapter Macros: Defining New Texinfo Commands
11780 @cindex Macros
11781 @cindex Defining new Texinfo commands
11782 @cindex New Texinfo commands, defining
11783 @cindex Texinfo commands, defining new
11784 @cindex User-defined Texinfo commands
11786 A Texinfo @dfn{macro} allows you to define a new Texinfo command as any
11787 sequence of text and/or existing commands (including other macros).  The
11788 macro can have any number of @dfn{parameters}---text you supply each
11789 time you use the macro.  (This has nothing to do with the
11790 @code{@@defmac} command, which is for documenting macros in the subject
11791 of the manual; @pxref{Def Cmd Template}.)
11793 @menu
11794 * Defining Macros::             Both defining and undefining new commands.
11795 * Invoking Macros::             Using a macro, once you've defined it.
11796 @end menu
11799 @node Defining Macros, Invoking Macros, Macros, Macros
11800 @section Defining Macros
11801 @cindex Defining macros
11802 @cindex Macro definitions
11804 @findex macro
11805 You use the Texinfo @code{@@macro} command to define a macro.  For example:
11807 @example
11808 @@macro @var{macro-name}@{@var{param1}, @var{param2}, @dots{}@}
11809 @var{text} @dots{} \@var{param1}\ @dots{}
11810 @@end macro
11811 @end example
11813 The @dfn{parameters} @var{param1}, @var{param2}, @dots{} correspond to
11814 arguments supplied when the macro is subsequently used in the document
11815 (see the next section).
11817 If a macro needs no parameters, you can define it either with an empty
11818 list (@samp{@@macro foo @{@}}) or with no braces at all (@samp{@@macro
11819 foo}).
11821 @cindex Body of a macro
11822 @cindex Mutually recursive macros
11823 @cindex Recursion, mutual
11824 The definition or @dfn{body} of the macro can contain any Texinfo
11825 commands, including previously-defined macros.  (It is not possible to
11826 have mutually recursive Texinfo macros.)  In the body, instances of a
11827 parameter name surrounded by backslashes, as in @samp{\@var{param1}\} in
11828 the example above, are replaced by the corresponding argument from the
11829 macro invocation.
11831 @findex unmacro
11832 @cindex Macros, undefining
11833 @cindex Undefining macros
11834 You can undefine a macro @var{foo} with @code{@@unmacro @var{foo}}.
11835 It is not an error to undefine a macro that is already undefined.
11836 For example:
11838 @example
11839 @@unmacro foo
11840 @end example
11843 @node Invoking Macros,  , Defining Macros, Macros
11844 @section Invoking Macros
11845 @cindex Invoking macros
11846 @cindex Macro invocation
11848 After a macro is defined (see the previous section), you can use
11849 (@dfn{invoke}) it in your document like this:
11851 @example
11852 @@@var{macro-name} @{@var{arg1}, @var{arg2}, @dots{}@}
11853 @end example
11855 @noindent and the result will be just as if you typed the body of
11856 @var{macro-name} at that spot.  For example:
11858 @example
11859 @@macro foo @{p, q@}
11860 Together: \p\ & \q\.
11861 @@end macro
11862 @@foo@{a, b@}
11863 @end example
11865 @noindent produces:
11867 @display
11868 Together: a & b.
11869 @end display
11871 @cindex Backslash, and macros
11872 Thus, the arguments and parameters are separated by commas and delimited
11873 by braces; any whitespace after (but not before) a comma is ignored.  To
11874 insert a comma, brace, or backslash in an argument, prepend a backslash,
11875 as in
11877 @example
11878 @@@var{macro-name} @{\\\@{\@}\,@}
11879 @end example
11881 @noindent
11882 which will pass the (almost certainly error-producing) argument
11883 @samp{\@{@},} to @var{macro-name}.
11885 If the macro is defined to take a single argument, and is invoked
11886 without any braces, the entire rest of the line after the macro name is
11887 supplied as the argument.  For example:
11889 @example
11890 @@macro bar @{p@}
11891 Twice: \p\, \p\.
11892 @@end macro
11893 @@bar aah
11894 @end example
11896 @noindent produces:
11898 @display
11899 Twice: aah, aah.
11900 @end display
11903 @node Format/Print Hardcopy, Create an Info File, Macros, Top
11904 @comment  node-name,  next,  previous,  up
11905 @chapter Format and Print Hardcopy
11906 @cindex Format and print hardcopy
11907 @cindex Hardcopy, printing it
11908 @cindex Making a printed manual
11909 @cindex Sorting indices
11910 @cindex Indices, sorting
11911 @cindex @TeX{} index sorting
11912 @pindex texindex
11914 There are three major shell commands for making a printed manual from a
11915 Texinfo file: one for converting the Texinfo file into a file that will be
11916 printed, a second for sorting indices, and a third for printing the
11917 formatted document.  When you use the shell commands, you can either
11918 work directly in the operating system shell or work within a shell
11919 inside GNU Emacs.@refill
11921 If you are using GNU Emacs, you can use commands provided by Texinfo
11922 mode instead of shell commands.  In addition to the three commands to
11923 format a file, sort the indices, and print the result, Texinfo mode
11924 offers key bindings for commands to recenter the output buffer, show the
11925 print queue, and delete a job from the print queue.@refill
11927 @menu
11928 * Use TeX::                     Use @TeX{} to format for hardcopy.
11929 * Format with tex/texindex::    How to format in a shell.
11930 * Format with texi2dvi::        A simpler way to use the shell.
11931 * Print with lpr::              How to print.
11932 * Within Emacs::                How to format and print from an Emacs shell.
11933 * Texinfo Mode Printing::       How to format and print in Texinfo mode.
11934 * Compile-Command::             How to print using Emacs's compile command.
11935 * Requirements Summary::        @TeX{} formatting requirements summary.
11936 * Preparing for TeX::           What you need to do to use @TeX{}.
11937 * Overfull hboxes::             What are and what to do with overfull hboxes.
11938 * smallbook::                   How to print small format books and manuals.
11939 * A4 Paper::                    How to print on European A4 paper.
11940 * Cropmarks and Magnification::  How to print marks to indicate the size
11941                                 of pages and how to print scaled up output.
11942 @end menu
11944 @node Use TeX, Format with tex/texindex, Format/Print Hardcopy, Format/Print Hardcopy
11945 @ifinfo
11946 @heading Use @TeX{}
11947 @end ifinfo
11949 The typesetting program called @TeX{} is used for formatting a Texinfo
11950 file.  @TeX{} is a very powerful typesetting program and, if used right,
11951 does an exceptionally good job.  (@xref{Obtaining TeX, , How to Obtain
11952 @TeX{}}, for information on how to obtain @TeX{}.)
11954 The @code{makeinfo}, @code{texinfo-format-region}, and
11955 @code{texinfo-format-buffer} commands read the very same @@-commands
11956 in the Texinfo file as does @TeX{}, but process them differently to
11957 make an Info file; see @ref{Create an Info File}.@refill
11959 @node Format with tex/texindex, Format with texi2dvi, Use TeX, Format/Print Hardcopy
11960 @comment  node-name,  next,  previous,  up
11961 @section Format using @code{tex} and @code{texindex}
11962 @cindex Shell formatting with @code{tex} and @code{texindex}
11963 @cindex Formatting with @code{tex} and @code{texindex}
11964 @cindex DVI file
11966 Format the Texinfo file with the shell command @code{tex} followed by
11967 the name of the Texinfo file.  For example:
11969 @example
11970 tex foo.texi
11971 @end example
11973 @noindent @TeX{} will produce a @dfn{DVI file} as well as several auxiliary
11974 files containing information for indices, cross references, etc.  The
11975 DVI file (for @dfn{DeVice Independent} file) can be printed on virtually
11976 any printe (see the following sections).
11978 @pindex texindex
11979 The @code{tex} formatting command itself does not sort the indices; it
11980 writes an output file of unsorted index data.  (The @code{texi2dvi}
11981 command automatically generates indices; see @ref{Format with texi2dvi,,
11982 Format using @code{texi2dvi}}.)  To generate a printed index after
11983 running the @code{tex} command, you first need a sorted index to work
11984 from.  The @code{texindex} command sorts indices.  (The source file
11985 @file{texindex.c} comes as part of the standard Texinfo distribution,
11986 among other places.)@refill
11988 @cindex Names of index files
11989 The @code{tex} formatting command outputs unsorted index files under
11990 names that obey a standard convention: the name of your main input file
11991 with any @samp{.tex} (or similar, @pxref{tex invocation,,, web2c,
11992 Web2c}) extension removed, followed by the two letter names of indices.
11993 For example, the raw index output files for the input file
11994 @file{foo.texinfo} would be @file{foo.cp}, @file{foo.vr}, @file{foo.fn},
11995 @file{foo.tp}, @file{foo.pg} and @file{foo.ky}.  Those are exactly the
11996 arguments to give to @code{texindex}.@refill
11998 @need 1000
11999 @cindex Wildcards
12000 @cindex Globbing
12001 Instead of specifying all the unsorted index file names explicitly, you
12002 can use @samp{??} as shell wildcards and give the command in this
12003 form:@refill
12005 @example
12006 texindex foo.??
12007 @end example
12009 @noindent
12010 This command will run @code{texindex} on all the unsorted index files,
12011 including any that you have defined yourself using @code{@@defindex}
12012 or @code{@@defcodeindex}.  (You may execute @samp{texindex foo.??}
12013 even if there are similarly named files with two letter extensions
12014 that are not index files, such as @samp{foo.el}.  The @code{texindex}
12015 command reports but otherwise ignores such files.)@refill
12017 For each file specified, @code{texindex} generates a sorted index file
12018 whose name is made by appending @samp{s} to the input file name.  The
12019 @code{@@printindex} command knows to look for a file of that name
12020 (@pxref{Printing Indices & Menus}).  @code{texindex} does not alter the
12021 raw index output file.@refill
12023 After you have sorted the indices, you need to rerun the @code{tex}
12024 formatting command on the Texinfo file.  This regenerates the DVI file,
12025 this time with up-to-date index entries.
12027 Finally, you may need to run @code{tex} one more time, to get the page
12028 numbers in the cross-references correct.
12030 To summarize, this is a four step process:
12032 @enumerate
12033 @item
12034 Run @code{tex} on your Texinfo file.  This generates a DVI file (with
12035 undefined cross-references and no indices), and the raw index files
12036 (with two letter extensions).
12038 @item
12039 Run @code{texindex} on the raw index files.  This creates the
12040 corresponding sorted index files (with three letter extensions).
12042 @item
12043 Run @code{tex} again on your Texinfo file.  This regenerates the DVI
12044 file, this time with indices and defined cross-references, but with page
12045 numbers for the cross-references from last time, generally incorrect.
12047 @item
12048 Run @code{tex} one last time.  This time the correct page numbers are
12049 written for the cross-references.
12050 @end enumerate
12052 @pindex texi2dvi
12053 Alternatively, it's a one-step process: run @code{texi2dvi}.
12055 You need not run @code{texindex} each time after you run @code{tex}.  If
12056 you do not, on the next run, the @code{tex} formatting command will use
12057 whatever sorted index files happen to exist from the previous use of
12058 @code{texindex}.  This is usually ok while you are
12059 debugging.@refill
12062 @node Format with texi2dvi, Print with lpr, Format with tex/texindex, Format/Print Hardcopy
12063 @comment  node-name,  next,  previous,  up
12064 @section Format using @code{texi2dvi}
12065 @pindex texi2dvi @r{(shell script)}
12067 The @code{texi2dvi} command automatically runs both @code{tex} and
12068 @code{texindex} as many times as necessary to produce a DVI file with
12069 up-to-date, sorted indices.  It simplifies the
12070 @code{tex}---@code{texindex}---@code{tex} sequence described in the
12071 previous section.
12073 The syntax for @code{texi2dvi} is like this (where @samp{prompt$} is your
12074 shell prompt):@refill
12076 @example
12077 prompt$ @kbd{texi2dvi @var{filename}@dots{}}
12078 @end example
12080 For a list of options, run @samp{texi2dvi --help}.
12083 @node Print with lpr, Within Emacs, Format with texi2dvi, Format/Print Hardcopy
12084 @comment  node-name,  next,  previous,  up
12085 @section Shell Print Using @code{lpr -d}
12086 @pindex lpr @r{(DVI print command)}
12088 The precise command to print a DVI file depends on your system
12089 installation, but @samp{lpr -d} is common.  The command may require the
12090 DVI file name without any extension or with a @samp{.dvi}
12091 extension.  (If it is @samp{lpr}, you must include the @samp{.dvi}.)
12093 The following commands, for example, will (probably) suffice to sort the
12094 indices, format, and print the @cite{Bison Manual}:
12096 @example
12097 @group
12098 tex bison.texinfo
12099 texindex bison.??
12100 tex bison.texinfo
12101 lpr -d bison.dvi
12102 @end group
12103 @end example
12105 @noindent
12106 (Remember that the shell commands may be different at your site; but
12107 these are commonly used versions.)@refill
12109 @need 1000
12110 Using the @code{texi2dvi} shell script, you simply need type:@refill
12112 @example
12113 @group
12114 texi2dvi bison.texinfo
12115 lpr -d bison.dvi
12116 @end group
12117 @end example
12119 @node Within Emacs, Texinfo Mode Printing, Print with lpr, Format/Print Hardcopy
12120 @comment  node-name,  next,  previous,  up
12121 @section From an Emacs Shell
12122 @cindex Print, format from Emacs shell
12123 @cindex Format, print from Emacs shell
12124 @cindex Shell, format, print from
12125 @cindex Emacs shell, format, print from
12126 @cindex GNU Emacs shell, format, print from
12128 You can give formatting and printing commands from a shell within GNU
12129 Emacs.  To create a shell within Emacs, type @kbd{M-x shell}.  In this
12130 shell, you can format and print the document.  @xref{Format/Print
12131 Hardcopy, , Format and Print Hardcopy}, for details.@refill
12133 You can switch to and from the shell buffer while @code{tex} is
12134 running and do other editing.  If you are formatting a long document
12135 on a slow machine, this can be very convenient.@refill
12137 You can also use @code{texi2dvi} from an Emacs shell.  For example,
12138 here is how to use @code{texi2dvi} to format and print @cite{Using and
12139 Porting GNU CC} from a shell within Emacs:
12141 @example
12142 @group
12143 texi2dvi gcc.texinfo
12144 lpr -d gcc.dvi
12145 @end group
12146 @end example
12147 @ifinfo
12149 @xref{Texinfo Mode Printing}, for more information about formatting
12150 and printing in Texinfo mode.@refill
12151 @end ifinfo
12153 @node Texinfo Mode Printing, Compile-Command, Within Emacs, Format/Print Hardcopy
12154 @section Formatting and Printing in Texinfo Mode
12155 @cindex Region printing in Texinfo mode
12156 @cindex Format and print in Texinfo mode
12157 @cindex Print and format in Texinfo mode
12159 Texinfo mode provides several predefined key commands for @TeX{}
12160 formatting and printing.  These include commands for sorting indices,
12161 looking at the printer queue, killing the formatting job, and
12162 recentering the display of the buffer in which the operations
12163 occur.@refill
12165 @table @kbd
12166 @item C-c C-t C-b
12167 @itemx M-x texinfo-tex-buffer
12168 Run @code{texi2dvi} on the current buffer.@refill
12170 @item C-c C-t C-r
12171 @itemx M-x texinfo-tex-region
12172 Run @TeX{} on the current region.@refill
12174 @item C-c C-t C-i
12175 @itemx M-x texinfo-texindex
12176 Sort the indices of a Texinfo file formatted with
12177 @code{texinfo-tex-region}.@refill
12179 @item C-c C-t C-p
12180 @itemx M-x texinfo-tex-print
12181 Print a DVI file that was made with @code{texinfo-tex-region} or
12182 @code{texinfo-tex-buffer}.@refill
12184 @item C-c C-t C-q
12185 @itemx M-x tex-show-print-queue
12186 Show the print queue.@refill
12188 @item C-c C-t C-d
12189 @itemx M-x texinfo-delete-from-print-queue
12190 Delete a job from the print queue; you will be prompted for the job
12191 number shown by a preceding @kbd{C-c C-t C-q} command
12192 (@code{texinfo-show-tex-print-queue}).@refill
12194 @item C-c C-t C-k
12195 @itemx M-x tex-kill-job
12196 Kill the currently running @TeX{} job started by
12197 @code{texinfo-tex-region} or @code{texinfo-tex-buffer}, or any other
12198 process running in the Texinfo shell buffer.@refill
12200 @item C-c C-t C-x
12201 @itemx M-x texinfo-quit-job
12202 Quit a @TeX{} formatting job that has stopped because of an error by
12203 sending an @key{x} to it.  When you do this, @TeX{} preserves a record
12204 of what it did in a @file{.log} file.@refill
12206 @item C-c C-t C-l
12207 @itemx M-x tex-recenter-output-buffer
12208 Redisplay the shell buffer in which the @TeX{} printing and formatting
12209 commands are run to show its most recent output.@refill
12210 @end table
12212 @need 1000
12213 Thus, the usual sequence of commands for formatting a buffer is as
12214 follows (with comments to the right):@refill
12216 @example
12217 @group
12218 C-c C-t C-b             @r{Run @code{texi2dvi} on the buffer.}
12219 C-c C-t C-p             @r{Print the DVI file.}
12220 C-c C-t C-q             @r{Display the printer queue.}
12221 @end group
12222 @end example
12224 The Texinfo mode @TeX{} formatting commands start a subshell in Emacs
12225 called the @file{*tex-shell*}.  The @code{texinfo-tex-command},
12226 @code{texinfo-texindex-command}, and @code{tex-dvi-print-command}
12227 commands are all run in this shell.
12229 You can watch the commands operate in the @samp{*tex-shell*} buffer,
12230 and you can switch to and from and use the @samp{*tex-shell*} buffer
12231 as you would any other shell buffer.@refill
12233 @need 1500
12234 The formatting and print commands depend on the values of several variables.
12235 The default values are:@refill
12237 @example
12238 @group
12239      @r{Variable}                              @r{Default value}
12241 texinfo-texi2dvi-command                  "texi2dvi"
12242 texinfo-tex-command                       "tex"
12243 texinfo-texindex-command                  "texindex"
12244 texinfo-delete-from-print-queue-command   "lprm"
12245 texinfo-tex-trailer                       "@@bye"
12246 tex-start-of-header                       "%**start"
12247 tex-end-of-header                         "%**end"
12248 tex-dvi-print-command                     "lpr -d"
12249 tex-show-queue-command                    "lpq"
12250 @end group
12251 @end example
12253 You can change the values of these variables with the @kbd{M-x
12254 edit-options} command (@pxref{Edit Options, , Editing Variable Values,
12255 emacs, The GNU Emacs Manual}), with the @kbd{M-x set-variable} command
12256 (@pxref{Examining, , Examining and Setting Variables, emacs, The GNU
12257 Emacs Manual}), or with your @file{.emacs} initialization file
12258 (@pxref{Init File, , , emacs, The GNU Emacs Manual}).@refill
12260 @node Compile-Command, Requirements Summary, Texinfo Mode Printing, Format/Print Hardcopy
12261 @comment  node-name,  next,  previous,  up
12262 @section Using the Local Variables List
12263 @cindex Local variables
12264 @cindex Compile command for formatting
12265 @cindex Format with the compile command
12267 Yet another way to apply the @TeX{} formatting command to a Texinfo file
12268 is to put that command in a @dfn{local variables list} at the end of the
12269 Texinfo file.  You can then specify the @code{tex} or @code{texi2dvi}
12270 commands as a @code{compile-command} and have Emacs run it by typing
12271 @kbd{M-x compile}.  This creates a special shell called the
12272 @file{*compilation*} buffer in which Emacs runs the compile command.
12273 For example, at the end of the @file{gdb.texinfo} file, after the
12274 @code{@@bye}, you could put the following:@refill
12276 @example
12277 @group
12278 Local Variables:
12279 compile-command: "texi2dvi gdb.texinfo"
12280 End:
12281 @end group
12282 @end example
12284 @noindent
12285 This technique is most often used by programmers who also compile programs
12286 this way; see @ref{Compilation, , , emacs, The GNU Emacs Manual}.@refill
12289 @node Requirements Summary, Preparing for TeX, Compile-Command, Format/Print Hardcopy
12290 @comment  node-name,  next,  previous,  up
12291 @section @TeX{} Formatting Requirements Summary
12292 @cindex Requirements for formatting
12293 @cindex Minimal requirements for formatting
12294 @cindex Formatting requirements
12296 Every Texinfo file that is to be input to @TeX{} must begin with a
12297 @code{\input} command and must contain an @code{@@setfilename} command:
12299 @example
12300 \input texinfo
12301 @@setfilename @var{arg-not-used-by-@TeX{}}
12302 @end example
12304 @noindent
12305 The first command instructs @TeX{} to load the macros it needs to
12306 process a Texinfo file and the second command opens auxiliary files.
12308 Every Texinfo file must end with a line that terminates @TeX{}'s
12309 processing and forces out unfinished pages:
12311 @example
12312 @@bye
12313 @end example
12315 Strictly speaking, these lines are all a Texinfo file needs to be
12316 processed successfully by @TeX{}.  
12318 Usually, however, the beginning includes an @code{@@settitle} command to
12319 define the title of the printed manual, an @code{@@setchapternewpage}
12320 command, a title page, a copyright page, and permissions.  Besides an
12321 @code{@@bye}, the end of a file usually includes indices and a table of
12322 contents.  (And of course most manuals contain a body of text as well.)
12324 @iftex
12325 For more information, see
12326 @ref{settitle, , @code{@@settitle}},
12327 @ref{setchapternewpage, , @code{@@setchapternewpage}},
12328 @ref{Headings, ,Page Headings},
12329 @ref{Titlepage & Copyright Page},
12330 @ref{Printing Indices & Menus}, and
12331 @ref{Contents}.
12332 @end iftex
12333 @noindent
12334 @ifinfo
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 ifinfo
12345 @node Preparing for TeX, Overfull hboxes, Requirements Summary, Format/Print Hardcopy
12346 @comment  node-name,  next,  previous,  up
12347 @section Preparing to Use @TeX{}
12348 @cindex Preparing to use @TeX{}
12349 @cindex @TeX{} input initialization
12350 @cindex @code{TEXINPUTS} environment variable
12351 @vindex TEXINPUTS
12352 @cindex @b{.profile} initialization file
12353 @cindex @b{.cshrc} initialization file
12354 @cindex Initialization file for @TeX{} input
12356 @TeX{} needs to know where to find the @file{texinfo.tex} file that you
12357 have told it to input with the @samp{\input texinfo} command at the
12358 beginning of the first line.  The @file{texinfo.tex} file tells @TeX{}
12359 how to handle @@-commands; it is included in all standard GNU
12360 distributions.
12362 @pindex texinfo.tex@r{, installing}
12363 Usually, the @file{texinfo.tex} file is put under the default directory
12364 that contains @TeX{} macros
12365 (@file{/usr/local/share/texmf/tex/texinfo/texinfo.tex} by default) when
12366 GNU Emacs or other GNU software is installed.  In this case, @TeX{} will
12367 find the file and you do not need to do anything special.
12368 Alternatively, you can put @file{texinfo.tex} in the current directory
12369 when you run @TeX{}, and @TeX{} will find it there.
12371 @pindex epsf.tex@r{, installing}
12372 Also, you should install @file{epsf.tex} in the same place as
12373 @file{texinfo.tex}, if it is not already installed from another
12374 distribution.  This file is needed to support the @code{@@image} command
12375 (@pxref{Images}).
12377 @pindex texinfo.cnf @r{installation}
12378 @cindex Customizing of @TeX{} for Texinfo
12379 @cindex Site-wide Texinfo configuration file
12380 Optionally, you may create an additional @file{texinfo.cnf}, and install
12381 it as well.  This file is read by @TeX{} at the @code{@@setfilename}
12382 command (@pxref{setfilename,, @code{@@setfilename}}).  You can put any
12383 commands you like there according to local site-wide conventions, and
12384 they will be read by @TeX{} when processing any Texinfo document.  For
12385 example, if @file{texinfo.cnf} contains the a single line
12386 @samp{@@afourpaper} (@pxref{A4 Paper}), then all Texinfo documents will
12387 be processed with that page size in effect.  If you have nothing to put
12388 in @file{texinfo.cnf}, you do not need to create it.
12390 @vindex TEXINPUTS
12391 If neither of the above locations for these system files suffice for
12392 you, you can specify the directories explicitly.  For
12393 @file{texinfo.tex}, you can do this by writing the complete path for the
12394 file after the @code{\input} command.  Another way, that works for both
12395 @file{texinfo.tex} and @file{texinfo.cnf} (and any other file @TeX{}
12396 might read), is to set the @code{TEXINPUTS} environment variable in your
12397 @file{.cshrc} or @file{.profile} file.
12399 Which you use of @file{.cshrc} or @file{.profile} depends on
12400 whether you use a Bourne shell-compatible (@code{sh}, @code{bash},
12401 @code{ksh}, @dots{}) or C shell-compatible (@code{csh}, @code{tcsh})
12402 command interpreter.  The latter read the @file{.cshrc} file for
12403 initialization information, and the former read @file{.profile}.
12405 In a @file{.cshrc} file, you could use the following @code{csh} command
12406 sequence:
12408 @example
12409 setenv TEXINPUTS .:/home/me/mylib:/usr/lib/tex/macros
12410 @end example
12412 @need 1000
12413 In a @file{.profile} file, you could use the following @code{sh} command
12414 sequence:
12416 @example
12417 @group
12418 TEXINPUTS=.:/home/me/mylib:/usr/lib/tex/macros
12419 export TEXINPUTS
12420 @end group
12421 @end example
12423 @noindent
12424 This would cause @TeX{} to look for @file{\input} file first in the current
12425 directory, indicated by the @samp{.}, then in a hypothetical user's
12426 @file{me/mylib} directory, and finally in a system directory.
12429 @node Overfull hboxes, smallbook, Preparing for TeX, Format/Print Hardcopy
12430 @comment  node-name,  next,  previous,  up
12431 @section Overfull ``hboxes''
12432 @cindex Overfull @samp{hboxes}
12433 @cindex @samp{hboxes}, overfull
12434 @cindex Final output
12436 @TeX{} is sometimes unable to typeset a line without extending it into
12437 the right margin.  This can occur when @TeX{} comes upon what it
12438 interprets as a long word that it cannot hyphenate, such as an
12439 electronic mail network address or a very long title.  When this
12440 happens, @TeX{} prints an error message like this:@refill
12442 @example
12443 Overfull \hbox (20.76302pt too wide)
12444 @end example
12446 @noindent
12447 (In @TeX{}, lines are in ``horizontal boxes'', hence the term, ``hbox''.
12448 The backslash, @samp{\}, is the @TeX{} equivalent of @samp{@@}.)@refill
12450 @TeX{} also provides the line number in the Texinfo source file and
12451 the text of the offending line, which is marked at all the places that
12452 @TeX{} knows how to hyphenate words.
12453 @xref{Debugging with TeX, , Catching Errors with @TeX{} Formatting},
12454 for more information about typesetting errors.@refill
12456 If the Texinfo file has an overfull hbox, you can rewrite the sentence
12457 so the overfull hbox does not occur, or you can decide to leave it.  A
12458 small excursion into the right margin often does not matter and may not
12459 even be noticeable.@refill
12461 @cindex Black rectangle in hardcopy
12462 @cindex Rectangle, ugly, black in hardcopy
12463 However, unless told otherwise, @TeX{} will print a large, ugly, black
12464 rectangle beside the line that contains the overfull hbox.  This is so
12465 you will notice the location of the problem if you are correcting a
12466 draft.@refill
12468 @need 1000
12469 @findex finalout
12470 To prevent such a monstrosity from marring your final printout, write
12471 the following in the beginning of the Texinfo file on a line of its own,
12472 before the @code{@@titlepage} command:@refill
12474 @example
12475 @@finalout
12476 @end example
12478 @node smallbook, A4 Paper, Overfull hboxes, Format/Print Hardcopy
12479 @comment  node-name,  next,  previous,  up
12480 @section Printing ``Small'' Books
12481 @findex smallbook
12482 @cindex Small book size
12483 @cindex Book, printing small
12484 @cindex Page sizes for books
12485 @cindex Size of printed book
12487 By default, @TeX{} typesets pages for printing in an 8.5 by 11 inch
12488 format.  However, you can direct @TeX{} to typeset a document in a 7 by
12489 9.25 inch format that is suitable for bound books by inserting the
12490 following command on a line by itself at the beginning of the Texinfo
12491 file, before the title page:@refill
12493 @example
12494 @@smallbook
12495 @end example
12497 @noindent
12498 (Since regular sized books are often about 7 by 9.25 inches, this
12499 command might better have been called the @code{@@regularbooksize}
12500 command, but it came to be called the @code{@@smallbook} command by
12501 comparison to the 8.5 by 11 inch format.)@refill
12503 If you write the @code{@@smallbook} command between the
12504 start-of-header and end-of-header lines, the Texinfo mode @TeX{}
12505 region formatting command, @code{texinfo-tex-region}, will format the
12506 region in ``small'' book size (@pxref{Start of Header}).@refill
12508 The Free Software Foundation distributes printed copies of @cite{The GNU
12509 Emacs Manual} and other manuals in the ``small'' book size.
12510 @xref{smallexample & smalllisp, , @code{@@smallexample} and
12511 @code{@@smalllisp}}, for information about commands that make it easier
12512 to produce examples for a smaller manual.@refill
12514 Alternatively, to avoid embedding this physical paper size in your
12515 document, use @code{texi2dvi} to format your document (@pxref{Format
12516 with texi2dvi}), and supply @samp{-t @@smallbook} as an argument.  Then
12517 other people do not have to change the document source file to format it
12518 differently.
12521 @node A4 Paper, Cropmarks and Magnification, smallbook, Format/Print Hardcopy
12522 @comment  node-name,  next,  previous,  up
12523 @section Printing on A4 Paper
12524 @cindex A4 paper, printing on
12525 @cindex Paper size, European A4
12526 @cindex European A4 paper
12527 @findex afourpaper
12529 You can tell @TeX{} to typeset a document for printing on European size
12530 A4 paper with the @code{@@afourpaper} command.  Write the command on a
12531 line by itself between @code{@@iftex} and @code{@@end iftex} lines near
12532 the beginning of the Texinfo file, before the title page:@refill
12534 For example, this is how you would write the header for this manual:@refill
12536 @example
12537 @group
12538 \input texinfo    @@c -*-texinfo-*-
12539 @@c %**start of header
12540 @@setfilename texinfo
12541 @@settitle Texinfo
12542 @@syncodeindex vr fn
12543 @@iftex
12544 @@afourpaper
12545 @@end iftex
12546 @@c %**end of header
12547 @end group
12548 @end example
12550 Alternatively, to avoid embedding this physical paper size in your
12551 document, use @code{texi2dvi} to format your document (@pxref{Format
12552 with texi2dvi}), and supply @samp{-t @@afourpaper} as an argument.  Then
12553 other people do not have to change the document source file to format it
12554 differently.
12556 @pindex texinfo.cnf
12557 Another alternative: put the @code{@@afourpaper} command in the file
12558 @file{texinfo.cnf} that @TeX{} will read.  (No need for @code{@@iftex}
12559 there.)  This will automatically typeset all the Texinfo documents at
12560 your site with that paper size in effect.
12563 @node Cropmarks and Magnification,  , A4 Paper, Format/Print Hardcopy
12564 @comment  node-name,  next,  previous,  up
12565 @section Cropmarks and Magnification
12567 @findex cropmarks
12568 @cindex Cropmarks for printing
12569 @cindex Printing cropmarks
12570 You can attempt to direct @TeX{} to print cropmarks at the corners of
12571 pages with the @code{@@cropmarks} command.  Write the @code{@@cropmarks}
12572 command on a line by itself between @code{@@iftex} and @code{@@end
12573 iftex} lines near the beginning of the Texinfo file, before the title
12574 page, like this:@refill
12576 @example
12577 @group
12578 @@iftex
12579 @@cropmarks
12580 @@end iftex
12581 @end group
12582 @end example
12584 This command is mainly for printers that typeset several pages on one
12585 sheet of film; but you can attempt to use it to mark the corners of a
12586 book set to 7 by 9.25 inches with the @code{@@smallbook} command.
12587 (Printers will not produce cropmarks for regular sized output that is
12588 printed on regular sized paper.)  Since different printing machines work
12589 in different ways, you should explore the use of this command with a
12590 spirit of adventure.  You may have to redefine the command in the
12591 @file{texinfo.tex} definitions file.@refill
12593 @findex mag @r{(@TeX{} command)}
12594 @cindex Magnified printing
12595 @cindex Larger or smaller pages
12596 You can attempt to direct @TeX{} to typeset pages larger or smaller than
12597 usual with the @code{\mag} @TeX{} command.  Everything that is typeset
12598 is scaled proportionally larger or smaller.  (@code{\mag} stands for
12599 ``magnification''.)  This is @emph{not} a Texinfo @@-command, but is a
12600 plain @TeX{} command that is prefixed with a backslash.  You have to
12601 write this command between @code{@@tex} and @code{@@end tex}
12602 (@pxref{Raw Formatter Commands}).
12604 Follow the @code{\mag} command with an @samp{=} and then a number that
12605 is 1000 times the magnification you desire.  For example, to print pages
12606 at 1.2 normal size, write the following near the beginning of the
12607 Texinfo file, before the title page:@refill
12609 @example
12610 @group
12611 @@tex
12612 \mag=1200
12613 @@end tex
12614 @end group
12615 @end example
12617 With some printing technologies, you can print normal-sized copies that
12618 look better than usual by using a larger-than-normal master.@refill
12620 Depending on your system, @code{\mag} may not work or may work only at
12621 certain magnifications.  Be prepared to experiment.@refill
12623 @node Create an Info File, Install an Info File, Format/Print Hardcopy, Top
12624 @comment  node-name,  next,  previous,  up
12625 @chapter Creating an Info File
12626 @cindex Creating an Info file
12627 @cindex Info, creating an on-line file
12628 @cindex Formatting a file for Info
12630 @code{makeinfo} is a utility that converts a Texinfo file into an Info
12631 file; @code{texinfo-format-region} and @code{texinfo-format-buffer} are
12632 GNU Emacs functions that do the same.@refill
12634 A Texinfo file must contain an @code{@@setfilename} line near its
12635 beginning, otherwise the Info formatting commands will fail.
12637 For information on installing the Info file in the Info system, see
12638 @ref{Install an Info File}.@refill
12640 @menu
12641 * makeinfo advantages::         @code{makeinfo} provides better error checking.
12642 * Invoking makeinfo::           How to run @code{makeinfo} from a shell.
12643 * makeinfo options::            Specify fill-column and other options.
12644 * Pointer Validation::          How to check that pointers point somewhere.
12645 * makeinfo in Emacs::           How to run @code{makeinfo} from Emacs.
12646 * texinfo-format commands::     Two Info formatting commands written
12647                                   in Emacs Lisp are an alternative
12648                                   to @code{makeinfo}.
12649 * Batch Formatting::            How to format for Info in Emacs Batch mode.
12650 * Tag and Split Files::         How tagged and split files help Info
12651                                   to run better.
12652 @end menu
12654 @node makeinfo advantages, Invoking makeinfo, Create an Info File, Create an Info File
12655 @ifinfo
12656 @heading @code{makeinfo} Preferred
12657 @end ifinfo
12659 The @code{makeinfo} utility creates an Info file from a Texinfo source
12660 file more quickly than either of the Emacs formatting commands and
12661 provides better error messages.  We recommend it.  @code{makeinfo} is a
12662 C program that is independent of Emacs.  You do not need to run Emacs to
12663 use @code{makeinfo}, which means you can use @code{makeinfo} on machines
12664 that are too small to run Emacs. You can run @code{makeinfo} in
12665 any one of three ways: from an operating system shell, from a shell
12666 inside Emacs, or by typing a key command in Texinfo mode in Emacs.
12667 @refill
12669 The @code{texinfo-format-region} and the @code{texinfo-format-buffer}
12670 commands are useful if you cannot run @code{makeinfo}.  Also, in some
12671 circumstances, they format short regions or buffers more quickly than
12672 @code{makeinfo}.@refill
12674 @node Invoking makeinfo, makeinfo options, makeinfo advantages, Create an Info File
12675 @section Running @code{makeinfo} from a Shell
12677 To create an Info file from a Texinfo file, type @code{makeinfo}
12678 followed by the name of the Texinfo file.  Thus, to create the Info
12679 file for Bison, type the following to the shell:
12680 is the prompt):@refill
12682 @example
12683 makeinfo bison.texinfo
12684 @end example
12686 (You can run a shell inside Emacs by typing @kbd{M-x shell}.)@refill
12688 @ifinfo
12689 Sometimes you will want to specify options.  For example, if you wish
12690 to discover which version of @code{makeinfo} you are using,
12691 type:@refill
12693 @example
12694 makeinfo --version
12695 @end example
12697 @xref{makeinfo options}, for more information.
12698 @end ifinfo
12701 @node makeinfo options, Pointer Validation, Invoking makeinfo, Create an Info File
12702 @comment  node-name,  next,  previous,  up
12703 @section Options for @code{makeinfo}
12704 @cindex @code{makeinfo} options
12705 @cindex Options for @code{makeinfo}
12707 The @code{makeinfo} command takes a number of options.  Most often,
12708 options are used to set the value of the fill column and specify the
12709 footnote style.  Each command line option is a word preceded by
12710 @samp{--} or a letter preceded by @samp{-}.  You can use abbreviations
12711 for the long option names as long as they are unique.@refill
12713 For example, you could use the following shell command to create an Info
12714 file for @file{bison.texinfo} in which each line is filled to only 68
12715 columns:@refill
12717 @example
12718 makeinfo --fill-column=68 bison.texinfo
12719 @end example
12721 You can write two or more options in sequence, like this:@refill
12723 @example
12724 makeinfo --no-split --fill-column=70 @dots{}
12725 @end example
12727 @noindent
12728 This would keep the Info file together as one possibly very long
12729 file and would also set the fill column to 70.@refill
12731 The options are:
12733 @table @code
12735 @item -D @var{var}
12736 @opindex -D @var{var}
12737 Cause the variable @var{var} to be defined.  This is equivalent to
12738 @code{@@set @var{var}} in the Texinfo file (@pxref{set clear value}).
12740 @item --error-limit=@var{limit}
12741 @opindex --error-limit=@var{limit}
12742 Set the maximum number of errors that @code{makeinfo} will report
12743 before exiting (on the assumption that continuing would be useless);
12744 default 100.
12746 @need 150
12747 @item --fill-column=@var{width}
12748 @opindex --fill-column=@var{width}
12749 Specify the maximum number of columns in a line; this is the right-hand
12750 edge of a line.  Paragraphs that are filled will be filled to this
12751 width.  (Filling is the process of breaking up and connecting lines so
12752 that lines are the same length as or shorter than the number specified
12753 as the fill column.  Lines are broken between words.) The default value
12754 is 72.
12756 @item --footnote-style=@var{style}
12757 @opindex --footnote-style=@var{style}
12758 Set the footnote style to @var{style}, either @samp{end} for the end
12759 node style (the default) or @samp{separate} for the separate node style.
12760 The value set by this option overrides the value set in a Texinfo file
12761 by an @code{@@footnotestyle} command (@pxref{Footnotes}).  When the
12762 footnote style is @samp{separate}, @code{makeinfo} makes a new node
12763 containing the footnotes found in the current node.  When the footnote
12764 style is @samp{end}, @code{makeinfo} places the footnote references at
12765 the end of the current node.
12767 @item --force
12768 @opindex --force
12769 Ordinarily, if the input file has errors, the output files are not
12770 created.  With this option, they are preserved.
12772 @item --help
12773 @opindex --help
12774 Print a usage message listing all available options, then exit successfully.
12776 @item -I @var{dir}
12777 @opindex -I @var{dir}
12778 Add @code{dir} to the directory search list for finding files that are
12779 included using the @code{@@include} command.  By default,
12780 @code{makeinfo} searches only the current directory.
12782 @item --no-headers
12783 @opindex --no-headers
12784 Do not include menus or node lines in the output.  This results in an
12785 @sc{ascii} file that you cannot read in Info since it does not contain
12786 the requisite nodes or menus. It is primarily useful to extract certain
12787 pieces of a manual into separate files to be included in a distribution,
12788 such as @file{INSTALL} files.
12790 @item --no-split
12791 @opindex --no-split
12792 Suppress the splitting stage of @code{makeinfo}.  By default, large
12793 output files (where the size is greater than 70k bytes) are split into
12794 smaller subfiles, each one approximately 50k bytes.
12796 @item --no-pointer-validate
12797 @itemx --no-validate
12798 @opindex --no-pointer-validate
12799 @opindex --no-validate
12800 Suppress the pointer-validation phase of @code{makeinfo}.  Normally,
12801 after a Texinfo file is processed, some consistency checks are made to
12802 ensure that cross references can be resolved, etc.
12803 @xref{Pointer Validation}.@refill
12805 @item --no-warn
12806 @opindex --no-warn
12807 Suppress warning messages (but @emph{not} error messages).  You might
12808 want this if the file you are creating has examples of Texinfo cross
12809 references within it, and the nodes that are referenced do not actually
12810 exist.
12812 @item --no-number-footnotes
12813 @opindex --no-number-footnotes
12814 Suppress automatic footnote numbering.  By default, @code{makeinfo}
12815 numbers each footnote sequentially in a single node, resetting the
12816 current footnote number to 1 at the start of each node.
12818 @item --output=@var{file}
12819 @itemx -o @var{file}
12820 @opindex --output=@var{file}
12821 @opindex -o @var{file}
12822 Specify that the output should be directed to @var{file} and not to the
12823 file name specified in the @code{@@setfilename} command found in the
12824 Texinfo source (@pxref{setfilename}).  If @var{file} is @samp{-}, output
12825 goes to standard output and @samp{--no-split} is implied.
12827 @item -P @var{dir}
12828 @opindex -P @var{dir}
12829 Prepend @code{dir} to the directory search list for @code{@@include}.
12830 See @samp{-I} for more details.
12832 @item --paragraph-indent=@var{indent}
12833 @opindex --paragraph-indent=@var{indent}
12834 Set the paragraph indentation style to @var{indent}.  The value set by
12835 this option overrides the value set in a Texinfo file by an
12836 @code{@@paragraphindent} command (@pxref{paragraphindent}).  The value
12837 of @var{indent} is interpreted as follows:
12839 @table @asis
12840 @item @samp{asis}
12841 Preserve any existing indentation at the starts of paragraphs.
12843 @item @samp{0} or @samp{none}
12844 Delete any existing indentation.
12846 @item @var{num}
12847 Indent each paragraph by that number of spaces.
12848 @end table
12850 @item --reference-limit=@var{limit}
12851 @opindex --reference-limit=@var{limit}
12852 Set the value of the number of references to a node that
12853 @code{makeinfo} will make without reporting a warning.  If a node has more
12854 than this number of references in it, @code{makeinfo} will make the
12855 references but also report a warning.  The default is 1000.
12857 @item -U @var{var}
12858 Cause @var{var} to be undefined.  This is equivalent to
12859 @code{@@clear @var{var}} in the Texinfo file (@pxref{set clear value}).
12861 @item --verbose
12862 @opindex --verbose
12863 Cause @code{makeinfo} to display messages saying what it is doing.
12864 Normally, @code{makeinfo} only outputs messages if there are errors or
12865 warnings.
12867 @item --version
12868 @opindex --version
12869 Print the version number, then exit successfully.
12871 @end table
12874 @node Pointer Validation, makeinfo in Emacs, makeinfo options, Create an Info File
12875 @section Pointer Validation
12876 @cindex Pointer validation with @code{makeinfo}
12877 @cindex Validation of pointers
12879 If you do not suppress pointer-validation, @code{makeinfo} will check
12880 the validity of the final Info file.  Mostly, this means ensuring that
12881 nodes you have referenced really exist.  Here is a complete list of what
12882 is checked:@refill
12884 @enumerate
12885 @item
12886 If a `Next', `Previous', or `Up' node reference is a reference to a
12887 node in the current file and is not an external reference such as to
12888 @file{(dir)}, then the referenced node must exist.@refill
12890 @item
12891 In every node, if the `Previous' node is different from the `Up' node,
12892 then the `Previous' node must also be pointed to by a `Next' node.@refill
12894 @item
12895 Every node except the `Top' node must have an `Up' pointer.@refill
12897 @item
12898 The node referenced by an `Up' pointer must contain a reference to the
12899 current node in some manner other than through a `Next' reference.
12900 This includes menu entries and cross references.@refill
12902 @item
12903 If the `Next' reference of a node is not the same as the `Next' reference
12904 of the `Up' reference, then the node referenced by the `Next' pointer
12905 must have a `Previous' pointer that points back to the current node.
12906 This rule allows the last node in a section to point to the first node
12907 of the next chapter.@refill
12908 @end enumerate
12910 @node makeinfo in Emacs, texinfo-format commands, Pointer Validation, Create an Info File
12911 @section Running @code{makeinfo} inside Emacs
12912 @cindex Running @code{makeinfo} in Emacs
12913 @cindex @code{makeinfo} inside Emacs
12914 @cindex Shell, running @code{makeinfo} in
12916 You can run @code{makeinfo} in GNU Emacs Texinfo mode by using either the
12917 @code{makeinfo-region} or the @code{makeinfo-buffer} commands.  In
12918 Texinfo mode, the commands are bound to @kbd{C-c C-m C-r} and @kbd{C-c
12919 C-m C-b} by default.@refill
12921 @table @kbd
12922 @item C-c C-m C-r
12923 @itemx M-x makeinfo-region
12924 Format the current region for Info.@refill
12925 @findex makeinfo-region
12927 @item C-c C-m C-b
12928 @itemx M-x makeinfo-buffer
12929 Format the current buffer for Info.@refill
12930 @findex makeinfo-buffer
12931 @end table
12933 When you invoke either @code{makeinfo-region} or
12934 @code{makeinfo-buffer}, Emacs prompts for a file name, offering the
12935 name of the visited file as the default.  You can edit the default
12936 file name in the minibuffer if you wish, before pressing @key{RET} to
12937 start the @code{makeinfo} process.@refill
12939 The Emacs @code{makeinfo-region} and @code{makeinfo-buffer} commands
12940 run the @code{makeinfo} program in a temporary shell buffer.  If
12941 @code{makeinfo} finds any errors, Emacs displays the error messages in
12942 the temporary buffer.@refill
12944 @cindex Errors, parsing
12945 @cindex Parsing errors
12946 @findex next-error
12947 You can parse the error messages by typing @kbd{C-x `}
12948 (@code{next-error}).  This causes Emacs to go to and position the
12949 cursor on the line in the Texinfo source that @code{makeinfo} thinks
12950 caused the error.  @xref{Compilation, , Running @code{make} or
12951 Compilers Generally, emacs, The GNU Emacs Manual}, for more
12952 information about using the @code{next-error} command.@refill
12954 In addition, you can kill the shell in which the @code{makeinfo}
12955 command is running or make the shell buffer display its most recent
12956 output.@refill
12958 @table @kbd
12959 @item C-c C-m C-k
12960 @itemx M-x makeinfo-kill-job
12961 @findex makeinfo-kill-job
12962 Kill the current running @code{makeinfo} job created by
12963 @code{makeinfo-region} or @code{makeinfo-buffer}.@refill
12965 @item C-c C-m C-l
12966 @itemx M-x makeinfo-recenter-output-buffer
12967 @findex makeinfo-recenter-output-buffer
12968 Redisplay the @code{makeinfo} shell buffer to display its most recent
12969 output.@refill
12970 @end table
12972 @noindent
12973 (Note that the parallel commands for killing and recentering a @TeX{}
12974 job are @kbd{C-c C-t C-k} and @kbd{C-c C-t C-l}.  @xref{Texinfo Mode
12975 Printing}.)@refill
12977 You can specify options for @code{makeinfo} by setting the
12978 @code{makeinfo-options} variable with either the @kbd{M-x
12979 edit-options} or the @kbd{M-x set-variable} command, or by setting the
12980 variable in your @file{.emacs} initialization file.@refill
12982 For example, you could write the following in your @file{.emacs} file:@refill
12984 @example
12985 @group
12986 (setq makeinfo-options
12987       "--paragraph-indent=0 --no-split
12988        --fill-column=70 --verbose")
12989 @end group
12990 @end example
12992 @c If you write these three cross references using xref, you see
12993 @c three references to the same named manual, which looks strange.
12994 @iftex
12995 For more information, see @ref{makeinfo options, , Options for
12996 @code{makeinfo}}, as well as ``Editing Variable Values,''``Examining and
12997 Setting Variables,'' and ``Init File'' in the @cite{The GNU Emacs
12998 Manual}.
12999 @end iftex
13000 @noindent
13001 @ifinfo
13002 For more information, see@*
13003 @ref{Edit Options, , Editing Variable Values, emacs, The GNU Emacs Manual},@*
13004 @ref{Examining, , Examining and Setting Variables, emacs, The GNU Emacs Manual},@*
13005 @ref{Init File, , , emacs, The GNU Emacs Manual}, and@*
13006 @ref{makeinfo options, , Options for @code{makeinfo}}.
13007 @end ifinfo
13009 @node texinfo-format commands, Batch Formatting, makeinfo in Emacs, Create an Info File
13010 @comment  node-name,  next,  previous,  up
13011 @section The @code{texinfo-format@dots{}} Commands
13012 @findex texinfo-format-region
13013 @findex texinfo-format-buffer
13015 In GNU Emacs in Texinfo mode, you can format part or all of a Texinfo
13016 file with the @code{texinfo-format-region} command.  This formats the
13017 current region and displays the formatted text in a temporary buffer
13018 called @samp{*Info Region*}.@refill
13020 Similarly, you can format a buffer with the
13021 @code{texinfo-format-buffer} command.  This command creates a new
13022 buffer and generates the Info file in it.  Typing @kbd{C-x C-s} will
13023 save the Info file under the name specified by the
13024 @code{@@setfilename} line which must be near the beginning of the
13025 Texinfo file.@refill
13027 @table @kbd
13028 @item C-c C-e C-r
13029 @itemx @code{texinfo-format-region}
13030 Format the current region for Info.
13031 @findex texinfo-format-region
13033 @item C-c C-e C-b
13034 @itemx @code{texinfo-format-buffer}
13035 Format the current buffer for Info.
13036 @findex texinfo-format-buffer
13037 @end table
13039 The @code{texinfo-format-region} and @code{texinfo-format-buffer}
13040 commands provide you with some error checking, and other functions can
13041 provide you with further help in finding formatting errors.  These
13042 procedures are described in an appendix; see @ref{Catching Mistakes}.
13043 However, the @code{makeinfo} program is often faster and
13044 provides better error checking (@pxref{makeinfo in Emacs}).@refill
13046 @node Batch Formatting, Tag and Split Files, texinfo-format commands, Create an Info File
13047 @comment  node-name,  next,  previous,  up
13048 @section Batch Formatting
13049 @cindex Batch formatting for Info
13050 @cindex Info batch formatting
13052 You can format Texinfo files for Info using @code{batch-texinfo-format}
13053 and Emacs Batch mode.  You can run Emacs in Batch mode from any shell,
13054 including a shell inside of Emacs.  (@xref{Command Switches, , Command
13055 Line Switches and Arguments, emacs, The GNU Emacs Manual}.)@refill
13057 Here is a shell command to format all the files that end in
13058 @file{.texinfo} in the current directory:
13060 @example
13061 emacs -batch -funcall batch-texinfo-format *.texinfo
13062 @end example
13064 @noindent
13065 Emacs processes all the files listed on the command line, even if an
13066 error occurs while attempting to format some of them.@refill
13068 Run @code{batch-texinfo-format} only with Emacs in Batch mode as shown;
13069 it is not interactive.  It kills the Batch mode Emacs on completion.@refill
13071 @code{batch-texinfo-format} is convenient if you lack @code{makeinfo}
13072 and want to format several Texinfo files at once.  When you use Batch
13073 mode, you create a new Emacs process.  This frees your current Emacs, so
13074 you can continue working in it.  (When you run
13075 @code{texinfo-format-region} or @code{texinfo-format-buffer}, you cannot
13076 use that Emacs for anything else until the command finishes.)@refill
13078 @node Tag and Split Files,  , Batch Formatting, Create an Info File
13079 @comment  node-name,  next,  previous,  up
13080 @section Tag Files and Split Files
13081 @cindex Making a tag table automatically
13082 @cindex Tag table, making automatically
13084 If a Texinfo file has more than 30,000 bytes,
13085 @code{texinfo-format-buffer} automatically creates a tag table
13086 for its Info file;  @code{makeinfo} always creates a tag table.  With
13087 a @dfn{tag table}, Info can jump to new nodes more quickly than it can
13088 otherwise.@refill
13090 @cindex Indirect subfiles
13091 In addition, if the Texinfo file contains more than about 70,000
13092 bytes, @code{texinfo-format-buffer} and @code{makeinfo} split the
13093 large Info file into shorter @dfn{indirect} subfiles of about 50,000
13094 bytes each.  Big files are split into smaller files so that Emacs does
13095 not need to make a large buffer to hold the whole of a large Info
13096 file; instead, Emacs allocates just enough memory for the small, split
13097 off file that is needed at the time.  This way, Emacs avoids wasting
13098 memory when you run Info.  (Before splitting was implemented, Info
13099 files were always kept short and @dfn{include files} were designed as
13100 a way to create a single, large printed manual out of the smaller Info
13101 files.  @xref{Include Files}, for more information.  Include files are
13102 still used for very large documents, such as @cite{The Emacs Lisp
13103 Reference Manual}, in which each chapter is a separate file.)@refill
13105 When a file is split, Info itself makes use of a shortened version of
13106 the original file that contains just the tag table and references to
13107 the files that were split off.  The split off files are called
13108 @dfn{indirect} files.@refill
13110 The split off files have names that are created by appending @w{@samp{-1}},
13111 @w{@samp{-2}}, @w{@samp{-3}} and so on to the file name specified by the
13112 @code{@@setfilename} command.  The shortened version of the original file
13113 continues to have the name specified by @code{@@setfilename}.@refill
13115 At one stage in writing this document, for example, the Info file was saved
13116 as @file{test-texinfo} and that file looked like this:@refill
13118 @example
13119 @group
13120 Info file: test-texinfo,    -*-Text-*-
13121 produced by texinfo-format-buffer
13122 from file: new-texinfo-manual.texinfo
13125 Indirect:
13126 test-texinfo-1: 102
13127 test-texinfo-2: 50422
13128 @end group
13129 @group
13130 test-texinfo-3: 101300
13131 ^_^L
13132 Tag table:
13133 (Indirect)
13134 Node: overview^?104
13135 Node: info file^?1271
13136 @end group
13137 @group
13138 Node: printed manual^?4853
13139 Node: conventions^?6855
13140 @dots{}
13141 @end group
13142 @end example
13144 @noindent
13145 (But @file{test-texinfo} had far more nodes than are shown here.)  Each of
13146 the split off, indirect files, @file{test-texinfo-1},
13147 @file{test-texinfo-2}, and @file{test-texinfo-3}, is listed in this file
13148 after the line that says @samp{Indirect:}.  The tag table is listed after
13149 the line that says @samp{Tag table:}. @refill
13151 In the list of indirect files, the number following the file name
13152 records the cumulative number of bytes in the preceding indirect files,
13153 not counting the file list itself, the tag table, or the permissions
13154 text in each file.  In the tag table, the number following the node name
13155 records the location of the beginning of the node, in bytes from the
13156 beginning.@refill
13158 If you are using @code{texinfo-format-buffer} to create Info files,
13159 you may want to run the @code{Info-validate} command.  (The
13160 @code{makeinfo} command does such a good job on its own, you do not
13161 need @code{Info-validate}.)  However, you cannot run the @kbd{M-x
13162 Info-validate} node-checking command on indirect files.  For
13163 information on how to prevent files from being split and how to
13164 validate the structure of the nodes, see @ref{Using
13165 Info-validate}.@refill
13168 @node Install an Info File, Command List, Create an Info File, Top
13169 @comment  node-name,  next,  previous,  up
13170 @chapter Installing an Info File
13171 @cindex Installing an Info file
13172 @cindex Info file installation
13173 @cindex @file{dir} directory for Info installation
13175 Info files are usually kept in the @file{info} directory.  You can read
13176 Info files using the standalone Info program or the Info reader built
13177 into Emacs.  (@inforef{Top, info, info}, for an introduction to Info.)
13179 @menu
13180 * Directory file::              The top level menu for all Info files.
13181 * New Info File::               Listing a new info file.
13182 * Other Info Directories::      How to specify Info files that are
13183                                   located in other directories.
13184 * Installing Dir Entries::      How to specify what menu entry to add
13185                                   to the Info directory.
13186 * Invoking install-info::       @code{install-info} options.
13187 @end menu
13189 @node Directory file, New Info File, Install an Info File, Install an Info File
13190 @ifinfo
13191 @heading The @file{dir} File
13192 @end ifinfo
13194 For Info to work, the @file{info} directory must contain a file that
13195 serves as a top level directory for the Info system.  By convention,
13196 this file is called @file{dir}.  (You can find the location of this file
13197 within Emacs by typing @kbd{C-h i} to enter Info and then typing
13198 @kbd{C-x C-f} to see the pathname to the @file{info} directory.)
13200 The @file{dir} file is itself an Info file.  It contains the top level
13201 menu for all the Info files in the system.  The menu looks like
13202 this:@refill
13204 @example
13205 @group
13206 * Menu:
13208 * Info:    (info).     Documentation browsing system.
13209 * Emacs:   (emacs).    The extensible, self-documenting
13210                        text editor.
13211 * Texinfo: (texinfo).  With one source file, make
13212                        either a printed manual using
13213                        TeX or an Info file.
13214 @dots{}
13215 @end group
13216 @end example
13218 Each of these menu entries points to the `Top' node of the Info file
13219 that is named in parentheses.  (The menu entry does not need to
13220 specify the `Top' node, since Info goes to the `Top' node if no node
13221 name is mentioned.  @xref{Other Info Files, , Nodes in Other Info
13222 Files}.)@refill
13224 Thus, the @samp{Info} entry points to the `Top' node of the
13225 @file{info} file and the @samp{Emacs} entry points to the `Top' node
13226 of the @file{emacs} file.@refill
13228 In each of the Info files, the `Up' pointer of the `Top' node refers
13229 back to the @code{dir} file.  For example, the line for the `Top'
13230 node of the Emacs manual looks like this in Info:@refill
13232 @example
13233 File: emacs  Node: Top, Up: (DIR), Next: Distrib
13234 @end example
13236 @noindent
13237 (Note that in this case, the @file{dir} file name is written in upper
13238 case letters---it can be written in either upper or lower case.  Info
13239 has a feature that it will change the case of the file name to lower
13240 case if it cannot find the name as written.)@refill
13241 @c !!! Can any file name be written in upper or lower case,
13242 @c     or is dir a special case?
13243 @c     Yes, apparently so, at least with Gillespie's Info.  --rjc 24mar92
13246 @node New Info File, Other Info Directories, Directory file, Install an Info File
13247 @section Listing a New Info File
13248 @cindex Adding a new info file
13249 @cindex Listing a new info file
13250 @cindex New info file, listing it in @file{dir} file
13251 @cindex Info file, listing new one
13252 @cindex @file{dir} file listing
13254 To add a new Info file to your system, you must write a menu entry to
13255 add to the menu in the @file{dir} file in the @file{info} directory.
13256 For example, if you were adding documentation for GDB, you would write
13257 the following new entry:@refill
13259 @example
13260 * GDB: (gdb).           The source-level C debugger.
13261 @end example
13263 @noindent
13264 The first part of the menu entry is the menu entry name, followed by a
13265 colon.  The second part is the name of the Info file, in parentheses,
13266 followed by a period.  The third part is the description.
13268 The name of an Info file often has a @file{.info} extension.  Thus, the
13269 Info file for GDB might be called either @file{gdb} or @file{gdb.info}.
13270 The Info reader programs automatically try the file name both with and
13271 without @file{.info}; so it is better to avoid clutter and not to write
13272 @samp{.info} explicitly in the menu entry.  For example, the GDB menu
13273 entry should use just @samp{gdb} for the file name, not @samp{gdb.info}.
13276 @node Other Info Directories, Installing Dir Entries, New Info File, Install an Info File
13277 @comment  node-name,  next,  previous,  up
13278 @section Info Files in Other Directories
13279 @cindex Installing Info in another directory
13280 @cindex Info installed in another directory
13281 @cindex Another Info directory
13283 If an Info file is not in the @file{info} directory, there are three
13284 ways to specify its location:@refill
13286 @itemize @bullet
13287 @item
13288 Write the pathname in the @file{dir} file as the second part of the
13289 menu.@refill
13291 @item
13292 If you are using Emacs, list the name of the file in a second @file{dir}
13293 file, in its directory; and then add the name of that directory to the
13294 @code{Info-directory-list} variable in your personal or site
13295 initialization file.
13297 This tells Emacs where to look for @file{dir} files.  Emacs merges the
13298 files named @file{dir} from each of the listed directories.  (In Emacs
13299 version 18, you can set the @code{Info-directory} variable to the name
13300 of only one directory.)@refill
13302 @item
13303 Specify the Info directory name in the @code{INFOPATH} environment
13304 variable in your @file{.profile} or @file{.cshrc} initialization file.
13305 (Only you and others who set this environment variable will be able to
13306 find Info files whose location is specified this way.)@refill
13307 @end itemize
13309 For example, to reach a test file in the @file{/home/bob/manuals}
13310 directory, you could add an entry like this to the menu in the
13311 @file{dir} file:@refill
13313 @example
13314 * Test: (/home/bob/manuals/info-test).  Bob's own test file.
13315 @end example
13317 @noindent
13318 In this case, the absolute file name of the @file{info-test} file is
13319 written as the second part of the menu entry.@refill
13321 @vindex Info-directory-list
13322 Alternatively, you could write the following in your @file{.emacs}
13323 file:@refill
13325 @example
13326 @group
13327 (setq Info-directory-list
13328       '("/home/bob/manuals"
13329         "/usr/local/info"))
13330 @end group
13331 @end example
13333 @c reworded to avoid overfill hbox
13334 This tells Emacs to merge the @file{dir} file from the
13335 @file{/home/bob/manuals} directory with the @file{dir} file from the
13336 @file{/usr/local/info} directory.  Info will list the
13337 @file{/home/bob/manuals/info-test} file as a menu entry in the
13338 @file{/home/bob/manuals/dir} file.@refill
13340 @vindex INFOPATH
13341 Finally, you can tell Info where to look by setting the @code{INFOPATH}
13342 environment variable in your @file{.cshrc} or @file{.profile} file.  If
13343 you use a Bourne-compatible shell such as @code{sh} or @code{bash} for
13344 your shell command interpreter, you set the @code{INFOPATH} environment
13345 variable in the @file{.profile} initialization file; but if you use
13346 @code{csh} or @code{tcsh}, you must set the variable in the
13347 @file{.cshrc} initialization file.  The two types of shells use
13348 different syntax.
13350 @itemize @bullet
13351 @item
13352 In a @file{.cshrc} file, you could set the @code{INFOPATH}
13353 variable as follows:@refill
13355 @smallexample
13356 setenv INFOPATH .:~/manuals:/usr/local/emacs/info
13357 @end smallexample
13359 @item
13360 In a @file{.profile} file, you would achieve the same effect by
13361 writing:@refill
13363 @smallexample
13364 INFOPATH=.:$HOME/manuals:/usr/local/emacs/info
13365 export INFOPATH
13366 @end smallexample
13367 @end itemize
13369 @noindent
13370 The @samp{.} indicates the current directory as usual.  Emacs uses the
13371 @code{INFOPATH} environment variable to initialize the value of Emacs's
13372 own @code{Info-directory-list} variable.
13374 @cindex @samp{:} @r{last in @code{INFOPATH}}
13375 However you set @code{INFOPATH}, if its last character is a colon, this
13376 is replaced by the default (compiled-in) path.  This gives you a way to
13377 augment the default path with new directories without having to list all
13378 the standard places.  For example (using @code{sh} syntax:
13380 @example
13381 INFOPATH=/local/info:
13382 export INFOPATH
13383 @end example
13385 @noindent
13386 will search @file{/local/info} first, then the standard directories.
13387 Leading or doubled colons are not treated specially.
13390 @node Installing Dir Entries, Invoking install-info, Other Info Directories, Install an Info File
13391 @section Installing Info Directory Files
13393 When you install an Info file onto your system, you can use the program
13394 @code{install-info} to update the Info directory file @file{dir}.
13395 Normally the makefile for the package runs @code{install-info}, just
13396 after copying the Info file into its proper installed location.
13398 @findex dircategory
13399 @findex direntry
13400 In order for the Info file to work with @code{install-info}, you should
13401 use the commands @code{@@dircategory} and @code{@@direntry} in the
13402 Texinfo source file.  Use @code{@@direntry} to specify the menu entry to
13403 add to the Info directory file, and use @code{@@dircategory} to specify
13404 which part of the Info directory to put it in.  Here is how these
13405 commands are used in this manual:
13407 @smallexample
13408 @@dircategory Texinfo documentation system
13409 @@direntry
13410 * Texinfo: (texinfo).           The GNU documentation format.
13411 * install-info: (texinfo)Invoking install-info. @dots{}
13412 @dots{}
13413 @@end direntry
13414 @end smallexample
13416 Here's what this produces in the Info file:
13418 @smallexample
13419 INFO-DIR-SECTION Texinfo documentation system
13420 START-INFO-DIR-ENTRY
13421 * Texinfo: (texinfo).           The GNU documentation format.
13422 * install-info: (texinfo)Invoking install-info. @dots{}
13423 @dots{}
13424 END-INFO-DIR-ENTRY
13425 @end smallexample
13427 @noindent
13428 The @code{install-info} program sees these lines in the Info file, and
13429 that is how it knows what to do.
13431 Always use the @code{@@direntry} and @code{@@dircategory} commands near
13432 the beginning of the Texinfo input, before the first @code{@@node}
13433 command.  If you use them later on in the input, @code{install-info}
13434 will not notice them.
13436 If you use @code{@@dircategory} more than once in the Texinfo source,
13437 each usage specifies one category; the new menu entry is added to the
13438 Info directory file in each of the categories you specify.  If you use
13439 @code{@@direntry} more than once, each usage specifies one menu entry;
13440 each of these menu entries is added to the directory in each of the
13441 specified categories.
13444 @node Invoking install-info,  , Installing Dir Entries, Install an Info File
13445 @section Invoking install-info
13447 @pindex install-info
13449 @code{install-info} inserts menu entries from an Info file into the
13450 top-level @file{dir} file in the Info system (see the previous sections
13451 for an explanation of how the @file{dir} file works).  It's most often
13452 run as part of software installation, or when constructing a dir file
13453 for all manuals on a system.  Synopsis:
13455 @example
13456 install-info [@var{option}]@dots{} [@var{info-file} [@var{dir-file}]]
13457 @end example
13459 If @var{info-file} or @var{dir-file} are not specified, the various
13460 options (described below) that define them must be.  There are no
13461 compile-time defaults, and standard input is never used.
13462 @code{install-info} can read only one info file and write only one dir
13463 file per invocation.
13465 @cindex @file{dir}, created by @code{install-info}
13466 If @var{dir-file} (however specified) does not exist,
13467 @code{install-info} creates it if possible (with no entries).
13469 Options:
13471 @table @code
13472 @item --delete
13473 @opindex --delete
13474 Delete the entries in @var{info-file} from @var{dir-file}.  The file
13475 name in the entry in @var{dir-file} must be @var{info-file} (except for
13476 an optional @samp{.info} in either one).  Don't insert any new entries.
13478 @item --dir-file=@var{name}
13479 @opindex --dir-file=@var{name}
13480 Specify file name of the Info directory file.  This is equivalent to
13481 using the @var{dir-file} argument.
13483 @item --entry=@var{text}
13484 @opindex --entry=@var{text}
13485 Insert @var{text} as an Info directory entry; @var{text} should have the
13486 form of an Info menu item line plus zero or more extra lines starting
13487 with whitespace.  If you specify more than one entry, they are all
13488 added.  If you don't specify any entries, they are determined from
13489 information in the Info file itself.
13491 @item --help
13492 @opindex --help
13493 Display a usage message listing basic usage and all available options,
13494 then exit successfully.
13496 @item --info-file=@var{file}
13497 @opindex --info-file=@var{file}
13498 Specify Info file to install in the directory.
13499 This is equivalent to using the @var{info-file} argument.
13501 @item --info-dir=@var{dir}
13502 @opindex --info-dir=@var{dir}
13503 Equivalent to @samp{--dir-file=@var{dir}/dir}.
13505 @item --item=@var{text}
13506 @opindex --item=@var{text}
13507 Same as @samp{--entry=@var{text}}.  An Info directory entry is actually
13508 a menu item.
13510 @item --quiet
13511 @opindex --quiet
13512 Suppress warnings.
13514 @item --remove
13515 @opindex --remove
13516 Same as @samp{--delete}.
13518 @item --section=@var{sec}
13519 @opindex --section=@var{sec}
13520 Put this file's entries in section @var{sec} of the directory.  If you
13521 specify more than one section, all the entries are added in each of the
13522 sections.  If you don't specify any sections, they are determined from
13523 information in the Info file itself.
13525 @item --version
13526 @opindex --version
13527 @cindex version number, finding
13528 Display version information and exit successfully.
13530 @end table
13533 @node Command List, Tips, Install an Info File, Top
13534 @appendix @@-Command List
13535 @cindex Alphabetical @@-command list
13536 @cindex List of  @@-commands
13537 @cindex @@-command list
13539 Here is an alphabetical list of the @@-commands in Texinfo.  Square
13540 brackets, @t{[}@w{ }@t{]}, indicate optional arguments; an ellipsis,
13541 @samp{@dots{}}, indicates repeated text.@refill
13543 @sp 1
13544 @table @code
13545 @item @@@var{whitespace}
13546 An @code{@@} followed by a space, tab, or newline produces a normal,
13547 stretchable, interword space.  @xref{Multiple Spaces}.
13549 @item @@!
13550 Generate an exclamation point that really does end a sentence (usually
13551 after an end-of-sentence capital letter).  @xref{Ending a Sentence}.
13553 @item @@"
13554 @itemx @@'
13555 Generate an umlaut or acute accent, respectively, over the next
13556 character, as in @"o and @'o.  @xref{Inserting Accents}.
13558 @item @@*
13559 Force a line break. Do not end a paragraph that uses @code{@@*} with
13560 an @code{@@refill} command.  @xref{Line Breaks}.@refill
13562 @item @@,@{@var{c}@}
13563 Generate a cedilla accent under @var{c}, as in @,{c}.  @xref{Inserting
13564 Accents}.
13566 @item @@-
13567 Insert a discretionary hyphenation point.  @xref{- and hyphenation}.
13569 @item @@.
13570 Produce a period that really does end a sentence (usually after an
13571 end-of-sentence capital letter).  @xref{Ending a Sentence}.
13573 @item @@:
13574 Indicate to @TeX{} that an immediately preceding period, question
13575 mark, exclamation mark, or colon does not end a sentence.  Prevent
13576 @TeX{} from inserting extra whitespace as it does at the end of a
13577 sentence.  The command has no effect on the Info file output.
13578 @xref{Not Ending a Sentence}.@refill
13580 @item @@=
13581 Generate a macro (bar) accent over the next character, as in @=o.
13582 @xref{Inserting Accents}.
13584 @item @@?
13585 Generate a question mark that really does end a sentence (usually after
13586 an end-of-sentence capital letter).  @xref{Ending a Sentence}.
13588 @item @@@@
13589 Stands for an at sign, @samp{@@}.
13590 @xref{Braces Atsigns, , Inserting @@ and braces}.
13592 @item @@^
13593 @itemx @@`
13594 Generate a circumflex (hat) or grave accent, respectively, over the next
13595 character, as in @^o.
13596 @xref{Inserting Accents}.
13598 @item @@@{
13599 Stands for a left brace, @samp{@{}.
13600 @xref{Braces Atsigns, , Inserting @@ and braces}.
13602 @item @@@}
13603 Stands for a right-hand brace, @samp{@}}.@*
13604 @xref{Braces Atsigns, , Inserting @@ and braces}.
13606 @item @@=
13607 Generate a tilde accent over the next character, as in @~N.
13608 @xref{Inserting Accents}.
13610 @item @@AA@{@}
13611 @itemx @@aa@{@}
13612 Generate the uppercase and lowercase Scandinavian A-ring letters,
13613 respectively: @AA{}, @aa{}.  @xref{Inserting Accents}.
13615 @item @@AE@{@}
13616 @itemx @@ae@{@}
13617 Generate the uppercase and lowercase AE ligatures, respectively:
13618 @AE{}, @ae{}.  @xref{Inserting Accents}.
13620 @item @@afourpaper
13621 Change page dimensions for the A4 paper size.  
13622 Only allowed inside @code{@@iftex} @dots{} @code{@@end iftex}.  
13623 @xref{A4 Paper}.
13625 @item @@appendix @var{title}
13626 Begin an appendix.  The title appears in the table
13627 of contents of a printed manual.  In Info, the title is
13628 underlined with asterisks.  @xref{unnumbered & appendix, , The
13629 @code{@@unnumbered} and @code{@@appendix} Commands}.@refill
13631 @item @@appendixsec @var{title}
13632 @itemx @@appendixsection @var{title}
13633 Begin an appendix section within an appendix.  The section title appears
13634 in the table of contents of a printed manual.  In Info, the title is
13635 underlined with equal signs.  @code{@@appendixsection} is a longer
13636 spelling of the @code{@@appendixsec} command.  @xref{unnumberedsec
13637 appendixsec heading, , Section Commands}.@refill
13639 @item @@appendixsubsec @var{title}
13640 Begin an appendix subsection within an appendix.  The title appears
13641 in the table of contents of a printed manual.  In Info, the title is
13642 underlined with hyphens.  @xref{unnumberedsubsec appendixsubsec
13643 subheading, , Subsection Commands}.@refill
13645 @item @@appendixsubsubsec @var{title}
13646 Begin an appendix subsubsection within an appendix subsection.  The
13647 title appears in the table of contents of a printed manual.  In Info,
13648 the title is underlined with periods.  @xref{subsubsection,, The
13649 `subsub' Commands}.@refill
13651 @item @@asis
13652 Used following @code{@@table}, @code{@@ftable}, and @code{@@vtable} to
13653 print the table's first column without highlighting (``as is'').
13654 @xref{Two-column Tables, , Making a Two-column Table}.@refill
13656 @item @@author @var{author}
13657 Typeset @var{author} flushleft and underline it.  @xref{title
13658 subtitle author, , The @code{@@title} and @code{@@author}
13659 Commands}.@refill
13661 @item @@b@{@var{text}@}
13662 Print @var{text} in @b{bold} font.  No effect in Info.  @xref{Fonts}.@refill
13664 @ignore
13665 @item @@br
13666 Force a paragraph break.  If used within a line, follow @code{@@br}
13667 with braces.  @xref{br, , @code{@@br}}.@refill
13668 @end ignore
13670 @item @@bullet@{@}
13671 Generate a large round dot, or the closest possible
13672 thing to one.  @xref{bullet, , @code{@@bullet}}.@refill
13674 @item @@bye
13675 Stop formatting a file.  The formatters do not see the contents of a
13676 file following an @code{@@bye} command.  @xref{Ending a File}.@refill
13678 @item @@c @var{comment}
13679 Begin a comment in Texinfo.  The rest of the line does not appear in
13680 either the Info file or the printed manual.  A synonym for
13681 @code{@@comment}.  @xref{Comments, , Comments}.@refill
13683 @item @@cartouche
13684 Highlight an example or quotation by drawing a box with rounded
13685 corners around it.  Pair with @code{@@end cartouche}.  No effect in
13686 Info.  @xref{cartouche, , Drawing Cartouches Around Examples}.)@refill
13688 @item @@center @var{line-of-text}
13689 Center the line of text following the command.
13690 @xref{titlefont center sp, , @code{@@center}}.@refill
13692 @item @@centerchap @var{line-of-text}
13693 Like @code{@@chapter}, but centers the chapter title.  @xref{chapter,,
13694 @code{@@chapter}}.
13696 @item @@chapheading @var{title}
13697 Print a chapter-like heading in the text, but not in the table of
13698 contents of a printed manual.  In Info, the title is underlined with
13699 asterisks.  @xref{majorheading & chapheading, , @code{@@majorheading}
13700 and @code{@@chapheading}}.@refill
13702 @item @@chapter @var{title}
13703 Begin a chapter.  The chapter title appears in the table of
13704 contents of a printed manual.  In Info, the title is underlined with
13705 asterisks.  @xref{chapter, , @code{@@chapter}}.@refill
13707 @item @@cindex @var{entry}
13708 Add @var{entry} to the index of concepts.  @xref{Index Entries, ,
13709 Defining the Entries of an Index}.@refill
13711 @item @@cite@{@var{reference}@}
13712 Highlight the name of a book or other reference that lacks a
13713 companion Info file.  @xref{cite, , @code{@@cite}}.@refill
13715 @item @@clear @var{flag}
13716 Unset @var{flag}, preventing the Texinfo formatting commands from
13717 formatting text between subsequent pairs of @code{@@ifset @var{flag}}
13718 and @code{@@end ifset} commands, and preventing
13719 @code{@@value@{@var{flag}@}} from expanding to the value to which
13720 @var{flag} is set.
13721 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
13723 @item @@code@{@var{sample-code}@}
13724 Highlight text that is an expression, a syntactically complete token
13725 of a program, or a program name.  @xref{code, , @code{@@code}}.@refill
13727 @item @@comment @var{comment}
13728 Begin a comment in Texinfo.  The rest of the line does not appear in
13729 either the Info file or the printed manual.  A synonym for @code{@@c}.
13730 @xref{Comments, , Comments}.@refill
13732 @item @@contents
13733 Print a complete table of contents.  Has no effect in Info, which uses
13734 menus instead.  @xref{Contents, , Generating a Table of
13735 Contents}.@refill
13737 @item @@copyright@{@}
13738 Generate a copyright symbol.  @xref{copyright symbol, ,
13739 @code{@@copyright}}.@refill
13741 @ignore
13742 @item @@ctrl@{@var{ctrl-char}@}
13743 Describe an @sc{ascii} control character.  Insert actual control character
13744 into Info file.  @xref{ctrl, , @code{@@ctrl}}.@refill
13745 @end ignore
13747 @item @@defcodeindex @var{index-name}
13748 Define a new index and its indexing command.  Print entries in an
13749 @code{@@code} font.  @xref{New Indices, , Defining New
13750 Indices}.@refill
13752 @item @@defcv @var{category} @var{class} @var{name}
13753 @itemx @@defcvx @var{category} @var{class} @var{name}
13754 Format a description for a variable associated with a class in
13755 object-oriented programming.  Takes three arguments: the category of
13756 thing being defined, the class to which it belongs, and its name.
13757 @xref{Definition Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13759 @item @@deffn @var{category} @var{name} @var{arguments}@dots{}
13760 @itemx @@deffnx @var{category} @var{name} @var{arguments}@dots{}
13761 Format a description for a function, interactive command, or similar
13762 entity that may take arguments.  @code{@@deffn} takes as arguments the
13763 category of entity being described, the name of this particular
13764 entity, and its arguments, if any.  @xref{Definition Commands}.@refill
13766 @item @@defindex @var{index-name}
13767 Define a new index and its indexing command.  Print entries in a roman
13768 font.  @xref{New Indices, , Defining New Indices}.@refill
13770 @c Unused so far as I can see and unsupported by makeinfo -- karl, 15sep96.
13771 @item @@definfoenclose @var{new-command}, @var{before}, @var{after},
13772 Create new @@-command for Info that marks text by enclosing it in
13773 strings that precede and follow the text.  Write definition inside of
13774 @code{@@ifinfo} @dots{} @code{@@end ifinfo}. @xref{Customized
13775 Highlighting}.@refill
13777 @item @@defivar @var{class} @var{instance-variable-name}
13778 @itemx @@defivarx @var{class} @var{instance-variable-name}
13779 This command formats a description for an instance variable in
13780 object-oriented programming.  The command is equivalent to @samp{@@defcv
13781 @{Instance Variable@} @dots{}}.  @xref{Definition Commands}, and
13782 @ref{deffnx,, Def Cmds in Detail}.
13784 @item @@defmac @var{macro-name} @var{arguments}@dots{}
13785 @itemx @@defmacx @var{macro-name} @var{arguments}@dots{}
13786 Format a description for a macro.  The command is equivalent to
13787 @samp{@@deffn Macro @dots{}}.  @xref{Definition Commands}, and
13788 @ref{deffnx,, Def Cmds in Detail}.
13790 @item @@defmethod @var{class} @var{method-name} @var{arguments}@dots{}
13791 @itemx @@defmethodx @var{class} @var{method-name} @var{arguments}@dots{}
13792 Format a description for a method in object-oriented programming.  The
13793 command is equivalent to @samp{@@defop Method @dots{}}.  Takes as
13794 arguments the name of the class of the method, the name of the
13795 method, and its arguments, if any.  @xref{Definition Commands}, and
13796 @ref{deffnx,, Def Cmds in Detail}.
13798 @item @@defop @var{category} @var{class} @var{name} @var{arguments}@dots{}
13799 @itemx @@defopx @var{category} @var{class} @var{name} @var{arguments}@dots{}
13800 Format a description for an operation in object-oriented programming.
13801 @code{@@defop} takes as arguments the overall name of the category of
13802 operation, the name of the class of the operation, the name of the
13803 operation, and its arguments, if any.  @xref{Definition
13804 Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13806 @item @@defopt @var{option-name}
13807 @itemx @@defoptx @var{option-name}
13808 Format a description for a user option.  The command is equivalent to
13809 @samp{@@defvr @{User Option@} @dots{}}.  @xref{Definition Commands}, and
13810 @ref{deffnx,, Def Cmds in Detail}.
13812 @item @@defspec @var{special-form-name} @var{arguments}@dots{}
13813 @itemx @@defspecx @var{special-form-name} @var{arguments}@dots{}
13814 Format a description for a special form.  The command is equivalent to
13815 @samp{@@deffn @{Special Form@} @dots{}}.  @xref{Definition Commands},
13816 and @ref{deffnx,, Def Cmds in Detail}.
13818 @item @@deftp @var{category} @var{name-of-type} @var{attributes}@dots{}
13819 @itemx @@deftpx @var{category} @var{name-of-type} @var{attributes}@dots{}
13820 Format a description for a data type.  @code{@@deftp} takes as arguments
13821 the category, the name of the type (which is a word like @samp{int} or
13822 @samp{float}), and then the names of attributes of objects of that type.
13823 @xref{Definition Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13825 @item @@deftypefn @var{classification} @var{data-type} @var{name} @var{arguments}@dots{}
13826 @itemx @@deftypefnx @var{classification} @var{data-type} @var{name} @var{arguments}@dots{}
13827 Format a description for a function or similar entity that may take
13828 arguments and that is typed.  @code{@@deftypefn} takes as arguments the
13829 classification of entity being described, the type, the name of the
13830 entity, and its arguments, if any.  @xref{Definition Commands}, and
13831 @ref{deffnx,, Def Cmds in Detail}.
13833 @item @@deftypefun @var{data-type} @var{function-name} @var{arguments}@dots{}
13834 @itemx @@deftypefunx @var{data-type} @var{function-name} @var{arguments}@dots{}
13835 Format a description for a function in a typed language.
13836 The command is equivalent to @samp{@@deftypefn Function @dots{}}.
13837 @xref{Definition Commands},
13838 and @ref{deffnx,, Def Cmds in Detail}.
13840 @item @@deftypemethod @var{class} @var{data-type} @var{method-name} @var{arguments}@dots{}
13841 @itemx @@deftypemethodx @var{class} @var{data-type} @var{method-name} @var{arguments}@dots{}
13842 Format a description for a typed method in object-oriented programming.
13843 Takes as arguments the name of the class of the method, the return type
13844 of the method, the name of the method, and its arguments, if any.
13845 @xref{Definition Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13847 @item @@deftypevr @var{classification} @var{data-type} @var{name}
13848 @itemx @@deftypevrx @var{classification} @var{data-type} @var{name}
13849 Format a description for something like a variable in a typed
13850 language---an entity that records a value.  Takes as arguments the
13851 classification of entity being described, the type, and the name of the
13852 entity.  @xref{Definition Commands}, and @ref{deffnx,, Def Cmds in
13853 Detail}.
13855 @item @@deftypevar @var{data-type} @var{variable-name}
13856 @itemx @@deftypevarx @var{data-type} @var{variable-name}
13857 Format a description for a variable in a typed language.  The command is
13858 equivalent to @samp{@@deftypevr Variable @dots{}}.  @xref{Definition
13859 Commands}, and @ref{deffnx,, Def Cmds in Detail}.
13861 @item @@defun @var{function-name} @var{arguments}@dots{}
13862 @itemx @@defunx @var{function-name} @var{arguments}@dots{}
13863 Format a description for functions.  The command is equivalent to
13864 @samp{@@deffn Function @dots{}}.  @xref{Definition Commands}, and
13865 @ref{deffnx,, Def Cmds in Detail}.
13867 @item @@defvar @var{variable-name}
13868 @itemx @@defvarx @var{variable-name}
13869 Format a description for variables.  The command is equivalent to
13870 @samp{@@defvr Variable @dots{}}.  @xref{Definition Commands}, and
13871 @ref{deffnx,, Def Cmds in Detail}.
13873 @item @@defvr @var{category} @var{name}
13874 @itemx @@defvrx @var{category} @var{name}
13875 Format a description for any kind of variable.  @code{@@defvr} takes
13876 as arguments the category of the entity and the name of the entity.
13877 @xref{Definition Commands},
13878 and @ref{deffnx,, Def Cmds in Detail}.
13880 @item @@detailmenu@{@}
13881 Avoid @code{makeinfo} confusion stemming from the detailed node listing
13882 in a master menu.  @xref{Master Menu Parts}.
13884 @item @@dfn@{@var{term}@}
13885 Highlight the introductory or defining use of a term.
13886 @xref{dfn, , @code{@@dfn}}.@refill
13888 @item @@dircategory @var{dirpart}
13889 Specify a part of the Info directory menu where this file's entry should
13890 go.  @xref{Installing Dir Entries}.
13892 @item @@direntry
13893 Begin the Info directory menu entry for this file.
13894 @xref{Installing Dir Entries}.
13896 @need 100
13897 @item @@display
13898 Begin a kind of example.  Indent text, do not fill, do not select a
13899 new font.  Pair with @code{@@end display}.  @xref{display, ,
13900 @code{@@display}}.@refill
13902 @item @@dmn@{@var{dimension}@}
13903 Format a unit of measure, as in 12@dmn{pt}.  Causes @TeX{} to insert a
13904 thin space before @var{dimension}.  No effect in Info.
13905 @xref{dmn, , @code{@@dmn}}.@refill
13907 @item @@dotaccent@{@var{c}@}
13908 Generate a dot accent over the character @var{c}, as in @dotaccent{oo}.
13909 @xref{Inserting Accents}.
13911 @item @@dots@{@}
13912 Insert an ellipsis: @samp{@dots{}}.
13913 @xref{dots, , @code{@@dots}}.@refill
13915 @item @@email@{@var{address}[, @var{displayed-text}]@}
13916 Indicate an electronic mail address.
13917 @xref{email, , @code{@@email}}.@refill
13919 @need 100
13920 @item @@emph@{@var{text}@}
13921 Highlight @var{text}; text is displayed in @emph{italics} in printed
13922 output, and surrounded by asterisks in Info.  @xref{Emphasis, ,
13923 Emphasizing Text}.
13925 @item @@end @var{environment}
13926 Ends @var{environment}, as in @samp{@@end example}.  @xref{Formatting
13927 Commands,,@@-commands}.
13929 @item @@enddots@{@}
13930 Generate an end-of-sentence of ellipsis, like this @enddots{}
13931 @xref{dots,,@code{@@dots@{@}}}.
13933 @need 100
13934 @item @@enumerate [@var{number-or-letter}]
13935 Begin a numbered list, using @code{@@item} for each entry.
13936 Optionally, start list with @var{number-or-letter}.  Pair with
13937 @code{@@end enumerate}.  @xref{enumerate, ,
13938 @code{@@enumerate}}.@refill
13940 @need 100
13941 @item @@equiv@{@}
13942 Indicate to the reader the exact equivalence of two forms with a
13943 glyph: @samp{@equiv{}}.  @xref{Equivalence}.@refill
13945 @item @@error@{@}
13946 Indicate to the reader with a glyph that the following text is
13947 an error message: @samp{@error{}}.  @xref{Error Glyph}.@refill
13949 @item  @@evenfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
13950 @itemx @@evenheading [@var{left}] @@| [@var{center}] @@| [@var{right}]
13951 Specify page footings resp.@: headings for even-numbered (left-hand)
13952 pages.  Only allowed inside @code{@@iftex}.  @xref{Custom Headings, ,
13953 How to Make Your Own Headings}.@refill
13955 @item @@everyfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
13956 @itemx @@everyheading [@var{left}] @@| [@var{center}] @@| [@var{right}]
13957 Specify page footings resp.@: headings for every page.  Not relevant to
13958 Info.  @xref{Custom Headings, , How to Make Your Own Headings}.@refill
13960 @item @@example
13961 Begin an example.  Indent text, do not fill, and select fixed-width font.
13962 Pair with @code{@@end example}.  @xref{example, ,
13963 @code{@@example}}.@refill
13965 @item @@exclamdown@{@}
13966 Produce an upside-down exclamation point.  @xref{Inserting Accents}.
13968 @item @@exdent @var{line-of-text}
13969 Remove any indentation a line might have.  @xref{exdent, ,
13970 Undoing the Indentation of a Line}.@refill
13972 @item @@expansion@{@}
13973 Indicate the result of a macro expansion to the reader with a special
13974 glyph: @samp{@expansion{}}.
13975 @xref{expansion, , @expansion{} Indicating an Expansion}.@refill
13977 @item @@file@{@var{filename}@}
13978 Highlight the name of a file, buffer, node, or directory.  @xref{file, ,
13979 @code{@@file}}.@refill
13981 @item @@finalout
13982 Prevent @TeX{} from printing large black warning rectangles beside
13983 over-wide lines.  @xref{Overfull hboxes}.@refill
13985 @need 100
13986 @item @@findex @var{entry}
13987 Add @var{entry} to the index of functions.  @xref{Index Entries, ,
13988 Defining the Entries of an Index}.@refill
13990 @need 200
13991 @item @@flushleft
13992 @itemx @@flushright
13993 Left justify every line but leave the right end ragged.
13994 Leave font as is.  Pair with @code{@@end flushleft}.
13995 @code{@@flushright} analogous.
13996 @xref{flushleft & flushright, , @code{@@flushleft} and
13997 @code{@@flushright}}.@refill
13999 @need 200
14000 @item @@footnote@{@var{text-of-footnote}@}
14001 Enter a footnote.  Footnote text is printed at the bottom of the page
14002 by @TeX{}; Info may format in either `End' node or `Separate' node style.
14003 @xref{Footnotes}.@refill
14005 @item @@footnotestyle @var{style}
14006 Specify an Info file's footnote style, either @samp{end} for the end
14007 node style or @samp{separate} for the separate node style.
14008 @xref{Footnotes}.@refill
14010 @item @@format
14011 Begin a kind of example.  Like @code{@@example} or @code{@@display},
14012 but do not narrow the margins and do not select the fixed-width font.
14013 Pair with @code{@@end format}.  @xref{example, ,
14014 @code{@@example}}.@refill
14016 @item @@ftable @var{formatting-command}
14017 Begin a two-column table, using @code{@@item} for each entry.
14018 Automatically enter each of the items in the first column into the
14019 index of functions.  Pair with @code{@@end ftable}.  The same as
14020 @code{@@table}, except for indexing.  @xref{ftable vtable, ,
14021 @code{@@ftable} and @code{@@vtable}}.@refill
14023 @item @@group
14024 Hold text together that must appear on one printed page.  Pair with
14025 @code{@@end group}.  Not relevant to Info.  @xref{group, ,
14026 @code{@@group}}.@refill
14028 @item @@H@{@var{c}@}
14029 Generate the long Hungarian umlaut accent over @var{c}, as in @H{o}.
14031 @item @@heading @var{title}
14032 Print an unnumbered section-like heading in the text, but not in the
14033 table of contents of a printed manual.  In Info, the title is
14034 underlined with equal signs.  @xref{unnumberedsec appendixsec heading,
14035 , Section Commands}.@refill
14037 @item @@headings @var{on-off-single-double}
14038 Turn page headings on or off, and/or specify single-sided or double-sided
14039 page headings for printing.  @xref{headings on off, , The
14040 @code{@@headings} Command}.
14042 @item @@html
14043 Enter HTML completely.  Pair with @code{@@end html}.  @xref{Raw
14044 Formatter Commands}.
14046 @item @@hyphenation@{@var{hy-phen-a-ted words}@}
14047 Explicitly define hyphenation points.  @xref{- and hyphenation,,
14048 @code{@@-} and @code{@@hyphenation}}.
14050 @item @@i@{@var{text}@}
14051 Print @var{text} in @i{italic} font.  No effect in Info.
14052 @xref{Fonts}.@refill
14054 @item @@ifclear @var{flag}
14055 If @var{flag} is cleared, the Texinfo formatting commands format text
14056 between @code{@@ifclear @var{flag}} and the following @code{@@end
14057 ifclear} command.
14058 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
14060 @item @@ifhtml
14061 @itemx @@ifinfo
14062 Begin a stretch of text that will be ignored by @TeX{} when it typesets
14063 the printed manual.  The text appears only in the HTML resp.@: Info
14064 file.  Pair with @code{@@end ifhtml} resp.@: @code{@@end ifinfo}.
14065 @xref{Conditionals}.
14067 @item @@ifnothtml
14068 @itemx @@ifnotinfo
14069 @itemx @@ifnottex
14070 Begin a stretch of text that will be ignored in one output format but
14071 not the others.  The text appears only in the format not specified.
14072 Pair with @code{@@end ifnothtml} resp.@: @code{@@end ifnotinfo} resp.@:
14073 @code{@@end ifnotinfo}.  @xref{Conditionals}.
14075 @item @@ifset @var{flag}
14076 If @var{flag} is set, the Texinfo formatting commands format text
14077 between @code{@@ifset @var{flag}} and the following @code{@@end ifset}
14078 command.
14079 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
14081 @item @@iftex
14082 Begin a stretch of text that will not appear in the Info file, but
14083 will be processed only by @TeX{}.  Pair with @code{@@end iftex}.
14084 @xref{Conditionals, , Conditionally Visible Text}.@refill
14086 @item @@ignore
14087 Begin a stretch of text that will not appear in either the Info file
14088 or the printed output.  Pair with @code{@@end ignore}.
14089 @xref{Comments, , Comments and Ignored Text}.@refill
14091 @item @@image@{@var{filename}, [@var{width}], [@var{height}]@}
14092 Include graphics image in external @var{filename} scaled to the given
14093 @var{width} and/or @var{height}.  @xref{Images}.
14095 @item @@include @var{filename}
14096 Incorporate the contents of the file @var{filename} into the Info file
14097 or printed document.  @xref{Include Files}.@refill
14099 @item @@inforef@{@var{node-name}, [@var{entry-name}], @var{info-file-name}@}
14100 Make a cross reference to an Info file for which there is no printed
14101 manual.  @xref{inforef, , Cross references using
14102 @code{@@inforef}}.@refill
14104 @item \input @var{macro-definitions-file}
14105 Use the specified macro definitions file.  This command is used only
14106 in the first line of a Texinfo file to cause @TeX{} to make use of the
14107 @file{texinfo} macro definitions file.  The backslash in @code{\input}
14108 is used instead of an @code{@@} because @TeX{} does not
14109 recognize @code{@@} until after it has read the definitions file.
14110 @xref{Header, , The Texinfo File Header}.@refill
14112 @item @@item
14113 Indicate the beginning of a marked paragraph for @code{@@itemize} and
14114 @code{@@enumerate}; indicate the beginning of the text of a first column
14115 entry for @code{@@table}, @code{@@ftable}, and @code{@@vtable}.
14116 @xref{Lists and Tables}.@refill
14118 @item @@itemize  @var{mark-generating-character-or-command}
14119 Produce a sequence of indented paragraphs, with a mark inside the left
14120 margin at the beginning of each paragraph.  Pair with @code{@@end
14121 itemize}.  @xref{itemize, , @code{@@itemize}}.@refill
14123 @item @@itemx
14124 Like @code{@@item} but do not generate extra vertical space above the
14125 item text.  @xref{itemx, , @code{@@itemx}}.@refill
14127 @item @@kbd@{@var{keyboard-characters}@}
14128 Indicate text that is characters of input to be typed by
14129 users.  @xref{kbd, , @code{@@kbd}}.@refill
14131 @item @@kbdinputstyle @var{style}
14132 Specify when @code{@@kbd} should use a font distinct from @code{@@code}.
14133 @xref{kbd, , @code{@@kbd}}.@refill
14135 @item @@key@{@var{key-name}@}
14136 Indicate a name for a key on a keyboard.
14137 @xref{key, , @code{@@key}}.@refill
14139 @item @@kindex @var{entry}
14140 Add @var{entry} to the index of keys.
14141 @xref{Index Entries, , Defining the Entries of an Index}.@refill
14143 @item @@L@{@}
14144 @itemx @@l@{@}
14145 Generate the uppercase and lowercase Polish suppressed-L letters,
14146 respectively: @L{}, @l{}.
14148 @c Possibly this can be tossed now that we have macros.  --karl, 16sep96.
14149 @c Yes, let's toss it, it's pretty weird.  --karl, 15jun97.
14150 @c @item @@global@@let@var{new-command}=@var{existing-command}
14151 @c Equate a new highlighting command with an existing one.  Only for
14152 @c @TeX{}.  Write definition inside of @code{@@iftex} @dots{} @code{@@end
14153 @c iftex}.  @xref{Customized Highlighting}.@refill
14155 @item @@lisp
14156 Begin an example of Lisp code.  Indent text, do not fill, and select
14157 fixed-width font.  Pair with @code{@@end lisp}.  @xref{Lisp Example, ,
14158 @code{@@lisp}}.@refill
14160 @item @@lowersections
14161 Change subsequent chapters to sections, sections to subsections, and so
14162 on. @xref{Raise/lower sections, , @code{@@raisesections} and
14163 @code{@@lowersections}}.@refill
14165 @item @@macro @var{macro-name} @{@var{params}@}
14166 Define a new Texinfo command @code{@@@var{macro-name}@{@var{params}@}}.
14167 Only supported by @code{makeinfo} and @code{texi2dvi}.  @xref{Defining
14168 Macros}.
14170 @item @@majorheading @var{title}
14171 Print a chapter-like heading in the text, but not in the table of
14172 contents of a printed manual.  Generate more vertical whitespace before
14173 the heading than the @code{@@chapheading} command.  In Info, the chapter
14174 heading line is underlined with asterisks.  @xref{majorheading &
14175 chapheading, , @code{@@majorheading} and @code{@@chapheading}}.@refill
14177 @item @@math@{@var{mathematical-expression}@}
14178 Format a mathematical expression.
14179 @xref{math, , @code{@@math}: Inserting Mathematical Expressions}.
14181 @item @@menu
14182 Mark the beginning of a menu of nodes in Info.  No effect in a printed
14183 manual.  Pair with @code{@@end menu}.  @xref{Menus}.@refill
14185 @item @@minus@{@}
14186 Generate a minus sign, `@minus{}'.  @xref{minus, , @code{@@minus}}.@refill
14188 @item @@multitable @var{column-width-spec}
14189 Begin a multi-column table.  Pair with @code{@@end multitable}.
14190 @xref{Multitable Column Widths}.
14192 @item @@need @var{n}
14193 Start a new page in a printed manual if fewer than @var{n} mils
14194 (thousandths of an inch) remain on the current page.  @xref{need, ,
14195 @code{@@need}}.@refill
14197 @item @@node @var{name, next, previous, up}
14198 Define the beginning of a new node in Info, and serve as a locator for
14199 references for @TeX{}.  @xref{node, , @code{@@node}}.@refill
14201 @item @@noindent
14202 Prevent text from being indented as if it were a new paragraph.
14203 @xref{noindent, , @code{@@noindent}}.@refill
14205 @item @@O@{@}
14206 @itemx @@o@{@}
14207 Generate the uppercase and lowercase O-with-slash letters, respectively:
14208 @O{}, @o{}.
14210 @item  @@oddfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
14211 @itemx @@oddheading [@var{left}] @@| [@var{center}] @@| [@var{right}]
14212 Specify page footings resp.@: headings for odd-numbered (right-hand)
14213 pages.  Only allowed inside @code{@@iftex}.  @xref{Custom Headings, ,
14214 How to Make Your Own Headings}.@refill
14216 @item @@OE@{@}
14217 @itemx @@oe@{@}
14218 Generate the uppercase and lowercase OE ligatures, respectively:
14219 @OE{}, @oe{}.  @xref{Inserting Accents}.
14221 @item @@page
14222 Start a new page in a printed manual.  No effect in Info.
14223 @xref{page, , @code{@@page}}.@refill
14225 @item @@paragraphindent @var{indent}
14226 Indent paragraphs by @var{indent} number of spaces; delete indentation
14227 if the value of @var{indent} is 0; and do not change indentation if
14228 @var{indent} is @code{asis}. @xref{paragraphindent, , Paragraph
14229 Indenting}.@refill
14231 @item @@pindex @var{entry}
14232 Add @var{entry} to the index of programs.  @xref{Index Entries, , Defining
14233 the Entries of an Index}.@refill
14235 @item @@point@{@}
14236 Indicate the position of point in a buffer to the reader with a
14237 glyph: @samp{@point{}}.  @xref{Point Glyph, , Indicating
14238 Point in a Buffer}.@refill
14240 @item @@pounds@{@}
14241 Generate the pounds sterling currency sign.
14242 @xref{pounds,,@code{@@pounds@{@}}}.
14244 @item @@print@{@}
14245 Indicate printed output to the reader with a glyph:
14246 @samp{@print{}}.  @xref{Print Glyph}.@refill
14248 @item @@printindex @var{index-name}
14249 Print an alphabetized two-column index in a printed manual or generate
14250 an alphabetized menu of index entries for Info.  @xref{Printing
14251 Indices & Menus}.@refill
14253 @item @@pxref@{@var{node-name}, [@var{entry}], [@var{topic-or-title}], [@var{info-file}], [@var{manual}]@}
14254 Make a reference that starts with a lower case `see' in a printed
14255 manual.  Use within parentheses only.  Do not follow command with a
14256 punctuation mark---the Info formatting commands automatically insert
14257 terminating punctuation as needed.  Only the first argument is mandatory.
14258 @xref{pxref, , @code{@@pxref}}.@refill
14260 @item @@questiondown@{@}
14261 Generate an upside-down question mark.  @xref{Inserting Accents}.
14263 @item @@quotation
14264 Narrow the margins to indicate text that is quoted from another real
14265 or imaginary work.  Write command on a line of its own.  Pair with
14266 @code{@@end quotation}.  @xref{quotation, ,
14267 @code{@@quotation}}.@refill
14269 @need 100
14270 @item @@r@{@var{text}@}
14271 Print @var{text} in @r{roman} font.  No effect in Info.
14272 @xref{Fonts}.@refill
14274 @item @@raisesections
14275 Change subsequent sections to chapters, subsections to sections, and so
14276 on.  @xref{Raise/lower sections, , @code{@@raisesections} and
14277 @code{@@lowersections}}.@refill
14279 @need 300
14280 @item @@ref@{@var{node-name}, [@var{entry}], [@var{topic-or-title}], [@var{info-file}], [@var{manual}]@}
14281 Make a reference.  In a printed manual, the reference does not start
14282 with a `See'.  Follow command with a punctuation mark.  Only the first
14283 argument is mandatory.  @xref{ref, , @code{@@ref}}.@refill
14285 @need 300
14286 @item @@refill
14287 In Info, refill and indent the paragraph after all the other processing
14288 has been done.  No effect on @TeX{}, which always refills.  This command
14289 is no longer needed, since all formatters now automatically refill.
14290 @xref{Refilling Paragraphs}.@refill
14292 @need 300
14293 @item @@result@{@}
14294 Indicate the result of an expression to the reader with a special
14295 glyph: @samp{@result{}}.  @xref{result, , @code{@@result}}.@refill
14297 @item @@ringaccent@{@var{c}@}
14298 Generate a ring accent over the next character, as in @ringaccent{o}.
14299 @xref{Inserting Accents}.
14301 @item @@samp@{@var{text}@}
14302 Highlight @var{text} that is a literal example of a sequence of
14303 characters.  Used for single characters, for statements, and often for
14304 entire shell commands.  @xref{samp, , @code{@@samp}}.@refill
14306 @item @@sc@{@var{text}@}
14307 Set @var{text} in a printed output in @sc{the small caps font} and
14308 set text in the Info file in uppercase letters.
14309 @xref{Smallcaps}.@refill
14311 @item @@section @var{title}
14312 Begin a section within a chapter.  In a printed manual, the section
14313 title is numbered and appears in the table of contents.  In Info, the
14314 title is underlined with equal signs.  @xref{section, ,
14315 @code{@@section}}.@refill
14317 @item @@set @var{flag} [@var{string}]
14318 Make @var{flag} active, causing the Texinfo formatting commands to
14319 format text between subsequent pairs of @code{@@ifset @var{flag}} and
14320 @code{@@end ifset} commands.  Optionally, set value of @var{flag} to
14321 @var{string}.
14322 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
14324 @item @@setchapternewpage @var{on-off-odd}
14325 Specify whether chapters start on new pages, and if so, whether on
14326 odd-numbered (right-hand) new pages.  @xref{setchapternewpage, ,
14327 @code{@@setchapternewpage}}.@refill
14329 @item @@setfilename @var{info-file-name}
14330 Provide a name to be used by the Info file.  This command is essential
14331 for @TeX{} formatting as well, even though it produces no output.
14332 @xref{setfilename, , @code{@@setfilename}}.@refill
14334 @item @@settitle @var{title}
14335 Provide a title for page headers in a printed manual.
14336 @xref{settitle, , @code{@@settitle}}.@refill
14338 @item @@shortcontents
14339 Print a short table of contents.  Not relevant to Info, which uses
14340 menus rather than tables of contents.  A synonym for
14341 @code{@@summarycontents}.  @xref{Contents, , Generating a Table of
14342 Contents}.@refill
14344 @item @@shorttitlepage@{@var{title}@}
14345 Generate a minimal title page.  @xref{titlepage,,@code{@@titlepage}}.
14347 @need 400
14348 @item @@smallbook
14349 Cause @TeX{} to produce a printed manual in a 7 by 9.25 inch format
14350 rather than the regular 8.5 by 11 inch format.  @xref{smallbook, ,
14351 Printing Small Books}.  Also, see @ref{smallexample & smalllisp, ,
14352 @code{@@smallexample} and @code{@@smalllisp}}.@refill
14354 @need 400
14355 @item @@smallexample
14356 Indent text to indicate an example.  Do not fill, select fixed-width
14357 font.  In @code{@@smallbook} format, print text in a smaller font than
14358 with @code{@@example}.  Pair with @code{@@end smallexample}.
14359 @xref{smallexample & smalllisp, , @code{@@smallexample} and
14360 @code{@@smalllisp}}.@refill
14362 @need 400
14363 @item @@smalllisp
14364 Begin an example of Lisp code.  Indent text, do not fill, select
14365 fixed-width font.  In @code{@@smallbook} format, print text in a
14366 smaller font.  Pair with @code{@@end smalllisp}.  @xref{smallexample &
14367 smalllisp, , @code{@@smallexample} and @code{@@smalllisp}}.@refill
14369 @need 700
14370 @item @@sp @var{n}
14371 Skip @var{n} blank lines.  @xref{sp, , @code{@@sp}}.@refill
14373 @item @@ss@{@}
14374 Generate the German sharp-S es-zet letter, @ss{}.  @xref{Inserting Accents}.
14376 @need 700
14377 @item @@strong @var{text}
14378 Emphasize @var{text} by typesetting it in a @strong{bold} font for the
14379 printed manual and by surrounding it with asterisks for Info.
14380 @xref{emph & strong, , Emphasizing Text}.@refill
14382 @item @@subheading @var{title}
14383 Print an unnumbered subsection-like heading in the text, but not in
14384 the table of contents of a printed manual.  In Info, the title is
14385 underlined with hyphens.  @xref{unnumberedsubsec appendixsubsec
14386 subheading, , @code{@@unnumberedsubsec} @code{@@appendixsubsec}
14387 @code{@@subheading}}.@refill
14389 @item @@subsection @var{title}
14390 Begin a subsection within a section.  In a printed manual, the
14391 subsection title is numbered and appears in the table of contents.  In
14392 Info, the title is underlined with hyphens.  @xref{subsection, ,
14393 @code{@@subsection}}.@refill
14395 @item @@subsubheading @var{title}
14396 Print an unnumbered subsubsection-like heading in the text, but not in
14397 the table of contents of a printed manual.  In Info, the title is
14398 underlined with periods.  @xref{subsubsection, , The `subsub'
14399 Commands}.@refill
14401 @item @@subsubsection @var{title}
14402 Begin a subsubsection within a subsection.  In a printed manual,
14403 the subsubsection title is numbered and appears in the table of
14404 contents.  In Info, the title is underlined with periods.
14405 @xref{subsubsection, , The `subsub' Commands}.@refill
14407 @item @@subtitle @var{title}
14408 In a printed manual, set a subtitle in a normal sized font flush to
14409 the right-hand side of the page.  Not relevant to Info, which does not
14410 have title pages.  @xref{title subtitle author, , @code{@@title}
14411 @code{@@subtitle} and @code{@@author} Commands}.@refill
14413 @item @@summarycontents
14414 Print a short table of contents.  Not relevant to Info, which uses
14415 menus rather than tables of contents.  A synonym for
14416 @code{@@shortcontents}.  @xref{Contents, , Generating a Table of
14417 Contents}.@refill
14419 @need 300
14420 @item @@syncodeindex @var{from-index} @var{into-index}
14421 Merge the index named in the first argument into the index named in
14422 the second argument, printing the entries from the first index in
14423 @code{@@code} font.  @xref{Combining Indices}.@refill
14425 @need 300
14426 @item @@synindex @var{from-index} @var{into-index}
14427 Merge the index named in the first argument into the index named in
14428 the second argument.  Do not change the font of @var{from-index}
14429 entries.  @xref{Combining Indices}.@refill
14431 @need 100
14432 @item @@t@{@var{text}@}
14433 Print @var{text} in a @t{fixed-width}, typewriter-like font.
14434 No effect in Info.  @xref{Fonts}.@refill
14436 @item @@tab
14437 Separate columns in a multitable.  @xref{Multitable Rows}.
14439 @need 400
14440 @item @@table @var{formatting-command}
14441 Begin a two-column table, using @code{@@item} for each entry.  Write
14442 each first column entry on the same line as @code{@@item}.  First
14443 column entries are printed in the font resulting from
14444 @var{formatting-command}.  Pair with @code{@@end table}.
14445 @xref{Two-column Tables, , Making a Two-column Table}.
14446 Also see @ref{ftable vtable, , @code{@@ftable} and @code{@@vtable}},
14447 and @ref{itemx, , @code{@@itemx}}.@refill
14449 @item @@TeX@{@}
14450 Insert the logo @TeX{}.  @xref{TeX and copyright, , Inserting @TeX{}
14451 and @copyright{}}.@refill
14453 @item @@tex
14454 Enter @TeX{} completely.  Pair with @code{@@end tex}.  @xref{Raw
14455 Formatter Commands}.
14457 @item @@thischapter
14458 @itemx @@thischaptername
14459 @itemx @@thisfile
14460 @itemx @@thispage
14461 @itemx @@thistitle
14462 Only allowed in a heading or footing.  Stands for the number and name of
14463 the current chapter (in the format `Chapter 1: Title'), the chapter name
14464 only, the filename, the current page number, and the title of the
14465 document, respectively.  @xref{Custom Headings, , How to Make Your Own
14466 Headings}.@refill
14468 @item @@tieaccent@{@var{cc}@}
14469 Generate a tie-after accent over the next two characters @var{cc}, as in
14470 `@tieaccent{oo}'.  @xref{Inserting Accents}.
14472 @item @@tindex @var{entry}
14473 Add @var{entry} to the index of data types.  @xref{Index Entries, ,
14474 Defining the Entries of an Index}.@refill
14476 @item @@title @var{title}
14477 In a printed manual, set a title flush to the left-hand side of the
14478 page in a larger than normal font and underline it with a black rule.
14479 Not relevant to Info, which does not have title pages.  @xref{title
14480 subtitle author, , The @code{@@title} @code{@@subtitle} and
14481 @code{@@author} Commands}.@refill
14483 @need 400
14484 @item @@titlefont@{@var{text}@}
14485 In a printed manual, print @var{text} in a larger than normal font.
14486 Not relevant to Info, which does not have title pages.
14487 @xref{titlefont center sp, , The @code{@@titlefont} @code{@@center}
14488 and @code{@@sp} Commands}.@refill
14490 @need 300
14491 @item @@titlepage
14492 Indicate to Texinfo the beginning of the title page.  Write command on
14493 a line of its own.  Pair with @code{@@end titlepage}.  Nothing between
14494 @code{@@titlepage} and @code{@@end titlepage} appears in Info.
14495 @xref{titlepage, , @code{@@titlepage}}.@refill
14497 @need 150
14498 @item @@today@{@}
14499 Insert the current date, in `1 Jan 1900' style.  @xref{Custom
14500 Headings, , How to Make Your Own Headings}.@refill
14502 @item @@top @var{title}
14503 In a Texinfo file to be formatted with @code{makeinfo}, identify the
14504 topmost @code{@@node} line in the file, which must be written on the line
14505 immediately preceding the @code{@@top} command.  Used for
14506 @code{makeinfo}'s node pointer insertion feature.  The title is
14507 underlined with asterisks.  Both the @code{@@node} line and the @code{@@top}
14508 line normally should be enclosed by @code{@@ifinfo} and @code{@@end
14509 ifinfo}.  In @TeX{} and @code{texinfo-format-buffer}, the @code{@@top}
14510 command is merely a synonym for @code{@@unnumbered}.  @xref{makeinfo
14511 Pointer Creation, , Creating Pointers with @code{makeinfo}}.
14513 @item @@u@{@var{c}@}
14514 @itemx @@ubaraccent@{@var{c}@}
14515 @itemx @@udotaccent@{@var{c}@}
14516 Generate a breve, underbar, or underdot accent, respectively, over or
14517 under the character @var{c}, as in @u{o}, @ubaraccent{o},
14518 @udotaccent{o}.  @xref{Inserting Accents}.
14520 @item @@unnumbered @var{title}
14521 In a printed manual, begin a chapter that appears without chapter
14522 numbers of any kind.  The title appears in the table of contents of a
14523 printed manual.  In Info, the title is underlined with asterisks.
14524 @xref{unnumbered & appendix, , @code{@@unnumbered} and
14525 @code{@@appendix}}.@refill
14527 @item @@unnumberedsec @var{title}
14528 In a printed manual, begin a section that appears without section
14529 numbers of any kind.  The title appears in the table of contents of a
14530 printed manual.  In Info, the title is underlined with equal signs.
14531 @xref{unnumberedsec appendixsec heading, , Section Commands}.@refill
14533 @item @@unnumberedsubsec @var{title}
14534 In a printed manual, begin an unnumbered subsection within a
14535 chapter.  The title appears in the table of contents of a printed
14536 manual.  In Info, the title is underlined with hyphens.
14537 @xref{unnumberedsubsec appendixsubsec subheading, ,
14538 @code{@@unnumberedsubsec} @code{@@appendixsubsec}
14539 @code{@@subheading}}.@refill
14541 @item @@unnumberedsubsubsec @var{title}
14542 In a printed manual, begin an unnumbered subsubsection within a
14543 chapter.  The title appears in the table of contents of a printed
14544 manual.  In Info, the title is underlined with periods.
14545 @xref{subsubsection, , The `subsub' Commands}.@refill
14547 @item @@uref@{@var{url}[, @var{displayed-text}@}
14548 Define a cross reference to an external uniform resource locator for the
14549 World Wide Web.  @xref{url, , @code{@@url}}.@refill
14551 @item @@url@{@var{url}@}
14552 Indicate text that is a uniform resource locator for the World Wide
14553 Web.  @xref{url, , @code{@@url}}.@refill
14555 @item @@v@{@var{c}@}
14556 Generate check accent over the character @var{c}, as in @v{o}.
14557 @xref{Inserting Accents}.
14559 @item @@value@{@var{flag}@}
14560 Replace @var{flag} with the value to which it is set by @code{@@set
14561 @var{flag}}.
14562 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
14564 @item @@var@{@var{metasyntactic-variable}@}
14565 Highlight a metasyntactic variable, which is something that stands for
14566 another piece of text.  @xref{var, , Indicating Metasyntactic
14567 Variables}.@refill
14569 @need 400
14570 @item @@vindex @var{entry}
14571 Add @var{entry} to the index of variables.  @xref{Index Entries, ,
14572 Defining the Entries of an Index}.@refill
14574 @need 400
14575 @item @@vskip @var{amount}
14576 In a printed manual, insert whitespace so as to push text on the
14577 remainder of the page towards the bottom of the page.  Used in
14578 formatting the copyright page with the argument @samp{0pt plus
14579 1filll}.  (Note spelling of @samp{filll}.)  @code{@@vskip} may be used
14580 only in contexts ignored for Info.  @xref{Copyright & Permissions, ,
14581 The Copyright Page and Printed Permissions}.@refill
14583 @need 400
14584 @item @@vtable @var{formatting-command}
14585 Begin a two-column table, using @code{@@item} for each entry.
14586 Automatically enter each of the items in the first column into the
14587 index of variables.  Pair with @code{@@end vtable}.  The same as
14588 @code{@@table}, except for indexing.  @xref{ftable vtable, ,
14589 @code{@@ftable} and @code{@@vtable}}.@refill
14591 @need 400
14592 @item @@w@{@var{text}@}
14593 Prevent @var{text} from being split across two lines.  Do not end a
14594 paragraph that uses @code{@@w} with an @code{@@refill} command.
14595 @xref{w, , @code{@@w}}.@refill
14597 @need 400
14598 @item @@xref@{@var{node-name}, [@var{entry}], [@var{topic-or-title}], [@var{info-file}], [@var{manual}]@}
14599 Make a reference that starts with `See' in a printed manual.  Follow
14600 command with a punctuation mark.  Only the first argument is
14601 mandatory.  @xref{xref, , @code{@@xref}}.@refill
14602 @end table
14605 @node Tips, Sample Texinfo File, Command List, Top
14606 @appendix Tips and Hints
14608 Here are some tips for writing Texinfo documentation:@refill
14610 @cindex Tips
14611 @cindex Usage tips
14612 @cindex Hints
14613 @itemize @bullet
14614 @item
14615 Write in the present tense, not in the past or the future.
14617 @item
14618 Write actively!  For example, write ``We recommend that @dots{}'' rather
14619 than ``It is recommended that @dots{}''.
14621 @item
14622 Use 70 or 72 as your fill column.  Longer lines are hard to read.
14624 @item
14625 Include a copyright notice and copying permissions.
14626 @end itemize
14628 @subsubheading Index, Index, Index!
14630 Write many index entries, in different ways.
14631 Readers like indices; they are helpful and convenient.
14633 Although it is easiest to write index entries as you write the body of
14634 the text, some people prefer to write entries afterwards.  In either
14635 case, write an entry before the paragraph to which it applies.  This
14636 way, an index entry points to the first page of a paragraph that is
14637 split across pages.
14639 Here are more hints we have found valuable:
14641 @itemize @bullet
14642 @item
14643 Write each index entry differently, so each entry refers to a different
14644 place in the document.
14646 @item
14647 Write index entries only where a topic is discussed significantly.  For
14648 example, it is not useful to index ``debugging information'' in a
14649 chapter on reporting bugs.  Someone who wants to know about debugging
14650 information will certainly not find it in that chapter.
14652 @item
14653 Consistently capitalize the first word of every concept index entry,
14654 or else consistently use lower case.  Terse entries often call for
14655 lower case; longer entries for capitalization.  Whichever case
14656 convention you use, please use one or the other consistently!  Mixing
14657 the two styles looks bad.
14659 @item
14660 Always capitalize or use upper case for those words in an index for
14661 which this is proper, such as names of countries or acronyms.  Always
14662 use the appropriate case for case-sensitive names, such as those in C or
14663 Lisp.
14665 @item
14666 Write the indexing commands that refer to a whole section immediately
14667 after the section command, and write the indexing commands that refer to
14668 the paragraph before the paragraph.
14670 @need 1000
14671 In the example that follows, a blank line comes after the index
14672 entry for ``Leaping'':
14674 @example
14675 @group
14676 @@section The Dog and the Fox
14677 @@cindex Jumping, in general
14678 @@cindex Leaping
14680 @@cindex Dog, lazy, jumped over
14681 @@cindex Lazy dog jumped over
14682 @@cindex Fox, jumps over dog
14683 @@cindex Quick fox jumps over dog
14684 The quick brown fox jumps over the lazy dog.
14685 @end group
14686 @end example
14688 @noindent
14689 (Note that the example shows entries for the same concept that are
14690 written in different ways---@samp{Lazy dog}, and @samp{Dog, lazy}---so
14691 readers can look up the concept in different ways.)
14692 @end itemize
14694 @subsubheading Blank Lines
14696 @itemize @bullet
14697 @item
14698 Insert a blank line between a sectioning command and the first following
14699 sentence or paragraph, or between the indexing commands associated with
14700 the sectioning command and the first following sentence or paragraph, as
14701 shown in the tip on indexing.  Otherwise, a formatter may fold title and
14702 paragraph together.
14704 @item
14705 Always insert a blank line before an @code{@@table} command and after an
14706 @code{@@end table} command; but never insert a blank line after an
14707 @code{@@table} command or before an @code{@@end table} command.
14709 @need 1000
14710 For example,
14712 @example
14713 @group
14714 Types of fox:
14716 @@table @@samp
14717 @@item Quick
14718 Jump over lazy dogs.
14719 @end group
14721 @group
14722 @@item Brown
14723 Also jump over lazy dogs.
14724 @@end table
14726 @end group
14727 @group
14728 @@noindent
14729 On the other hand, @dots{}
14730 @end group
14731 @end example
14733 Insert blank lines before and after @code{@@itemize} @dots{} @code{@@end
14734 itemize} and @code{@@enumerate} @dots{} @code{@@end enumerate} in the
14735 same way.
14736 @end itemize
14738 @subsubheading Complete Phrases
14740 Complete phrases are easier to read than @dots{}
14742 @itemize @bullet
14743 @item
14744 Write entries in an itemized list as complete sentences; or at least, as
14745 complete phrases.  Incomplete expressions @dots{} awkward @dots{} like
14746 this.
14748 @item
14749 Write the prefatory sentence or phrase for a multi-item list or table as
14750 a complete expression.  Do not write ``You can set:''; instead, write
14751 ``You can set these variables:''.  The former expression sounds cut off.
14752 @end itemize
14754 @subsubheading Editions, Dates and Versions
14756 Write the edition and version numbers and date in three places in every
14757 manual:
14759 @enumerate
14760 @item
14761 In the first @code{@@ifinfo} section, for people reading the Texinfo file.
14763 @item
14764 In the @code{@@titlepage} section, for people reading the printed manual.
14766 @item
14767 In the `Top' node, for people reading the Info file.
14768 @end enumerate
14770 @noindent
14771 Also, it helps to write a note before the first @code{@@ifinfo}
14772 section to explain what you are doing.
14774 @need 800
14775 @noindent
14776 For example:
14778 @example
14779 @group
14780 @@c ===> NOTE! <==
14781 @@c Specify the edition and version numbers and date
14782 @@c in *three* places:
14783 @@c   1. First ifinfo section  2. title page  3. top node
14784 @@c To find the locations, search for !!set
14785 @end group
14787 @group
14788 @@ifinfo
14789 @@c !!set edition, date, version
14790 This is Edition 4.03, January 1992,
14791 of the @@cite@{GDB Manual@} for GDB Version 4.3.
14792 @dots{}
14793 @end group
14794 @end example
14796 @noindent
14797 ---or use @code{@@set} and @code{@@value}
14798 (@pxref{value Example, , @code{@@value} Example}).
14800 @subsubheading Definition Commands
14802 Definition commands are @code{@@deffn}, @code{@@defun},
14803 @code{@@defmac}, and the like, and enable you to write descriptions in
14804 a uniform format.@refill
14806 @itemize @bullet
14807 @item
14808 Write just one definition command for each entity you define with a
14809 definition command.  The automatic indexing feature creates an index
14810 entry that leads the reader to the definition.
14812 @item
14813 Use @code{@@table} @dots{} @code{@@end table} in an appendix that
14814 contains a summary of functions, not @code{@@deffn} or other definition
14815 commands.
14816 @end itemize
14818 @subsubheading Capitalization
14820 @itemize @bullet
14821 @item
14822 Capitalize ``Texinfo''; it is a name.  Do not write the @samp{x} or
14823 @samp{i} in upper case.
14825 @item
14826 Capitalize ``Info''; it is a name.
14828 @item
14829 Write @TeX{} using the @code{@@TeX@{@}} command.  Note the uppercase
14830 @samp{T} and @samp{X}.  This command causes the formatters to
14831 typeset the name according to the wishes of Donald Knuth, who wrote
14832 @TeX{}.
14833 @end itemize
14835 @subsubheading Spaces
14837 Do not use spaces to format a Texinfo file, except inside of
14838 @code{@@example} @dots{} @code{@@end example} and similar commands.
14840 @need 700
14841 For example, @TeX{} fills the following:
14843 @example
14844 @group
14845     @@kbd@{C-x v@}
14846     @@kbd@{M-x vc-next-action@}
14847        Perform the next logical operation
14848        on the version-controlled file
14849        corresponding to the current buffer.
14850 @end group
14851 @end example
14853 @need 950
14854 @noindent
14855 so it looks like this:
14857 @iftex
14858 @quotation
14859     @kbd{C-x v}
14860     @kbd{M-x vc-next-action}
14861        Perform the next logical operation on the version-controlled file
14862        corresponding to the current buffer.
14863 @end quotation
14864 @end iftex
14865 @ifinfo
14866 @quotation
14867 `C-x v' `M-x vc-next-action' Perform the next logical operation on the
14868 version-controlled file corresponding to the current buffer.
14869 @end quotation
14870 @end ifinfo
14872 @noindent
14873 In this case, the text should be formatted with
14874 @code{@@table}, @code{@@item}, and @code{@@itemx}, to create a table.
14876 @subsubheading @@code, @@samp, @@var, and @samp{---}
14878 @itemize @bullet
14879 @item
14880 Use @code{@@code} around Lisp symbols, including command names.
14881 For example,
14883 @example
14884 The main function is @@code@{vc-next-action@}, @dots{}
14885 @end example
14887 @item
14888 Avoid putting letters such as @samp{s} immediately after an
14889 @samp{@@code}.  Such letters look bad.
14891 @item
14892 Use @code{@@var} around meta-variables.  Do not write angle brackets
14893 around them.
14895 @item
14896 Use three hyphens in a row, @samp{---}, to indicate a long dash.  @TeX{}
14897 typesets these as a long dash and the Info formatters reduce three
14898 hyphens to two.
14899 @end itemize
14901 @subsubheading Periods Outside of Quotes
14903 Place periods and other punctuation marks @emph{outside} of quotations,
14904 unless the punctuation is part of the quotation.  This practice goes
14905 against publishing conventions in the United States, but enables the
14906 reader to distinguish between the contents of the quotation and the
14907 whole passage.
14909 For example, you should write the following sentence with the period
14910 outside the end quotation marks:
14912 @example
14913 Evidently, @samp{au} is an abbreviation for ``author''.
14914 @end example
14916 @noindent
14917 since @samp{au} does @emph{not} serve as an  abbreviation for
14918 @samp{author.} (with a period following the word).
14920 @subsubheading Introducing New Terms
14922 @itemize @bullet
14923 @item
14924 Introduce new terms so that a reader who does not know them can
14925 understand them from context; or write a definition for the term.
14927 For example, in the following, the terms ``check in'', ``register'' and
14928 ``delta'' are all appearing for the first time; the example sentence should be
14929 rewritten so they are understandable.
14931 @quotation
14932 The major function assists you in checking in a file to your
14933 version control system and registering successive sets of changes to
14934 it as deltas.
14935 @end quotation
14937 @item
14938 Use the @code{@@dfn} command around a word being introduced, to indicate
14939 that the reader should not expect to know the meaning already, and
14940 should expect to learn the meaning from this passage.
14941 @end itemize
14943 @subsubheading @@pxref
14945 @c !!! maybe include this in the tips on pxref
14946 @ignore
14947 By the way, it is okay to use pxref with something else in front of
14948 it within the parens, as long as the pxref is followed by the close
14949 paren, and the material inside the parens is not part of a larger
14950 sentence.  Also, you can use xref inside parens as part of a complete
14951 sentence so long as you terminate the cross reference with punctuation.
14952 @end ignore
14953 Absolutely never use @code{@@pxref} except in the special context for
14954 which it is designed: inside parentheses, with the closing parenthesis
14955 following immediately after the closing brace.  One formatter
14956 automatically inserts closing punctuation and the other does not.  This
14957 means that the output looks right both in printed output and in an Info
14958 file, but only when the command is used inside parentheses.
14960 @subsubheading Invoking from a Shell
14962 You can invoke programs such as Emacs, GCC, and @code{gawk} from a
14963 shell.  The documentation for each program should contain a section that
14964 describes this.  Unfortunately, if the node names and titles for these
14965 sections are all different, readers find it hard to search for the
14966 section.@refill
14968 Name such sections with a phrase beginning with the word
14969 @w{`Invoking @dots{}'}, as in `Invoking Emacs'; this way
14970 users can find the section easily.
14972 @subsubheading ANSI C Syntax
14974 When you use @code{@@example} to describe a C function's calling
14975 conventions, use the ANSI C syntax, like this:@refill
14977 @example
14978 void dld_init (char *@@var@{path@});
14979 @end example
14981 @noindent
14982 And in the subsequent discussion, refer to the argument values by
14983 writing the same argument names, again highlighted with
14984 @code{@@var}.@refill
14986 @need 800
14987 Avoid the obsolete style that looks like this:@refill
14989 @example
14990 #include <dld.h>
14992 dld_init (path)
14993 char *path;
14994 @end example
14996 Also, it is best to avoid writing @code{#include} above the
14997 declaration just to indicate that the function is declared in a
14998 header file.  The practice may give the misimpression that the
14999 @code{#include} belongs near the declaration of the function.  Either
15000 state explicitly which header file holds the declaration or, better
15001 yet, name the header file used for a group of functions at the
15002 beginning of the section that describes the functions.@refill
15004 @subsubheading Bad Examples
15006 Here are several examples of bad writing to avoid:
15008 In this example, say, `` @dots{} you must @code{@@dfn}@{check
15009 in@} the new version.''  That flows better.
15011 @quotation
15012 When you are done editing the file, you must perform a
15013 @code{@@dfn}@{check in@}.
15014 @end quotation
15016 In the following example, say, ``@dots{} makes a unified interface such as VC
15017 mode possible.''
15019 @quotation
15020 SCCS, RCS and other version-control systems all perform similar
15021 functions in broadly similar ways (it is this resemblance which makes
15022 a unified control mode like this possible).
15023 @end quotation
15025 And in this example, you should specify what `it' refers to:
15027 @quotation
15028 If you are working with other people, it assists in coordinating
15029 everyone's changes so they do not step on each other.
15030 @end quotation
15032 @subsubheading And Finally @dots{}
15034 @itemize @bullet
15035 @item
15036 Pronounce @TeX{} as if the @samp{X} were a Greek `chi', as the last
15037 sound in the name `Bach'.  But pronounce Texinfo as in `speck':
15038 ``teckinfo''.
15040 @item
15041 Write notes for yourself at the very end of a Texinfo file after the
15042 @code{@@bye}.  None of the formatters process text after the
15043 @code{@@bye}; it is as if the text were within @code{@@ignore} @dots{}
15044 @code{@@end ignore}.
15045 @end itemize
15048 @node Sample Texinfo File, Sample Permissions, Tips, Top
15049 @appendix A Sample Texinfo File
15050 @cindex Sample Texinfo file, no comments
15052 Here is a complete, short sample Texinfo file, without any commentary.
15053 You can see this file, with comments, in the first chapter.
15054 @xref{Short Sample, , A Short Sample Texinfo File}.
15056 @sp 1
15057 @example
15058 \input texinfo   @@c -*-texinfo-*-
15059 @@c %**start of header
15060 @@setfilename sample.info
15061 @@settitle Sample Document
15062 @@c %**end of header
15064 @@setchapternewpage odd
15066 @@ifinfo
15067 This is a short example of a complete Texinfo file.
15069 Copyright 1990 Free Software Foundation, Inc.
15070 @@end ifinfo
15072 @@titlepage
15073 @@sp 10
15074 @@comment The title is printed in a large font.
15075 @@center @@titlefont@{Sample Title@}
15077 @@c The following two commands start the copyright page.
15078 @@page
15079 @@vskip 0pt plus 1filll
15080 Copyright @@copyright@{@} 1990 Free Software Foundation, Inc.
15081 @@end titlepage
15083 @@node    Top,       First Chapter,         , (dir)
15084 @@comment node-name, next,          previous, up
15086 @@menu
15087 * First Chapter::    The first chapter is the
15088                      only chapter in this sample.
15089 * Concept Index::    This index has two entries.
15090 @@end menu
15092 @@node    First Chapter, Concept Index, Top,      Top
15093 @@comment node-name,     next,          previous, up
15094 @@chapter First Chapter
15095 @@cindex Sample index entry
15097 This is the contents of the first chapter.
15098 @@cindex Another sample index entry
15100 Here is a numbered list.
15102 @@enumerate
15103 @@item
15104 This is the first item.
15106 @@item
15107 This is the second item.
15108 @@end enumerate
15110 The @@code@{makeinfo@} and @@code@{texinfo-format-buffer@}
15111 commands transform a Texinfo file such as this into
15112 an Info file; and @@TeX@{@} typesets it for a printed
15113 manual.
15115 @@node    Concept Index,    ,  First Chapter, Top
15116 @@comment node-name,    next,  previous,      up
15117 @@unnumbered Concept Index
15119 @@printindex cp
15121 @@contents
15122 @@bye
15123 @end example
15126 @node Sample Permissions, Include Files, Sample Texinfo File, Top
15127 @appendix Sample Permissions
15128 @cindex Permissions
15129 @cindex Copying permissions
15131 Texinfo files should contain sections that tell the readers that they
15132 have the right to copy and distribute the Texinfo file, the Info file,
15133 and the printed manual.@refill
15135 Also, if you are writing a manual about software, you should explain
15136 that the software is free and either include the GNU General Public
15137 License (GPL) or provide a reference to it.  @xref{Distrib, ,
15138 Distribution, emacs, The GNU Emacs Manual}, for an example of the text
15139 that could be used in the software ``Distribution'', ``General Public
15140 License'', and ``NO WARRANTY'' sections of a document.  @xref{Copying,
15141 , Texinfo Copying Conditions}, for an example of a brief explanation
15142 of how the copying conditions provide you with rights. @refill
15144 @menu
15145 * Inserting Permissions::       How to put permissions in your document.
15146 * ifinfo Permissions::          Sample @samp{ifinfo} copying permissions.
15147 * Titlepage Permissions::       Sample Titlepage copying permissions.
15148 @end menu
15150 @node Inserting Permissions, ifinfo Permissions, Sample Permissions, Sample Permissions
15151 @ifinfo
15152 @appendixsec Inserting Permissions
15153 @end ifinfo
15155 In a Texinfo file, the first @code{@@ifinfo} section usually begins
15156 with a line that says what the file documents.  This is what a person
15157 reading the unprocessed Texinfo file or using the advanced Info
15158 command @kbd{g *} sees first.  @inforef{Expert, Advanced Info
15159 commands, info}, for more information. (A reader using the regular
15160 Info commands usually starts reading at the first node and skips
15161 this first section, which is not in a node.)@refill
15163 In the @code{@@ifinfo} section, the summary sentence is followed by a
15164 copyright notice and then by the copying permission notice.  One of
15165 the copying permission paragraphs is enclosed in @code{@@ignore} and
15166 @code{@@end ignore} commands.  This paragraph states that the Texinfo
15167 file can be processed through @TeX{} and printed, provided the printed
15168 manual carries the proper copying permission notice.  This paragraph
15169 is not made part of the Info file since it is not relevant to the Info
15170 file; but it is a mandatory part of the Texinfo file since it permits
15171 people to process the Texinfo file in @TeX{} and print the
15172 results.@refill
15174 In the printed manual, the Free Software Foundation copying permission
15175 notice follows the copyright notice and publishing information and is
15176 located within the region delineated by the @code{@@titlepage} and
15177 @code{@@end titlepage} commands.  The copying permission notice is exactly
15178 the same as the notice in the @code{@@ifinfo} section except that the
15179 paragraph enclosed in @code{@@ignore} and @code{@@end ignore} commands is
15180 not part of the notice.@refill
15182 To make it simple to insert a permission notice into each section of
15183 the Texinfo file, sample permission notices for each section are
15184 reproduced in full below.@refill
15186 Note that you may need to specify the correct name of a section
15187 mentioned in the permission notice.  For example, in @cite{The GDB
15188 Manual}, the name of the section referring to the General Public
15189 License is called the ``GDB General Public License'', but in the
15190 sample shown below, that section is referred to generically as the
15191 ``GNU General Public License''.  If the Texinfo file does not carry a
15192 copy of the General Public License, leave out the reference to it, but
15193 be sure to include the rest of the sentence.@refill
15195 @node ifinfo Permissions, Titlepage Permissions, Inserting Permissions, Sample Permissions
15196 @comment  node-name,  next,  previous,  up
15197 @appendixsec @samp{ifinfo} Copying Permissions
15198 @cindex @samp{ifinfo} permissions
15200 In the @code{@@ifinfo} section of a Texinfo file, the standard Free
15201 Software Foundation permission notice reads as follows:@refill
15203 @example
15204 This file documents @dots{}
15206 Copyright 1998 Free Software Foundation, Inc.
15208 Permission is granted to make and distribute verbatim
15209 copies of this manual provided the copyright notice and
15210 this permission notice are preserved on all copies.
15212 @@ignore
15213 Permission is granted to process this file through TeX
15214 and print the results, provided the printed document
15215 carries a copying permission notice identical to this
15216 one except for the removal of this paragraph (this
15217 paragraph not being relevant to the printed manual).
15219 @@end ignore
15220 Permission is granted to copy and distribute modified
15221 versions of this manual under the conditions for
15222 verbatim copying, provided also that the sections
15223 entitled ``Copying'' and ``GNU General Public License''
15224 are included exactly as in the original, and provided
15225 that the entire resulting derived work is distributed
15226 under the terms of a permission notice identical to this
15227 one.
15229 Permission is granted to copy and distribute
15230 translations of this manual into another language,
15231 under the above conditions for modified versions,
15232 except that this permission notice may be stated in a
15233 translation approved by the Free Software Foundation.
15234 @end example
15236 @node Titlepage Permissions,  , ifinfo Permissions, Sample Permissions
15237 @comment  node-name,  next,  previous,  up
15238 @appendixsec Titlepage Copying Permissions
15239 @cindex Titlepage permissions
15241 In the @code{@@titlepage} section of a Texinfo file, the standard Free
15242 Software Foundation copying permission notice follows the copyright
15243 notice and publishing information.  The standard phrasing is as
15244 follows:@refill
15246 @example
15247 Permission is granted to make and distribute verbatim
15248 copies of this manual provided the copyright notice and
15249 this permission notice are preserved on all copies.
15251 Permission is granted to copy and distribute modified
15252 versions of this manual under the conditions for
15253 verbatim copying, provided also that the sections
15254 entitled ``Copying'' and ``GNU General Public License''
15255 are included exactly as in the original, and provided
15256 that the entire resulting derived work is distributed
15257 under the terms of a permission notice identical to this
15258 one.
15260 Permission is granted to copy and distribute
15261 translations of this manual into another language,
15262 under the above conditions for modified versions,
15263 except that this permission notice may be stated in a
15264 translation approved by the Free Software Foundation.
15265 @end example
15268 @node Include Files, Headings, Sample Permissions, Top
15269 @appendix Include Files
15270 @cindex Include files
15272 When @TeX{} or an Info formatting command sees an @code{@@include}
15273 command in a Texinfo file, it processes the contents of the file named
15274 by the command and incorporates them into the DVI or Info file being
15275 created.  Index entries from the included file are incorporated into
15276 the indices of the output file.@refill
15278 Include files let you keep a single large document as a collection of
15279 conveniently small parts.@refill
15281 @menu
15282 * Using Include Files::         How to use the @code{@@include} command.
15283 * texinfo-multiple-files-update::  How to create and update nodes and
15284                                   menus when using included files.
15285 * Include File Requirements::   What @code{texinfo-multiple-files-update} expects.
15286 * Sample Include File::         A sample outer file with included files
15287                                   within it; and a sample included file.
15288 * Include Files Evolution::     How use of the @code{@@include} command
15289                                   has changed over time.
15290 @end menu
15292 @node Using Include Files, texinfo-multiple-files-update, Include Files, Include Files
15293 @appendixsec How to Use Include Files
15294 @findex include
15296 To include another file within a Texinfo file, write the
15297 @code{@@include} command at the beginning of a line and follow it on
15298 the same line by the name of a file to be included.  For
15299 example:@refill
15301 @example
15302 @@include buffers.texi
15303 @end example
15305 An included file should simply be a segment of text that you expect to
15306 be included as is into the overall or @dfn{outer} Texinfo file; it
15307 should not contain the standard beginning and end parts of a Texinfo
15308 file.  In particular, you should not start an included file with a
15309 line saying @samp{\input texinfo}; if you do, that phrase is inserted
15310 into the output file as is.  Likewise, you should not end an included
15311 file with an @code{@@bye} command; nothing after @code{@@bye} is
15312 formatted.@refill
15314 In the past, you were required to write an @code{@@setfilename} line at the
15315 beginning of an included file, but no longer.  Now, it does not matter
15316 whether you write such a line.  If an @code{@@setfilename} line exists
15317 in an included file, it is ignored.@refill
15319 Conventionally, an included file begins with an @code{@@node} line that
15320 is followed by an @code{@@chapter} line.  Each included file is one
15321 chapter.  This makes it easy to use the regular node and menu creating
15322 and updating commands to create the node pointers and menus within the
15323 included file.  However, the simple Emacs node and menu creating and
15324 updating commands do not work with multiple Texinfo files.  Thus you
15325 cannot use these commands to fill in the `Next', `Previous', and `Up'
15326 pointers of the @code{@@node} line that begins the included file.  Also,
15327 you cannot use the regular commands to create a master menu for the
15328 whole file.  Either you must insert the menus and the `Next',
15329 `Previous', and `Up' pointers by hand, or you must use the GNU Emacs
15330 Texinfo mode command, @code{texinfo-multiple-files-update}, that is
15331 designed for @code{@@include} files.@refill
15333 @node texinfo-multiple-files-update, Include File Requirements, Using Include Files, Include Files
15334 @appendixsec @code{texinfo-multiple-files-update}
15335 @findex texinfo-multiple-files-update
15337 GNU Emacs Texinfo mode provides the @code{texinfo-multiple-files-update}
15338 command.  This command creates or updates `Next', `Previous', and `Up'
15339 pointers of included files as well as those in the outer or overall
15340 Texinfo file, and it creates or updates a main menu in the outer file.
15341 Depending whether you call it with optional arguments, the command
15342 updates only the pointers in the first @code{@@node} line of the
15343 included files or all of them:@refill
15345 @table @kbd
15346 @item M-x texinfo-multiple-files-update
15347 Called without any arguments:@refill
15349 @itemize @minus
15350 @item
15351 Create or update the `Next', `Previous', and `Up' pointers of the
15352 first @code{@@node} line in each file included in an outer or overall
15353 Texinfo file.@refill
15355 @item
15356 Create or update the `Top' level node pointers of the outer or
15357 overall file.@refill
15359 @item
15360 Create or update a main menu in the outer file.@refill
15361 @end itemize
15363 @item C-u M-x texinfo-multiple-files-update
15364 Called with @kbd{C-u} as a prefix argument:
15366 @itemize @minus{}
15367 @item
15368 Create or update pointers in the first @code{@@node} line in each
15369 included file.
15371 @item
15372 Create or update the `Top' level node pointers of the outer file.
15374 @item
15375 Create and insert a master menu in the outer file.  The master menu
15376 is made from all the menus in all the included files.@refill
15377 @end itemize
15379 @item C-u 8 M-x texinfo-multiple-files-update
15380 Called with a numeric prefix argument, such as @kbd{C-u 8}:
15382 @itemize @minus
15383 @item
15384 Create or update @strong{all} the `Next', `Previous', and `Up' pointers
15385 of all the included files.@refill
15387 @item
15388 Create or update @strong{all} the menus of all the included
15389 files.@refill
15391 @item
15392 Create or update the `Top' level node pointers of the outer or
15393 overall file.@refill
15395 @item
15396 And then create a master menu in the outer file.  This is similar to
15397 invoking @code{texinfo-master-menu} with an argument when you are
15398 working with just one file.@refill
15399 @end itemize
15400 @end table
15402 Note the use of the prefix argument in interactive use: with a regular
15403 prefix argument, just @w{@kbd{C-u}}, the
15404 @code{texinfo-multiple-files-update} command inserts a master menu;
15405 with a numeric prefix argument, such as @kbd{C-u 8}, the command
15406 updates @strong{every} pointer and menu in @strong{all} the files and then inserts a
15407 master menu.@refill
15409 @node Include File Requirements, Sample Include File, texinfo-multiple-files-update, Include Files
15410 @appendixsec Include File Requirements
15411 @cindex Include file requirements
15412 @cindex Requirements for include files
15414 If you plan to use the @code{texinfo-multiple-files-update} command,
15415 the outer Texinfo file that lists included files within it should
15416 contain nothing but the beginning and end parts of a Texinfo file, and
15417 a number of @code{@@include} commands listing the included files.  It
15418 should not even include indices, which should be listed in an included
15419 file of their own.@refill
15421 Moreover, each of the included files must contain exactly one highest
15422 level node (conventionally, @code{@@chapter} or equivalent),
15423 and this node must be the first node in the included file.
15424 Furthermore, each of these highest level nodes in each included file
15425 must be at the same hierarchical level in the file structure.
15426 Usually, each is an @code{@@chapter}, an @code{@@appendix}, or an
15427 @code{@@unnumbered} node.  Thus, normally, each included file contains
15428 one, and only one, chapter or equivalent-level node.@refill
15430 The outer file should contain only @emph{one} node, the `Top' node.  It
15431 should @emph{not} contain any nodes besides the single `Top' node.  The
15432 @code{texinfo-multiple-files-update} command will not process
15433 them.@refill
15435 @node Sample Include File, Include Files Evolution, Include File Requirements, Include Files
15436 @appendixsec Sample File with @code{@@include}
15437 @cindex Sample @code{@@include} file
15438 @cindex Include file sample
15439 @cindex @code{@@include} file sample
15441 Here is an example of a complete outer Texinfo file with @code{@@include} files
15442 within it before running @code{texinfo-multiple-files-update}, which
15443 would insert a main or master menu:@refill
15445 @example
15446 @group
15447 \input texinfo @@c -*-texinfo-*-
15448 @c %**start of header
15449 @@setfilename  include-example.info
15450 @@settitle Include Example
15451 @c %**end of header
15452 @end group
15454 @group
15455 @@setchapternewpage odd
15456 @@titlepage
15457 @@sp 12
15458 @@center @@titlefont@{Include Example@}
15459 @@sp 2
15460 @@center by Whom Ever
15461 @end group
15463 @group
15464 @@page
15465 @@vskip 0pt plus 1filll
15466 Copyright @@copyright@{@} 1998 Free Software Foundation, Inc.
15467 @@end titlepage
15468 @end group
15470 @group
15471 @@ifinfo
15472 @@node Top, First, , (dir)
15473 @@top Master Menu
15474 @@end ifinfo
15475 @end group
15477 @group
15478 @@include foo.texinfo
15479 @@include bar.texinfo
15480 @@include concept-index.texinfo
15481 @end group
15483 @group
15484 @@summarycontents
15485 @@contents
15487 @@bye
15488 @end group
15489 @end example
15491 An included file, such as @file{foo.texinfo}, might look like
15492 this:@refill
15494 @example
15495 @group
15496 @@node First, Second, , Top
15497 @@chapter First Chapter
15499 Contents of first chapter @dots{}
15500 @end group
15501 @end example
15503 The full contents of @file{concept-index.texinfo} might be as simple as this:
15505 @example
15506 @group
15507 @@node Concept Index, , Second, Top
15508 @@unnumbered Concept Index
15510 @@printindex cp
15511 @end group
15512 @end example
15514 The outer Texinfo source file for @cite{The GNU Emacs Lisp Reference
15515 Manual} is named @file{elisp.texi}.  This outer file contains a master
15516 menu with 417 entries and a list of 41 @code{@@include}
15517 files.@refill
15519 @node Include Files Evolution,  , Sample Include File, Include Files
15520 @comment  node-name,  next,  previous,  up
15521 @appendixsec Evolution of Include Files
15523 When Info was first created, it was customary to create many small
15524 Info files on one subject.  Each Info file was formatted from its own
15525 Texinfo source file.  This custom meant that Emacs did not need to
15526 make a large buffer to hold the whole of a large Info file when
15527 someone wanted information; instead, Emacs allocated just enough
15528 memory for the small Info file that contained the particular
15529 information sought.  This way, Emacs could avoid wasting memory.@refill
15531 References from one file to another were made by referring to the file
15532 name as well as the node name. (@xref{Other Info Files, , Referring to
15533 Other Info Files}.  Also, see @ref{Four and Five Arguments, ,
15534 @code{@@xref} with Four and Five Arguments}.)@refill
15536 Include files were designed primarily as a way to create a single,
15537 large printed manual out of several smaller Info files.  In a printed
15538 manual, all the references were within the same document, so @TeX{}
15539 could automatically determine the references' page numbers.  The Info
15540 formatting commands used include files only for creating joint
15541 indices; each of the individual Texinfo files had to be formatted for
15542 Info individually.  (Each, therefore, required its own
15543 @code{@@setfilename} line.)@refill
15545 However, because large Info files are now split automatically, it is
15546 no longer necessary to keep them small.@refill
15548 Nowadays, multiple Texinfo files are used mostly for large documents,
15549 such as @cite{The GNU Emacs Lisp Reference Manual}, and for projects
15550 in which several different people write different sections of a
15551 document simultaneously.@refill
15553 In addition, the Info formatting commands have been extended to work
15554 with the @code{@@include} command so as to create a single large Info
15555 file that is split into smaller files if necessary.  This means that
15556 you can write menus and cross references without naming the different
15557 Texinfo files.@refill
15560 @node Headings, Catching Mistakes, Include Files, Top
15561 @appendix Page Headings
15562 @cindex Headings
15563 @cindex Footings
15564 @cindex Page numbering
15565 @cindex Page headings
15566 @cindex Formatting headings and footings
15568 Most printed manuals contain headings along the top of every page
15569 except the title and copyright pages.  Some manuals also contain
15570 footings.  (Headings and footings have no meaning to Info, which is
15571 not paginated.)@refill
15573 @menu
15574 * Headings Introduced::         Conventions for using page headings.
15575 * Heading Format::              Standard page heading formats.
15576 * Heading Choice::              How to specify the type of page heading.
15577 * Custom Headings::             How to create your own headings and footings.
15578 @end menu
15580 @node Headings Introduced, Heading Format, Headings, Headings
15581 @ifinfo
15582 @heading Headings Introduced
15583 @end ifinfo
15585 Texinfo provides standard page heading formats for manuals that are
15586 printed on one side of each sheet of paper and for manuals that are
15587 printed on both sides of the paper.  Typically, you will use these
15588 formats, but you can specify your own format if you wish.@refill
15590 In addition, you can specify whether chapters should begin on a new
15591 page, or merely continue the same page as the previous chapter; and if
15592 chapters begin on new pages, you can specify whether they must be
15593 odd-numbered pages.@refill
15595 By convention, a book is printed on both sides of each sheet of paper.
15596 When you open a book, the right-hand page is odd-numbered, and
15597 chapters begin on right-hand pages---a preceding left-hand page is
15598 left blank if necessary.  Reports, however, are often printed on just
15599 one side of paper, and chapters begin on a fresh page immediately
15600 following the end of the preceding chapter.  In short or informal
15601 reports, chapters often do not begin on a new page at all, but are
15602 separated from the preceding text by a small amount of whitespace.@refill
15604 The @code{@@setchapternewpage} command controls whether chapters begin
15605 on new pages, and whether one of the standard heading formats is used.
15606 In addition, Texinfo has several heading and footing commands that you
15607 can use to generate your own heading and footing formats.@refill
15609 In Texinfo, headings and footings are single lines at the tops and
15610 bottoms of pages; you cannot create multiline headings or footings.
15611 Each header or footer line is divided into three parts: a left part, a
15612 middle part, and a right part.  Any part, or a whole line, may be left
15613 blank.  Text for the left part of a header or footer line is set
15614 flushleft; text for the middle part is centered; and, text for the
15615 right part is set flushright.@refill
15617 @node Heading Format, Heading Choice, Headings Introduced, Headings
15618 @comment  node-name,  next,  previous,  up
15619 @appendixsec Standard Heading Formats
15621 Texinfo provides two standard heading formats, one for manuals printed
15622 on one side of each sheet of paper, and the other for manuals printed
15623 on both sides of the paper.
15625 By default, nothing is specified for the footing of a Texinfo file,
15626 so the footing remains blank.@refill
15628 The standard format for single-sided printing consists of a header
15629 line in which the left-hand part contains the name of the chapter, the
15630 central part is blank, and the right-hand part contains the page
15631 number.@refill
15633 @need 950
15634 A single-sided page looks like this:
15636 @example
15637 @group
15638    _______________________
15639   |                       |
15640   | chapter   page number |
15641   |                       |
15642   | Start of text ...     |
15643   | ...                   |
15644   |                       |
15646 @end group
15647 @end example
15649 The standard format for two-sided printing depends on whether the page
15650 number is even or odd.  By convention, even-numbered pages are on the
15651 left- and odd-numbered pages are on the right.  (@TeX{} will adjust the
15652 widths of the left- and right-hand margins.  Usually, widths are
15653 correct, but during double-sided printing, it is wise to check that
15654 pages will bind properly---sometimes a printer will produce output in
15655 which the even-numbered pages have a larger right-hand margin than the
15656 odd-numbered pages.)@refill
15658 In the standard double-sided format, the left part of the left-hand
15659 (even-numbered) page contains the page number, the central part is
15660 blank, and the right part contains the title (specified by the
15661 @code{@@settitle} command).  The left part of the right-hand
15662 (odd-numbered) page contains the name of the chapter, the central part
15663 is blank, and the right part contains the page number.@refill
15665 @need 750
15666 Two pages, side by side as in an open book, look like this:@refill
15668 @example
15669 @group
15670    _______________________     _______________________
15671   |                       |   |                       |
15672   | page number     title |   | chapter   page number |
15673   |                       |   |                       |
15674   | Start of text ...     |   | More  text ...        |
15675   | ...                   |   | ...                   |
15676   |                       |   |                       |
15678 @end group
15679 @end example
15681 @noindent
15682 The chapter name is preceded by the word ``Chapter'', the chapter number
15683 and a colon.  This makes it easier to keep track of where you are in the
15684 manual.@refill
15686 @node Heading Choice, Custom Headings, Heading Format, Headings
15687 @comment  node-name,  next,  previous,  up
15688 @appendixsec Specifying the Type of Heading
15690 @TeX{} does not begin to generate page headings for a standard Texinfo
15691 file until it reaches the @code{@@end titlepage} command.  Thus, the
15692 title and copyright pages are not numbered.  The @code{@@end
15693 titlepage} command causes @TeX{} to begin to generate page headings
15694 according to a standard format specified by the
15695 @code{@@setchapternewpage} command that precedes the
15696 @code{@@titlepage} section.@refill
15698 @need 1000
15699 There are four possibilities:@refill
15701 @table @asis
15702 @item No @code{@@setchapternewpage} command
15703 Cause @TeX{} to specify the single-sided heading format, with chapters
15704 on new pages. This is the same as @code{@@setchapternewpage on}.@refill
15706 @item @code{@@setchapternewpage on}
15707 Specify the single-sided heading format, with chapters on new pages.@refill
15709 @item @code{@@setchapternewpage off}
15710 Cause @TeX{} to start a new chapter on the same page as the last page of
15711 the preceding chapter, after skipping some vertical whitespace.  Also
15712 cause @TeX{} to typeset for single-sided printing.  (You can override
15713 the headers format with the @code{@@headings double} command; see
15714 @ref{headings on off, , The @code{@@headings} Command}.)@refill
15716 @item @code{@@setchapternewpage odd}
15717 Specify the double-sided heading format, with chapters on new pages.@refill
15718 @end table
15720 @noindent
15721 Texinfo lacks an @code{@@setchapternewpage even} command.@refill
15723 @node Custom Headings,  , Heading Choice, Headings
15724 @comment  node-name,  next,  previous,  up
15725 @appendixsec How to Make Your Own Headings
15727 You can use the standard headings provided with Texinfo or specify
15728 your own.  By default, Texinfo has no footers, so if you specify them,
15729 the available page size for the main text will be slightly reduced.
15731 @c Following paragraph is verbose to prevent overfull hboxes.
15732 Texinfo provides six commands for specifying headings and
15733 footings.  The @code{@@everyheading} command and
15734 @code{@@everyfooting} command generate page headers and footers
15735 that are the same for both even- and odd-numbered pages.
15736 The @code{@@evenheading} command and @code{@@evenfooting}
15737 command generate headers and footers for even-numbered
15738 (left-hand) pages; and the @code{@@oddheading} command and
15739 @code{@@oddfooting} command generate headers and footers for
15740 odd-numbered (right-hand) pages.@refill
15742 Write custom heading specifications in the Texinfo file immediately
15743 after the @code{@@end titlepage} command.  Enclose your specifications
15744 between @code{@@iftex} and @code{@@end iftex} commands since the
15745 @code{texinfo-format-buffer} command may not recognize them.  Also,
15746 you must cancel the predefined heading commands with the
15747 @code{@@headings off} command before defining your own
15748 specifications.@refill
15750 @need 1000
15751 Here is how to tell @TeX{} to place the chapter name at the left, the
15752 page number in the center, and the date at the right of every header
15753 for both even- and odd-numbered pages:@refill
15755 @example
15756 @group
15757 @@iftex
15758 @@headings off
15759 @@everyheading @@thischapter @@| @@thispage @@| @@today@{@}
15760 @@end iftex
15761 @end group
15762 @end example
15764 @noindent
15765 You need to divide the left part from the central part and the central
15766 part from the right part by inserting @samp{@@|} between parts.
15767 Otherwise, the specification command will not be able to tell where
15768 the text for one part ends and the next part begins.@refill
15770 Each part can contain text or @@-commands.  The text
15771 is printed as if the part were within an ordinary paragraph in the
15772 body of the page.  The @@-commands replace
15773 themselves with the page number, date, chapter name, or
15774 whatever.@refill
15776 @need 950
15777 Here are the six heading and footing commands:@refill
15779 @findex everyheading
15780 @findex everyfooting
15781 @table @code
15782 @item @@everyheading @var{left} @@| @var{center} @@| @var{right}
15783 @itemx @@everyfooting @var{left} @@| @var{center} @@| @var{right}
15785 The `every' commands specify the format for both even- and odd-numbered
15786 pages.  These commands are for documents that are printed on one side
15787 of each sheet of paper, or for documents in which you want symmetrical
15788 headers or footers.@refill
15790 @findex evenheading
15791 @findex evenfooting
15792 @findex oddheading
15793 @findex oddfooting
15794 @item @@evenheading @var{left} @@| @var{center} @@| @var{right}
15795 @itemx @@oddheading  @var{left} @@| @var{center} @@| @var{right}
15797 @itemx @@evenfooting @var{left} @@| @var{center} @@| @var{right}
15798 @itemx @@oddfooting  @var{left} @@| @var{center} @@| @var{right}
15800 The `even' and `odd' commands specify the format for even-numbered
15801 pages and odd-numbered pages.  These commands are for books and
15802 manuals that are printed on both sides of each sheet of paper.
15803 @end table
15805 Use the @samp{@@this@dots{}} series of @@-commands to
15806 provide the names of chapters
15807 and sections and the page number.  You can use the
15808 @samp{@@this@dots{}} commands in the left, center, or right portions
15809 of headers and footers, or anywhere else in a Texinfo file so long as
15810 they are between @code{@@iftex} and @code{@@end iftex} commands.@refill
15812 @need 1000
15813 Here are the @samp{@@this@dots{}} commands:@refill
15815 @table @code
15816 @findex thispage
15817 @item @@thispage
15818 Expands to the current page number.@refill
15819 @c !!! Karl Berry says that `thissection' can fail on page breaks.
15820 @ignore
15821 @item @@thissection
15822 Expands to the name of the current section.@refill
15823 @end ignore
15825 @findex thischaptername
15826 @item @@thischaptername
15827 Expands to the name of the current chapter.@refill
15829 @findex thischapter
15830 @item @@thischapter
15831 Expands to the number and name of the current
15832 chapter, in the format `Chapter 1: Title'.@refill
15834 @findex thistitle
15835 @item @@thistitle
15836 Expands to the name of the document, as specified by the
15837 @code{@@settitle} command.@refill
15839 @findex thisfile
15840 @item @@thisfile
15841 For @code{@@include} files only: expands to the name of the current
15842 @code{@@include} file.  If the current Texinfo source file is not an
15843 @code{@@include} file, this command has no effect.  This command does
15844 @emph{not} provide the name of the current Texinfo source file unless
15845 it is an @code{@@include} file.  (@xref{Include Files}, for more
15846 information about @code{@@include} files.)@refill
15847 @end table
15849 @noindent
15850 You can also use the @code{@@today@{@}} command, which expands to the
15851 current date, in `1 Jan 1900' format.@refill
15852 @findex today
15854 Other @@-commands and text are printed in a header or footer just as
15855 if they were in the body of a page.  It is useful to incorporate text,
15856 particularly when you are writing drafts:@refill
15858 @example
15859 @group
15860 @@iftex
15861 @@headings off
15862 @@everyheading @@emph@{Draft!@} @@| @@thispage @@| @@thischapter
15863 @@everyfooting @@| @@| Version: 0.27: @@today@{@}
15864 @@end iftex
15865 @end group
15866 @end example
15868 Beware of overlong titles: they may overlap another part of the
15869 header or footer and blot it out.@refill
15872 @node Catching Mistakes, Refilling Paragraphs, Headings, Top
15873 @appendix Formatting Mistakes
15874 @cindex Structure, catching mistakes in
15875 @cindex Nodes, catching mistakes
15876 @cindex Catching mistakes
15877 @cindex Correcting mistakes
15878 @cindex Mistakes, catching
15879 @cindex Problems, catching
15880 @cindex Debugging the Texinfo structure
15882 Besides mistakes in the content of your documentation, there
15883 are two kinds of mistake you can make with Texinfo:  you can make mistakes
15884 with @@-commands, and you can make mistakes with the structure of the
15885 nodes and chapters.@refill
15887 Emacs has two tools for catching the @@-command mistakes and two for
15888 catching structuring mistakes.@refill
15890 For finding problems with @@-commands, you can run @TeX{} or a region
15891 formatting command on the region that has a problem; indeed, you can
15892 run these commands on each region as you write it.@refill
15894 For finding problems with the structure of nodes and chapters, you can use
15895 @kbd{C-c C-s} (@code{texinfo-show-structure}) and the related @code{occur}
15896 command and you can use the @kbd{M-x Info-validate} command.@refill
15898 @menu
15899 * makeinfo Preferred::          @code{makeinfo} finds errors.
15900 * Debugging with Info::         How to catch errors with Info formatting.
15901 * Debugging with TeX::          How to catch errors with @TeX{} formatting.
15902 * Using texinfo-show-structure::  How to use @code{texinfo-show-structure}.
15903 * Using occur::                 How to list all lines containing a pattern.
15904 * Running Info-Validate::       How to find badly referenced nodes.
15905 @end menu
15907 @node makeinfo Preferred, Debugging with Info, Catching Mistakes, Catching Mistakes
15908 @ifinfo
15909 @heading @code{makeinfo} Find Errors
15910 @end ifinfo
15912 The @code{makeinfo} program does an excellent job of catching errors
15913 and reporting them---far better than @code{texinfo-format-region} or
15914 @code{texinfo-format-buffer}.  In addition, the various functions for
15915 automatically creating and updating node pointers and menus remove
15916 many opportunities for human error.@refill
15918 If you can, use the updating commands to create and insert pointers
15919 and menus.  These prevent many errors.  Then use @code{makeinfo} (or
15920 its Texinfo mode manifestations, @code{makeinfo-region} and
15921 @code{makeinfo-buffer}) to format your file and check for other
15922 errors.  This is the best way to work with Texinfo.  But if you
15923 cannot use @code{makeinfo}, or your problem is very puzzling, then you
15924 may want to use the tools described in this appendix.@refill
15926 @node Debugging with Info, Debugging with TeX, makeinfo Preferred, Catching Mistakes
15927 @comment  node-name,  next,  previous,  up
15928 @appendixsec Catching Errors with Info Formatting
15929 @cindex Catching errors with Info formatting
15930 @cindex Debugging with Info formatting
15932 After you have written part of a Texinfo file, you can use the
15933 @code{texinfo-format-region} or the @code{makeinfo-region} command to
15934 see whether the region formats properly.@refill
15936 Most likely, however, you are reading this section because for some
15937 reason you cannot use the @code{makeinfo-region} command; therefore, the
15938 rest of this section presumes that you are using
15939 @code{texinfo-format-region}.@refill
15941 If you have made a mistake with an @@-command,
15942 @code{texinfo-format-region} will stop processing at or after the
15943 error and display an error message.  To see where in the buffer the
15944 error occurred, switch to the @samp{*Info Region*} buffer; the cursor
15945 will be in a position that is after the location of the error.  Also,
15946 the text will not be formatted after the place where the error
15947 occurred (or more precisely, where it was detected).@refill
15949 For example, if you accidentally end a menu with the command @code{@@end
15950 menus} with an `s' on the end, instead of with @code{@@end menu}, you
15951 will see an error message that says:@refill
15953 @example
15954 @@end menus is not handled by texinfo
15955 @end example
15957 @noindent
15958 The cursor will stop at the point in the buffer where the error
15959 occurs, or not long after it.  The buffer will look like this:@refill
15961 @example
15962 @group
15963 ---------- Buffer: *Info Region* ----------
15964 * Menu:
15966 * Using texinfo-show-structure::  How to use
15967                                   `texinfo-show-structure'
15968                                   to catch mistakes.
15969 * Running Info-Validate::         How to check for
15970                                   unreferenced nodes.
15971 @@end menus
15972 @point{}
15973 ---------- Buffer: *Info Region* ----------
15974 @end group
15975 @end example
15977 The @code{texinfo-format-region} command sometimes provides slightly
15978 odd error messages.  For example, the following cross reference fails to format:@refill
15980 @example
15981 (@@xref@{Catching Mistakes, for more info.)
15982 @end example
15984 @noindent
15985 In this case, @code{texinfo-format-region} detects the missing closing
15986 brace but displays a message that says @samp{Unbalanced parentheses}
15987 rather than @samp{Unbalanced braces}.  This is because the formatting
15988 command looks for mismatches between braces as if they were
15989 parentheses.@refill
15991 Sometimes @code{texinfo-format-region} fails to detect mistakes.  For
15992 example, in the following, the closing brace is swapped with the
15993 closing parenthesis:@refill
15995 @example
15996 (@@xref@{Catching Mistakes), for more info.@}
15997 @end example
15999 @noindent
16000 Formatting produces:
16001 @example
16002 (*Note for more info.: Catching Mistakes)
16003 @end example
16005 The only way for you to detect this error is to realize that the
16006 reference should have looked like this:@refill
16008 @example
16009 (*Note Catching Mistakes::, for more info.)
16010 @end example
16012 Incidentally, if you are reading this node in Info and type @kbd{f
16013 @key{RET}} (@code{Info-follow-reference}), you will generate an error
16014 message that says:
16016 @example
16017 No such node: "Catching Mistakes) The only way @dots{}
16018 @end example
16020 @noindent
16021 This is because Info perceives the example of the error as the first
16022 cross reference in this node and if you type a @key{RET} immediately
16023 after typing the Info @kbd{f} command, Info will attempt to go to the
16024 referenced node.  If you type @kbd{f catch @key{TAB} @key{RET}}, Info
16025 will complete the node name of the correctly written example and take
16026 you to the `Catching Mistakes' node.  (If you try this, you can return
16027 from the `Catching Mistakes' node by typing @kbd{l}
16028 (@code{Info-last}).)
16030 @c !!! section on using Elisp debugger ignored.
16031 @ignore
16032 Sometimes @code{texinfo-format-region} will stop long after the
16033 original error; this is because it does not discover the problem until
16034 then.  In this case, you will need to backtrack.@refill
16036 @c menu
16037 @c * Using the Emacs Lisp Debugger::  How to use the Emacs Lisp debugger.
16038 @c end menu
16040 @c node Using the Emacs Lisp Debugger
16041 @c appendixsubsec Using the Emacs Lisp Debugger
16042 @c index Using the Emacs Lisp debugger
16043 @c index Emacs Lisp debugger
16044 @c index Debugger, using the Emacs Lisp
16046 If an error is especially elusive, you can turn on the Emacs Lisp
16047 debugger and look at the backtrace; this tells you where in the
16048 @code{texinfo-format-region} function the problem occurred.  You can
16049 turn on the debugger with the command:@refill
16051 @example
16052 M-x set-variable @key{RET} debug-on-error @key{RET} t @key{RET}
16053 @end example
16055 @noindent
16056 and turn it off with
16058 @example
16059 M-x set-variable @key{RET} debug-on-error @key{RET} nil @key{RET}
16060 @end example
16062 Often, when you are using the debugger, it is easier to follow what is
16063 going on if you use the Emacs Lisp files that are not byte-compiled.
16064 The byte-compiled sources send octal numbers to the debugger that may
16065 look mysterious.  To use the uncompiled source files, load
16066 @file{texinfmt.el} and @file{texinfo.el} with the @kbd{M-x load-file}
16067 command.@refill
16069 The debugger will not catch an error if @code{texinfo-format-region}
16070 does not detect one.  In the example shown above,
16071 @code{texinfo-format-region} did not find the error when the whole
16072 list was formatted, but only when part of the list was formatted.
16073 When @code{texinfo-format-region} did not find an error, the debugger
16074 did not find one either. @refill
16076 However, when @code{texinfo-format-region} did report an error, it
16077 invoked the debugger.  This is the backtrace it produced:@refill
16079 @example
16080 ---------- Buffer: *Backtrace* ----------
16081 Signalling: (search-failed "[@},]")
16082   re-search-forward("[@},]")
16083   (while ...)
16084   (let ...)
16085   texinfo-format-parse-args()
16086   (let ...)
16087   texinfo-format-xref()
16088   funcall(texinfo-format-xref)
16089   (if ...)
16090   (let ...)
16091   (if ...)
16092   (while ...)
16093   texinfo-format-scan()
16094   (save-excursion ...)
16095   (let ...)
16096   texinfo-format-region(103370 103631)
16097 * call-interactively(texinfo-format-region)
16098 ---------- Buffer: *Backtrace* ----------
16099 @end example
16101 The backtrace is read from the bottom up.
16102 @code{texinfo-format-region} was called interactively; and it, in
16103 turn, called various functions, including @code{texinfo-format-scan},
16104 @code{texinfo-format-xref} and @code{texinfo-format-parse-args}.
16105 Inside the function @code{texinfo-format-parse-args}, the function
16106 @code{re-search-forward} was called; it was this function that could
16107 not find the missing right-hand brace.@refill
16109 @xref{Lisp Debug, , Debugging Emacs Lisp, emacs, The GNU Emacs
16110 Manual}, for more information.@refill
16111 @end ignore
16113 @node Debugging with TeX, Using texinfo-show-structure, Debugging with Info, Catching Mistakes
16114 @comment  node-name,  next,  previous,  up
16115 @appendixsec Catching Errors with @TeX{} Formatting
16116 @cindex Catching errors with @TeX{} formatting
16117 @cindex Debugging with @TeX{} formatting
16119 You can also catch mistakes when you format a file with @TeX{}.@refill
16121 Usually, you will want to do this after you have run
16122 @code{texinfo-format-buffer} (or, better, @code{makeinfo-buffer}) on
16123 the same file, because @code{texinfo-format-buffer} sometimes displays
16124 error messages that make more sense than @TeX{}.  (@xref{Debugging
16125 with Info}, for more information.)@refill
16127 For example, @TeX{} was run on a Texinfo file, part of which is shown
16128 here:@refill
16130 @example
16131 ---------- Buffer: texinfo.texi ----------
16132 name of the Texinfo file as an extension.  The
16133 @@samp@{??@} are `wildcards' that cause the shell to
16134 substitute all the raw index files.  (@@xref@{sorting
16135 indices, for more information about sorting
16136 indices.)@@refill
16137 ---------- Buffer: texinfo.texi ----------
16138 @end example
16140 @noindent
16141 (The cross reference lacks a closing brace.)
16142 @TeX{} produced the following output, after which it stopped:@refill
16144 @example
16145 ---------- Buffer: *tex-shell* ----------
16146 Runaway argument?
16147 @{sorting indices, for more information about sorting
16148 indices.) @@refill @@ETC.
16149 ! Paragraph ended before @@xref was complete.
16150 <to be read again>
16151                    @@par
16152 l.27
16155 ---------- Buffer: *tex-shell* ----------
16156 @end example
16158 In this case, @TeX{} produced an accurate and
16159 understandable error message:
16161 @example
16162 Paragraph ended before @@xref was complete.
16163 @end example
16165 @noindent
16166 @samp{@@par} is an internal @TeX{} command of no relevance to Texinfo.
16167 @samp{l.27} means that @TeX{} detected the problem on line 27 of the
16168 Texinfo file.  The @samp{?} is the prompt @TeX{} uses in this
16169 circumstance.@refill
16171 Unfortunately, @TeX{} is not always so helpful, and sometimes you must
16172 truly be a Sherlock Holmes to discover what went wrong.@refill
16174 In any case, if you run into a problem like this, you can do one of three
16175 things.@refill
16177 @enumerate
16178 @item
16179 You can tell @TeX{} to continue running and ignore just this error by
16180 typing @key{RET} at the @samp{?} prompt.@refill
16182 @item
16183 You can tell @TeX{} to continue running and to ignore all errors as best
16184 it can by typing @kbd{r @key{RET}} at the @samp{?} prompt.@refill
16186 This is often the best thing to do.  However, beware: the one error
16187 may produce a cascade of additional error messages as its consequences
16188 are felt through the rest of the file.  To stop @TeX{} when it is
16189 producing such an avalanche of error messages, type @kbd{C-c} (or
16190 @kbd{C-c C-c}, if you are running a shell inside Emacs).
16192 @item
16193 You can tell @TeX{} to stop this run by typing @kbd{x @key{RET}}
16194 at the @samp{?} prompt.@refill
16195 @end enumerate
16197 Please note that if you are running @TeX{} inside Emacs, you need to
16198 switch to the shell buffer and line at which @TeX{} offers the @samp{?}
16199 prompt.@refill
16201 Sometimes @TeX{} will format a file without producing error messages even
16202 though there is a problem.  This usually occurs if a command is not ended
16203 but @TeX{} is able to continue processing anyhow.  For example, if you fail
16204 to end an itemized list with the @code{@@end itemize} command, @TeX{} will
16205 write a DVI file that you can print out.  The only error message that
16206 @TeX{} will give you is the somewhat mysterious comment that@refill
16208 @example
16209 (@@end occurred inside a group at level 1)
16210 @end example
16212 @noindent
16213 However, if you print the DVI file, you will find that the text
16214 of the file that follows the itemized list is entirely indented as if
16215 it were part of the last item in the itemized list.  The error message
16216 is the way @TeX{} says that it expected to find an @code{@@end}
16217 command somewhere in the file; but that it could not determine where
16218 it was needed.@refill
16220 Another source of notoriously hard-to-find errors is a missing
16221 @code{@@end group} command.  If you ever are stumped by
16222 incomprehensible errors, look for a missing @code{@@end group} command
16223 first.@refill
16225 If the Texinfo file lacks header lines,
16226 @TeX{} may stop in the
16227 beginning of its run and display output that looks like the following.
16228 The @samp{*} indicates that @TeX{} is waiting for input.@refill
16230 @example
16231 This is TeX, Version 3.14159 (Web2c 7.0)
16232 (test.texinfo [1])
16234 @end example
16236 @noindent
16237 In this case, simply type @kbd{\end @key{RET}} after the asterisk.  Then
16238 write the header lines in the Texinfo file and run the @TeX{} command
16239 again. (Note the use of the backslash, @samp{\}.  @TeX{} uses @samp{\}
16240 instead of @samp{@@}; and in this circumstance, you are working
16241 directly with @TeX{}, not with Texinfo.)@refill
16243 @node Using texinfo-show-structure, Using occur, Debugging with TeX, Catching Mistakes
16244 @comment  node-name,  next,  previous,  up
16245 @appendixsec Using @code{texinfo-show-structure}
16246 @cindex Showing the structure of a file
16247 @findex texinfo-show-structure
16249 It is not always easy to keep track of the nodes, chapters, sections, and
16250 subsections of a Texinfo file.  This is especially true if you are revising
16251 or adding to a Texinfo file that someone else has written.@refill
16253 In GNU Emacs, in Texinfo mode, the @code{texinfo-show-structure}
16254 command lists all the lines that begin with the @@-commands that
16255 specify the structure: @code{@@chapter}, @code{@@section},
16256 @code{@@appendix}, and so on.  With an argument (@w{@kbd{C-u}}
16257 as prefix argument, if interactive),
16258 the command also shows the @code{@@node} lines.  The
16259 @code{texinfo-show-structure} command is bound to @kbd{C-c C-s} in
16260 Texinfo mode, by default.@refill
16262 The lines are displayed in a buffer called the @samp{*Occur*} buffer,
16263 indented by hierarchical level.  For example, here is a part of what was
16264 produced by running @code{texinfo-show-structure} on this manual:@refill
16266 @example
16267 @group
16268  Lines matching "^@@\\(chapter \\|sect\\|subs\\|subh\\|
16269  unnum\\|major\\|chapheading \\|heading \\|appendix\\)"
16270  in buffer texinfo.texi.
16271  @dots{}
16272  4177:@@chapter Nodes
16273  4198:    @@heading Two Paths
16274  4231:    @@section Node and Menu Illustration
16275  4337:    @@section The @@code@{@@@@node@} Command
16276  4393:        @@subheading Choosing Node and Pointer Names
16277  4417:        @@subsection How to Write an @@code@{@@@@node@} Line
16278  4469:        @@subsection @@code@{@@@@node@} Line Tips
16279  @dots{}
16280 @end group
16281 @end example
16283 This says that lines 4337, 4393, and 4417 of @file{texinfo.texi} begin
16284 with the @code{@@section}, @code{@@subheading}, and @code{@@subsection}
16285 commands respectively.  If you move your cursor into the @samp{*Occur*}
16286 window, you can position the cursor over one of the lines and use the
16287 @kbd{C-c C-c} command (@code{occur-mode-goto-occurrence}), to jump to
16288 the corresponding spot in the Texinfo file.  @xref{Other Repeating
16289 Search, , Using Occur, emacs, The GNU Emacs Manual}, for more
16290 information about @code{occur-mode-goto-occurrence}.@refill
16292 The first line in the @samp{*Occur*} window describes the @dfn{regular
16293 expression} specified by @var{texinfo-heading-pattern}.  This regular
16294 expression is the pattern that @code{texinfo-show-structure} looks for.
16295 @xref{Regexps, , Using Regular Expressions, emacs, The GNU Emacs Manual},
16296 for more information.@refill
16298 When you invoke the @code{texinfo-show-structure} command, Emacs will
16299 display the structure of the whole buffer.  If you want to see the
16300 structure of just a part of the buffer, of one chapter, for example,
16301 use the @kbd{C-x n n} (@code{narrow-to-region}) command to mark the
16302 region.  (@xref{Narrowing, , , emacs, The GNU Emacs Manual}.)  This is
16303 how the example used above was generated.  (To see the whole buffer
16304 again, use @kbd{C-x n w} (@code{widen}).)@refill
16306 If you call @code{texinfo-show-structure} with a prefix argument by
16307 typing @w{@kbd{C-u C-c C-s}}, it will list lines beginning with
16308 @code{@@node} as well as the lines beginning with the @@-sign commands
16309 for @code{@@chapter}, @code{@@section}, and the like.@refill
16311 You can remind yourself of the structure of a Texinfo file by looking at
16312 the list in the @samp{*Occur*} window; and if you have mis-named a node
16313 or left out a section, you can correct the mistake.@refill
16315 @node Using occur, Running Info-Validate, Using texinfo-show-structure, Catching Mistakes
16316 @comment  node-name,  next,  previous,  up
16317 @appendixsec Using @code{occur}
16318 @cindex Occurrences, listing with @code{@@occur}
16319 @findex occur
16321 Sometimes the @code{texinfo-show-structure} command produces too much
16322 information.  Perhaps you want to remind yourself of the overall structure
16323 of a Texinfo file, and are overwhelmed by the detailed list produced by
16324 @code{texinfo-show-structure}.  In this case, you can use the @code{occur}
16325 command directly.  To do this, type@refill
16327 @example
16328 @kbd{M-x occur}
16329 @end example
16331 @noindent
16332 and then, when prompted, type a @dfn{regexp}, a regular expression for
16333 the pattern you want to match.  (@xref{Regexps, , Regular Expressions,
16334 emacs, The GNU Emacs Manual}.)  The @code{occur} command works from
16335 the current location of the cursor in the buffer to the end of the
16336 buffer.  If you want to run @code{occur} on the whole buffer, place
16337 the cursor at the beginning of the buffer.@refill
16339 For example, to see all the lines that contain the word
16340 @samp{@@chapter} in them, just type @samp{@@chapter}.  This will
16341 produce a list of the chapters.  It will also list all the sentences
16342 with @samp{@@chapter} in the middle of the line.@refill
16344 If you want to see only those lines that start with the word
16345 @samp{@@chapter}, type @samp{^@@chapter} when prompted by
16346 @code{occur}.  If you want to see all the lines that end with a word
16347 or phrase, end the last word with a @samp{$}; for example,
16348 @samp{catching mistakes$}.  This can be helpful when you want to see
16349 all the nodes that are part of the same chapter or section and
16350 therefore have the same `Up' pointer.@refill
16352 @xref{Other Repeating Search, , Using Occur, emacs , The GNU Emacs Manual},
16353 for more information.@refill
16355 @node Running Info-Validate,  , Using occur, Catching Mistakes
16356 @comment  node-name,  next,  previous,  up
16357 @appendixsec Finding Badly Referenced Nodes
16358 @findex Info-validate
16359 @cindex Nodes, checking for badly referenced
16360 @cindex Checking for badly referenced nodes
16361 @cindex Looking for badly referenced nodes
16362 @cindex Finding badly referenced nodes
16363 @cindex Badly referenced nodes
16365 You can use the @code{Info-validate} command to check whether any of
16366 the `Next', `Previous', `Up' or other node pointers fail to point to a
16367 node.  This command checks that every node pointer points to an
16368 existing node.  The @code{Info-validate} command works only on Info
16369 files, not on Texinfo files.@refill
16371 The @code{makeinfo} program validates pointers automatically, so you
16372 do not need to use the @code{Info-validate} command if you are using
16373 @code{makeinfo}.  You only may need to use @code{Info-validate} if you
16374 are unable to run @code{makeinfo} and instead must create an Info file
16375 using @code{texinfo-format-region} or @code{texinfo-format-buffer}, or
16376 if you write an Info file from scratch.@refill
16378 @menu
16379 * Using Info-validate::         How to run @code{Info-validate}.
16380 * Unsplit::                     How to create an unsplit file.
16381 * Tagifying::                   How to tagify a file.
16382 * Splitting::                   How to split a file manually.
16383 @end menu
16385 @node Using Info-validate, Unsplit, Running Info-Validate, Running Info-Validate
16386 @appendixsubsec Running @code{Info-validate}
16387 @cindex Running @code{Info-validate}
16388 @cindex Info validating a large file
16389 @cindex Validating a large file
16391 To use @code{Info-validate}, visit the Info file you wish to check and
16392 type:@refill
16394 @example
16395 M-x Info-validate
16396 @end example
16398 @noindent
16399 (Note that the @code{Info-validate} command requires an upper case
16400 `I'.  You may also need to create a tag table before running
16401 @code{Info-validate}.  @xref{Tagifying}.)@refill
16403 If your file is valid, you will receive a message that says ``File appears
16404 valid''.  However, if you have a pointer that does not point to a node,
16405 error messages will be displayed in a buffer called @samp{*problems in
16406 info file*}.@refill
16408 For example, @code{Info-validate} was run on a test file that contained
16409 only the first node of this manual.  One of the messages said:@refill
16411 @example
16412 In node "Overview", invalid Next: Texinfo Mode
16413 @end example
16415 @noindent
16416 This meant that the node called @samp{Overview} had a `Next' pointer that
16417 did not point to anything (which was true in this case, since the test file
16418 had only one node in it).@refill
16420 Now suppose we add a node named @samp{Texinfo Mode} to our test case
16421 but we do not specify a `Previous' for this node.  Then we will get
16422 the following error message:@refill
16424 @example
16425 In node "Texinfo Mode", should have Previous: Overview
16426 @end example
16428 @noindent
16429 This is because every `Next' pointer should be matched by a
16430 `Previous' (in the node where the `Next' points) which points back.@refill
16432 @code{Info-validate} also checks that all menu entries and cross references
16433 point to actual nodes.@refill
16435 Note that @code{Info-validate} requires a tag table and does not work
16436 with files that have been split.  (The @code{texinfo-format-buffer}
16437 command automatically splits large files.)  In order to use
16438 @code{Info-validate} on a large file, you must run
16439 @code{texinfo-format-buffer} with an argument so that it does not split
16440 the Info file; and you must create a tag table for the unsplit
16441 file.@refill
16443 @node Unsplit, Tagifying, Using Info-validate, Running Info-Validate
16444 @comment  node-name,  next,  previous,  up
16445 @appendixsubsec Creating an Unsplit File
16446 @cindex Creating an unsplit file
16447 @cindex Unsplit file creation
16449 You can run @code{Info-validate} only on a single Info file that has a
16450 tag table.  The command will not work on the indirect subfiles that
16451 are generated when a master file is split.  If you have a large file
16452 (longer than 70,000 bytes or so), you need to run the
16453 @code{texinfo-format-buffer} or @code{makeinfo-buffer} command in such
16454 a way that it does not create indirect subfiles.  You will also need
16455 to create a tag table for the Info file.  After you have done this,
16456 you can run @code{Info-validate} and look for badly referenced
16457 nodes.@refill
16459 The first step is to create an unsplit Info file.  To prevent
16460 @code{texinfo-format-buffer} from splitting a Texinfo file into
16461 smaller Info files, give a prefix to the @kbd{M-x
16462 texinfo-format-buffer} command:@refill
16464 @example
16465 C-u M-x texinfo-format-buffer
16466 @end example
16468 @noindent
16469 or else
16471 @example
16472 C-u C-c C-e C-b
16473 @end example
16475 @noindent
16476 When you do this, Texinfo will not split the file and will not create
16477 a tag table for it. @refill
16478 @cindex Making a tag table manually
16479 @cindex Tag table, making manually
16481 @node Tagifying, Splitting, Unsplit, Running Info-Validate
16482 @appendixsubsec Tagifying a File
16484 After creating an unsplit Info file, you must create a tag table for
16485 it.  Visit the Info file you wish to tagify and type:@refill
16487 @example
16488 M-x Info-tagify
16489 @end example
16491 @noindent
16492 (Note the upper case @samp{I} in @code{Info-tagify}.)  This creates an
16493 Info file with a tag table that you can validate.@refill
16495 The third step is to validate the Info file:@refill
16497 @example
16498 M-x Info-validate
16499 @end example
16501 @noindent
16502 (Note the upper case @samp{I} in @code{Info-validate}.)
16503 In brief, the steps are:@refill
16505 @example
16506 @group
16507 C-u M-x texinfo-format-buffer
16508 M-x Info-tagify
16509 M-x Info-validate
16510 @end group
16511 @end example
16513 After you have validated the node structure, you can rerun
16514 @code{texinfo-format-buffer} in the normal way so it will construct a
16515 tag table and split the file automatically, or you can make the tag
16516 table and split the file manually.@refill
16518 @node Splitting,  , Tagifying, Running Info-Validate
16519 @comment  node-name,  next,  previous,  up
16520 @appendixsubsec Splitting a File Manually
16521 @cindex Splitting an Info file manually
16522 @cindex Info file, splitting manually
16524 You should split a large file or else let the
16525 @code{texinfo-format-buffer} or @code{makeinfo-buffer} command do it
16526 for you automatically.  (Generally you will let one of the formatting
16527 commands do this job for you.  @xref{Create an Info File}.)@refill
16529 The split-off files are called the indirect subfiles.@refill
16531 Info files are split to save memory.  With smaller files, Emacs does not
16532 have make such a large buffer to hold the information.@refill
16534 If an Info file has more than 30 nodes, you should also make a tag
16535 table for it. @xref{Using Info-validate}, for information
16536 about creating a tag table.  (Again, tag tables are usually created
16537 automatically by the formatting command; you only need to create a tag
16538 table yourself if you are doing the job manually.  Most likely, you
16539 will do this for a large, unsplit file on which you have run
16540 @code{Info-validate}.)@refill
16542 @c Info-split is autoloaded in `loaddefs.el' in Emacs 18.51
16543 @ignore
16544 Before running @code{Info-split}, you need to load the @code{info} library
16545 into Emacs by giving the command @kbd{M-x load-library @key{RET} info
16546 @key{RET}}.
16547 @end ignore
16549 Visit the Info file you wish to tagify and split and type the two
16550 commands:@refill
16552 @example
16553 M-x Info-tagify
16554 M-x Info-split
16555 @end example
16557 @noindent
16558 (Note that the @samp{I} in @samp{Info} is upper case.)@refill
16560 When you use the @code{Info-split} command, the buffer is modified into a
16561 (small) Info file which lists the indirect subfiles.  This file should be
16562 saved in place of the original visited file.  The indirect subfiles are
16563 written in the same directory the original file is in, with names generated
16564 by appending @samp{-} and a number to the original file name.@refill
16566 The primary file still functions as an Info file, but it contains just
16567 the tag table and a directory of subfiles.@refill
16570 @node Refilling Paragraphs, Command Syntax, Catching Mistakes, Top
16571 @appendix Refilling Paragraphs
16572 @cindex Refilling paragraphs
16573 @cindex Filling paragraphs
16574 @findex refill
16576 The @code{@@refill} command refills and, optionally, indents the first
16577 line of a paragraph.@footnote{Perhaps the command should have been
16578 called the @code{@@refillandindent} command, but @code{@@refill} is
16579 shorter and the name was chosen before indenting was possible.} The
16580 @code{@@refill} command is no longer important, but we describe it here
16581 because you once needed it.  You will see it in many old Texinfo
16582 files.@refill
16584 Without refilling, paragraphs containing long @@-constructs may look
16585 bad after formatting because the formatter removes @@-commands and
16586 shortens some lines more than others.  In the past, neither the
16587 @code{texinfo-format-region} command nor the
16588 @code{texinfo-format-buffer} command refilled paragraphs
16589 automatically.  The @code{@@refill} command had to be written at the
16590 end of every paragraph to cause these formatters to fill them.  (Both
16591 @TeX{} and @code{makeinfo} have always refilled paragraphs
16592 automatically.)  Now, all the Info formatters automatically fill and
16593 indent those paragraphs that need to be filled and indented.@refill
16595 The @code{@@refill} command causes @code{texinfo-format-region} and
16596 @code{texinfo-format-buffer} to refill a paragraph in the Info file
16597 @emph{after} all the other processing has been done.  For this reason,
16598 you can not use @code{@@refill} with a paragraph containing either
16599 @code{@@*} or @code{@@w@{ @dots{} @}} since the refilling action will
16600 override those two commands.@refill
16602 The @code{texinfo-format-region} and @code{texinfo-format-buffer}
16603 commands now automatically append @code{@@refill} to the end of each
16604 paragraph that should be filled.  They do not append @code{@@refill} to
16605 the ends of paragraphs that contain @code{@@*} or @w{@code{@@w@{ @dots{}@}}}
16606 and therefore do not refill or indent them.@refill
16609 @node Command Syntax, Obtaining TeX, Refilling Paragraphs, Top
16610 @comment node-name,  next,  previous,  up
16611 @appendix @@-Command Syntax
16612 @cindex @@-command syntax
16614 The character @samp{@@} is used to start special Texinfo commands.
16615 (It has the same meaning that @samp{\} has in plain @TeX{}.)  Texinfo
16616 has four types of @@-command:@refill
16618 @table @asis
16619 @item 1. Non-alphabetic commands.
16620 These commands consist of an @@ followed by a punctuation mark or other
16621 character that is not part of the alphabet.  Non-alphabetic commands are
16622 almost always part of the text within a paragraph, and never take any
16623 argument.  The two characters (@@ and the other one) are complete in
16624 themselves; none is followed by braces.  The non-alphabetic commands
16625 are: @code{@@.}, @code{@@:}, @code{@@*}, @code{@@@kbd{SPACE}},
16626 @code{@@@kbd{TAB}}, @code{@@@kbd{NL}}, @code{@@@@}, @code{@@@{}, and
16627 @code{@@@}}.@refill
16629 @item 2. Alphabetic commands that do not require arguments.
16630 These commands start with @@ followed by a word followed by left- and
16631 right-hand braces.  These commands insert special symbols in the
16632 document; they do not require arguments.  For example,
16633 @code{@@dots@{@}} @result{} @samp{@dots{}}, @code{@@equiv@{@}}
16634 @result{} @samp{@equiv{}}, @code{@@TeX@{@}} @result{} `@TeX{}',
16635 and @code{@@bullet@{@}} @result{} @samp{@bullet{}}.@refill
16637 @item 3. Alphabetic commands that require arguments within braces.
16638 These commands start with @@ followed by a letter or a word, followed by an
16639 argument within braces.  For example, the command @code{@@dfn} indicates
16640 the introductory or defining use of a term; it is used as follows: @samp{In
16641 Texinfo, @@@@-commands are @@dfn@{mark-up@} commands.}@refill
16643 @item 4. Alphabetic commands that occupy an entire line.
16644 These commands occupy an entire line.  The line starts with @@,
16645 followed by the name of the command (a word); for example, @code{@@center}
16646 or @code{@@cindex}.  If no argument is needed, the word is followed by
16647 the end of the line.  If there is an argument, it is separated from
16648 the command name by a space.  Braces are not used.@refill
16649 @end table
16651 @cindex Braces and argument syntax
16652 Thus, the alphabetic commands fall into classes that have
16653 different argument syntaxes.  You cannot tell to which class a command
16654 belongs by the appearance of its name, but you can tell by the
16655 command's meaning: if the command stands for a glyph, it is in
16656 class 2 and does not require an argument; if it makes sense to use the
16657 command together with other text as part of a paragraph, the command
16658 is in class 3 and must be followed by an argument in braces;
16659 otherwise, it is in class 4 and uses the rest of the line as its
16660 argument.@refill
16662 The purpose of having a different syntax for commands of classes 3 and
16663 4 is to make Texinfo files easier to read, and also to help the GNU
16664 Emacs paragraph and filling commands work properly.  There is only one
16665 exception to this rule: the command @code{@@refill}, which is always
16666 used at the end of a paragraph immediately following the final period
16667 or other punctuation character.  @code{@@refill} takes no argument and
16668 does @emph{not} require braces.  @code{@@refill} never confuses the
16669 Emacs paragraph commands because it cannot appear at the beginning of
16670 a line.@refill
16673 @node Obtaining TeX, Command and Variable Index, Command Syntax, Top
16674 @appendix How to Obtain @TeX{}
16675 @cindex Obtaining @TeX{}
16676 @cindex @TeX{}, how to obtain
16678 @c !!! Here is information about obtaining TeX.  Update it whenever.
16679 @c !!! Also consider updating TeX.README on ftp.gnu.org.
16680 @c     Updated by RJC on 1 March 1995, conversation with MacKay.
16681 @c     Updated by kb@cs.umb.edu on 29 July 1996.
16682 @c     Updated by kb@cs.umb.edu on 25 April 1997.
16683 @c     Updated by kb@cs.umb.edu on 27 February 1998.
16684 @TeX{} is freely redistributable.  You can obtain @TeX{} for Unix
16685 systems via anonymous ftp or on physical media.  The core material
16686 consists of the Web2c @TeX{} distribution (@uref{http://tug.org/web2c}).
16688 Instructions for retrieval by anonymous ftp and information on other
16689 available distributions:
16690 @example
16691 @uref{ftp://tug.org/tex/unixtex.ftp}
16692 @uref{http://tug.org/unixtex.ftp}
16693 @end example
16695 The Free Software Foundation provides a core distribution on its Source
16696 Code CD-ROM suitable for printing Texinfo manuals; the University of
16697 Washington maintains and supports a tape distribution; the @TeX{} Users
16698 Group co-sponsors a complete CD-ROM @TeX{} distribution.
16700 @itemize @bullet
16702 @item
16703 For the FSF Source Code CD-ROM, please contact:
16705 @iftex
16706 @display
16707 @group
16708 Free Software Foundation, Inc.
16709 59 Temple Place Suite 330
16710 Boston, MA @ @ 02111-1307
16712 Telephone: @w{+1-617-542-5942}
16713 Fax: (including Japan) @w{+1-617-542-2652}
16714 Free Dial Fax (in Japan):
16715 @w{ } @w{ } @w{ } 0031-13-2473 (KDD)
16716 @w{ } @w{ } @w{ } 0066-3382-0158 (IDC)
16717 Electronic mail: @code{gnu@@gnu.org}
16718 @end group
16719 @end display
16720 @end iftex
16721 @ifinfo
16722 @display
16723 @group
16724 Free Software Foundation, Inc.
16725 59 Temple Place Suite 330
16726 Boston, MA @w{ } 02111-1307
16729 Telephone: @w{+1-617-542-5942}
16730 Fax: (including Japan) @w{+1-617-542-2652}
16731 Free Dial Fax (in Japan):
16732 @w{ } @w{ } @w{ } 0031-13-2473 (KDD)
16733 @w{ } @w{ } @w{ } 0066-3382-0158 (IDC)
16734 Electronic mail: @code{gnu@@gnu.org}
16735 @end group
16736 @end display
16737 @end ifinfo
16739 @item
16740 To order a complete distribution on CD-ROM, please see
16741 @uref{http://tug.org/tex-live.html}.  (This distribution is also
16742 available by FTP; see the URL's above.)
16744 @item
16745 To order a full distribution from the University of Washington on either
16746 a 1/4@dmn{in} 4-track QIC-24 cartridge or a 4@dmn{mm} DAT cartridge,
16747 send $210 to:
16749 @display
16750 @group
16751 Pierre A. MacKay
16752 Denny Hall, Mail Stop DH-10
16753 University of Washington
16754 Seattle, WA @w{ } 98195
16756 Telephone: +1-206-543-2268
16757 Electronic mail: @code{mackay@@cs.washington.edu}
16758 @end group
16759 @end display
16761 @noindent Please make checks payable to the University of Washington.
16762 Checks must be in U.S.@: dollars, drawn on a U.S.@: bank.  Overseas
16763 sites: please add to the base cost, if desired, $20.00 for shipment via
16764 air parcel post, or $30.00 for shipment via courier.
16766 @end itemize
16768 Many other @TeX{} distributions are available; see
16769 @uref{http://tug.org/}.
16772 @c These are no longer ``new'', and the explanations
16773 @c are all given elsewhere anyway, I think.  --karl, 25apr97.
16774 @ignore (the entire appendix)
16775 @c node New Features, Command and Variable Index, Obtaining TeX, Top
16776 @c appendix Second Edition Features
16778 @tex
16779 % Widen the space for the first column so three control-character
16780 % strings fit in the first column.  Switched back to default .8in
16781 % value at end of chapter.
16782 \global\tableindent=1.0in
16783 @end tex
16785 The second edition of the Texinfo manual describes more than 20 new
16786 Texinfo mode commands and more than 50 previously undocumented Texinfo
16787 @@-commands.  This edition is more than twice the length of the first
16788 edition.@refill
16790 Here is a brief description of the new commands.@refill
16792 @menu
16793 * New Texinfo Mode Commands::   The updating commands are especially useful.
16794 * New Commands::                Many newly described @@-commands.
16795 @end menu
16797 @c node New Texinfo Mode Commands, New Commands, Obtaining TeX, Obtaining TeX
16798 @c appendixsec New Texinfo Mode Commands
16800 Texinfo mode provides commands and features especially designed for
16801 working with Texinfo files.  More than 20 new commands have been
16802 added, including commands for automatically creating and updating
16803 both nodes and menus.  This is a tedious task when done by hand.@refill
16805 The keybindings are intended to be somewhat mnemonic.@refill
16807 @c subheading Update all nodes and menus
16809 The @code{texinfo-master-menu} command is the primary command:
16811 @table @kbd
16812 @item C-c C-u m
16813 @itemx M-x texinfo-master-menu
16814 Create or update a master menu.
16815 With @kbd{C-u} as a prefix argument,
16816 first create or update all nodes
16817 and regular menus.
16818 @end table
16820 @c subheading Update Pointers
16822 @noindent
16823 Create or update `Next', `Previous', and `Up' node pointers.@refill
16825 @noindent
16826 @xref{Updating Nodes and Menus}.
16828 @table @kbd
16829 @item C-c C-u C-n
16830 @itemx M-x texinfo-update-node
16831 Update a node.
16833 @item C-c C-u C-e
16834 @itemx M-x texinfo-every-node-update
16835 Update every node in the buffer.
16836 @end table
16838 @c subheading Update Menus
16840 @noindent
16841 Create or update menus.@refill
16843 @noindent
16844 @xref{Updating Nodes and Menus}.
16846 @table @kbd
16847 @item C-c C-u C-m
16848 @itemx M-x texinfo-make-menu
16849 Make or update a menu.
16851 @item C-c C-u C-a
16852 @itemx M-x texinfo-all-menus-update
16853 Make or update all the menus in a buffer.
16854 With @kbd{C-u} as a prefix argument,
16855 first update all the nodes.
16856 @end table
16858 @c subheading Insert Title as Description
16860 @noindent
16861 Insert a node's chapter or section title in the space for the
16862 description in a menu entry line; position point so you can edit the
16863 insert.  (This command works somewhat differently than the other
16864 insertion commands, which insert only a predefined string.)@refill
16866 @noindent
16867 @xref{Inserting, Inserting Frequently Used Commands}.
16869 @table @kbd
16870 @item C-c C-c C-d
16871 Insert title.
16872 @end table
16874 @c subheading Format for Info
16876 @noindent
16877 Provide keybindings both for the Info formatting commands that are
16878 written in Emacs Lisp and for @code{makeinfo} that is written in
16879 C.@refill
16881 @noindent
16882 @xref{Info Formatting}.
16884 @noindent
16885 Use the Emacs lisp @code{texinfo-format@dots{}} commands:
16887 @table @kbd
16888 @item C-c C-e C-r
16889 Format the region.
16891 @item C-c C-e C-b
16892 Format the buffer.
16893 @end table
16895 @noindent
16896 Use @code{makeinfo}:
16898 @table @kbd
16899 @item C-c C-m C-r
16900 Format the region.
16902 @item C-c C-m C-b
16903 Format the buffer.
16905 @item C-c C-m C-l
16906 Recenter the @code{makeinfo} output buffer.
16908 @item C-c C-m C-k
16909 Kill the @code{makeinfo} formatting job.
16910 @end table
16912 @c subheading Typeset and Print
16914 @noindent
16915 Typeset and print Texinfo documents from within Emacs.@refill
16917 @ifinfo
16918 @noindent
16919 @xref{Printing}.
16920 @end ifinfo
16921 @iftex
16922 @noindent
16923 @xref{Printing, , Formatting and Printing}.
16924 @end iftex
16926 @table @kbd
16927 @item C-c C-t C-b
16928 Run @code{texi2dvi} on the buffer.
16930 @item C-c C-t C-r
16931 Run @TeX{} on the region.
16933 @item C-c C-t C-i
16934 Run @code{texindex}.
16936 @item C-c C-t C-p
16937 Print the DVI file.
16939 @item C-c C-t C-q
16940 Show the print queue.
16942 @item C-c C-t C-d
16943 Delete a job from the print queue.
16945 @item C-c C-t C-k
16946 Kill the current @TeX{} formatting job.
16948 @item C-c C-t C-x
16949 Quit a currently stopped @TeX{} formatting job.
16951 @item C-c C-t C-l
16952 Recenter the output buffer.
16953 @end table
16955 @c subheading Other Updating Commands
16957 @noindent
16958 The ``other updating commands'' do not have standard keybindings because
16959 they are used less frequently.@refill
16961 @noindent
16962 @xref{Other Updating Commands}.
16964 @table @kbd
16965 @item M-x texinfo-insert-node-lines
16966 Insert missing @code{@@node} lines using
16967 section titles as node names.
16969 @item M-x texinfo-multiple-files-update
16970 Update a multi-file document.
16971 With a numeric prefix, such as @kbd{C-u 8},
16972 update  @strong{every} pointer and
16973 menu in @strong{all} the files and
16974 then insert a master menu.
16976 @item M-x texinfo-indent-menu-description
16977 Indent descriptions in menus.
16979 @item M-x texinfo-sequential-node-update
16980 Insert node pointers in strict sequence.
16981 @end table
16983 @c node New Commands,  , New Texinfo Mode Commands, Obtaining TeX
16984 @c appendixsec New Texinfo @@-Commands
16986 The second edition of the Texinfo manual describes more than 50
16987 commands that were not described in the first edition.  A third or so
16988 of these commands existed in Texinfo but were not documented in the
16989 manual; the others are new.  Here is a listing, with brief
16990 descriptions of them:@refill
16992 @c subheading Indexing
16994 @noindent
16995 Create your own index, and merge indices.@refill
16997 @noindent
16998 @xref{Indices}.
17000 @table @kbd
17001 @item @@defindex @var{index-name}
17002 Define a new index and its indexing command.
17003 See also the @code{@@defcodeindex} command.
17005 @c written verbosely to avoid overfull hbox
17006 @item @@synindex @var{from-index} @var{into-index}
17007 Merge the @var{from-index} index into the @var{into-index} index.
17008 See also the @code{@@syncodeindex} command.
17009 @end table
17011 @c subheading Definitions
17013 @noindent
17014 Describe functions, variables, macros,
17015 commands, user options, special forms, and other such artifacts in a
17016 uniform format.@refill
17018 @noindent
17019 @xref{Definition Commands}.
17021 @table @kbd
17022 @item @@deffn @var{category} @var{name} @var{arguments}@dots{}
17023 Format a description for functions, interactive
17024 commands, and similar entities.
17026 @item @@defvr, @@defop, @dots{}
17027 15 other related commands.
17028 @end table
17030 @c subheading Glyphs
17032 @noindent
17033 Indicate the results of evaluation, expansion,
17034 printed output, an error message, equivalence of expressions, and the
17035 location of point.@refill
17037 @noindent
17038 @xref{Glyphs}.
17040 @table @kbd
17041 @item @@equiv@{@}
17042 @itemx @equiv{}
17043 Equivalence:
17045 @item @@error@{@}
17046 @itemx @error{}
17047 Error message
17049 @item @@expansion@{@}
17050 @itemx @expansion{}
17051 Macro expansion
17053 @item @@point@{@}
17054 @itemx @point{}
17055 Position of point
17057 @item @@print@{@}
17058 @itemx @print{}
17059 Printed output
17061 @item @@result@{@}
17062 @itemx @result{}
17063 Result of an expression
17064 @end table
17066 @c subheading Page Headings
17068 @noindent
17069 Customize page headings.
17071 @noindent
17072 @xref{Headings}.
17074 @table @kbd
17075 @item @@headings @var{on-off-single-double}
17076 Headings on or off, single, or double-sided.
17078 @item @@evenfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
17079 Footings for even-numbered (left-hand) pages.
17081 @item @@evenheading, @@everyheading, @@oddheading, @dots{}
17082 Five other related commands.
17084 @item @@thischapter
17085 Insert name of chapter and chapter number.
17087 @item @@thischaptername, @@thisfile, @@thistitle, @@thispage
17088 Related commands.
17089 @end table
17091 @c subheading Formatting
17093 @noindent
17094 Format blocks of text.
17096 @noindent
17097 @xref{Quotations and Examples}, and@*
17098 @ref{Lists and Tables, , Making Lists and Tables}.
17100 @table @kbd
17101 @item @@cartouche
17102 Draw rounded box surrounding text (not in Info).
17104 @item @@enumerate @var{optional-arg}
17105 Enumerate a list with letters or numbers.
17107 @item @@exdent @var{line-of-text}
17108 Remove indentation.
17110 @item @@flushleft
17111 Left justify.
17113 @item @@flushright
17114 Right justify.
17116 @item @@format
17117 Do not narrow nor change font.
17119 @item @@ftable @var{formatting-command}
17120 @itemx @@vtable @var{formatting-command}
17121 Two-column table with indexing.
17123 @item @@lisp
17124 For an example of Lisp code.
17126 @item @@smallexample
17127 @itemx @@smalllisp
17128 Like @@table and @@lisp @r{but for} @@smallbook.
17129 @end table
17131 @c subheading Conditionals
17133 @noindent
17134 Conditionally format text.
17136 @noindent
17137 @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.@refill
17139 @table @kbd
17140 @item @@set @var{flag} [@var{string}]
17141 Set a flag.  Optionally, set value
17142 of @var{flag} to @var{string}.
17144 @item @@clear @var{flag}
17145 Clear a flag.
17147 @item @@value@{@var{flag}@}
17148 Replace with value to which @var{flag} is set.
17150 @item @@ifset @var{flag}
17151 Format, if @var{flag} is set.
17153 @item @@ifclear @var{flag}
17154 Ignore, if @var{flag} is set.
17155 @end table
17157 @c subheading @@heading series for Titles
17159 @noindent
17160 Produce unnumbered headings that do not appear in a table of contents.
17162 @noindent
17163 @xref{Structuring}.
17165 @table @kbd
17166 @item @@heading @var{title}
17167 Unnumbered section-like heading not listed
17168 in the table of contents of a printed manual.
17170 @item @@chapheading, @@majorheading, @@c subheading, @@subsubheading
17171 Related commands.
17172 @end table
17174 @need 1000
17175 @c subheading Font commands
17177 @need 1000
17178 @noindent
17179 @xref{Smallcaps}, and @*
17180 @ref{Fonts}.
17182 @table @kbd
17183 @item @@r@{@var{text}@}
17184 Print in roman font.
17186 @item @@sc@{@var{text}@}
17187 Print in @sc{small caps} font.
17188 @end table
17190 @c subheading Miscellaneous
17192 @noindent
17193 See @ref{title subtitle author, , @code{@@title} @code{@@subtitle} and @code{@@author} Commands},@*
17194 see @ref{Customized Highlighting},@*
17195 see @ref{Overfull hboxes},@*
17196 see @ref{Footnotes},@*
17197 see @ref{dmn, , Format a Dimension},@*
17198 see @ref{Raise/lower sections, , @code{@@raisesections} and @code{@@lowersections}},@*
17199 see @ref{math, , @code{@@math}: Inserting Mathematical Expressions}.@*
17200 see @ref{minus, , Inserting a Minus Sign},@*
17201 see @ref{paragraphindent, , Paragraph Indenting},@*
17202 see @ref{Cross Reference Commands},@*
17203 see @ref{title subtitle author, , @code{@@title} @code{@@subtitle} and @code{@@author}}, and@*
17204 see @ref{Custom Headings, , How to Make Your Own Headings}.
17206 @table @kbd
17207 @item @@author @var{author}
17208 Typeset author's name.
17210 @c @item @@definfoenclose @var{new-command}, @var{before}, @var{after},
17211 @c Define a highlighting command for Info.  (Info only.)
17213 @item @@finalout
17214 Produce cleaner printed output.
17216 @item @@footnotestyle @var{end-or-separate}
17217 Specify footnote style.
17219 @item @@dmn@{@var{dimension}@}
17220 Format a dimension.
17222 @item @@global@@let@var{new-cmd}=@var{existing-cmd}
17223 Define a highlighting command for @TeX{}. (@TeX{} only.)
17225 @item @@lowersections
17226 Reduce hierarchical level of sectioning commands.
17228 @item @@math@{@var{mathematical-expression}@}
17229 Format a mathematical expression.
17231 @item @@minus@{@}
17232 Generate a minus sign.
17234 @item @@paragraphindent @var{asis-or-number}
17235 Specify paragraph indentation.
17237 @item @@raisesections
17238 Raise hierarchical level of sectioning commands.
17240 @item @@ref@{@var{node-name}, @r{[}@var{entry}@r{]}, @r{[}@var{topic-or-title}@r{]}, @r{[}@var{info-file}@r{]}, @r{[}@var{manual}@r{]}@}
17241 Make a reference.  In the printed manual, the
17242 reference does not start with the word `see'.
17244 @item @@title @var{title}
17245 Typeset @var{title} in the alternative
17246 title page format.
17248 @item @@subtitle @var{subtitle}
17249 Typeset @var{subtitle} in the alternative
17250 title page format.
17252 @item @@today@{@}
17253 Insert the current date.
17254 @end table
17255 @tex
17256 % Switch width of first column of tables back to default value
17257 \global\tableindent=.8in
17258 @end tex
17259 @end ignore
17261 @node Command and Variable Index, Concept Index, Obtaining TeX, Top
17262 @comment  node-name,  next,  previous,  up
17263 @unnumbered Command and Variable Index
17265 This is an alphabetical list of all the @@-commands, assorted Emacs Lisp
17266 functions, and several variables.  To make the list easier to use, the
17267 commands are listed without their preceding @samp{@@}.@refill
17269 @printindex fn
17272 @node Concept Index,  , Command and Variable Index, Top
17273 @unnumbered Concept Index
17275 @printindex cp
17278 @summarycontents
17279 @contents
17280 @bye