comparison man/texinfo/texinfo.texi @ 5848:e2efee0f7703

hst confused
author Henry Thompson <ht@markup.co.uk>
date Fri, 27 Feb 2015 17:43:50 +0000
parents
children
comparison
equal deleted inserted replaced
5845:0ef278ff2894 5848:e2efee0f7703
1 \input texinfo.tex @c -*-texinfo-*-
2 @c $Id$
3
4 @c Everything between the start/end of header lines will be passed by
5 @c XEmacs's {texinfo,makeinfo}-format region commands. See the `start of
6 @c header' node for more info.
7 @c %**start of header
8 @c Synced up with: Texinfo 5.2 of 26 Sep 2013.
9 @c Synced by: Jerry James, 11 Feb 2014.
10
11 @c makeinfo and texinfo.tex ignore all text before @setfilename.
12 @setfilename texinfo.info
13
14 @c Automake automatically updates version.texi to @set VERSION and
15 @c @set UPDATED to appropriate values.
16 @include version.texi
17 @c XEmacs: @settitle Texinfo @value{edition}
18 @settitle GNU Texinfo @value{VERSION}
19
20 @c Define a new index for command-line options.
21 @defcodeindex op
22
23 @c Put everything except function (command, in this case) names in one
24 @c index (arbitrarily chosen to be the concept index).
25 @syncodeindex op cp
26 @syncodeindex vr cp
27 @syncodeindex pg cp
28
29 @paragraphindent 2
30 @c finalout
31
32 @comment %**end of header
33
34 @copying
35 This manual is for GNU Texinfo (version @value{VERSION}, @value{UPDATED}),
36 a documentation system that can produce both online information and a
37 printed manual from a single source using semantic markup.
38
39 Copyright @copyright{} 1988, 1990, 1991, 1992, 1993, 1995, 1996, 1997,
40 1998, 1999, 2001, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
41 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
42
43 @quotation
44 Permission is granted to copy, distribute and/or modify this document
45 under the terms of the GNU Free Documentation License, Version 1.3 or
46 any later version published by the Free Software Foundation; with no
47 Invariant Sections, with the Front-Cover Texts being ``A GNU Manual'',
48 and with the Back-Cover Texts as in (a) below. A copy of the license
49 is included in the section entitled ``GNU Free Documentation
50 License''.
51
52 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
53 modify this GNU manual. Buying copies from the FSF supports it in
54 developing GNU and promoting software freedom.''
55 @end quotation
56 @end copying
57
58 @dircategory Texinfo documentation system
59 @direntry
60 * Texinfo: (texinfo). The GNU documentation format.
61 * install-info: (texinfo)Invoking install-info. Update info/dir entries.
62 * makeinfo: (texinfo)Invoking makeinfo. Translate Texinfo source.
63 * pod2texi: (pod2texi)Invoking pod2texi. Translate Perl POD to Texinfo.
64 * texi2dvi: (texinfo)Format with texi2dvi. Print Texinfo documents.
65 * texi2pdf: (texinfo)PDF Output. PDF output for Texinfo.
66 * pdftexi2dvi: (texinfo)PDF Output. PDF output for Texinfo.
67 * texindex: (texinfo)Format with tex/texindex. Sort Texinfo index files.
68 @end direntry
69
70 @c Before release, run C-u C-c C-u C-a (texinfo-all-menus-update with a
71 @c prefix arg). This updates the node pointers, which texinfmt.el needs.
72
73 @c Set smallbook if printing in smallbook format so the example of the
74 @c smallbook font is actually written using smallbook; in bigbook, a kludge
75 @c is used for TeX output. Do this through the -t option to texi2dvi,
76 @c so this same source can be used for other paper sizes as well.
77 @c smallbook
78 @c set smallbook
79 @c @@clear smallbook
80
81 @c If you like blank pages, add through texi2dvi -t.
82 @c setchapternewpage odd
83
84
85 @shorttitlepage GNU Texinfo
86
87 @titlepage
88 @title Texinfo
89 @subtitle The GNU Documentation Format
90 @subtitle for Texinfo version @value{VERSION}, @value{UPDATED}
91
92 @author Robert J. Chassell
93 @author Richard M. Stallman
94
95 @c Include the Distribution inside the titlepage so
96 @c that headings are turned off.
97
98 @page
99 @vskip 0pt plus 1filll
100 @insertcopying
101
102 @sp 1
103 Published by the Free Software Foundation @*
104 51 Franklin St, Fifth Floor @*
105 Boston, MA 02110-1301 @*
106 USA @*
107 ISBN 1-882114-67-1 @c for version 4.0, September 1999.
108 @c ISBN 1-882114-65-5 is for version 3.12, March 1998.
109 @c ISBN 1-882114-64-7 is for edition 2.24 of November 1996.
110 @c ISBN 1-882114-63-9 is for edition 2.20 of 28 February 1995.
111
112 @sp 1
113 Cover art by Etienne Suvasa.
114 @end titlepage
115
116
117 @summarycontents
118 @contents
119
120
121 @ifnottex
122 @node Top
123 @top Texinfo
124
125 This manual is for GNU Texinfo (version @value{VERSION}, @value{UPDATED}),
126 a documentation system that can produce both online information and a
127 printed manual from a single source using semantic markup.
128
129 The first part of this master menu lists the major nodes in this Info
130 document, including the @@-command and concept indices. The rest of
131 the menu lists all the lower level nodes in the document.
132 @end ifnottex
133
134 @menu
135 * Copying Conditions:: Your rights.
136 * Overview:: Texinfo in brief.
137 * Texinfo Mode:: Using the XEmacs Texinfo mode.
138 * Beginning a File:: What is at the beginning of a Texinfo file?
139 * Ending a File:: What is at the end of a Texinfo file?
140 * Chapter Structuring:: Creating chapters, sections, appendices, etc.
141 * Nodes:: Writing nodes, the basic unit of Texinfo.
142 * Menus:: Writing menus.
143 * Cross References:: Writing cross references.
144 * Marking Text:: Marking words and phrases as code,
145 keyboard input, meta-syntactic
146 variables, and the like.
147 * Quotations and Examples:: Block quotations, examples, etc.
148 * Lists and Tables:: Itemized or numbered lists, and tables.
149 * Special Displays:: Floating figures and footnotes.
150 * Indices:: Creating indices.
151 * Insertions:: Inserting @@-signs, braces, etc.
152 * Breaks:: Forcing or preventing line and page breaks.
153 * Definition Commands:: Describing functions and the like uniformly.
154 * Internationalization:: Supporting languages other than English.
155 * Conditionals:: Specifying text for only some output cases.
156 * Defining New Texinfo Commands:: User-defined macros and aliases.
157 * Include Files:: How to incorporate other Texinfo files.
158
159 * Hardcopy:: Output for paper, with @TeX{}.
160 * Generic Translator @t{texi2any}:: @command{texi2any}, an all-purpose converter.
161 * Creating and Installing Info Files:: Details on Info output.
162 * Generating HTML:: Details on HTML output.
163 @c * texi2any Output Customization:: Fine tuning with initialization files.
164
165 * Command List:: All the Texinfo @@-commands.
166 * Tips:: Hints on how to write a Texinfo document.
167 * Sample Texinfo Files:: Complete examples, including full texts.
168 * Headings:: How to write page headings and footings.
169 * Catching Mistakes:: How to find mistakes in formatting.
170 * Info Format Specification:: Technical details of the Info file format.
171 * GNU Free Documentation License:: Copying this manual.
172 * Command and Variable Index:: A menu containing commands and variables.
173 * General Index:: A menu covering many topics.
174
175 @detailmenu
176 --- The Detailed Node Listing ---
177
178 Overview of Texinfo
179
180 * Reporting Bugs:: Submitting effective bug reports.
181 * Using Texinfo:: Create printed or online output.
182 * Output Formats:: Overview of the supported output formats.
183 * Adding Output Formats:: Man pages and implementing new formats.
184 * Texinfo Document Structure:: How Texinfo manuals are usually arranged.
185 * Info Files:: What is an Info file?
186 * Printed Books:: Characteristics of a printed book or manual.
187 * Formatting Commands:: @@-commands are used for formatting.
188 * Conventions:: General rules for writing a Texinfo file.
189 * Comments:: Writing comments and ignored text in general.
190 * Minimum:: What a Texinfo file must have.
191 * Six Parts:: Usually, a Texinfo file has six parts.
192 * Short Sample:: A short sample Texinfo file.
193 * History:: Acknowledgements, contributors and genesis.
194
195 Using Texinfo Mode
196
197 * Texinfo Mode Overview:: How Texinfo mode can help you.
198 * XEmacs Editing:: Texinfo mode adds to XEmacs' general
199 purpose editing features.
200 * Inserting:: How to insert frequently used @@-commands.
201 * Showing the Structure:: How to show the structure of a file.
202 * Updating Nodes and Menus:: How to update or create new nodes and menus.
203 * Info Formatting:: How to format for Info.
204 * Printing:: How to format and print part or all of a file.
205 * Texinfo Mode Summary:: Summary of all the Texinfo mode commands.
206
207 Updating Nodes and Menus
208
209 * Updating Commands:: Five major updating commands.
210 * Updating Requirements:: How to structure a Texinfo file for
211 using the updating command.
212 * Other Updating Commands:: How to indent descriptions, insert
213 missing nodes lines, and update
214 nodes in sequence.
215
216 Beginning a Texinfo File
217
218 * Sample Beginning:: A sample beginning for a Texinfo file.
219 * Texinfo File Header:: The first lines.
220 * Document Permissions:: Ensuring your manual is free.
221 * Titlepage & Copyright Page:: Creating the title and copyright pages.
222 * Contents:: How to create a table of contents.
223 * The Top Node:: Creating the `Top' node and master menu.
224 * Global Document Commands:: Affecting formatting throughout.
225
226 Texinfo File Header
227
228 * First Line:: The first line of a Texinfo file.
229 * Start of Header:: Formatting a region requires this.
230 * @t{@@setfilename}:: Tell Info the name of the Info file.
231 * @t{@@settitle}:: Create a title for the printed work.
232 * End of Header:: Formatting a region requires this.
233
234 Document Permissions
235
236 * @t{@@copying}:: Declare the document's copying permissions.
237 * @t{@@insertcopying}:: Where to insert the permissions.
238
239 Title and Copyright Pages
240
241 * @t{@@titlepage}:: Create a title for the printed document.
242 * @t{@@titlefont @@center @@sp}:: The @code{@@titlefont}, @code{@@center},
243 and @code{@@sp} commands.
244 * @t{@@title @@subtitle @@author}:: The @code{@@title}, @code{@@subtitle},
245 and @code{@@author} commands.
246 * Copyright:: How to write the copyright notice and
247 include copying permissions.
248 * Heading Generation:: Turn on page headings after the title and
249 copyright pages.
250
251 The `Top' Node and Master Menu
252
253 * Top Node Example::
254 * Master Menu Parts::
255
256 Global Document Commands
257
258 * @t{@@documentdescription}:: Document summary for the HTML output.
259 * @t{@@setchapternewpage}:: Start chapters on right-hand pages.
260 * @t{@@headings}:: An option for turning headings on and off
261 and double or single sided printing.
262 * @t{@@paragraphindent}:: Specify paragraph indentation.
263 * @t{@@firstparagraphindent}:: Suppressing first paragraph indentation.
264 * @t{@@exampleindent}:: Specify environment indentation.
265
266 Ending a Texinfo File
267
268 * Printing Indices & Menus:: How to print an index in hardcopy and
269 generate index menus in Info.
270 * File End:: How to mark the end of a file.
271
272 Chapter Structuring
273
274 * Tree Structuring:: A manual is like an upside down tree @dots{}
275 * Structuring Command Types:: How to divide a manual into parts.
276 * @t{@@chapter}:: Chapter structuring.
277 * @t{@@unnumbered @@appendix}::
278 * @t{@@majorheading @@chapheading}::
279 * @t{@@section}::
280 * @t{@@unnumberedsec @@appendixsec @@heading}::
281 * @t{@@subsection}::
282 * @t{@@unnumberedsubsec @@appendixsubsec @@subheading}::
283 * @t{@@subsubsection}:: Commands for the lowest level sections.
284 * @t{@@part}:: Collections of chapters.
285 * Raise/lower sections:: How to change commands' hierarchical level.
286
287 Nodes
288
289 * @t{@@node}:: Creating nodes, in detail.
290 * @t{makeinfo} Pointer Creation:: Letting makeinfo determine node pointers.
291 * @t{@@anchor}:: Defining arbitrary cross reference targets.
292 * Node Menu Illustration:: A diagram, and sample nodes and menus.
293
294 The @code{@@node} Command
295
296 * Node Names:: How to choose node and pointer names.
297 * Writing a Node:: How to write an @code{@@node} line.
298 * Node Line Requirements:: Keep names unique.
299 * First Node:: How to write a `Top' node.
300 * @t{@@top} Command:: How to use the @code{@@top} command.
301
302 Menus
303
304 * Menu Location:: Menus go at the ends of nodes.
305 * Writing a Menu:: What is a menu?
306 * Menu Parts:: A menu entry has three parts.
307 * Less Cluttered Menu Entry:: Two part menu entry.
308 * Menu Example:: Two and three part menu entries.
309 * Other Info Files:: How to refer to a different Info file.
310
311 Cross References
312
313 * References:: What cross references are for.
314 * Cross Reference Commands:: A summary of the different commands.
315 * Cross Reference Parts:: A cross reference has several parts.
316 * @t{@@xref}:: Begin a reference with `See' @dots{}
317 * Top Node Naming:: How to refer to the beginning of another file.
318 * @t{@@ref}:: A reference for the last part of a sentence.
319 * @t{@@pxref}:: How to write a parenthetical cross reference.
320 * @t{@@inforef}:: How to refer to an Info-only file.
321 * @t{@@url}:: How to refer to a uniform resource locator.
322 * @t{@@cite}:: How to refer to books not in the Info system.
323
324 @code{@@xref}
325
326 * Reference Syntax:: What a reference looks like and requires.
327 * One Argument:: @code{@@xref} with one argument.
328 * Two Arguments:: @code{@@xref} with two arguments.
329 * Three Arguments:: @code{@@xref} with three arguments.
330 * Four and Five Arguments:: @code{@@xref} with four and five arguments.
331
332 Marking Text, Words and Phrases
333
334 * Indicating:: How to indicate definitions, files, etc.
335 * Emphasis:: How to emphasize text.
336
337 Indicating Definitions, Commands, etc.
338
339 * Useful Highlighting:: Highlighting provides useful information.
340 * @t{@@code}:: Indicating program code.
341 * @t{@@kbd}:: Showing keyboard input.
342 * @t{@@key}:: Specifying keys.
343 * @t{@@samp}:: Indicating a literal sequence of characters.
344 * @t{@@verb}:: Indicating a verbatim sequence of characters.
345 * @t{@@var}:: Indicating metasyntactic variables.
346 * @t{@@env}:: Indicating environment variables.
347 * @t{@@file}:: Indicating file names.
348 * @t{@@command}:: Indicating command names.
349 * @t{@@option}:: Indicating option names.
350 * @t{@@dfn}:: Specifying definitions.
351 * @t{@@abbr}:: Indicating abbreviations.
352 * @t{@@acronym}:: Indicating acronyms.
353 * @t{@@indicateurl}:: Indicating an example url.
354 * @t{@@email}:: Indicating an electronic mail address.
355
356 Emphasizing Text
357
358 * @t{@@emph @@strong}:: How to emphasize text in Texinfo.
359 * Smallcaps:: How to use the small caps font.
360 * Fonts:: Various font commands for printed output.
361
362 Quotations and Examples
363
364 * Block Enclosing Commands:: Different constructs for different purposes.
365 * @t{@@quotation}:: Writing a quotation.
366 * @t{@@indentedblock}:: Block of text indented on left.
367 * @t{@@example}:: Writing an example in a fixed-width font.
368 * @t{@@verbatim}:: Writing a verbatim example.
369 * @t{@@verbatiminclude}:: Including a file verbatim.
370 * @t{@@lisp}:: Illustrating Lisp code.
371 * @t{@@small@dots{}}:: Examples in a smaller font.
372 * @t{@@display}:: Writing an example in the current font.
373 * @t{@@format}:: Writing an example without narrowed margins.
374 * @t{@@exdent}:: Undo indentation on a line.
375 * @t{@@flushleft @@flushright}:: Pushing text flush left or flush right.
376 * @t{@@raggedright}:: Avoiding justification on the right.
377 * @t{@@noindent}:: Preventing paragraph indentation.
378 * @t{@@indent}:: Forcing paragraph indentation.
379 * @t{@@cartouche}:: Drawing rounded rectangles around text.
380
381 Lists and Tables
382
383 * Introducing Lists:: Texinfo formats lists for you.
384 * @t{@@itemize}:: How to construct a simple list.
385 * @t{@@enumerate}:: How to construct a numbered list.
386 * Two-column Tables:: How to construct a two-column table.
387 * Multi-column Tables:: How to construct generalized tables.
388
389 Making a Two-column Table
390
391 * @t{@@table}:: How to construct a two-column table.
392 * @t{@@ftable @@vtable}:: Automatic indexing for two-column tables.
393 * @t{@@itemx}:: How to put more entries in the first column.
394
395 @code{@@multitable}: Multi-column Tables
396
397 * Multitable Column Widths:: Defining multitable column widths.
398 * Multitable Rows:: Defining multitable rows, with examples.
399
400 Special Displays
401
402 * Floats:: Figures, tables, and the like.
403 * Images:: Including graphics and images.
404 * Footnotes:: Writing footnotes.
405
406 Floats
407
408 * @t{@@float}:: Producing floating material.
409 * @t{@@caption @@shortcaption}:: Specifying descriptions for floats.
410 * @t{@@listoffloats}:: A table of contents for floats.
411
412 Inserting Images
413
414 * Image Syntax::
415 * Image Scaling::
416
417 Footnotes
418
419 * Footnote Commands:: How to write a footnote in Texinfo.
420 * Footnote Styles:: Controlling how footnotes appear in Info.
421
422 Indices
423
424 * Index Entries:: Choose different words for index entries.
425 * Predefined Indices:: Use different indices for different kinds
426 of entries.
427 * Indexing Commands:: How to make an index entry.
428 * Combining Indices:: How to combine indices.
429 * New Indices:: How to define your own indices.
430
431 Combining Indices
432
433 * @t{@@syncodeindex}:: How to merge two indices, using @code{@@code}
434 font for the merged-from index.
435 * @t{@@synindex}:: How to merge two indices, using the
436 roman font for the merged-from index.
437
438 Special Insertions
439
440 * Special Characters:: Inserting @@ @{@} , \ #
441 * Inserting Quote Characters:: Inserting left and right quotes, in code.
442 * Inserting Space:: Inserting the right amount of whitespace.
443 * Inserting Accents:: Inserting accents and special characters.
444 * Inserting Quotation Marks:: Inserting quotation marks.
445 * Inserting Math:: Formatting mathematical expressions.
446 * Glyphs for Text:: Inserting Dots, bullets, currencies, etc.
447 * Glyphs for Programming:: Indicating results of evaluation,
448 expansion of macros, errors, etc.
449
450 Special Characters: Inserting @@ @{@} , \ #
451
452 * Inserting an Atsign:: @code{@@@@}, @code{@@atchar@{@}}.
453 * Inserting Braces:: @code{@@@{ @@@}}, @code{@@l rbracechar@{@}}.
454 * Inserting a Comma:: , and @code{@@comma@{@}}.
455 * Inserting a Backslash:: \ and @code{@@backslashchar@{@}}.
456 * Inserting a Hashsign:: # and @code{@@hashchar@{@}}.
457
458 Inserting Space
459
460 * Multiple Spaces:: Inserting multiple spaces.
461 * Not Ending a Sentence:: Sometimes a . doesn't end a sentence.
462 * Ending a Sentence:: Sometimes it does.
463 * @t{@@frenchspacing}:: Specifying end-of-sentence spacing.
464 * @t{@@dmn}:: Formatting a dimension.
465
466 Glyphs for Text
467
468 * @t{@@TeX @@LaTeX}:: The @TeX{} logos.
469 * @t{@@copyright}:: The copyright symbol (c in a circle).
470 * @t{@@registeredsymbol}:: The registered symbol (R in a circle).
471 * @t{@@dots}:: How to insert ellipses: @dots{} and @enddots{}
472 * @t{@@bullet}:: How to insert a bullet: @bullet{}
473 * @t{@@euro}:: How to insert the euro currency symbol.
474 * @t{@@pounds}:: How to insert the pounds currency symbol.
475 * @t{@@textdegree}:: How to insert the degrees symbol.
476 * @t{@@minus}:: How to insert a minus sign.
477 * @t{@@geq @@leq}:: How to insert greater/less-than-or-equal signs.
478
479 Glyphs for Programming
480
481 * Glyphs Summary::
482 * @t{@@result}:: How to show the result of expression.
483 * @t{@@expansion}:: How to indicate an expansion.
484 * @t{@@print}:: How to indicate generated output.
485 * @t{@@error}:: How to indicate an error message.
486 * @t{@@equiv}:: How to indicate equivalence.
487 * @t{@@point}:: How to indicate the location of point.
488 * Click Sequences:: Inserting GUI usage sequences.
489
490 Forcing and Preventing Breaks
491
492 * Break Commands:: Summary of break-related commands.
493 * Line Breaks:: Forcing line breaks.
494 * @t{@@- @@hyphenation}:: Helping @TeX{} with hyphenation points.
495 * @t{@@allowcodebreaks}:: Controlling line breaks within @@code text.
496 * @t{@@w}:: Preventing unwanted line breaks in text.
497 * @t{@@tie}:: Inserting an unbreakable but varying space.
498 * @t{@@sp}:: Inserting blank lines.
499 * @t{@@page}:: Forcing the start of a new page.
500 * @t{@@group}:: Preventing unwanted page breaks.
501 * @t{@@need}:: Another way to prevent unwanted page breaks.
502
503 Definition Commands
504
505 * Def Cmd Template:: Writing descriptions using definition commands.
506 * Def Cmd Continuation Lines:: Continuing the heading over source lines.
507 * Optional Arguments:: Handling optional and repeated arguments.
508 * @t{@@deffnx}:: Group two or more `first' lines.
509 * Def Cmds in Detail:: Reference for all the definition commands.
510 * Def Cmd Conventions:: Conventions for writing definitions.
511 * Sample Function Definition:: An example.
512
513 The Definition Commands
514
515 * Functions Commands:: Commands for functions and similar entities.
516 * Variables Commands:: Commands for variables and similar entities.
517 * Typed Functions:: Commands for functions in typed languages.
518 * Typed Variables:: Commands for variables in typed languages.
519 * Data Types:: The definition command for data types.
520 * Abstract Objects:: Commands for object-oriented programming.
521
522 Object-Oriented Programming
523
524 * Variables: Object-Oriented Variables.
525 * Methods: Object-Oriented Methods.
526
527 Internationalization
528
529 * @t{@@documentlanguage}:: Declaring the current language.
530 * @t{@@documentencoding}:: Declaring the input encoding.
531
532 Conditionally Visible Text
533
534 * Conditional Commands:: Text for a given format.
535 * Conditional Not Commands:: Text for any format other than a given one.
536 * Raw Formatter Commands:: Using raw formatter commands.
537 * Inline Conditionals:: Brace-delimited conditional text.
538 * @t{@@set @@clear @@value}:: Variable tests and substitutions.
539 * Testing for Texinfo Commands:: Testing if a Texinfo command is available.
540 * Conditional Nesting:: Using conditionals inside conditionals.
541
542 @code{@@set}, @code{@@clear}, and @code{@@value}
543
544 * @t{@@set @@value}:: Expand a flag variable to a string.
545 * @t{@@ifset @@ifclear}:: Format a region if a flag is set.
546 * @t{@@value} Example:: An easy way to update edition information.
547
548 Defining New Texinfo Commands
549
550 * Defining Macros:: Defining and undefining new commands.
551 * Invoking Macros:: Using a macro, once you've defined it.
552 * Macro Details:: Limitations of Texinfo macros.
553 * @t{@@alias}:: Command aliases.
554 * @t{@@definfoenclose}:: Customized highlighting.
555 * External Macro Processors:: @code{#line} directives.
556
557 External Macro Processors: Line Directives
558
559 * @t{#line} Directive::
560 * TeX: @t{#line} and @TeX{}.
561 * Syntax: @t{#line} Syntax Details.
562
563 Include Files
564
565 * Using Include Files:: How to use the @code{@@include} command.
566 * @t{texinfo-multiple-files-update}:: How to create and update nodes and
567 menus when using included files.
568 * Include Files Requirements:: @code{texinfo-multiple-files-update} needs.
569 * Sample Include File:: A sample outer file with included files
570 within it; and a sample included file.
571 * Include Files Evolution:: How use of the @code{@@include} command
572 has changed over time.
573
574 Formatting and Printing Hardcopy
575
576 * Use @TeX{}:: Use @TeX{} to format for hardcopy.
577 * Format with @t{tex}/@t{texindex}:: How to format with explicit shell commands.
578 * Format with @t{texi2dvi}:: A simpler way to format.
579 * Print with @t{lpr}:: How to print.
580 * Within XEmacs:: How to format and print from an XEmacs shell.
581 * Texinfo Mode Printing:: How to format and print in Texinfo mode.
582 * Compile-Command:: How to print using XEmacs's compile command.
583 * Requirements Summary:: @TeX{} formatting requirements summary.
584 * Preparing for @TeX{}:: What to do before you use @TeX{}.
585 * Overfull hboxes:: What are and what to do with overfull hboxes.
586 * @t{@@smallbook}:: How to print small format books and manuals.
587 * A4 Paper:: How to print on A4 or A5 paper.
588 * @t{@@pagesizes}:: How to print with customized page sizes.
589 * Cropmarks and Magnification:: How to print marks to indicate the size
590 of pages and how to print scaled up output.
591 * PDF Output:: Portable Document Format output.
592 * Obtaining @TeX{}:: How to obtain @TeX{}.
593
594 @code{texi2any}: The Generic Translator for Texinfo
595
596 * Reference Implementation:: @command{texi2any}: the reference implementation.
597 * Invoking @t{texi2any}:: Running the translator from a shell.
598 * @t{texi2any} Printed Output:: Calling @command{texi2dvi}.
599 * Pointer Validation:: How to check that pointers point somewhere.
600 * Customization Variables:: Configuring @command{texi2any}.
601 * Internationalization of Document Strings:: Translating program-inserted text.
602 * Invoking @t{pod2texi}:: Translating Perl pod to Texinfo.
603 * @t{texi2html}:: An ancestor of @command{texi2any}.
604
605 Customization Variables
606
607 * Commands: Customization Variables for @@-Commands.
608 * Options: Customization Variables and Options.
609 * Other: Other Customization Variables.
610
611 Creating and Installing Info Files
612
613 * Creating an Info File::
614 * Installing an Info File::
615
616 Creating an Info File
617
618 * @t{makeinfo} Advantages:: @code{makeinfo} provides better error checking.
619 * @t{makeinfo} in XEmacs:: How to run @code{makeinfo} from XEmacs.
620 * @t{texinfo-format} commands:: Two Info formatting commands written
621 in Emacs Lisp are an alternative
622 to @code{makeinfo}.
623 * Batch Formatting:: How to format for Info in XEmacs Batch mode.
624 * Tag and Split Files:: How tagged and split files help Info
625 to run better.
626
627 Installing an Info File
628
629 * Directory File:: The top level menu for all Info files.
630 * New Info File:: Listing a new Info file.
631 * Other Info Directories:: How to specify Info files that are
632 located in other directories.
633 * Installing Dir Entries:: How to specify what menu entry to add
634 to the Info directory.
635 * Invoking @t{install-info}:: @code{install-info} options.
636
637 Generating HTML
638
639 * HTML Translation:: Details of the HTML output.
640 * HTML Splitting:: How HTML output is split.
641 * HTML CSS:: Influencing HTML output with Cascading Style Sheets.
642 * HTML Xref:: Cross references in HTML output.
643
644 HTML Cross References
645
646 * Link Basics: HTML Xref Link Basics.
647 * Node Expansion: HTML Xref Node Name Expansion.
648 * Command Expansion: HTML Xref Command Expansion.
649 * 8-bit Expansion: HTML Xref 8-bit Character Expansion.
650 * Mismatch: HTML Xref Mismatch.
651 * Configuration: HTML Xref Configuration. htmlxref.cnf.
652 * Preserving links: HTML Xref Link Preservation. MANUAL-noderename.cnf.
653
654 @@-Command List
655
656 * Command Syntax:: General syntax for varieties of @@-commands.
657 * Command Contexts:: Guidelines for which commands can be used where.
658
659 Sample Texinfo Files
660
661 * Short Sample Texinfo File::
662 * GNU Sample Texts::
663 * Verbatim Copying License::
664 * All-permissive Copying License::
665
666 Page Headings
667
668 * Headings Introduced:: Conventions for using page headings.
669 * Heading Format:: Standard page heading formats.
670 * Heading Choice:: How to specify the type of page heading.
671 * Custom Headings:: How to create your own headings and footings.
672
673 Catching Mistakes
674
675 * @t{makeinfo} Preferred:: @code{makeinfo} finds errors.
676 * Debugging with Info:: How to catch errors with Info formatting.
677 * Debugging with @TeX{}:: How to catch errors with @TeX{} formatting.
678 * Using @t{texinfo-show-structure}:: How to use @code{texinfo-show-structure}.
679 * Using @t{occur}:: How to list all lines containing a pattern.
680 * Running @t{Info-validate}:: How to find badly referenced nodes.
681
682 Finding Badly Referenced Nodes
683
684 * Using @t{Info-validate}:: How to run @code{Info-validate}.
685 * Unsplit:: How to create an unsplit file.
686 * Tagifying:: How to tagify a file.
687 * Splitting:: How to split a file manually.
688
689 Info Format Specification
690
691 * General: Info Format General Layout.
692 * Text: Info Format Text Constructs.
693
694 Info Format General Layout
695
696 * Whole: Info Format Whole Manual. Split vs.@: nonsplit manuals.
697 * Preamble: Info Format Preamble.
698 * Indirect: Info Format Indirect Tag Table.
699 * Tag table: Info Format Tag Table.
700 * Local variables: Info Format Local Variables.
701 * Regular nodes: Info Format Regular Nodes.
702
703 Info Format Text Constructs
704
705 * Menu: Info Format Menu.
706 * Image: Info Format Image.
707 * Printindex: Info Format Printindex.
708 * Xref: Info Format Cross Reference.
709 @end detailmenu
710 @end menu
711
712 @c Reward readers for getting to the end of the menu :).
713 @c Contributed by Arnold Robbins.
714 @quotation
715 Documentation is like sex: when it is good, it is very, very good; and
716 when it is bad, it is better than nothing.
717 ---Dick Brandon
718 @end quotation
719
720
721 @node Copying Conditions
722 @unnumbered Texinfo Copying Conditions
723 @cindex Copying conditions
724 @cindex Conditions for copying Texinfo
725 @cindex Free software
726 @cindex Libre software
727
728 GNU Texinfo is @dfn{free software}; this means that everyone is free
729 to use it and free to redistribute it on certain conditions. Texinfo
730 is not in the public domain; it is copyrighted and there are
731 restrictions on its distribution, but these restrictions are designed
732 to permit everything that a good cooperating citizen would want to do.
733 What is not allowed is to try to prevent others from further sharing
734 any version of Texinfo that they might get from you.
735
736 Specifically, we want to make sure that you have the right to give away
737 copies of the programs that relate to Texinfo, that you receive source
738 code or else can get it if you want it, that you can change these
739 programs or use pieces of them in new free programs, and that you know
740 you can do these things.
741
742 To make sure that everyone has such rights, we have to forbid you to
743 deprive anyone else of these rights. For example, if you distribute
744 copies of the Texinfo related programs, you must give the recipients all
745 the rights that you have. You must make sure that they, too, receive or
746 can get the source code. And you must tell them their rights.
747
748 Also, for our own protection, we must make certain that everyone finds
749 out that there is no warranty for the programs that relate to Texinfo.
750 If these programs are modified by someone else and passed on, we want
751 their recipients to know that what they have is not what we distributed,
752 so that any problems introduced by others will not reflect on our
753 reputation.
754
755 The precise conditions of the licenses for the programs currently
756 being distributed that relate to Texinfo are found in the General
757 Public Licenses that accompany them. This manual is covered by the
758 GNU Free Documentation License (@pxref{GNU Free Documentation
759 License}).
760
761
762 @node Overview
763 @chapter Overview of Texinfo
764 @cindex Overview of Texinfo
765 @cindex Texinfo overview
766
767 @dfn{Texinfo} is a documentation system that uses a single source file
768 to produce both online information and printed output. This means
769 that instead of writing two different documents, one for the online
770 information and the other for a printed work, you need write only one
771 document. Therefore, when the work is revised, you need revise only
772 that one document.
773
774 @cindex Semantic markup
775 Texinfo's markup commands are almost entirely @dfn{semantic}; that is,
776 they specify the intended meaning of text in the document, rather than
777 physical formatting instructions.
778
779 @cindex Limited scope of Texinfo
780 Texinfo was devised for the purpose of writing software documentation
781 and manuals. It is not, and was never intended to be, a
782 general-purpose formatting program. If you need to lay out a
783 newspaper, devise a glossy magazine ad, or follow the exact formatting
784 requirements of a publishing house, Texinfo is not the simplest tool.
785 On the other hand, if you want to write a good manual for your
786 program, Texinfo has many features that will make your job easier.
787 Overall, it's intended to let you concentrate on the content, and thus
788 provides almost no commands for controlling the final formatting.
789
790 @cindex Pronounciation of Texinfo
791 @cindex Spelling of Texinfo
792 The first syllable of ``Texinfo'' is pronounced like ``speck'', not
793 ``hex''. This odd pronunciation is derived from, but is not the same
794 as, the pronunciation of @TeX{}. In the word @TeX{}, the @samp{X} is
795 actually the Greek letter ``chi'' rather than the English letter
796 ``ex''. Pronounce @TeX{} as if the @samp{X} were the last sound in
797 the name `Bach'; but pronounce Texinfo as if the @samp{x} were a `k'.
798 Spell ``Texinfo'' with a capital ``T'' and the other letters in
799 lowercase.
800
801 Manuals for most GNU packages are written in Texinfo, and available
802 online at @url{http://www.gnu.org/doc}. The Texinfo
803
804 @menu
805 * Reporting Bugs:: Submitting effective bug reports.
806 * Using Texinfo:: Create printed or online output.
807 * Output Formats:: Overview of the supported output formats.
808 * Adding Output Formats:: Man pages and implementing new formats.
809 * Texinfo Document Structure:: How Texinfo manuals are usually arranged.
810 * Info Files:: What is an Info file?
811 * Printed Books:: Characteristics of a printed book or manual.
812 * Formatting Commands:: @@-commands are used for formatting.
813 * Conventions:: General rules for writing a Texinfo file.
814 * Comments:: Writing comments and ignored text in general.
815 * Minimum:: What a Texinfo file must have.
816 * Six Parts:: Usually, a Texinfo file has six parts.
817 * Short Sample:: A short sample Texinfo file.
818 * History:: Acknowledgements, contributors and genesis.
819 @end menu
820
821
822 @node Reporting Bugs
823 @section Reporting Bugs
824
825 @cindex Bugs, reporting
826 @cindex Suggestions for Texinfo, making
827 @cindex Reporting bugs
828 We welcome bug reports and suggestions for any aspect of the Texinfo
829 system: programs, documentation, installation, etc. Please email them
830 to @email{bug-texinfo@@gnu.org}. You can get the latest version of
831 Texinfo via its home page, @uref{http://www.gnu.org/software/texinfo}.
832
833 @cindex Checklist for bug reports
834 For bug reports, please include enough information for the maintainers
835 to reproduce the problem. Generally speaking, that means:
836
837 @itemize @bullet
838 @item The version number of Texinfo and the program(s) or manual(s) involved.
839 @item The contents of any input files necessary to reproduce the bug.
840 @item Precisely how you ran any program(s) involved.
841 @item A description of the problem and samples of any erroneous output.
842 @item Hardware and operating system names and versions.
843 @item Anything else that you think would be helpful.
844 @end itemize
845
846 When in doubt whether something is needed or not, include it. It's
847 better to include too much than to leave out something important.
848
849 It is critical to send an actual input file that reproduces the
850 problem. What's not critical is to ``narrow down'' the example to the
851 smallest possible input---the actual input with which you discovered
852 the bug will suffice. (Of course, if you do do experiments, the
853 smaller the input file, the better.)
854
855 @cindex Patches, contributing
856 Patches are most welcome; if possible, please make them with
857 @samp{@w{diff -c}} (@pxref{Top,,, diff, Comparing and Merging Files})
858 and include @file{ChangeLog} entries (@pxref{Change Log,,, xemacs,
859 XEmacs User's Manual}), and follow the existing coding style.
860
861
862 @node Using Texinfo
863 @section Using Texinfo
864
865 @cindex Using Texinfo in general
866 @cindex Texinfo, introduction to
867 @cindex Introduction to Texinfo
868
869 Using Texinfo, you can create a printed document (via the @TeX{}
870 typesetting system) with the normal features of a book, including
871 chapters, sections, cross references, and indices. From the same
872 Texinfo source file, you can create an Info file with special features
873 to make documentation browsing easy. You can also create from that
874 same source file an HTML output file suitable for use with a web
875 browser, a Docbook file, or a transliteration in XML format. See the
876 next section (@pxref{Output Formats}) for details and sample commands
877 to generate output from the source.
878
879 @TeX{} works with virtually all printers; Info works with virtually
880 all computer terminals; the HTML output works with virtually all web
881 browsers. Thus Texinfo and its output can be used by almost any
882 computer user.
883
884 @cindex Source file format
885 A Texinfo source file is a plain ASCII file containing text
886 interspersed with @dfn{@@-commands} (words preceded by an @samp{@@})
887 that tell the Texinfo processors what to do. You can edit a Texinfo
888 file with any text editor, but it is especially convenient to use
889 XEmacs since that editor has a special mode, called Texinfo mode, that
890 provides various Texinfo-related features. (@xref{Texinfo Mode}.)
891
892 Texinfo is the official documentation format of the GNU project. More
893 information is available at the @uref{http://www.gnu.org/doc/, GNU
894 documentation web page}.
895
896
897 @node Output Formats
898 @section Output Formats
899 @cindex Output formats
900 @cindex Back-end output formats
901
902 Here is a brief overview of the output formats currently supported by
903 Texinfo.
904
905 @table @asis
906 @item Info
907 @cindex Info output, overview
908 (Generated via @command{makeinfo}.) Info format is mostly a plain
909 text transliteration of the Texinfo source. It adds a few control
910 characters to separate nodes and provide navigational information for
911 menus, cross references, indices, and so on. The XEmacs Info subsystem
912 (@pxref{Top,,Getting Started,info, Info}), and the standalone @command{info}
913 program (@pxref{Top,,, info-stnd, GNU Info}), among others, can read these
914 files. @xref{Info Files}, and @ref{Creating and Installing Info
915 Files}.
916
917 @item Plain text
918 @cindex Plain text output, overview
919 (Generated via @command{makeinfo --plaintext}.) This is almost the
920 same as Info output with the navigational control characters are
921 omitted.
922
923 @item HTML
924 @cindex HTML output, overview
925 @cindex W3 consortium
926 @cindex Mozilla
927 @cindex Lynx
928 @cindex XEmacs-W3
929 (Generated via @command{makeinfo --html}.) HTML, standing for Hyper
930 Text Markup Language, has become the most commonly used language for
931 writing documents on the World Wide Web. Web browsers, such as
932 Mozilla, Lynx, and XEmacs-W3, can render this language online. There
933 are many versions of HTML; @command{makeinfo} tries to use a subset of
934 the language that can be interpreted by any common browser. For
935 details of the HTML language and much related information, see
936 @uref{http://www.w3.org/MarkUp/}. @xref{Generating HTML}.
937
938 @item DVI
939 @cindex DVI output, overview
940 @pindex dvips
941 @pindex xdvi
942 (Generated via @command{texi2dvi}.) The DeVIce Independent binary
943 format is output by the @TeX{} typesetting program
944 (@uref{http://tug.org}). This is then read by a DVI `driver', which
945 knows the actual device-specific commands that can be viewed or
946 printed, notably Dvips for translation to PostScript (@pxref{Top,,,
947 dvips, Dvips}) and Xdvi for viewing on an X display
948 (@uref{http://sourceforge.net/projects/xdvi/}). @xref{Hardcopy}.
949 (Be aware that the Texinfo language is very different from and much
950 stricter than @TeX{}'s usual languages: plain @TeX{}, @LaTeX{},
951 Con@TeX{}t, etc.)
952
953 @item PostScript
954 @cindex PostScript output, overview
955 (Generated via @command{texi2dvi --ps}.) PostScript is a page
956 description language that became widely used around 1985 and is still
957 used today. @uref{http://en.wikipedia.org/wiki/PostScript} gives a
958 basic description and more preferences. By default, Texinfo uses the
959 @command{dvips} program to convert @TeX{}'s DVI output to PostScript.
960 @xref{Top,,, dvips, Dvips}.
961
962 @item PDF
963 @cindex PDF output, overview
964 @cindex Beebe, Nelson
965 (Generated via @command{texi2dvi --pdf} or @command{texi2pdf}.) This
966 format was developed by Adobe Systems for portable document
967 interchange, based on their previous PostScript language. It can
968 represent the exact appearance of a document, including fonts and
969 graphics, and supporting arbitrary scaling. It is intended to be
970 platform-independent and easily viewable, among other design goals;
971 @uref{http://en.wikipedia.org/wiki/Portable_Document_Format} and
972 @uref{http://tug.org/TUGboat/tb22-3/tb72beebe-pdf.pdf} have some
973 background. By default, Texinfo uses the @command{pdftex} program, an
974 extension of @TeX{}, to output PDF; see
975 @uref{http://tug.org/applications/pdftex}. @xref{PDF Output}.
976
977 @item Docbook
978 @cindex Docbook output, overview
979 @cindex XML Docbook output, overview
980 (Generated via @command{makeinfo --docbook}.) This is an XML-based
981 format developed some years ago, primarily for technical
982 documentation. It therefore bears some resemblance, in broad
983 outline, to Texinfo. See @uref{http://www.docbook.org}. Various
984 converters from Docbook @emph{to} Texinfo have also been developed;
985 see the Texinfo web pages.
986
987 @item XML
988 @cindex XML Texinfo output, overview
989 @cindex Texinfo XML output, overview
990 @cindex DTD, for Texinfo XML
991 @pindex texinfo.dtd
992 @pindex txixml2texi
993 (Generated via @command{makeinfo --xml}.) XML is a generic syntax
994 specification usable for any sort of content (a reference is at
995 @uref{http://www.w3.org/XML}). The @command{makeinfo} XML output,
996 unlike all the other output formats, is a transliteration of the
997 Texinfo source rather than processed output. That is, it translates
998 the Texinfo markup commands into XML syntax, for further processing by
999 XML tools. The details of the output are defined in an XML DTD as
1000 usual, which is contained in a file @file{texinfo.dtd} included in the
1001 Texinfo source distribution and available via the Texinfo web pages.
1002 The XML contains enough information to recreate the original content,
1003 except for syntactic constructs such as Texinfo macros and
1004 conditionals. The Texinfo source distribution includes a utility script
1005 @file{txixml2texi} to do that backward transformation.
1006 @end table
1007
1008
1009 @node Adding Output Formats
1010 @section Adding Output Formats
1011 @cindex Additional output formats
1012
1013 The output formats in the previous section handle a wide variety of
1014 usage, but of course there is always room for more.
1015
1016 @cindex Man page output, not supported
1017 From time to time, proposals are made to generate traditional Unix man
1018 pages from Texinfo source. However, because man pages have a strict
1019 conventional format, creating a good man page requires a completely
1020 different source than the typical Texinfo applications of writing a
1021 good user tutorial and/or a good reference manual. This makes
1022 generating man pages incompatible with the Texinfo design goal of not
1023 having to document the same information in different ways for
1024 different output formats. You might as well write the man page
1025 directly.
1026
1027 @pindex help2man
1028 @cindex O'Dea, Brendan
1029 As an alternative way to support man pages, you may find the program
1030 @command{help2man} to be useful. It generates a traditional man page
1031 from the @samp{--help} output of a program. In fact, the man pages
1032 for the programs in the Texinfo distribution are generated with this.
1033 It is GNU software written by Brendan O'Dea, available from
1034 @uref{http://www.gnu.org/software/help2man}.
1035
1036 @cindex Output formats, supporting more
1037 @cindex SGML-tools output format
1038 If you are a programmer and would like to contribute to the GNU
1039 project by implementing additional output formats for Texinfo, that
1040 would be excellent. The way to do this that would be most useful is
1041 to write a new back-end for @command{texi2any}, our reference
1042 implementation of a Texinfo parser; it creates a tree representation
1043 of the Texinfo input that you can use for the conversion. The
1044 documentation in the source file
1045 @file{tp/Texinfo/Convert/Converter.pm} is a good place to start.
1046 @xref{Generic Translator @t{texi2any}}.
1047
1048 Another viable approach is use the Texinfo XML output from
1049 @command{texi2any} as your input. This XML is an essentially complete
1050 representation of the input, but without the Texinfo syntax and option
1051 peculiarities, as described above.
1052
1053 @cindex Texinfo parsers, discouraging more
1054 If you still cannot resist the temptation of writing a new program
1055 that reads Texinfo source directly, let us give some more caveats:
1056 please do not underestimate the amount of work required. Texinfo is
1057 by no means a simple language to parse correctly, and remains under
1058 development, so you would be committing to an ongoing task. At a
1059 minimum, please check that the extensive tests of the language that
1060 come with @command{texi2any} give correct results with your new
1061 program.
1062
1063
1064 @node Texinfo Document Structure
1065 @section Texinfo Document Structure
1066 @cindex Texinfo document structure
1067 @cindex Document structure, of Texinfo
1068 @cindex Structure, of Texinfo documents
1069 @cindex Double structure, of Texinfo documents
1070
1071 @anchor{Two Paths}@c node name
1072 Texinfo documents most usefully have a double structure, reflecting
1073 the double purposes of printed and online output. For printed output
1074 (DVI, PDF, @dots{}), with physical pages, there are chapters,
1075 sections, subsections, etc. For online output (Info, HTML, @dots{}),
1076 with interactive navigation and no physical pages, there are so-called
1077 ``nodes''.
1078
1079 Typically, the sectioning structure and the node structure are
1080 completely parallel, with one node for each chapter, section, etc.,
1081 and with the nodes following the same hierarchical arrangement as the
1082 sectioning. Thus, if a node is at the logical level of a chapter, its
1083 child nodes are at the level of sections; similarly, the child nodes
1084 of sections are at the level of subsections.
1085
1086 Each @dfn{node} has a name, and contains the discussion of one topic.
1087 Along with the text for the user to read, each node also has pointers
1088 to other nodes, identified in turn by their own names. Info readers
1089 display one node at a time, and provide commands for the user to move
1090 to related nodes. The HTML output can be similarly navigated.
1091
1092 The names of child nodes are listed in a @dfn{menu} within the parent
1093 node; for example, a node corresponding to a chapter would have a menu
1094 of the sections in that chapter. The menus allow the user to move to
1095 the child nodes in a natural way in the online output.
1096
1097 In addition, nodes at the same level are formed into a chain with
1098 `Next' and `Previous' pointers. As you might imagine, the `Next'
1099 pointer links to the next node (section), and the `Previous' pointer
1100 links to the previous node (section). Thus, for example, all the
1101 nodes that are at the level of sections within a chapter are linked
1102 together, and the order in this chain is the same as the order of the
1103 children in the menu of parent chapter. Each child node records the
1104 parent node name as its `Up' pointer. The last child has no `Next'
1105 pointer, and the first child has the parent both as its `Previous' and
1106 as its `Up' pointer.
1107
1108 In addition to menus and `Next', `Previous', and `Up' pointers,
1109 Texinfo provides pointers of another kind for cross references, that
1110 can be sprinkled throughout the text. This is usually the best way to
1111 represent links that do not fit a hierarchical structure.
1112
1113 Although it is technically possible to create Texinfo documents with
1114 only one structure or the other, or for the two structures not to be
1115 parallel, or for either the sectioning or node structure to be
1116 abnormally formed, etc., this is @emph{not at all recommended}. To
1117 the best of our knowledge, all the Texinfo manuals currently in
1118 general use do follow the conventional parallel structure.
1119
1120
1121 @node Info Files
1122 @section Info Files
1123 @cindex Info files
1124
1125 As mentioned above, Info format is mostly a plain text transliteration
1126 of the Texinfo source, with the addition of a few control characters
1127 to separate nodes and provide navigational information, so that
1128 Info-reading programs can operate on it.
1129
1130 Info files are nearly always created by processing a Texinfo source
1131 document. @command{makeinfo}, also known as @command{texi2any}, is
1132 the principal command that converts a Texinfo file into an Info file;
1133 @pxref{Generic Translator @t{texi2any}}.
1134
1135 Generally, you enter an Info file through a node that by convention is
1136 named `Top'. This node normally contains just a brief summary of the
1137 file's purpose, and a large menu through which the rest of the file is
1138 reached. From this node, you can either traverse the file
1139 systematically by going from node to node, or you can go to a specific
1140 node listed in the main menu, or you can search the index menus and then
1141 go directly to the node that has the information you want. Alternatively,
1142 with the standalone Info program, you can specify specific menu items on
1143 the command line (@pxref{Top,,, info, Info}).
1144
1145 If you want to read through an Info file in sequence, as if it were a
1146 printed manual, you can hit @key{SPC} repeatedly, or you get the whole
1147 file with the advanced Info command @kbd{g *}. (@xref{Advanced,,
1148 Advanced Info commands, info, Info}.)
1149
1150 The @file{dir} file in the @file{info} directory serves as the
1151 departure point for the whole Info system. From it, you can reach the
1152 `Top' nodes of each of the documents in a complete Info system.
1153
1154 @cindex URI syntax for Info
1155 If you wish to refer to an Info file via a URI, you can use the
1156 (unofficial) syntax exemplified by the following. This works with
1157 XEmacs/W3, for example:
1158 @example
1159 info:xemacs#Dissociated%20Press
1160 info:///usr/info/xemacs#Dissociated%20Press
1161 info://localhost/usr/info/xemacs#Dissociated%20Press
1162 @end example
1163
1164 The @command{info} program itself does not follow URIs of any kind.
1165
1166
1167 @node Printed Books
1168 @section Printed Books
1169 @cindex Printed book and manual characteristics
1170 @cindex Manual characteristics, printed
1171 @cindex Book characteristics, printed
1172 @cindex Texinfo printed book characteristics
1173 @cindex Characteristics, printed books or manuals
1174
1175 @cindex Knuth, Donald
1176 A Texinfo file can be formatted and typeset as a printed book or
1177 manual. To do this, you need @TeX{}, a sophisticated typesetting
1178 program written by Donald Knuth of Stanford University.
1179
1180 A Texinfo-based book is similar to any other typeset, printed work: it
1181 can have a title page, copyright page, table of contents, and preface,
1182 as well as chapters, numbered or unnumbered sections and subsections,
1183 page headers, cross references, footnotes, and indices.
1184
1185 @TeX{} is a general purpose typesetting program. Texinfo provides a
1186 file @file{texinfo.tex} that contains information (definitions or
1187 @dfn{macros}) that @TeX{} uses when it typesets a Texinfo file.
1188 (@file{texinfo.tex} tells @TeX{} how to convert the Texinfo @@-commands
1189 to @TeX{} commands, which @TeX{} can then process to create the typeset
1190 document.) @file{texinfo.tex} contains the specifications for printing
1191 a document. You can get the latest version of @file{texinfo.tex} from
1192 the Texinfo home page, @uref{http://www.gnu.org/software/texinfo/}.
1193
1194 In the United States, documents are most often printed on 8.5 inch by
1195 11 inch pages (216@dmn{mm} by 280@dmn{mm}); this is the default size.
1196 But you can also print for 7 inch by 9.25 inch pages (178@dmn{mm} by
1197 235@dmn{mm}, the @code{@@smallbook} size; or on A4 or A5 size paper
1198 (@code{@@afourpaper}, @code{@@afivepaper}).
1199 @xref{@t{@@smallbook}}, and @ref{A4 Paper}.
1200
1201 @cindex Literate programming
1202 @TeX{} is freely distributable. It is written in a superset of Pascal
1203 for literate programming called WEB and can be compiled either in
1204 Pascal or (by using a conversion program that comes with the @TeX{}
1205 distribution) in C.
1206
1207 @TeX{} is very powerful and has a great many features. Because a
1208 Texinfo file must be able to present information both on a
1209 character-only terminal in Info form and in a typeset book, the
1210 formatting commands that Texinfo supports are necessarily limited.
1211
1212 @xref{Obtaining @TeX{}}, for information on acquiring @TeX{}. It is
1213 not part of the Texinfo distribution.
1214
1215
1216 @node Formatting Commands
1217 @section @@-commands
1218 @cindex @@-commands
1219 @cindex Formatting commands
1220
1221 In a Texinfo file, the commands you write to describe the contents of
1222 the manual are preceded by an @samp{@@} character; they are called
1223 @dfn{@@-commands}. For example, @code{@@node} is the command to
1224 indicate a node and @code{@@chapter} is the command to indicate the
1225 start of a chapter. Almost all @@ command names are entirely
1226 lowercase.
1227
1228 Texinfo's @@-commands are a strictly limited set of constructs. The
1229 strict limits are primarily intended to ``force'' you, the author, to
1230 concentrate on the writing and the content of your manual, rather than
1231 the details of the formatting.
1232
1233 Depending on what they do or what arguments@footnote{The word
1234 @dfn{argument} comes from the way it is used in mathematics and does not
1235 refer to a dispute between two people; it refers to the information
1236 presented to the command. According to the @cite{Oxford English
1237 Dictionary}, the word derives from the Latin for @dfn{to make clear,
1238 prove}; thus it came to mean `the evidence offered as proof', which is
1239 to say, `the information offered', which led to its mathematical
1240 meaning. In its other thread of derivation, the word came to mean `to
1241 assert in a manner against which others may make counter assertions',
1242 which led to the meaning of `argument' as a dispute.} they take, you
1243 need to write @@-commands on lines of their own or as part of
1244 sentences:
1245
1246 @itemize @bullet
1247 @item
1248 Some commands are written at the start of a line and the rest of the
1249 line comprises the argument text, such as @code{@@chapter} (which
1250 creates chapter titles).
1251
1252 @item
1253 Some commands can appear anywhere, generally within a sentence, and
1254 are followed by empty braces, such as @code{@@dots@{@}} (which creates
1255 an ellipsis @dots{}).
1256
1257 @item
1258 Some commands can appear anywhere, generally within a sentence, and
1259 are followed by the argument text in braces, such as
1260 @code{@@code@{a+1@}} (which marks text as being code, @code{a+1} being
1261 the argument in this case).
1262
1263 @item
1264 Some commands are written at the start of a line, with general text on
1265 following lines, terminated by a matching @code{@@end} command on a
1266 line of its own. For example, @code{@@example}, then the lines of a
1267 coding example, then @code{@@end example}.
1268 @end itemize
1269
1270 @noindent
1271 @cindex Braces, when to use
1272 As a general rule, a command requires braces if it mingles among other
1273 text; but it does not need braces if it is on a line of its own. The
1274 non-alphabetic commands, such as @code{@@:}, are exceptions to the
1275 rule; they do not need braces.
1276
1277 As you gain experience with Texinfo, you will rapidly learn how to
1278 write the different commands: the different ways to write commands
1279 actually make it easier to write and read Texinfo files than if all
1280 commands followed exactly the same syntax. @xref{Command Syntax, ,
1281 @@-Command Syntax}, for all the details.
1282
1283
1284 @node Conventions
1285 @section General Syntactic Conventions
1286 @cindex General syntactic conventions
1287 @cindex Syntactic conventions
1288 @cindex Conventions, syntactic
1289 @cindex Characters, basic input
1290
1291 This section describes the general conventions used in all Texinfo documents.
1292
1293 @itemize @bullet
1294 @item
1295 @cindex Source files, characters used
1296 All printable ASCII characters except @samp{@@}, @samp{@{} and
1297 @samp{@}} can appear in a Texinfo file and stand for themselves.
1298 @samp{@@} is the escape character which introduces commands, while
1299 @samp{@{} and @samp{@}} are used to surround arguments to certain
1300 commands. To put one of these special characters into the document, put
1301 an @samp{@@} character in front of it, like this: @samp{@@@@},
1302 @samp{@@@{}, and @samp{@@@}}.
1303
1304 @item
1305 Texinfo supports the usual quotation marks used in English and in
1306 other languages; see @ref{Inserting Quotation Marks}.
1307
1308 @item
1309 @cindex Multiple dashes in source
1310 @cindex Dashes in source
1311 @cindex Hyphens in source, two or three in a row
1312 @cindex Em dash, producing
1313 @cindex En dash, producing
1314 Use three hyphens in a row, @samp{---}, to produce a long dash---like
1315 this (called an @dfn{em dash}), used for punctuation in sentences.
1316 Use two hyphens, @samp{--}, to produce a medium dash (called an
1317 @dfn{en dash}), used primarily for numeric ranges, as in ``June
1318 25--26''. Use a single hyphen, @samp{-}, to produce a standard hyphen
1319 used in compound words. For display on the screen, Info reduces three
1320 hyphens to two and two hyphens to one (not transitively!). Of course,
1321 any number of hyphens in the source remain as they are in literal
1322 contexts, such as @code{@@code} and @code{@@example}.
1323
1324 @item
1325 @cindex Form feed characters
1326 @cindex @kbd{CTRL-l}
1327 Form feed (@kbd{CTRL-l}) characters in the input are handled as
1328 follows:
1329
1330 @table @asis
1331 @item PDF/DVI
1332 In normal text, treated as ending any open paragraph; essentially
1333 ignored between paragraphs.
1334
1335 @item Info
1336 Output as-is between paragraphs (their most common use); in other
1337 contexts, they may be treated as regular spaces (and thus consolidated
1338 with surrounding whitespace).
1339
1340 @item HTML
1341 Written as a numeric entity except contexts where spaces are ignored;
1342 for example, in @samp{@@footnote@{ ^L foo@}}, the form feed is
1343 ignored.
1344
1345 @item XML
1346 Keep them everywhere; in attributes, escaped as @samp{\f}; also,
1347 @samp{\} is escaped as @samp{\\} and newline as @samp{\n}.
1348
1349 @item Docbook
1350 Completely removed, as they are not allowed.
1351 @end table
1352
1353 As you can see, because of these differing requirements of the output
1354 formats, it's not possible to use form feeds completely portably.
1355
1356 @item
1357 @cindex Tabs; don't use!
1358 @strong{Caution:} Last, do not use tab characters in a Texinfo file!
1359 (Except perhaps in verbatim modes.) @TeX{} uses variable-width fonts,
1360 which means that it is impractical at best to define a tab to work in
1361 all circumstances. Consequently, @TeX{} treats tabs like single
1362 spaces, and that is not what they look like in the source.
1363 Furthermore, @code{makeinfo} does nothing special with tabs, and thus
1364 a tab character in your input file will usually have a different
1365 appearance in the output.
1366
1367 @noindent
1368 To avoid this problem, Texinfo mode in XEmacs inserts
1369 multiple spaces when you press the @key{TAB} key. Also, you can run
1370 @code{untabify} in XEmacs to convert tabs in a region to multiple
1371 spaces, or use the @code{unexpand} command from the shell.
1372 @end itemize
1373
1374
1375 @node Comments
1376 @section Comments
1377
1378 @cindex Comments
1379 @findex comment
1380 @findex c @r{(comment)}
1381
1382 You can write comments in a Texinfo file by using the @code{@@comment}
1383 command, which may be abbreviated to @code{@@c}. Such comments are
1384 for a person looking at the Texinfo source file. All the text on a
1385 line that follows either @code{@@comment} or @code{@@c} is a comment;
1386 the rest of the line does not appear in the visible output.
1387
1388 Often, you can write the @code{@@comment} or @code{@@c} in the middle
1389 of a line, and only the text that follows after the @code{@@comment}
1390 or @code{@@c} command does not appear; but some commands, such as
1391 @code{@@settitle} and @code{@@setfilename}, work on a whole line. You
1392 cannot use @code{@@comment} or @code{@@c} within a line beginning with
1393 such a command.
1394
1395 @findex DEL @r{(comment character)}
1396 @cindex Catcode for comments in @TeX{}
1397 In cases of nested command invocations, complicated macro definitions,
1398 etc., @code{@@c} and @code{@@comment} may provoke an error when
1399 processing with @TeX{}. Therefore, you can also use the @kbd{DEL}
1400 character (ASCII 127 decimal, 0x7f hex, 0177 octal) as a true @TeX{}
1401 comment character (catcode 14, in @TeX{} internals). Everything on
1402 the line after the @kbd{DEL} will be ignored.
1403
1404 @cindex Ignored text
1405 @cindex Unprocessed text
1406 @findex ignore
1407 You can also have long stretches of text to be ignored by the Texinfo
1408 processors with the @code{@@ignore} and @code{@@end ignore} commands.
1409 Write each of these commands on a line of its own, starting each
1410 command at the beginning of the line. Text between these two commands
1411 does not appear in the processed output. You can use @code{@@ignore}
1412 and @code{@@end ignore} for writing comments. (For some technical
1413 caveats regarding nesting of such commands, @pxref{Conditional
1414 Nesting}.)
1415
1416
1417 @node Minimum
1418 @section What a Texinfo File Must Have
1419 @cindex Minimal Texinfo file (requirements)
1420 @cindex Must have in Texinfo file
1421 @cindex Required in Texinfo file
1422 @cindex Texinfo file minimum
1423
1424 By convention, the name of a Texinfo file ends with (in order of
1425 preference) one of the extensions @file{.texinfo}, @file{.texi},
1426 @file{.txi}, or @file{.tex}. The longer extensions are preferred
1427 since they describe more clearly to a human reader the nature of the
1428 file. The shorter extensions are for operating systems that cannot
1429 handle long file names.
1430
1431 In order to be made into a good printed manual and other output
1432 formats, a Texinfo file @emph{must} begin with lines like this:
1433
1434 @example
1435 @group
1436 \input texinfo
1437 @@setfilename @var{info-file-name}
1438 @@settitle @var{name-of-manual}
1439 @end group
1440 @end example
1441
1442 @noindent
1443 The contents of the file follow this beginning, and then you
1444 @emph{must} end the Texinfo source with a line like this:
1445
1446 @example
1447 @@bye
1448 @end example
1449
1450 @findex \input @r{(raw @TeX{} startup)}
1451 @noindent
1452 Here's an explanation:
1453
1454 @itemize @bullet
1455 @item
1456 The @samp{\input texinfo} line tells @TeX{} to use the
1457 @file{texinfo.tex} file, which tells @TeX{} how to translate the Texinfo
1458 @@-commands into @TeX{} typesetting commands. (Note the use of the
1459 backslash, @samp{\}; this is correct for @TeX{}.)
1460
1461 @item
1462 The @code{@@setfilename} line provides a name for the Info file and
1463 tells @TeX{} to open auxiliary files. @strong{All text before
1464 @code{@@setfilename} is ignored!}
1465
1466 @item
1467 The @code{@@settitle} line specifies a title for the page headers (or
1468 footers) of the printed manual, and the default title and document
1469 description for the @samp{<head>} in HTML@. Strictly speaking,
1470 @code{@@settitle} is optional---if you don't mind your document being
1471 titled `Untitled'.
1472
1473 @item
1474 The @code{@@bye} line at the end of the file on a line of its own tells
1475 the formatters that the file is ended and to stop formatting.
1476 @end itemize
1477
1478 If you use XEmacs, it is also useful to include mode setting and
1479 start-of-header and end-of-header lines at the beginning of a Texinfo
1480 file, like this:
1481
1482 @example
1483 @group
1484 \input texinfo @@c -*-texinfo-*-
1485 @@c %**start of header
1486 @@setfilename @var{info-file-name}
1487 @@settitle @var{name-of-manual}
1488 @@c %**end of header
1489 @end group
1490 @end example
1491
1492 @noindent
1493 In the first line, @samp{-*-texinfo-*-} causes XEmacs to switch into
1494 Texinfo mode when you edit the file.
1495
1496 The @code{@@c ...header} lines above which surround the
1497 @code{@@setfilename} and @code{@@settitle} lines allow you to process,
1498 within XEmacs, just part of the Texinfo source. (@xref{Start of
1499 Header}.)
1500
1501 Furthermore, you will usually provide a Texinfo file with a title page,
1502 indices, and the like, all of which are explained in this manual. But
1503 the minimum, which can be useful for short documents, is just the three
1504 lines at the beginning and the one line at the end.
1505
1506
1507 @node Six Parts
1508 @section Six Parts of a Texinfo File
1509
1510 Generally, a Texinfo file contains more than the minimal beginning and
1511 end described in the previous section---it usually contains the six
1512 parts listed below. These are described fully in the following sections.
1513
1514 @table @r
1515 @item 1. Header
1516 The @dfn{Header} names the file, tells @TeX{} which definitions file to
1517 use, and other such housekeeping tasks.
1518
1519 @item 2. Summary and Copyright
1520 The @dfn{Summary and Copyright} segment describes the document and
1521 contains the copyright notice and copying permissions. This is done
1522 with the @code{@@copying} command.
1523
1524 @item 3. Title and Copyright
1525 The @dfn{Title and Copyright} segment contains the title and copyright
1526 pages for the printed manual. The segment must be enclosed between
1527 @code{@@titlepage} and @code{@@end titlepage} commands. The title and
1528 copyright page appear only in the printed manual.
1529
1530 @item 4. `Top' Node and Master Menu
1531 The `Top' node starts off the online output; it does not appear in the
1532 printed manual. We recommend including the copying permissions here as
1533 well as the segments above. And it contains at least a top-level menu
1534 listing the chapters, and possibly a @dfn{Master Menu} listing all the
1535 nodes in the entire document.
1536
1537 @item 5. Body
1538 The @dfn{Body} of the document is typically structured like a
1539 traditional book or encyclopedia, but it may be free form.
1540
1541 @item 6. End
1542 The @dfn{End} segment may contain commands for printing indices, and
1543 closes with the @code{@@bye} command on a line of its own.
1544 @end table
1545
1546
1547 @node Short Sample
1548 @section A Short Sample Texinfo File
1549 @cindex Sample Texinfo file, with comments
1550
1551 Here is a very short but complete Texinfo file, in the six conventional
1552 parts enumerated in the previous section, so you can see how Texinfo
1553 source appears in practice. The first three parts of the file, from
1554 @samp{\input texinfo} through to @samp{@@end titlepage}, look more
1555 intimidating than they are: most of the material is standard
1556 boilerplate; when writing a manual, you simply change the names as
1557 appropriate.
1558
1559 @xref{Beginning a File}, for full documentation on the commands listed
1560 here. @xref{GNU Sample Texts}, for the full texts to be used in GNU
1561 manuals.
1562
1563 In the following, the sample text is @emph{indented}; comments on it are
1564 not. The complete file, without interspersed comments, is shown in
1565 @ref{Short Sample Texinfo File}.
1566
1567 @subheading Part 1: Header
1568
1569 @noindent
1570 The header does not appear in either the Info file or the
1571 printed output. It sets various parameters, including the
1572 name of the Info file and the title used in the header.
1573
1574 @example
1575 @group
1576 \input texinfo @@c -*-texinfo-*-
1577 @@c %**start of header
1578 @@setfilename sample.info
1579 @@settitle Sample Manual 1.0
1580 @@c %**end of header
1581 @end group
1582 @end example
1583
1584 @subheading Part 2: Summary Description and Copyright
1585
1586 @noindent
1587 A real manual includes more text here, according to the license under
1588 which it is distributed. @xref{GNU Sample Texts}.
1589
1590 @example
1591 @group
1592 @@copying
1593 This is a short example of a complete Texinfo file, version 1.0.
1594
1595 Copyright @@copyright@{@} 2013 Free Software Foundation, Inc.
1596 @@end copying
1597 @end group
1598 @end example
1599
1600 @subheading Part 3: Titlepage, Contents, Copyright
1601
1602 @noindent
1603 The titlepage segment does not appear in the online output, only in the
1604 printed manual. We use the @code{@@insertcopying} command to
1605 include the permission text from the previous section, instead of
1606 writing it out again; it is output on the back of the title page. The
1607 @code{@@contents} command generates a table of contents.
1608
1609 @example
1610 @group
1611 @@titlepage
1612 @@title Sample Title
1613 @end group
1614
1615 @group
1616 @@c The following two commands start the copyright page.
1617 @@page
1618 @@vskip 0pt plus 1filll
1619 @@insertcopying
1620 @@end titlepage
1621 @end group
1622
1623 @@c Output the table of contents at the beginning.
1624 @@contents
1625 @end example
1626
1627 @subheading Part 4: `Top' Node and Master Menu
1628
1629 @noindent
1630 The `Top' node contains the master menu for the Info file. Since the
1631 printed manual uses a table of contents rather than a menu, it
1632 excludes the `Top' node. We repeat the short description from the
1633 beginning of the @samp{@@copying} text, but there's no need to repeat
1634 the copyright information, so we don't use @samp{@@insertcopying} here.
1635 The @samp{@@top} command itself helps @command{makeinfo} determine the
1636 relationships between nodes.
1637
1638 @example
1639 @@ifnottex
1640 @@node Top
1641 @@top Short Sample
1642
1643 This is a short sample Texinfo file.
1644 @@end ifnottex
1645
1646 @group
1647 @@menu
1648 * First Chapter:: The first chapter is the
1649 only chapter in this sample.
1650 * Index:: Complete index.
1651 @@end menu
1652 @end group
1653 @end example
1654
1655
1656 @subheading Part 5: The Body of the Document
1657
1658 @noindent
1659 The body segment contains all the text of the document, but not the
1660 indices or table of contents. This example illustrates a node and a
1661 chapter containing an enumerated list.
1662
1663 @example
1664 @group
1665 @@node First Chapter
1666 @@chapter First Chapter
1667
1668 @@cindex chapter, first
1669 @end group
1670
1671 @group
1672 This is the first chapter.
1673 @@cindex index entry, another
1674 @end group
1675
1676 @group
1677 Here is a numbered list.
1678
1679 @@enumerate
1680 @@item
1681 This is the first item.
1682
1683 @@item
1684 This is the second item.
1685 @@end enumerate
1686 @end group
1687 @end example
1688
1689
1690 @subheading Part 6: The End of the Document
1691
1692 @noindent
1693 The end segment contains commands for generating an index in a node and
1694 unnumbered chapter of its own, and the @code{@@bye} command that marks
1695 the end of the document.
1696
1697 @example
1698 @group
1699 @@node Index
1700 @@unnumbered Index
1701 @end group
1702
1703 @group
1704 @@printindex cp
1705
1706 @@bye
1707 @end group
1708 @end example
1709
1710
1711 @subheading Some Results
1712
1713 Here is what the contents of the first chapter of the sample look like:
1714
1715 @sp 1
1716 @need 700
1717 @quotation
1718 This is the first chapter.
1719
1720 Here is a numbered list.
1721
1722 @enumerate
1723 @item
1724 This is the first item.
1725
1726 @item
1727 This is the second item.
1728 @end enumerate
1729 @end quotation
1730
1731
1732 @node History
1733 @section History
1734
1735 @cindex Stallman, Richard M.
1736 @cindex Chassell, Robert J.
1737 @cindex Fox, Brian
1738 @cindex Berry, Karl
1739 Richard M. Stallman invented the Texinfo format, wrote the initial
1740 processors, and created Edition 1.0 of this manual. Robert@tie{}J.
1741 Chassell greatly revised and extended the manual, starting with
1742 Edition 1.1. Brian Fox was responsible for the standalone Texinfo
1743 distribution until version 3.8, and originally wrote the standalone
1744 @command{makeinfo} and @command{info} programs. Karl Berry has
1745 continued maintenance since Texinfo 3.8 (manual edition 2.22).
1746
1747 @cindex Pinard, Fran@,{c}ois
1748 @cindex Schwab, Andreas
1749 @cindex Weinberg, Zack
1750 @cindex Weisshaus, Melissa
1751 @cindex Zaretskii, Eli
1752 @cindex Zuhn, David D.
1753 Our thanks go out to all who helped improve this work, particularly
1754 the indefatigable Eli Zaretskii and Andreas Schwab, who have provided
1755 patches beyond counting. Fran@,{c}ois Pinard and David@tie{}D. Zuhn,
1756 tirelessly recorded and reported mistakes and obscurities. Zack
1757 Weinberg did the impossible by implementing the macro syntax in
1758 @file{texinfo.tex}. Thanks to Melissa Weisshaus for her frequent
1759 reviews of nearly similar editions. Dozens of others have contributed
1760 patches and suggestions, they are gratefully acknowledged in the
1761 @file{ChangeLog} file. Our mistakes are our own.
1762
1763 @cindex History of Texinfo
1764 @cindex Texinfo history
1765 @subheading Beginnings
1766
1767 @cindex Scribe
1768 @cindex Reid, Brian
1769 In the 1970's at CMU, Brian Reid developed a program and format named
1770 Scribe to mark up documents for printing. It used the @code{@@}
1771 character to introduce commands, as Texinfo does. Much more
1772 consequentially, it strove to describe document contents rather than
1773 formatting, an idea wholeheartedly adopted by Texinfo.
1774
1775 @cindex Bolio
1776 @cindex Bo@TeX{}
1777 Meanwhile, people at MIT developed another, not too dissimilar format
1778 called Bolio. This then was converted to using @TeX{} as its typesetting
1779 language: Bo@TeX{}. The earliest Bo@TeX{} version seems to have been
1780 0.02 on October 31, 1984.
1781
1782 Bo@TeX{} could only be used as a markup language for documents to be
1783 printed, not for online documents. Richard Stallman (RMS) worked on
1784 both Bolio and Bo@TeX{}. He also developed a nifty on-line help format
1785 called Info, and then combined Bo@TeX{} and Info to create Texinfo, a
1786 mark up language for text that is intended to be read both online and
1787 as printed hard copy.
1788
1789 Moving forward, the original translator to create Info was written
1790 (primarily by RMS and Bob Chassell) in Emacs Lisp, namely the
1791 @code{texinfo-format-buffer} and other functions. In the early 1990s,
1792 Brian Fox reimplemented the conversion program in C, now called
1793 @command{makeinfo}.
1794
1795 @subheading Reimplementing in Perl
1796
1797 @cindex Cons, Lionel
1798 @cindex Dumas, Patrice
1799 In 2012, the C @command{makeinfo} was itself replaced by a Perl
1800 implementation generically called @command{texi2any}. This version
1801 supports the same level of output customization as
1802 @command{texi2html}, an independent program originally written by
1803 Lionel Cons, later with substantial work by many others. The many
1804 additional features needed to make @command{texi2html} a replacement
1805 for @command{makeinfo} were implemented by Patrice Dumas. The first
1806 never-released version of @command{texi2any} was based on the
1807 @command{texi2html} code. That implementation, however, was abandoned
1808 in favor of the current program, which parses the Texinfo input into a
1809 tree for processing. It still supports nearly all the features of
1810 @command{texi2html}.
1811
1812 The new Perl program is much slower than the old C program. We hope
1813 the speed gap will close in the future, but it may not ever be
1814 entirely comparable. So why did we switch? In short, we intend and
1815 hope that the present program will be much easier than the previous C
1816 implementation of @command{makeinfo} to extend to different output
1817 styles, back-end output formats, and all other customizations.
1818 In more detail:
1819
1820 @itemize @bullet
1821 @item HTML customization. Many GNU and other free software packages
1822 had been happily using the HTML customization features in
1823 @command{texi2html} for years. Thus, in effect two independent
1824 implementations of the Texinfo language had developed, and keeping
1825 them in sync was not simple. Adding the HTML customization possible
1826 in @command{texi2html} to a C program would have been an
1827 enormous effort.
1828
1829 @item Unicode, and multilingual support generally, especially of east
1830 Asian languages. Although of course it's perfectly plausible to write
1831 such support in C, in the particular case of @command{makeinfo}, it
1832 would have been tantamount to rewriting the entire program. In Perl,
1833 much of that comes essentially for free.
1834
1835 @item Additional back-ends. The @command{makeinfo} code had become
1836 convoluted to the point where adding a new back-end was quite complex,
1837 requiring complex interactions with existing back-ends. In contrast,
1838 our Perl implementation provides a clean tree-based representation for
1839 all back-ends to work from. People have requested numerous different
1840 back-ends (@LaTeX{}, the latest (X)HTML, @dots{}), and they will now
1841 be much more feasible to implement. Which leads to the last item:
1842
1843 @item Making contributions easier. In general, due to the cleaner
1844 structure, the Perl program should be considerably easier than the C
1845 for anyone to read and contribute to, with the resulting obvious
1846 benefits.
1847 @end itemize
1848
1849 @xref{Reference Implementation}, for more on the rationale for and
1850 role of @command{texi2any}.
1851
1852
1853 @node Texinfo Mode
1854 @chapter Using Texinfo Mode
1855 @cindex Texinfo mode
1856 @cindex Mode, using Texinfo
1857 @cindex XEmacs
1858 @cindex Emacs
1859
1860 You may edit a Texinfo file with any text editor you choose. A Texinfo
1861 file is no different from any other ASCII file. However, XEmacs
1862 comes with a special mode, called Texinfo mode, that provides XEmacs
1863 commands and tools to help ease your work.
1864
1865 This chapter describes features of XEmacs' Texinfo mode but not any
1866 features of the Texinfo formatting language. So if you are reading this
1867 manual straight through from the beginning, you may want to skim through
1868 this chapter briefly and come back to it after reading succeeding
1869 chapters which describe the Texinfo formatting language in detail.
1870
1871 @menu
1872 * Texinfo Mode Overview:: How Texinfo mode can help you.
1873 * XEmacs Editing:: Texinfo mode adds to XEmacs' general
1874 purpose editing features.
1875 * Inserting:: How to insert frequently used @@-commands.
1876 * Showing the Structure:: How to show the structure of a file.
1877 * Updating Nodes and Menus:: How to update or create new nodes and menus.
1878 * Info Formatting:: How to format for Info.
1879 * Printing:: How to format and print part or all of a file.
1880 * Texinfo Mode Summary:: Summary of all the Texinfo mode commands.
1881 @end menu
1882
1883 @node Texinfo Mode Overview
1884 @section Texinfo Mode Overview
1885
1886 Texinfo mode provides special features for working with Texinfo files.
1887 You can:
1888
1889 @itemize @bullet
1890 @item
1891 Insert frequently used @@-commands.
1892
1893 @item
1894 Automatically create @code{@@node} lines.
1895
1896 @item
1897 Show the structure of a Texinfo source file.
1898
1899 @item
1900 Automatically create or update the `Next',
1901 `Previous', and `Up' pointers of a node.
1902
1903 @item
1904 Automatically create or update menus.
1905
1906 @item
1907 Automatically create a master menu.
1908
1909 @item
1910 Format a part or all of a file for Info.
1911
1912 @item
1913 Typeset and print part or all of a file.
1914 @end itemize
1915
1916 Perhaps the two most helpful features are those for inserting frequently
1917 used @@-commands and for creating node pointers and menus.
1918
1919 @node XEmacs Editing
1920 @section The Usual XEmacs Editing Commands
1921
1922 In most cases, the usual Text mode commands work the same in Texinfo
1923 mode as they do in Text mode. Texinfo mode adds new editing commands
1924 and tools to XEmacs' general purpose editing features. The major
1925 difference concerns filling. In Texinfo mode, the paragraph
1926 separation variable and syntax table are redefined so that Texinfo
1927 commands that should be on lines of their own are not inadvertently
1928 included in paragraphs. Thus, the @kbd{M-q} (@code{fill-paragraph})
1929 command will refill a paragraph but not mix an indexing command on a
1930 line adjacent to it into the paragraph.
1931
1932 In addition, Texinfo mode sets the @code{page-delimiter} variable to
1933 the value of @code{texinfo-chapter-level-regexp}; by default, this is
1934 a regular expression matching the commands for chapters and their
1935 equivalents, such as appendices. With this value for the page
1936 delimiter, you can jump from chapter title to chapter title with the
1937 @kbd{C-x ]} (@code{forward-page}) and @kbd{C-x [}
1938 (@code{backward-page}) commands and narrow to a chapter with the
1939 @kbd{C-x n p} (@code{narrow-to-page}) command. (@xref{Pages, , ,xemacs,
1940 XEmacs User's Manual}, for details about the page commands.)
1941
1942 You may name a Texinfo file however you wish, but the convention is to
1943 end a Texinfo file name with one of the extensions
1944 @file{.texinfo}, @file{.texi}, @file{.txi}, or @file{.tex}. A longer
1945 extension is preferred, since it is explicit, but a shorter extension
1946 may be necessary for operating systems that limit the length of file
1947 names. XEmacs automatically enters Texinfo mode when you visit a
1948 file with a @file{.texinfo}, @file{.texi} or @file{.txi}
1949 extension. Also, XEmacs switches to Texinfo mode
1950 when you visit a
1951 file that has @samp{-*-texinfo-*-} in its first line. If ever you are
1952 in another mode and wish to switch to Texinfo mode, type @code{M-x
1953 texinfo-mode}.
1954
1955 Like all other XEmacs features, you can customize or enhance Texinfo
1956 mode as you wish. In particular, the keybindings are very easy to
1957 change. The keybindings described here are the default or standard
1958 ones.
1959
1960 @node Inserting
1961 @section Inserting Frequently Used Commands
1962 @cindex Inserting frequently used commands
1963 @cindex Frequently used commands, inserting
1964 @cindex Commands, inserting them
1965
1966 Texinfo mode provides commands to insert various frequently used
1967 @@-commands into the buffer. You can use these commands to save
1968 keystrokes.
1969
1970 The insert commands are invoked by typing @kbd{C-c} twice and then the
1971 first letter of the @@-command:
1972
1973 @table @kbd
1974 @item C-c C-c c
1975 @itemx M-x texinfo-insert-@@code
1976 @findex texinfo-insert-@@code
1977 Insert @code{@@code@{@}} and put the
1978 cursor between the braces.
1979
1980 @item C-c C-c d
1981 @itemx M-x texinfo-insert-@@dfn
1982 @findex texinfo-insert-@@dfn
1983 Insert @code{@@dfn@{@}} and put the
1984 cursor between the braces.
1985
1986 @item C-c C-c e
1987 @itemx M-x texinfo-insert-@@end
1988 @findex texinfo-insert-@@end
1989 Insert @code{@@end} and attempt to insert the correct following word,
1990 such as @samp{example} or @samp{table}. (This command does not handle
1991 nested lists correctly, but inserts the word appropriate to the
1992 immediately preceding list.)
1993
1994 @item C-c C-c i
1995 @itemx M-x texinfo-insert-@@item
1996 @findex texinfo-insert-@@item
1997 Insert @code{@@item} and put the
1998 cursor at the beginning of the next line.
1999
2000 @item C-c C-c k
2001 @itemx M-x texinfo-insert-@@kbd
2002 @findex texinfo-insert-@@kbd
2003 Insert @code{@@kbd@{@}} and put the
2004 cursor between the braces.
2005
2006 @item C-c C-c n
2007 @itemx M-x texinfo-insert-@@node
2008 @findex texinfo-insert-@@node
2009 Insert @code{@@node} and a comment line
2010 listing the sequence for the `Next',
2011 `Previous', and `Up' nodes.
2012 Leave point after the @code{@@node}.
2013
2014 @item C-c C-c o
2015 @itemx M-x texinfo-insert-@@noindent
2016 @findex texinfo-insert-@@noindent
2017 Insert @code{@@noindent} and put the
2018 cursor at the beginning of the next line.
2019
2020 @item C-c C-c s
2021 @itemx M-x texinfo-insert-@@samp
2022 @findex texinfo-insert-@@samp
2023 Insert @code{@@samp@{@}} and put the
2024 cursor between the braces.
2025
2026 @item C-c C-c t
2027 @itemx M-x texinfo-insert-@@table
2028 @findex texinfo-insert-@@table
2029 Insert @code{@@table} followed by a @key{SPC}
2030 and leave the cursor after the @key{SPC}.
2031
2032 @item C-c C-c v
2033 @itemx M-x texinfo-insert-@@var
2034 @findex texinfo-insert-@@var
2035 Insert @code{@@var@{@}} and put the
2036 cursor between the braces.
2037
2038 @item C-c C-c x
2039 @itemx M-x texinfo-insert-@@example
2040 @findex texinfo-insert-@@example
2041 Insert @code{@@example} and put the
2042 cursor at the beginning of the next line.
2043
2044 @c M-@{ was the binding for texinfo-insert-braces;
2045 @c in Emacs 19, backward-paragraph will take this binding.
2046 @item C-c C-c @{
2047 @itemx M-x texinfo-insert-braces
2048 @findex texinfo-insert-braces
2049 Insert @code{@{@}} and put the cursor between the braces.
2050
2051 @item C-c @}
2052 @itemx C-c ]
2053 @itemx M-x up-list
2054 @findex up-list
2055 Move from between a pair of braces forward past the closing brace.
2056 Typing @kbd{C-c ]} is easier than typing @kbd{C-c @}}, which
2057 is, however, more mnemonic; hence the two keybindings. (Also, you can
2058 move out from between braces by typing @kbd{C-f}.)
2059 @end table
2060
2061 To put a command such as @w{@code{@@code@{@dots{}@}}} around an
2062 @emph{existing} word, position the cursor in front of the word and type
2063 @kbd{C-u 1 C-c C-c c}. This makes it easy to edit existing plain text.
2064 The value of the prefix argument tells XEmacs how many words following
2065 point to include between braces---@samp{1} for one word, @samp{2} for
2066 two words, and so on. Use a negative argument to enclose the previous
2067 word or words. If you do not specify a prefix argument, XEmacs inserts
2068 the @@-command string and positions the cursor between the braces. This
2069 feature works only for those @@-commands that operate on a word or words
2070 within one line, such as @code{@@kbd} and @code{@@var}.
2071
2072 This set of insert commands was created after analyzing the frequency
2073 with which different @@-commands are used in the @cite{XEmacs User's
2074 Manual} and the @cite{GDB Manual}. If you wish to add your own insert
2075 commands, you can bind a keyboard macro to a key, use abbreviations,
2076 or extend the code in @file{texinfo.el}.
2077
2078 @findex texinfo-start-menu-description
2079 @cindex Menu description, start
2080 @cindex Description for menu, start
2081 @kbd{C-c C-c C-d} (@code{texinfo-start-menu-description}) is an insert
2082 command that works differently from the other insert commands. It
2083 inserts a node's section or chapter title in the space for the
2084 description in a menu entry line. (A menu entry has three parts, the
2085 entry name, the node name, and the description. Only the node name is
2086 required, but a description helps explain what the node is about.
2087 @xref{Menu Parts, , The Parts of a Menu}.)
2088
2089 To use @code{texinfo-start-menu-description}, position point in a menu
2090 entry line and type @kbd{C-c C-c C-d}. The command looks for and copies
2091 the title that goes with the node name, and inserts the title as a
2092 description; it positions point at beginning of the inserted text so you
2093 can edit it. The function does not insert the title if the menu entry
2094 line already contains a description.
2095
2096 This command is only an aid to writing descriptions; it does not do the
2097 whole job. You must edit the inserted text since a title tends to use
2098 the same words as a node name but a useful description uses different
2099 words.
2100
2101 @node Showing the Structure
2102 @section Showing the Sectioning Structure of a File
2103 @cindex Showing the sectioning structure of a file
2104 @cindex Sectioning structure of a file, showing
2105 @cindex Structure of a file, showing
2106 @cindex Outline of file structure, showing
2107 @cindex Contents-like outline of file structure
2108 @cindex File sectioning structure, showing
2109 @cindex Texinfo file sectioning structure, showing
2110
2111 You can show the sectioning structure of a Texinfo file by using the
2112 @kbd{C-c C-s} command (@code{texinfo-show-structure}). This command
2113 lists the lines that begin with the @@-commands for @code{@@chapter},
2114 @code{@@section}, and the like. It constructs what amounts to a table
2115 of contents. These lines are displayed in another buffer called the
2116 @samp{*Occur*} buffer. In that buffer, you can position the cursor
2117 over one of the lines and use the @kbd{C-c C-c} command
2118 (@code{occur-mode-goto-occurrence}), to jump to the corresponding spot
2119 in the Texinfo file.
2120
2121 @table @kbd
2122 @item C-c C-s
2123 @itemx M-x texinfo-show-structure
2124 @findex texinfo-show-structure
2125 Show the @code{@@chapter}, @code{@@section}, and such lines of a
2126 Texinfo file.
2127
2128 @item C-c C-c
2129 @itemx M-x occur-mode-goto-occurrence
2130 @findex occur-mode-goto-occurrence
2131 Go to the line in the Texinfo file corresponding to the line under the
2132 cursor in the @file{*Occur*} buffer.
2133 @end table
2134
2135 If you call @code{texinfo-show-structure} with a prefix argument by
2136 typing @w{@kbd{C-u C-c C-s}}, it will list not only those lines with the
2137 @@-commands for @code{@@chapter}, @code{@@section}, and the like, but
2138 also the @code{@@node} lines. You can use @code{texinfo-show-structure}
2139 with a prefix argument to check whether the `Next', `Previous', and `Up'
2140 pointers of an @code{@@node} line are correct.
2141
2142 Often, when you are working on a manual, you will be interested only
2143 in the structure of the current chapter. In this case, you can mark
2144 off the region of the buffer that you are interested in by using the
2145 @kbd{C-x n n} (@code{narrow-to-region}) command and
2146 @code{texinfo-show-structure} will work on only that region. To see
2147 the whole buffer again, use @w{@kbd{C-x n w}} (@code{widen}).
2148 (@xref{Narrowing, , , xemacs, XEmacs User's Manual}, for more
2149 information about the narrowing commands.)
2150
2151 @vindex page-delimiter
2152 @cindex Page delimiter in Texinfo mode
2153 In addition to providing the @code{texinfo-show-structure} command,
2154 Texinfo mode sets the value of the page delimiter variable to match
2155 the chapter-level @@-commands. This enables you to use the @kbd{C-x
2156 ]} (@code{forward-page}) and @kbd{C-x [} (@code{backward-page})
2157 commands to move forward and backward by chapter, and to use the
2158 @kbd{C-x n p} (@code{narrow-to-page}) command to narrow to a chapter.
2159 @xref{Pages, , , xemacs, XEmacs User's Manual}, for more information
2160 about the page commands.
2161
2162
2163 @node Updating Nodes and Menus
2164 @section Updating Nodes and Menus
2165
2166 @cindex Updating nodes and menus
2167 @cindex Create nodes, menus automatically
2168 @cindex Insert nodes, menus automatically
2169 @cindex Automatically insert nodes, menus
2170
2171 Texinfo mode provides commands for automatically creating or updating
2172 menus and node pointers. The commands are called ``update'' commands
2173 because their most frequent use is for updating a Texinfo file after you
2174 have worked on it; but you can use them to insert the `Next',
2175 `Previous', and `Up' pointers into an @code{@@node} line that has none
2176 and to create menus in a file that has none.
2177
2178 If you do not use any updating commands, you need to write menus and
2179 node pointers by hand, which is a tedious task.
2180
2181 @menu
2182 * Updating Commands:: Five major updating commands.
2183 * Updating Requirements:: How to structure a Texinfo file for
2184 using the updating command.
2185 * Other Updating Commands:: How to indent descriptions, insert
2186 missing nodes lines, and update
2187 nodes in sequence.
2188 @end menu
2189
2190 @node Updating Commands
2191 @subsection The Updating Commands
2192
2193 You can use the updating commands to:
2194
2195 @itemize @bullet
2196 @item
2197 insert or update the `Next', `Previous', and `Up' pointers of a node,
2198
2199 @item
2200 insert or update the menu for a section, and
2201
2202 @item
2203 create a master menu for a Texinfo source file.
2204 @end itemize
2205
2206 You can also use the commands to update all the nodes and menus in a
2207 region or in a whole Texinfo file.
2208
2209 The updating commands work only with conventional Texinfo files, which
2210 are structured hierarchically like books. In such files, a structuring
2211 command line must follow closely after each @code{@@node} line, except
2212 for the `Top' @code{@@node} line. (A @dfn{structuring command line} is
2213 a line beginning with @code{@@chapter}, @code{@@section}, or other
2214 similar command.)
2215
2216 You can write the structuring command line on the line that follows
2217 immediately after an @code{@@node} line or else on the line that
2218 follows after a single @code{@@comment} line or a single
2219 @code{@@ifinfo} line. You cannot interpose more than one line between
2220 the @code{@@node} line and the structuring command line; and you may
2221 interpose only an @code{@@comment} line or an @code{@@ifinfo} line.
2222
2223 Commands which work on a whole buffer require that the `Top' node be
2224 followed by a node with an @code{@@chapter} or equivalent-level command.
2225 The menu updating commands will not create a main or master menu for a
2226 Texinfo file that has only @code{@@chapter}-level nodes! The menu
2227 updating commands only create menus @emph{within} nodes for lower level
2228 nodes. To create a menu of chapters, you must provide a `Top'
2229 node.
2230
2231 The menu updating commands remove menu entries that refer to other Info
2232 files since they do not refer to nodes within the current buffer. This
2233 is a deficiency. Rather than use menu entries, you can use cross
2234 references to refer to other Info files. None of the updating commands
2235 affect cross references.
2236
2237 Texinfo mode has five updating commands that are used most often: two
2238 are for updating the node pointers or menu of a single node (or a
2239 region); two are for updating every node pointer and menu in a file;
2240 and one, the @code{texinfo-master-menu} command, is for creating a
2241 master menu for a complete file, and optionally, for updating every
2242 node and menu in the whole Texinfo file.
2243
2244 The @code{texinfo-master-menu} command is the primary command:
2245
2246 @table @kbd
2247 @item C-c C-u m
2248 @itemx M-x texinfo-master-menu
2249 @findex texinfo-master-menu
2250 Create or update a master menu that includes all the other menus
2251 (incorporating the descriptions from pre-existing menus, if
2252 any).
2253
2254 With an argument (prefix argument, @kbd{C-u,} if interactive), first create or
2255 update all the nodes and all the regular menus in the buffer before
2256 constructing the master menu. (@xref{The Top Node, , The Top Node and
2257 Master Menu}, for more about a master menu.)
2258
2259 For @code{texinfo-master-menu} to work, the Texinfo file must have a
2260 `Top' node and at least one subsequent node.
2261
2262 After extensively editing a Texinfo file, you can type the following:
2263
2264 @example
2265 C-u M-x texinfo-master-menu
2266 @exdent or
2267 C-u C-c C-u m
2268 @end example
2269
2270 @noindent
2271 This updates all the nodes and menus completely and all at once.
2272 @end table
2273
2274 The other major updating commands do smaller jobs and are designed for
2275 the person who updates nodes and menus as he or she writes a Texinfo
2276 file.
2277
2278 @need 1000
2279 The commands are:
2280
2281 @table @kbd
2282 @item C-c C-u C-n
2283 @itemx M-x texinfo-update-node
2284 @findex texinfo-update-node
2285 Insert the `Next', `Previous', and `Up' pointers for the node that point is
2286 within (i.e., for the @code{@@node} line preceding point). If the
2287 @code{@@node} line has pre-existing `Next', `Previous', or `Up'
2288 pointers in it, the old pointers are removed and new ones inserted.
2289 With an argument (prefix argument, @kbd{C-u}, if interactive), this command
2290 updates all @code{@@node} lines in the region (which is the text
2291 between point and mark).
2292
2293 @item C-c C-u C-m
2294 @itemx M-x texinfo-make-menu
2295 @findex texinfo-make-menu
2296 Create or update the menu in the node that point is within.
2297 With an argument (@kbd{C-u} as prefix argument, if
2298 interactive), the command makes or updates menus for the
2299 nodes which are either within or a part of the
2300 region.
2301
2302 Whenever @code{texinfo-make-menu} updates an existing menu, the
2303 descriptions from that menu are incorporated into the new menu. This
2304 is done by copying descriptions from the existing menu to the entries
2305 in the new menu that have the same node names. If the node names are
2306 different, the descriptions are not copied to the new menu.
2307
2308 @item C-c C-u C-e
2309 @itemx M-x texinfo-every-node-update
2310 @findex texinfo-every-node-update
2311 Insert or update the `Next', `Previous', and `Up' pointers for every
2312 node in the buffer.
2313
2314 @item C-c C-u C-a
2315 @itemx M-x texinfo-all-menus-update
2316 @findex texinfo-all-menus-update
2317 Create or update all the menus in the buffer. With an argument
2318 (@kbd{C-u} as prefix argument, if interactive), first insert
2319 or update all the node
2320 pointers before working on the menus.
2321
2322 If a master menu exists, the @code{texinfo-all-menus-update} command
2323 updates it; but the command does not create a new master menu if none
2324 already exists. (Use the @code{texinfo-master-menu} command for
2325 that.)
2326
2327 When working on a document that does not merit a master menu, you can
2328 type the following:
2329
2330 @example
2331 C-u C-c C-u C-a
2332 @exdent or
2333 C-u M-x texinfo-all-menus-update
2334 @end example
2335
2336 @noindent
2337 This updates all the nodes and menus.
2338 @end table
2339
2340 The @code{texinfo-column-for-description} variable specifies the
2341 column to which menu descriptions are indented. By default, the value
2342 is 32 although it can be useful to reduce it to as low as 24. You
2343 can set the variable via customization (@pxref{Changing an Option,,,
2344 xemacs, XEmacs User's Manual}) or with the @kbd{M-x set-variable}
2345 command (@pxref{Examining, , Examining and Setting Variables, xemacs,
2346 XEmacs User's Manual}).
2347
2348 Also, the @code{texinfo-indent-menu-description} command may be used to
2349 indent existing menu descriptions to a specified column. Finally, if
2350 you wish, you can use the @code{texinfo-insert-node-lines} command to
2351 insert missing @code{@@node} lines into a file. (@xref{Other Updating
2352 Commands}, for more information.)
2353
2354 @node Updating Requirements
2355 @subsection Updating Requirements
2356 @cindex Updating requirements
2357 @cindex Requirements for updating commands
2358
2359 To use the updating commands, you must organize the Texinfo file
2360 hierarchically with chapters, sections, subsections, and the like.
2361 When you construct the hierarchy of the manual, do not `jump down'
2362 more than one level at a time: you can follow the `Top' node with a
2363 chapter, but not with a section; you can follow a chapter with a
2364 section, but not with a subsection. However, you may `jump up' any
2365 number of levels at one time---for example, from a subsection to a
2366 chapter.
2367
2368 Each @code{@@node} line, with the exception of the line for the `Top'
2369 node, must be followed by a line with a structuring command such as
2370 @code{@@chapter}, @code{@@section}, or
2371 @code{@@unnumberedsubsec}.
2372
2373 Each @code{@@node} line/structuring-command line combination
2374 must look either like this:
2375
2376 @example
2377 @group
2378 @@node Comments, Minimum, Conventions, Overview
2379 @@comment node-name, next, previous, up
2380 @@section Comments
2381 @end group
2382 @end example
2383
2384 or like this (without the @code{@@comment} line):
2385
2386 @example
2387 @group
2388 @@node Comments, Minimum, Conventions, Overview
2389 @@section Comments
2390 @end group
2391 @end example
2392
2393 or like this (without the explicit node pointers):
2394
2395 @example
2396 @group
2397 @@node Comments
2398 @@section Comments
2399 @end group
2400 @end example
2401
2402 @noindent
2403 In this example, `Comments' is the name of both the node and the
2404 section. The next node is called `Minimum' and the previous node is
2405 called `Conventions'. The `Comments' section is within the `Overview'
2406 node, which is specified by the `Up' pointer. (Instead of an
2407 @code{@@comment} line, you may also write an @code{@@ifinfo} line.)
2408
2409 If a file has a `Top' node, it must be called @samp{top} or @samp{Top}
2410 and be the first node in the file.
2411
2412 The menu updating commands create a menu of sections within a chapter,
2413 a menu of subsections within a section, and so on. This means that
2414 you must have a `Top' node if you want a menu of chapters.
2415
2416 Incidentally, the @code{makeinfo} command will create an Info file for a
2417 hierarchically organized Texinfo file that lacks `Next', `Previous' and
2418 `Up' pointers. Thus, if you can be sure that your Texinfo file will be
2419 formatted with @code{makeinfo}, you have no need for the update node
2420 commands. (@xref{Creating an Info File}, for more information about
2421 @code{makeinfo}.) However, both @code{makeinfo} and the
2422 @code{texinfo-format-@dots{}} commands require that you insert menus in
2423 the file.
2424
2425
2426 @node Other Updating Commands
2427 @subsection Other Updating Commands
2428
2429 In addition to the five major updating commands, Texinfo mode
2430 possesses several less frequently used updating commands:
2431
2432 @table @kbd
2433 @item M-x texinfo-insert-node-lines
2434 @findex texinfo-insert-node-lines
2435 Insert @code{@@node} lines before the @code{@@chapter},
2436 @code{@@section}, and other sectioning commands wherever they are
2437 missing throughout a region in a Texinfo file.
2438
2439 With an argument (@kbd{C-u} as prefix argument, if interactive), the
2440 command @code{texinfo-insert-node-lines} not only inserts
2441 @code{@@node} lines but also inserts the chapter or section titles as
2442 the names of the corresponding nodes. In addition, it inserts the
2443 titles as node names in pre-existing @code{@@node} lines that lack
2444 names. Since node names should be more concise than section or
2445 chapter titles, you must manually edit node names so inserted.
2446
2447 For example, the following marks a whole buffer as a region and inserts
2448 @code{@@node} lines and titles throughout:
2449
2450 @example
2451 C-x h C-u M-x texinfo-insert-node-lines
2452 @end example
2453
2454 This command inserts titles as node names in @code{@@node} lines; the
2455 @code{texinfo-start-menu-description} command (@pxref{Inserting,
2456 Inserting Frequently Used Commands}) inserts titles as descriptions in
2457 menu entries, a different action. However, in both cases, you need to
2458 edit the inserted text.
2459
2460 @item M-x texinfo-multiple-files-update
2461 @findex texinfo-multiple-files-update @r{(in brief)}
2462 Update nodes and menus in a document built from several separate files.
2463 With @kbd{C-u} as a prefix argument, create and insert a master menu in
2464 the outer file. With a numeric prefix argument, such as @kbd{C-u 2}, first
2465 update all the menus and all the `Next', `Previous', and `Up' pointers
2466 of all the included files before creating and inserting a master menu in
2467 the outer file. The @code{texinfo-multiple-files-update} command is
2468 described in the appendix on @code{@@include} files.
2469 @xref{@t{texinfo-multiple-files-update}}.
2470
2471 @item M-x texinfo-indent-menu-description
2472 @findex texinfo-indent-menu-description
2473 Indent every description in the menu following point to the specified
2474 column. You can use this command to give yourself more space for
2475 descriptions. With an argument (@kbd{C-u} as prefix argument, if
2476 interactive), the @code{texinfo-indent-menu-description} command indents
2477 every description in every menu in the region. However, this command
2478 does not indent the second and subsequent lines of a multi-line
2479 description.
2480
2481 @item M-x texinfo-sequential-node-update
2482 @findex texinfo-sequential-node-update
2483 Insert the names of the nodes immediately following and preceding the
2484 current node as the `Next' or `Previous' pointers regardless of those
2485 nodes' hierarchical level. This means that the `Next' node of a
2486 subsection may well be the next chapter. Sequentially ordered nodes are
2487 useful for novels and other documents that you read through
2488 sequentially. (However, in Info, the @kbd{g *} command lets
2489 you look through the file sequentially, so sequentially ordered nodes
2490 are not strictly necessary.) With an argument (prefix argument, if
2491 interactive), the @code{texinfo-sequential-node-update} command
2492 sequentially updates all the nodes in the region.
2493 @end table
2494
2495 @node Info Formatting
2496 @section Formatting for Info
2497 @cindex Formatting for Info
2498 @cindex Running an Info formatter
2499 @cindex Info formatting
2500
2501 Texinfo mode provides several commands for formatting part or all of a
2502 Texinfo file for Info. Often, when you are writing a document, you
2503 want to format only part of a file---that is, a region.
2504
2505 You can use either the @code{texinfo-format-region} or the
2506 @code{makeinfo-region} command to format a region:
2507
2508 @table @kbd
2509 @findex texinfo-format-region
2510 @item C-c C-e C-r
2511 @itemx M-x texinfo-format-region
2512 @itemx C-c C-m C-r
2513 @itemx M-x makeinfo-region
2514 Format the current region for Info.
2515 @end table
2516
2517 You can use either the @code{texinfo-format-buffer} or the
2518 @code{makeinfo-buffer} command to format a whole buffer:
2519
2520 @table @kbd
2521 @findex texinfo-format-buffer
2522 @item C-c C-e C-b
2523 @itemx M-x texinfo-format-buffer
2524 @itemx C-c C-m C-b
2525 @itemx M-x makeinfo-buffer
2526 Format the current buffer for Info.
2527 @end table
2528
2529 @need 1000
2530 For example, after writing a Texinfo file, you can type the following:
2531
2532 @example
2533 C-u C-c C-u m
2534 @exdent or
2535 C-u M-x texinfo-master-menu
2536 @end example
2537
2538 @noindent
2539 This updates all the nodes and menus. Then type the following to create
2540 an Info file:
2541
2542 @example
2543 C-c C-m C-b
2544 @exdent or
2545 M-x makeinfo-buffer
2546 @end example
2547
2548 For @TeX{} or the Info formatting commands to work, the file @emph{must}
2549 include a line that has @code{@@setfilename} in its header.
2550
2551 @xref{Creating an Info File}, for details about Info formatting.
2552
2553 @node Printing
2554 @comment node-name, next, previous, up
2555 @section Printing
2556 @cindex Formatting for printing
2557 @cindex Printing a region or buffer
2558 @cindex Region formatting and printing
2559 @cindex Buffer formatting and printing
2560 @cindex Part of file formatting and printing
2561
2562 Typesetting and printing a Texinfo file is a multi-step process in
2563 which you first create a file for printing (called a DVI file), and
2564 then print the file. Optionally, you may also create indices. To do
2565 this, you must run the @code{texindex} command after first running the
2566 @code{tex} typesetting command; and then you must run the @code{tex}
2567 command again. Or else run the @code{texi2dvi} command which
2568 automatically creates indices as needed (@pxref{Format with
2569 @t{texi2dvi}}).
2570
2571 Often, when you are writing a document, you want to typeset and print
2572 only part of a file to see what it will look like. You can use the
2573 @code{texinfo-tex-region} and related commands for this purpose. Use
2574 the @code{texinfo-tex-buffer} command to format all of a
2575 buffer.
2576
2577 @table @kbd
2578 @item C-c C-t C-b
2579 @itemx M-x texinfo-tex-buffer
2580 @findex texinfo-tex-buffer
2581 Run @code{texi2dvi} on the buffer. In addition to running @TeX{} on the
2582 buffer, this command automatically creates or updates indices as
2583 needed.
2584
2585 @item C-c C-t C-r
2586 @itemx M-x texinfo-tex-region
2587 @findex texinfo-tex-region
2588 Run @TeX{} on the region.
2589
2590 @item C-c C-t C-i
2591 @itemx M-x texinfo-texindex
2592 Run @code{texindex} to sort the indices of a Texinfo file formatted with
2593 @code{texinfo-tex-region}. The @code{texinfo-tex-region} command does
2594 not run @code{texindex} automatically; it only runs the @code{tex}
2595 typesetting command. You must run the @code{texinfo-tex-region} command
2596 a second time after sorting the raw index files with the @code{texindex}
2597 command. (Usually, you do not format an index when you format a region,
2598 only when you format a buffer. Now that the @code{texi2dvi} command
2599 exists, there is little or no need for this command.)
2600
2601 @item C-c C-t C-p
2602 @itemx M-x texinfo-tex-print
2603 @findex texinfo-tex-print
2604 Print the file (or the part of the file) previously formatted with
2605 @code{texinfo-tex-buffer} or @code{texinfo-tex-region}.
2606 @end table
2607
2608 For @code{texinfo-tex-region} or @code{texinfo-tex-buffer} to work, the
2609 file @emph{must} start with a @samp{\input texinfo} line and must
2610 include an @code{@@settitle} line. The file must end with @code{@@bye}
2611 on a line by itself. (When you use @code{texinfo-tex-region}, you must
2612 surround the @code{@@settitle} line with start-of-header and
2613 end-of-header lines.)
2614
2615 @xref{Hardcopy}, for a description of the other @TeX{} related
2616 commands, such as @code{tex-show-print-queue}.
2617
2618 @node Texinfo Mode Summary
2619 @section Texinfo Mode Summary
2620
2621 In Texinfo mode, each set of commands has default keybindings that
2622 begin with the same keys. All the commands that are custom-created
2623 for Texinfo mode begin with @kbd{C-c}. The keys are somewhat
2624 mnemonic.
2625
2626 @subheading Insert Commands
2627
2628 The insert commands are invoked by typing @kbd{C-c} twice and then the
2629 first letter of the @@-command to be inserted. (It might make more
2630 sense mnemonically to use @kbd{C-c C-i}, for `custom insert', but
2631 @kbd{C-c C-c} is quick to type.)
2632
2633 @example
2634 C-c C-c c @r{Insert} @samp{@@code}.
2635 C-c C-c d @r{Insert} @samp{@@dfn}.
2636 C-c C-c e @r{Insert} @samp{@@end}.
2637 C-c C-c i @r{Insert} @samp{@@item}.
2638 C-c C-c n @r{Insert} @samp{@@node}.
2639 C-c C-c s @r{Insert} @samp{@@samp}.
2640 C-c C-c v @r{Insert} @samp{@@var}.
2641 C-c @{ @r{Insert braces.}
2642 C-c ]
2643 C-c @} @r{Move out of enclosing braces.}
2644
2645 @group
2646 C-c C-c C-d @r{Insert a node's section title}
2647 @r{in the space for the description}
2648 @r{in a menu entry line.}
2649 @end group
2650 @end example
2651
2652 @subheading Show Structure
2653
2654 The @code{texinfo-show-structure} command is often used within a
2655 narrowed region.
2656
2657 @example
2658 C-c C-s @r{List all the headings.}
2659 @end example
2660
2661 @subheading The Master Update Command
2662
2663 The @code{texinfo-master-menu} command creates a master menu; and can
2664 be used to update every node and menu in a file as well.
2665
2666 @c Probably should use @tables in this section.
2667 @example
2668 @group
2669 C-c C-u m
2670 M-x texinfo-master-menu
2671 @r{Create or update a master menu.}
2672 @end group
2673
2674 @group
2675 C-u C-c C-u m @r{With @kbd{C-u} as a prefix argument, first}
2676 @r{create or update all nodes and regular}
2677 @r{menus, and then create a master menu.}
2678 @end group
2679 @end example
2680
2681 @subheading Update Pointers
2682
2683 The update pointer commands are invoked by typing @kbd{C-c C-u} and
2684 then either @kbd{C-n} for @code{texinfo-update-node} or @kbd{C-e} for
2685 @code{texinfo-every-node-update}.
2686
2687 @example
2688 C-c C-u C-n @r{Update a node.}
2689 C-c C-u C-e @r{Update every node in the buffer.}
2690 @end example
2691
2692 @subheading Update Menus
2693
2694 Invoke the update menu commands by typing @kbd{C-c C-u}
2695 and then either @kbd{C-m} for @code{texinfo-make-menu} or
2696 @kbd{C-a} for @code{texinfo-all-menus-update}. To update
2697 both nodes and menus at the same time, precede @kbd{C-c C-u
2698 C-a} with @kbd{C-u}.
2699
2700 @example
2701 C-c C-u C-m @r{Make or update a menu.}
2702
2703 @group
2704 C-c C-u C-a @r{Make or update all}
2705 @r{menus in a buffer.}
2706 @end group
2707
2708 @group
2709 C-u C-c C-u C-a @r{With @kbd{C-u} as a prefix argument,}
2710 @r{first create or update all nodes and}
2711 @r{then create or update all menus.}
2712 @end group
2713 @end example
2714
2715 @subheading Format for Info
2716
2717 The Info formatting commands that are written in Emacs Lisp are
2718 invoked by typing @kbd{C-c C-e} and then either @kbd{C-r} for a region
2719 or @kbd{C-b} for the whole buffer.
2720
2721 The Info formatting commands that are written in C and based on the
2722 @code{makeinfo} program are invoked by typing @kbd{C-c C-m} and then
2723 either @kbd{C-r} for a region or @kbd{C-b} for the whole buffer.
2724
2725 @need 800
2726 @noindent
2727 Use the @code{texinfo-format@dots{}} commands:
2728
2729 @example
2730 @group
2731 C-c C-e C-r @r{Format the region.}
2732 C-c C-e C-b @r{Format the buffer.}
2733 @end group
2734 @end example
2735
2736 @need 750
2737 @noindent
2738 Use @code{makeinfo}:
2739
2740 @example
2741 C-c C-m C-r @r{Format the region.}
2742 C-c C-m C-b @r{Format the buffer.}
2743 C-c C-m C-l @r{Recenter the @code{makeinfo} output buffer.}
2744 C-c C-m C-k @r{Kill the @code{makeinfo} formatting job.}
2745 @end example
2746
2747 @subheading Typeset and Print
2748
2749 The @TeX{} typesetting and printing commands are invoked by typing
2750 @kbd{C-c C-t} and then another control command: @kbd{C-r} for
2751 @code{texinfo-tex-region}, @kbd{C-b} for @code{texinfo-tex-buffer},
2752 and so on.
2753
2754 @example
2755 C-c C-t C-r @r{Run @TeX{} on the region.}
2756 C-c C-t C-b @r{Run} @code{texi2dvi} @r{on the buffer.}
2757 C-c C-t C-i @r{Run} @code{texindex}.
2758 C-c C-t C-p @r{Print the DVI file.}
2759 C-c C-t C-q @r{Show the print queue.}
2760 C-c C-t C-d @r{Delete a job from the print queue.}
2761 C-c C-t C-k @r{Kill the current @TeX{} formatting job.}
2762 C-c C-t C-x @r{Quit a currently stopped @TeX{} formatting job.}
2763 C-c C-t C-l @r{Recenter the output buffer.}
2764 @end example
2765
2766 @subheading Other Updating Commands
2767
2768 The remaining updating commands do not have standard keybindings because
2769 they are rarely used.
2770
2771 @example
2772 @group
2773 M-x texinfo-insert-node-lines
2774 @r{Insert missing @code{@@node} lines in region.}
2775 @r{With @kbd{C-u} as a prefix argument,}
2776 @r{use section titles as node names.}
2777 @end group
2778
2779 @group
2780 M-x texinfo-multiple-files-update
2781 @r{Update a multi-file document.}
2782 @r{With @kbd{C-u 2} as a prefix argument,}
2783 @r{create or update all nodes and menus}
2784 @r{in all included files first.}
2785 @end group
2786
2787 @group
2788 M-x texinfo-indent-menu-description
2789 @r{Indent descriptions.}
2790 @end group
2791
2792 @group
2793 M-x texinfo-sequential-node-update
2794 @r{Insert node pointers in strict sequence.}
2795 @end group
2796 @end example
2797
2798
2799 @node Beginning a File
2800 @chapter Beginning a Texinfo File
2801 @cindex Beginning a Texinfo file
2802 @cindex Texinfo file beginning
2803 @cindex File beginning
2804
2805 Certain pieces of information must be provided at the beginning of a
2806 Texinfo file, such as the name for the output file(s), the title of the
2807 document, and the Top node. A table of contents is also generally
2808 produced here.
2809
2810 This chapter expands on the minimal complete Texinfo source file
2811 previously given (@pxref{Six Parts}). It describes the numerous
2812 commands for handling the traditional frontmatter items in Texinfo.
2813
2814 @cindex Frontmatter, text in
2815 Straight text outside of any command before the Top node should be
2816 avoided. Such text is treated differently in the different output
2817 formats: at the time of writing, it is visible in @TeX{} and HTML, by
2818 default not shown in Info readers, and so on.
2819
2820 @menu
2821 * Sample Beginning:: A sample beginning for a Texinfo file.
2822 * Texinfo File Header:: The first lines.
2823 * Document Permissions:: Ensuring your manual is free.
2824 * Titlepage & Copyright Page:: Creating the title and copyright pages.
2825 * Contents:: How to create a table of contents.
2826 * The Top Node:: Creating the `Top' node and master menu.
2827 * Global Document Commands:: Affecting formatting throughout.
2828 @end menu
2829
2830
2831 @node Sample Beginning
2832 @section Sample Texinfo File Beginning
2833
2834 @cindex Example beginning of Texinfo file
2835
2836 The following sample shows what is needed. The elements given here are
2837 explained in more detail in the following sections. Other commands are
2838 often included at the beginning of Texinfo files, but the ones here are
2839 the most critical.
2840
2841 @xref{GNU Sample Texts}, for the full texts to be used in GNU manuals.
2842
2843 @example
2844 \input texinfo @@c -*-texinfo-*-
2845 @@c %**start of header
2846 @@setfilename @var{infoname}.info
2847 @@settitle @var{name-of-manual} @var{version}
2848 @@c %**end of header
2849
2850 @@copying
2851 This manual is for @var{program}, version @var{version}.
2852
2853 Copyright @@copyright@{@} @var{years} @var{copyright-owner}.
2854
2855 @group
2856 @@quotation
2857 Permission is granted to @dots{}
2858 @@end quotation
2859 @@end copying
2860 @end group
2861
2862 @group
2863 @@titlepage
2864 @@title @var{name-of-manual-when-printed}
2865 @@subtitle @var{subtitle-if-any}
2866 @@subtitle @var{second-subtitle}
2867 @@author @var{author}
2868 @end group
2869
2870 @group
2871 @@c The following two commands
2872 @@c start the copyright page.
2873 @@page
2874 @@vskip 0pt plus 1filll
2875 @@insertcopying
2876 @end group
2877
2878 Published by @dots{}
2879 @@end titlepage
2880
2881 @@c So the toc is printed at the start.
2882 @@contents
2883
2884 @@ifnottex
2885 @@node Top
2886 @@top @var{title}
2887
2888 This manual is for @var{program}, version @var{version}.
2889 @@end ifnottex
2890
2891 @group
2892 @@menu
2893 * First Chapter:: Getting started @dots{}
2894 * Second Chapter:: @dots{}
2895 @dots{}
2896 * Copying:: Your rights and freedoms.
2897 @@end menu
2898 @end group
2899
2900 @group
2901 @@node First Chapter
2902 @@chapter First Chapter
2903
2904 @@cindex first chapter
2905 @@cindex chapter, first
2906 @dots{}
2907 @end group
2908 @end example
2909
2910
2911 @node Texinfo File Header
2912 @section Texinfo File Header
2913 @cindex Header for Texinfo files
2914 @cindex Texinfo file header
2915
2916 Texinfo files start with at least three lines that provide Texinfo
2917 translators with necessary information. These are the @code{\input
2918 texinfo} line, the @code{@@settitle} line, and the
2919 @code{@@setfilename} line.
2920
2921 Also, if you want to format just part of the Texinfo file in XEmacs,
2922 you must write the @code{@@settitle} and @code{@@setfilename} lines
2923 between start-of-header and end-of-header lines. These start- and
2924 end-of-header lines are optional, but they do no harm, so you might as
2925 well always include them.
2926
2927 Any command that affects document formatting as a whole makes sense to
2928 include in the header. @code{@@synindex} (@pxref{@t{@@synindex}}),
2929 for instance, is another command often included in the header.
2930
2931 Thus, the beginning of a Texinfo file generally looks approximately
2932 like this:
2933
2934 @example
2935 @group
2936 \input texinfo @@c -*-texinfo-*-
2937 @@c %**start of header
2938 @@setfilename sample.info
2939 @@settitle Sample Manual 1.0
2940 @@c %**end of header
2941 @end group
2942 @end example
2943
2944 (@xref{GNU Sample Texts}, for complete sample texts.)
2945
2946 @menu
2947 * First Line:: The first line of a Texinfo file.
2948 * Start of Header:: Formatting a region requires this.
2949 * @t{@@setfilename}:: Tell Info the name of the Info file.
2950 * @t{@@settitle}:: Create a title for the printed work.
2951 * End of Header:: Formatting a region requires this.
2952 @end menu
2953
2954
2955 @node First Line
2956 @subsection The First Line of a Texinfo File
2957 @cindex First line of a Texinfo file
2958 @cindex Beginning line of a Texinfo file
2959 @cindex Header of a Texinfo file
2960
2961 Every Texinfo file that is to be the top-level input to @TeX{} must begin
2962 with a line that looks like this:
2963
2964 @example
2965 \input texinfo @@c -*-texinfo-*-
2966 @end example
2967
2968 @noindent
2969 This line serves two functions:
2970
2971 @enumerate
2972 @item
2973 When the file is processed by @TeX{}, the @samp{\input texinfo} command
2974 tells @TeX{} to load the macros needed for processing a Texinfo file.
2975 These are in a file called @file{texinfo.tex}, which should have been
2976 installed on your system along with either the @TeX{} or Texinfo
2977 software. @TeX{} uses the backslash, @samp{\}, to mark the beginning of
2978 a command, exactly as Texinfo uses @samp{@@}. The @file{texinfo.tex}
2979 file causes the switch from @samp{\} to @samp{@@}; before the switch
2980 occurs, @TeX{} requires @samp{\}, which is why it appears at the
2981 beginning of the file.
2982
2983 @item
2984 When the file is edited in XEmacs, the @samp{-*-texinfo-*-} mode
2985 specification tells XEmacs to use Texinfo mode.
2986 @end enumerate
2987
2988
2989 @node Start of Header
2990 @subsection Start of Header
2991 @cindex Start of header line
2992
2993 A start-of-header line is a Texinfo comment that looks like this:
2994
2995 @example
2996 @@c %**start of header
2997 @end example
2998
2999 Write the start-of-header line on the second line of a Texinfo file.
3000 Follow the start-of-header line with @code{@@setfilename} and
3001 @code{@@settitle} lines and, optionally, with other commands that
3002 globally affect the document formatting, such as @code{@@synindex} or
3003 @code{@@footnotestyle}; and then by an end-of-header line (@pxref{End of
3004 Header}).
3005
3006 The start- and end-of-header lines allow you to format only part of a
3007 Texinfo file for Info or printing. @xref{@t{texinfo-format} commands}.
3008
3009 The odd string of characters, @samp{%**}, is to ensure that no other
3010 comment is accidentally taken for a start-of-header line. You can
3011 change it if you wish by setting the @code{tex-start-of-header} and/or
3012 @code{tex-end-of-header} XEmacs variables. @xref{Texinfo Mode Printing}.
3013
3014
3015 @node @t{@@setfilename}
3016 @subsection @code{@@setfilename}: Set the Output File Name
3017
3018 @anchor{setfilename}@c old name
3019 @findex setfilename
3020 @cindex Texinfo requires @code{@@setfilename}
3021 @cindex Output file name, required
3022
3023 The first Texinfo command (that is, after the @code{\input texinfo})
3024 in a document is generally @code{@@setfilename}:
3025
3026 @example
3027 @@setfilename @var{info-file-name}
3028 @end example
3029
3030 This command is required for @TeX{}, and very strongly recommended for
3031 @code{makeinfo}.
3032
3033 Write the @code{@@setfilename} command at the beginning of a line and
3034 follow it on the same line by the Info file name. Do not write
3035 anything else on the line.
3036
3037 @cindex Ignored before @code{@@setfilename}
3038 @cindex @samp{\input} source line ignored
3039 When an @code{@@setfilename} line is present, the Texinfo processors
3040 ignore everything written before the @code{@@setfilename} line. This
3041 is why the very first line of the file (the @code{\input} line) does
3042 not show up in the output.
3043
3044 The @code{@@setfilename} line specifies the name of the output file to
3045 be generated. This name must be different from the name of the
3046 Texinfo file. There are two conventions for choosing the name: you
3047 can either remove the extension (such as @samp{.texi}) entirely from
3048 the input file name, or (recommended) replace it with the @samp{.info}
3049 extension.
3050
3051 @cindex Length of file names
3052 @cindex File name collision
3053 @cindex Info file name, choosing
3054 Although an explicit @samp{.info} extension is preferable, some
3055 operating systems cannot handle long file names. You can run into a
3056 problem even when the file name you specify is itself short enough.
3057 This occurs because the Info formatters split a long Info file into
3058 short indirect subfiles, and name them by appending @samp{-1},
3059 @samp{-2}, @dots{}, @samp{-10}, @samp{-11}, and so on, to the original
3060 file name. (@xref{Tag and Split Files}.) The subfile name
3061 @file{texinfo.info-10}, for example, is too long for old systems with
3062 a 14-character limit on filenames; so the Info file name for this
3063 document is @file{texinfo} rather than @file{texinfo.info}. When
3064 @code{makeinfo} is running on operating systems such as MS-DOS which
3065 impose severe limits on file names, it may remove some characters from
3066 the original file name to leave enough space for the subfile suffix,
3067 thus producing files named @file{texin-10}, @file{gcc.i12}, etc.
3068
3069 When producing another output format, @code{makeinfo} will replace any
3070 final extension with the output format-specific extension (@samp{html}
3071 when generating HTML, for example), or add a dot followed by the
3072 extension (@samp{.html} for HTML) if the given name has no extension.
3073
3074 @pindex texinfo.cnf
3075 The @code{@@setfilename} line produces no output when you typeset a
3076 manual with @TeX{}, but it is nevertheless essential: it opens the
3077 index and other auxiliary files used by Texinfo, and also reads
3078 @file{texinfo.cnf} if that file is present on your system
3079 (@pxref{Preparing for @TeX{}}).
3080
3081 If there is no @code{@@setfilename} line, @code{makeinfo} uses the
3082 input file name to determine the output name: first, any of the
3083 extensions @code{.texi}, @code{.tex}, @code{.txi} or @code{.texinfo}
3084 is removed from the input file name; then, the output format specific
3085 extension is added---@code{.html} when generating HTML, @code{.info}
3086 when generating Info, etc. The @code{\input} line is still ignored in
3087 this processing, as well as leading blank lines.
3088
3089 See also the @option{--output} option in @ref{Invoking @t{texi2any}}.
3090
3091
3092 @node @t{@@settitle}
3093 @subsection @code{@@settitle}: Set the Document Title
3094
3095 @anchor{settitle}@c old name
3096 @findex settitle
3097 @cindex Document title, specifying
3098
3099 A Texinfo file should contain a line that looks like this:
3100
3101 @example
3102 @@settitle @var{title}
3103 @end example
3104
3105 Write the @code{@@settitle} command at the beginning of a line and
3106 follow it on the same line by the title. Do not write anything else
3107 on the line. The @code{@@settitle} command should precede everything
3108 that generates actual output. The best place for it is right after
3109 the @code{@@setfilename} command (described in the previous section).
3110
3111 This command tells @TeX{} the title to use in a header or footer
3112 for double-sided output, in case such headings are output. For
3113 more on headings for @TeX{}, see @ref{Heading Generation}.
3114
3115 @cindex @code{<title>} HTML tag
3116 In the HTML file produced by @command{makeinfo}, @var{title} serves as
3117 the document @samp{<title>}. It also becomes the default document
3118 description in the @samp{<head>} part
3119 (@pxref{@t{@@documentdescription}}).
3120
3121 When the title page is used in the output, the title in the
3122 @code{@@settitle} command does not affect the title as it appears on
3123 the title page. Thus, the two do not need not to match exactly. A
3124 practice we recommend is to include the version or edition number of
3125 the manual in the @code{@@settitle} title; on the title page, the
3126 version number generally appears as an @code{@@subtitle} so it would
3127 be omitted from the @code{@@title}. @xref{@t{@@titlepage}}.
3128
3129
3130 @node End of Header
3131 @subsection End of Header
3132 @cindex End of header line
3133
3134 Follow the header lines with an @w{end-of-header} line, which is a
3135 Texinfo comment that looks like this:
3136
3137 @example
3138 @@c %**end of header
3139 @end example
3140
3141 @xref{Start of Header}.
3142
3143
3144 @node Document Permissions
3145 @section Document Permissions
3146 @cindex Document Permissions
3147 @cindex Copying Permissions
3148
3149 The copyright notice and copying permissions for a document need to
3150 appear in several places in the various Texinfo output formats.
3151 Therefore, Texinfo provides a command (@code{@@copying}) to declare
3152 this text once, and another command (@code{@@insertcopying}) to
3153 insert the text at appropriate points.
3154
3155 @anchor{Software Copying Permissions}@c old node name
3156 This section is about the license of the Texinfo document. If the
3157 document is a software manual, the software is typically under a
3158 different license---for GNU and many other free software packages,
3159 software is usually released under the GNU GPL, and manuals are
3160 released under the GNU FDL@. It is helpful to state the license of
3161 the software of the manual, but giving the complete text of the
3162 software license is not necessarily required.
3163
3164 @menu
3165 * @t{@@copying}:: Declare the document's copying permissions.
3166 * @t{@@insertcopying}:: Where to insert the permissions.
3167 @end menu
3168
3169
3170 @node @t{@@copying}
3171 @subsection @code{@@copying}: Declare Copying Permissions
3172
3173 @anchor{copying}@c old name
3174 @findex copying
3175
3176 The @code{@@copying} command should be given very early in the document;
3177 the recommended location is right after the header material
3178 (@pxref{Texinfo File Header}). It conventionally consists of a sentence
3179 or two about what the program is, identification of the documentation
3180 itself, the legal copyright line, and the copying permissions. Here is
3181 a skeletal example:
3182
3183 @example
3184 @@copying
3185 This manual is for @var{program} (version @var{version}, updated
3186 @var{date}), which @dots{}
3187
3188 Copyright @@copyright@{@} @var{years} @var{copyright-owner}.
3189
3190 @@quotation
3191 Permission is granted to @dots{}
3192 @@end quotation
3193 @@end copying
3194 @end example
3195
3196 The @code{@@quotation} has no legal significance; it's there to improve
3197 readability in some contexts.
3198
3199 The text of @code{@@copying} is output as a comment at the beginning of
3200 Info, HTML, and XML output files. It is @emph{not} output implicitly in
3201 plain text or @TeX{}; it's up to you to use @code{@@insertcopying} to
3202 emit the copying information. See the next section for details.
3203
3204 @findex copyright
3205 The @code{@@copyright@{@}} command generates a @samp{c} inside a
3206 circle when the output format supports this glyph (print and HTML
3207 always do, for instance). When the glyph is not supported in the
3208 output, it generates the three-character sequence @samp{(C)}.
3209
3210 The copyright notice itself has the following legally-prescribed
3211 form:
3212
3213 @example
3214 Copyright @copyright{} @var{years} @var{copyright-owner}.
3215 @end example
3216
3217 @cindex Copyright word, always in English
3218 The word `Copyright' must always be written in English, even if the
3219 document is otherwise written in another language. This is due to
3220 international law.
3221
3222 @cindex Years, in copyright line
3223 The list of years should include all years in which a version was
3224 completed (even if it was released in a subsequent year). It is
3225 simplest for each year to be written out individually and in full,
3226 separated by commas.
3227
3228 @cindex Copyright holder for FSF works
3229 @cindex Holder of copyright for FSF works
3230 @cindex Owner of copyright for FSF works
3231 The copyright owner (or owners) is whoever holds legal copyright on the
3232 work. In the case of works assigned to the FSF, the owner is `Free
3233 Software Foundation, Inc.'.
3234
3235 The copyright `line' may actually be split across multiple lines, both
3236 in the source document and in the output. This often happens for
3237 documents with a long history, having many different years of
3238 publication. If you do use several lines, do not indent any of them
3239 (or anything else in the @code{@@copying} block) in the source file.
3240
3241 @xref{Copyright Notices,,, maintain, GNU Maintainer Information}, for
3242 additional information. @xref{GNU Sample Texts}, for the full text to
3243 be used in GNU manuals. @xref{GNU Free Documentation License}, for
3244 the license itself under which GNU and other free manuals are
3245 distributed.
3246
3247
3248 @node @t{@@insertcopying}
3249 @subsection @code{@@insertcopying}: Include Permissions Text
3250
3251 @anchor{insertcopying}@c old name
3252 @findex insertcopying
3253 @cindex Copying text, including
3254 @cindex Permissions text, including
3255 @cindex Including permissions text
3256
3257 The @code{@@insertcopying} command is simply written on a line by
3258 itself, like this:
3259
3260 @example
3261 @@insertcopying
3262 @end example
3263
3264 This inserts the text previously defined by @code{@@copying}. To meet
3265 legal requirements, it must be used on the copyright page in the printed
3266 manual (@pxref{Copyright}).
3267
3268 The @code{@@copying} command itself causes the permissions text to
3269 appear in an Info file @emph{before} the first node. The text is also
3270 copied into the beginning of each split Info output file, as is legally
3271 necessary. This location implies a human reading the manual using Info
3272 does @emph{not} see this text (except when using the advanced Info
3273 command @kbd{g *}), but this does not matter for legal purposes,
3274 because the text is present.
3275
3276 Similarly, the @code{@@copying} text is automatically included at the
3277 beginning of each HTML output file, as an HTML comment. Again, this
3278 text is not visible (unless the reader views the HTML source).
3279
3280 The permissions text defined by @code{@@copying} also appears
3281 automatically at the beginning of the XML and Docbook output files.
3282
3283
3284 @node Titlepage & Copyright Page
3285 @section Title and Copyright Pages
3286
3287 In hard copy output, the manual's name and author are usually printed on
3288 a title page. Copyright information is usually printed on the back of
3289 the title page.
3290
3291 The title and copyright pages appear in printed manuals, but not in
3292 most other output formats. Because of this, it is possible to use
3293 several slightly obscure typesetting commands that are not to be used
3294 in the main text. In addition, this part of the beginning of a
3295 Texinfo file contains the text of the copying permissions that appears
3296 in the printed manual.
3297
3298 @menu
3299 * @t{@@titlepage}:: Create a title for the printed document.
3300 * @t{@@titlefont @@center @@sp}:: The @code{@@titlefont}, @code{@@center},
3301 and @code{@@sp} commands.
3302 * @t{@@title @@subtitle @@author}:: The @code{@@title}, @code{@@subtitle},
3303 and @code{@@author} commands.
3304 * Copyright:: How to write the copyright notice and
3305 include copying permissions.
3306 * Heading Generation:: Turn on page headings after the title and
3307 copyright pages.
3308 @end menu
3309
3310
3311 @node @t{@@titlepage}
3312 @subsection @code{@@titlepage}
3313
3314 @anchor{titlepage}@c old name
3315 @cindex Title page
3316 @findex titlepage
3317
3318 Start the material for the title page and following copyright page
3319 with @code{@@titlepage} on a line by itself and end it with
3320 @code{@@end titlepage} on a line by itself.
3321
3322 The @code{@@end titlepage} command starts a new page and turns on page
3323 numbering (@pxref{Heading Generation}). All the
3324 material that you want to appear on unnumbered pages should be put
3325 between the @code{@@titlepage} and @code{@@end titlepage} commands.
3326 You can force the table of contents to appear there with the
3327 @code{@@setcontentsaftertitlepage} command (@pxref{Contents}).
3328
3329 @findex page@r{, within @code{@@titlepage}}
3330 By using the @code{@@page} command you can force a page break within the
3331 region delineated by the @code{@@titlepage} and @code{@@end titlepage}
3332 commands and thereby create more than one unnumbered page. This is how
3333 the copyright page is produced. (The @code{@@titlepage} command might
3334 perhaps have been better named the @code{@@titleandadditionalpages}
3335 command, but that would have been rather long!)
3336
3337 When you write a manual about a computer program, you should write the
3338 version of the program to which the manual applies on the title page.
3339 If the manual changes more frequently than the program or is independent
3340 of it, you should also include an edition number@footnote{We have found
3341 that it is helpful to refer to versions of independent manuals as
3342 `editions' and versions of programs as `versions'; otherwise, we find we
3343 are liable to confuse each other in conversation by referring to both
3344 the documentation and the software with the same words.} for the manual.
3345 This helps readers keep track of which manual is for which version of
3346 the program. (The `Top' node should also contain this information; see
3347 @ref{The Top Node}.)
3348
3349 Texinfo provides two main methods for creating a title page. One method
3350 uses the @code{@@titlefont}, @code{@@sp}, and @code{@@center} commands
3351 to generate a title page in which the words on the page are
3352 centered.
3353
3354 The second method uses the @code{@@title}, @code{@@subtitle}, and
3355 @code{@@author} commands to create a title page with black rules under
3356 the title and author lines and the subtitle text set flush to the
3357 right hand side of the page. With this method, you do not specify any
3358 of the actual formatting of the title page. You specify the text
3359 you want, and Texinfo does the formatting.
3360
3361 You may use either method, or you may combine them; see the examples in
3362 the sections below.
3363
3364 @findex shorttitlepage
3365 @cindex Bastard title page
3366 @cindex Title page, bastard
3367 For sufficiently simple documents, and for the bastard title page in
3368 traditional book frontmatter, Texinfo also provides a command
3369 @code{@@shorttitlepage} which takes the rest of the line as the title.
3370 The argument is typeset on a page by itself and followed by a blank
3371 page.
3372
3373
3374 @node @t{@@titlefont @@center @@sp}
3375 @subsection @code{@@titlefont}, @code{@@center}, and @code{@@sp}
3376
3377 @anchor{titlefont center sp}@c old name
3378 @findex titlefont
3379 @findex center
3380 @findex sp @r{(titlepage line spacing)}
3381
3382 You can use the @code{@@titlefont}, @code{@@sp}, and @code{@@center}
3383 commands to create a title page for a printed document. (This is the
3384 first of the two methods for creating a title page in Texinfo.)
3385
3386 Use the @code{@@titlefont} command to select a large font suitable for
3387 the title itself. You can use @code{@@titlefont} more than once if you
3388 have an especially long title.
3389
3390 For HTML output, each @code{@@titlefont} command produces an
3391 @code{<h1>} heading, but the HTML document @code{<title>} is not
3392 affected. For that, you must put an @code{@@settitle} command before
3393 the @code{@@titlefont} command (@pxref{@t{@@settitle}}).
3394
3395 @need 700
3396 For example:
3397
3398 @example
3399 @@titlefont@{Texinfo@}
3400 @end example
3401
3402 Use the @code{@@center} command at the beginning of a line to center
3403 the remaining text on that line. Thus,
3404
3405 @example
3406 @@center @@titlefont@{Texinfo@}
3407 @end example
3408
3409 @noindent
3410 centers the title, which in this example is ``Texinfo'' printed
3411 in the title font.
3412
3413 Use the @code{@@sp} command to insert vertical space. For example:
3414
3415 @example
3416 @@sp 2
3417 @end example
3418
3419 @noindent
3420 This inserts two blank lines on the printed page.
3421 (@xref{@t{@@sp}}, for more information about the @code{@@sp}
3422 command.)
3423
3424 A template for this method looks like this:
3425
3426 @example
3427 @group
3428 @@titlepage
3429 @@sp 10
3430 @@center @@titlefont@{@var{name-of-manual-when-printed}@}
3431 @@sp 2
3432 @@center @var{subtitle-if-any}
3433 @@sp 2
3434 @@center @var{author}
3435 @dots{}
3436 @@end titlepage
3437 @end group
3438 @end example
3439
3440 The spacing of the example fits an 8.5 by 11 inch manual.
3441
3442 You can in fact use these commands anywhere, not just on a title page,
3443 but since they are not logical markup commands, we don't recommend
3444 them.
3445
3446 @node @t{@@title @@subtitle @@author}
3447 @subsection @code{@@title}, @code{@@subtitle}, and @code{@@author}
3448
3449 @anchor{title subtitle author}@c old name
3450 @findex title
3451 @findex subtitle
3452 @findex author
3453
3454 You can use the @code{@@title}, @code{@@subtitle}, and @code{@@author}
3455 commands to create a title page in which the vertical and horizontal
3456 spacing is done for you automatically. This contrasts with the method
3457 described in the previous section, in which the @code{@@sp} command is
3458 needed to adjust vertical spacing.
3459
3460 Write the @code{@@title}, @code{@@subtitle}, or @code{@@author}
3461 commands at the beginning of a line followed by the title, subtitle,
3462 or author. The @code{@@author} command may be used for a quotation in
3463 an @code{@@quotation} block (@pxref{@t{@@quotation}});
3464 except for that, it is an error to use any of these commands outside
3465 of @code{@@titlepage}.
3466
3467 The @code{@@title} command produces a line in which the title is set
3468 flush to the left-hand side of the page in a larger than normal font.
3469 The title is underlined with a black rule. The title must be given on
3470 a single line in the source file; it will be broken into multiple
3471 lines of output is needed.
3472
3473 For long titles, the @code{@@*} command may be used to specify the
3474 line breaks in long titles if the automatic breaks do not suit. Such
3475 explicit line breaks are generally reflected in all output formats; if
3476 you only want to specify them for the printed output, use a
3477 conditional (@pxref{Conditionals}). For example:
3478
3479 @example
3480 @@title This Long Title@@inlinefmt@{tex,@@*@} Is Broken in @@TeX@{@}
3481 @end example
3482
3483 The @code{@@subtitle} command sets subtitles in a normal-sized font
3484 flush to the right-hand side of the page.
3485
3486 The @code{@@author} command sets the names of the author or authors in
3487 a middle-sized font flush to the left-hand side of the page on a line
3488 near the bottom of the title page. The names are followed by a black
3489 rule that is thinner than the rule that underlines the title.
3490
3491 There are two ways to use the @code{@@author} command: you can write
3492 the name or names on the remaining part of the line that starts with
3493 an @code{@@author} command:
3494
3495 @example
3496 @@author by Jane Smith and John Doe
3497 @end example
3498
3499 @noindent
3500 or you can write the names one above each other by using multiple
3501 @code{@@author} commands:
3502
3503 @example
3504 @group
3505 @@author Jane Smith
3506 @@author John Doe
3507 @end group
3508 @end example
3509
3510 @need 950
3511 A template for this method looks like this:
3512
3513 @example
3514 @group
3515 @@titlepage
3516 @@title @var{name-of-manual-when-printed}
3517 @@subtitle @var{subtitle-if-any}
3518 @@subtitle @var{second-subtitle}
3519 @@author @var{author}
3520 @@page
3521 @dots{}
3522 @@end titlepage
3523 @end group
3524 @end example
3525
3526
3527 @node Copyright
3528 @subsection Copyright Page
3529 @cindex Copyright page
3530 @cindex Printed permissions
3531 @cindex Permissions, printed
3532
3533 By international treaty, the copyright notice for a book must be either
3534 on the title page or on the back of the title page. When the copyright
3535 notice is on the back of the title page, that page is customarily not
3536 numbered. Therefore, in Texinfo, the information on the copyright page
3537 should be within @code{@@titlepage} and @code{@@end titlepage}
3538 commands.
3539
3540 @findex vskip @r{@TeX{} vertical skip}
3541 @findex filll @r{@TeX{} dimension}
3542 Use the @code{@@page} command to cause a page break. To push the
3543 copyright notice and the other text on the copyright page towards the
3544 bottom of the page, use the following incantation after @code{@@page}:
3545
3546 @example
3547 @@vskip 0pt plus 1filll
3548 @end example
3549
3550 @noindent
3551 The @code{@@vskip} command inserts whitespace in the @TeX{} output; it
3552 is ignored in all other output formats. The @samp{0pt plus 1filll}
3553 means to put in zero points of mandatory whitespace, and as much
3554 optional whitespace as needed to push the following text to the bottom
3555 of the page. Note the use of three @samp{l}s in the word
3556 @samp{filll}; this is correct.
3557
3558 To insert the copyright text itself, write @code{@@insertcopying}
3559 next (@pxref{Document Permissions}):
3560
3561 @example
3562 @@insertcopying
3563 @end example
3564
3565 Follow the copying text by the publisher, ISBN numbers, cover art
3566 credits, and other such information.
3567
3568 Here is an example putting all this together:
3569
3570 @example
3571 @@titlepage
3572 @dots{}
3573 @@page
3574 @@vskip 0pt plus 1filll
3575 @@insertcopying
3576
3577 Published by @dots{}
3578
3579 Cover art by @dots{}
3580 @@end titlepage
3581 @end example
3582
3583 We have one more special case to consider: for plain text output, you
3584 must insert the copyright information explicitly if you want it to
3585 appear. For instance, you could have the following after the copyright
3586 page:
3587
3588 @example
3589 @@ifplaintext
3590 @@insertcopying
3591 @@end ifplaintext
3592 @end example
3593
3594 You could include other title-like information for the plain text
3595 output in the same place.
3596
3597
3598
3599 @node Heading Generation
3600 @subsection Heading Generation
3601
3602 @anchor{end titlepage}@c old name
3603 @cindex Headings, page, begin to appear
3604 @cindex Titlepage end starts headings
3605 @cindex End titlepage starts headings
3606 @cindex Generating page headings
3607
3608 Like all @code{@@end} commands (@pxref{Quotations and Examples}), the
3609 @code{@@end titlepage} command must be written at the beginning of a
3610 line by itself, with only one space between the @code{@@end} and the
3611 @code{titlepage}. It not only marks the end of the title and
3612 copyright pages, but also causes @TeX{} to start generating page
3613 headings and page numbers.
3614
3615 Texinfo has two standard page heading formats, one for documents
3616 printed on one side of each sheet of paper (single-sided printing),
3617 and the other for documents printed on both sides of each sheet
3618 (double-sided printing).
3619
3620 In full generality, you can control the headings in different ways:
3621
3622 @itemize @bullet
3623 @item
3624 The conventional way is to write an @code{@@setchapternewpage} command
3625 before the title page commands, if required, and then have the
3626 @code{@@end titlepage} command start generating page headings in the
3627 manner desired.
3628
3629 Most documents are formatted with the standard single-sided or
3630 double-sided headings, (sometimes) using @code{@@setchapternewpage
3631 odd} for double-sided printing and (almost always) no
3632 @code{@@setchapternewpage} command for single-sided printing
3633 (@pxref{@t{@@setchapternewpage}}).
3634
3635 @item
3636 Alternatively, you can use the @code{@@headings} command to prevent
3637 page headings from being generated or to start them for either single
3638 or double-sided printing. Write an @code{@@headings} command
3639 immediately after the @code{@@end titlepage} command. To turn off
3640 headings, write @code{@@headings off}. @xref{@t{@@headings}}.
3641
3642 @item
3643 Or, you may specify your own page heading and footing format.
3644 @xref{Headings}.
3645 @end itemize
3646
3647
3648 @node Contents
3649 @section Generating a Table of Contents
3650 @cindex Table of contents
3651 @cindex Contents, table of
3652 @cindex Short table of contents
3653 @findex contents
3654 @findex summarycontents
3655 @findex shortcontents
3656
3657 The @code{@@chapter}, @code{@@section}, and other structuring commands
3658 (@pxref{Chapter Structuring}) supply the information to make up a
3659 table of contents, but they do not cause an actual table to appear in
3660 the manual. To do this, you must use the @code{@@contents} and/or
3661 @code{@@summarycontents} command(s).
3662
3663 @table @code
3664 @item @@contents
3665 Generates a table of contents in a printed manual, including all
3666 chapters, sections, subsections, etc., as well as appendices and
3667 unnumbered chapters. Headings generated by @code{@@majorheading},
3668 @code{@@chapheading}, and the other @code{@@@dots{}heading} commands
3669 do not appear in the table of contents (@pxref{Structuring Command
3670 Types}).
3671
3672 @item @@shortcontents
3673 @itemx @@summarycontents
3674 (@code{@@summarycontents} is a synonym for @code{@@shortcontents}.)
3675
3676 Generates a short or summary table of contents that lists only the
3677 chapters, appendices, and unnumbered chapters. Sections, subsections
3678 and subsubsections are omitted. Only a long manual needs a short
3679 table of contents in addition to the full table of contents.
3680 @end table
3681
3682 Both contents commands should be written on a line by themselves, and
3683 placed near the beginning of the file, after the @code{@@end
3684 titlepage} (@pxref{@t{@@titlepage}}), before any sectioning
3685 command. The contents commands automatically generate a chapter-like
3686 heading at the top of the first table of contents page, so don't
3687 include any sectioning command such as @code{@@unnumbered} before
3688 them.
3689
3690 Since an Info file uses menus instead of tables of contents, the Info
3691 formatting commands ignore the contents commands. But the contents
3692 are included in plain text output (generated by @code{makeinfo
3693 --plaintext}) and in other output formats, such as HTML.
3694
3695 When @code{makeinfo} writes a short table of contents while producing
3696 HTML output, the links in the short table of contents point to
3697 corresponding entries in the full table of contents rather than the text
3698 of the document. The links in the full table of contents point to the
3699 main text of the document.
3700
3701 In the past, the contents commands were sometimes placed at the end of
3702 the file, after any indices and just before the @code{@@bye}, but we
3703 no longer recommend this.
3704
3705 @findex setcontentsaftertitlepage
3706 @findex setshortcontentsaftertitlepage
3707 @cindex Contents, after title page
3708 @cindex Table of contents, after title page
3709 However, since many existing Texinfo documents still do have the
3710 @code{@@contents} at the end of the manual, if you are a user printing
3711 a manual, you may wish to force the contents to be printed after the
3712 title page. You can do this by specifying
3713 @code{@@setcontentsaftertitlepage} and/or
3714 @code{@@setshortcontentsaftertitlepage}. The first prints only the
3715 main contents after the @code{@@end titlepage}; the second prints both
3716 the short contents and the main contents. In either case, any
3717 subsequent @code{@@contents} or @code{@@shortcontents} is ignored.
3718
3719 You need to include the @code{@@set@dots{}contentsaftertitlepage}
3720 commands early in the document (just after @code{@@setfilename}, for
3721 example). We recommend using @command{texi2dvi} (@pxref{Format with
3722 @t{texi2dvi}}) to specify this without altering the source file at
3723 all. For example:
3724
3725 @example
3726 texi2dvi --texinfo=@@setcontentsaftertitlepage foo.texi
3727 @end example
3728
3729 An alternative invocation, using @command{texi2any}:
3730
3731 @example
3732 texi2any --dvi --Xopt --texinfo=@@setcontentsaftertitlepage foo.texi
3733 @end example
3734
3735
3736
3737 @node The Top Node
3738 @section The `Top' Node and Master Menu
3739 @cindex Top node
3740 @cindex Node, `Top'
3741
3742 The `Top' node is the node in which a reader enters an Info manual.
3743 As such, it should begin with a brief description of the manual
3744 (including the version number), and end with a master menu for the
3745 whole manual. Of course you should include any other general
3746 information you feel a reader would find helpful.
3747
3748 @findex top
3749 It is conventional and desirable to write an @code{@@top} sectioning
3750 command line containing the title of the document immediately after
3751 the @code{@@node Top} line (@pxref{@t{@@top} Command}).
3752
3753 The contents of the `Top' node should appear only in the online output;
3754 none of it should appear in printed output, so enclose it between
3755 @code{@@ifnottex} and @code{@@end ifnottex} commands. (@TeX{} does not
3756 print either an @code{@@node} line or a menu; they appear only in Info;
3757 strictly speaking, you are not required to enclose these parts between
3758 @code{@@ifnottex} and @code{@@end ifnottex}, but it is simplest to do
3759 so. @xref{Conditionals, , Conditionally Visible Text}.)
3760
3761 @menu
3762 * Top Node Example::
3763 * Master Menu Parts::
3764 @end menu
3765
3766
3767 @node Top Node Example
3768 @subsection Top Node Example
3769
3770 @cindex Top node example
3771
3772 Here is an example of a Top node.
3773
3774 @example
3775 @group
3776 @@ifnottex
3777 @@node Top
3778 @@top Sample Title
3779
3780 @@insertcopying
3781 @@end ifnottex
3782 @end group
3783
3784 Additional general information.
3785
3786 @group
3787 @@menu
3788 * First Chapter::
3789 * Second Chapter::
3790 @dots{}
3791 * Index::
3792 @end group
3793 @@end menu
3794 @end example
3795
3796
3797 @node Master Menu Parts
3798 @subsection Parts of a Master Menu
3799 @cindex Master menu
3800 @cindex Menu, master
3801 @cindex Parts of a master menu
3802
3803 A @dfn{master menu} is the main menu. It is customary to include a
3804 detailed menu listing all the nodes in the document in this menu.
3805
3806 Like any other menu, a master menu is enclosed in @code{@@menu} and
3807 @code{@@end menu} and does not appear in the printed output.
3808
3809 Generally, a master menu is divided into parts.
3810
3811 @itemize @bullet
3812 @item
3813 The first part contains the major nodes in the Texinfo file: the nodes
3814 for the chapters, chapter-like sections, and the appendices.
3815
3816 @item
3817 The second part contains nodes for the indices.
3818
3819 @item
3820 @findex detailmenu
3821 @cindex Detailed menu
3822 The third and subsequent parts contain a listing of the other,
3823 lower-level nodes, often ordered by chapter. This way, rather than go
3824 through an intermediary menu, an inquirer can go directly to a
3825 particular node when searching for specific information. These menu
3826 items are not required; add them if you think they are a convenience.
3827 If you do use them, put @code{@@detailmenu} before the first one, and
3828 @code{@@end detailmenu} after the last; otherwise, @code{makeinfo}
3829 will get confused.
3830 @end itemize
3831
3832 Each section in the menu can be introduced by a descriptive line. So
3833 long as the line does not begin with an asterisk, it will not be
3834 treated as a menu entry. (@xref{Writing a Menu}, for more
3835 information.)
3836
3837 For example, the master menu for this manual looks like the following
3838 (but has many more entries):
3839
3840 @example
3841 @group
3842 @@menu
3843 * Copying Conditions:: Your rights.
3844 * Overview:: Texinfo in brief.
3845 @dots{}
3846 @end group
3847 @group
3848 * Command and Variable Index::
3849 * General Index::
3850 @end group
3851
3852 @group
3853 @@detailmenu
3854 --- The Detailed Node Listing ---
3855
3856 Overview of Texinfo
3857
3858 * Reporting Bugs:: @dots{}
3859 @dots{}
3860 @end group
3861
3862 @group
3863 Beginning a Texinfo File
3864
3865 * Sample Beginning:: @dots{}
3866 @dots{}
3867 @@end detailmenu
3868 @@end menu
3869 @end group
3870 @end example
3871
3872
3873 @node Global Document Commands
3874 @section Global Document Commands
3875 @cindex Global Document Commands
3876
3877 Besides the basic commands mentioned in the previous sections, here are
3878 additional commands which affect the document as a whole. They are
3879 generally all given before the Top node, if they are given at all.
3880
3881 @menu
3882 * @t{@@documentdescription}:: Document summary for the HTML output.
3883 * @t{@@setchapternewpage}:: Start chapters on right-hand pages.
3884 * @t{@@headings}:: An option for turning headings on and off
3885 and double or single sided printing.
3886 * @t{@@paragraphindent}:: Specify paragraph indentation.
3887 * @t{@@firstparagraphindent}:: Suppressing first paragraph indentation.
3888 * @t{@@exampleindent}:: Specify environment indentation.
3889 @end menu
3890
3891
3892 @node @t{@@documentdescription}
3893 @subsection @code{@@documentdescription}: Summary Text
3894 @anchor{documentdescription}@c old name
3895
3896 @cindex Document description
3897 @cindex Description of document
3898 @cindex Summary of document
3899 @cindex Abstract of document
3900 @cindex <meta> HTML tag, and document description
3901 @findex documentdescription
3902
3903 When producing HTML output for a document, @command{makeinfo} writes a
3904 @samp{<meta>} element in the @samp{<head>} to give some idea of the
3905 content of the document. By default, this @dfn{description} is the
3906 title of the document, taken from the @code{@@settitle} command
3907 (@pxref{@t{@@settitle}}). To change this, use the
3908 @code{@@documentdescription} environment, as in:
3909
3910 @example
3911 @@documentdescription
3912 descriptive text.
3913 @@end documentdescription
3914 @end example
3915
3916 @noindent
3917 This will produce the following output in the @samp{<head>} of the HTML:
3918
3919 @example
3920 <meta name=description content="descriptive text.">
3921 @end example
3922
3923 @code{@@documentdescription} must be specified before the first node of
3924 the document.
3925
3926
3927 @node @t{@@setchapternewpage}
3928 @subsection @code{@@setchapternewpage}: Blank Pages Before Chapters
3929
3930 @anchor{setchapternewpage}@c old name
3931 @findex setchapternewpage
3932 @cindex Starting chapters
3933 @cindex Pages, starting odd
3934
3935 In an officially bound book, text is usually printed on both sides of
3936 the paper, chapters start on right-hand pages, and right-hand pages have
3937 odd numbers. But in short reports, text often is printed only on one
3938 side of the paper. Also in short reports, chapters sometimes do not
3939 start on new pages, but are printed on the same page as the end of the
3940 preceding chapter, after a small amount of vertical whitespace.
3941
3942 You can use the @code{@@setchapternewpage} command with various
3943 arguments to specify how @TeX{} should start chapters and whether it
3944 should format headers for printing on one or both sides of the paper
3945 (single-sided or double-sided printing).
3946
3947 Write the @code{@@setchapternewpage} command at the beginning of a
3948 line followed by its argument.
3949
3950 For example, you would write the following to cause each chapter to
3951 start on a fresh odd-numbered page:
3952
3953 @example
3954 @@setchapternewpage odd
3955 @end example
3956
3957 You can specify one of three alternatives with the
3958 @code{@@setchapternewpage} command:
3959
3960 @table @asis
3961
3962 @item @code{@@setchapternewpage off}
3963 Cause @TeX{} to typeset a new chapter on the same page as the last
3964 chapter, after skipping some vertical whitespace. Also, cause @TeX{} to
3965 format page headers for single-sided printing.
3966
3967 @item @code{@@setchapternewpage on}
3968 Cause @TeX{} to start new chapters on new pages and to format page
3969 headers for single-sided printing. This is the form most often used for
3970 short reports or personal printing. This is the default.
3971
3972 @item @code{@@setchapternewpage odd}
3973 Cause @TeX{} to start new chapters on new, odd-numbered pages
3974 (right-handed pages) and to typeset for double-sided printing. This is
3975 the form most often used for books and manuals.
3976 @end table
3977
3978 Texinfo does not have an @code{@@setchapternewpage even} command,
3979 because there is no printing tradition of starting chapters or books on
3980 an even-numbered page.
3981
3982 If you don't like the default headers that @code{@@setchapternewpage}
3983 sets, you can explicit control them with the @code{@@headings} command.
3984 @xref{@t{@@headings}}.
3985
3986 At the beginning of a manual or book, pages are not numbered---for
3987 example, the title and copyright pages of a book are not numbered. By
3988 convention, table of contents and frontmatter pages are numbered with
3989 roman numerals and not in sequence with the rest of the document.
3990
3991 The @code{@@setchapternewpage} has no effect in output formats that do
3992 not have pages, such as Info and HTML.
3993
3994 We recommend not including any @code{@@setchapternewpage} command in
3995 your document source at all, since such desired pagination is not
3996 intrinsic to the document. For a particular hard copy run, if you
3997 don't want the default output (no blank pages, same headers on all
3998 pages) use the @option{--texinfo} option to @command{texi2dvi} to
3999 specify the output you want.
4000
4001
4002 @node @t{@@headings}
4003 @subsection The @code{@@headings} Command
4004
4005 @anchor{headings on off}@c old name
4006 @findex headings
4007
4008 The @code{@@headings} command is rarely used. It specifies what kind of
4009 page headings and footings to print on each page. Usually, this is
4010 controlled by the @code{@@setchapternewpage} command. You need the
4011 @code{@@headings} command only if the @code{@@setchapternewpage} command
4012 does not do what you want, or if you want to turn off predefined page
4013 headings prior to defining your own. Write an @code{@@headings} command
4014 immediately after the @code{@@end titlepage} command.
4015
4016 You can use @code{@@headings} as follows:
4017
4018 @table @code
4019 @item @@headings off
4020 Turn off printing of page headings.
4021
4022 @item @@headings single
4023 Turn on page headings appropriate for single-sided printing.
4024
4025 @item @@headings double
4026 Turn on page headings appropriate for double-sided printing.
4027
4028 @item @@headings singleafter
4029 @itemx @@headings doubleafter
4030 Turn on @code{single} or @code{double} headings, respectively, after the
4031 current page is output.
4032
4033 @item @@headings on
4034 Turn on page headings: @code{single} if @samp{@@setchapternewpage
4035 on}, @code{double} otherwise.
4036 @end table
4037
4038 For example, suppose you write @code{@@setchapternewpage off} before the
4039 @code{@@titlepage} command to tell @TeX{} to start a new chapter on the
4040 same page as the end of the last chapter. This command also causes
4041 @TeX{} to typeset page headers for single-sided printing. To cause
4042 @TeX{} to typeset for double sided printing, write @code{@@headings
4043 double} after the @code{@@end titlepage} command.
4044
4045 You can stop @TeX{} from generating any page headings at all by
4046 writing @code{@@headings off} on a line of its own immediately after the
4047 line containing the @code{@@end titlepage} command, like this:
4048
4049 @example
4050 @@end titlepage
4051 @@headings off
4052 @end example
4053
4054 @noindent
4055 The @code{@@headings off} command overrides the @code{@@end titlepage}
4056 command, which would otherwise cause @TeX{} to print page headings.
4057
4058 You can also specify your own style of page heading and footing.
4059 @xref{Headings, , Page Headings}, for more information.
4060
4061
4062 @node @t{@@paragraphindent}
4063 @subsection @code{@@paragraphindent}: Controlling Paragraph Indentation
4064
4065 @anchor{paragraphindent}@c old name
4066 @findex paragraphindent
4067 @cindex Indenting paragraphs, control of
4068 @cindex Paragraph indentation control
4069
4070 The Texinfo processors may insert whitespace at the beginning of the
4071 first line of each paragraph, thereby indenting that paragraph. You can
4072 use the @code{@@paragraphindent} command to specify this indentation.
4073 Write an @code{@@paragraphindent} command at the beginning of a line
4074 followed by either @samp{asis} or a number:
4075
4076 @example
4077 @@paragraphindent @var{indent}
4078 @end example
4079
4080 The indentation is according to the value of @var{indent}:
4081
4082 @table @asis
4083 @item @code{asis}
4084 Do not change the existing indentation (not implemented in @TeX{}).
4085
4086 @item @code{none}
4087 @itemx 0
4088 Omit all indentation.
4089
4090 @item @var{n}
4091 Indent by @var{n} space characters in Info output, by @var{n} ems in
4092 @TeX{}.
4093
4094 @end table
4095
4096 The default value of @var{indent} is 3. @code{@@paragraphindent} is
4097 ignored for HTML output.
4098
4099 It is best to write the @code{@@paragraphindent} command before the
4100 end-of-header line at the beginning of a Texinfo file, so the region
4101 formatting commands indent paragraphs as specified. @xref{Start of
4102 Header}.
4103
4104 A peculiarity of the @code{texinfo-format-buffer} and
4105 @code{texinfo-format-region} commands is that they do not indent (nor
4106 fill) paragraphs that contain @code{@@w} or @code{@@*} commands.
4107
4108
4109 @node @t{@@firstparagraphindent}
4110 @subsection @code{@@firstparagraphindent}: Indenting After Headings
4111
4112 @anchor{firstparagraphindent}@c old name
4113 @findex firstparagraphindent
4114 @cindex First paragraph, suppressing indentation of
4115 @cindex Suppressing first paragraph indentation
4116 @cindex Preventing first paragraph indentation
4117 @cindex Indenting, suppressing of first paragraph
4118 @cindex Headings, indentation after
4119
4120 As you can see in the present manual, the first paragraph in any
4121 section is not indented by default. Typographically, indentation is a
4122 paragraph separator, which means that it is unnecessary when a new
4123 section begins. This indentation is controlled with the
4124 @code{@@firstparagraphindent} command:
4125
4126 @example
4127 @@firstparagraphindent @var{word}
4128 @end example
4129
4130 The first paragraph after a heading is indented according to the value
4131 of @var{word}:
4132
4133 @table @asis
4134 @item @code{none}
4135 Prevents the first paragraph from being indented (default).
4136 This option is ignored by @command{makeinfo} if
4137 @code{@@paragraphindent asis} is in effect.
4138
4139 @item @code{insert}
4140 Include normal paragraph indentation. This respects the paragraph
4141 indentation set by an @code{@@paragraphindent} command
4142 (@pxref{@t{@@paragraphindent}}).
4143 @end table
4144
4145 @code{@@firstparagraphindent} is ignored for HTML and Docbook output.
4146
4147 It is best to write the @code{@@firstparagraphindent} command before the
4148 end-of-header line at the beginning of a Texinfo file, so the region
4149 formatting commands indent paragraphs as specified. @xref{Start of
4150 Header}.
4151
4152
4153 @node @t{@@exampleindent}
4154 @subsection @code{@@exampleindent}: Environment Indenting
4155
4156 @anchor{exampleindent}@c old name
4157 @findex exampleindent
4158 @cindex Indenting environments
4159 @cindex Environment indentation
4160 @cindex Example indentation
4161
4162 The Texinfo processors indent each line of @code{@@example} and similar
4163 environments. You can use the @code{@@exampleindent} command to specify
4164 this indentation. Write an @code{@@exampleindent} command at the
4165 beginning of a line followed by either @samp{asis} or a number:
4166
4167 @example
4168 @@exampleindent @var{indent}
4169 @end example
4170
4171 The indentation is according to the value of @var{indent}:
4172
4173 @table @asis
4174 @item @code{asis}
4175 Do not change the existing indentation (not implemented in @TeX{}).
4176
4177 @item 0
4178 Omit all indentation.
4179
4180 @item @var{n}
4181 Indent environments by @var{n} space characters in Info output, by
4182 @var{n} ems in @TeX{}.
4183
4184 @end table
4185
4186 The default value of @var{indent} is 5 spaces in Info, and 0.4@dmn{in}
4187 in @TeX{}, which is somewhat less. (The reduction is to help @TeX{}
4188 fit more characters onto physical lines.)
4189
4190 It is best to write the @code{@@exampleindent} command before the
4191 end-of-header line at the beginning of a Texinfo file, so the region
4192 formatting commands indent paragraphs as specified. @xref{Start of
4193 Header}.
4194
4195
4196 @node Ending a File
4197 @chapter Ending a Texinfo File
4198 @cindex Ending a Texinfo file
4199 @cindex Texinfo file ending
4200 @cindex File ending
4201 @findex bye
4202
4203 The end of a Texinfo file should include commands to create indices,
4204 and the @code{@@bye} command to mark the last line to be processed.
4205 For example:
4206
4207 @example
4208 @@node Index
4209 @@unnumbered Index
4210
4211 @@printindex cp
4212
4213 @@bye
4214 @end example
4215
4216 @menu
4217 * Printing Indices & Menus:: How to print an index in hardcopy and
4218 generate index menus in Info.
4219 * File End:: How to mark the end of a file.
4220 @end menu
4221
4222
4223 @node Printing Indices & Menus
4224 @section Printing Indices and Menus
4225 @cindex Printing an index
4226 @cindex Indices, printing and menus
4227 @cindex Generating menus with indices
4228 @cindex Menus generated with indices
4229
4230 To print an index means to include it as part of a manual or Info file.
4231 This does not happen automatically just because you use @code{@@cindex}
4232 or other index-entry generating commands in the Texinfo file; those just
4233 cause the raw data for the index to be accumulated. To generate an
4234 index, you must include the @code{@@printindex} command at the place in
4235 the document where you want the index to appear. Also, as part of the
4236 process of creating a printed manual, you must run a program called
4237 @code{texindex} (@pxref{Hardcopy}) to sort the raw data to produce a
4238 sorted index file. The sorted index file is what is actually used to
4239 print the index.
4240
4241 Texinfo offers six separate types of predefined index, which suffice
4242 in most cases. @xref{Indices}, for information on this, as well
4243 defining your own new indices, combining indices, and, most
4244 importantly advice on writing the actual index entries. This section
4245 focuses on printing indices, which is done with the
4246 @code{@@printindex} command.
4247
4248 @findex printindex
4249 @code{@@printindex} takes one argument, a two-letter index
4250 abbreviation. It reads the corresponding sorted index file (for
4251 printed output), and formats it appropriately into an index.
4252
4253 The @code{@@printindex} command does not generate a chapter heading
4254 for the index, since different manuals have different needs.
4255 Consequently, you should precede the @code{@@printindex} command with
4256 a suitable section or chapter command (usually @code{@@appendix} or
4257 @code{@@unnumbered}) to supply the chapter heading and put the index
4258 into the table of contents. Precede the chapter heading with an
4259 @code{@@node} line as usual.
4260
4261 For example:
4262
4263 @smallexample
4264 @group
4265 @@node Variable Index
4266 @@unnumbered Variable Index
4267
4268 @@printindex vr
4269 @end group
4270
4271 @group
4272 @@node Concept Index
4273 @@unnumbered Concept Index
4274
4275 @@printindex cp
4276 @end group
4277 @end smallexample
4278
4279 If you have more than one index, we recommend placing the concept index last.
4280
4281 @itemize
4282 @item
4283 In printed output, @code{@@printindex} produces a traditional
4284 two-column index, with dot leaders between the index terms and page
4285 numbers.
4286
4287 @item
4288 In Info output, @code{@@printindex} produces a special menu containing
4289 the line number of the entry, relative to the start of the node. Info
4290 readers can use this to go to the exact line of an entry, not just the
4291 containing node. (Older Info readers will just go to the node.)
4292 Here's an example:
4293
4294 @smallexample
4295 * First index entry: Top. (line 7)
4296 @end smallexample
4297
4298 @noindent The actual number of spaces is variable, to right-justify
4299 the line number; it's been reduced here to make the line fit in the
4300 printed manual.
4301
4302 @item
4303 In plain text output, @code{@@printindex} produces the same menu, but
4304 the line numbers are relative to the start of the file, since that's
4305 more convenient for that format.
4306
4307 @item
4308 In HTML output, @code{@@printindex} produces links to the index
4309 entries.
4310
4311 @item
4312 In XML and Docbook output, it simply records the index to be printed.
4313 @end itemize
4314
4315
4316 @node File End
4317 @section @code{@@bye} File Ending
4318 @findex bye
4319
4320 An @code{@@bye} command terminates Texinfo processing. None of the
4321 formatters process anything following @code{@@bye}; any such text is
4322 completely ignored. The @code{@@bye} command should be on a line by
4323 itself.
4324
4325 Thus, if you wish, you may follow the @code{@@bye} line with arbitrary
4326 notes. Also, you may follow the @code{@@bye} line with a local
4327 variables list for XEmacs, most typically a @samp{compile-command}
4328 (@pxref{Compile-Command,, Using the Local Variables List}).
4329
4330
4331 @node Chapter Structuring
4332 @chapter Chapter Structuring
4333 @anchor{Structuring}@c old name
4334 @cindex Chapter structuring
4335 @cindex Structuring of chapters
4336 @cindex Sectioning
4337
4338 Texinfo's @dfn{chapter structuring} commands (could more generally be
4339 called @dfn{sectioning structuring}, but that is awkward) divide a
4340 document into a hierarchy of chapters, sections, subsections, and
4341 subsubsections. These commands generate large headings in the text,
4342 like the one above. They also provide information for generating the
4343 table of contents (@pxref{Contents,, Generating a Table of Contents}),
4344 and for implicitly determining node pointers, as is recommended
4345 (@pxref{@t{makeinfo} Pointer Creation}).
4346
4347 The chapter structuring commands do not create a node structure, so
4348 normally you put an @code{@@node} command immediately before each
4349 chapter structuring command (@pxref{Nodes}). The only time you are
4350 likely to use the chapter structuring commands without also using
4351 nodes is if you are writing a document that contains no cross
4352 references and will only be printed, not transformed into Info, HTML,
4353 or other formats.
4354
4355 @menu
4356 * Tree Structuring:: A manual is like an upside down tree @dots{}
4357 * Structuring Command Types:: How to divide a manual into parts.
4358 * @t{@@chapter}:: Chapter structuring.
4359 * @t{@@unnumbered @@appendix}::
4360 * @t{@@majorheading @@chapheading}::
4361 * @t{@@section}::
4362 * @t{@@unnumberedsec @@appendixsec @@heading}::
4363 * @t{@@subsection}::
4364 * @t{@@unnumberedsubsec @@appendixsubsec @@subheading}::
4365 * @t{@@subsubsection}:: Commands for the lowest level sections.
4366 * @t{@@part}:: Collections of chapters.
4367 * Raise/lower sections:: How to change commands' hierarchical level.
4368 @end menu
4369
4370
4371 @node Tree Structuring
4372 @section Tree Structure of Sections
4373 @cindex Tree structuring
4374
4375 A Texinfo file is usually structured like a book with chapters,
4376 sections, subsections, and the like. This structure can be visualized
4377 as a tree (or rather as an upside-down tree) with the root at the top
4378 and the levels corresponding to chapters, sections, subsection, and
4379 subsubsections.
4380
4381 Here is a diagram that shows a Texinfo file with three chapters, each
4382 with two sections.
4383
4384 @example
4385 @group
4386 Top
4387 |
4388 -------------------------------------
4389 | | |
4390 Chapter 1 Chapter 2 Chapter 3
4391 | | |
4392 -------- -------- --------
4393 | | | | | |
4394 Section Section Section Section Section Section
4395 1.1 1.2 2.1 2.2 3.1 3.2
4396
4397 @end group
4398 @end example
4399
4400 In a Texinfo file that has this structure, the beginning of Chapter 2
4401 would normally (with implicitly-determined node pointers) be written
4402 like this:
4403
4404 @example
4405 @group
4406 @@node Chapter 2
4407 @@chapter Chapter 2
4408 @end group
4409 @end example
4410
4411 @noindent
4412 But for purposes of example, here is how it would be written with
4413 explicit node pointers:
4414
4415 @example
4416 @group
4417 @@node Chapter 2, Chapter 3, Chapter 1, Top
4418 @@chapter Chapter 2
4419 @end group
4420 @end example
4421
4422 The chapter structuring commands are described in the sections that
4423 follow; the @code{@@node} command is described in
4424 the following chapter (@pxref{Nodes}).
4425
4426
4427 @node Structuring Command Types
4428 @section Structuring Command Types
4429
4430 The chapter structuring commands fall into four groups or series, each
4431 of which contains structuring commands corresponding to the
4432 hierarchical levels of chapters, sections, subsections, and
4433 subsubsections.
4434
4435 The four groups of commands are the @code{@@chapter} series, the
4436 @code{@@unnumbered} series, the @code{@@appendix} series, and the
4437 @code{@@heading} series. Each command produces a title with a
4438 different appearance in the body of the document. Some of the
4439 commands list their titles in the tables of contents, while others do
4440 not. Here are the details:
4441
4442 @itemize @bullet
4443 @item
4444 The @code{@@chapter} and @code{@@appendix} series of commands produce
4445 numbered or lettered entries both in the body of a document and in its
4446 table of contents.
4447
4448 @item
4449 The @code{@@unnumbered} series of commands produce unnumbered entries
4450 both in the body of a document and in its table of contents. The
4451 @code{@@top} command, which has a special use, is a member of this
4452 series (@pxref{@t{@@top} Command}). An @code{@@unnumbered} section
4453 is a normal part of the document structure.
4454
4455 @item
4456 The @code{@@heading} series of commands produce simple unnumbered
4457 headings that do not appear in a table of contents, are not associated
4458 with nodes, and cannot be cross-referenced. These heading commands
4459 never start a new page.
4460 @end itemize
4461
4462 When an @code{@@setchapternewpage} command says to do so, the
4463 @code{@@chapter}, @code{@@unnumbered}, and @code{@@appendix} commands
4464 start new pages in the printed manual; the @code{@@heading} commands
4465 do not. @xref{@t{@@setchapternewpage}}.
4466
4467 Here is a summary:
4468
4469 @tex
4470 {\globaldefs=1 \smallfonts \rm}
4471 @end tex
4472
4473 @multitable @columnfractions .19 .30 .29 .22
4474 @item @tab @tab @tab No new page
4475 @item @i{Numbered} @tab @i{Unnumbered} @tab @i{Lettered/numbered} @tab @i{Unnumbered}
4476 @item In contents @tab In contents @tab In contents @tab Not in contents
4477 @item @tab @code{@@top} @tab @tab @code{@@majorheading}
4478 @item @code{@@chapter} @tab @code{@@unnumbered} @tab @code{@@appendix} @tab @code{@@chapheading}
4479 @item @code{@@section} @tab @code{@@unnumberedsec} @tab @code{@@appendixsec} @tab @code{@@heading}
4480 @item @code{@@subsection} @tab @code{@@unnumberedsubsec} @tab @code{@@appendixsubsec} @tab @code{@@subheading}
4481 @item @code{@@subsubsection} @tab @code{@@unnumberedsubsubsec} @tab @code{@@appendixsubsubsec} @tab @code{@@subsubheading}
4482 @end multitable
4483 @tex
4484 {\globaldefs=1 \textfonts \rm}
4485 @end tex
4486
4487
4488 @node @t{@@chapter}
4489 @section @code{@@chapter}: Chapter Structuring
4490
4491 @anchor{chapter}@c old name
4492 @findex chapter
4493
4494 @code{@@chapter} identifies a chapter in the document--the highest
4495 level of the normal document structuring hierarchy. Write the command
4496 at the beginning of a line and follow it on the same line by the title
4497 of the chapter. The chapter is numbered automatically, starting
4498 from@tie{}1.
4499
4500 For example, the present chapter in this manual is entitled
4501 ``@code{@@chapter}: Chapter Structuring''; the @code{@@chapter} line
4502 looks like this:
4503
4504 @example
4505 @@chapter @@code@{@@@@chapter@}: Chapter Structuring
4506 @end example
4507
4508 In @TeX{}, the @code{@@chapter} command produces a chapter heading in
4509 the document.
4510
4511 In Info and plain text output, the @code{@@chapter} command causes the
4512 title to appear on a line by itself, with a line of asterisks inserted
4513 underneath. So, the above example produces the following output:
4514
4515 @example
4516 @group
4517 5 Chapter Structuring
4518 *********************
4519 @end group
4520 @end example
4521
4522 In HTML, the @code{@@chapter} command produces an @code{<h2>}-level
4523 header by default (controlled by the @code{CHAPTER_HEADER_LEVEL}
4524 customization variable, @pxref{Other Customization Variables}).
4525
4526 In the XML and Docbook output, a @code{<chapter>} element is produced
4527 that includes all the following sections, up to the next chapter.
4528
4529
4530 @node @t{@@unnumbered @@appendix}
4531 @section @code{@@unnumbered}, @code{@@appendix}: Chapters with Other Labeling
4532
4533 @anchor{unnumbered & appendix}@c old name
4534 @findex unnumbered
4535 @findex appendix
4536
4537 Use the @code{@@unnumbered} command to start a chapter-level element
4538 that appears without chapter numbers of any kind. Use the
4539 @code{@@appendix} command to start an appendix that is labeled by
4540 letter (`A', `B', @dots{}) instead of by number; appendices are also
4541 at the chapter level of structuring.
4542
4543 Write an @code{@@appendix} or @code{@@unnumbered} command at the
4544 beginning of a line and follow it on the same line by the title,
4545 just as with @code{@@chapter}.
4546
4547 @findex centerchap
4548 Texinfo also provides a command @code{@@centerchap}, which is analogous
4549 to @code{@@unnumbered}, but centers its argument in the printed and HTML
4550 outputs. This kind of stylistic choice is not usually offered by
4551 Texinfo. It may be suitable for short documents.
4552 @c but the Hacker's Dictionary wanted it, before they quit Texinfo.
4553
4554 @cindex Docbook and prefatory sections
4555 @cindex Preface, etc., and Docbook
4556 With @code{@@unnumbered}, if the name of the associated node is one of
4557 these English words (case-insensitive):
4558
4559 @example
4560 Acknowledgements Colophon Dedication Preface
4561 @end example
4562
4563 @cindex @code{<acknowledgements>} Docbook tag
4564 @cindex @code{<colophon>} Docbook tag
4565 @cindex @code{<dedication>} Docbook tag
4566 @cindex @code{<preface>} Docbook tag
4567 @cindex @code{<chapter>} Docbook tag
4568 @cindex @code{<title>} Docbook tag
4569 @noindent then the Docbook output uses corresponding special tags
4570 (@code{<preface>}, etc.)@: instead of the default @code{<chapter>}.
4571 The argument to @code{@@unnumbered} itself can be anything, and is
4572 output as the following @code{<title>} text as usual.
4573
4574
4575 @node @t{@@majorheading @@chapheading}
4576 @section @code{@@majorheading}, @code{@@chapheading}: Chapter-level Headings
4577
4578 @anchor{majorheading & chapheading}@c old name
4579 @findex majorheading
4580 @findex chapheading
4581
4582 The @code{@@majorheading} and @code{@@chapheading} commands produce
4583 chapter-like headings in the body of a document.
4584
4585 However, neither command produces an entry in the table of contents,
4586 and neither command causes @TeX{} to start a new page in a printed
4587 manual.
4588
4589 In @TeX{}, an @code{@@majorheading} command generates a larger vertical
4590 whitespace before the heading than an @code{@@chapheading} command but
4591 is otherwise the same.
4592
4593 In Info and plain text, the @code{@@majorheading} and
4594 @code{@@chapheading} commands produce the same output as
4595 @code{@@chapter}: the title is printed on a line by itself with a line
4596 of asterisks underneath. Similarly for HTML@. The only difference is
4597 the lack of numbering and the lack of any association with nodes.
4598 @xref{@t{@@chapter}}.
4599
4600
4601 @node @t{@@section}
4602 @section @code{@@section}: Sections Below Chapters
4603
4604 @anchor{section}@c old name
4605 @findex section
4606
4607 An @code{@@section} command identifies a section within a chapter
4608 unit, whether created with @code{@@chapter}, @code{@@unnumbered}, or
4609 @code{@@appendix}, following the numbering scheme of the chapter-level
4610 command. Thus, within an @code{@@chapter} chapter numbered `1', the
4611 sections are numbered `1.1', `1.2', etc.; within an @code{@@appendix}
4612 ``chapter'' labeled `A', the sections are numbered `A.1', `A.2', etc.;
4613 within an @code{@@unnumbered} chapter, the section gets no number.
4614 The output is underlined with @samp{=} in Info and plain text.
4615
4616 To make a section, write the @code{@@section} command at the
4617 beginning of a line and follow it on the same line by the section
4618 title. For example,
4619
4620 @example
4621 @@section This is a section
4622 @end example
4623
4624 @noindent
4625 might produce the following in Info:
4626
4627 @example
4628 @group
4629 5.7 This is a section
4630 =====================
4631 @end group
4632 @end example
4633
4634 Section titles are listed in the table of contents.
4635
4636 The @TeX{}, HTML, Docbook, and XML output is all analogous to the
4637 chapter-level output, just ``one level down''; @pxref{@t{@@chapter}}.
4638
4639
4640 @node @t{@@unnumberedsec @@appendixsec @@heading}
4641 @section @code{@@unnumberedsec}, @code{@@appendixsec}, @code{@@heading}
4642
4643 @anchor{unnumberedsec appendixsec heading}@c old name
4644 @findex unnumberedsec
4645 @findex appendixsec
4646 @findex heading
4647
4648 The @code{@@unnumberedsec}, @code{@@appendixsec}, and @code{@@heading}
4649 commands are, respectively, the unnumbered, appendix-like, and
4650 heading-like equivalents of the @code{@@section} command (see the
4651 previous section).
4652
4653 @code{@@unnumberedsec} and @code{@@appendixsec} do not need to be used
4654 in ordinary circumstances, because @code{@@section} may also be used
4655 within @code{@@unnumbered} and @code{@@appendix} chapters; again, see
4656 the previous section.
4657
4658 @table @code
4659 @item @@unnumberedsec
4660 The @code{@@unnumberedsec} command may be used within an unnumbered
4661 chapter or within a regular chapter or appendix to produce an
4662 unnumbered section.
4663
4664 @item @@appendixsec
4665 @itemx @@appendixsection
4666 @findex appendixsection
4667 @findex appendixsec
4668 @code{@@appendixsection} is a longer spelling of the
4669 @code{@@appendixsec} command; the two are synonymous.
4670
4671 Conventionally, the @code{@@appendixsec} or @code{@@appendixsection}
4672 command is used only within appendices.
4673
4674 @item @@heading
4675 You may use the @code{@@heading} command anywhere you wish for a
4676 section-style heading that will not appear in the table of contents.
4677 @end table
4678
4679
4680 @node @t{@@subsection}
4681 @section @code{@@subsection}: Subsections Below Sections
4682
4683 @anchor{subsection}@c old name
4684 @findex subsection
4685
4686 Subsections are to sections as sections are to chapters;
4687 @pxref{@t{@@section}}. In Info and plain text, subsection titles
4688 are underlined with @samp{-}. For example,
4689
4690 @example
4691 @@subsection This is a subsection
4692 @end example
4693
4694 @noindent
4695 might produce
4696
4697 @example
4698 @group
4699 1.2.3 This is a subsection
4700 --------------------------
4701 @end group
4702 @end example
4703
4704 Subsection titles are listed in the table of contents.
4705
4706 The @TeX{}, HTML, Docbook, and XML output is all analogous to the
4707 chapter-level output, just ``two levels down'';
4708 @pxref{@t{@@chapter}}.
4709
4710
4711 @node @t{@@unnumberedsubsec @@appendixsubsec @@subheading}
4712 @section The @code{@@subsection}-like Commands
4713
4714 @anchor{unnumberedsubsec appendixsubsec subheading}@c old name
4715 @findex unnumberedsubsec
4716 @findex appendixsubsec
4717 @findex subheading
4718 @cindex Subsection-like commands
4719
4720 The @code{@@unnumberedsubsec}, @code{@@appendixsubsec}, and
4721 @code{@@subheading} commands are, respectively, the unnumbered,
4722 appendix-like, and heading-like equivalents of the @code{@@subsection}
4723 command. (@xref{@t{@@subsection}}.)
4724
4725 @code{@@unnumberedsubsec} and @code{@@appendixsubsec} do not need to
4726 be used in ordinary circumstances, because @code{@@subsection} may
4727 also be used within sections of @code{@@unnumbered} and
4728 @code{@@appendix} chapters (@pxref{@t{@@section}}).
4729
4730 An @code{@@subheading} command produces a heading like that of a
4731 subsection except that it is not numbered and does not appear in the
4732 table of contents. Similarly, an @code{@@unnumberedsubsec} command
4733 produces an unnumbered heading like that of a subsection and an
4734 @code{@@appendixsubsec} command produces a subsection-like heading
4735 labeled with a letter and numbers; both of these commands produce
4736 headings that appear in the table of contents. In Info and plain
4737 text, the @code{@@subsection}-like commands generate a title
4738 underlined with hyphens.
4739
4740
4741 @node @t{@@subsubsection}
4742 @section @code{@@subsection} and Other Subsub Commands
4743
4744 @anchor{subsubsection}@c old name
4745 @findex subsubsection
4746 @findex unnumberedsubsubsec
4747 @findex appendixsubsubsec
4748 @findex subsubheading
4749 @cindex Subsub sectioning commands
4750
4751 The fourth and lowest level sectioning commands in Texinfo are the
4752 `subsub' commands. They are:
4753
4754 @table @code
4755 @item @@subsubsection
4756 Subsubsections are to subsections as subsections are to sections.
4757 (@xref{@t{@@subsection}}.) Subsubsection titles appear in the
4758 table of contents.
4759
4760 @item @@unnumberedsubsubsec
4761 Unnumbered subsubsection titles appear in the table of contents,
4762 but lack numbers. Otherwise, unnumbered subsubsections are the same
4763 as subsubsections.
4764
4765 @item @@appendixsubsubsec
4766 Conventionally, appendix commands are used only for appendices and are
4767 lettered and numbered appropriately. They also appear in the table
4768 of contents.
4769
4770 @item @@subsubheading
4771 The @code{@@subsubheading} command may be used anywhere that you want
4772 a small heading that will not appear in the table of contents.
4773 @end table
4774
4775 As with subsections, @code{@@unnumberedsubsubsec} and
4776 @code{@@appendixsubsubsec} do not need to be used in ordinary
4777 circumstances, because @code{@@subsubsection} may also be used within
4778 subsections of @code{@@unnumbered} and @code{@@appendix} chapters
4779 (@pxref{@t{@@section}}).
4780
4781 In Info, `subsub' titles are underlined with periods. For example,
4782
4783 @example
4784 @@subsubsection This is a subsubsection
4785 @end example
4786
4787 @noindent
4788 might produce
4789
4790 @example
4791 @group
4792 1.2.3.4 This is a subsubsection
4793 ...............................
4794 @end group
4795 @end example
4796
4797 The @TeX{}, HTML, Docbook, and XML output is all analogous to the
4798 chapter-level output, just ``three levels down''; @pxref{@t{@@chapter}}.
4799
4800
4801 @node @t{@@part}
4802 @section @code{@@part}: Groups of Chapters
4803 @findex part
4804 @cindex Part pages
4805
4806 The final sectioning command is @code{@@part}, to mark a @dfn{part} of
4807 a manual, that is, a group of chapters or (rarely) appendices. This
4808 behaves quite differently from the other sectioning commands, to fit
4809 with the way such ``parts'' are conventionally used in books.
4810
4811 No @code{@@node} command is associated with @code{@@part}. Just write
4812 the command on a line by itself, including the part title, at the
4813 place in the document you want to mark off as starting that part. For
4814 example:
4815
4816 @example
4817 @@part Part I:@@* The beginning
4818 @end example
4819
4820 As can be inferred from this example, no automatic numbering or
4821 labeling of the @code{@@part} text is done. The text is taken as-is.
4822
4823 Because parts are not associated with nodes, no general text can
4824 follow the @code{@@part} line. To produce the intended output, it
4825 must be followed by a chapter-level command (including its node).
4826 Thus, to continue the example:
4827
4828 @example
4829 @@part Part I:@@* The beginning
4830
4831 @@node Introduction
4832 @@chapter Introduction
4833 ...
4834 @end example
4835
4836 In the @TeX{} output, the @code{@@part} text is included in both the
4837 normal and short tables of contents (@pxref{Contents}), without a page
4838 number (since that is the normal convention). In addition, a ``part
4839 page'' is output in the body of the document, with just the
4840 @code{@@part} text. In the example above, the @code{@@*} causes a
4841 line break on the part page (but is replaced with a space in the
4842 tables of contents). This part page is always forced to be on an odd
4843 (right-hand) page, regardless of the chapter pagination
4844 (@pxref{@t{@@setchapternewpage}}).
4845
4846 In the HTML output, the @code{@@part} text is similarly included in
4847 the tables of contents, and a heading is included in the main document
4848 text, as part of the following chapter or appendix node.
4849
4850 In the XML and Docbook output, the @code{<part>} element includes all
4851 the following chapters, up to the next @code{<part>}. A @code{<part>}
4852 containing chapters is also closed at an appendix.
4853
4854 In the Info and plain text output, @code{@@part} has no effect.
4855
4856 @code{@@part} is ignored when raising or lowering sections (see next
4857 section). That is, it is never lowered and nothing can be raised to it.
4858
4859
4860 @node Raise/lower sections
4861 @section Raise/lower Sections: @code{@@raisesections} and @code{@@lowersections}
4862 @findex raisesections
4863 @findex lowersections
4864 @cindex Raising and lowering sections
4865 @cindex Lowering and raising sections
4866 @cindex Sections, raising and lowering
4867
4868 The @code{@@raisesections} and @code{@@lowersections} commands
4869 implicitly raise and lower the hierarchical level of following
4870 chapters, sections and the other sectioning commands (excluding parts).
4871
4872 That is, the @code{@@raisesections} command changes sections to
4873 chapters, subsections to sections, and so on. Conversely, the
4874 @code{@@lowersections} command changes chapters to sections, sections
4875 to subsections, and so on. Thus, an @code{@@lowersections} command
4876 cancels an @code{@@raisesections} command, and vice versa.
4877
4878 @cindex Include files, and section levels
4879 You can use @code{@@lowersections} to include text written as an outer
4880 or standalone Texinfo file in another Texinfo file as an inner,
4881 included file (@pxref{Include Files}). Typical usage looks like this:
4882
4883 @example
4884 @@lowersections
4885 @@include somefile.texi
4886 @@raisesections
4887 @end example
4888
4889 @noindent (Without the @code{@@raisesections}, all the subsequent
4890 sections in the main file would also be lowered.)
4891
4892 If the included file being lowered has an @code{@@top} node, you'll
4893 need to conditionalize its inclusion with a flag (@pxref{@t{@@set
4894 @@value}}).
4895
4896 Another difficulty can arise with documents that use the (recommended)
4897 feature of @command{makeinfo} for implicitly determining node
4898 pointers. Since @command{makeinfo} must assume a hierarchically
4899 organized document to determine the pointers, you cannot just
4900 arbitrarily sprinkle @code{@@raisesections} and @code{@@lowersections}
4901 commands throughout the document. The final result has to have menus
4902 that take the raising and lowering into account. So, as a practical
4903 matter, you generally only want to raise or lower large chunks,
4904 usually in external files as shown above.
4905
4906 Repeated use of the commands continues to raise or lower the
4907 hierarchical level a step at a time. An attempt to raise above
4908 `chapter' reproduces chapter commands; an attempt to lower below
4909 `subsubsection' reproduces subsubsection commands. Also, lowered
4910 subsubsections and raised chapters will not work with
4911 @command{makeinfo}'s feature of implicitly determining node pointers,
4912 since the menu structure cannot be represented correctly.
4913
4914 Write each @code{@@raisesections} and @code{@@lowersections} command
4915 on a line of its own.
4916
4917
4918 @node Nodes
4919 @chapter Nodes
4920
4921 @dfn{Nodes} are the primary segments of a Texinfo file. They do not
4922 in and of themselves impose a hierarchical or any other kind of
4923 structure on a file. Nodes contain @dfn{node pointers} that name
4924 other nodes, and can contain @dfn{menus} which are lists of nodes. In
4925 Info, the movement commands can carry you to a pointed-to node or to a
4926 node listed in a menu.
4927
4928 Node pointers and menus provide structure for Info files just as
4929 chapters, sections, subsections, and the like provide structure for
4930 printed books. The two structures are theoretically distinct. In
4931 practice, however, the tree structure of printed books is essentially
4932 always used for the node and menu structure also, as this leads to a
4933 document which is easiest to follow. @xref{Texinfo Document
4934 Structure}.
4935
4936 Because node names are used in cross references, it is not desirable
4937 to casually change them once published. Such name changes invalidate
4938 references from other manuals, from mail archives, and so on.
4939 @xref{HTML Xref Link Preservation}.
4940
4941 @menu
4942 * @t{@@node}:: Creating nodes, in detail.
4943 * @t{makeinfo} Pointer Creation:: Letting makeinfo determine node pointers.
4944 * @t{@@anchor}:: Defining arbitrary cross reference targets.
4945 * Node Menu Illustration:: A diagram, and sample nodes and menus.
4946 @end menu
4947
4948
4949 @node @t{@@node}
4950 @section The @code{@@node} Command
4951
4952 @anchor{node}@c node
4953 @findex node
4954 @cindex Node, defined
4955
4956 A @dfn{node} is a stretch of text that begins at an @code{@@node}
4957 command and continues until the next @code{@@node} command. The
4958 definition of node is different from that for chapter or section. A
4959 chapter may contain sections and a section may contain subsections,
4960 but a node cannot contain subnodes: the text of a node continues only
4961 until the next @code{@@node} command in the file. A node usually
4962 contains only one chapter structuring command, immediately following
4963 the @code{@@node} line.
4964
4965 To specify a node, write an @code{@@node} command at the beginning of
4966 a line, and follow it with up to four arguments, separated by commas,
4967 on the rest of the same line. The first argument is required; it is
4968 the name of this node (for details of node names, @pxref{Node Line
4969 Requirements}). The subsequent arguments are optional---they are the
4970 names of the `Next', `Previous', and `Up' pointers, in that order. We
4971 strongly recommend omitting them if your Texinfo document is
4972 hierarchically organized, as virtually all are (@pxref{@t{makeinfo}
4973 Pointer Creation}). You may insert spaces before or after each name
4974 on the @code{@@node} line if you wish; such spaces are ignored.
4975
4976 @opindex accesskey@r{, in HTML output of nodes}
4977 Whether the node pointers are specified implicitly or explicitly, the
4978 Info and HTML output from @command{makeinfo} for each node includes
4979 links to the `Next', `Previous', and `Up' nodes. The HTML also uses
4980 the @code{accesskey} attribute with the values @samp{n}, @samp{p}, and
4981 @samp{u} respectively. This allows people using web browsers to
4982 follow the navigation using (typically) @kbd{M-@var{letter}}, e.g.,
4983 @kbd{M-n} for the `Next' node, from anywhere within the node.
4984
4985 Usually, you write one of the chapter-structuring command lines
4986 immediately after an @code{@@node} line---for example, an
4987 @code{@@section} or @code{@@subsection} line. @xref{Structuring
4988 Command Types}.
4989
4990 @TeX{} uses both @code{@@node} names and chapter-structuring names in
4991 the output for cross references. For this reason, you must write
4992 @code{@@node} lines in a Texinfo file that you intend to format for
4993 printing, even if you do not intend to format it for Info; and you
4994 must include a chapter-structuring command after a node for it to be a
4995 valid cross reference target (to @TeX{}). You can use @code{@@anchor}
4996 (@pxref{@t{@@anchor}}) to make cross references to an arbitrary
4997 position in a document.
4998
4999 Cross references, such as the one at the end of this sentence, are
5000 made with @code{@@xref} and related commands; see @ref{Cross
5001 References}.
5002
5003 @menu
5004 * Node Names:: How to choose node and pointer names.
5005 * Writing a Node:: How to write an @code{@@node} line.
5006 * Node Line Requirements:: Keep names unique.
5007 * First Node:: How to write a `Top' node.
5008 * @t{@@top} Command:: How to use the @code{@@top} command.
5009 @end menu
5010
5011
5012 @node Node Names
5013 @subsection Choosing Node and Pointer Names
5014
5015 @cindex Node names, choosing
5016 The name of a node identifies the node. For all the details of node
5017 names, @pxref{Node Line Requirements}).
5018
5019 @anchor{Node Line Tips}@c previous node name
5020 Here are some suggestions for node names:
5021
5022 @itemize @bullet
5023 @item
5024 Try to pick node names that are informative but short.
5025
5026 In the Info file, the file name, node name, and pointer names are all
5027 inserted on one line, which may run into the right edge of the window.
5028 (This does not cause a problem with Info, but is ugly.)
5029
5030 @item
5031 Try to pick node names that differ from each other near the beginnings
5032 of their names. This way, it is easy to use automatic name completion in
5033 Info.
5034
5035 @item
5036 Conventionally, node names are capitalized in the same way as section
5037 and chapter titles. In this manual, initial and significant words are
5038 capitalized; others are not. In other manuals, just initial words and
5039 proper nouns are capitalized. Either way is fine; we recommend just
5040 being consistent.
5041 @end itemize
5042
5043 The pointers from a given node enable you to reach other nodes and
5044 consist simply of the names of those nodes. The pointers are usually
5045 not specified explicitly, as @command{makeinfo} can determine them
5046 (@pxref{@t{makeinfo} Pointer Creation}).
5047
5048 Normally, a node's `Up' pointer contains the name of the node whose
5049 menu mentions that node. The node's `Next' pointer contains the name
5050 of the node that follows the present node in that menu and its
5051 `Previous' pointer contains the name of the node that precedes it in
5052 that menu. When a node's `Previous' node is the same as its `Up'
5053 node, both pointers name the same node.
5054
5055 Usually, the first node of a Texinfo file is the `Top' node, and its
5056 `Up' pointer points to the @file{dir} file, which contains the main menu
5057 for all of Info.
5058
5059
5060 @node Writing a Node
5061 @subsection Writing an @code{@@node} Line
5062 @cindex Writing an @code{@@node} line
5063 @cindex @code{@@node} line writing
5064 @cindex Node line writing
5065
5066 The easiest and preferred way to write an @code{@@node} line is to
5067 write @code{@@node} at the beginning of a line and then the name of
5068 the node, like this:
5069
5070 @example
5071 @@node @var{node-name}
5072 @end example
5073
5074 If you are using XEmacs, you can use the update node commands
5075 provided by Texinfo mode to insert the names of the pointers; or
5076 (recommended), you can leave the pointers out of the Texinfo file and
5077 let @code{makeinfo} insert node pointers into the Info file it
5078 creates. (@xref{Texinfo Mode}, and @ref{@t{makeinfo} Pointer
5079 Creation}.)
5080
5081 Alternatively, you can insert the `Next', `Previous', and `Up'
5082 pointers yourself. If you do this, you may find it helpful to use the
5083 Texinfo mode keyboard command @kbd{C-c C-c n}. This command inserts
5084 @samp{@@node} and a comment line listing the names of the pointers in
5085 their proper order. The comment line helps you keep track of which
5086 arguments are for which pointers. This comment line is especially useful
5087 if you are not familiar with Texinfo.
5088
5089 The template for a fully-written-out node line with `Next', `Previous',
5090 and `Up' pointers looks like this:
5091
5092 @example
5093 @@node @var{node-name}, @var{next}, @var{previous}, @var{up}
5094 @end example
5095
5096 The @var{node-name} argument must be present, but the others are
5097 optional. If you wish to specify some but not others, just insert
5098 commas as needed, as in: @samp{@@node mynode,,,uppernode}. However,
5099 we recommend leaving off all the pointers and letting @code{makeinfo}
5100 determine them, as described above.
5101
5102 It's, you can ignore @code{@@node} lines altogether in your
5103 first draft and then use the @code{texinfo-insert-node-lines} command
5104 to create @code{@@node} lines for you. However, we do not recommend
5105 this practice. It is better to name the node itself at the same time
5106 that you write a segment so you can easily make cross references.
5107 Useful cross references are an especially important feature of a good
5108 Texinfo manual.
5109
5110 After you have inserted an @code{@@node} line, you should immediately
5111 write an @@-command for the chapter or section and insert its name.
5112 Next (and this is important!), put in several index entries. Usually,
5113 you will find at least two and often as many as four or five ways of
5114 referring to the node in the index. Use them all. This will make it
5115 much easier for people to find the node.
5116
5117 Even when you explicitly specify all pointers, you cannot write the
5118 nodes in the Texinfo source file in an arbitrary order! Because
5119 formatters must process the file sequentially, irrespective of node
5120 pointers, you must write the nodes in the order you wish them to
5121 appear in the output. For Info format one can imagine that the order
5122 may not matter, but it matters for the other formats.
5123
5124
5125 @node Node Line Requirements
5126 @subsection @code{@@node} Line Requirements
5127
5128 @cindex Node line requirements
5129 @cindex Restrictions on node names
5130
5131 Names used with @code{@@node} have several requirements:
5132
5133 @itemize @bullet
5134 @item
5135 @cindex Unique node names requirement
5136 @cindex Node names must be unique
5137 All the node names in a single Texinfo file must be unique.
5138
5139 This means, for example, that if you end every chapter with a summary,
5140 you must name each summary node differently. You cannot just call
5141 them all ``Summary''. You may, however, duplicate the titles of
5142 chapters, sections, and the like. Thus you can end each chapter with
5143 a section called ``Summary'', so long as the node names for those
5144 sections are all different.
5145
5146 @item
5147 The next/previous/up pointers on @code{@@node} lines must be the names
5148 of nodes. (It's recommended to leave out these explicit node pointer
5149 names, which automatically avoids any problem here; @pxref{@t{makeinfo}
5150 Pointer Creation}.)
5151
5152 @item
5153 @cindex Commands in node names
5154 @cindex @@-commands in node names
5155 Node names can contain @@-commands. The output is generally the
5156 natural result of the command; for example, using @code{@@TeX@{@}} in a
5157 node name results in the @TeX{} logo being output, as it would be in
5158 normal text. Cross references should use @code{@@TeX@{@}} just as the
5159 node name does.
5160
5161 For Info and HTML output, especially, it is necessary to expand
5162 commands to some sequence of plain characters; for instance,
5163 @code{@@TeX@{@}} expands to the three letters @samp{TeX} in the Info
5164 node name. However, cross references to the node should not take the
5165 ``shortcut'' of using @samp{TeX}; stick to the actual node name,
5166 commands and all.
5167
5168 Some commands do not make sense in node names; for instance,
5169 environments (e.g., @code{@@quotation}), commands that read a whole
5170 line as their argument (e.g., @code{@@sp}), and plenty of others.
5171
5172 For the complete list of commands that are allowed, and their
5173 expansion for HTML identifiers and file names, @pxref{HTML Xref
5174 Command Expansion}. The expansions for Info are generally given with
5175 main the description of the command.
5176
5177 Prior to the Texinfo 5 release in 2013, this feature was supported in
5178 an ad hoc way (the @option{--commands-in-node-names} option to
5179 @command{makeinfo}). Now it is part of the language.
5180
5181 @item
5182 @cindex Colon in node name
5183 @cindex Comma in node name
5184 @cindex Parentheses in node name
5185 @cindex Period in node name
5186 @cindex Characters, invalid in node name
5187 @cindex Invalid characters in node names
5188 @cindex Node names, invalid characters in
5189 Unfortunately, you cannot reliably use periods, commas, or colons
5190 within a node name; these can confuse the Info reader. Also, a node
5191 name may not start with a left parenthesis preceding a right
5192 parenthesis, as in @code{(not)allowed}, since this syntax is used to
5193 specify an external manual. (Perhaps these limitations will be
5194 removed some day.)
5195
5196 @command{makeinfo} warns about such problematic usage in node names,
5197 menu items, and cross references. If you don't want to see the
5198 warnings, you can set the customization variable
5199 @code{INFO_SPECIAL_CHARS_WARNING} to @samp{0} (@pxref{Other
5200 Customization Variables}).
5201
5202 Also, if you insist on using these characters in node names (accepting
5203 the resulting substandard Info output), in order not to confuse the
5204 Texinfo processors you must still escape those characters, by using
5205 either special insertions (@pxref{Inserting a Comma}) or @code{@@asis}
5206 (@pxref{@t{@@asis}}). For example:
5207
5208 @example
5209 @@node foo@@asis@{::@}bar
5210 @end example
5211
5212 As an example of avoiding the special characters, the following is a
5213 section title in this manual:
5214
5215 @smallexample
5216 @@section @@code@{@@@@unnumbered@}, @@code@{@@@@appendix@}: ...
5217 @end smallexample
5218
5219 @noindent
5220 But the corresponding node name lacks the commas and the subtitle:
5221
5222 @smallexample
5223 @@node @t{@@unnumbered @@appendix}
5224 @end smallexample
5225
5226 @cindex Case in node name
5227 @item
5228 Case is significant in node names.
5229
5230 @cindex White space in node name
5231 @cindex Spaces in node name
5232 Spaces before and after names on the @samp{@@node} line are ignored.
5233 Multiple whitespace characters ``inside'' a name are collapsed to a
5234 single space. For example:
5235
5236 @example
5237 @@node foo bar,
5238 @@node foo bar ,
5239 @@node foo bar,
5240 @@node foo bar ,
5241 @end example
5242
5243 @noindent all define the same node, namely @samp{foo bar}. References
5244 to the node should all use that name, with no leading or trailing
5245 spaces, and a single internal space.
5246 @end itemize
5247
5248
5249 @node First Node
5250 @subsection The First Node
5251 @cindex Top node is first
5252 @cindex First node
5253
5254 The first node of a Texinfo file is the @dfn{Top} node, except in an
5255 included file (@pxref{Include Files}). The Top node should contain a
5256 short summary, copying permissions, and a master menu. @xref{The Top
5257 Node}, for more information on the Top node contents and examples.
5258
5259 Here is a description of the node pointers to be used in the Top node:
5260
5261 @itemize @bullet
5262 @item
5263 @cindex Up node of Top node
5264 @cindex (dir) as Up node of Top node
5265 The Top node (which must be named @samp{top} or @samp{Top}) should have
5266 as its `Up' node the name of a node in another file, where there is a
5267 menu that leads to this file. Specify the file name in parentheses.
5268
5269 Usually, all Info files are installed in one system-wide Info tree
5270 (often constructed from multiple directories). In this case, use
5271 @samp{(dir)} as the parent of the Top node; this specifies the
5272 top-level node in the @file{dir} file, which contains the main menu
5273 for the Info system as a whole.
5274
5275 @item
5276 @cindex Next node of Top node
5277 The `Next' node of the Top node should be the first chapter in your
5278 document.
5279
5280 @end itemize
5281
5282 @xref{Installing an Info File}, for more information about installing
5283 an Info file in the @file{info} directory.
5284
5285 It is usually best to leave the pointers off entirely and let the
5286 tools implicitly define them, with this simple result:
5287
5288 @example
5289 @@node Top
5290 @end example
5291
5292
5293 @node @t{@@top} Command
5294 @subsection The @code{@@top} Sectioning Command
5295
5296 @anchor{top command}@c old name
5297 @anchor{makeinfo top}@c another old name
5298 @anchor{makeinfo top command}@c yet another name
5299 @findex top
5300
5301 The @code{@@top} command is a special sectioning command that you
5302 should only use after an @samp{@@node Top} line at the beginning of a
5303 Texinfo file. The @code{@@top} command tells the @code{makeinfo}
5304 formatter which node is to be used as the root of the node tree
5305 (needed if your manual uses implicit node pointers).
5306
5307 It produces the same sort of output as @code{@@unnumbered}
5308 (@pxref{@t{@@unnumbered @@appendix}}).
5309
5310 The @code{@@top} node is conventionally wrapped in an
5311 @code{@@ifnottex} conditional so that it will not appear in @TeX{}
5312 output (@pxref{Conditionals}).
5313 Thus, in practice, a Top node usually looks like this:
5314
5315 @example
5316 @@ifnottex
5317 @@node Top
5318 @@top @var{your-manual-title}
5319
5320 @var{very-high-level-summary}
5321 @@end ifnottex
5322 @end example
5323
5324 @code{@@top} is ignored when raising or lowering sections. That is,
5325 it is never lowered and nothing can be raised to it
5326 (@pxref{Raise/lower sections}).
5327
5328
5329 @node @t{makeinfo} Pointer Creation
5330 @section @code{makeinfo} Pointer Creation
5331
5332 @cindex Creating pointers with @code{makeinfo}
5333 @cindex Pointer creation with @code{makeinfo}
5334 @cindex Automatic pointer creation with @code{makeinfo}
5335 @cindex Implicit pointer creation with @code{makeinfo}
5336
5337 The @code{makeinfo} program can automatically determine node pointers
5338 for a hierarchically organized document. This implicit node pointer
5339 creation feature in @code{makeinfo} relieves you from the need to
5340 update menus and pointers manually or with Texinfo mode commands.
5341 (@xref{Updating Nodes and Menus}.) We highly recommend taking
5342 advantage of this.
5343
5344 To do so, write your @code{@@node} lines with just the name of the
5345 node:
5346
5347 @example
5348 @@node My Node
5349 @end example
5350
5351 @noindent
5352 You do not need to write out the `Next', `Previous', and `Up'
5353 pointers.
5354
5355 Then, you must write a sectioning command, such as @code{@@chapter}
5356 or @code{@@section}, on the line immediately following each truncated
5357 @code{@@node} line (except that comment lines may intervene). This is
5358 where it normally goes.
5359
5360 Also, you must write the name of each node (except for the `Top' node)
5361 in a menu that is one or more hierarchical levels above the node's
5362 level.
5363
5364 Finally, you must follow the `Top' @code{@@node} line with a line
5365 beginning with @code{@@top} to mark the top-level node in the file.
5366 @xref{@t{@@top} Command}.
5367
5368 @cindex Detail menu
5369 @findex detailmenu
5370 If you use a detailed menu in your master menu (@pxref{Master Menu
5371 Parts}), mark it with the @code{@@detailmenu @dots{} @@end
5372 detailmenu} environment, or @command{makeinfo} will get confused,
5373 typically about the last and/or first node in the document.
5374
5375 In most cases, you will want to take advantage of this feature and not
5376 redundantly specify node pointers that the programs can determine.
5377 However, Texinfo documents are not required to be organized
5378 hierarchically or in fact to contain sectioning commands at all (for
5379 example, if you never intend the document to be printed), so node
5380 pointers may still be specified explicitly, in full generality.
5381
5382
5383 @node @t{@@anchor}
5384 @section @code{@@anchor}: Defining Arbitrary Cross Reference Targets
5385
5386 @anchor{anchor}@c old name
5387 @findex anchor
5388 @cindex Anchors
5389 @cindex Cross reference targets, arbitrary
5390 @cindex Targets for cross references, arbitrary
5391
5392 An @dfn{anchor} is a position in your document, labeled so that cross
5393 references can refer to it, just as they can to nodes. You create an
5394 anchor with the @code{@@anchor} command, and give the label as a
5395 normal brace-delimited argument. For example:
5396
5397 @example
5398 This marks the @@anchor@{x-spot@}spot.
5399 @dots{}
5400 @@xref@{x-spot,,the spot@}.
5401 @end example
5402
5403 @noindent produces:
5404
5405 @example
5406 This marks the spot.
5407 @dots{}
5408 See [the spot], page 1.
5409 @end example
5410
5411 As you can see, the @code{@@anchor} command itself produces no output.
5412 This example defines an anchor `x-spot' just before the word `spot'.
5413 You can refer to it later with an @code{@@xref} or other cross
5414 reference command, as shown (@pxref{Cross References}).
5415
5416 It is best to put @code{@@anchor} commands just before the position you
5417 wish to refer to; that way, the reader's eye is led on to the correct
5418 text when they jump to the anchor. You can put the @code{@@anchor}
5419 command on a line by itself if that helps readability of the source.
5420 Whitespace (including newlines) is ignored after @code{@@anchor}.
5421
5422 Anchor names and node names may not conflict. Anchors and nodes are
5423 given similar treatment in some ways; for example, the
5424 @code{goto-node} command takes either an anchor name or a node name as
5425 an argument. (@xref{Go to node,,, info, Info}.)
5426
5427 Also like node names, anchor names cannot include some characters
5428 (@pxref{Node Line Requirements}).
5429
5430 @cindex Nodes, deleting or renaming
5431 Because of this duality, when you delete or rename a node, it is
5432 usually a good idea to define an @code{@@anchor} with the old name.
5433 That way, any links to the old node, whether from other Texinfo
5434 manuals or general web pages, keep working. You can also do this with
5435 the @file{RENAMED_NODES_FILE} feature of @command{makeinfo}
5436 (@pxref{HTML Xref Link Preservation}). Both methods keep links
5437 on the web working; the only substantive difference is that defining
5438 anchors also makes the old node names available when reading the
5439 document in Info.
5440
5441
5442 @node Node Menu Illustration
5443 @section Node and Menu Illustration
5444
5445 Here is a copy of the diagram shown earlier that illustrates a Texinfo
5446 file with three chapters, each of which contains two sections.
5447
5448 The ``root'' is at the top of the diagram and the ``leaves'' are at
5449 the bottom. This is how such a diagram is drawn conventionally; it
5450 illustrates an upside-down tree. For this reason, the root node is
5451 called the `Top' node, and `Up' node pointers carry you closer to the
5452 root.
5453
5454 @example
5455 @group
5456 Top
5457 |
5458 -------------------------------------
5459 | | |
5460 Chapter 1 Chapter 2 Chapter 3
5461 | | |
5462 -------- -------- --------
5463 | | | | | |
5464 Section Section Section Section Section Section
5465 1.1 1.2 2.1 2.2 3.1 3.2
5466 @end group
5467 @end example
5468
5469 Using explicit pointers (not recommended, but for shown for purposes
5470 of the example), the fully-written command to start Chapter@tie{}2
5471 would be this:
5472
5473 @example
5474 @group
5475 @@node Chapter 2, Chapter 3, Chapter 1, Top
5476 @@comment node-name, next, previous, up
5477 @end group
5478 @end example
5479
5480 @noindent
5481 This @code{@@node} line says that the name of this node is
5482 ``Chapter@tie{}2'', the name of the `Next' node is ``Chapter 3'', the
5483 name of the `Previous' node is ``Chapter@tie{}1'', and the name of the
5484 `Up' node is ``Top''. You can (and should) omit writing out these
5485 node names if your document is hierarchically organized
5486 (@pxref{@t{makeinfo} Pointer Creation}), but the pointer
5487 relationships still obtain.
5488
5489 @quotation Note
5490 `Next' and `Previous' refer to nodes at the @emph{same hierarchical
5491 level} in the manual, not necessarily to the next node within the
5492 Texinfo file. In the Texinfo file, the subsequent node may be at a
5493 lower level---a section-level node most often follows a chapter-level
5494 node, for example. (The `Top' node contains the exception to this
5495 rule. Since the `Top' node is the only node at that level, `Next'
5496 refers to the first following node, which is almost always a chapter
5497 or chapter-level node.)
5498 @end quotation
5499
5500 To go to Sections 2.1 and 2.2 using Info, you need a menu inside
5501 Chapter 2. (@xref{Menus}.) You would write the menu just before the
5502 beginning of Section 2.1, like this:
5503
5504 @example
5505 @group
5506 @@menu
5507 * Sect. 2.1:: Description of this section.
5508 * Sect. 2.2:: Description.
5509 @@end menu
5510 @end group
5511 @end example
5512
5513 Using explicit pointers, the node for Sect.@: 2.1 is written like this:
5514
5515 @example
5516 @group
5517 @@node Sect. 2.1, Sect. 2.2, Chapter 2, Chapter 2
5518 @@comment node-name, next, previous, up
5519 @end group
5520 @end example
5521
5522 In Info format, the `Next' and `Previous' pointers of a node usually
5523 lead to other nodes at the same level---from chapter to chapter or
5524 from section to section (sometimes, as shown, the `Previous' pointer
5525 points up); an `Up' pointer usually leads to a node at the level above
5526 (closer to the `Top' node); and a `Menu' leads to nodes at a level
5527 below (closer to `leaves'). (A cross reference can point to a node at
5528 any level; see @ref{Cross References}.)
5529
5530 Usually, an @code{@@node} command and a chapter structuring command
5531 are conventionally used together, in that order, often followed by
5532 indexing commands. (As shown in the example above, you may follow the
5533 @code{@@node} line with a comment line, e.g., to show which pointer is
5534 which if explicit pointers are used.) The Texinfo processors use this
5535 construct to determine the relationships between nodes and sectioning
5536 commands.
5537
5538 Here is the beginning of the chapter in this manual called ``Ending a
5539 Texinfo File''. This shows an @code{@@node} line followed by an
5540 @code{@@chapter} line, and then by indexing lines. The manual uses
5541 implictly determined node pointers; therefore, nothing else is needed
5542 on the @code{@@node} line.
5543
5544 @example
5545 @group
5546 @@node Ending a File
5547 @@chapter Ending a Texinfo File
5548 @@cindex Ending a Texinfo file
5549 @@cindex Texinfo file ending
5550 @@cindex File ending
5551 @end group
5552 @end example
5553
5554 An earlier version of the manual used explicit node pointers. Here is
5555 the beginning of the same chapter for that case. This shows an
5556 @code{@@node} line followed by a comment line, an @code{@@chapter}
5557 line, and then by indexing lines.
5558
5559 @example
5560 @group
5561 @@node Ending a File, Structuring, Beginning a File, Top
5562 @@comment node-name, next, previous, up
5563 @@chapter Ending a Texinfo File
5564 @@cindex Ending a Texinfo file
5565 @dots{}
5566 @end group
5567 @end example
5568
5569
5570 @node Menus
5571 @chapter Menus
5572 @cindex Menus
5573 @findex menu
5574
5575 @dfn{Menus} contain pointers to subordinate nodes. In online output,
5576 you use menus to go to such nodes. Menus have no effect in printed
5577 manuals and do not appear in them.
5578
5579 It's usually best if a node with a menu does not contain much text.
5580 If you find yourself with a lot of text before a menu, we generally
5581 recommend moving all but a couple of paragraphs into a new subnode.
5582 Otherwise, it is easy for readers to miss the menu.
5583
5584 @menu
5585 * Menu Location:: Menus go at the ends of nodes.
5586 * Writing a Menu:: What is a menu?
5587 * Menu Parts:: A menu entry has three parts.
5588 * Less Cluttered Menu Entry:: Two part menu entry.
5589 * Menu Example:: Two and three part menu entries.
5590 * Other Info Files:: How to refer to a different Info file.
5591 @end menu
5592
5593
5594 @node Menu Location
5595 @section Menu Location
5596 @cindex Menu location
5597 @cindex Location of menus
5598
5599 There may be at most one menu in a node. A menu is conventionally
5600 located at the end of a node, without any regular text or additional
5601 commands between the @code{@@end menu} and the beginning of the next
5602 node.
5603
5604 @cindex Info format, and menus
5605 This convention is useful, since a reader who uses the menu could
5606 easily miss any such text. Also, any such post-menu text will be
5607 considered part of the menu in Info output (which has no marker for
5608 the end of a menu). Thus, a line beginning with @samp{* } will likely
5609 be incorrectly handled.
5610
5611 @cindex Hierarchical documents, and menus
5612 Technically, menus can carry you to any node, regardless of the
5613 structure of the document; even to nodes in a different Info file.
5614 However, we do not recommend making use of this, because it is hard
5615 for readers to follow. Also, the @command{makeinfo} implicit pointer
5616 creation feature (@pxref{@t{makeinfo} Pointer Creation}) and
5617 XEmacs Texinfo mode updating commands work only to create menus of
5618 subordinate nodes in a hierarchically structured document. It is much
5619 better to use cross references to refer to arbitrary nodes.
5620
5621 Years ago, we recommended using an @samp{@@heading} command within an
5622 @code{@@ifinfo} conditional instead of the normal sectioning commands
5623 after a very short node with a menu. This had the advantage of making
5624 the printed output look better, because there was no very short text
5625 between two headings on the page. But it does not work with
5626 @command{makeinfo}'s implicit pointer creation, and it also makes the
5627 XML output incorrect, since it does not reflect the true document
5628 structure. So, we no longer recommend this.
5629
5630
5631 @node Writing a Menu
5632 @section Writing a Menu
5633 @cindex Writing a menu
5634 @cindex Menu writing
5635
5636 A menu consists of an @code{@@menu} command on a line by itself
5637 followed by menu entry lines or menu comment lines and then by an
5638 @code{@@end menu} command on a line by itself.
5639
5640 A menu looks like this:
5641
5642 @example
5643 @group
5644 @@menu
5645 Larger Units of Text
5646
5647 * Files:: All about handling files.
5648 * Multiples: Buffers. Multiple buffers; editing
5649 several files at once.
5650 @@end menu
5651 @end group
5652 @end example
5653
5654 @cindex Spaces, in menus
5655 In a menu, every line that begins with an @w{@samp{* }} is a @dfn{menu
5656 entry}. (Note the space after the asterisk.) A line that does not
5657 start with an @w{@samp{* }} may also appear in a menu. Such a line is
5658 not a menu entry but rather a @dfn{menu comment} line that appears in
5659 the Info file. In the example above, the line @samp{Larger Units of
5660 Text} is such a menu comment line; the two lines starting with
5661 @w{@samp{* }} are menu entries. Space characters in a menu are
5662 preserved as-is in the Info output; this allows you to format the menu
5663 as you wish.
5664
5665 @opindex accesskey@r{, in HTML output of menus}
5666 In the HTML output from @command{makeinfo}, the @code{accesskey}
5667 attribute is used with the values @samp{1}@dots{}@samp{9} for the
5668 first nine entries. This allows people using web browsers to follow
5669 the first menu entries using (typically) @kbd{M-@var{digit}}, e.g.,
5670 @kbd{M-1} for the first entry.
5671
5672
5673 @node Menu Parts
5674 @section The Parts of a Menu
5675 @cindex Parts of a menu
5676 @cindex Menu parts
5677 @cindex @code{@@menu} parts
5678
5679 A menu entry has three parts, only the second of which is required:
5680
5681 @enumerate
5682 @item
5683 The menu entry name (optional).
5684
5685 @item
5686 The name of the node (required).
5687
5688 @item
5689 A description of the item (optional).
5690 @end enumerate
5691
5692 The template for a generic menu entry looks like this (but see the
5693 next section for one more possibility):
5694
5695 @example
5696 * @var{menu-entry-name}: @var{node-name}. @var{description}
5697 @end example
5698
5699 Follow the menu entry name with a single colon and follow the node
5700 name with tab, comma, newline, or the two characters period and space
5701 (@samp{. }).
5702
5703 @command{makeinfo} warns when the text of a menu item (and node names
5704 and cross references) contains a problematic construct that will
5705 interfere with its parsing in Info. If you don't want to see the
5706 warnings, you can set the customization variable
5707 @code{INFO_SPECIAL_CHARS_WARNING} to @samp{0} (@pxref{Other
5708 Customization Variables}).
5709
5710 In Info, a user selects a node with the @kbd{m} (@code{Info-menu})
5711 command. The menu entry name is what the user types after the @kbd{m}
5712 command.
5713
5714 The third part of a menu entry is a descriptive phrase or sentence.
5715 Menu entry names and node names are often short; the description
5716 explains to the reader what the node is about. A useful description
5717 complements the node name rather than repeats it. The description,
5718 which is optional, can spread over multiple lines; if it does, some
5719 authors prefer to indent the second line while others prefer to align
5720 it with the first (and all others). It's up to you. An empty line,
5721 or the next menu entry, ends a description.
5722
5723
5724 @node Less Cluttered Menu Entry
5725 @section Less Cluttered Menu Entry
5726 @cindex Two part menu entry
5727 @cindex Double-colon menu entries
5728 @cindex Menu entries with two colons
5729 @cindex Less cluttered menu entry
5730 @cindex Uncluttered menu entry
5731
5732 When the menu entry name and node name are the same, you can write
5733 the name immediately after the asterisk and space at the beginning of
5734 the line and follow the name with two colons.
5735
5736 @need 800
5737 For example, write
5738
5739 @example
5740 * Name:: @var{description}
5741 @end example
5742
5743 @need 800
5744 @noindent
5745 instead of
5746
5747 @example
5748 * Name: Name. @var{description}
5749 @end example
5750
5751 We recommend using the node name for the menu entry name whenever
5752 possible, since it reduces visual clutter in the menu.
5753
5754
5755 @node Menu Example
5756 @section A Menu Example
5757 @cindex Menu example
5758 @cindex Example menu
5759
5760 A menu looks like this in Texinfo:
5761
5762 @example
5763 @group
5764 @@menu
5765 * menu entry name: Node name. A short description.
5766 * Node name:: This form is preferred.
5767 @@end menu
5768 @end group
5769 @end example
5770
5771 @need 800
5772 @noindent
5773 This produces:
5774
5775 @example
5776 @group
5777 * menu:
5778
5779 * menu entry name: Node name. A short description.
5780 * Node name:: This form is preferred.
5781 @end group
5782 @end example
5783
5784 @need 700
5785 Here is an example as you might see it in a Texinfo file:
5786
5787 @example
5788 @group
5789 @@menu
5790 Larger Units of Text
5791
5792 * Files:: All about handling files.
5793 * Multiples: Buffers. Multiple buffers; editing
5794 several files at once.
5795 @@end menu
5796 @end group
5797 @end example
5798
5799 @need 800
5800 @noindent
5801 This produces:
5802
5803 @example
5804 @group
5805 * menu:
5806 Larger Units of Text
5807
5808 * Files:: All about handling files.
5809 * Multiples: Buffers. Multiple buffers; editing
5810 several files at once.
5811 @end group
5812 @end example
5813
5814 In this example, the menu has two entries. @samp{Files} is both a menu
5815 entry name and the name of the node referred to by that name.
5816 @samp{Multiples} is the menu entry name; it refers to the node named
5817 @samp{Buffers}. The line @samp{Larger Units of Text} is a comment; it
5818 appears in the menu, but is not an entry.
5819
5820 Since no file name is specified with either @samp{Files} or
5821 @samp{Buffers}, they must be the names of nodes in the same Info file
5822 (@pxref{Other Info Files, , Referring to Other Info Files}).
5823
5824 @node Other Info Files
5825 @section Referring to Other Info Files
5826 @cindex Referring to other Info files
5827 @cindex Nodes in other Info files
5828 @cindex Other Info files' nodes
5829 @cindex Going to other Info files' nodes
5830 @cindex Info; other files' nodes
5831
5832 You can create a menu entry that enables a reader in Info to go to a
5833 node in another Info file by writing the file name in parentheses just
5834 before the node name. Some examples:
5835
5836 @example
5837 @group
5838 @@menu
5839 * @var{first-entry-name}:(@var{filename})@var{nodename}. @var{description}
5840 * (@var{filename})@var{second-node}:: @var{description}
5841 @@end menu
5842 @end group
5843 @end example
5844
5845 For example, to refer directly to the @samp{Outlining} and
5846 @samp{Rebinding} nodes in the @cite{XEmacs User's Manual}, you could write a
5847 menu like this:
5848
5849 @example
5850 @group
5851 @@menu
5852 * Outlining: (xemacs)Outline Mode. The major mode for
5853 editing outlines.
5854 * (xemacs)Rebinding:: How to redefine the
5855 meaning of a key.
5856 @@end menu
5857 @end group
5858 @end example
5859
5860 If you do not list the node name, but only name the file, then Info
5861 presumes that you are referring to the `Top' node. Examples:
5862
5863 @example
5864 @group
5865 * Info: (info). Documentation browsing system.
5866 * (xemacs):: The extensible, self-documenting
5867 text editor.
5868 @end group
5869 @end example
5870
5871 The XEmacs Texinfo mode menu updating commands only work with nodes
5872 within the current buffer, so you cannot use them to create menus that
5873 refer to other files. You must write such menus by hand.
5874
5875
5876 @node Cross References
5877 @chapter Cross References
5878 @cindex Making cross references
5879 @cindex Cross references
5880 @cindex References
5881
5882 @dfn{Cross references} are used to refer the reader to other parts of the
5883 same or different Texinfo files. In Texinfo, nodes and anchors are the
5884 places to which cross references can refer.
5885
5886 @menu
5887 * References:: What cross references are for.
5888 * Cross Reference Commands:: A summary of the different commands.
5889 * Cross Reference Parts:: A cross reference has several parts.
5890 * @t{@@xref}:: Begin a reference with `See' @dots{}
5891 * Top Node Naming:: How to refer to the beginning of another file.
5892 * @t{@@ref}:: A reference for the last part of a sentence.
5893 * @t{@@pxref}:: How to write a parenthetical cross reference.
5894 * @t{@@inforef}:: How to refer to an Info-only file.
5895 * @t{@@url}:: How to refer to a uniform resource locator.
5896 * @t{@@cite}:: How to refer to books not in the Info system.
5897 @end menu
5898
5899
5900 @node References
5901 @section What References Are For
5902
5903 Often, but not always, a printed document should be designed so that
5904 it can be read sequentially. People tire of flipping back and forth
5905 to find information that should be presented to them as they need
5906 it.
5907
5908 However, in any document, some information will be too detailed for
5909 the current context, or incidental to it; use cross references to
5910 provide access to such information. Also, an online help system or a
5911 reference manual is not like a novel; few read such documents in
5912 sequence from beginning to end. Instead, people look up what they
5913 need. For this reason, such creations should contain many cross
5914 references to help readers find other information that they may not
5915 have read.
5916
5917 In a printed manual, a cross reference results in a page reference,
5918 unless it is to another manual altogether, in which case the cross
5919 reference names that manual.
5920
5921 In Info, a cross reference results in an entry that you can follow
5922 using the Info @samp{f} command. (@xref{Help-Xref,, Following
5923 cross-references, info, Info}.)
5924
5925 In HTML, a cross reference results in an hyperlink.
5926
5927 The various cross reference commands use nodes (or anchors,
5928 @pxref{@t{@@anchor}}) to define cross reference locations. This is
5929 evident in Info and HTML, in which a cross reference takes you to the
5930 specified location.
5931
5932 @TeX{} also needs nodes to define cross reference locations, but the
5933 action is less obvious. When @TeX{} generates a DVI file, it records
5934 each node's page number and uses the page numbers in making
5935 references. Thus, even if you are writing a manual that will only be
5936 printed, and not used online, you must nonetheless write @code{@@node}
5937 lines in order to name the places to which you make cross references.
5938
5939 @need 800
5940 @node Cross Reference Commands
5941 @section Different Cross Reference Commands
5942 @cindex Different cross reference commands
5943
5944 There are four different cross reference commands:
5945
5946 @table @code
5947 @item @@xref
5948 Used to start a sentence in the printed manual and in HTML with
5949 @w{`See @dots{}'} or an Info cross reference saying @samp{*Note
5950 @var{name}: @var{node}.}.
5951
5952 @item @@ref
5953 Used within or, more often, at the end of a sentence; produces just
5954 the reference in the printed manual and in HTML without the preceding
5955 `See' (same as @code{@@xref} for Info).
5956
5957 @item @@pxref
5958 Used within parentheses, at the end of a sentence, or otherwise before
5959 punctuation, to make a reference. Its output starts with a lowercase
5960 `see' in the printed manual and in HTML, and a lowercase @samp{*note}
5961 in Info. (@samp{p} is for `parenthesis'.)
5962
5963 @item @@inforef
5964 Used to make a reference to an Info file for which there is no printed
5965 manual.
5966 @end table
5967
5968 @noindent
5969 The @code{@@cite} command is used to make references to books and
5970 manuals for which there is no corresponding Info file and, therefore,
5971 no node to which to point. @xref{@t{@@cite}}.
5972
5973
5974 @node Cross Reference Parts
5975 @section Parts of a Cross Reference
5976 @cindex Cross reference parts
5977 @cindex Parts of a cross reference
5978
5979 A cross reference command to a node requires only one argument, which
5980 is the name of the node to which it refers. But a cross reference
5981 command may contain up to four additional arguments. By using these
5982 arguments, you can provide a cross reference name, a topic description
5983 or section title for the printed output, the name of a different
5984 manual file, and the name of a different printed manual. To refer
5985 to another manual as a whole, the manual file and/or the name of the
5986 printed manual are the only required arguments (@pxref{Top Node
5987 Naming}).
5988
5989 Here is a simple cross reference example:
5990
5991 @example
5992 @@xref@{Node name@}.
5993 @end example
5994
5995 @noindent
5996 which produces
5997
5998 @example
5999 *Note Node name::.
6000 @end example
6001
6002 @noindent
6003 in Info and
6004
6005 @quotation
6006 See Section @var{nnn} [Node name], page @var{ppp}.
6007 @end quotation
6008
6009 @noindent
6010 in a printed manual.
6011
6012 @need 700
6013 Here is an example of a full five-part cross reference:
6014
6015 @example
6016 @group
6017 @@xref@{Node name, Cross Reference Name, Particular Topic,
6018 info-file-name, A Printed Manual@}, for details.
6019 @end group
6020 @end example
6021
6022 @noindent
6023 which produces
6024
6025 @example
6026 *Note Cross Reference Name: (info-file-name)Node name,
6027 for details.
6028 @end example
6029
6030 @noindent
6031 in Info and
6032
6033 @quotation
6034 See section ``Particular Topic'' in @i{A Printed Manual}, for details.
6035 @end quotation
6036
6037 @noindent
6038 in a printed book.
6039
6040 The five possible arguments for a cross reference are:
6041
6042 @enumerate
6043 @item
6044 The node or anchor name (required, except for reference to whole
6045 manuals). This is the location to which the cross reference takes
6046 you. In a printed document, the location of the node provides the
6047 page reference only for references within the same document.
6048
6049 @item
6050 The cross reference name. If you include this argument, it becomes
6051 the first part of the cross reference. It is usually omitted; then
6052 the topic description (third argument) is used if it was specified;
6053 if that was omitted as well, the node name is used.
6054
6055 @item
6056 A topic description or section name. Often, this is the title of the
6057 section. This is used as the name of the reference in the printed
6058 manual. If omitted, the node name is used.
6059
6060 @item
6061 The name of the manual file in which the reference is located, if it is
6062 different from the current file. This name is used both for Info and
6063 HTML.
6064
6065 @item
6066 The name of a printed manual from a different Texinfo file.
6067 @end enumerate
6068
6069 The template for a full five argument cross reference looks like
6070 this:
6071
6072 @example
6073 @group
6074 @@xref@{@var{node-name}, @var{cross-reference-name}, @var{title-or-topic},
6075 @var{info-file-name}, @var{printed-manual-title}@}.
6076 @end group
6077 @end example
6078
6079 Cross references with one, two, three, four, and five arguments are
6080 described separately following the description of @code{@@xref}.
6081
6082 Write a node name in a cross reference in exactly the same way as in
6083 the @code{@@node} line, including the same capitalization; otherwise, the
6084 formatters may not find the reference.
6085
6086 @command{makeinfo} warns when the text of a cross reference (and node
6087 names and menu items) contains a problematic construct that will
6088 interfere with its parsing in Info. If you don't want to see the
6089 warnings, you can set the customization variable
6090 @code{INFO_SPECIAL_CHARS_WARNING} to @samp{0} (@pxref{Other
6091 Customization Variables}).
6092
6093
6094 @node @t{@@xref}
6095 @section @code{@@xref}
6096
6097 @anchor{xref}@c old name
6098 @findex xref
6099 @cindex Cross references using @code{@@xref}
6100 @cindex References using @code{@@xref}
6101
6102 The @code{@@xref} command generates a cross reference for the
6103 beginning of a sentence. The Info formatting commands convert it into
6104 an Info cross reference, which the Info @samp{f} command can use to
6105 bring you directly to another node. The @TeX{} typesetting commands
6106 convert it into a page reference, or a reference to another book or
6107 manual. In the HTML output format the cross reference is output
6108 as a hyperlink.
6109
6110 @menu
6111 * Reference Syntax:: What a reference looks like and requires.
6112 * One Argument:: @code{@@xref} with one argument.
6113 * Two Arguments:: @code{@@xref} with two arguments.
6114 * Three Arguments:: @code{@@xref} with three arguments.
6115 * Four and Five Arguments:: @code{@@xref} with four and five arguments.
6116 @end menu
6117
6118 @node Reference Syntax
6119 @subsection What a Reference Looks Like and Requires
6120
6121 Most often, an Info cross reference looks like this:
6122
6123 @example
6124 *Note @var{node-name}::.
6125 @end example
6126
6127 @noindent
6128 or like this
6129
6130 @example
6131 *Note @var{cross-reference-name}: @var{node-name}.
6132 @end example
6133
6134 @noindent
6135 In @TeX{}, a cross reference looks like this:
6136
6137 @quotation
6138 See Section @var{section-number} [@var{node-name}], page @var{page}.
6139 @end quotation
6140
6141 @noindent
6142 or like this
6143
6144 @quotation
6145 See Section @var{section-number} [@var{title-or-topic}], page @var{page}.
6146 @end quotation
6147
6148 The @code{@@xref} command does not generate a period or comma to end
6149 the cross reference automatically. You must write that period or
6150 comma yourself; otherwise, Info will not recognize the end of the
6151 reference. (The @code{@@pxref} command works differently;
6152 @pxref{@t{@@pxref}}.)
6153
6154 @quotation Caution
6155 A period or comma @emph{must} follow the closing brace of an
6156 @code{@@xref}. It is required to terminate the cross reference. This
6157 period or comma will appear in the output.
6158 @end quotation
6159
6160 @code{@@xref} must refer to a node by name. Use @code{@@node} to
6161 define the node (@pxref{Writing a Node}), or @code{@@anchor}
6162 (@pxref{@t{@@anchor}}).
6163
6164 @code{@@xref} is followed by several arguments inside braces,
6165 separated by commas. Whitespace before and after these commas is
6166 ignored.
6167
6168 A cross reference to a node within the current file requires only the
6169 name of a node; but it may contain up to four additional arguments.
6170 Each of these variations produces a cross reference that looks
6171 somewhat different. A cross reference to another manual as a whole
6172 only requires the fourth or fifth argument.
6173
6174 @quotation Note
6175 Commas separate arguments in a cross reference, so you must not
6176 include a comma in the title or any other part lest the formatters
6177 mistake them for separators. @code{@@comma@{@}} may be used to
6178 protect such commas (@pxref{Inserting a Comma}).
6179 @end quotation
6180
6181
6182 @node One Argument
6183 @subsection @code{@@xref} with One Argument
6184 @cindex One-argument form of cross references
6185
6186 The simplest form of @code{@@xref} takes one argument, the name of
6187 another node in the same Texinfo file. The Info formatters produce
6188 output that the Info readers can use to jump to the reference; @TeX{}
6189 produces output that specifies the page and section number for you;
6190 the HTML output is a normal hyperlink.
6191
6192 @need 700
6193 @noindent
6194 For example,
6195
6196 @example
6197 @@xref@{Tropical Storms@}.
6198 @end example
6199
6200 @noindent
6201 produces
6202
6203 @example
6204 *Note Tropical Storms::.
6205 @end example
6206
6207 @noindent
6208 in Info and
6209
6210 @quotation
6211 See Section 3.1 [Tropical Storms], page 24.
6212 @end quotation
6213
6214 @noindent
6215 in a printed manual.
6216 (Note that in the preceding example the closing brace to
6217 @code{@@xref}'s argument is followed by a period.)
6218
6219 You can write a clause after the cross reference, like this:
6220
6221 @example
6222 @@xref@{Tropical Storms@}, for more info.
6223 @end example
6224
6225 @noindent
6226 which produces
6227
6228 @example
6229 *Note Tropical Storms::, for more info.
6230 @end example
6231
6232 @noindent
6233 in Info and
6234
6235 @quotation
6236 See Section 3.1 [Tropical Storms], page 24, for more info.
6237 @end quotation
6238
6239
6240 @noindent
6241 in a printed manual. Note that in the preceding example the closing
6242 brace to @code{@@xref} is followed by a comma, then the additional
6243 text. It's a common mistake to follow an @code{@@xref} command with a
6244 space, but this is never correct.
6245
6246
6247 @node Two Arguments
6248 @subsection @code{@@xref} with Two Arguments
6249 @cindex Two-argument form of cross references
6250
6251 With two arguments, the second is used as the name of the cross
6252 reference, while the first is still the name of the node to which the
6253 cross reference points.
6254
6255 @need 750
6256 @noindent
6257 The template is like this:
6258
6259 @example
6260 @@xref@{@var{node-name}, @var{cross-reference-name}@}.
6261 @end example
6262
6263 @need 700
6264 @noindent
6265 For example,
6266
6267 @example
6268 @@xref@{Electrical Effects, Lightning@}.
6269 @end example
6270
6271 @noindent
6272 produces:
6273
6274 @example
6275 *Note Lightning: Electrical Effects.
6276 @end example
6277
6278 @noindent
6279 in Info and
6280
6281 @quotation
6282 See Section 5.2 [Electrical Effects], page 57.
6283 @end quotation
6284
6285 @noindent
6286 in a printed manual.
6287 (Note that in the preceding example the closing brace is followed by a
6288 period; and that the node name is printed, not the cross reference name.)
6289
6290 You can write a clause after the cross reference, like this:
6291
6292 @example
6293 @@xref@{Electrical Effects, Lightning@}, for more info.
6294 @end example
6295
6296 @noindent
6297 which produces
6298
6299 @example
6300 *Note Lightning: Electrical Effects, for more info.
6301 @end example
6302
6303 @noindent
6304 in Info and
6305
6306 @quotation
6307 See Section 5.2 [Electrical Effects], page 57, for more info.
6308 @end quotation
6309
6310 @noindent
6311 in a printed manual. (Note that in the preceding example the closing
6312 brace is followed by a comma, and then by the clause, which is
6313 followed by a period.)
6314
6315 The second argument to cross references must observe some of the
6316 restrictions for node names (@pxref{Node Line Requirements}). The
6317 most common issue is that colons cannot be used, since that interferes
6318 with the parsing of the Info file.
6319
6320
6321 @node Three Arguments
6322 @subsection @code{@@xref} with Three Arguments
6323 @cindex Three-argument form of cross references
6324
6325 A third argument replaces the node name in the @TeX{} output. The third
6326 argument should be the name of the section in the printed output, or
6327 else state the topic discussed by that section. Often, you will want to
6328 use initial uppercase letters so it will be easier to read when the
6329 reference is printed. Use a third argument when the node name is
6330 unsuitable because of syntax or meaning.
6331
6332 Remember to write a comma or period after the closing brace of an
6333 @code{@@xref} to terminate the cross reference. In the following
6334 examples, a clause follows a terminating comma.
6335
6336 @need 750
6337 @noindent
6338 The template is like this:
6339
6340 @example
6341 @group
6342 @@xref@{@var{node-name}, @var{cross-reference-name}, @var{title-or-topic}@}.
6343 @end group
6344 @end example
6345
6346 @need 700
6347 @noindent
6348 For example,
6349
6350 @example
6351 @group
6352 @@xref@{Electrical Effects, Lightning, Thunder and Lightning@},
6353 for details.
6354 @end group
6355 @end example
6356
6357 @noindent
6358 produces
6359
6360 @example
6361 *Note Lightning: Electrical Effects, for details.
6362 @end example
6363
6364 @noindent
6365 in Info and
6366
6367 @quotation
6368 See Section 5.2 [Thunder and Lightning], page 57, for details.
6369 @end quotation
6370
6371 @noindent
6372 in a printed manual.
6373
6374 If a third argument is given and the second one is empty, then the
6375 third argument serves for both. (Note how two commas, side by side, mark
6376 the empty second argument.)
6377
6378 @example
6379 @group
6380 @@xref@{Electrical Effects, , Thunder and Lightning@},
6381 for details.
6382 @end group
6383 @end example
6384
6385 @noindent
6386 produces
6387
6388 @example
6389 *Note Thunder and Lightning: Electrical Effects, for details.
6390 @end example
6391
6392 @noindent
6393 in Info and
6394
6395 @quotation
6396 See Section 5.2 [Thunder and Lightning], page 57, for details.
6397 @end quotation
6398
6399 @noindent
6400 in a printed manual.
6401
6402 The third argument to cross references must observe some of the
6403 restrictions for node names (@pxref{Node Line Requirements}). The
6404 most common issue is that colons cannot be used, since that interferes
6405 with the parsing of the Info file.
6406
6407 As a practical matter, it is often best to write cross references with
6408 just the first argument if the node name and the section title are the
6409 same (or nearly so), and with the first and third arguments only if the
6410 node name and title are different.
6411
6412 @findex xrefautomaticsectiontitle
6413 Texinfo offers a setting to use the section title instead of node
6414 names by default in cross references (an explicitly specified third
6415 argument still takes precedence):
6416
6417 @example
6418 @@xrefautomaticsectiontitle on
6419 @end example
6420
6421 Typically this line would be given near the beginning of the document
6422 and used for the whole manual. But you can turn it off if you want
6423 (@code{@@xrefautomaticsectiontitle off}), for example, if you're
6424 including some other sub-document that doesn't have suitable section
6425 names.
6426
6427
6428 @node Four and Five Arguments
6429 @subsection @code{@@xref} with Four and Five Arguments
6430 @cindex Four- and five argument forms of cross references
6431
6432 In a cross reference, a fourth argument specifies the name of another
6433 Info file, different from the file in which the reference appears, and
6434 a fifth argument specifies its title as a printed manual.
6435
6436 Remember that a comma or period must follow the closing brace of an
6437 @code{@@xref} command to terminate the cross reference.
6438
6439 @need 800
6440 @noindent
6441 The full template is:
6442
6443 @example
6444 @group
6445 @@xref@{@var{node-name}, @var{cross-reference-name}, @var{title-or-topic},
6446 @var{info-file-name}, @var{printed-manual-title}@}.
6447 @end group
6448 @end example
6449
6450 @need 700
6451 @noindent
6452 For example,
6453
6454 @example
6455 @@xref@{Electrical Effects, Lightning, Thunder and Lightning,
6456 weather, An Introduction to Meteorology@}.
6457 @end example
6458
6459 @noindent
6460 produces this output in Info:
6461
6462 @example
6463 *Note Lightning: (weather)Electrical Effects.
6464 @end example
6465
6466 @noindent
6467 As you can see, the name of the Info file is enclosed in parentheses
6468 and precedes the name of the node.
6469
6470 @noindent
6471 In a printed manual, the reference looks like this:
6472
6473 @quotation
6474 See section ``Thunder and Lightning'' in @cite{An Introduction to
6475 Meteorology}.
6476 @end quotation
6477
6478 @noindent
6479 The title of the printed manual is typeset like @code{@@cite}; and the
6480 reference lacks a page number since @TeX{} cannot know to which page a
6481 reference refers when that reference is to another manual.
6482
6483 Next case: often, you will leave out the second argument when you use
6484 the long version of @code{@@xref}. In this case, the third argument,
6485 the topic description, will be used as the cross reference name in
6486 Info. For example,
6487
6488 @example
6489 @@xref@{Electrical Effects, , Thunder and Lightning,
6490 weather, An Introduction to Meteorology@}.
6491 @end example
6492
6493 @noindent
6494 produces
6495
6496 @example
6497 @group
6498 *Note Thunder and Lightning: (weather)Electrical Effects.
6499 @end group
6500 @end example
6501
6502 @noindent
6503 in Info and
6504
6505 @quotation
6506 See section ``Thunder and Lightning'' in @cite{An Introduction to
6507 Meteorology}.
6508 @end quotation
6509
6510 @noindent
6511 in a printed manual.
6512
6513 Next case: If the node name and the section title are the same in the
6514 other manual, you may also leave out the section title. In this case,
6515 the node name is used in both instances. For example,
6516
6517 @example
6518 @@xref@{Electrical Effects,,,
6519 weather, An Introduction to Meteorology@}.
6520 @end example
6521
6522 @noindent
6523 produces
6524
6525 @example
6526 @group
6527 *Note (weather)Electrical Effects::.
6528 @end group
6529 @end example
6530
6531 @noindent
6532 in Info and
6533
6534 @quotation
6535 See section ``Electrical Effects'' in @cite{An Introduction to
6536 Meteorology}.
6537 @end quotation
6538
6539 @noindent
6540 in a printed manual.
6541
6542 A very unusual case: you may want to refer to another manual file that
6543 is within a single printed manual---when multiple Texinfo files are
6544 incorporated into the same @TeX{} run but can create separate Info or
6545 HTML output files. In this case, you need to specify only the fourth
6546 argument, and not the fifth.
6547
6548 Finally, it's also allowed to leave out all the arguments
6549 @emph{except} the fourth and fifth, to refer to another manual as a
6550 whole. See the next section.
6551
6552
6553 @node Top Node Naming
6554 @section Naming a `Top' Node
6555 @cindex Naming a `Top' Node in references
6556 @cindex `Top' node naming for references
6557
6558 @cindex Manual, referring to as a whole
6559 @cindex Referring to an entire manual
6560
6561 Ordinarily, you must always name a node in a cross reference.
6562 However, it's not unusual to want to refer to another manual as a
6563 whole, rather than a particular section within it. In this case,
6564 giving any section name is an unnecessary distraction.
6565
6566 So, with cross references to other manuals (@pxref{Four and Five
6567 Arguments}), if the first argument is either @samp{Top} (capitalized
6568 just that way) or omitted entirely, and the third argument is omitted,
6569 the printed output includes no node or section name. (The Info output
6570 includes @samp{Top} if it was given.) For example,
6571
6572 @example
6573 @@xref@{Top,,, make, The GNU Make Manual@}.
6574 @end example
6575
6576 @noindent produces
6577
6578 @example
6579 @group
6580 *Note (make)::Top.
6581 @end group
6582 @end example
6583
6584 @noindent and
6585
6586 @quotation
6587 See @cite{The GNU Make Manual}.
6588 @end quotation
6589
6590 @noindent
6591 Info readers will go to the Top node of the manual whether
6592 or not the `Top' node is explicitly specified.
6593
6594 It's also possible (and is historical practice) to refer to a whole
6595 manual by specifying the `Top' node and an appropriate entry for the
6596 third argument to the @code{@@xref} command. Using this idiom, to
6597 make a cross reference to @cite{The GNU Make Manual}, you would write:
6598
6599 @example
6600 @@xref@{Top,, Overview, make, The GNU Make Manual@}.
6601 @end example
6602
6603 @noindent
6604 which produces
6605
6606 @example
6607 *Note Overview: (make)Top.
6608 @end example
6609
6610 @noindent
6611 in Info and
6612
6613 @quotation
6614 See section ``Overview'' in @cite{The GNU Make Manual}.
6615 @end quotation
6616
6617 @noindent
6618 in a printed manual.
6619
6620 In this example, @samp{Top} is the name of the first node, and
6621 @samp{Overview} is the name of the first section of the manual. There
6622 is no widely-used convention for naming the first section in a printed
6623 manual, this is just what the Make manual happens to use. This
6624 arbitrariness of the first name is a principal reason why omitting the
6625 third argument in whole-manual cross references is preferable.
6626
6627
6628 @node @t{@@ref}
6629 @section @code{@@ref}
6630
6631 @anchor{ref}@c old name
6632 @findex ref
6633 @cindex Cross references using @code{@@ref}
6634 @cindex References using @code{@@ref}
6635
6636 @code{@@ref} is nearly the same as @code{@@xref} except that it does
6637 not generate a `See' in the printed output, just the reference itself.
6638 This makes it useful as the last part of a sentence.
6639
6640 @noindent For example,
6641
6642 @cindex Hurricanes
6643 @example
6644 For more information, @@pxref@{This@}, and @@ref@{That@}.
6645 @end example
6646
6647 @noindent
6648 produces in Info:
6649
6650 @example
6651 For more information, *note This::, and *note That::.
6652 @end example
6653
6654 @noindent
6655 and in printed output:
6656
6657 @quotation
6658 For more information, see Section 1.1 [This], page 1,
6659 and Section 1.2 [That], page 2.
6660 @end quotation
6661
6662 The @code{@@ref} command can tempt writers to express themselves in a
6663 manner that is suitable for a printed manual but looks awkward in the
6664 Info format. Bear in mind that your audience could be using both the
6665 printed and the Info format. For example:
6666
6667 @cindex Sea surges
6668 @example
6669 Sea surges are described in @@ref@{Hurricanes@}.
6670 @end example
6671
6672 @noindent
6673 looks ok in the printed output:
6674
6675 @quotation
6676 Sea surges are described in Section 6.7 [Hurricanes], page 72.
6677 @end quotation
6678
6679 @noindent
6680 but is awkward to read in Info, ``note'' being a verb:
6681
6682 @example
6683 Sea surges are described in *note Hurricanes::.
6684 @end example
6685
6686 You should write a period or comma immediately after an @code{@@ref}
6687 command with two or more arguments. If there is no such following
6688 punctuation, @command{makeinfo} will generate a (grammatically
6689 incorrect) period in the Info output; otherwise, the cross reference
6690 would fail completely, due to the current syntax of Info format.
6691
6692 In general, it is best to use @code{@@ref} only when you need some
6693 word other than ``see'' to precede the reference. When ``see'' (or
6694 ``See'') is ok, @code{@@xref} and @code{@@pxref} are preferable.
6695
6696
6697 @node @t{@@pxref}
6698 @section @code{@@pxref}
6699
6700 @anchor{pxref}@c old name
6701 @findex pxref
6702 @cindex Cross references using @code{@@pxref}
6703 @cindex References using @code{@@pxref}
6704
6705 The parenthetical reference command, @code{@@pxref}, is nearly the
6706 same as @code{@@xref}, but it is best used at the end of a sentence or
6707 before a closing parenthesis. The command differs from @code{@@xref}
6708 in two ways:
6709
6710 @enumerate
6711 @item
6712 @TeX{} typesets the reference for the printed manual with a lowercase
6713 `see' rather than an uppercase `See'.
6714
6715 @item
6716 The Info formatting commands automatically end the reference with a
6717 closing colon or period, if necessary.
6718 @end enumerate
6719
6720 @code{@@pxref} is designed so that the output looks right and works
6721 right at the end of a sentence or parenthetical phrase, both in
6722 printed output and in an Info file. In a printed manual, a closing
6723 comma or period should not follow a cross reference within
6724 parentheses; such punctuation is wrong. But in an Info file, suitable
6725 closing punctuation must follow the cross reference so Info can
6726 recognize its end. @code{@@pxref} spares you the need to use
6727 complicated methods to put a terminator into one form of the output
6728 and not the other.
6729
6730 @noindent
6731 With one argument, a parenthetical cross reference looks like this:
6732
6733 @cindex Flooding
6734 @example
6735 @dots{} storms cause flooding (@@pxref@{Hurricanes@}) @dots{}
6736 @end example
6737
6738 @need 800
6739 @noindent
6740 which produces
6741
6742 @example
6743 @group
6744 @dots{} storms cause flooding (*note Hurricanes::) @dots{}
6745 @end group
6746 @end example
6747
6748 @noindent
6749 in Info and
6750
6751 @quotation
6752 @dots{} storms cause flooding (see Section 6.7 [Hurricanes], page 72) @dots{}
6753 @end quotation
6754
6755 @noindent
6756 in a printed manual.
6757
6758 With two arguments, a parenthetical cross reference has this template:
6759
6760 @example
6761 @dots{} (@@pxref@{@var{node-name}, @var{cross-reference-name}@}) @dots{}
6762 @end example
6763
6764 @noindent
6765 which produces
6766
6767 @example
6768 @dots{} (*note @var{cross-reference-name}: @var{node-name}.) @dots{}
6769 @end example
6770
6771 @noindent
6772 in Info and
6773
6774 @quotation
6775 @dots{} (see Section @var{nnn} [@var{node-name}], page @var{ppp}) @dots{}
6776 @end quotation
6777
6778 @noindent
6779 in a printed manual.
6780
6781 @code{@@pxref} can be used with up to five arguments, just like
6782 @code{@@xref} (@pxref{@t{@@xref}}).
6783
6784 In past versions of Texinfo, it was not allowed to write punctuation
6785 after an @code{@@pxref}, so it could be used @emph{only} before a
6786 right parenthesis. This is no longer the case, so now it can be used
6787 (for example) at the end of a sentence, where a lowercase ``see''
6788 works best. For instance:
6789
6790 @example
6791 @dots{} For more information, @@pxref@{More@}.
6792 @end example
6793
6794 @noindent
6795 which outputs (in Info):
6796
6797 @example
6798 @dots{} For more information, *note More::.
6799 @end example
6800
6801 @noindent
6802 In general, @code{@@pxref} should only be followed by a comma, period,
6803 or right parenthesis; in other cases, @command{makeinfo} has to insert
6804 a period to make the cross reference work correctly in Info, and that
6805 period looks wrong.
6806
6807 As a matter of style, @code{@@pxref} is best used at the ends of
6808 sentences. Although it technically works in the middle of a sentence,
6809 that location breaks up the flow of reading.
6810
6811
6812 @node @t{@@inforef}
6813 @section @code{@@inforef}: Cross References to Info-only Material
6814
6815 @anchor{inforef}@c old name
6816 @findex inforef
6817 @cindex Cross references using @code{@@inforef}
6818 @cindex References using @code{@@inforef}
6819
6820 @code{@@inforef} is used for making cross references to Info
6821 documents---even from a printed manual. This might be because you
6822 want to refer to conditional @code{@@ifinfo} text
6823 (@pxref{Conditionals}), or because printed output is not available
6824 (perhaps because there is no Texinfo source), among other
6825 possibilities.
6826
6827 The command takes either two or three arguments, in the following
6828 order:
6829
6830 @enumerate
6831 @item
6832 The node name.
6833
6834 @item
6835 The cross reference name (optional).
6836
6837 @item
6838 The Info file name.
6839 @end enumerate
6840
6841 @noindent
6842 Separate the arguments with commas, as with @code{@@xref}. Also, you
6843 must terminate the reference with a comma or period after the
6844 @samp{@}}, as you do with @code{@@xref}.
6845
6846 @noindent
6847 The template is:
6848
6849 @example
6850 @@inforef@{@var{node-name}, @var{cross-reference-name}, @var{info-file-name}@},
6851 @end example
6852
6853 @need 800
6854 @noindent
6855 For example,
6856
6857 @example
6858 @group
6859 @@inforef@{Advanced, Advanced Info commands, info@},
6860 for more information.
6861 @end group
6862 @end example
6863
6864 @need 800
6865 @noindent
6866 produces (in Info):
6867
6868 @example
6869 @group
6870 *Note Advanced Info commands: (info)Advanced,
6871 for more information.
6872 @end group
6873 @end example
6874
6875 @need 800
6876 @noindent
6877 and (in the printed output):
6878
6879 @quotation
6880 See Info file @file{info}, node @samp{Advanced}, for more information.
6881 @end quotation
6882
6883 (This particular example is not realistic, since the Info manual is
6884 written in Texinfo, so all formats are available. In fact, we don't
6885 know of any extant Info-only manuals.)
6886
6887 The converse of @code{@@inforef} is @code{@@cite}, which is used to
6888 refer to printed works for which no Info form exists.
6889 @xref{@t{@@cite}}.
6890
6891
6892 @node @t{@@url}
6893 @section @code{@@url}, @code{@@uref@{@var{url}[, @var{text}][, @var{replacement}]@}}
6894
6895 @anchor{uref}@c old name
6896 @findex uref
6897 @cindex Uniform resource locator, referring to
6898 @cindex URL, referring to
6899
6900 @cindex @code{href}, producing HTML
6901 @code{@@uref} produces a reference to a uniform resource locator (url).
6902 It takes one mandatory argument, the url, and two optional arguments
6903 which control the text that is displayed. In HTML output, @code{@@uref}
6904 produces a link you can follow.
6905
6906 @anchor{url} @code{@@url} is a synonym for @code{@@uref}.
6907 (Originally, @code{@@url} had the meaning of @code{@@indicateurl}
6908 (@pxref{@t{@@indicateurl}}), but in practice it was almost always
6909 misused. So we've changed the meaning.)
6910
6911 The second argument, if specified, is the text to display (the default
6912 is the url itself); in Info and DVI output, but not in HTML output, the
6913 url is output in addition to this text.
6914
6915 @cindex Man page, reference to
6916 The third argument, if specified, is the text to display, but in this
6917 case the url is not output in any format. This is useful when the
6918 text is already sufficiently referential, as in a man page. If the
6919 third argument is given, the second argument is ignored.
6920
6921 @cindex Line breaking, and urls
6922 @cindex Breakpoints within urls
6923 @TeX{} allows line breaking within urls at only a few characters
6924 (which are special in urls): @samp{&}, @samp{.}, @samp{#}, @samp{?},
6925 and @samp{/} (but not between @samp{/} characters). A tiny amount of
6926 stretchable space is also inserted around these characters to help
6927 with line breaking. For HTML output, modern browsers will also do
6928 line breaking within displayed urls. If you need to allow breaks at
6929 other characters you can insert @code{@@/} as needed (@pxref{Line
6930 Breaks}).
6931
6932 @findex urefbreakstyle
6933 By default, any such breaks at special characters will occur after the
6934 character. Some people prefer such breaks to happen after the special
6935 character. This can be controlled with the @code{@@urefbreakstyle}
6936 command (this command has effect only in @TeX{}):
6937
6938 Write this command at the
6939 beginning of a line with a single word as an argument, one of the
6940 following:
6941
6942 @vindex after@r{, value for @code{@@urefbreakstyle}}
6943 @vindex before@r{, value for @code{@@urefbreakstyle}}
6944 @vindex none@r{, value for @code{@@urefbreakstyle}}
6945 @table @samp
6946 @item after
6947 (the default) Potentially break after the special characters.
6948 @item before
6949 Potentially break before the special characters.
6950 @item none
6951 Do not consider breaking at the special characters; any potential
6952 breaks must be manually inserted.
6953 @end table
6954
6955 Here is an example of the simple one argument form, where the url is
6956 both the target and the text of the link:
6957
6958 @example
6959 The official GNU ftp site is @@uref@{http://ftp.gnu.org/gnu@}.
6960 @end example
6961
6962 @noindent produces:
6963 @display
6964 The official GNU ftp site is @uref{http://ftp.gnu.org/gnu}.
6965 @end display
6966
6967
6968 An example of the two-argument form:
6969 @example
6970 The official @@uref@{http://ftp.gnu.org/gnu, GNU ftp site@}
6971 holds programs and texts.
6972 @end example
6973
6974 @noindent produces:
6975 @display
6976 The official @uref{http://ftp.gnu.org/gnu, GNU ftp site}
6977 holds programs and texts.
6978 @end display
6979
6980 @noindent that is, the Info output is this:
6981 @example
6982 The official GNU ftp site (http://ftp.gnu.org/gnu)
6983 holds programs and texts.
6984 @end example
6985
6986 @noindent and the HTML output is this:
6987 @example
6988 The official <a href="http://ftp.gnu.org/gnu">GNU ftp site</a>
6989 holds programs and texts.
6990 @end example
6991
6992
6993 An example of the three-argument form:
6994 @example
6995 The @@uref@{/man.cgi/1/ls,,ls@} program @dots{}
6996 @end example
6997
6998 @noindent produces:
6999 @display
7000 The @uref{/man.cgi/1/ls,,ls} program @dots{}
7001 @end display
7002
7003 @noindent but with HTML:
7004 @example
7005 The <a href="/man.cgi/1/ls">ls</a> program @dots{}
7006 @end example
7007
7008 Some people prefer to display urls in the unambiguous format:
7009
7010 @display
7011 <URL:http://@var{host}/@var{path}>
7012 @end display
7013
7014 @noindent
7015 @cindex @code{<URL...>} convention, not used
7016 You can use this form in the input file if you wish. We feel it's not
7017 necessary to include the @samp{<URL:} and @samp{>} in the output,
7018 since any software that tries to detect urls in text already has to
7019 detect them without the @samp{<URL:} to be useful.
7020
7021 To merely indicate a url without creating a link people can follow,
7022 use @code{@@indicateurl} (@pxref{@t{@@indicateurl}}).
7023
7024
7025 @node @t{@@cite}
7026 @section @code{@@cite}@{@var{reference}@}
7027
7028 @anchor{cite}@c old name
7029 @findex cite
7030
7031 Use the @code{@@cite} command for the name of a book that lacks a
7032 companion Info file. The command produces italics in the printed
7033 manual, and quotation marks in the Info file.
7034
7035 If a book is written in Texinfo, it is better to use a cross reference
7036 command since a reader can easily follow such a reference in Info.
7037 @xref{@t{@@xref}}.
7038
7039
7040 @node Marking Text
7041 @chapter Marking Text, Words and Phrases
7042 @cindex Paragraph, marking text within
7043 @cindex Marking words and phrases
7044 @cindex Words and phrases, marking them
7045 @cindex Marking text within a paragraph
7046 @cindex Text, marking up
7047
7048 In Texinfo, you can mark words and phrases in a variety of ways.
7049 The Texinfo formatters use this information to determine how to
7050 highlight the text.
7051 You can specify, for example, whether a word or phrase is a
7052 defining occurrence, a metasyntactic variable, or a symbol used in a
7053 program. Also, you can emphasize text, in several different ways.
7054
7055 @menu
7056 * Indicating:: How to indicate definitions, files, etc.
7057 * Emphasis:: How to emphasize text.
7058 @end menu
7059
7060
7061 @node Indicating
7062 @section Indicating Definitions, Commands, etc.
7063
7064 @cindex Highlighting text
7065 @cindex Indicating commands, definitions, etc.
7066
7067 Texinfo has commands for indicating just what kind of object a piece
7068 of text refers to. For example, email addresses are marked by
7069 @code{@@email}; that way, the result can be a live link to send email
7070 when the output format supports it. If the email address was simply
7071 marked as ``print in a typewriter font'', that would not be possible.
7072
7073 @menu
7074 * Useful Highlighting:: Highlighting provides useful information.
7075 * @t{@@code}:: Indicating program code.
7076 * @t{@@kbd}:: Showing keyboard input.
7077 * @t{@@key}:: Specifying keys.
7078 * @t{@@samp}:: Indicating a literal sequence of characters.
7079 * @t{@@verb}:: Indicating a verbatim sequence of characters.
7080 * @t{@@var}:: Indicating metasyntactic variables.
7081 * @t{@@env}:: Indicating environment variables.
7082 * @t{@@file}:: Indicating file names.
7083 * @t{@@command}:: Indicating command names.
7084 * @t{@@option}:: Indicating option names.
7085 * @t{@@dfn}:: Specifying definitions.
7086 * @t{@@abbr}:: Indicating abbreviations.
7087 * @t{@@acronym}:: Indicating acronyms.
7088 * @t{@@indicateurl}:: Indicating an example url.
7089 * @t{@@email}:: Indicating an electronic mail address.
7090 @end menu
7091
7092
7093 @node Useful Highlighting
7094 @subsection Highlighting Commands are Useful
7095
7096 The commands serve a variety of purposes:
7097
7098 @table @code
7099 @item @@code@{@var{sample-code}@}
7100 Indicate text that is a literal example of a piece of a program.
7101 @xref{@t{@@code}}.
7102
7103 @item @@kbd@{@var{keyboard-characters}@}
7104 Indicate keyboard input. @xref{@t{@@kbd}}.
7105
7106 @item @@key@{@var{key-name}@}
7107 Indicate the conventional name for a key on a keyboard.
7108 @xref{@t{@@key}}.
7109
7110 @item @@samp@{@var{text}@}
7111 Indicate text that is a literal example of a sequence of characters.
7112 @xref{@t{@@samp}}.
7113
7114 @item @@verb@{@var{text}@}
7115 Write a verbatim sequence of characters.
7116 @xref{@t{@@verb}}.
7117
7118 @item @@var@{@var{metasyntactic-variable}@}
7119 Indicate a metasyntactic variable. @xref{@t{@@var}}.
7120
7121 @item @@env@{@var{environment-variable}@}
7122 Indicate an environment variable. @xref{@t{@@env}}.
7123
7124 @item @@file@{@var{file-name}@}
7125 Indicate the name of a file. @xref{@t{@@file}}.
7126
7127 @item @@command@{@var{command-name}@}
7128 Indicate the name of a command.
7129 @xref{@t{@@command}}.
7130
7131 @item @@option@{@var{option}@}
7132 Indicate a command-line option.
7133 @xref{@t{@@option}}.
7134
7135 @item @@dfn@{@var{term}@}
7136 Indicate the introductory or defining use of a term.
7137 @xref{@t{@@dfn}}.
7138
7139 @item @@cite@{@var{reference}@}
7140 Indicate the name of a book. @xref{@t{@@cite}}.
7141
7142 @item @@abbr@{@var{abbreviation}@}
7143 Indicate an abbreviation, such as `Comput.'.
7144
7145 @item @@acronym@{@var{acronym}@}
7146 Indicate an acronym. @xref{@t{@@acronym}}.
7147
7148 @item @@indicateurl@{@var{uniform-resource-locator}@}
7149 Indicate an example (that is, nonfunctional) uniform resource locator.
7150 @xref{@t{@@indicateurl}}. (Use @code{@@url} (@pxref{@t{@@url}}) for
7151 live urls.)
7152
7153 @item @@email@{@var{email-address}[, @var{displayed-text}]@}
7154 Indicate an electronic mail address. @xref{@t{@@email}}.
7155
7156 @end table
7157
7158
7159 @node @t{@@code}
7160 @subsection @code{@@code}@{@var{sample-code}@}
7161
7162 @anchor{code}@c old name
7163 @findex code
7164
7165 @cindex Syntactic tokens, indicating
7166 Use the @code{@@code} command to indicate text that is a piece of a
7167 program and which consists of entire syntactic tokens. Enclose the
7168 text in braces.
7169
7170 @cindex Expressions in a program, indicating
7171 @cindex Keywords, indicating
7172 @cindex Reserved words, indicating
7173 Thus, you should use @code{@@code} for an expression in a program, for
7174 the name of a variable or function used in a program, or for a
7175 keyword in a programming language.
7176
7177 Use @code{@@code} for command names in languages that resemble
7178 programming languages, such as Texinfo. For example, @code{@@code} and
7179 @code{@@samp} are produced by writing @samp{@@code@{@@@@code@}} and
7180 @samp{@@code@{@@@@samp@}} in the Texinfo source, respectively.
7181
7182 @cindex Case, not altering in @code{@@code}
7183 It is incorrect to alter the case of a word inside an @code{@@code}
7184 command when it appears at the beginning of a sentence. Most computer
7185 languages are case sensitive. In C, for example, @code{Printf} is
7186 different from the identifier @code{printf}, and most likely is a
7187 misspelling of it. Even in languages which are not case sensitive, it
7188 is confusing to a human reader to see identifiers spelled in different
7189 ways. Pick one spelling and always use that. If you do not want to
7190 start a sentence with a command name written all in lowercase, you
7191 should rearrange the sentence.
7192
7193 In the Info output, @code{@@code} results in single quotation marks
7194 around the text. In other formats, @code{@@code} argument is typeset
7195 in a typewriter (monospace) font. For example,
7196
7197 @example
7198 The function returns @@code@{nil@}.
7199 @end example
7200
7201 @noindent
7202 produces this:
7203
7204 @quotation
7205 The function returns @code{nil}.
7206 @end quotation
7207
7208 Here are some cases for which it is preferable @emph{not} to use @code{@@code}:
7209
7210 @itemize @bullet
7211 @item
7212 For shell command names such as @command{ls} (use @code{@@command}).
7213
7214 @item
7215 For environment variable such as @env{TEXINPUTS} (use @code{@@env}).
7216
7217 @item
7218 For shell options such as @samp{-c} when such options stand alone (use
7219 @code{@@option}).
7220
7221 @item
7222 An entire shell command often looks better if written using
7223 @code{@@samp} rather than @code{@@code}. In this case, the rule is to
7224 choose the more pleasing format.
7225
7226 @item
7227 For a string of characters shorter than a syntactic token. For example,
7228 if you are writing about @samp{goto-ch}, which is just a part of the
7229 name for the @code{goto-char} Emacs Lisp function, you should use
7230 @code{@@samp}.
7231
7232 @item
7233 In general, when writing about the characters used in a token; for
7234 example, do not use @code{@@code} when you are explaining what letters
7235 or printable symbols can be used in the names of functions. (Use
7236 @code{@@samp}.) Also, you should not use @code{@@code} to mark text
7237 that is considered input to programs unless the input is written in a
7238 language that is like a programming language. For example, you should
7239 not use @code{@@code} for the keystroke commands of XEmacs (use
7240 @code{@@kbd} instead) although you may use @code{@@code} for the names
7241 of the Emacs Lisp functions that the keystroke commands invoke.
7242
7243 @end itemize
7244
7245 By default, @TeX{} will consider breaking lines at @samp{-} and
7246 @samp{_} characters within @code{@@code} and related commands. This
7247 can be controlled with @code{@@allowcodebreaks}
7248 (@pxref{@t{@@allowcodebreaks}}). The HTML output attempts to
7249 respect this for @samp{-}, but ultimately it is up to the browser's
7250 behavior. For Info, it seems better never to make such breaks.
7251
7252 For Info, the quotes are omitted in the output of the @code{@@code}
7253 command and related commands (e.g., @code{@@kbd}, @code{@@command}),
7254 in typewriter-like contexts such as the @code{@@example} environment
7255 (@pxref{@t{@@example}}) and @code{@@code} itself, etc.
7256
7257 To control which quoting characters are implicitly inserted by Texinfo
7258 processors in the output of @samp{@@code}, etc., see the
7259 @code{OPEN_QUOTE_SYMBOL} and @code{CLOSE_QUOTE_SYMBOL} customization
7260 variables (@pxref{Other Customization Variables}). This is separate
7261 from how actual quotation characters in the input document are handled
7262 (@pxref{Inserting Quote Characters}).
7263
7264
7265 @node @t{@@kbd}
7266 @subsection @code{@@kbd}@{@var{keyboard-characters}@}
7267
7268 @anchor{kbd}@c old name
7269 @findex kbd
7270 @cindex Keyboard input
7271
7272 Use the @code{@@kbd} command for characters of input to be typed by
7273 users. For example, to refer to the characters @kbd{M-a}, write:
7274
7275 @example
7276 @@kbd@{M-a@}
7277 @end example
7278
7279 @noindent
7280 and to refer to the characters @kbd{M-x shell}, write:
7281
7282 @example
7283 @@kbd@{M-x shell@}
7284 @end example
7285
7286 @cindex User input
7287 @cindex Slanted typewriter font, for @code{@@kbd}
7288 By default, the @code{@@kbd} command produces a different font
7289 (slanted typewriter instead of normal typewriter),
7290 so users can distinguish the characters that they are supposed
7291 to type from those that the computer outputs.
7292
7293 @findex kbdinputstyle
7294 Since the usage of @code{@@kbd} varies from manual to manual, you can
7295 control the font switching with the @code{@@kbdinputstyle} command.
7296 This command has no effect on Info output. Write this command at the
7297 beginning of a line with a single word as an argument, one of the
7298 following:
7299
7300 @vindex distinct@r{, value for @code{@@kbdinputstyle}}
7301 @vindex example@r{, value for @code{@@kbdinputstyle}}
7302 @vindex code@r{, value for @code{@@kbdinputstyle}}
7303 @table @samp
7304 @item code
7305 Always use the same font for @code{@@kbd} as @code{@@code}.
7306 @item example
7307 Use the distinguishing font for @code{@@kbd} only in @code{@@example}
7308 and similar environments.
7309 @item distinct
7310 (the default) Always use the distinguishing font for @code{@@kbd}.
7311 @end table
7312
7313 You can embed another @@-command inside the braces of an @code{@@kbd}
7314 command. Here, for example, is the way to describe a command that
7315 would be described more verbosely as ``press the @samp{r} key and then
7316 press the @key{RETURN} key'':
7317
7318 @example
7319 @@kbd@{r @@key@{RET@}@}
7320 @end example
7321
7322 @noindent
7323 This produces: @kbd{r @key{RET}}. (The present manual uses the
7324 default for @code{@@kbdinputstyle}.)
7325
7326 You also use the @code{@@kbd} command if you are spelling out the letters
7327 you type; for example:
7328
7329 @example
7330 To give the @@code@{logout@} command,
7331 type the characters @@kbd@{l o g o u t @@key@{RET@}@}.
7332 @end example
7333
7334 @noindent
7335 This produces:
7336
7337 @quotation
7338 To give the @code{logout} command,
7339 type the characters @kbd{l o g o u t @key{RET}}.
7340 @end quotation
7341
7342 (Also, this example shows that you can add spaces for clarity. If you
7343 explicitly want to mention a space character as one of the characters of
7344 input, write @kbd{@@key@{SPC@}} for it.)
7345
7346
7347 @node @t{@@key}
7348 @subsection @code{@@key}@{@var{key-name}@}
7349
7350 @anchor{key}@c old name
7351 @findex key
7352
7353 Use the @code{@@key} command for the conventional name for a key on a
7354 keyboard, as in:
7355
7356 @example
7357 @@key@{RET@}
7358 @end example
7359
7360 You can use the @code{@@key} command within the argument of an
7361 @code{@@kbd} command when the sequence of characters to be typed
7362 includes one or more keys that are described by name.
7363
7364 For example, to produce @kbd{C-x @key{ESC}} and @kbd{M-@key{TAB}} you
7365 would type:
7366
7367 @example
7368 @@kbd@{C-x @@key@{ESC@}@}
7369 @@kbd@{M-@@key@{TAB@}@}
7370 @end example
7371
7372 Here is a list of the recommended names for keys:
7373 @cindex Recommended names for keys
7374 @cindex Keys, recommended names
7375 @cindex Names recommended for keys
7376 @cindex Abbreviations for keys
7377 @cindex Control keys, specifying
7378 @cindex Meta keys, specifying
7379
7380 @quotation
7381 @table @t
7382 @item SPC
7383 Space
7384 @item RET
7385 Return
7386 @item LFD
7387 Linefeed (however, since most keyboards nowadays do not have a Linefeed key,
7388 it might be better to call this character @kbd{C-j})
7389 @item TAB
7390 Tab
7391 @item BS
7392 Backspace
7393 @item ESC
7394 Escape
7395 @item DELETE
7396 Delete
7397 @item SHIFT
7398 Shift
7399 @item CTRL
7400 Control
7401 @item META
7402 Meta
7403 @end table
7404 @end quotation
7405
7406 @cindex META key
7407 There are subtleties to handling words like `meta' or `ctrl' that are
7408 names of modifier keys. When mentioning a character in which the
7409 modifier key is used, such as @kbd{Meta-a}, use the @code{@@kbd} command
7410 alone; do not use the @code{@@key} command; but when you are referring
7411 to the modifier key in isolation, use the @code{@@key} command. For
7412 example, write @samp{@@kbd@{Meta-a@}} to produce @kbd{Meta-a} and
7413 @samp{@@key@{META@}} to produce @key{META}.
7414
7415 As a convention in GNU manuals, @code{@@key} should not be used in
7416 index entries.
7417
7418
7419 @node @t{@@samp}
7420 @subsection @code{@@samp}@{@var{text}@}
7421
7422 @anchor{samp}@c old name
7423 @findex samp
7424
7425 Use the @code{@@samp} command to indicate text that is a literal example
7426 or `sample' of a sequence of characters in a file, string, pattern, etc.
7427 Enclose the text in braces. The argument appears within single
7428 quotation marks in both the Info file and the printed manual; in
7429 addition, it is printed in a fixed-width font.
7430
7431 @example
7432 To match @@samp@{foo@} at the end of the line,
7433 use the regexp @@samp@{foo$@}.
7434 @end example
7435
7436 @noindent
7437 produces
7438
7439 @quotation
7440 To match @samp{foo} at the end of the line, use the regexp
7441 @samp{foo$}.
7442 @end quotation
7443
7444 Any time you are referring to single characters, you should use
7445 @code{@@samp} unless @code{@@kbd} or @code{@@key} is more appropriate.
7446 Also, you may use @code{@@samp} for entire statements in C and for entire
7447 shell commands---in this case, @code{@@samp} often looks better than
7448 @code{@@code}. Basically, @code{@@samp} is a catchall for whatever is
7449 not covered by @code{@@code}, @code{@@kbd}, @code{@@key},
7450 @code{@@command}, etc.
7451
7452 Only include punctuation marks within braces if they are part of the
7453 string you are specifying. Write punctuation marks outside the braces
7454 if those punctuation marks are part of the English text that surrounds
7455 the string. In the following sentence, for example, the commas and
7456 period are outside of the braces:
7457
7458 @example
7459 @group
7460 In English, the vowels are @@samp@{a@}, @@samp@{e@},
7461 @@samp@{i@}, @@samp@{o@}, @@samp@{u@}, and sometimes
7462 @@samp@{y@}.
7463 @end group
7464 @end example
7465
7466 @noindent
7467 This produces:
7468
7469 @quotation
7470 In English, the vowels are @samp{a}, @samp{e},
7471 @samp{i}, @samp{o}, @samp{u}, and sometimes
7472 @samp{y}.
7473 @end quotation
7474
7475
7476 @node @t{@@verb}
7477 @subsection @code{@@verb}@{@var{char}@var{text}@var{char}@}
7478
7479 @anchor{verb}@c old name
7480 @findex verb
7481 @cindex Verbatim in-line text
7482
7483 @cindex Delimiter character, for verbatim
7484 Use the @code{@@verb} command to print a verbatim sequence of
7485 characters.
7486
7487 Like @LaTeX{}'s @code{\verb} command, the verbatim text can be quoted using
7488 any unique delimiter character. Enclose the verbatim text, including the
7489 delimiters, in braces. Text is printed in a fixed-width font:
7490
7491 @example
7492 How many @@verb@{|@@|@}-escapes does one need to print this
7493 @@verb@{.@@a @@b.@@c.@} string or @@verb@{+@@'e?`@{@}!`\+@} this?
7494 @end example
7495
7496 @noindent
7497 produces
7498
7499 @example
7500 How many @verb{|@|}-escapes does one need to print this
7501 @verb{.@a @b.@c.} string or @verb{+@'e?`{}!`\+} this?
7502 @end example
7503
7504 This is in contrast to @code{@@samp} (see the previous section),
7505 @code{@@code}, and similar commands; in those cases, the argument is
7506 normal Texinfo text, where the three characters @code{@@@{@}} are
7507 special, as usual. With @code{@@verb}, nothing is special except the
7508 delimiter character you choose.
7509
7510 The delimiter character itself may appear inside the verbatim text, as
7511 shown above. As another example, @samp{@@verb@{...@}} prints a single
7512 (fixed-width) period.
7513
7514 It is not reliable to use @code{@@verb} inside other Texinfo
7515 constructs. In particular, it does not work to use @code{@@verb} in
7516 anything related to cross referencing, such as section titles or
7517 figure captions.
7518
7519
7520 @node @t{@@var}
7521 @subsection @code{@@var}@{@var{metasyntactic-variable}@}
7522
7523 @anchor{var}@c old name
7524 @findex var
7525
7526 Use the @code{@@var} command to indicate metasyntactic variables. A
7527 @dfn{metasyntactic variable} is something that stands for another
7528 piece of text. For example, you should use a metasyntactic variable
7529 in the documentation of a function to describe the arguments that are
7530 passed to that function.
7531
7532 Do not use @code{@@var} for the names of normal variables in computer
7533 programs. These are specific names, so @code{@@code} is correct for
7534 them (@t{@@code}). For example, the Emacs Lisp variable
7535 @code{texinfo-tex-command} is not a metasyntactic variable; it is
7536 properly formatted using @code{@@code}.
7537
7538 Do not use @code{@@var} for environment variables either; @code{@@env}
7539 is correct for them (see the next section).
7540
7541 The effect of @code{@@var} in the Info file is to change the case of
7542 the argument to all uppercase. In the printed manual and HTML
7543 output, the argument is output in slanted type.
7544
7545 @need 700
7546 For example,
7547
7548 @example
7549 To delete file @@var@{filename@},
7550 type @@samp@{rm @@var@{filename@}@}.
7551 @end example
7552
7553 @noindent
7554 produces
7555
7556 @quotation
7557 To delete file @var{filename}, type @samp{rm @var{filename}}.
7558 @end quotation
7559
7560 @noindent
7561 (Note that @code{@@var} may appear inside @code{@@code},
7562 @code{@@samp}, @code{@@file}, etc.)
7563
7564 Write a metasyntactic variable all in lowercase without spaces, and
7565 use hyphens to make it more readable. Thus, the Texinfo source for
7566 the illustration of how to begin a Texinfo manual looks like
7567 this:
7568
7569 @example
7570 @group
7571 \input texinfo
7572 @@@@setfilename @@var@{info-file-name@}
7573 @@@@settitle @@var@{name-of-manual@}
7574 @end group
7575 @end example
7576
7577 @noindent
7578 This produces:
7579
7580 @example
7581 @group
7582 \input texinfo
7583 @@setfilename @var{info-file-name}
7584 @@settitle @var{name-of-manual}
7585 @end group
7586 @end example
7587
7588 In some documentation styles, metasyntactic variables are shown with
7589 angle brackets, for example:
7590
7591 @example
7592 @dots{}, type rm <filename>
7593 @end example
7594
7595 @noindent
7596 However, that is not the style that Texinfo uses.
7597
7598 @c FIXME add a customization variable? Add an example on how to do that
7599 @c for HTML?
7600 @c (You can, of course, modify the sources to @file{texinfo.tex}
7601 @c and the Info formatting commands
7602 @c to output the @code{<@dots{}>} format if you wish.)
7603
7604
7605 @node @t{@@env}
7606 @subsection @code{@@env}@{@var{environment-variable}@}
7607
7608 @anchor{env}@c old name
7609 @findex env
7610
7611 Use the @code{@@env} command to indicate environment variables, as
7612 used by many operating systems, including GNU@. Do not use it for
7613 @emph{meta}syntactic variables; use @code{@@var} for those (see the
7614 previous section).
7615
7616 @code{@@env} is equivalent to @code{@@code} in its effects.
7617 For example:
7618
7619 @example
7620 The @@env@{PATH@} environment variable @dots{}
7621 @end example
7622 @noindent produces
7623 @quotation
7624 The @env{PATH} environment variable @dots{}
7625 @end quotation
7626
7627
7628 @node @t{@@file}
7629 @subsection @code{@@file}@{@var{file-name}@}
7630
7631 @anchor{file}@c old name
7632 @findex file
7633
7634 Use the @code{@@file} command to indicate text that is the name of a
7635 file, buffer, or directory, or is the name of a node in Info. You can
7636 also use the command for file name suffixes. Do not use @code{@@file}
7637 for symbols in a programming language; use @code{@@code}.
7638
7639 @code{@@file} is equivalent to @code{code} in its effects. For
7640 example,
7641
7642 @example
7643 The @@file@{.el@} files are in
7644 the @@file@{/usr/local/xemacs/lisp@} directory.
7645 @end example
7646
7647 @noindent
7648 produces
7649
7650 @quotation
7651 The @file{.el} files are in
7652 the @file{/usr/local/xemacs/lisp} directory.
7653 @end quotation
7654
7655
7656 @node @t{@@command}
7657 @subsection @code{@@command}@{@var{command-name}@}
7658
7659 @anchor{command}@c old name
7660 @findex command
7661 @cindex Command names, indicating
7662 @cindex Program names, indicating
7663
7664 Use the @code{@@command} command to indicate command names, such as
7665 @command{ls} or @command{cc}.
7666
7667 @code{@@command} is equivalent to @code{@@code} in its effects.
7668 For example:
7669
7670 @example
7671 The command @@command@{ls@} lists directory contents.
7672 @end example
7673 @noindent produces
7674 @quotation
7675 The command @command{ls} lists directory contents.
7676 @end quotation
7677
7678 You should write the name of a program in the ordinary text font, rather
7679 than using @code{@@command}, if you regard it as a new English word,
7680 such as `Emacs' or `Bison'.
7681
7682 When writing an entire shell command invocation, as in @samp{ls -l},
7683 you should use either @code{@@samp} or @code{@@code} at your discretion.
7684
7685
7686 @node @t{@@option}
7687 @subsection @code{@@option}@{@var{option-name}@}
7688
7689 @anchor{option}@c old name
7690 @findex option
7691
7692 Use the @code{@@option} command to indicate a command-line option; for
7693 example, @option{-l} or @option{--version} or
7694 @option{--output=@var{filename}}.
7695
7696 @code{@@option} is equivalent to @code{@@code} in its effects.
7697 For example:
7698
7699 @example
7700 The option @@option@{-l@} produces a long listing.
7701 @end example
7702 @noindent produces
7703 @quotation
7704 The option @option{-l} produces a long listing.
7705 @end quotation
7706
7707
7708 @node @t{@@dfn}
7709 @subsection @code{@@dfn}@{@var{term}@}
7710
7711 @anchor{dfn}@c old name
7712 @findex dfn
7713
7714 Use the @code{@@dfn} command to identify the introductory or defining
7715 use of a technical term. Use the command only in passages whose
7716 purpose is to introduce a term which will be used again or which the
7717 reader ought to know. Mere passing mention of a term for the first
7718 time does not deserve @code{@@dfn}. The command generates italics in
7719 the printed manual, and double quotation marks in the Info file. For
7720 example:
7721
7722 @example
7723 Getting rid of a file is called @@dfn@{deleting@} it.
7724 @end example
7725
7726 @noindent
7727 produces
7728
7729 @quotation
7730 Getting rid of a file is called @dfn{deleting} it.
7731 @end quotation
7732
7733 As a general rule, a sentence containing the defining occurrence of a
7734 term should be a definition of the term. The sentence does not need
7735 to say explicitly that it is a definition, but it should contain the
7736 information of a definition---it should make the meaning clear.
7737
7738
7739 @node @t{@@abbr}
7740 @subsection @code{@@abbr}@{@var{abbreviation}[, @var{meaning}]@}
7741
7742 @anchor{abbr}@c old name
7743 @findex abbr
7744
7745 @cindex Abbreviations, tagging
7746 You can use the @code{@@abbr} command for general abbreviations. The
7747 abbreviation is given as the single argument in braces, as in
7748 @samp{@@abbr@{Comput.@}}. As a matter of style, or for particular
7749 abbreviations, you may prefer to omit periods, as in
7750 @samp{@@abbr@{Mr@} Stallman}.
7751
7752 @code{@@abbr} accepts an optional second argument, intended to be used
7753 for the meaning of the abbreviation.
7754
7755 If the abbreviation ends with a lowercase letter and a period, and is
7756 not at the end of a sentence, and has no second argument, remember to
7757 use the @code{@@.} command (@pxref{Ending a Sentence}) to get the
7758 correct spacing. However, you do not have to use @code{@@.} within
7759 the abbreviation itself; Texinfo automatically assumes periods within
7760 the abbreviation do not end a sentence.
7761
7762 @cindex @code{<abbr>} and @code{<abbrev>} tags
7763 In @TeX{} and in the Info output, the first argument is printed as-is;
7764 if the second argument is present, it is printed in parentheses after
7765 the abbreviation. In HTML the @code{<abbr>} tag is used; in Docbook,
7766 the @code{<abbrev>} tag is used. For instance:
7767
7768 @example
7769 @@abbr@{Comput. J., Computer Journal@}
7770 @end example
7771
7772 @noindent produces:
7773
7774 @display
7775 @abbr{Comput. J., Computer Journal}
7776 @end display
7777
7778 For abbreviations consisting of all capital letters, you may prefer to
7779 use the @code{@@acronym} command instead. See the next section for
7780 more on the usage of these two commands.
7781
7782
7783 @node @t{@@acronym}
7784 @subsection @code{@@acronym}@{@var{acronym}[, @var{meaning}]@}
7785
7786 @anchor{acronym}@c old name
7787 @findex acronym
7788
7789 @cindex NASA, as acronym
7790 @cindex Acronyms, tagging
7791 You can use the @code{@@acronym} command for abbreviations written in
7792 all capital letters, such as `@acronym{NASA}'. The abbreviation is
7793 given as the single argument in braces, as in
7794 @samp{@@acronym@{NASA@}}. As a matter of style, or for particular
7795 acronyms, you may prefer to use periods, as in
7796 @samp{@@acronym@{N.A.S.A.@}}.
7797
7798 @code{@@acronym} accepts an optional second argument, intended to be
7799 used for the meaning of the acronym.
7800
7801 If the acronym is at the end of a sentence, and if there is no second
7802 argument, remember to use the @code{@@.} or similar command
7803 (@pxref{Ending a Sentence}) to get the correct spacing.
7804
7805 @cindex @code{<acronym>} tag
7806 In @TeX{}, the acronym is printed in slightly smaller font. In the
7807 Info output, the argument is printed as-is. In either format, if the
7808 second argument is present, it is printed in parentheses after the
7809 acronym. In HTML and Docbook the @code{<acronym>} tag is used.
7810
7811 For instance (since GNU is a recursive acronym, we use
7812 @code{@@acronym} recursively):
7813
7814 @example
7815 @@acronym@{GNU, @@acronym@{GNU@}'s Not Unix@}
7816 @end example
7817
7818 @noindent produces:
7819
7820 @display
7821 @acronym{GNU, @acronym{GNU}'s Not Unix}
7822 @end display
7823
7824 @cindex Family names, in all capitals
7825 In some circumstances, it is conventional to print family names in all
7826 capitals. Don't use @code{@@acronym} for this, since a name is not an
7827 acronym. Use @code{@@sc} instead (@pxref{Smallcaps}).
7828
7829 @code{@@abbr} and @code{@@acronym} are closely related commands: they
7830 both signal to the reader that a shortened form is being used, and
7831 possibly give a meaning. When choosing whether to use these two
7832 commands, please bear the following in mind.
7833
7834 @itemize @minus
7835 @item
7836 In common English usage, acronyms are a subset of abbreviations: they
7837 include pronounceable words like `@acronym{NATO}', `radar', and
7838 `snafu'; some sources also include syllable acronyms like
7839 `Usenet', hybrids like `@acronym{SIGGRAPH}', and unpronounceable
7840 initialisms like `@acronym{FBI}'.
7841
7842 @item
7843 In Texinfo, an acronym (but not an abbreviation) should consist only
7844 of capital letters and periods, no lowercase.
7845
7846 @item
7847 In @TeX{}, an acronym (but not an abbreviation) is printed in a
7848 slightly smaller font.
7849
7850 @item
7851 Some browsers place a dotted bottom border under abbreviations but not
7852 acronyms.
7853
7854 @item
7855 It usually turns out to be quite difficult and/or time-consuming to
7856 consistently use @code{@@acronym} for all sequences of uppercase
7857 letters. Furthermore, it looks strange for some acronyms to be in the
7858 normal font size and others to be smaller. Thus, a simpler approach
7859 you may wish to consider is to avoid @code{@@acronym} and just typeset
7860 everything as normal text in all capitals: @samp{GNU}, producing the
7861 output `GNU'.
7862
7863 @item
7864 In general, it's not essential to use either of these commands for all
7865 abbreviations; use your judgment. Text is perfectly readable without
7866 them.
7867 @end itemize
7868
7869
7870 @node @t{@@indicateurl}
7871 @subsection @code{@@indicateurl}@{@var{uniform-resource-locator}@}
7872
7873 @anchor{indicateurl}@c old name
7874 @findex indicateurl
7875 @cindex Uniform resource locator, indicating
7876 @cindex URL, indicating
7877
7878 Use the @code{@@indicateurl} command to indicate a uniform resource
7879 locator on the World Wide Web. This is purely for markup purposes and
7880 does not produce a link you can follow (use the @code{@@url} or
7881 @code{@@uref} command for that, @pxref{@t{@@url}}).
7882 @code{@@indicateurl} is useful for urls which do not actually exist.
7883 For example:
7884
7885 @example
7886 For example, the url might be @@indicateurl@{http://example.org/path@}.
7887 @end example
7888
7889 @noindent which produces:
7890
7891 @display
7892 For example, the url might be @indicateurl{http://example.org/path}.
7893 @end display
7894
7895 The output from @code{@@indicateurl} is more or less like that of
7896 @code{@@samp} (@pxref{@t{@@samp}}).
7897
7898
7899 @node @t{@@email}
7900 @subsection @code{@@email}@{@var{email-address}[, @var{displayed-text}]@}
7901
7902 @anchor{email}@c old name
7903 @findex email
7904
7905 Use the @code{@@email} command to indicate an electronic mail address.
7906 It takes one mandatory argument, the address, and one optional argument, the
7907 text to display (the default is the address itself).
7908
7909 @cindex Mailto link
7910 In Info, the address is shown in angle brackets, preceded by the text
7911 to display if any. In @TeX{}, the angle brackets are omitted. In
7912 HTML output, @code{@@email} produces a @samp{mailto} link that usually
7913 brings up a mail composition window. For example:
7914
7915 @example
7916 Send bug reports to @@email@{bug-texinfo@@@@gnu.org@},
7917 suggestions to the @@email@{bug-texinfo@@@@gnu.org, same place@}.
7918 @end example
7919
7920 @noindent produces
7921
7922 @display
7923 Send bug reports to @email{bug-texinfo@@gnu.org},
7924 suggestions to the @email{bug-texinfo@@gnu.org, same place}.
7925 @end display
7926
7927
7928 @node Emphasis
7929 @section Emphasizing Text
7930 @cindex Emphasizing text
7931
7932 Usually, Texinfo changes the font to mark words in the text according
7933 to the category the words belong to; an example is the @code{@@code}
7934 command. Most often, this is the best way to mark words. However,
7935 sometimes you will want to emphasize text without indicating a
7936 category. Texinfo has two commands to do this. Also, Texinfo has
7937 several commands that specify the font in which text will be output.
7938 These commands have no effect in Info and only one of them, the
7939 @code{@@r} command, has any regular use.
7940
7941 @menu
7942 * @t{@@emph @@strong}:: How to emphasize text in Texinfo.
7943 * Smallcaps:: How to use the small caps font.
7944 * Fonts:: Various font commands for printed output.
7945 @end menu
7946
7947
7948 @node @t{@@emph @@strong}
7949 @subsection @code{@@emph}@{@var{text}@} and @code{@@strong}@{@var{text}@}
7950
7951 @anchor{emph & strong}@c oldname
7952 @findex emph
7953 @findex strong
7954 @cindex Emphasizing text, font for
7955
7956 The @code{@@emph} and @code{@@strong} commands are for emphasis;
7957 @code{@@strong} is stronger. In printed output, @code{@@emph} produces
7958 @emph{italics} and @code{@@strong} produces @strong{bold}.
7959 In the Info output, @code{@@emph} surrounds the text with underscores
7960 (@samp{_}), and @code{@@strong} puts asterisks around the text.
7961
7962 For example,
7963
7964 @example
7965 @group
7966 @@strong@{Caution:@} @@samp@{rm *@}
7967 removes @@emph@{all@} normal files.
7968 @end group
7969 @end example
7970
7971 @noindent
7972 produces the following:
7973
7974 @quotation
7975 @strong{Caution}: @samp{rm * .[^.]*}
7976 removes @emph{all} normal files.
7977 @end quotation
7978
7979 The @code{@@strong} command is seldom used except to mark what is, in
7980 effect, a typographical element, such as the word `Caution' in the
7981 preceding example.
7982
7983 @quotation Caution
7984 Do not use @code{@@strong} with the word @samp{Note} followed by a
7985 space; Info will mistake the combination for a cross reference. Use a
7986 phrase such as @strong{Please notice} or @strong{Caution} instead, or
7987 the optional argument to @code{@@quotation}---@samp{Note} is allowable
7988 there.
7989 @end quotation
7990
7991
7992 @node Smallcaps
7993 @subsection @code{@@sc}@{@var{text}@}: The Small Caps Font
7994 @cindex Small caps font
7995 @findex sc @r{(small caps font)}
7996
7997 Use the @samp{@@sc} command to set text in @sc{a small caps font}
7998 (where possible). Write the text you want to be in small caps between
7999 braces in lowercase, like this:
8000
8001 @example
8002 Richard @@sc@{Stallman@} commenc@'{e} GNU.
8003 @end example
8004
8005 @noindent
8006 This produces:
8007
8008 @display
8009 Richard @sc{Stallman} commenc@'{e} GNU.
8010 @end display
8011
8012 As shown here, we recommend reserving @code{@@sc} for special cases
8013 where you want typographic small caps; family names are one such,
8014 especially in languages other than English, though there are no
8015 hard-and-fast rules about such things.
8016
8017 @cindex @code{<small>} tag
8018 @TeX{} typesets any uppercase letters between the braces of an
8019 @code{@@sc} command in full-size capitals; only lowercase letters are
8020 printed in the small caps font. In the Info output, the argument to
8021 @code{@@sc} is printed in all uppercase. In HTML, the argument is
8022 uppercased and the output marked with the @code{<small>} tag to reduce
8023 the font size, since HTML cannot easily represent true small caps.
8024
8025 Overall, we recommend using standard upper- and lowercase letters
8026 wherever possible.
8027
8028
8029 @node Fonts
8030 @subsection Fonts for Printing
8031 @cindex Fonts for printing
8032
8033 @findex fonttextsize
8034 @cindex Font size, reducing
8035 @cindex Reducing font size
8036 @cindex Smaller fonts
8037 Texinfo provides one command to change the size of the main body font
8038 in the @TeX{} output for a document: @code{@@fonttextsize}. It has no
8039 effect in other output. It takes a single argument on the remainder
8040 of the line, which must be either @samp{10} or @samp{11}. For
8041 example:
8042
8043 @example
8044 @@fonttextsize 10
8045 @end example
8046
8047 @cindex Printing cost, reducing
8048 The effect is to reduce the body font to a 10@dmn{pt} size (the
8049 default is 11@dmn{pt}). Fonts for other elements, such as sections
8050 and chapters, are reduced accordingly. This should only be used in
8051 conjunction with @code{@@smallbook} (@pxref{@t{@@smallbook}}) or
8052 similar, since 10@dmn{pt} fonts on standard paper (8.5x11 or A4) are
8053 too small. One reason to use this command is to save pages, and hence
8054 printing cost, for physical books.
8055
8056 Texinfo does not at present have commands to switch the font family
8057 to use, or more general size-changing commands.
8058
8059 Texinfo also provides a number of font commands that specify font
8060 changes in the printed manual and (where possible) in the HTML output.
8061 They have no effect in Info. All the commands apply to a following
8062 argument surrounded by braces.
8063
8064 @table @code
8065 @item @@b
8066 @findex b @r{(bold font)}
8067 @cindex Bold font
8068 selects @b{bold} face;
8069
8070 @item @@i
8071 @findex i @r{(italic font)}
8072 @cindex Italic font
8073 selects an @i{italic} font;
8074
8075 @item @@r
8076 @findex r @r{(roman font)}
8077 @cindex Roman font
8078 @cindex Default font
8079 selects a @r{roman} font, which is the usual font in which text is
8080 printed. It may or may not be seriffed.
8081
8082 @item @@sansserif
8083 @findex sansserif @r{(sans serif font)}
8084 @cindex Sans serif font
8085 selects a @sansserif{sans serif} font;
8086
8087 @item @@slanted
8088 @findex slanted @r{(slanted font)}
8089 @cindex Slanted font
8090 @cindex Oblique font
8091 selects a @slanted{slanted} font;
8092
8093 @item @@t
8094 @findex t @r{(typewriter font)}
8095 @cindex Monospace font
8096 @cindex Fixed-width font
8097 @cindex Typewriter font
8098 selects the @t{fixed-width}, typewriter-style font used by @code{@@code};
8099
8100 @end table
8101
8102 (The commands with longer names were invented much later than the
8103 others, at which time it did not seem desirable to use very short
8104 names for such infrequently needed features.)
8105
8106 @cindex <lineannotation> Docbook tag
8107 The @code{@@r} command can be useful in example-like environments, to
8108 write comments in the standard roman font instead of the fixed-width
8109 font. This looks better in printed output, and produces a
8110 @code{<lineannotation>} tag in Docbook output.
8111
8112 For example,
8113
8114 @example
8115 @group
8116 @@lisp
8117 (+ 2 2) ; @@r@{Add two plus two.@}
8118 @@end lisp
8119 @end group
8120 @end example
8121
8122 @noindent
8123 produces
8124
8125 @lisp
8126 (+ 2 2) ; @r{Add two plus two.}
8127 @end lisp
8128
8129 The @code{@@t} command can occasionally be useful to produce output in
8130 a typewriter font where that is supported (e.g., HTML and PDF), but no
8131 distinction is needed in Info or plain text: @code{@@t@{foo@}}
8132 produces @t{foo}, cf. @code{@@code@{foo@}} producing @code{foo}.
8133
8134 For example, we use @code{@@t} in the @code{@@node} commands for this
8135 manual to specify the Texinfo command names, because the quotes which
8136 @code{@@code} outputs look extraneous in that particular context.
8137
8138 In general, the other font commands are unlikely to be useful; they
8139 exist primarily to make it possible to document the functionality of
8140 specific font effects, such as in @TeX{} and related packages.
8141
8142
8143 @node Quotations and Examples
8144 @chapter Quotations and Examples
8145
8146 Quotations and examples are blocks of text consisting of one or more
8147 whole paragraphs that are set off from the bulk of the text and
8148 treated differently. They are usually indented in the output.
8149
8150 @findex end
8151 In Texinfo, you always begin a quotation or example by writing an
8152 @@-command at the beginning of a line by itself, and end it by writing
8153 an @code{@@end} command that is also at the beginning of a line by
8154 itself. For instance, you begin an example by writing
8155 @code{@@example} by itself at the beginning of a line and end the
8156 example by writing @code{@@end example} on a line by itself, at the
8157 beginning of that line, and with only one space between the
8158 @code{@@end} and the @code{example}.
8159
8160 @menu
8161 * Block Enclosing Commands:: Different constructs for different purposes.
8162 * @t{@@quotation}:: Writing a quotation.
8163 * @t{@@indentedblock}:: Block of text indented on left.
8164 * @t{@@example}:: Writing an example in a fixed-width font.
8165 * @t{@@verbatim}:: Writing a verbatim example.
8166 * @t{@@verbatiminclude}:: Including a file verbatim.
8167 * @t{@@lisp}:: Illustrating Lisp code.
8168 * @t{@@small@dots{}}:: Examples in a smaller font.
8169 * @t{@@display}:: Writing an example in the current font.
8170 * @t{@@format}:: Writing an example without narrowed margins.
8171 * @t{@@exdent}:: Undo indentation on a line.
8172 * @t{@@flushleft @@flushright}:: Pushing text flush left or flush right.
8173 * @t{@@raggedright}:: Avoiding justification on the right.
8174 * @t{@@noindent}:: Preventing paragraph indentation.
8175 * @t{@@indent}:: Forcing paragraph indentation.
8176 * @t{@@cartouche}:: Drawing rounded rectangles around text.
8177 @end menu
8178
8179
8180 @node Block Enclosing Commands
8181 @section Block Enclosing Commands
8182
8183 Here is a summary of commands that enclose blocks of text, also known
8184 as @dfn{environments}. They're explained further in the following
8185 sections.
8186
8187 @table @code
8188 @item @@quotation
8189 Indicate text that is quoted. The text is filled, indented (from both
8190 margins), and printed in a roman font by default.
8191
8192 @item @@indentedblock
8193 Like @code{@@quotation}, but the text is indented only on the left.
8194
8195 @item @@example
8196 Illustrate code, commands, and the like. The text is printed
8197 in a fixed-width font, and indented but not filled.
8198
8199 @item @@lisp
8200 Like @code{@@example}, but specifically for illustrating Lisp code. The
8201 text is printed in a fixed-width font, and indented but not filled.
8202
8203 @item @@verbatim
8204 Mark a piece of text that is to be printed verbatim; no character
8205 substitutions are made and all commands are ignored, until the next
8206 @code{@@end verbatim}. The text is printed in a fixed-width font,
8207 and not indented or filled. Extra spaces and blank lines are
8208 significant, and tabs are expanded.
8209
8210 @item @@display
8211 Display illustrative text. The text is indented but not filled, and
8212 no font is selected (so, by default, the font is roman).
8213
8214 @item @@format
8215 Like @code{@@display} (the text is not filled and no font is
8216 selected), but the text is not indented.
8217
8218 @item @@smallquotation
8219 @itemx @@smallindentedblock
8220 @itemx @@smallexample
8221 @itemx @@smalllisp
8222 @itemx @@smalldisplay
8223 @itemx @@smallformat
8224 These @code{@@small...} commands are just like their non-small
8225 counterparts, except that they output text in a smaller font size,
8226 where possible.
8227
8228 @item @@flushleft
8229 @itemx @@flushright
8230 Text is not filled, but is set flush with the left or right margin,
8231 respectively.
8232
8233 @item @@raggedright
8234 Text is filled, but only justified on the left, leaving the right
8235 margin ragged.
8236
8237 @item @@cartouche
8238 Highlight text, often an example or quotation, by drawing a box with
8239 rounded corners around it.
8240 @end table
8241
8242 The @code{@@exdent} command is used within the above constructs to
8243 undo the indentation of a line.
8244
8245 The @code{@@noindent} command may be used after one of the above
8246 constructs (or anywhere) to prevent the following text from being
8247 indented as a new paragraph.
8248
8249
8250 @node @t{@@quotation}
8251 @section @code{@@quotation}: Block Quotations
8252 @anchor{quotation}@c old name
8253
8254 @cindex Quotations
8255 @findex quotation
8256
8257 The text of a quotation is processed like normal text (regular font,
8258 text is filled) except that:
8259
8260 @itemize @bullet
8261 @item
8262 both the left and right margins are closer to the center of the page,
8263 so the whole of the quotation is indented;
8264
8265 @item
8266 the first lines of paragraphs are indented no more than other lines; and
8267
8268 @item
8269 an @code{@@author} command may be given to specify the author of the
8270 quotation.
8271 @end itemize
8272
8273 @quotation
8274 This is an example of text written between an @code{@@quotation}
8275 command and an @code{@@end quotation} command. An @code{@@quotation}
8276 command is most often used to indicate text that is excerpted from
8277 another (real or hypothetical) printed work.
8278 @end quotation
8279
8280 Write an @code{@@quotation} command as text on a line by itself. This
8281 line will disappear from the output. Mark the end of the quotation
8282 with a line beginning with and containing only @code{@@end quotation}.
8283 The @code{@@end quotation} line will likewise disappear from the
8284 output.
8285
8286 @code{@@quotation} takes one optional argument, given on the remainder
8287 of the line. This text, if present, is included at the beginning of
8288 the quotation in bold or otherwise emphasized, and followed with a
8289 @samp{:}. For example:
8290
8291 @example
8292 @@quotation Note
8293 This is
8294 a foo.
8295 @@end quotation
8296 @end example
8297
8298 @noindent
8299 produces
8300
8301 @quotation Note
8302 This is
8303 a foo.
8304 @end quotation
8305
8306 If the @code{@@quotation} argument is one of these English words
8307 (case-insensitive):
8308
8309 @example
8310 Caution Important Note Tip Warning
8311 @end example
8312
8313 @cindex @code{<caution>} Docbook tag
8314 @cindex @code{<important>} Docbook tag
8315 @cindex @code{<note>} Docbook tag
8316 @cindex @code{<tip>} Docbook tag
8317 @cindex @code{<warning>} Docbook tag
8318 @cindex @code{<blockquote>} HTML tag
8319 @noindent then the Docbook output uses corresponding special tags
8320 (@code{<note>}, etc.)@: instead of the default @code{<blockquote>}.
8321 HTML output always uses @code{<blockquote>}.
8322
8323 If the author of the quotation is specified in the @code{@@quotation}
8324 block with the @code{@@author} command, a line with the author name is
8325 displayed after the quotation:
8326
8327 @example
8328 @@quotation
8329 People sometimes ask me if it is a sin in the Church of Emacs to use
8330 vi. Using a free version of vi is not a sin; it is a penance. So happy
8331 hacking.
8332
8333 @@author Richard Stallman
8334 @@end quotation
8335 @end example
8336
8337 @noindent
8338 produces
8339
8340 @quotation
8341 People sometimes ask me if it is a sin in the Church of Emacs to use
8342 vi. Using a free version of vi is not a sin; it is a penance. So happy
8343 hacking.
8344
8345 @author Richard Stallman
8346 @end quotation
8347
8348 @findex smallquotation
8349 Texinfo also provides a command @code{@@smallquotation}, which is just
8350 like @code{@@quotation} but uses a smaller font size where possible.
8351 @xref{@t{@@small@dots{}}}.
8352
8353
8354 @node @t{@@indentedblock}
8355 @section @code{@@indentedblock}: Indented text blocks
8356 @cindex Indented text block
8357 @findex indentedblock
8358
8359 The @code{@@indentedblock} environment is similar to
8360 @code{@@quotation}, except that text is only indented on the left (and
8361 there is no optional argument for an author). Thus, the text font
8362 remains unchanged, and text is gathered and filled as usual, but the
8363 left margin is increased. For example:
8364
8365 @indentedblock
8366 This is an example of text written between an @code{@@indentedblock}
8367 command and an @code{@@end indentedblock} command. The
8368 @code{@@indentedblock} environment can contain any text or other
8369 commands desired.
8370 @end indentedblock
8371
8372 This is written in the Texinfo source as:
8373
8374 @example
8375 @@indentedblock
8376 This is an example ...
8377 @@end indentedblock
8378 @end example
8379
8380 @findex smallindentedblock
8381 Texinfo also provides a command @code{@@smallindentedblock}, which is
8382 just like @code{@@indentedblock} but uses a smaller font size where
8383 possible. @xref{@t{@@small@dots{}}}.
8384
8385
8386 @node @t{@@example}
8387 @section @code{@@example}: Example Text
8388
8389 @anchor{example}@c old name
8390 @findex example
8391 @cindex Examples, formatting them
8392 @cindex Formatting examples
8393
8394 The @code{@@example} environment is used to indicate an example that
8395 is not part of the running text, such as computer input or output.
8396 Write an @code{@@example} command at the beginning of a line by
8397 itself. Mark the end of the example with an @code{@@end example}
8398 command, also written at the beginning of a line by itself.
8399
8400 An @code{@@example} environment has the following characteristics:
8401
8402 @itemize
8403 @item Each line in the input file is a line in the output; that is,
8404 the source text is not filled as it normally is.
8405 @item Extra spaces and blank lines are significant.
8406 @item The output is indented.
8407 @item The output uses a fixed-width font.
8408 @item Texinfo commands @emph{are} expanded; if you want the output to
8409 be the input verbatim, use the @code{@@verbatim} environment instead
8410 (@pxref{@t{@@verbatim}}).
8411 @end itemize
8412
8413 For example,
8414
8415 @example
8416 @@example
8417 cp foo @@var@{dest1@}; \
8418 cp foo @@var@{dest2@}
8419 @@end example
8420 @end example
8421
8422 @noindent
8423 produces
8424
8425 @example
8426 cp foo @var{dest1}; \
8427 cp foo @var{dest2}
8428 @end example
8429
8430 The lines containing @code{@@example} and @code{@@end example} will
8431 disappear from the output. To make the output look good, you should
8432 put a blank line before the @code{@@example} and another blank line
8433 after the @code{@@end example}. Blank lines inside the beginning
8434 @code{@@example} and the ending @code{@@end example}, on the other
8435 hand, do appear in the output.
8436
8437 @quotation Caution
8438 Do not use tabs in the lines of an example! (Or anywhere else in
8439 Texinfo, except in verbatim environments.) @TeX{} treats tabs as
8440 single spaces, and that is not what they look like. In XEmacs, you can
8441 use @kbd{M-x untabify} to convert tabs in a region to multiple spaces.
8442 @end quotation
8443
8444 Examples are often, logically speaking, ``in the middle'' of a
8445 paragraph, and the text that continues afterwards should not be
8446 indented, as in the example above. The @code{@@noindent} command
8447 prevents a piece of text from being indented as if it were a new
8448 paragraph (@pxref{@t{@@noindent}}.
8449
8450 If you want to embed code fragments within sentences, instead of
8451 displaying them, use the @code{@@code} command or its relatives
8452 (@pxref{@t{@@code}}).
8453
8454 If you wish to write a ``comment'' on a line of an example in the
8455 normal roman font, you can use the @code{@@r} command (@pxref{Fonts}).
8456
8457
8458 @node @t{@@verbatim}
8459 @section @code{@@verbatim}: Literal Text
8460
8461 @anchor{verbatim}@c old name
8462 @findex verbatim
8463 @cindex Verbatim environment
8464
8465 Use the @code{@@verbatim} environment for printing of text that may
8466 contain special characters or commands that should not be interpreted,
8467 such as computer input or output (@code{@@example} interprets its text
8468 as regular Texinfo commands). This is especially useful for including automatically
8469 generated files in a Texinfo manual.
8470
8471 In general, the output will be just the same as the input. No
8472 character substitutions are made, e.g., all spaces and blank lines are
8473 significant, including tabs. In the printed manual, the text is
8474 typeset in a fixed-width font, and not indented or filled.
8475
8476 Write an @code{@@verbatim} command at the beginning of a line by
8477 itself. This line will disappear from the output. Mark the end of
8478 the verbatim block with an @code{@@end verbatim} command, also written
8479 at the beginning of a line by itself. The @code{@@end verbatim} will
8480 also disappear from the output.
8481
8482 For example:
8483 @c oops, got to trick this a bit: can't use @end verbatim inside @verbatim
8484
8485 @example
8486 @exdent @t{@@verbatim}
8487 @exdent @t{@{}
8488 @exdent @key{TAB}@t{@@command with strange characters: @@'e}
8489 @exdent @t{expand@key{TAB}me}
8490 @exdent @t{@}}
8491 @exdent @t{@@end verbatim}
8492 @end example
8493
8494 @noindent
8495 This produces:
8496
8497 @verbatim
8498 {
8499 @command with strange characters: @'e
8500 expand me
8501 }
8502 @end verbatim
8503
8504 Since the lines containing @code{@@verbatim} and @code{@@end verbatim}
8505 produce no output, typically you should put a blank line before the
8506 @code{@@verbatim} and another blank line after the @code{@@end
8507 verbatim}. Blank lines between the beginning @code{@@verbatim} and
8508 the ending @code{@@end verbatim} will appear in the output.
8509
8510 @cindex Verbatim, small
8511 @cindex Small verbatim
8512 You can get a ``small'' verbatim by enclosing the @code{@@verbatim} in
8513 an @code{@@smallformat} environment, as shown here:
8514
8515 @c more cheating ...
8516 @smallexample
8517 @exdent @t{@@smallformat}
8518 @exdent @t{@@verbatim}
8519 @exdent @t{... still verbatim, but in a smaller font ...}
8520 @exdent @t{@@end verbatim}
8521 @exdent @t{@@end smallformat}
8522 @end smallexample
8523
8524 Finally, a word of warning: it is not reliable to use
8525 @code{@@verbatim} inside other Texinfo constructs.
8526
8527
8528 @node @t{@@verbatiminclude}
8529 @section @code{@@verbatiminclude} @var{file}: Include a File Verbatim
8530
8531 @anchor{verbatiminclude}@c old name
8532 @findex verbatiminclude
8533 @cindex Verbatim, include file
8534 @cindex Including a file verbatim
8535
8536 You can include the exact contents of a file in the document with the
8537 @code{@@verbatiminclude} command:
8538
8539 @example
8540 @@verbatiminclude @var{filename}
8541 @end example
8542
8543 The contents of @var{filename} is printed in a verbatim environment
8544 (@pxref{@t{@@verbatim}}). Generally, the file is printed exactly
8545 as it is, with all special characters and white space retained. No
8546 indentation is added; if you want indentation, enclose the
8547 @code{@@verbatiminclude} within @code{@@example}
8548 (@pxref{@t{@@example}}).
8549
8550 The name of the file is taken literally, with a single exception:
8551 @code{@@value@{@var{var}@}} references are expanded. This makes it
8552 possible to include files in other directories within a distribution,
8553 for instance:
8554
8555 @example
8556 @@verbatiminclude @@value@{top_srcdir@}/NEWS
8557 @end example
8558
8559 @noindent (You still have to get @code{top_srcdir} defined in the
8560 first place.)
8561
8562 For a method on printing the file contents in a smaller font size, see
8563 the end of the previous section on @code{@@verbatim}.
8564
8565
8566 @node @t{@@lisp}
8567 @section @code{@@lisp}: Marking a Lisp Example
8568
8569 @anchor{lisp}@c old name
8570 @findex lisp
8571 @cindex Lisp example
8572
8573 The @code{@@lisp} command is used for Lisp code. It is synonymous
8574 with the @code{@@example} command.
8575
8576 @lisp
8577 This is an example of text written between an
8578 @code{@@lisp} command and an @code{@@end lisp} command.
8579 @end lisp
8580
8581 Use @code{@@lisp} instead of @code{@@example} to preserve information
8582 regarding the nature of the example. This is useful, for example, if
8583 you write a function that evaluates only and all the Lisp code in a
8584 Texinfo file. Then you can use the Texinfo file as a Lisp
8585 library.@footnote{It would be straightforward to extend Texinfo to work
8586 in a similar fashion for C, Fortran, or other languages.}
8587
8588 Mark the end of @code{@@lisp} with @code{@@end lisp} on a line by
8589 itself.
8590
8591
8592 @node @t{@@small@dots{}}
8593 @section @code{@@small@dots{}} Block Commands
8594
8595 @anchor{small}@c old name
8596 @findex smallexample
8597 @findex smallformat
8598 @findex smalllisp
8599 @findex smallquotation
8600 @cindex Small examples
8601 @cindex Examples in smaller fonts
8602 @cindex Quotations in smaller fonts
8603 @cindex Lisp examples in smaller fonts
8604
8605 In addition to the regular @code{@@example} and similar commands,
8606 Texinfo has ``small'' example-style commands. These are
8607 @code{@@smallquotation}, @code{@@smallindentedblock},
8608 @code{@@smalldisplay}, @code{@@smallexample}, @code{@@smallformat},
8609 and @code{@@smalllisp}.
8610
8611 In Info output, the @code{@@small@dots{}} commands are equivalent to
8612 their non-small companion commands.
8613
8614 In @TeX{}, however, the @code{@@small@dots{}} commands typeset text in
8615 a smaller font than the non-small example commands. Thus, for
8616 instance, code examples can contain longer lines and still fit on a
8617 page without needing to be rewritten.
8618
8619 A smaller font size is also requested in HTML output, and (as usual)
8620 retained in the Texinfo@tie{}XML transliteration.
8621
8622 Mark the end of an @code{@@small@dots{}} block with a corresponding
8623 @code{@@end small@dots{}}. For example, pair @code{@@smallexample} with
8624 @code{@@end smallexample}.
8625
8626 Here is an example of the font used by the @code{@@smallexample}
8627 command (in Info, the output will be the same as usual):
8628
8629 @smallexample
8630 @dots{} to make sure that you have the freedom to
8631 distribute copies of free software (and charge for
8632 this service if you wish), that you receive source
8633 code or can get it if you want it, that you can
8634 change the software or use pieces of it in new free
8635 programs; and that you know you can do these things.
8636 @end smallexample
8637
8638 The @code{@@small@dots{}} commands use the same font style as their
8639 normal counterparts: @code{@@smallexample} and @code{@@smalllisp} use
8640 a fixed-width font, and everything else uses the regular font.
8641 They also have the same behavior in other respects---whether filling
8642 is done and whether margins are narrowed.
8643
8644 As a general rule, a printed document looks better if you use only one
8645 of (for instance) @code{@@example} or @code{@@smallexample}
8646 consistently within a chapter.
8647
8648
8649 @node @t{@@display}
8650 @section @code{@@display}: Examples Using the Text Font
8651
8652 @anchor{display}@c old name
8653 @findex display
8654 @cindex Display formatting
8655
8656 The @code{@@display} command begins another kind of environment, where
8657 the font is left unchanged, not switched to typewriter as with
8658 @code{@@example}. Each line of input still produces a line of output,
8659 and the output is still indented.
8660
8661 @display
8662 This is an example of text written between an @code{@@display} command
8663 and an @code{@@end display} command. The @code{@@display} command
8664 indents the text, but does not fill it.
8665 @end display
8666
8667 @findex smalldisplay
8668 Texinfo also provides the environment @code{@@smalldisplay}, which is
8669 like @code{@@display} but uses a smaller font size.
8670 @xref{@t{@@small@dots{}}}.
8671
8672 The @code{@@table} command (@pxref{@t{@@table}}) is not supported
8673 inside @code{@@display}. Since @code{@@display} is line-oriented, it
8674 doesn't make sense to use them together. If you want to indent a
8675 table, try @code{@@quotation} (@pxref{@t{@@quotation}}) or
8676 @code{@@indentedblock} (@pxref{@t{@@indentedblock}}).
8677
8678
8679 @node @t{@@format}
8680 @section @code{@@format}: Examples Using the Full Line Width
8681
8682 @anchor{format}@c old name
8683 @findex format
8684
8685 The @code{@@format} command is similar to @code{@@display}, except it
8686 leaves the text unindented. Like @code{@@display}, it does not select
8687 the fixed-width font.
8688
8689 @format
8690 This is an example of text written between an @code{@@format} command
8691 and an @code{@@end format} command. As you can see
8692 from this example,
8693 the @code{@@format} command does not fill the text.
8694 @end format
8695
8696 @findex smallformat
8697 Texinfo also provides the environment @code{@@smallformat}, which is
8698 like @code{@@format} but uses a smaller font size.
8699 @xref{@t{@@small@dots{}}}.
8700
8701
8702 @node @t{@@exdent}
8703 @section @code{@@exdent}: Undoing a Line's Indentation
8704
8705 @anchor{exdent}@c old name
8706 @findex exdent
8707 @cindex Indentation undoing
8708
8709 The @code{@@exdent} command removes any indentation a line might have.
8710 The command is written at the beginning of a line and applies only to
8711 the text that follows the command that is on the same line. Do not use
8712 braces around the text. In a printed manual, the text on an
8713 @code{@@exdent} line is printed in the roman font.
8714
8715 @code{@@exdent} is usually used within examples. Thus,
8716
8717 @example
8718 @group
8719 @@example
8720 This line follows an @@@@example command.
8721 @@exdent This line is exdented.
8722 This line follows the exdented line.
8723 The @@@@end example comes on the next line.
8724 @@end example
8725 @end group
8726 @end example
8727
8728 @noindent
8729 produces
8730
8731 @example
8732 @group
8733 This line follows an @@example command.
8734 @exdent This line is exdented.
8735 This line follows the exdented line.
8736 The @@end example comes on the next line.
8737 @end group
8738 @end example
8739
8740 In practice, the @code{@@exdent} command is rarely used. Usually, you
8741 un-indent text by ending the example and returning the page to its
8742 normal width.
8743
8744 @code{@@exdent} has no effect in HTML output.
8745
8746
8747 @node @t{@@flushleft @@flushright}
8748 @section @code{@@flushleft} and @code{@@flushright}
8749
8750 @anchor{flushleft & flushright}@c old name
8751 @findex flushleft
8752 @findex flushright
8753 @cindex Ragged right, without filling
8754 @cindex Ragged left, without filling
8755
8756 The @code{@@flushleft} and @code{@@flushright} commands line up the
8757 ends of lines on the left and right margins of a page,
8758 but do not fill the text. The commands are written on lines of their
8759 own, without braces. The @code{@@flushleft} and @code{@@flushright}
8760 commands are ended by @code{@@end flushleft} and @code{@@end
8761 flushright} commands on lines of their own.
8762
8763 @need 1500
8764 For example,
8765
8766 @example
8767 @group
8768 @@flushleft
8769 This text is
8770 written flushleft.
8771 @@end flushleft
8772 @end group
8773 @end example
8774
8775 @noindent
8776 produces
8777
8778 @quotation
8779 @flushleft
8780 This text is
8781 written flushleft.
8782 @end flushleft
8783 @end quotation
8784
8785
8786 @code{@@flushright} produces the type of indentation often used in the
8787 return address of letters. For example,
8788
8789 @example
8790 @group
8791 @@flushright
8792 Here is an example of text written
8793 flushright. The @@code@{@@flushright@} command
8794 right justifies every line but leaves the
8795 left end ragged.
8796 @@end flushright
8797 @end group
8798 @end example
8799
8800 @noindent
8801 produces
8802
8803 @flushright
8804 Here is an example of text written
8805 flushright. The @code{@@flushright} command
8806 right justifies every line but leaves the
8807 left end ragged.
8808 @end flushright
8809
8810
8811 @node @t{@@raggedright}
8812 @section @code{@@raggedright}: Ragged Right Text
8813
8814 @anchor{raggedright}@c old name
8815 @findex raggedright
8816 @cindex Ragged right, with filling
8817
8818 The @code{@@raggedright} fills text as usual, but the text is only
8819 justified on the left; the right margin is ragged. The command is
8820 written on a line of its own, without braces. The
8821 @code{@@raggedright} command is ended by @code{@@end raggedright} on a
8822 line of its own. This command has no effect in Info and HTML output,
8823 where text is always set ragged right.
8824
8825 The @code{@@raggedright} command can be useful with paragraphs
8826 containing lists of commands with long names, when it is known in
8827 advance that justifying the text on both margins will make the
8828 paragraph look bad.
8829
8830 For example,
8831
8832 @example
8833 @group
8834 @@raggedright
8835 Commands for double and single angle quotation marks:
8836 @@code@{@@@@guillemetleft@@@{@@@}@}, @@code@{@@@@guillemetright@@@{@@@}@},
8837 @@code@{@@@@guillemotleft@@@{@@@}@}, @@code@{@@@@guillemotright@@@{@@@}@},
8838 @@code@{@@@@guilsinglleft@@@{@@@}@}, @@code@{@@@@guilsinglright@@@{@@@}@}.
8839 @@end raggedright
8840 @end group
8841 @end example
8842
8843 @noindent
8844 produces
8845
8846 @raggedright
8847 Commands for double and single angle quotation marks:
8848 @code{@@guillemetleft@{@}}, @code{@@guillemetright@{@}},
8849 @code{@@guillemotleft@{@}}, @code{@@guillemotright@{@}},
8850 @code{@@guilsinglleft@{@}}, @code{@@guilsinglright@{@}}.
8851 @end raggedright
8852
8853
8854 @node @t{@@noindent}
8855 @section @code{@@noindent}: Omitting Indentation
8856
8857 @anchor{noindent}@c old name
8858 @findex noindent
8859 @cindex Omitting indentation
8860 @cindex Suppressing indentation
8861 @cindex Indentation, omitting
8862
8863 An example or other inclusion can break a paragraph into segments.
8864 Ordinarily, the formatters indent text that follows an example as a new
8865 paragraph. You can prevent this on a case-by-case basis by writing
8866 @code{@@noindent} at the beginning of a line, preceding the continuation
8867 text. You can also disable indentation for all paragraphs globally with
8868 @code{@@paragraphindent} (@pxref{@t{@@paragraphindent}}).
8869
8870 It is best to write @code{@@noindent} on a line by itself, since in most
8871 environments, spaces following the command will not be ignored. It's ok
8872 to use it at the beginning of a line, with text following, outside of
8873 any environment.
8874
8875 @need 1500
8876 For example:
8877
8878 @example
8879 @group
8880 @@example
8881 This is an example
8882 @@end example
8883
8884 @@noindent
8885 This line is not indented. As you can see, the
8886 beginning of the line is fully flush left with the line
8887 that follows after it. (This whole example is between
8888 @@code@{@@@@display@} and @@code@{@@@@end display@}.)
8889 @end group
8890 @end example
8891
8892 @noindent produces:
8893
8894 @display
8895
8896 @example
8897 This is an example
8898 @end example
8899
8900 @noindent
8901 This line is not indented. As you can see, the
8902 beginning of the line is fully flush left with the line
8903 that follows after it. (This whole example is between
8904 @code{@@display} and @code{@@end display}.)
8905
8906 @end display
8907
8908 To adjust the number of blank lines properly in the Info file output,
8909 remember that the line containing @code{@@noindent} does not generate a
8910 blank line, and neither does the @code{@@end example} line.
8911
8912 In the Texinfo source file for this manual, each line that says
8913 `produces' is preceded by @code{@@noindent}.
8914
8915 Do not put braces after an @code{@@noindent} command; they are not
8916 necessary, since @code{@@noindent} is a command used outside of
8917 paragraphs (@pxref{Command Syntax}).
8918
8919
8920 @node @t{@@indent}
8921 @section @code{@@indent}: Forcing Indentation
8922
8923 @anchor{indent}@c old name
8924 @findex indent
8925 @cindex Forcing indentation
8926 @cindex Inserting indentation
8927 @cindex Indentation, forcing
8928
8929 @indent
8930 To complement the @code{@@noindent} command (see the previous
8931 section), Texinfo provides the @code{@@indent} command that forces a
8932 paragraph to be indented. This paragraph, for instance, is indented
8933 using an @code{@@indent} command. The first paragraph of a section is
8934 the most likely place to use @code{@@indent}, to override the normal
8935 behavior of no indentation there (@pxref{@t{@@paragraphindent}}).
8936
8937 It is best to write @code{@@indent} on a line by itself, since in most
8938 environments, spaces following the command will not be ignored. The
8939 @code{@@indent} line will not generate a blank line in the Info output
8940 within an environment.
8941
8942 However, it is ok to use it at the beginning of a line, with text
8943 following, outside of any environment.
8944
8945 Do not put braces after an @code{@@indent} command; they are not
8946 necessary, since @code{@@indent} is a command used outside of
8947 paragraphs (@pxref{Command Syntax}).
8948
8949
8950 @node @t{@@cartouche}
8951 @section @code{@@cartouche}: Rounded Rectangles
8952
8953 @anchor{cartouche}@c old name
8954 @findex cartouche
8955 @cindex Box with rounded corners
8956 @cindex Rounded rectangles, around text
8957
8958 In a printed manual, the @code{@@cartouche} command draws a box with
8959 rounded corners around its contents. In HTML, a normal rectangle is
8960 drawn. @code{@@cartouche} has no effect in Info output.
8961
8962 You can use this command to further highlight an example or quotation.
8963 For instance, you could write a manual in which one type of example is
8964 surrounded by a cartouche for emphasis.
8965
8966 For example,
8967
8968 @example
8969 @@cartouche
8970 @@example
8971 % pwd
8972 /usr/local/share/xemacs
8973 @@end example
8974 @@end cartouche
8975 @end example
8976
8977 @noindent
8978 surrounds the two-line example with a box with rounded corners, in the
8979 printed manual.
8980
8981 The output from the example looks like this (if you're reading this in
8982 Info, you'll see the @code{@@cartouche} had no effect):
8983
8984 @cartouche
8985 @example
8986 % pwd
8987 /usr/local/info
8988 @end example
8989 @end cartouche
8990
8991 @code{@@cartouche} also implies @code{@@group} (@pxref{@t{@@group}}).
8992
8993
8994 @node Lists and Tables
8995 @chapter Lists and Tables
8996 @cindex Making lists and tables
8997 @cindex Lists and tables, making
8998 @cindex Tables and lists, making
8999
9000 Texinfo has several ways of making lists and tables. Lists can be
9001 bulleted or numbered; two-column tables can highlight the items in
9002 the first column; multi-column tables are also supported.
9003
9004 @menu
9005 * Introducing Lists:: Texinfo formats lists for you.
9006 * @t{@@itemize}:: How to construct a simple list.
9007 * @t{@@enumerate}:: How to construct a numbered list.
9008 * Two-column Tables:: How to construct a two-column table.
9009 * Multi-column Tables:: How to construct generalized tables.
9010 @end menu
9011
9012 @node Introducing Lists
9013 @section Introducing Lists
9014
9015 Texinfo automatically indents the text in lists or tables, and numbers
9016 an enumerated list. This last feature is useful if you modify the
9017 list, since you do not need to renumber it yourself.
9018
9019 Numbered lists and tables begin with the appropriate @@-command at the
9020 beginning of a line, and end with the corresponding @code{@@end}
9021 command on a line by itself. The table and itemized-list commands
9022 also require that you write formatting information on the same line as
9023 the beginning @@-command.
9024
9025 Begin an enumerated list, for example, with an @code{@@enumerate}
9026 command and end the list with an @code{@@end enumerate} command.
9027 Begin an itemized list with an @code{@@itemize} command, followed on
9028 the same line by a formatting command such as @code{@@bullet}, and end
9029 the list with an @code{@@end itemize} command.
9030 @findex end
9031
9032 Precede each element of a list with an @code{@@item} or @code{@@itemx}
9033 command.
9034
9035 @sp 1
9036 @noindent
9037 Here is an itemized list of the different kinds of table and lists:
9038
9039 @itemize @bullet
9040 @item
9041 Itemized lists with and without bullets.
9042
9043 @item
9044 Enumerated lists, using numbers or letters.
9045
9046 @item
9047 Two-column tables with highlighting.
9048 @end itemize
9049
9050 @sp 1
9051 @noindent
9052 Here is an enumerated list with the same items:
9053
9054 @enumerate
9055 @item
9056 Itemized lists with and without bullets.
9057
9058 @item
9059 Enumerated lists, using numbers or letters.
9060
9061 @item
9062 Two-column tables with highlighting.
9063 @end enumerate
9064
9065 @sp 1
9066 @noindent
9067 And here is a two-column table with the same items and their
9068 @w{@@-commands}:
9069
9070 @table @code
9071 @item @@itemize
9072 Itemized lists with and without bullets.
9073
9074 @item @@enumerate
9075 Enumerated lists, using numbers or letters.
9076
9077 @item @@table
9078 @itemx @@ftable
9079 @itemx @@vtable
9080 Two-column tables, optionally with indexing.
9081 @end table
9082
9083
9084 @node @t{@@itemize}
9085 @section @code{@@itemize}: Making an Itemized List
9086
9087 @anchor{itemize}@c old name
9088 @findex itemize
9089 @cindex Itemization
9090
9091 The @code{@@itemize} command produces a sequence of ``items'', each
9092 starting with a bullet or other mark inside the left margin, and
9093 generally indented.
9094
9095 @cindex @code{@@w}, for blank items
9096 Begin an itemized list by writing @code{@@itemize} at the beginning of
9097 a line. Follow the command, on the same line, with a character or a
9098 Texinfo command that generates a mark. Usually, you will use
9099 @code{@@bullet} after @code{@@itemize}, but you can use
9100 @code{@@minus}, or any command or character that results in a single
9101 character in the Info file. (When you write the mark command such as
9102 @code{@@bullet} after an @code{@@itemize} command, you may omit the
9103 @samp{@{@}}.) If you don't specify a mark command, the default is
9104 @code{@@bullet}. If you don't want any mark at all, but still want
9105 logical items, use @code{@@w@{@}} (in this case the braces are
9106 required).
9107
9108 @findex item
9109 After the @code{@@itemize}, write your items, each starting with
9110 @code{@@item}. Text can follow on the same line as the @code{@@item}.
9111 The text of an item can continue for more than one paragraph.
9112
9113 There should be at least one @code{@@item} inside the @code{@@itemize}
9114 environment. If none are present, @code{makeinfo} gives a warning.
9115 If you just want indented text and not a list of items, use
9116 @code{@@indentedblock}; @pxref{@t{@@indentedblock}}.
9117
9118 Index entries and comments that are given before an @code{@@item}
9119 including the first, are automatically moved (internally) to after the
9120 @code{@@item}, so the output is as expected. Historically this has
9121 been a common practice.
9122
9123 Usually, you should put a blank line between items. This puts a blank
9124 line in the Info file. (@TeX{} inserts the proper vertical space in
9125 any case.) Except when the entries are very brief, these blank lines
9126 make the list look better.
9127
9128 Here is an example of the use of @code{@@itemize}, followed by the
9129 output it produces. @code{@@bullet} produces an @samp{*} in Info and
9130 a round dot in other output formats.
9131
9132 @example
9133 @group
9134 @@itemize @@bullet
9135 @@item
9136 Some text for foo.
9137
9138 @@item
9139 Some text
9140 for bar.
9141 @@end itemize
9142 @end group
9143 @end example
9144
9145 @noindent
9146 This produces:
9147
9148 @quotation
9149 @itemize @bullet
9150 @item
9151 Some text for foo.
9152
9153 @item
9154 Some text
9155 for bar.
9156 @end itemize
9157 @end quotation
9158
9159 Itemized lists may be embedded within other itemized lists. Here is a
9160 list marked with dashes embedded in a list marked with bullets:
9161
9162 @example
9163 @group
9164 @@itemize @@bullet
9165 @@item
9166 First item.
9167
9168 @@itemize @@minus
9169 @@item
9170 Inner item.
9171
9172 @@item
9173 Second inner item.
9174 @@end itemize
9175
9176 @@item
9177 Second outer item.
9178 @@end itemize
9179 @end group
9180 @end example
9181
9182 @noindent
9183 This produces:
9184
9185 @quotation
9186 @itemize @bullet
9187 @item
9188 First item.
9189
9190 @itemize @minus
9191 @item
9192 Inner item.
9193
9194 @item
9195 Second inner item.
9196 @end itemize
9197
9198 @item
9199 Second outer item.
9200 @end itemize
9201 @end quotation
9202
9203
9204 @node @t{@@enumerate}
9205 @section @code{@@enumerate}: Making a Numbered or Lettered List
9206
9207 @anchor{enumerate}@c old name
9208 @findex enumerate
9209 @cindex Enumeration
9210
9211 @code{@@enumerate} is like @code{@@itemize} (@pxref{@t{@@itemize}}),
9212 except that the labels on the items are successive integers or letters
9213 instead of bullets.
9214
9215 Write the @code{@@enumerate} command at the beginning of a line. The
9216 command does not require an argument, but accepts either a number or a
9217 letter as an option. Without an argument, @code{@@enumerate} starts the
9218 list with the number @samp{1}. With a numeric argument, such as
9219 @samp{3}, the command starts the list with that number. With an upper-
9220 or lowercase letter, such as @samp{a} or @samp{A}, the command starts
9221 the list with that letter.
9222
9223 Write the text of the enumerated list in the same way as an itemized
9224 list: write a line starting with @code{@@item} at the beginning of
9225 each item in the enumeration. It is ok to have text following the
9226 @code{@@item}, and the text for an item can continue for several
9227 paragraphs.
9228
9229 You should put a blank line between entries in the list.
9230 This generally makes it easier to read the Info file.
9231
9232 @need 1500
9233 Here is an example of @code{@@enumerate} without an argument:
9234
9235 @example
9236 @group
9237 @@enumerate
9238 @@item
9239 Underlying causes.
9240
9241 @@item
9242 Proximate causes.
9243 @@end enumerate
9244 @end group
9245 @end example
9246
9247 @noindent
9248 This produces:
9249
9250 @enumerate
9251 @item
9252 Underlying causes.
9253
9254 @item
9255 Proximate causes.
9256 @end enumerate
9257 @sp 1
9258 Here is an example with an argument of @kbd{3}:
9259 @sp 1
9260 @example
9261 @group
9262 @@enumerate 3
9263 @@item
9264 Predisposing causes.
9265
9266 @@item
9267 Precipitating causes.
9268
9269 @@item
9270 Perpetuating causes.
9271 @@end enumerate
9272 @end group
9273 @end example
9274
9275 @noindent
9276 This produces:
9277
9278 @enumerate 3
9279 @item
9280 Predisposing causes.
9281
9282 @item
9283 Precipitating causes.
9284
9285 @item
9286 Perpetuating causes.
9287 @end enumerate
9288 @sp 1
9289 Here is a brief summary of the alternatives. The summary is constructed
9290 using @code{@@enumerate} with an argument of @kbd{a}.
9291 @sp 1
9292 @enumerate a
9293 @item
9294 @code{@@enumerate}
9295
9296 Without an argument, produce a numbered list, starting with the
9297 number@tie{}1.
9298
9299 @item
9300 @code{@@enumerate @var{positive-integer}}
9301
9302 With a (positive) numeric argument, start a numbered list with that
9303 number. You can use this to continue a list that you interrupted with
9304 other text.
9305
9306 @item
9307 @code{@@enumerate @var{upper-case-letter}}
9308
9309 With an uppercase letter as argument, start a list
9310 in which each item is marked
9311 by a letter, beginning with that uppercase letter.
9312
9313 @item
9314 @code{@@enumerate @var{lower-case-letter}}
9315
9316 With a lowercase letter as argument, start a list
9317 in which each item is marked by
9318 a letter, beginning with that lowercase letter.
9319 @end enumerate
9320
9321 You can also nest enumerated lists, as in an outline.
9322
9323
9324 @node Two-column Tables
9325 @section Making a Two-column Table
9326
9327 @cindex Tables, making two-column
9328 @findex table
9329
9330 @code{@@table} is similar to @code{@@itemize}
9331 (@pxref{@t{@@itemize}}), but allows you to specify a name or
9332 heading line for each item. The @code{@@table} command is used to
9333 produce two-column tables, and is especially useful for glossaries,
9334 explanatory exhibits, and command-line option summaries.
9335
9336 @menu
9337 * @t{@@table}:: How to construct a two-column table.
9338 * @t{@@ftable @@vtable}:: Automatic indexing for two-column tables.
9339 * @t{@@itemx}:: How to put more entries in the first column.
9340 @end menu
9341
9342 @node @t{@@table}
9343 @subsection Using the @code{@@table} Command
9344
9345 @anchor{table}@c old name
9346
9347 @cindex Definition lists, typesetting
9348 Use the @code{@@table} command to produce two-column tables. It is
9349 typically used when you have a list of items and a brief text with
9350 each one, such as ``definition lists''.
9351
9352 Write the @code{@@table} command at the beginning of a line, after a
9353 blank line, and follow it on the same line with an argument that is a
9354 Texinfo ``indicating'' command such as @code{@@code}, @code{@@samp},
9355 @code{@@var}, @code{@@option}, or @code{@@kbd} (@pxref{Indicating}).
9356
9357 This command will be applied to the text that goes into the first
9358 column of each item and thus determines how it will be highlighted.
9359 For example, @code{@@table @@code} will cause the text in the first
9360 column to be output as if it had been the argument to an @code{@@code}
9361 command.
9362
9363 @anchor{@t{@@asis}}@c command name with @, for consistency
9364 @findex asis
9365 You may also use the @code{@@asis} command as an argument to
9366 @code{@@table}. @code{@@asis} is a command that does nothing; if you
9367 use this command after @code{@@table}, the first column entries are
9368 output without added highlighting (``as is'').
9369
9370 The @code{@@table} command works with other commands besides those
9371 explicitly mentioned here. However, you can only use predefined
9372 Texinfo commands that normally take an argument in braces. You cannot
9373 reliably use a new command defined with @code{@@macro}, but an
9374 @code{@@alias} (for a suitable predefined command) is acceptable.
9375 @xref{Defining New Texinfo Commands}.
9376
9377 @findex item
9378 Begin each table entry with an @code{@@item} command at the beginning
9379 of a line. Write the first column text on the same line as the
9380 @code{@@item} command. Write the second column text on the line
9381 following the @code{@@item} line and on subsequent lines. (You do not
9382 need to type anything for an empty second column entry.) You may
9383 write as many lines of supporting text as you wish, even several
9384 paragraphs. But only the text on the same line as the @code{@@item}
9385 will be placed in the first column (including any footnotes).
9386
9387 Normally, you should put a blank line before an @code{@@item} line
9388 (except the first one). This puts a blank line in the Info file.
9389 Except when the entries are very brief, a blank line looks better.
9390
9391 End the table with a line consisting of @code{@@end table}, followed
9392 by a blank line. @TeX{} will always start a new paragraph after the
9393 table, so the blank line is needed for the Info output to be analogous.
9394
9395 @need 1500
9396 The following table, for example, highlights the text in the first
9397 column with an @code{@@samp} command:
9398
9399 @example
9400 @group
9401 @@table @@samp
9402 @@item foo
9403 This is the text for
9404 @@samp@{foo@}.
9405
9406 @@item bar
9407 Text for @@samp@{bar@}.
9408 @@end table
9409 @end group
9410 @end example
9411
9412 @noindent
9413 This produces:
9414
9415 @table @samp
9416 @item foo
9417 This is the text for
9418 @samp{foo}.
9419 @item bar
9420 Text for @samp{bar}.
9421 @end table
9422
9423 If you want to list two or more named items with a single block of
9424 text, use the @code{@@itemx} command. (@xref{@t{@@itemx}}.)
9425
9426
9427 @node @t{@@ftable @@vtable}
9428 @subsection @code{@@ftable} and @code{@@vtable}
9429
9430 @anchor{ftable vtable}@c old name
9431 @findex ftable
9432 @findex vtable
9433 @cindex Tables with indexing
9434 @cindex Indexing table entries automatically
9435
9436 The @code{@@ftable} and @code{@@vtable} commands are the same as the
9437 @code{@@table} command except that @code{@@ftable} automatically enters
9438 each of the items in the first column of the table into the index of
9439 functions and @code{@@vtable} automatically enters each of the items in
9440 the first column of the table into the index of variables. This
9441 simplifies the task of creating indices. Only the items on the same
9442 line as the @code{@@item} commands are indexed, and they are indexed in
9443 exactly the form that they appear on that line. @xref{Indices},
9444 for more information about indices.
9445
9446 Begin a two-column table using @code{@@ftable} or @code{@@vtable} by
9447 writing the @@-command at the beginning of a line, followed on the same
9448 line by an argument that is a Texinfo command such as @code{@@code},
9449 exactly as you would for an @code{@@table} command; and end the table
9450 with an @code{@@end ftable} or @code{@@end vtable} command on a line by
9451 itself.
9452
9453 See the example for @code{@@table} in the previous section.
9454
9455
9456 @node @t{@@itemx}
9457 @subsection @code{@@itemx}: Second and Subsequent Items
9458
9459 @anchor{itemx}@c old name
9460 @cindex Two named items for @code{@@table}
9461 @findex itemx
9462
9463 Use the @code{@@itemx} command inside a table when you have two or more
9464 first column entries for the same item, each of which should appear on a
9465 line of its own.
9466
9467 Use @code{@@item} for the first entry, and @code{@@itemx} for all
9468 subsequent entries; @code{@@itemx} must always follow an @code{@@item}
9469 command, with no blank line intervening.
9470
9471 The @code{@@itemx} command works exactly like @code{@@item} except
9472 that it does not generate extra vertical space above the first column
9473 text. If you have multiple consecutive @code{@@itemx} commands, do
9474 not insert any blank lines between them.
9475
9476 For example,
9477
9478 @example
9479 @group
9480 @@table @@code
9481 @@item upcase
9482 @@itemx downcase
9483 These two functions accept a character or a string as
9484 argument, and return the corresponding uppercase (lowercase)
9485 character or string.
9486 @@end table
9487 @end group
9488 @end example
9489
9490 @noindent
9491 This produces:
9492
9493 @table @code
9494 @item upcase
9495 @itemx downcase
9496 These two functions accept a character or a string as
9497 argument, and return the corresponding uppercase (lowercase)
9498 character or string.
9499 @end table
9500
9501 @noindent
9502 (Note also that this example illustrates multi-line supporting text in
9503 a two-column table.)
9504
9505
9506 @node Multi-column Tables
9507 @section @code{@@multitable}: Multi-column Tables
9508
9509 @findex multitable
9510 @cindex Tables, making multi-column
9511
9512 @code{@@multitable} allows you to construct tables with any number of
9513 columns, with each column having any width you like.
9514
9515 You define the column widths on the @code{@@multitable} line itself, and
9516 write each row of the actual table following an @code{@@item} command,
9517 with columns separated by an @code{@@tab} command. Finally, @code{@@end
9518 multitable} completes the table. Details in the sections below.
9519
9520 @menu
9521 * Multitable Column Widths:: Defining multitable column widths.
9522 * Multitable Rows:: Defining multitable rows, with examples.
9523 @end menu
9524
9525 @node Multitable Column Widths
9526 @subsection Multitable Column Widths
9527 @cindex Multitable column widths
9528 @cindex Column widths, defining for multitables
9529 @cindex Widths, defining multitable column
9530
9531 You can define the column widths for a multitable in two ways: as
9532 fractions of the line length; or with a prototype row. Mixing the two
9533 methods is not supported. In either case, the widths are defined
9534 entirely on the same line as the @code{@@multitable} command.
9535
9536 @enumerate
9537 @item
9538 @findex columnfractions
9539 @cindex Line length, column widths as fraction of
9540 To specify column widths as fractions of the line length, write
9541 @code{@@columnfractions} and the decimal numbers (presumably less than
9542 1; a leading zero is allowed and ignored) after the
9543 @code{@@multitable} command, as in:
9544
9545 @example
9546 @@multitable @@columnfractions .33 .33 .33
9547 @end example
9548
9549 The fractions need not add up exactly to 1.0, as these do not. This
9550 allows you to produce tables that do not need the full line length.
9551
9552 @item
9553 @cindex Prototype row, column widths defined by
9554 To specify a prototype row, write the longest entry for each column
9555 enclosed in braces after the @code{@@multitable} command. For example:
9556
9557 @example
9558 @@multitable @{some text for column one@} @{for column two@}
9559 @end example
9560
9561 @noindent
9562 The first column will then have the width of the typeset `some text for
9563 column one', and the second column the width of `for column two'.
9564
9565 The prototype entries need not appear in the table itself.
9566
9567 Although we used simple text in this example, the prototype entries can
9568 contain Texinfo commands; markup commands such as @code{@@code} are
9569 particularly likely to be useful.
9570
9571 @end enumerate
9572
9573
9574 @node Multitable Rows
9575 @subsection Multitable Rows
9576
9577 @cindex Multitable rows
9578 @cindex Rows, of a multitable
9579
9580 @findex item
9581 @findex tab
9582 After the @code{@@multitable} command defining the column widths (see
9583 the previous section), you begin each row in the body of a multitable
9584 with @code{@@item}, and separate the column entries with @code{@@tab}.
9585 Line breaks are not special within the table body, and you may break
9586 input lines in your source file as necessary.
9587
9588 @findex headitem
9589 @cindex Heading row, in table
9590 @cindex @code{<thead>} HTML/XML tag
9591 You can also use @code{@@headitem} instead of @code{@@item} to produce
9592 a @dfn{heading row}. The @TeX{} output for such a row is in bold, and
9593 the HTML and Docbook output uses the @code{<thead>} tag. In Info, the
9594 heading row is followed by a separator line made of dashes (@samp{-}
9595 characters).
9596
9597 @findex headitemfont
9598 @cindex Font for multitable heading rows
9599 The command @code{@@headitemfont} can be used in templates when the
9600 entries in an @code{@@headitem} row need to be used in a template. It
9601 is a synonym for @code{@@b}, but using @code{@@headitemfont} avoids
9602 any dependency on that particular font style, in case we provide a way
9603 to change it in the future.
9604
9605 Here is a complete example of a multi-column table (the text is from
9606 @cite{XEmacs User's Manual}, @pxref{Split Window,, Splitting Windows,
9607 emacs, XEmacs User's Manual}):
9608
9609 @example
9610 @@multitable @@columnfractions .15 .45 .4
9611 @@headitem Key @@tab Command @@tab Description
9612 @@item C-x 2
9613 @@tab @@code@{split-window-vertically@}
9614 @@tab Split the selected window into two windows,
9615 with one above the other.
9616 @@item C-x 3
9617 @@tab @@code@{split-window-horizontally@}
9618 @@tab Split the selected window into two windows
9619 positioned side by side.
9620 @@item C-Mouse-2
9621 @@tab
9622 @@tab In the mode line or scroll bar of a window,
9623 split that window.
9624 @@end multitable
9625 @end example
9626
9627 @noindent produces:
9628
9629 @multitable @columnfractions .15 .45 .4
9630 @headitem Key @tab Command @tab Description
9631 @item C-x 2
9632 @tab @code{split-window-vertically}
9633 @tab Split the selected window into two windows,
9634 with one above the other.
9635 @item C-x 3
9636 @tab @code{split-window-horizontally}
9637 @tab Split the selected window into two windows
9638 positioned side by side.
9639 @item C-Mouse-2
9640 @tab
9641 @tab In the mode line or scroll bar of a window,
9642 split that window.
9643 @end multitable
9644
9645
9646 @node Special Displays
9647 @chapter Special Displays
9648 @cindex Special displays
9649
9650 The commands in this chapter allow you to write text that is specially
9651 displayed (output format permitting), outside of the normal document
9652 flow.
9653
9654 One set of such commands is for creating ``floats'', that is, figures,
9655 tables, and the like, set off from the main text, possibly numbered,
9656 captioned, and/or referred to from elsewhere in the document. Images
9657 are often included in these displays.
9658
9659 Another group of commands is for creating footnotes in Texinfo.
9660
9661 @menu
9662 * Floats:: Figures, tables, and the like.
9663 * Images:: Including graphics and images.
9664 * Footnotes:: Writing footnotes.
9665 @end menu
9666
9667
9668 @node Floats
9669 @section Floats
9670 @cindex Floats, in general
9671
9672 A @dfn{float} is a display which is set off from the main text. It is
9673 typically labeled as being a ``Figure'', ``Table'', ``Example'', or
9674 some similar type.
9675
9676 @cindex Floating, not yet implemented
9677 A float is so-named because, in principle, it can be moved to the
9678 bottom or top of the current page, or to a following page, in the
9679 printed output. (Floating does not make sense in other output
9680 formats.) In the present version of Texinfo, however, this floating
9681 is unfortunately not yet implemented. Instead, the floating material
9682 is simply output at the current location, more or less as if it were
9683 an @code{@@group} (@pxref{@t{@@group}}).
9684
9685 @menu
9686 * @t{@@float}:: Producing floating material.
9687 * @t{@@caption @@shortcaption}:: Specifying descriptions for floats.
9688 * @t{@@listoffloats}:: A table of contents for floats.
9689 @end menu
9690
9691
9692 @node @t{@@float}
9693 @subsection @code{@@float} [@var{type}][,@var{label}]: Floating Material
9694
9695 @anchor{float}@c old name
9696 @findex float
9697 @cindex Float environment
9698
9699 To produce floating material, enclose the material you want to be
9700 displayed separate between @code{@@float} and @code{@@end float}
9701 commands, on lines by themselves.
9702
9703 Floating material often uses @code{@@image} to display an
9704 already-existing graphic (@pxref{Images}), or @code{@@multitable} to
9705 display a table (@pxref{Multi-column Tables}). However, the contents
9706 of the float can be anything. Here's an example with simple text:
9707
9708 @example
9709 @@float Figure,fig:ex1
9710 This is an example float.
9711 @@end float
9712 @end example
9713
9714 @noindent And the output:
9715
9716 @float Figure,fig:ex1
9717 This is an example float.
9718 @end float
9719
9720 As shown in the example, @code{@@float} takes two arguments (separated
9721 by a comma), @var{type} and @var{label}. Both are optional.
9722
9723 @table @var
9724 @item type
9725 Specifies the sort of float this is; typically a word such as
9726 ``Figure'', ``Table'', etc. If this is not given, and @var{label} is,
9727 any cross referencing will simply use a bare number.
9728
9729 @item label
9730 Specifies a cross reference label for this float. If given, this
9731 float is automatically given a number, and will appear in any
9732 @code{@@listoffloats} output (@pxref{@t{@@listoffloats}}). Cross
9733 references to @var{label} are allowed.
9734
9735 @cindex Floats, making unnumbered
9736 @cindex Unnumbered float, creating
9737 On the other hand, if @var{label} is not given, then the float will
9738 not be numbered and consequently will not appear in the
9739 @code{@@listoffloats} output or be cross-referenceable.
9740 @end table
9741
9742 @noindent Ordinarily, you specify both @var{type} and @var{label}, to get a
9743 labeled and numbered float.
9744
9745 @cindex Floats, numbering of
9746 @cindex Numbering of floats
9747 In Texinfo, all floats are numbered in the same way: with the chapter
9748 number (or appendix letter), a period, and the float number, which
9749 simply counts 1, 2, 3, @dots{}, and is reset at each chapter. Each
9750 float type is counted independently.
9751
9752 Floats within an @code{@@unnumbered}, or outside of any chapter, are
9753 simply numbered consecutively from 1.
9754
9755 These numbering conventions are not, at present, changeable.
9756
9757
9758 @node @t{@@caption @@shortcaption}
9759 @subsection @code{@@caption} & @code{@@shortcaption}
9760
9761 @anchor{caption shortcaption}@c old name
9762 @findex caption
9763 @findex shortcaption
9764 @cindex Captions, for floats
9765 @cindex Short captions, for lists of floats
9766
9767 You may write an @code{@@caption} anywhere within an @code{@@float}
9768 environment, to define a caption for the float. It is not allowed in
9769 any other context. @code{@@caption} takes a single argument, enclosed
9770 in braces. Here's an example:
9771
9772 @example
9773 @@float
9774 An example float, with caption.
9775 @@caption@{Caption for example float.@}
9776 @@end float
9777 @end example
9778
9779 @noindent The output is:
9780
9781 @float
9782 An example float, with caption.
9783 @caption{Caption for example float.}
9784 @end float
9785
9786 @code{@@caption} can appear anywhere within the float; it is not
9787 processed until the @code{@@end float}. The caption text is usually a
9788 sentence or two, but may consist of several paragraphs if necessary.
9789
9790 In the output, the caption always appears below the float; this is not
9791 currently changeable. It is preceded by the float type and/or number,
9792 as specified to the @code{@@float} command (see the previous section).
9793
9794 The @code{@@shortcaption} command likewise may be used only within
9795 @code{@@float}, and takes a single argument in braces. The short
9796 caption text is used instead of the caption text in a list of floats
9797 (see the next section). Thus, you can write a long caption for the
9798 main document, and a short title to appear in the list of floats. For
9799 example:
9800
9801 @example
9802 @@float
9803 ... as above ...
9804 @@shortcaption@{Text for list of floats.@}
9805 @@end float
9806 @end example
9807
9808 The text for @code{@@shortcaption} may not contain comments
9809 (@code{@@c}), verbatim text (@code{@@verb}), environments such as
9810 @code{@@example}, footnotes (@code{@@footnote}) or other complex
9811 constructs. The same constraints apply to @code{@@caption} unless
9812 there is an @code{@@shortcaption}.
9813
9814
9815 @node @t{@@listoffloats}
9816 @subsection @code{@@listoffloats}: Tables of Contents for Floats
9817
9818 @anchor{listoffloats}@c old name
9819 @findex listoffloats
9820 @cindex List of floats
9821 @cindex Floats, list of
9822 @cindex Table of contents, for floats
9823
9824 You can write an @code{@@listoffloats} command to generate a list of
9825 floats for a given float type (@pxref{@t{@@float}}), analogous to
9826 the document's overall table of contents. Typically, it is written in
9827 its own @code{@@unnumbered} node to provide a heading and structure,
9828 rather like @code{@@printindex} (@pxref{Printing Indices & Menus}).
9829
9830 @code{@@listoffloats} takes one optional argument, the float type.
9831 Here's an example:
9832
9833 @example
9834 @@node List of Figures
9835 @@unnumbered List of Figures
9836 @@listoffloats Figure
9837 @end example
9838
9839 @noindent And the output from @code{@@listoffloats}:
9840
9841 @display
9842 @listoffloats Figure
9843 @end display
9844
9845 Without any argument, @code{@@listoffloats} generates a list of floats
9846 for which no float type was specified, i.e., no first argument to the
9847 @code{@@float} command (@pxref{@t{@@float}}).
9848
9849 Each line in the list of floats contains the float type (if any),
9850 the float number, and the caption, if any---the @code{@@shortcaption}
9851 argument, if it was specified, else the @code{@@caption} argument.
9852 In Info, the result is a menu where each float can be selected. In
9853 HTML, each line is a link to the float. In printed output, the page
9854 number is included.
9855
9856 Unnumbered floats (those without cross reference labels) are omitted
9857 from the list of floats.
9858
9859
9860 @node Images
9861 @section Inserting Images
9862
9863 @cindex Images, inserting
9864 @cindex Pictures, inserting
9865 @findex image
9866
9867 You can insert an image given in an external file with the
9868 @code{@@image} command. Although images can be used anywhere,
9869 including the middle of a paragraph, we describe them in this chapter
9870 since they are most often part of a displayed figure or example.
9871
9872 @menu
9873 * Image Syntax::
9874 * Image Scaling::
9875 @end menu
9876
9877
9878 @node Image Syntax
9879 @subsection Image Syntax
9880
9881 Here is the synopsis of the @code{@@image} command:
9882
9883 @example
9884 @@image@{@var{filename}@r{[,} @var{width}@r{[,} @var{height}@r{[,} @var{alttext}@r{[, }@var{extension}@r{]]]]}@}
9885 @end example
9886
9887 @cindex Formats for images
9888 @cindex Image formats
9889 The @var{filename} argument is mandatory, and must not have an
9890 extension, because the different processors support different formats:
9891
9892 @itemize @bullet
9893 @item
9894 @pindex eps image format
9895 @TeX{} (DVI output) reads the file @file{@var{filename}.eps}
9896 (Encapsulated PostScript format).
9897
9898 @item
9899 @pindex pdftex@r{, and images}
9900 @pindex png image format
9901 @pindex jpeg image format
9902 @pindex pdf image inclusions
9903 pdf@TeX{} reads @file{@var{filename}.pdf}, @file{@var{filename}.png},
9904 @file{@var{filename}.jpg}, or @file{@var{filename}.jpeg} (in that
9905 order). It also tries uppercase versions of the extensions. The PDF
9906 format does not support EPS images, so such must be converted first.
9907
9908 @item
9909 For Info, @code{makeinfo} includes @file{@var{filename}.txt} verbatim
9910 (more or less as if it were in @code{@@verbatim}). The Info output
9911 may also include a reference to @file{@var{filename}.png} or
9912 @file{@var{filename}.jpg}. (See below.)
9913
9914 @item
9915 For HTML, @code{makeinfo} outputs a reference to
9916 @file{@var{filename}.png}, @file{@var{filename}.jpg},
9917 @file{@var{filename}.jpeg} or @file{@var{filename}.gif} (in that
9918 order). If none of those exist, it gives an error, and outputs a
9919 reference to @file{@var{filename}.jpg} anyway.
9920
9921 @item
9922 @cindex SVG images, used in Docbook
9923 For Docbook, @code{makeinfo} outputs references to
9924 @file{@var{filename}.eps}, @file{@var{filename}.gif}
9925 @file{@var{filename}.jpeg}, @file{@var{filename}.jpg},
9926 @file{@var{filename}.pdf}, @file{@var{filename}.png} and
9927 @file{@var{filename}.svg}, for every file found. Also,
9928 @file{@var{filename}.txt} is included verbatim, if present. (The
9929 subsequent Docbook processor is supposed to choose the appropriate one.)
9930
9931 @item
9932 For Info and HTML output, @code{makeinfo} uses the optional fifth
9933 argument @var{extension} to @code{@@image} for the filename extension,
9934 if it is specified and the file is found. Any leading period should
9935 be included in @var{extension}. For example:
9936
9937 @pindex XPM image format
9938 @example
9939 @@image@{foo,,,,.xpm@}
9940 @end example
9941
9942 @end itemize
9943
9944 If you want to install image files for use by Info readers too, we
9945 recommend putting them in a subdirectory like @samp{@var{foo}-figures}
9946 for a package @var{foo}. Copying the files into
9947 @code{$(infodir)/@var{foo}-figures/} should be done in your
9948 @code{Makefile}.
9949
9950 The @var{width} and @var{height} arguments are described in the next
9951 section.
9952
9953 For @TeX{} output, if an image is the only thing in a paragraph it
9954 will ordinarily be displayed on a line by itself, respecting the
9955 current environment indentation, but without the normal paragraph
9956 indentation. If you want it centered, use @code{@@center}
9957 (@pxref{@t{@@titlefont @@center @@sp}}).
9958
9959 @cindex Alt attribute for images
9960 @cindex Images, alternate text for
9961 @findex - (in image alt string)
9962 For HTML output, @code{makeinfo} sets the @dfn{alt attribute} for
9963 inline images to the optional @var{alttext} (fourth) argument to
9964 @code{@@image}, if supplied. If not supplied, @code{makeinfo} uses
9965 the full file name of the image being displayed. The @var{alttext} is
9966 processed as Texinfo text, so special characters such as @samp{"} and
9967 @samp{<} and @samp{&} are escaped in the HTML output; also, you can
9968 get an empty @code{alt} string with @code{@@-} (a command that
9969 produces no output; @pxref{@t{@@- @@hyphenation}}).
9970
9971 For Info output, the @code{alt} string is also processed as Texinfo
9972 text and output. In this case, @samp{\} is escaped as @samp{\\} and
9973 @samp{"} as @samp{\"}; no other escapes are done.
9974
9975 In Info output, @code{makeinfo} writes a reference to the binary image
9976 file (trying @var{filename} suffixed with @file{@var{extension}},
9977 @file{@var{.extension}}, @file{.png}, or @file{.jpg}, in that order)
9978 if one exists. It also literally includes the @file{.txt} file if one
9979 exists. This way, Info readers which can display images (such as the
9980 XEmacs Info browser, running under X) can do so, whereas Info readers
9981 which can only use text (such as the standalone Info reader) can
9982 display the textual version.
9983
9984 @cindex @samp{^@@^H} for images in Info
9985 The implementation of this is to put the following construct into the
9986 Info output:
9987
9988 @example
9989 ^@@^H[image src="@var{binaryfile}" text="@var{txtfile}"
9990 alt="@var{alttext} ... ^@@^H]
9991 @end example
9992
9993 @noindent where @samp{^@@} and @samp{^H} stand for the actual null and
9994 backspace control characters. If one of the files is not present, the
9995 corresponding argument is omitted.
9996
9997 The reason for mentioning this here is that older Info browsers (this
9998 feature was introduced in Texinfo version 4.6) will display the above
9999 literally, which, although not pretty, should not be harmful.
10000
10001
10002 @node Image Scaling
10003 @subsection Image Scaling
10004
10005 @cindex Images, scaling
10006 @cindex Scaling images
10007 @cindex Width of images
10008 @cindex Height of images
10009 @cindex Aspect ratio of images
10010 @cindex Distorting images
10011 The optional @var{width} and @var{height} arguments to the
10012 @code{@@image} command (see the previous section) specify the size to
10013 which to scale the image. They are only taken into account in @TeX{}.
10014 If neither is specified, the image is presented in its natural size
10015 (given in the file); if only one is specified, the other is scaled
10016 proportionately; and if both are specified, both are respected, thus
10017 likely distorting the original image by changing its aspect ratio.
10018
10019 @cindex Dimensions and image sizes
10020 The @var{width} and @var{height} may be specified using any valid @TeX{}
10021 dimension, namely:
10022
10023 @table @asis
10024 @item pt
10025 @cindex Points (dimension)
10026 point (72.27pt = 1in)
10027 @item pc
10028 @cindex Picas
10029 pica (1pc = 12pt)
10030 @item bp
10031 @cindex Big points
10032 big point (72bp = 1in)
10033 @item in
10034 @cindex Inches
10035 inch
10036 @item cm
10037 @cindex Centimeters
10038 centimeter (2.54cm = 1in)
10039 @item mm
10040 @cindex Millimeters
10041 millimeter (10mm = 1cm)
10042 @item dd
10043 @cindex Did@^ot points
10044 did@^ot point (1157dd = 1238pt)
10045 @item cc
10046 @cindex Ciceros
10047 cicero (1cc = 12dd)
10048 @item sp
10049 @cindex Scaled points
10050 scaled point (65536sp = 1pt)
10051 @end table
10052
10053 @pindex ridt.eps
10054 For example, the following will scale a file @file{ridt.eps} to one
10055 inch vertically, with the width scaled proportionately:
10056
10057 @example
10058 @@image@{ridt,,1in@}
10059 @end example
10060
10061 @pindex epsf.tex
10062 For @code{@@image} to work with @TeX{}, the file @file{epsf.tex} must be
10063 installed somewhere that @TeX{} can find it. (The standard location is
10064 @file{@var{texmf}/tex/generic/dvips/epsf.tex}, where @var{texmf} is a
10065 root of your @TeX{} directory tree.) This file is included in the
10066 Texinfo distribution and is also available from
10067 @uref{ftp://tug.org/tex/epsf.tex}, among other places.
10068
10069 @code{@@image} can be used within a line as well as for displayed
10070 figures. Therefore, if you intend it to be displayed, be sure to leave
10071 a blank line before the command, or the output will run into the
10072 preceding text.
10073
10074 Image scaling is presently implemented only in @TeX{}, not in HTML or
10075 any other sort of output.
10076
10077
10078 @node Footnotes
10079 @section Footnotes
10080 @cindex Footnotes
10081 @findex footnote
10082
10083 A @dfn{footnote} is for a reference that documents or elucidates the
10084 primary text.@footnote{A footnote should complement or expand upon the
10085 primary text, but a reader should not need to read a footnote to
10086 understand the primary text. For a thorough discussion of footnotes,
10087 see @cite{The Chicago Manual of Style}, which is published by the
10088 University of Chicago Press.} Footnotes are distracting; use them
10089 sparingly at most, and it is best to avoid them completely. Standard
10090 bibliographical references are better placed in a bibliography at the
10091 end of a document instead of in footnotes throughout.
10092
10093 @menu
10094 * Footnote Commands:: How to write a footnote in Texinfo.
10095 * Footnote Styles:: Controlling how footnotes appear in Info.
10096 @end menu
10097
10098
10099 @node Footnote Commands
10100 @subsection Footnote Commands
10101
10102 In Texinfo, footnotes are created with the @code{@@footnote} command.
10103 This command is followed immediately by a left brace, then by the text
10104 of the footnote, and then by a terminating right brace. Footnotes may
10105 be of any length (they will be broken across pages if necessary), but
10106 are usually short. The template is:
10107
10108 @example
10109 ordinary text@@footnote@{@var{text of footnote}@}
10110 @end example
10111
10112 As shown here, the @code{@@footnote} command should come right after the
10113 text being footnoted, with no intervening space; otherwise, the footnote
10114 marker might end up starting a line.
10115
10116 For example, this clause is followed by a sample footnote@footnote{Here
10117 is the sample footnote.}; in the Texinfo source, it looks like
10118 this:
10119
10120 @example
10121 @dots{}a sample footnote@@footnote@{Here is the sample
10122 footnote.@}; in the Texinfo source@dots{}
10123 @end example
10124
10125 As you can see, the source includes two punctuation marks next to each
10126 other; in this case, @samp{.@};} is the sequence. This is normal (the
10127 first ends the footnote and the second belongs to the sentence being
10128 footnoted), so don't worry that it looks odd.
10129
10130 In a printed manual or book, the reference mark for a footnote is a
10131 small, superscripted number; the text of the footnote appears at the
10132 bottom of the page, below a horizontal line.
10133
10134 In Info, the reference mark for a footnote is a pair of parentheses
10135 with the footnote number between them, like this: @samp{(1)}. The
10136 reference mark is followed by a cross reference link to the footnote
10137 text if footnotes are put in separate nodes (@pxref{Footnote Styles}).
10138
10139 In the HTML output, footnote references are generally marked with a
10140 small, superscripted number which is rendered as a hypertext link to
10141 the footnote text.
10142
10143 By the way, footnotes in the argument of an @code{@@item} command for
10144 an @code{@@table} must be on the same line as the @code{@@item} (as
10145 usual). @xref{Two-column Tables}.
10146
10147
10148 @node Footnote Styles
10149 @subsection Footnote Styles
10150
10151 Info has two footnote styles, which determine where the text of the
10152 footnote is located:
10153
10154 @itemize @bullet
10155 @cindex @samp{@r{End}} node footnote style
10156 @item
10157 In the `End' node style, all the footnotes for a single node are
10158 placed at the end of that node. The footnotes are separated from the
10159 rest of the node by a line of dashes with the word @samp{Footnotes}
10160 within it. Each footnote begins with an @samp{(@var{n})} reference
10161 mark.
10162
10163 @need 700
10164 @noindent
10165 Here is an example of the Info output for a single footnote in the
10166 end-of-node style:
10167
10168 @example
10169 @group
10170 --------- Footnotes ---------
10171
10172 (1) Here is a sample footnote.
10173 @end group
10174 @end example
10175
10176 @cindex @samp{@r{Separate}} footnote style
10177 @item
10178 In the `Separate' node style, all the footnotes for a single
10179 node are placed in an automatically constructed node of
10180 their own. In this style, a ``footnote reference'' follows
10181 each @samp{(@var{n})} reference mark in the body of the
10182 node. The footnote reference is actually a cross reference
10183 which you use to reach the footnote node.
10184
10185 The name of the node with the footnotes is constructed
10186 by appending @w{@samp{-Footnotes}} to the name of the node
10187 that contains the footnotes. (Consequently, the footnotes'
10188 node for the @file{Footnotes} node is
10189 @w{@file{Footnotes-Footnotes}}!) The footnotes' node has an
10190 `Up' node pointer that leads back to its parent node.
10191
10192 @noindent
10193 Here is how the first footnote in this manual looks after being
10194 formatted for Info in the separate node style:
10195
10196 @smallexample
10197 @group
10198 File: texinfo.info Node: Overview-Footnotes, Up: Overview
10199
10200 (1) The first syllable of "Texinfo" is pronounced like "speck", not
10201 "hex". @dots{}
10202 @end group
10203 @end smallexample
10204 @end itemize
10205
10206 Unless your document has long and important footnotes (as in, say,
10207 Gibbon's @cite{Decline and Fall @dots{}}), we recommend the @samp{end}
10208 style, as it is simpler for readers to follow.
10209
10210 @findex footnotestyle
10211 Use the @code{@@footnotestyle} command to specify an Info file's
10212 footnote style. Write this command at the beginning of a line followed
10213 by an argument, either @samp{end} for the end node style or
10214 @samp{separate} for the separate node style.
10215
10216 @need 700
10217 For example,
10218
10219 @example
10220 @@footnotestyle end
10221 @end example
10222 @noindent
10223 or
10224 @example
10225 @@footnotestyle separate
10226 @end example
10227
10228 Write an @code{@@footnotestyle} command before or shortly after the
10229 end-of-header line at the beginning of a Texinfo file. (You should
10230 include any @code{@@footnotestyle} command between the start-of-header
10231 and end-of-header lines, so the region formatting commands will format
10232 footnotes as specified.)
10233
10234 In HTML, when the footnote style is @samp{end}, or if the output is
10235 not split, footnotes are put at the end of the output. If set to
10236 @samp{separate}, and the output is split, they are placed in a
10237 separate file.
10238
10239
10240 @node Indices
10241 @chapter Indices
10242 @cindex Indices
10243
10244 Using Texinfo, you can generate indices without having to sort and
10245 collate entries manually. In an index, the entries are listed in
10246 alphabetical order, together with information on how to find the
10247 discussion of each entry. In a printed manual, this information
10248 consists of page numbers. In an Info file, this information is a menu
10249 entry leading to the first node referenced.
10250
10251 Texinfo provides several predefined kinds of index: an index for
10252 functions, an index for variables, an index for concepts, and so on.
10253 You can combine indices or use them for other than their canonical
10254 purpose. Lastly, you can define your own new indices.
10255
10256 @xref{Printing Indices & Menus}, for information on how to print
10257 indices.
10258
10259 @menu
10260 * Index Entries:: Choose different words for index entries.
10261 * Predefined Indices:: Use different indices for different kinds
10262 of entries.
10263 * Indexing Commands:: How to make an index entry.
10264 * Combining Indices:: How to combine indices.
10265 * New Indices:: How to define your own indices.
10266 @end menu
10267
10268
10269 @node Index Entries
10270 @section Making Index Entries
10271 @cindex Index entries, making
10272 @cindex Entries, making index
10273
10274 When you are making index entries, it is good practice to think of the
10275 different ways people may look for something. Different people
10276 @emph{do not} think of the same words when they look something up. A
10277 helpful index will have items indexed under all the different words
10278 that people may use. For example, one reader may think it obvious
10279 that the two-letter names for indices should be listed under
10280 ``Indices, two-letter names, since ``Indices'' are the general
10281 concept. But another reader may remember the specific concept of
10282 two-letter names and search for the entry listed as ``Two letter names
10283 for indices''. A good index will have both entries and will help both
10284 readers.
10285
10286 Like typesetting, the construction of an index is a skilled art, the
10287 subtleties of which may not be appreciated until you need to do it
10288 yourself.
10289
10290 @xref{Printing Indices & Menus}, for information about printing an
10291 index at the end of a book or creating an index menu in an Info file.
10292
10293
10294 @node Predefined Indices
10295 @section Predefined Indices
10296
10297 Texinfo provides six predefined indices. Here are their nominal
10298 meanings, abbreviations, and the corresponding index entry commands:
10299
10300 @table @samp
10301 @item cp
10302 @cindex @code{cp} (concept) index
10303 @findex cindex
10304 (@code{@@cindex}) concept index, for general concepts.
10305 @item fn
10306 @cindex @code{fn} (function) index
10307 @findex findex
10308 (@code{@@findex}) function index, for function and function-like
10309 names (such as entry points of libraries).
10310 @item ky
10311 @cindex @code{ky} (keystroke) index
10312 @findex kindex
10313 (@code{@@kindex}) keystroke index, for keyboard commands.
10314 @item pg
10315 @cindex @code{pg} (program) index
10316 @findex pindex
10317 (@code{@@pindex}) program index, for names of programs.
10318 @item tp
10319 @cindex @code{tp} (data type) index
10320 @findex tindex
10321 (@code{@@tindex}) data type index, for type names (such as structures
10322 defined in header files).
10323 @item vr
10324 @cindex @code{vr} (variable) index
10325 @findex vindex
10326 (@code{@@vindex}) variable index, for variable names (such as global
10327 variables of libraries).
10328 @end table
10329
10330 @noindent
10331 Not every manual needs all of these, and most manuals use only two or
10332 three at most. The present manual, for example, has two indices: a
10333 concept index and an @@-command index (that is actually the function
10334 index but is called a command index in the chapter heading).
10335
10336 You are not required to use the predefined indices strictly for their
10337 canonical purposes. For example, suppose you wish to index some C
10338 preprocessor macros. You could put them in the function index along
10339 with actual functions, just by writing @code{@@findex} commands for
10340 them; then, when you print the ``Function Index'' as an unnumbered
10341 chapter, you could give it the title `Function and Macro Index' and
10342 all will be consistent for the reader.
10343
10344 On the other hand, it is best not to stray too far from the meaning of
10345 the predefined indices. Otherwise, in the event that your text is
10346 combined with other text from other manuals, the index entries will
10347 not match up. Instead, define your own new index (@pxref{New
10348 Indices}).
10349
10350 We recommend having a single index in the final document whenever
10351 possible, however many source indices you use, since then readers have
10352 only one place to look. Two or more source indices can be combined
10353 into one output index using the @code{@@synindex} or
10354 @code{@@syncodeindex} commands (@pxref{Combining Indices}).
10355
10356
10357 @node Indexing Commands
10358 @section Defining the Entries of an Index
10359
10360 @cindex Defining indexing entries
10361 @cindex Index entries
10362 @cindex Entries for an index
10363 @cindex Specifying index entries
10364 @cindex Creating index entries
10365
10366 The data to make an index come from many individual indexing commands
10367 scattered throughout the Texinfo source file. Each command says to add
10368 one entry to a particular index; after formatting, the index will give
10369 the current page number or node name as the reference.
10370
10371 An index entry consists of an indexing command at the beginning of a
10372 line followed, on the rest of the line, by the entry.
10373
10374 For example, this section begins with the following five entries for
10375 the concept index:
10376
10377 @example
10378 @@cindex Defining indexing entries
10379 @@cindex Index entries, defining
10380 @@cindex Entries for an index
10381 @@cindex Specifying index entries
10382 @@cindex Creating index entries
10383 @end example
10384
10385 Each predefined index has its own indexing command---@code{@@cindex}
10386 for the concept index, @code{@@findex} for the function index, and so
10387 on, as listed in the previous section.
10388
10389 @cindex Writing index entries
10390 @cindex Index entries, advice on writing
10391 @cindex Advice on writing entries
10392 @cindex Capitalization of index entries
10393 Concept index entries consist of text. The best way to write an index
10394 is to devise entries which are terse yet clear. If you can do this,
10395 the index usually looks better if the entries are written just as they
10396 would appear in the middle of a sentence, that is, capitalizing only
10397 proper names and acronyms that always call for uppercase letters.
10398 This is the case convention we use in most GNU manuals' indices.
10399
10400 If you don't see how to make an entry terse yet clear, make it longer
10401 and clear---not terse and confusing. If many of the entries are
10402 several words long, the index may look better if you use a different
10403 convention: to capitalize the first word of each entry. Whichever
10404 case convention you use, use it consistently.
10405
10406 In any event, do not ever capitalize a case-sensitive name such as a C
10407 or Lisp function name or a shell command; that would be a spelling
10408 error. Entries in indices other than the concept index are symbol
10409 names in programming languages, or program names; these names are
10410 usually case-sensitive, so likewise use upper- and lowercase as
10411 required.
10412
10413 @cindex Unique index entries
10414 It is a good idea to make index entries unique wherever feasible.
10415 That way, people using the printed output or online completion of
10416 index entries don't see undifferentiated lists. Consider this an
10417 opportunity to make otherwise-identical index entries be more
10418 specific, so readers can more easily find the exact place they are
10419 looking for.
10420
10421 Index entries should precede the visible material that is being
10422 indexed. For instance:
10423
10424 @example
10425 @@cindex hello
10426 Hello, there!
10427 @end example
10428
10429 @noindent Among other reasons, that way following indexing links (in
10430 whatever context) ends up before the material, where readers want to
10431 be, instead of after.
10432
10433 @cindex Index font types
10434 By default, entries for a concept index are printed in a small roman
10435 font and entries for the other indices are printed in a small
10436 @code{@@code} font. You may change the way part of an entry is
10437 printed with the usual Texinfo commands, such as @code{@@file} for
10438 file names (@pxref{Marking Text}), and @code{@@r} for the normal roman
10439 font (@pxref{Fonts}).
10440
10441 @quotation Caution
10442 Do not use a colon in an index entry. In Info, a colon separates the
10443 menu entry name from the node name, so a colon in the entry itself
10444 confuses Info. @xref{Menu Parts}, for more information about the
10445 structure of a menu entry.
10446 @end quotation
10447
10448
10449 @node Combining Indices
10450 @section Combining Indices
10451 @cindex Combining indices
10452 @cindex Indices, combining them
10453
10454 Sometimes you will want to combine two disparate indices such as
10455 functions and concepts, perhaps because you have few enough entries
10456 that a separate index would look silly.
10457
10458 You could put functions into the concept index by writing
10459 @code{@@cindex} commands for them instead of @code{@@findex} commands,
10460 and produce a consistent manual by printing the concept index with the
10461 title `Function and Concept Index' and not printing the `Function
10462 Index' at all; but this is not a robust procedure. It works only if
10463 your document is never included as part of another document that is
10464 designed to have a separate function index; if your document were to
10465 be included with such a document, the functions from your document and
10466 those from the other would not end up together. Also, to make your
10467 function names appear in the right font in the concept index, you
10468 would need to enclose every one of them between the braces of
10469 @code{@@code}.
10470
10471 @menu
10472 * @t{@@syncodeindex}:: How to merge two indices, using @code{@@code}
10473 font for the merged-from index.
10474 * @t{@@synindex}:: How to merge two indices, using the
10475 roman font for the merged-from index.
10476 @end menu
10477
10478
10479 @node @t{@@syncodeindex}
10480 @subsection @code{@@syncodeindex}: Combining indices using @code{@@code}
10481
10482 @anchor{syncodeindex}@c old name
10483 @findex syncodeindex
10484
10485 When you want to combine functions and concepts into one index, you
10486 should index the functions with @code{@@findex} and index the concepts
10487 with @code{@@cindex}, and use the @code{@@syncodeindex} command to
10488 redirect the function index entries into the concept index.
10489
10490 The @code{@@syncodeindex} command takes two arguments; they are the name
10491 of the index to redirect, and the name of the index to redirect it to.
10492 The template looks like this:
10493
10494 @example
10495 @@syncodeindex @var{from} @var{to}
10496 @end example
10497
10498 @cindex Predefined names for indices
10499 @cindex Two letter names for indices
10500 @cindex Indices, two letter names
10501 @cindex Names for indices
10502 For this purpose, the indices are given two-letter names:
10503
10504 @table @samp
10505 @item cp
10506 concept index
10507 @item fn
10508 function index
10509 @item vr
10510 variable index
10511 @item ky
10512 key index
10513 @item pg
10514 program index
10515 @item tp
10516 data type index
10517 @end table
10518
10519 Write an @code{@@syncodeindex} command before or shortly after the
10520 end-of-header line at the beginning of a Texinfo file. For example,
10521 to merge a function index with a concept index, write the
10522 following:
10523
10524 @example
10525 @@syncodeindex fn cp
10526 @end example
10527
10528 @noindent
10529 This will cause all entries designated for the function index to merge
10530 in with the concept index instead.
10531
10532 To merge both a variables index and a function index into a concept
10533 index, write the following:
10534
10535 @example
10536 @group
10537 @@syncodeindex vr cp
10538 @@syncodeindex fn cp
10539 @end group
10540 @end example
10541
10542 @cindex Fonts for indices
10543 The @code{@@syncodeindex} command puts all the entries from the `from'
10544 index (the redirected index) into the @code{@@code} font, overriding
10545 whatever default font is used by the index to which the entries are
10546 now directed. This way, if you direct function names from a function
10547 index into a concept index, all the function names are printed in the
10548 @code{@@code} font as you would expect.
10549
10550
10551 @node @t{@@synindex}
10552 @subsection @code{@@synindex}: Combining indices
10553
10554 @anchor{synindex}@c old name
10555 @findex synindex
10556
10557 The @code{@@synindex} command is nearly the same as the
10558 @code{@@syncodeindex} command, except that it does not put the `from'
10559 index entries into the @code{@@code} font; rather it puts them in the
10560 roman font. Thus, you use @code{@@synindex} when you merge a concept
10561 index into a function index.
10562
10563 @xref{Printing Indices & Menus}, for information about printing an index
10564 at the end of a book or creating an index menu in an Info file.
10565
10566
10567 @node New Indices
10568 @section Defining New Indices
10569
10570 @cindex Defining new indices
10571 @cindex Indices, defining new
10572 @cindex New index defining
10573 @findex defindex
10574 @findex defcodeindex
10575
10576 In addition to the predefined indices (@pxref{Predefined Indices}),
10577 you may use the @code{@@defindex} and @code{@@defcodeindex} commands
10578 to define new indices. These commands create new indexing @@-commands
10579 with which you mark index entries. The @code{@@defindex} command is
10580 used like this:
10581
10582 @example
10583 @@defindex @var{name}
10584 @end example
10585
10586 New index names are usually two-letter words, such as @samp{au}.
10587 For example:
10588
10589 @example
10590 @@defindex au
10591 @end example
10592
10593 This defines a new index, called the @samp{au} index. At the same
10594 time, it creates a new indexing command, @code{@@auindex}, that you
10595 can use to make index entries. Use this new indexing command just as
10596 you would use a predefined indexing command.
10597
10598 For example, here is a section heading followed by a concept index
10599 entry and two @samp{au} index entries.
10600
10601 @example
10602 @@section Cognitive Semantics
10603 @@cindex kinesthetic image schemas
10604 @@auindex Johnson, Mark
10605 @@auindex Lakoff, George
10606 @end example
10607
10608 @noindent
10609 (Evidently, @samp{au} serves here as an abbreviation for ``author''.)
10610
10611 Texinfo constructs the new indexing command by concatenating the name
10612 of the index with @samp{index}; thus, defining an @samp{xy} index
10613 leads to the automatic creation of an @code{@@xyindex} command.
10614
10615 Use the @code{@@printindex} command to print the index, as you do with
10616 the predefined indices. For example:
10617
10618 @example
10619 @group
10620 @@node Author Index
10621 @@unnumbered Author Index
10622
10623 @@printindex au
10624 @end group
10625 @end example
10626
10627 The @code{@@defcodeindex} is like the @code{@@defindex} command,
10628 except that, in the printed output, it prints entries in an
10629 @code{@@code} font by default instead of a roman font.
10630
10631 You should define new indices before the end-of-header line of a
10632 Texinfo file, and (of course) before any @code{@@synindex} or
10633 @code{@@syncodeindex} commands (@pxref{Texinfo File Header}).
10634
10635 As mentioned earlier (@pxref{Predefined Indices}), we recommend having
10636 a single index in the final document whenever possible, however many
10637 source indices you use, since then readers have only one place to
10638 look.
10639
10640 When creating an index, @TeX{} creates a file whose extension is the
10641 name of the index (@pxref{Names of index files}). Therefore you
10642 should avoid using index names that collide with extensions used for
10643 other purposes, such as @samp{.aux} or @samp{.xml}.
10644 @command{makeinfo} already reports an error if a new index conflicts
10645 well-known extension name.
10646
10647
10648 @node Insertions
10649 @chapter Special Insertions
10650 @cindex Inserting special characters and symbols
10651 @cindex Special insertions
10652
10653 Texinfo provides several commands for inserting characters that have
10654 special meaning in Texinfo, such as braces, and for other graphic
10655 elements that do not correspond to simple characters you can type.
10656
10657 @iftex
10658 These are:
10659
10660 @itemize @bullet
10661 @item The Texinfo special characters: @samp{@@ @{@} , \ #}.
10662 @item Whitespace within and around a sentence.
10663 @item Accents.
10664 @item Dots and bullets.
10665 @item The @TeX{} logo and the copyright symbol.
10666 @item The euro and pounds currency symbols.
10667 @item The degrees symbol.
10668 @item The minus sign.
10669 @item Mathematical expressions.
10670 @item Glyphs for examples of programming: evaluation, macros, errors, etc.
10671 @item Footnotes.
10672 @end itemize
10673 @end iftex
10674
10675 @menu
10676 * Special Characters:: Inserting @@ @{@} , \ #
10677 * Inserting Quote Characters:: Inserting left and right quotes, in code.
10678 * Inserting Space:: Inserting the right amount of whitespace.
10679 * Inserting Accents:: Inserting accents and special characters.
10680 * Inserting Quotation Marks:: Inserting quotation marks.
10681 * Inserting Math:: Formatting mathematical expressions.
10682 * Glyphs for Text:: Inserting Dots, bullets, currencies, etc.
10683 * Glyphs for Programming:: Indicating results of evaluation,
10684 expansion of macros, errors, etc.
10685 @end menu
10686
10687
10688 @node Special Characters
10689 @section Special Characters: Inserting @@ @{@} , \ #
10690 @anchor{Braces Atsign}@c previous names for this node
10691 @anchor{Atsign Braces Comma}
10692 @cindex Special characters, inserting
10693 @cindex Commands to insert special characters
10694
10695 @samp{@@} and curly braces are the basic special characters in
10696 Texinfo. To insert these characters so they appear in text, you must
10697 put an @samp{@@} in front of these characters to prevent Texinfo from
10698 misinterpreting them. Alphabetic commands are also provided.
10699
10700 The other characters (comma, backslash, hash) are special only in
10701 restricted contexts, as explained in the respective sections.
10702
10703 @menu
10704 * Inserting an Atsign:: @code{@@@@}, @code{@@atchar@{@}}.
10705 * Inserting Braces:: @code{@@@{ @@@}}, @code{@@l rbracechar@{@}}.
10706 * Inserting a Comma:: , and @code{@@comma@{@}}.
10707 * Inserting a Backslash:: \ and @code{@@backslashchar@{@}}.
10708 * Inserting a Hashsign:: # and @code{@@hashchar@{@}}.
10709 @end menu
10710
10711
10712 @node Inserting an Atsign
10713 @subsection Inserting `@@' with @code{@@@@} and @code{@@atchar@{@}}
10714 @cindex At sign, inserting
10715 @cindex Inserting @@ @r{(literal @samp{@@})}
10716 @findex @@ @r{(literal @samp{@@})}
10717 @findex @@atchar@{@} @r{(literal @samp{@@})}
10718
10719 @code{@@@@} produces a single @samp{@@} character in the output. Do
10720 not put braces after an @code{@@@@} command.
10721
10722 @code{@@atchar@{@}} also produces a single @samp{@@} character in the
10723 output. It does need following braces, as usual for alphabetic
10724 commands. In inline conditionals (@pxref{Inline Conditionals}), it
10725 can be necessary to avoid using the literal @samp{@@} character in the
10726 source (and may be clearer in other contexts).
10727
10728
10729 @node Inserting Braces
10730 @subsection Inserting `@{ `@}' with @code{@@@{ @@@}} and @code{@@l rbracechar@{@}}
10731
10732 @findex @{ @r{(literal @samp{@{})}
10733 @findex @} @r{(literal @samp{@}})}
10734 @findex @@lbracechar@{@} @r{(literal @samp{@{})}
10735 @findex @@rbracechar@{@} @r{(literal @samp{@}})}
10736 @cindex Braces, inserting
10737
10738 @code{@@@{} produces a single @samp{@{} in the output, and @code{@@@}}
10739 produces a single @samp{@}}. Do not put braces after either an
10740 @code{@@@{} or an @code{@@@}} command.
10741
10742 @code{@@lbracechar@{@}} and @code{@@rbracechar@{@}} also produce
10743 single @samp{@{} and @samp{@}} characters in the output. They do need
10744 following braces, as usual for alphabetic commands. In inline
10745 conditionals (@pxref{Inline Conditionals}), it can be
10746 necessary to avoid using literal brace characters in the source (and
10747 may be clearer in other contexts).
10748
10749
10750 @node Inserting a Comma
10751 @subsection Inserting `,' with @code{@@comma@{@}}
10752
10753 @findex comma
10754 @cindex Comma, inserting
10755
10756 Ordinarily, a comma `,' is a normal character that can be simply typed
10757 in your input where you need it.
10758
10759 However, Texinfo uses the comma as a special character only in one
10760 context: to separate arguments to those Texinfo commands, such as
10761 @code{@@acronym} (@pxref{@t{@@acronym}}) and @code{@@xref}
10762 (@pxref{Cross References}), as well as user-defined macros
10763 (@pxref{Defining Macros}), which take more than one argument.
10764
10765 Since a comma character would confuse Texinfo's parsing for these
10766 commands, you must use the command @samp{@@comma@{@}} instead if you want
10767 to pass an actual comma. Here are some examples:
10768
10769 @example
10770 @@acronym@{ABC, A Bizarre @@comma@{@}@}
10771 @@xref@{Comma,, The @@comma@{@} symbol@}
10772 @@mymac@{One argument@@comma@{@} containing a comma@}
10773 @end example
10774
10775 Although @samp{@@comma@{@}} can be used nearly anywhere, there is no
10776 need for it anywhere except in this unusual case.
10777
10778 (Incidentally, the name @samp{@@comma} lacks the @samp{char} suffix used
10779 in its companion commands only for historical reasons. It didn't seem
10780 important enough to define a synonym.)
10781
10782
10783 @node Inserting a Backslash
10784 @subsection Inserting `\' with @code{@@backslashchar@{@}}
10785
10786 @findex backslash
10787 @cindex Backslash, inserting
10788
10789 Ordinarily, a backslash `\' is a normal character in Texinfo that can
10790 be simply typed in your input where you need it. The result is to
10791 typeset the backslash from the typewriter font.
10792
10793 However, Texinfo uses the backslash as a special character in one
10794 restricted context: to delimit formal arguments in the bodies of
10795 user-defined macros (@pxref{Defining Macros}).
10796
10797 Due to the vagaries of macro argument parsing, it is more reliable to
10798 pass an alphabetic command that produces a backslash instead of using
10799 a literal \. Hence @code{@@backslashchar@{@}}. Here is an example
10800 macro call:
10801
10802 @example
10803 @@mymac@{One argument@@backslashchar@{@} with a backslash@}
10804 @end example
10805
10806 Texinfo documents may also use \ as a command character inside
10807 @code{@@math} (@pxref{Inserting Math}). In this case, @code{@@\} or
10808 @code{\backslash} produces a ``math'' backslash (from the math symbol
10809 font), while @code{@@backslashchar@{@}} produces a typewriter
10810 backslash as usual.
10811
10812 Although @samp{@@backslashchar@{@}} can be used nearly anywhere, there
10813 is no need for it except in these unusual cases.
10814
10815
10816 @node Inserting a Hashsign
10817 @subsection Inserting `#' with @code{@@hashchar@{@}}
10818
10819 @findex @@hashchar@{@} @r{(literal @samp{#})}
10820 @cindex Inserting #
10821 @cindex Hash sign, inserting
10822
10823 Ordinarily, a hash `#' is a normal character in Texinfo that can be
10824 simply typed in your input where you need it. The result is to
10825 typeset the hash character from the current font.
10826
10827 @cindex Number sign, inserting
10828 @cindex Octotherp, inserting
10829 @cindex Sharp sign (not), inserting
10830 This character has many other names, varying by locale, such as
10831 ``number sign'', ``pound'', and ``octothorp''. It is also sometimes
10832 called ``sharp'' or ``sharp sign'' since it vaguely resembles the
10833 musical symbol by that name. In situations where Texinfo is used,
10834 ``hash'' is the most common in our experience.
10835
10836 However, Texinfo uses the hash character as a special character in one
10837 restricted context: to introduce the so-called @code{#line} directive
10838 and variants (@pxref{External Macro Processors}).
10839
10840 So, in order to typeset an actual hash character in such a place (for
10841 example, in a program that needs documentation about @code{#line}),
10842 it's necessary to use @code{@@hashchar@{@}} or some other construct.
10843 Here's an example:
10844
10845 @example
10846 @@hashchar@{@} 10 "example.c"
10847 @end example
10848
10849 Although @samp{@@hashchar@{@}} can be used nearly anywhere, there
10850 is no need for it anywhere except this unusual case.
10851
10852
10853 @node Inserting Quote Characters
10854 @section Inserting Quote Characters
10855
10856 @cindex Inserting quote characters
10857 @cindex Quote characters, inserting
10858
10859 As explained in the early section on general Texinfo input conventions
10860 (@pxref{Conventions}), Texinfo source files use the ASCII character
10861 @code{`} (96 decimal) to produce a left quote (`), and ASCII @code{'}
10862 (39 decimal) to produce a right quote ('). Doubling these input
10863 characters (@code{``} and @code{''}) produces double quotes (`` and
10864 ''). These are the conventions used by @TeX{}.
10865
10866 This works all right for text. However, in examples of computer code,
10867 readers are especially likely to cut and paste the text
10868 verbatim---and, unfortunately, some document viewers will mangle these
10869 characters. (The free PDF reader @command{xpdf} works fine, but other
10870 PDF readers, both free and nonfree, have problems.)
10871
10872 If this is a concern for you, Texinfo provides these two commands:
10873
10874 @ftable @code
10875 @item @@codequoteundirected @var{on-off}
10876 @cindex undirected single quote
10877 causes the output for the @code{'} character in code environments to
10878 be the undirected single quote, like this:
10879 @set txicodequoteundirected on
10880 @code{'}.
10881 @set txicodequoteundirected off
10882
10883 @item @@codequotebacktick @var{on-off}
10884 @cindex backtick
10885 @cindex grave accent, standalone
10886 causes the output for the @code{`} character in code environments to
10887 be the backtick character (standalone grave accent), like this:
10888 @set txicodequotebacktick on
10889 @code{`}.
10890 @set txicodequotebacktick off
10891 @end ftable
10892
10893 If you want these settings for only part of the document,
10894 @code{@@codequote... off} will restore the normal behavior, as in
10895 @code{@@codequoteundirected off}.
10896
10897 These settings affect @code{@@code}, @code{@@example}, @code{@@kbd},
10898 @code{@@samp}, @code{@@verb}, and @code{@@verbatim}. @xref{Useful
10899 Highlighting}.
10900
10901 This feature used to be controlled by @code{@@set} variable names;
10902 they are still supported, but the command interface is preferred.
10903
10904
10905 @node Inserting Space
10906 @section Inserting Space
10907
10908 @cindex Inserting space
10909 @cindex Spacing, inserting
10910 The following sections describe commands that control spacing of various
10911 kinds within and after sentences.
10912
10913 @menu
10914 * Multiple Spaces:: Inserting multiple spaces.
10915 * Not Ending a Sentence:: Sometimes a . doesn't end a sentence.
10916 * Ending a Sentence:: Sometimes it does.
10917 * @t{@@frenchspacing}:: Specifying end-of-sentence spacing.
10918 * @t{@@dmn}:: Formatting a dimension.
10919 @end menu
10920
10921
10922 @node Multiple Spaces
10923 @subsection Multiple Spaces
10924
10925 @cindex Multiple spaces
10926 @cindex Whitespace, inserting
10927 @cindex Space, inserting horizontal
10928 @findex <space>
10929 @findex <tab>
10930 @findex <newline>
10931
10932 Ordinarily, multiple whitespace characters (space, tab, and newline)
10933 are collapsed into a single space.
10934
10935 Occasionally, you may want to produce several consecutive spaces,
10936 either for purposes of example (e.g., what your program does with
10937 multiple spaces as input), or merely for purposes of appearance in
10938 headings or lists. Texinfo supports three commands:
10939 @code{@@@kbd{SPACE}}, @code{@@@kbd{TAB}}, and @code{@@@kbd{NL}}, all
10940 of which insert a single space into the output. (Here,
10941 @code{@@@kbd{SPACE}} represents an @samp{@@} character followed by a
10942 space, i.e., @samp{@@ }, @kbd{TAB} represents an actual tab character,
10943 and @kbd{NL} represent the tab character and end-of-line, i.e., when
10944 @samp{@@} is the last character on a line.)
10945
10946 For example,
10947 @example
10948 Spacey@@ @@ @@ @@
10949 example.
10950 @end example
10951
10952 @noindent produces
10953
10954 @example
10955 Spacey@ @ @ @
10956 example.
10957 @end example
10958
10959 Other possible uses of @code{@@@kbd{SPACE}} have been subsumed by
10960 @code{@@multitable} (@pxref{Multi-column Tables}).
10961
10962 Do not follow any of these commands with braces.
10963
10964 To produce a non-breakable space, see @ref{@t{@@tie}}.
10965
10966
10967 @node Not Ending a Sentence
10968 @subsection Not Ending a Sentence
10969
10970 @cindex Not ending a sentence
10971 @cindex Sentence non-ending punctuation
10972 @cindex Periods, inserting
10973 @cindex Spacing, in the middle of sentences
10974 Depending on whether a period or exclamation point or question mark is
10975 inside or at the end of a sentence, slightly less or more space is
10976 inserted after a period in a typeset manual. Since it is not always
10977 possible to determine automatically when a period ends a sentence,
10978 special commands are needed in some circumstances. Usually, Texinfo
10979 can guess how to handle periods, so you do not need to use the special
10980 commands; you just enter a period as you would if you were using a
10981 typewriter: put two spaces after the period, question mark, or
10982 exclamation mark that ends a sentence.
10983
10984 @findex <colon> @r{(suppress end-of-sentence space)}
10985 Use the @code{@@:}@: command after a period, question mark,
10986 exclamation mark, or colon that should not be followed by extra space.
10987 For example, use @code{@@:}@: after periods that end (lowercase)
10988 abbreviations which are not at the ends of sentences.
10989
10990 Also, when a parenthetical remark in the middle of a sentence (like
10991 this one!)@: ends with a period, exclamation point, or question mark,
10992 @code{@@:} should be used after the right parenthesis. Similarly for
10993 right brackets and right quotes (both single and double).
10994
10995 For example,
10996
10997 @example
10998 foo vs.@@: bar (or?)@@: baz
10999 foo vs. bar (or?) baz
11000 @end example
11001
11002 @noindent
11003 @ifnottex
11004 produces
11005 @end ifnottex
11006 @iftex
11007 produces the following. If you look carefully at this printed output,
11008 you will see a bit of extraneous space after the @samp{vs.}@: and
11009 @samp{(or?)}@: in the second line.
11010 @end iftex
11011
11012 @quotation
11013 foo vs.@: bar (or?)@: baz@*
11014 foo vs. bar (or?) baz
11015 @end quotation
11016
11017 @noindent
11018 @code{@@:} has no effect on the HTML or Docbook output.
11019
11020 Do not put braces after @code{@@:} (or any non-alphabetic command).
11021
11022 A few Texinfo commands force normal interword spacing, so that you
11023 don't have to insert @code{@@:} where you otherwise would. These are
11024 the code-like highlighting commands, @code{@@var}, @code{@@abbr}, and
11025 @code{@@acronym} (@pxref{Useful Highlighting}). For example, in
11026 @samp{@@code@{foo. bar@}} the period is not considered the end of a
11027 sentence, and no extra space is inserted.
11028
11029
11030 @node Ending a Sentence
11031 @subsection Ending a Sentence
11032
11033 @cindex Ending a Sentence
11034 @cindex Sentence ending punctuation
11035
11036 @findex . @r{(end of sentence)}
11037 @findex ! @r{(end of sentence)}
11038 @findex ? @r{(end of sentence)}
11039 @cindex Spacing, at ends of sentences
11040 As mentioned above, Texinfo normally inserts additional space after
11041 the end of a sentence. It uses a simple heuristic for this: a
11042 sentence ends with a period, exclamation point, or question mark
11043 followed by optional closing punctuation and then whitespace, and
11044 @emph{not} preceded by a capital letter.
11045
11046 Use @code{@@.}@: instead of a period, @code{@@!}@: instead of an
11047 exclamation point, and @code{@@?}@: instead of a question mark at the
11048 end of a sentence that does end with a capital letter. For example:
11049
11050 @example
11051 Give it to M.I.B. and to M.E.W@@. Also, give it to R.J.C@@.
11052 Give it to M.I.B. and to M.E.W. Also, give it to R.J.C.
11053 @end example
11054
11055 @noindent
11056 The output follows. In printed output and Info, you can see the
11057 desired extra whitespace after the @samp{W} in the first line.
11058
11059 @quotation
11060 Give it to M.I.B. and to M.E.W@. Also, give it to R.J.C@.@*
11061 Give it to M.I.B. and to M.E.W. Also, give it to R.J.C.
11062 @end quotation
11063
11064 In the HTML output, @code{@@.}@: is equivalent to a simple @samp{.};
11065 likewise for @code{@@!}@: and @code{@@?}@:.
11066
11067 The meanings of @code{@@:} and @code{@@.}, etc.@: in Texinfo are
11068 designed to work well with the XEmacs sentence motion commands
11069 (@pxref{Sentences,,, xemacs, XEmacs User's Manual}).
11070
11071 Do not put braces after any of these commands.
11072
11073 A few Texinfo commands are not considered as being an abbreviation,
11074 even though they may end with a capital letter when expanded, so that
11075 you don't have to insert @code{@@.} and companions. This is the case
11076 for code-like highlighting commands, @code{@@var} arguments ending
11077 with a capital letter, and @code{@@TeX}. For example, that sentence
11078 ended with @samp{@@code@{@@@@TeX@}.}; @code{@@.} was not needed. Also
11079 in @code{... @@var@{VARNAME@}. Text} the period after @var{VARNAME}
11080 ends the sentence; there is no need to use @code{@@.}.
11081
11082
11083 @node @t{@@frenchspacing}
11084 @subsection @code{@@frenchspacing} @var{val}: Control Sentence Spacing
11085
11086 @anchor{frenchspacing}@c old name
11087 @findex frenchspacing
11088 @cindex French spacing
11089 @cindex Sentences, spacing after
11090 @cindex Space, after sentences
11091
11092 In American typography, it is traditional and correct to put extra
11093 space at the end of a sentence. This is the default in Texinfo
11094 (implemented in Info and printed output; for HTML, we don't try to
11095 override the browser). In French typography (and others), this extra
11096 space is wrong; all spaces are uniform.
11097
11098 Therefore Texinfo provides the @code{@@frenchspacing} command to
11099 control the spacing after punctuation. It reads the rest of the line
11100 as its argument, which must be the single word @samp{on} or @samp{off}
11101 (always these words, regardless of the language of the document).
11102 Here is an example:
11103
11104 @example
11105 @@frenchspacing on
11106 This is text. Two sentences. Three sentences. French spacing.
11107
11108 @@frenchspacing off
11109 This is text. Two sentences. Three sentences. Non-French spacing.
11110 @end example
11111
11112 @noindent produces:
11113
11114 @frenchspacing on
11115 This is text. Two sentences. Three sentences. French spacing.
11116
11117 @frenchspacing off
11118 This is text. Two sentences. Three sentences. Non-French spacing.
11119
11120 @code{@@frenchspacing} also affects the output after @code{@@.},
11121 @code{@@!}, and @code{@@?} (@pxref{Ending a Sentence}).
11122
11123 @code{@@frenchspacing} has no effect on the HTML or Docbook output;
11124 for XML, it outputs a transliteration of itself (@pxref{Output
11125 Formats}).
11126
11127
11128 @node @t{@@dmn}
11129 @subsection @code{@@dmn}@{@var{dimension}@}: Format a Dimension
11130
11131 @anchor{dmn}@c old name
11132 @cindex Thin space between number, dimension
11133 @cindex Dimension formatting
11134 @cindex Format a dimension
11135 @findex dmn
11136
11137 You can use the @code{@@dmn} command to format a dimension with a
11138 little extra space in the printed output. That is, on seeing
11139 @code{@@dmn}, @TeX{} inserts just enough space for proper typesetting;
11140 in other output formats, the formatting commands insert no space at
11141 all.
11142
11143 To use the @code{@@dmn} command, write the number and then follow it
11144 immediately, with no intervening space, by @code{@@dmn}, and then by
11145 the dimension within braces. For example,
11146
11147 @example
11148 A4 paper is 8.27@@dmn@{in@} wide.
11149 @end example
11150
11151 @noindent
11152 produces
11153
11154 @quotation
11155 A4 paper is 8.27@dmn{in} wide.
11156 @end quotation
11157
11158 Not everyone uses this style. Some people prefer `8.27@tie{}in.'@: or
11159 `8.27@tie{}inches'. In these cases, however, you need to use
11160 @code{@@tie} (@pxref{@t{@@tie}}) or @code{@@w} (@pxref{@t{@@w}})
11161 so that no line break can occur between the number and the dimension.
11162 Also, if you write a period after an abbreviation within a sentence
11163 (as with the `in.'@: above), you should write @samp{@@:} after the
11164 period to prevent @TeX{} from inserting extra whitespace, as shown
11165 here. @xref{Not Ending a Sentence}.
11166
11167
11168 @node Inserting Accents
11169 @section Inserting Accents
11170
11171 @cindex Inserting accents
11172 @cindex Accents, inserting
11173 @cindex Floating accents, inserting
11174
11175 Here is a table with the commands Texinfo provides for inserting
11176 floating accents. They all need an argument, the character to accent,
11177 which can either be given in braces as usual (@code{@@'@{e@}}), or, as
11178 a special case, the braces can be omitted, in which case the argument
11179 is the next character (@code{@@'e}). This is to make the source as
11180 convenient as possible to type and read, since accented characters are
11181 very common in some languages.
11182
11183 If the command is alphabetic, such as @code{@@dotaccent}, then there
11184 must be a space between the command name and argument if braces are
11185 not used. If the command is non-alphabetic, such as @code{@@'}, then
11186 there must @emph{not} be a space; the argument is the very next
11187 character.
11188
11189 Exception: the argument to @code{@@tieaccent} must be enclosed in
11190 braces (since it is two characters instead of one).
11191
11192 @findex documentencoding
11193 To get the true accented characters output in Info, not just the ASCII
11194 transliterations, it is necessary to specify @code{@@documentencoding}
11195 with an encoding which supports the required characters
11196 (@pxref{@t{@@documentencoding}}). In this case, you can also use
11197 non-ASCII (e.g., pre-accented) characters in the source file.
11198
11199 @findex " @r{(umlaut accent)}
11200 @cindex Umlaut accent
11201 @findex ' @r{(umlaut accent)}
11202 @cindex Acute accent
11203 @findex = @r{(macron accent)}
11204 @cindex Macron accent
11205 @findex ^ @r{(circumflex accent)}
11206 @cindex Circumflex accent
11207 @findex ` @r{(grave accent)}
11208 @cindex Grave accent
11209 @findex ~ @r{(tilde accent)}
11210 @cindex Tilde accent
11211 @findex , @r{(cedilla accent)}
11212 @cindex Cedilla accent
11213 @findex dotaccent
11214 @cindex Dot accent
11215 @findex H @r{(Hungarian umlaut accent)}
11216 @cindex Hungarian umlaut accent
11217 @findex ogonek
11218 @cindex Ogonek diacritic
11219 @findex ringaccent
11220 @cindex Ring accent
11221 @findex tieaccent
11222 @cindex Tie-after accent
11223 @findex u @r{(breve accent)}
11224 @cindex Breve accent
11225 @findex ubaraccent
11226 @cindex Underbar accent
11227 @findex udotaccent
11228 @cindex Underdot accent
11229 @findex v @r{(check accent)}
11230 @cindex Hacek accent
11231 @cindex Check accent
11232 @cindex Caron accent
11233 @multitable {@t{@@questiondown@{@}}} {Output} {hacek/check/caron accent}
11234 @headitem Command @tab Output @tab What
11235 @item @t{@@"o} @tab @"o @tab umlaut accent
11236 @item @t{@@'o} @tab @'o @tab acute accent
11237 @item @t{@@,@{c@}} @tab @,{c} @tab cedilla accent
11238 @item @t{@@=o} @tab @=o @tab macron/overbar accent
11239 @item @t{@@^o} @tab @^o @tab circumflex accent
11240 @item @t{@@`o} @tab @`o @tab grave accent
11241 @item @t{@@~o} @tab @~o @tab tilde accent
11242 @item @t{@@dotaccent@{o@}} @tab @dotaccent{o} @tab overdot accent
11243 @item @t{@@H@{o@}} @tab @H{o} @tab long Hungarian umlaut
11244 @item @t{@@ogonek@{a@}} @tab @ogonek{a} @tab ogonek
11245 @item @t{@@ringaccent@{o@}} @tab @ringaccent{o} @tab ring accent
11246 @item @t{@@tieaccent@{oo@}} @tab @tieaccent{oo} @tab tie-after accent
11247 @item @t{@@u@{o@}} @tab @u{o} @tab breve accent
11248 @item @t{@@ubaraccent@{o@}} @tab @ubaraccent{o} @tab underbar accent
11249 @item @t{@@udotaccent@{o@}} @tab @udotaccent{o} @tab underdot accent
11250 @item @t{@@v@{o@}} @tab @v{o} @tab hacek/check/caron accent
11251 @end multitable
11252
11253 This table lists the Texinfo commands for inserting other characters
11254 commonly used in languages other than English.
11255
11256 @findex questiondown
11257 @cindex @questiondown{}
11258 @findex exclamdown
11259 @cindex @exclamdown{}
11260 @findex aa
11261 @cindex @aa{}
11262 @findex AA
11263 @cindex @AA{}
11264 @findex ae
11265 @cindex @ae{}
11266 @findex AE
11267 @cindex @AE{}
11268 @cindex Icelandic
11269 @cindex Eth
11270 @findex dh
11271 @cindex @dh{}
11272 @findex DH
11273 @cindex @DH{}
11274 @findex dotless
11275 @cindex @dotless{i} (dotless i)
11276 @cindex @dotless{j} (dotless j)
11277 @cindex Dotless i, j
11278 @findex l
11279 @cindex @l{}
11280 @findex L
11281 @cindex @L{}
11282 @findex o
11283 @cindex @o{}
11284 @findex O
11285 @cindex @O{}
11286 @findex oe
11287 @cindex @oe{}
11288 @findex OE
11289 @cindex @OE{}
11290 @cindex Romance ordinals
11291 @cindex Ordinals, Romance
11292 @cindex Feminine ordinal
11293 @findex ordf
11294 @cindex @ordf{}
11295 @cindex Masculine ordinal
11296 @findex ordm
11297 @cindex @ordm{}
11298 @findex ss
11299 @cindex @ss{}
11300 @cindex Es-zet
11301 @cindex Sharp S
11302 @cindex German S
11303 @cindex Thorn
11304 @findex th
11305 @cindex @th{}
11306 @findex TH
11307 @cindex @TH{}
11308 @multitable {@t{@@questiondown@{@}}} {oe OE} {es-zet or sharp S}
11309 @item @t{@@exclamdown@{@}} @tab @exclamdown{} @tab upside-down !
11310 @item @t{@@questiondown@{@}} @tab @questiondown{} @tab upside-down ?
11311 @item @t{@@aa@{@} @@AA@{@}} @tab @aa{} @AA{} @tab a,A with circle
11312 @item @t{@@ae@{@} @@AE@{@}} @tab @ae{} @AE{} @tab ae,AE ligatures
11313 @item @t{@@dh@{@} @@DH@{@}} @tab @dh{} @DH{} @tab Icelandic eth
11314 @item @t{@@dotless@{i@}} @tab @dotless{i} @tab dotless i
11315 @item @t{@@dotless@{j@}} @tab @dotless{j} @tab dotless j
11316 @item @t{@@l@{@} @@L@{@}} @tab @l{} @L{} @tab suppressed-L,l
11317 @item @t{@@o@{@} @@O@{@}} @tab @o{} @O{} @tab O,o with slash
11318 @item @t{@@oe@{@} @@OE@{@}} @tab @oe{} @OE{} @tab oe,OE ligatures
11319 @item @t{@@ordf@{@} @@ordm@{@}} @tab @ordf{} @ordm{} @tab Spanish ordinals
11320 @item @t{@@ss@{@}} @tab @ss{} @tab es-zet or sharp S
11321 @item @t{@@th@{@} @@TH@{@}} @tab @th{} @TH{} @tab Icelandic thorn
11322 @end multitable
11323
11324
11325 @node Inserting Quotation Marks
11326 @section Inserting Quotation Marks
11327 @cindex Inserting quotation marks
11328 @cindex Quotation marks, inserting
11329
11330 @cindex Quotation characters (`'), in source
11331 Use doubled single-quote characters to begin and end quotations:
11332 @w{@t{`@w{}`@dots{}'@w{}'}}. @TeX{} converts two single quotes to
11333 left- and right-hand doubled quotation marks,
11334 @c this comes out as "like this" in Info, which is just confusing.
11335 @iftex
11336 ``like this'',
11337 @end iftex
11338 and Info converts doubled single-quote characters to ASCII
11339 double-quotes: @w{@t{`@w{}`@dots{}'@w{}'}} becomes @w{@t{"@dots{}"}}.
11340
11341 You may occasionally need to produce two consecutive single quotes;
11342 for example, in documenting a computer language such as Maxima where
11343 @t{'@w{}'} is a valid command. You can do this with the input
11344 @t{'@@w@{@}'}; the empty @code{@@w} command stops the combination into
11345 the double-quote characters.
11346
11347 @cindex Unicode quotation characters
11348 @cindex Grave accent, vs. left quote
11349 The left quote character (@t{`}, ASCII code 96) used in Texinfo is a
11350 grave accent in ANSI and ISO character set standards. We use it as a
11351 quote character because that is how @TeX{} is set up, by default.
11352
11353 Texinfo supports several other quotation marks used in languages other
11354 than English. Below is a table with the commands Texinfo provides for
11355 inserting quotation marks.
11356
11357 @findex documentencoding
11358 @cindex UTF-8
11359 @cindex ISO 8859-15
11360 @cindex Latin 9
11361 @cindex ISO 8859-1
11362 @cindex Latin 1
11363 In order to get the symbols for the quotation marks in encoded Info
11364 output, it is necessary to specify @code{@@documentencoding UTF-8}.
11365 (@xref{@t{@@documentencoding}}.) Double guillemets are also
11366 present in ISO 8859-1 (aka Latin@tie{}1) and ISO 8859-15 (aka
11367 Latin@tie{}9).
11368
11369 @cindex European Computer Modern fonts
11370 @cindex EC fonts
11371 The standard @TeX{} fonts support the usual quotation marks used in
11372 English (the ones produced with single and doubled ASCII
11373 single-quotes). For the other quotation marks, @TeX{} uses European
11374 Computer Modern (EC) fonts (@file{ecrm1000} and other variants).
11375 These fonts are freely available, of course; you can download them
11376 from @url{http://@/www.ctan.org/@/tex-archive/@/fonts/ec}, among other
11377 places.
11378
11379 @cindex CM-Super fonts
11380 The free EC fonts are bitmap fonts created with Metafont. Especially
11381 for on-line viewing, Type@tie{}1 (vector) versions of the fonts are
11382 preferable; these are available in the CM-Super font package
11383 (@url{http://@/www.ctan.org/@/tex-archive/@/fonts/@/ps-type1/@/cm-super}).
11384
11385 Both distributions include installation instructions.
11386
11387 @cindex Single quotation marks
11388 @cindex Double quotation marks
11389 @cindex Left quotation marks
11390 @cindex Right quotation marks
11391 @findex quotedblleft
11392 @cindex `@w{}`
11393 @findex quoteleft
11394 @cindex `
11395 @cindex " (undirected double quote character)
11396 @findex quotedblright
11397 @cindex '@w{}'
11398 @findex quoteright
11399 @cindex '
11400 @cindex Double low-9 quotation mark
11401 @cindex Single low-9 quotation mark
11402 @findex quotedblbase
11403 @cindex @quotedblbase{} (double low-9 quotation mark)
11404 @findex quotesinglbase
11405 @cindex @quotesinglbase{} (single low-9 quotation mark)
11406 @cindex Angle quotation marks
11407 @cindex Guillemets
11408 @cindex Guillemots
11409 @cindex French quotation marks
11410 @cindex Quotation marks, French
11411 @cindex German quotation marks
11412 @cindex Quotation marks, German
11413 @cindex Double guillemets
11414 @cindex Single guillemets
11415 @cindex Double angle quotation marks
11416 @cindex Single angle quotation marks
11417 @cindex Left-pointing angle quotation marks
11418 @cindex Right-pointing angle quotation marks
11419 @cindex Double left-pointing angle quotation mark
11420 @cindex Double right-pointing angle quotation mark
11421 @cindex Single left-pointing angle quotation mark
11422 @cindex Single right-pointing angle quotation mark
11423 @findex guillemetleft
11424 @findex guillemotleft
11425 @cindex @guillemetleft{}
11426 @findex guillemetright
11427 @findex guillemotright
11428 @cindex @guillemetright{}
11429 @findex guilsinglleft
11430 @cindex @guilsinglleft{}
11431 @findex guilsinglright
11432 @cindex @guilsinglright{}
11433 @multitable {@t{@@quotedblright@{@} '@w{}'}} {Glyph} {Right-pointing double angle quotation mark (U+00BB)}
11434 @headitem Command @tab Glyph @tab Unicode name (point)
11435 @item @verb{.@quotedblleft{} ``.} @tab @quotedblleft{} @tab Left double quotation mark (U+201C)
11436 @item @verb{.@quotedblright{} ''.} @tab @quotedblright{} @tab Right double quotation mark (U+201D)
11437 @item @verb{.@quoteleft{} `.} @tab @quoteleft{} @tab Left single quotation mark (U+2018)
11438 @item @verb{.@quoteright{} '.} @tab @quoteright{} @tab Right single quotation mark (U+2019)
11439 @item @t{@@quotedblbase@{@}} @tab @quotedblbase{} @tab Double low-9 quotation mark (U+201E)
11440 @item @t{@@quotesinglbase@{@}} @tab @quotesinglbase{} @tab Single low-9 quotation mark (U+201A)
11441 @item @t{@@guillemetleft@{@}} @tab @guillemetleft{} @tab Left-pointing double angle quotation mark (U+00AB)
11442 @item @t{@@guillemetright@{@}} @tab @guillemetright{} @tab Right-pointing double angle quotation mark (U+00BB)
11443 @item @t{@@guilsinglleft@{@}} @tab @guilsinglleft{} @tab Single left-pointing angle quotation mark (U+2039)
11444 @item @t{@@guilsinglright@{@}} @tab @guilsinglright{} @tab Single right-pointing angle quotation mark (U+203A)
11445 @end multitable
11446
11447 @cindex Auk, bird species
11448 For the double angle quotation marks, Adobe and @LaTeX{} glyph names
11449 are also supported: @code{@@guillemotleft} and
11450 @code{@@guillemotright}. These names are incorrect; a
11451 ``guillemot'' is a bird species (a type of auk).
11452
11453 Traditions for quotation mark usage vary to a great extent between
11454 languages
11455 (@url{http://@/en.wikipedia.org/@/wiki/@/Quotation_mark%2C_non-English_usage@/#Overview}).
11456 Texinfo does not provide commands for typesetting quotation marks
11457 according to the numerous traditions. Therefore, you have to choose
11458 the commands appropriate for the language of your manual. Sometimes
11459 aliases (@pxref{@t{@@alias}}) can simplify the usage and make the
11460 source code more readable. For example, in German,
11461 @code{@@quotedblbase} is used for the left double quote, and the right
11462 double quote is the glyph produced by @code{@@quotedblleft}, which is
11463 counter-intuitive. Thus, in this case the following aliases would be
11464 convenient:
11465
11466 @example
11467 @@alias lgqq = quotedblbase
11468 @@alias rgqq = quotedblleft
11469 @end example
11470
11471
11472 @node Inserting Math
11473 @section @code{@@math}: Inserting Mathematical Expressions
11474
11475 @anchor{math}@c old name
11476 @findex math
11477 @cindex Mathematical expressions, inserting
11478 @cindex Formulas, mathematical
11479
11480 You can write a short mathematical expression with the @code{@@math}
11481 command. Write the mathematical expression between braces, like this:
11482
11483 @example
11484 @@math@{(a + b)(a + b) = a^2 + 2ab + b^2@}
11485 @end example
11486
11487 @iftex
11488 @noindent This produces the following in @TeX{}:
11489
11490 @display
11491 @math{(a + b)(a + b) = a^2 + 2ab + b^2}
11492 @end display
11493
11494 @noindent and the following in other formats:
11495 @end iftex
11496 @ifnottex
11497 @noindent This produces the following in Info and HTML:
11498 @end ifnottex
11499
11500 @example
11501 (a + b)(a + b) = a^2 + 2ab + b^2
11502 @end example
11503
11504 The @code{@@math} command has no special effect on the Info and HTML
11505 output. @command{makeinfo} expands any @@-commands as usual,
11506 but it does not try to produce good mathematical formatting in any
11507 way.
11508
11509 However, as far as the @TeX{} output is concerned, plain @TeX{}
11510 mathematical commands are allowed in @code{@@math}, starting with
11511 @samp{\}, and the plain @TeX{} math characters like @samp{^} and
11512 @samp{_} are also recognized. In essence, @code{@@math} drops you
11513 into plain @TeX{} math mode.
11514
11515 This allows you to conveniently write superscripts and subscripts (as
11516 in the above example), and also to use all the plain @TeX{} math
11517 control sequences for symbols, functions, and so on, and thus get
11518 proper formatting in the @TeX{} output, at least.
11519
11520 It's best to use @samp{\} instead of @samp{@@} for any such
11521 mathematical commands; otherwise, @command{makeinfo} will complain.
11522 On the other hand, @command{makeinfo} allows input with matching (but
11523 unescaped) braces, such as @samp{k_@{75@}}, although it complains
11524 about such bare braces in regular input.
11525
11526 Here's an example:
11527
11528 @example
11529 @@math@{\sin 2\pi \equiv \cos 3\pi@}
11530 @end example
11531
11532 @iftex
11533 @noindent which looks like this in @TeX{}:
11534 @display
11535 @math{\sin 2\pi \equiv \cos 3\pi}
11536 @end display
11537
11538 @noindent and
11539 @end iftex
11540 @noindent which looks like the input in Info and HTML:
11541 @example
11542 \sin 2\pi \equiv \cos 3\pi
11543 @end example
11544
11545 @findex \ @r{(literal \ in @code{@@math})}
11546 Since @samp{\} is an escape character inside @code{@@math}, you can
11547 use @code{@@\} to get a literal backslash (@code{\\} will work in
11548 @TeX{}, but you'd get the literal two characters @samp{\\} in Info).
11549 @code{@@\} is not defined outside of @code{@@math}, since a @samp{\}
11550 ordinarily produces a literal (typewriter) @samp{\}. You can also use
11551 @code{@@backslashchar@{@}} in any mode to get a typewriter backslash.
11552 @xref{Inserting a Backslash}.
11553
11554 @cindex Displayed equations
11555 @cindex Equations, displayed
11556 For displayed equations, you must at present use @TeX{} directly
11557 (@pxref{Raw Formatter Commands}).
11558
11559
11560 @node Glyphs for Text
11561 @section Glyphs for Text
11562
11563 @anchor{Glyphs}@c old name
11564 @anchor{TeX and copyright}@c another old node, now split into two
11565 @cindex Glyphs for text
11566 @cindex Textual glyphs
11567
11568 Texinfo has support for a few additional glyphs that are commonly used
11569 in printed text but not available in ASCII@. Of course, there are
11570 many thousands more. It is possible to use Unicode characters as-is
11571 as far as @code{makeinfo} is concerned, but @TeX{} is not so lucky.
11572
11573 @menu
11574 * @t{@@TeX @@LaTeX}:: The @TeX{} logos.
11575 * @t{@@copyright}:: The copyright symbol (c in a circle).
11576 * @t{@@registeredsymbol}:: The registered symbol (R in a circle).
11577 * @t{@@dots}:: How to insert ellipses: @dots{} and @enddots{}
11578 * @t{@@bullet}:: How to insert a bullet: @bullet{}
11579 * @t{@@euro}:: How to insert the euro currency symbol.
11580 * @t{@@pounds}:: How to insert the pounds currency symbol.
11581 * @t{@@textdegree}:: How to insert the degrees symbol.
11582 * @t{@@minus}:: How to insert a minus sign.
11583 * @t{@@geq @@leq}:: How to insert greater/less-than-or-equal signs.
11584 @end menu
11585
11586
11587 @node @t{@@TeX @@LaTeX}
11588 @subsection @code{@@TeX}@{@} (@TeX{}) and @code{@@LaTeX}@{@} (@LaTeX{})
11589
11590 @anchor{tex}@c old name
11591 @findex TeX
11592 @findex LaTeX
11593 @cindex Logos, @TeX{}
11594 @cindex @TeX{} logo
11595 @cindex @LaTeX{} logo
11596
11597 Use the @code{@@TeX@{@}} command to generate `@TeX{}'. In a printed
11598 manual, this is a special logo that is different from three ordinary
11599 letters. In Info, it just looks like @samp{TeX}.
11600
11601 Similarly, use the @code{@@LaTeX@{@}} command to generate `@LaTeX{}',
11602 which is even more special in printed manuals (and different from the
11603 incorrect @code{La@@TeX@{@}}. In Info, the result is just
11604 @samp{LaTeX}. (@LaTeX{} is another macro package built on top of
11605 @TeX{}, very loosely analogous to Texinfo in that it emphasizes
11606 logical structure, but much (much) larger.)
11607
11608 The spelling of these commands are unusual for Texinfo, in that they
11609 use both uppercase and lowercase letters.
11610
11611
11612 @node @t{@@copyright}
11613 @subsection @code{@@copyright@{@}} (@copyright{})
11614
11615 @anchor{copyright symbol}@c old name
11616 @findex copyright
11617 @cindex Copyright symbol
11618
11619 Use the @code{@@copyright@{@}} command to generate the copyright
11620 symbol, `@copyright{}'. Where possible, this is a @samp{c} inside a
11621 circle; in Info, this is @samp{(C)}.
11622
11623 Legally, it's not necessary to use the copyright symbol; the English
11624 word `Copyright' suffices, according to international treaty.
11625
11626
11627 @node @t{@@registeredsymbol}
11628 @subsection @code{@@registeredsymbol@{@}} (@registeredsymbol{})
11629
11630 @anchor{registered symbol}@c old name
11631 @findex registeredsymbol
11632 @cindex Registered symbol
11633
11634 Use the @code{@@registeredsymbol@{@}} command to generate the
11635 registered symbol, `@registeredsymbol{}'. Where possible, this is an
11636 @samp{R} inside a circle; in Info, this is @samp{(R)}.
11637
11638
11639 @node @t{@@dots}
11640 @subsection @code{@@dots} (@dots{}) and @code{@@enddots} (@enddots{})
11641
11642 @anchor{dots}@c old name
11643 @findex dots
11644 @findex enddots
11645 @cindex Inserting dots
11646 @cindex Inserting ellipsis
11647 @cindex Dots, inserting
11648 @cindex Ellipsis, inserting
11649
11650 @anchor{Dots Bullets}@c old name
11651
11652 An @dfn{ellipsis} (a sequence of dots) would be spaced wrong when
11653 typeset as a string of periods, so a special command is used in
11654 Texinfo: use the @code{@@dots@{@}} command to generate a normal
11655 ellipsis, which is three dots in a row, appropriately spaced @dots{}
11656 like so. To emphasize: do not simply write three periods in the input
11657 file; that would work for the Info file output, but would produce the
11658 wrong amount of space between the periods in the printed manual.
11659
11660 The @code{@@enddots@{@}} command generates an end-of-sentence
11661 ellipsis, which also has three dots, but with different spacing
11662 afterwards, @enddots{} Look closely to see the difference.
11663
11664 Here is an ellipsis: @dots{}
11665 Here are three periods in a row: ...
11666
11667 In printed (and usually HTML) output, the three periods in a row are
11668 much closer together than the dots in the ellipsis.
11669
11670
11671 @node @t{@@bullet}
11672 @subsection @code{@@bullet} (@bullet{})
11673
11674 @anchor{bullet}@c old name
11675 @findex bullet
11676
11677 Use the @code{@@bullet@{@}} command to generate a large round dot, or
11678 the closest possible thing to one. In Info, an asterisk is used.
11679 Here is a bullet: @bullet{}
11680
11681 When you use @code{@@bullet} in @code{@@itemize}, you do not need to
11682 type the braces, because @code{@@itemize} supplies them.
11683 (@pxref{@t{@@itemize}}).
11684
11685
11686 @node @t{@@euro}
11687 @subsection @code{@@euro} (@euro{}): Euro Currency Symbol
11688
11689 @anchor{euro}@c old name
11690 @findex euro
11691 @cindex Euro symbol
11692
11693 Use the @code{@@euro@{@}} command to generate `@euro{}'. Where
11694 possible, this is the symbol for the Euro currency. Otherwise, the
11695 word @samp{Euro} is used.
11696
11697 Texinfo cannot magically synthesize support for the Euro symbol where
11698 the underlying system (fonts, software, whatever) does not support it.
11699 Therefore, you may find it preferable to use the word ``Euro''. (In
11700 banking contexts, the abbreviation for the Euro is EUR.)
11701
11702 @cindex ISO 8859-15, and Euro
11703 @cindex Latin 9, and Euro
11704 In order to get the Euro symbol in encoded Info output, for example,
11705 it is necessary to specify @code{@@documentencoding ISO-8859-15} or
11706 @code{@@documentencoding UTF-8} (@xref{@t{@@documentencoding}}.)
11707 The Euro symbol is in ISO 8859-15 (aka Latin@tie{}9), and is
11708 @emph{not} in the more widely-used ISO 8859-1 (Latin@tie{}1).
11709
11710 @pindex feymr10
11711 @cindex Euro font
11712 The Euro symbol does not exist in the standard @TeX{} fonts (which
11713 were designed before the Euro was legislated into existence).
11714 Therefore, @TeX{} uses an additional font, named @code{feymr10} (along
11715 with other variables). It is freely available, of course; you can
11716 download it from @url{http://www.ctan.org/tex-archive/fonts/eurosym},
11717 among other places. The distribution includes installation
11718 instructions.
11719
11720
11721 @node @t{@@pounds}
11722 @subsection @code{@@pounds} (@pounds{}): Pounds Sterling
11723
11724 @anchor{pounds}@c old name
11725 @findex pounds
11726 @cindex Pounds symbol
11727
11728 Use the @code{@@pounds@{@}} command to generate `@pounds{}'. Where
11729 possible, this is the symbol for the pounds sterling British currency.
11730 Otherwise, it is @samp{#}.
11731
11732
11733 @node @t{@@textdegree}
11734 @subsection @code{@@textdegree} (@textdegree{}): Degrees Symbol
11735
11736 @anchor{textdegree}@c old name
11737 @findex textdegree
11738 @cindex Degree symbol
11739
11740 Use the @code{@@textdegree@{@}} command to generate `@textdegree{}'.
11741 Where possible, this is the normal symbol for degrees. Otherwise,
11742 it is an @samp{o}.
11743
11744
11745 @node @t{@@minus}
11746 @subsection @code{@@minus} (@minus{}): Inserting a Minus Sign
11747
11748 @anchor{minus}@c old name
11749 @findex minus
11750 @cindex Minus sign
11751
11752 @cindex Em dash, compared to minus sign
11753 @cindex Hyphen, compared to minus
11754 Use the @code{@@minus@{@}} command to generate a minus sign. In a
11755 fixed-width font, this is a single hyphen, but in a proportional font,
11756 the symbol is the customary length for a minus sign---a little longer
11757 than a hyphen, shorter than an em-dash:
11758
11759 @display
11760 @samp{@minus{}} is a minus sign generated with @samp{@@minus@{@}},
11761
11762 `-' is a hyphen generated with the character @samp{-},
11763
11764 `---' is an em-dash for text.
11765 @end display
11766
11767 @noindent
11768 In the fixed-width font used by Info, @code{@@minus@{@}} is the same
11769 as a hyphen.
11770
11771 You should not use @code{@@minus@{@}} inside @code{@@code} or
11772 @code{@@example} because the width distinction is not made in the
11773 fixed-width font they use.
11774
11775 When you use @code{@@minus} to specify the mark beginning each entry
11776 in an itemized list, you do not need to type the braces
11777 (@pxref{@t{@@itemize}}).
11778
11779 If you actually want to typeset some math that does a subtraction, it
11780 is better to use @code{@@math}. Then the regular @samp{-} character
11781 produces a minus sign, as in @code{@@math@{a-b@}} (@pxref{Inserting
11782 Math}).
11783
11784
11785 @node @t{@@geq @@leq}
11786 @subsection @code{@@geq} (@geq{}) and @code{@@leq} (@leq{}): Inserting Relations
11787
11788 @anchor{geq leq}@c old name
11789 @findex geq
11790 @findex leq
11791
11792 Use the @code{@@geq@{@}} and @code{@@leq@{@}} commands to generate
11793 greater-than-or-equal and less-than-equal-signs, `@geq{}' and
11794 `@leq{}'. When those symbols are not available, the ASCII sequences
11795 @samp{>=} and @samp{<=} are output.
11796
11797
11798 @node Glyphs for Programming
11799 @section Glyphs for Programming
11800
11801 @cindex Glyphs for programming
11802 @cindex Examples, glyphs for
11803 @cindex Programming, glyphs for
11804
11805 In Texinfo, code is often illustrated in examples that are delimited
11806 by @code{@@example} and @code{@@end example}, or by @code{@@lisp} and
11807 @code{@@end lisp}. In such examples, you can indicate the results of
11808 evaluation or an expansion using @samp{@result{}} or
11809 @samp{@expansion{}}. Likewise, there are commands to insert glyphs to
11810 indicate printed output, error messages, equivalence of expressions,
11811 the location of point in an editor, and GUI operation sequences.
11812
11813 The glyph-insertion commands do not need to be used within an example,
11814 but most often they are. All glyph-insertion commands are followed by
11815 empty braces.
11816
11817 @menu
11818 * Glyphs Summary::
11819 * @t{@@result}:: How to show the result of expression.
11820 * @t{@@expansion}:: How to indicate an expansion.
11821 * @t{@@print}:: How to indicate generated output.
11822 * @t{@@error}:: How to indicate an error message.
11823 * @t{@@equiv}:: How to indicate equivalence.
11824 * @t{@@point}:: How to indicate the location of point.
11825 * Click Sequences:: Inserting GUI usage sequences.
11826 @end menu
11827
11828
11829 @node Glyphs Summary
11830 @subsection Glyphs Summary
11831
11832 Here is a summary of the glyph commands:
11833
11834 @table @asis
11835 @item @result{}
11836 @code{@@result@{@}} indicates the result of an expression.
11837
11838 @item @expansion{}
11839 @code{@@expansion@{@}} indicates the results of a macro expansion.
11840
11841 @item @print{}
11842 @code{@@print@{@}} indicates printed output.
11843
11844 @item @error{}
11845 @code{@@error@{@}} indicates the following text is an error message.
11846
11847 @item @equiv{}
11848 @code{@@equiv@{@}} indicates the exact equivalence of two forms.
11849
11850 @item @point{}
11851 @code{@@point@{@}} shows the location of point.
11852
11853 @item @clicksequence{A @click{} B}
11854 @code{@@clicksequence@{A @@click@{@} B} indicates a GUI operation
11855 sequence: first A, then clicking B, or choosing B from a menu, or
11856 otherwise selecting it.
11857 @end table
11858
11859
11860 @node @t{@@result}
11861 @subsection @code{@@result@{@}} (@result{}): Result of an Expression
11862
11863 @anchor{result}@c old name
11864 @findex result
11865 @cindex Result of an expression
11866 @cindex Indicating evaluation
11867 @cindex Evaluation glyph
11868 @cindex Value of an expression, indicating
11869
11870 Use the @code{@@result@{@}} command to indicate the result of
11871 evaluating an expression.
11872
11873 The @code{@@result@{@}} command is displayed as @samp{@result{}},
11874 either a double stemmed arrow or (when that is not available) the
11875 ASCII sequence @samp{=>}.
11876
11877 Thus, the following,
11878
11879 @lisp
11880 (cdr '(1 2 3))
11881 @result{} (2 3)
11882 @end lisp
11883
11884 @noindent
11885 may be read as ``@code{(cdr '(1 2 3))} evaluates to @code{(2 3)}''.
11886
11887
11888 @node @t{@@expansion}
11889 @subsection @code{@@expansion@{@}} (@expansion{}): Indicating an Expansion
11890
11891 @anchor{expansion}@c old name
11892 @cindex Expansion, indicating
11893 @cindex Macro expansion, indicating
11894 @findex expansion
11895
11896 When an expression is a macro call, it expands into a new expression.
11897 You can indicate the result of the expansion with the
11898 @code{@@expansion@{@}} command.
11899
11900 The @code{@@expansion@{@}} command is displayed as
11901 @samp{@expansion{}}, either a long arrow with a flat base or (when
11902 that is not available) the ASCII sequence @samp{==>}.
11903
11904 @need 700
11905 For example, the following
11906
11907 @example
11908 @group
11909 @@lisp
11910 (third '(a b c))
11911 @@expansion@{@} (car (cdr (cdr '(a b c))))
11912 @@result@{@} c
11913 @@end lisp
11914 @end group
11915 @end example
11916
11917 @noindent
11918 produces
11919
11920 @lisp
11921 @group
11922 (third '(a b c))
11923 @expansion{} (car (cdr (cdr '(a b c))))
11924 @result{} c
11925 @end group
11926 @end lisp
11927
11928 @noindent
11929 which may be read as:
11930
11931 @quotation
11932 @code{(third '(a b c))} expands to @code{(car (cdr (cdr '(a b c))))};
11933 the result of evaluating the expression is @code{c}.
11934 @end quotation
11935
11936 @noindent
11937 Often, as in this case, an example looks better if the
11938 @code{@@expansion@{@}} and @code{@@result@{@}} commands are indented.
11939
11940
11941 @node @t{@@print}
11942 @subsection @code{@@print@{@}} (@print{}): Indicating Generated Output
11943
11944 @anchor{Print Glyph}@c old name
11945 @findex print
11946 @cindex Printed output, indicating
11947
11948 Sometimes an expression will generate output during its execution.
11949 You can indicate such displayed output with the @code{@@print@{@}}
11950 command.
11951
11952 The @code{@@print@{@}} command is displayed as @samp{@print{}}, either
11953 a horizontal dash butting against a vertical bar or (when that is not
11954 available) the ASCII sequence @samp{-|}.
11955
11956 In the following example, the printed text is indicated with
11957 @samp{@print{}}, and the value of the expression follows on the
11958 last line.
11959
11960 @lisp
11961 @group
11962 (progn (print 'foo) (print 'bar))
11963 @print{} foo
11964 @print{} bar
11965 @result{} bar
11966 @end group
11967 @end lisp
11968
11969 @noindent
11970 In a Texinfo source file, this example is written as follows:
11971
11972 @lisp
11973 @group
11974 @@lisp
11975 (progn (print 'foo) (print 'bar))
11976 @@print@{@} foo
11977 @@print@{@} bar
11978 @@result@{@} bar
11979 @@end lisp
11980 @end group
11981 @end lisp
11982
11983
11984 @node @t{@@error}
11985 @subsection @code{@@error@{@}} (@error{}): Indicating an Error Message
11986
11987 @anchor{Error Glyph}@c old name
11988 @cindex Error message, indicating
11989 @findex error
11990
11991 A piece of code may cause an error when you evaluate it. You can
11992 designate the error message with the @code{@@error@{@}} command.
11993
11994 The @code{@@error@{@}} command is displayed as @samp{@error{}}, either
11995 the word `error' in a box in the printed output, the word error
11996 followed by an arrow in other formats or (when no arrow is available)
11997 @samp{error-->}.
11998
11999 @need 700
12000 Thus,
12001
12002 @example
12003 @@lisp
12004 (+ 23 'x)
12005 @@error@{@} Wrong type argument: integer-or-marker-p, x
12006 @@end lisp
12007 @end example
12008
12009 @noindent
12010 produces
12011
12012 @lisp
12013 (+ 23 'x)
12014 @error{} Wrong type argument: integer-or-marker-p, x
12015 @end lisp
12016
12017 @noindent
12018 This indicates that the following error message is printed
12019 when you evaluate the expression:
12020
12021 @lisp
12022 Wrong type argument: integer-or-marker-p, x
12023 @end lisp
12024
12025 The word @samp{@error{}} itself is not part of the error message.
12026
12027
12028 @node @t{@@equiv}
12029 @subsection @code{@@equiv@{@}} (@equiv{}): Indicating Equivalence
12030
12031 @anchor{Equivalence}@c oldname
12032 @cindex Equivalence, indicating
12033 @findex equiv
12034
12035 Sometimes two expressions produce identical results. You can indicate
12036 the exact equivalence of two forms with the @code{@@equiv@{@}}
12037 command. The @code{@@equiv@{@}} command is displayed as
12038 @samp{@equiv{}}, either a standard mathematical equivalence sign
12039 (three parallel horizontal lines) or (when that is not available) as
12040 the ASCII sequence @samp{==}.
12041
12042 Thus,
12043
12044 @example
12045 @@lisp
12046 (make-sparse-keymap) @@equiv@{@} (list 'keymap)
12047 @@end lisp
12048 @end example
12049
12050 @noindent
12051 produces
12052
12053 @lisp
12054 (make-sparse-keymap) @equiv{} (list 'keymap)
12055 @end lisp
12056
12057 @noindent
12058 This indicates that evaluating @code{(make-sparse-keymap)} produces
12059 identical results to evaluating @code{(list 'keymap)}.
12060
12061
12062 @node @t{@@point}
12063 @subsection @code{@@point@{@}} (@point{}): Indicating Point in a Buffer
12064
12065 @anchor{Point Glyph}@c old name
12066 @cindex Point, indicating in a buffer
12067 @findex point
12068
12069 Sometimes you need to show an example of text in an XEmacs buffer. In
12070 such examples, the convention is to include the entire contents of the
12071 buffer in question between two lines of dashes containing the buffer
12072 name.
12073
12074 You can use the @samp{@@point@{@}} command to show the location of
12075 point in the text in the buffer. (The symbol for point, of course, is
12076 not part of the text in the buffer; it indicates the place
12077 @emph{between} two characters where point is located.)
12078
12079 The @code{@@point@{@}} command is displayed as @samp{@point{}}, either
12080 a pointed star or (when that is not available) the ASCII sequence
12081 @samp{-!-}.
12082
12083 The following example shows the contents of buffer @file{foo} before
12084 and after evaluating a Lisp command to insert the word @code{changed}.
12085
12086 @example
12087 @group
12088 ---------- Buffer: foo ----------
12089 This is the @point{}contents of foo.
12090 ---------- Buffer: foo ----------
12091
12092 @end group
12093 @end example
12094
12095 @example
12096 @group
12097 (insert "changed ")
12098 @result{} nil
12099 ---------- Buffer: foo ----------
12100 This is the changed @point{}contents of foo.
12101 ---------- Buffer: foo ----------
12102
12103 @end group
12104 @end example
12105
12106 In a Texinfo source file, the example is written like this:
12107
12108 @example
12109 @@example
12110 ---------- Buffer: foo ----------
12111 This is the @@point@{@}contents of foo.
12112 ---------- Buffer: foo ----------
12113
12114 (insert "changed ")
12115 @@result@{@} nil
12116 ---------- Buffer: foo ----------
12117 This is the changed @@point@{@}contents of foo.
12118 ---------- Buffer: foo ----------
12119 @@end example
12120 @end example
12121
12122
12123 @node Click Sequences
12124 @subsection Click Sequences
12125
12126 @cindex Click sequences
12127 @cindex Sequence of clicks
12128 @cindex GUI click sequence
12129
12130 @findex clicksequence
12131 When documenting graphical interfaces, it is necessary to describe
12132 sequences such as `Click on @samp{File}, then choose @samp{Open}, then
12133 @dots{}'. Texinfo offers commands @code{@@clicksequence} and
12134 @code{click} to represent this, typically used like this:
12135
12136 @example
12137 @dots{} @@clicksequence@{File @@click@{@} Open@} @dots{}
12138 @end example
12139
12140 @noindent
12141 which produces:
12142
12143 @display
12144 @dots{} @clicksequence{File @click{} Open} @dots{}
12145 @end display
12146
12147 @findex click
12148 @findex arrow
12149 The @code{@@click} command produces a right arrow by default; this
12150 glyph is also available independently via the command
12151 @code{@@arrow@{@}}.
12152
12153 @findex clickstyle
12154 You can change the glyph produced by @code{@@click} with the command
12155 @code{@@clickstyle}, which takes a command name as its single argument
12156 on the rest of the line, much like @code{@@itemize} and friends
12157 (@pxref{@t{@@itemize}}). The command should produce a glyph, and
12158 the usual empty braces @samp{@{@}} are omitted. Here's an example:
12159
12160 @example
12161 @@clickstyle @@result
12162 @dots{} @@clicksequence@{File @@click@{@} Open@} @dots{}
12163 @end example
12164
12165 @noindent
12166 now produces:
12167
12168 @display
12169 @clickstyle @result
12170 @dots{} @clicksequence{File @click{} Open} @dots{}
12171 @end display
12172
12173
12174 @node Breaks
12175 @chapter Forcing and Preventing Breaks
12176
12177 @cindex Forcing line and page breaks
12178 @cindex Making line and page breaks
12179 @cindex Preventing line and page breaks
12180 @cindex Line breaks, awkward
12181 @cindex Page breaks, awkward
12182
12183 Line and page breaks can sometimes occur in the `wrong' place in one
12184 or another form of output. It's up to you to ensure that text looks
12185 right in all the output formats.
12186
12187 For example, in a printed manual, page breaks may occur awkwardly in
12188 the middle of an example; to prevent this, you can hold text together
12189 using a grouping command that keeps the text from being split across
12190 two pages. Conversely, you may want to force a page break where none
12191 would occur normally.
12192
12193 You can use the break, break prevention, or pagination commands to fix
12194 problematic line and page breaks.
12195
12196 @menu
12197 * Break Commands:: Summary of break-related commands.
12198 * Line Breaks:: Forcing line breaks.
12199 * @t{@@- @@hyphenation}:: Helping @TeX{} with hyphenation points.
12200 * @t{@@allowcodebreaks}:: Controlling line breaks within @@code text.
12201 * @t{@@w}:: Preventing unwanted line breaks in text.
12202 * @t{@@tie}:: Inserting an unbreakable but varying space.
12203 * @t{@@sp}:: Inserting blank lines.
12204 * @t{@@page}:: Forcing the start of a new page.
12205 * @t{@@group}:: Preventing unwanted page breaks.
12206 * @t{@@need}:: Another way to prevent unwanted page breaks.
12207 @end menu
12208
12209
12210 @node Break Commands
12211 @section Break Commands
12212
12213 The break commands create or allow line and paragraph breaks:
12214
12215 @table @code
12216 @item @@*
12217 Force a line break.
12218
12219 @item @@sp @var{n}
12220 Skip @var{n} blank lines.
12221
12222 @item @@-
12223 Insert a discretionary hyphen.
12224
12225 @item @@hyphenation@{@var{hy-phen-a-ted words}@}
12226 Define hyphen points in @var{hy-phen-a-ted words}.
12227 @end table
12228
12229 These commands hold text together on a single line:
12230
12231 @table @code
12232 @item @@w@{@var{text}@}
12233 Prevent @var{text} from being split and hyphenated across two lines.
12234
12235 @item @@tie@{@}
12236 Insert a normal interword space at which a line break may not occur.
12237 @end table
12238
12239 The pagination commands apply only to printed output, since other
12240 output formats do not have pages.
12241
12242 @table @code
12243 @item @@page
12244 Start a new page.
12245
12246 @item @@group
12247 Hold text together that must appear on one page.
12248
12249 @item @@need @var{mils}
12250 Start a new page if not enough space on this one.
12251 @end table
12252
12253
12254 @node Line Breaks
12255 @section @code{@@*} and @code{@@/}: Generate and Allow Line Breaks
12256
12257 @findex * @r{(force line break)}
12258 @findex / @r{(allow line break)}
12259 @cindex Line breaks, controlling
12260 @cindex Controlling line breaks
12261 @cindex Breaks in a line
12262 @cindex Force line break
12263 @cindex Allow line break
12264
12265 The @code{@@*} command forces a line break in all output formats.
12266 The @code{@@/} command allows a line break (printed manual only).
12267
12268 Here is an example with @code{@@*}:
12269
12270 @example
12271 This sentence is broken @@*into two lines.
12272 @end example
12273
12274 @noindent produces
12275
12276 @example
12277 @group
12278 This sentence is broken
12279 into two lines.
12280 @end group
12281 @end example
12282
12283 The @code{@@/} command can often be useful within urls
12284 (@pxref{@t{@@url}}), which tend to be long and are otherwise
12285 unbreakable. For example:
12286
12287 @example
12288 The official Texinfo home page is on the GNU web site:
12289 @@uref@{http://www.gnu.org/@@/software/@@/gnu/@@/texinfo@}.
12290 @end example
12291
12292 @noindent produces
12293
12294 @quotation
12295 The official Texinfo home page is on the GNU web site:
12296 @uref{http://www.gnu.org/@/software/@/gnu/@/texinfo}.
12297 @end quotation
12298
12299 @noindent Without the @code{@@/} commands, @TeX{} would have nowhere to
12300 break the url. @code{@@/} has no effect in other output formats.
12301
12302
12303 @node @t{@@- @@hyphenation}
12304 @section @code{@@-} and @code{@@hyphenation}: Helping @TeX{} Hyphenate
12305
12306 @anchor{- and hyphenation}@c old name
12307 @findex - @r{(discretionary hyphen)}
12308 @findex hyphenation
12309 @cindex Hyphenation, helping @TeX{} do
12310 @cindex Fine-tuning, and hyphenation
12311
12312 Although @TeX{}'s hyphenation algorithm is generally pretty good, it
12313 does miss useful hyphenation points from time to time. (Or, far more
12314 rarely, insert an incorrect hyphenation.) So, for documents with an
12315 unusual vocabulary or when fine-tuning for a printed edition, you may
12316 wish to help @TeX{} out. Texinfo supports two commands for this:
12317
12318 @table @code
12319 @item @@-
12320 Insert a discretionary hyphen, i.e., a place where @TeX{} can (but does
12321 not have to) hyphenate. This is especially useful when you notice an
12322 overfull hbox is due to @TeX{} missing a hyphenation (@pxref{Overfull
12323 hboxes}). @TeX{} will not insert any hyphenation points itself into a
12324 word containing @code{@@-}.
12325
12326 @item @@hyphenation@{@var{hy-phen-a-ted words}@}
12327 Tell @TeX{} how to hyphenate @var{hy-phen-a-ted words}. As shown, you
12328 put a @samp{-} at each hyphenation point. For example:
12329 @example
12330 @@hyphenation@{man-u-script man-u-scripts@}
12331 @end example
12332 @noindent @TeX{} only uses the specified hyphenation points when the
12333 words match exactly, so give all necessary variants, such as plurals.
12334 @end table
12335
12336 Info, HTML, and other non-@TeX{} output is not hyphenated, so none of
12337 these commands have any effect there.
12338
12339
12340 @node @t{@@allowcodebreaks}
12341 @section @code{@@allowcodebreaks}: Control Line Breaks in @code{@@code}
12342
12343 @anchor{allowcodebreaks}@c old name
12344 @findex allowcodebreaks
12345 @cindex Breaks, within @code{@@code}
12346 @cindex -, breakpoint within @code{@@code}
12347 @cindex Hyphen, breakpoint within @code{@@code}
12348 @cindex Dash, breakpoint within @code{@@code}
12349 @cindex _, breakpoint within @code{@@code}
12350 @cindex Underscore, breakpoint within @code{@@code}
12351
12352 Ordinarily, @TeX{} considers breaking lines at @samp{-} and @samp{_}
12353 characters within @code{@@code} and related commands
12354 (@pxref{@t{@@code}}), more or less as if they were ``empty''
12355 hyphenation points.
12356
12357 This is necessary since many manuals, especially for Lisp-family
12358 languages, must document very long identifiers. On the other hand,
12359 some manuals don't have this problems, and you may not wish to allow a
12360 line break at the underscore in, for example, @code{SIZE_MAX}, or even
12361 worse, after any of the four underscores in @code{__typeof__}.
12362
12363 So Texinfo provides this command:
12364
12365 @example
12366 @@allowcodebreaks false
12367 @end example
12368
12369 @noindent to prevent from breaking at @samp{-} or @samp{_} within
12370 @code{@@code}. You can go back to allowing such breaks with
12371 @code{@@allowcodebreaks true}. Write these commands on lines by
12372 themselves.
12373
12374 These commands can be given anywhere in the document. For example,
12375 you may have just one problematic paragraph where you need to turn off
12376 the breaks, but want them in general, or vice versa.
12377
12378 This command has no effect except in HTML and @TeX{} output.
12379
12380
12381 @node @t{@@w}
12382 @section @code{@@w}@{@var{text}@}: Prevent Line Breaks
12383
12384 @anchor{w}@c old name
12385 @findex w @r{(prevent line break)}
12386 @cindex Line breaks, preventing
12387
12388 @code{@@w@{@var{text}@}} outputs @var{text}, while prohibiting line
12389 breaks within @var{text}.
12390
12391 @cindex Non-breakable space, fixed
12392 @cindex Unbreakable space, fixed
12393 Thus, you can use @code{@@w} to produce a non-breakable space, fixed at
12394 the width of a normal interword space:
12395
12396 @example
12397 @@w@{ @} @@w@{ @} @@w@{ @} indentation.
12398 @end example
12399
12400 @noindent produces:
12401
12402 @display
12403 @w{ } @w{ } @w{ } indentation.
12404 @end display
12405
12406 The space from @code{@@w@{@w{ }@}}, as well as being non-breakable,
12407 also will not stretch or shrink. Sometimes that is what you want, for
12408 instance if you're doing manual indenting. However, usually you want
12409 a normal interword space that does stretch and shrink (in the printed
12410 output); for that, see the @code{@@tie} command in the next section.
12411
12412 @cindex Hyphenation, preventing
12413 You can also use the @code{@@w} command to prevent @TeX{} from
12414 automatically hyphenating a long name or phrase that happens to fall
12415 near the end of a line. @command{makeinfo} does not ever hyphenate
12416 words.
12417
12418 @cindex Keyword expansion, preventing
12419 @cindex Version control keywords, preventing expansion of
12420 @cindex $Id expansion, preventing
12421 You can also use @code{@@w} to avoid unwanted keyword expansion in
12422 source control systems. For example, to literally write @t{@w{$}Id$}
12423 in your document, use @code{@@w@{$@}Id$}. This trick isn't effective
12424 in Info or plain text output, though.
12425
12426
12427 @node @t{@@tie}
12428 @section @code{@@tie@{@}}: Inserting an Unbreakable Space
12429
12430 @anchor{tie}@c old name
12431 @findex tie @r{(unbreakable interword space)}
12432 @cindex Tied space
12433 @cindex Non-breakable space, variable
12434 @cindex Unbreakable space, variable
12435
12436 The @code{@@tie@{@}} command produces a normal interword space at which
12437 a line break may not occur. Always write it with following (empty)
12438 braces, as usual for commands used within a paragraph. Here's an
12439 example:
12440
12441 @example
12442 @@TeX@{@} was written by Donald E.@@tie@{@}Knuth.
12443 @end example
12444
12445 @noindent produces:
12446
12447 @display
12448 @TeX{} was written by Donald E.@tie{}Knuth.
12449 @end display
12450
12451 There are two important differences between @code{@@tie@{@}} and
12452 @code{@@w@{@w{ }@}}:
12453
12454 @itemize
12455 @item
12456 The space produced by @code{@@tie@{@}} will stretch and shrink slightly
12457 along with the normal interword spaces in the paragraph; the space
12458 produced by @code{@@w@{@w{ }@}} will not vary.
12459
12460 @item
12461 @code{@@tie@{@}} allows hyphenation of the surrounding words, while
12462 @code{@@w@{@w{ }@}} inhibits hyphenation of those words (for @TeX{}nical
12463 reasons, namely that it produces an @samp{\hbox}).
12464
12465 @end itemize
12466
12467
12468 @node @t{@@sp}
12469 @section @code{@@sp} @var{n}: Insert Blank Lines
12470
12471 @anchor{sp}@c old name
12472 @findex sp @r{(line spacing)}
12473 @cindex Space, inserting vertical
12474 @cindex Blank lines
12475 @cindex Line spacing
12476
12477 A line beginning with and containing only @code{@@sp @var{n}}
12478 generates @var{n} blank lines of space in both the printed manual and
12479 the Info file. @code{@@sp} also forces a paragraph break. For
12480 example,
12481
12482 @example
12483 @@sp 2
12484 @end example
12485
12486 @noindent
12487 generates two blank lines.
12488
12489 The @code{@@sp} command is most often used in the title page.
12490
12491
12492 @node @t{@@page}
12493 @section @code{@@page}: Start a New Page
12494
12495 @anchor{page}@c old name
12496 @findex page
12497 @cindex Page breaks, forcing
12498
12499 A line containing only @code{@@page} starts a new page in a printed
12500 manual. In other formats, without the concept of pages, it starts a
12501 new paragraph. An @code{@@page} command is often used in the
12502 @code{@@titlepage} section of a Texinfo file to start the copyright
12503 page.
12504
12505
12506 @node @t{@@group}
12507 @section @code{@@group}: Prevent Page Breaks
12508
12509 @anchor{group}@c old name
12510 @findex group
12511 @cindex Group (hold text together vertically)
12512 @cindex Holding text together vertically
12513 @cindex Vertically holding text together
12514
12515 The @code{@@group} command (on a line by itself) is used inside an
12516 @code{@@example} or similar construct to begin an unsplittable vertical
12517 group, which will appear entirely on one page in the printed output.
12518 The group is terminated by a line containing only @code{@@end group}.
12519 These two lines produce no output of their own, and in the Info file
12520 output they have no effect at all.
12521
12522 @c Once said that these environments
12523 @c turn off vertical spacing between ``paragraphs''.
12524 @c Also, quotation used to work, but doesn't in texinfo-2.72
12525 Although @code{@@group} would make sense conceptually in a wide
12526 variety of contexts, its current implementation works reliably only
12527 within @code{@@example} and variants, and within @code{@@display},
12528 @code{@@format}, @code{@@flushleft} and @code{@@flushright}.
12529 @xref{Quotations and Examples}. (What all these commands have in
12530 common is that each line of input produces a line of output.) In
12531 other contexts, @code{@@group} can cause anomalous vertical
12532 spacing.
12533
12534 @need 750
12535 This formatting requirement means that you should write:
12536
12537 @example
12538 @group
12539 @@example
12540 @@group
12541 @dots{}
12542 @@end group
12543 @@end example
12544 @end group
12545 @end example
12546
12547 @noindent
12548 with the @code{@@group} and @code{@@end group} commands inside the
12549 @code{@@example} and @code{@@end example} commands.
12550
12551 The @code{@@group} command is most often used to hold an example
12552 together on one page. In this Texinfo manual, more than 100 examples
12553 contain text that is enclosed between @code{@@group} and @code{@@end
12554 group}.
12555
12556 If you forget to end a group, you may get strange and unfathomable
12557 error messages when you run @TeX{}. This is because @TeX{} keeps
12558 trying to put the rest of the Texinfo file onto the one page and does
12559 not start to generate error messages until it has processed
12560 considerable text. It is a good rule of thumb to look for a missing
12561 @code{@@end group} if you get incomprehensible error messages in
12562 @TeX{}.
12563
12564
12565 @node @t{@@need}
12566 @section @code{@@need @var{mils}}: Prevent Page Breaks
12567
12568 @anchor{need}@c old name
12569 @findex need
12570 @cindex Need space at page bottom
12571 @cindex Mils, argument to @code{@@need}
12572
12573 A line containing only @code{@@need @var{n}} starts a new page in a
12574 printed manual if fewer than @var{n} mils (thousandths of an inch)
12575 remain on the current page. Do not use braces around the argument
12576 @var{n}. The @code{@@need} command has no effect on other output
12577 formats since they are not paginated.
12578
12579 @need 800
12580 This paragraph is preceded by an @code{@@need} command that tells
12581 @TeX{} to start a new page if fewer than 800 mils (eight-tenths
12582 inch) remain on the page. It looks like this:
12583
12584 @example
12585 @group
12586 @@need 800
12587 This paragraph is preceded by @dots{}
12588 @end group
12589 @end example
12590
12591 @cindex Orphans, preventing
12592 The @code{@@need} command is useful for preventing orphans: single
12593 lines at the bottoms of printed pages.
12594
12595
12596 @node Definition Commands
12597 @chapter Definition Commands
12598 @cindex Definition commands
12599
12600 The @code{@@deffn} command and the other @dfn{definition commands}
12601 enable you to describe functions, variables, macros, commands, user
12602 options, special forms and other such artifacts in a uniform
12603 format.
12604
12605 In the Info file, a definition causes the entity
12606 category---`Function', `Variable', or whatever---to appear at the
12607 beginning of the first line of the definition, followed by the
12608 entity's name and arguments. In the printed manual, the command
12609 causes @TeX{} to print the entity's name and its arguments on the left
12610 margin and print the category next to the right margin. In both
12611 output formats, the body of the definition is indented. Also, the
12612 name of the entity is entered into the appropriate index:
12613 @code{@@deffn} enters the name into the index of functions,
12614 @code{@@defvr} enters it into the index of variables, and so
12615 on (@pxref{Predefined Indices}).
12616
12617 A manual need not and should not contain more than one definition for
12618 a given name. An appendix containing a summary should use
12619 @code{@@table} rather than the definition commands.
12620
12621 @menu
12622 * Def Cmd Template:: Writing descriptions using definition commands.
12623 * Def Cmd Continuation Lines:: Continuing the heading over source lines.
12624 * Optional Arguments:: Handling optional and repeated arguments.
12625 * @t{@@deffnx}:: Group two or more `first' lines.
12626 * Def Cmds in Detail:: Reference for all the definition commands.
12627 * Def Cmd Conventions:: Conventions for writing definitions.
12628 * Sample Function Definition:: An example.
12629 @end menu
12630
12631
12632 @node Def Cmd Template
12633 @section The Template for a Definition
12634 @cindex Definition template
12635 @cindex Template for a definition
12636
12637 The @code{@@deffn} command is used for definitions of entities that
12638 resemble functions. To write a definition using the @code{@@deffn}
12639 command, write the @code{@@deffn} command at the beginning of a line
12640 and follow it on the same line by the category of the entity, the name
12641 of the entity itself, and its arguments (if any). Then write the body
12642 of the definition on succeeding lines. (You may embed examples in the
12643 body.) Finally, end the definition with an @code{@@end deffn} command
12644 written on a line of its own.
12645
12646 The other definition commands follow the same format: a line with the
12647 @code{@@def@dots{}} command and whatever arguments are appropriate for
12648 that command; the body of the definition; and a corresponding
12649 @code{@@end} line.
12650
12651 The template for a definition looks like this:
12652
12653 @example
12654 @group
12655 @@deffn @var{category} @var{name} @var{arguments}@dots{}
12656 @var{body-of-definition}
12657 @@end deffn
12658 @end group
12659 @end example
12660
12661 @need 700
12662 @noindent
12663 For example,
12664
12665 @example
12666 @group
12667 @@deffn Command forward-word count
12668 This command moves point forward @@var@{count@} words
12669 (or backward if @@var@{count@} is negative). @dots{}
12670 @@end deffn
12671 @end group
12672 @end example
12673
12674 @noindent
12675 produces
12676
12677 @quotation
12678 @deffn Command forward-word count
12679 This command moves point forward @var{count} words
12680 (or backward if @var{count} is negative). @dots{}
12681 @end deffn
12682 @end quotation
12683
12684 Capitalize the category name like a title. If the name of the
12685 category contains spaces, as in the phrase `Interactive Command',
12686 enclose it in braces. For example:
12687
12688 @example
12689 @group
12690 @@deffn @{Interactive Command@} isearch-forward
12691 @dots{}
12692 @@end deffn
12693 @end group
12694 @end example
12695
12696 @noindent
12697 Otherwise, the second word will be mistaken for the name of the
12698 entity. As a general rule, when any of the arguments in the heading
12699 line @emph{except} the last one are more than one word, you need to
12700 enclose them in braces. This may also be necessary if the text
12701 contains commands, for example, @samp{@{declaraci@@'on@}} if you are
12702 writing in Spanish.
12703
12704 Some of the definition commands are more general than others. The
12705 @code{@@deffn} command, for example, is the general definition command
12706 for functions and the like---for entities that may take arguments.
12707 When you use this command, you specify the category to which the
12708 entity belongs. Three predefined, specialized variations
12709 (@code{@@defun}, @code{@@defmac}, and @code{@@defspec}) specify the
12710 category for you: ``Function'', ``Macro'', and ``Special Form''
12711 respectively. (In Lisp, a special form is an entity much like a
12712 function.) Similarly, the general @code{@@defvr} command is
12713 accompanied by several specialized variations for describing
12714 particular kinds of variables.
12715
12716 @xref{Sample Function Definition}, for a detailed example of a
12717 function definition, including the use of @code{@@example} inside the
12718 definition.
12719
12720
12721 @node Def Cmd Continuation Lines
12722 @section Definition Command Continuation Lines
12723 @cindex Continuation lines in definition commands
12724 @cindex Definition command headings, continuing
12725 @cindex @samp{@@} as continuation in definition commands
12726
12727 The heading line of a definition command can get very long.
12728 Therefore, Texinfo has a special syntax allowing them to be continued
12729 over multiple lines of the source file: a lone @samp{@@} at the end of
12730 each line to be continued. Here's an example:
12731
12732 @example
12733 @@defun fn-name @@
12734 arg1 arg2 arg3
12735 This is the basic continued defun.
12736 @@end defun
12737 @end example
12738
12739 @noindent produces:
12740
12741 @defun fn-name arg1 arg2 arg3
12742 This is the basic continued defun.
12743 @end defun
12744
12745 @noindent
12746 As you can see, the continued lines are combined, as if they had been
12747 typed on one source line.
12748
12749 Although this example only shows a one-line continuation,
12750 continuations may extend over any number of lines, in the same way;
12751 put an @code{@@} at the end of each line to be continued.
12752
12753 @cindex Whitespace, collapsed around continuations
12754 @cindex Collapsing whitespace around continuations
12755 In general, any number of spaces or tabs before the @code{@@}
12756 continuation character are collapsed into a single space. There is one
12757 exception: the Texinfo processors will not fully collapse whitespace
12758 around a continuation inside braces. For example:
12759
12760 @example
12761 @@deffn @{Category @@
12762 Name@} @dots{}
12763 @end example
12764
12765 @noindent The output (not shown) has excess space between `Category'
12766 and `Name'. To avoid this, elide the unwanted whitespace in your
12767 input, or put the continuation @code{@@} outside braces.
12768
12769 @code{@@} does not function as a continuation character in @emph{any}
12770 other context. Ordinarily, @samp{@@} followed by a whitespace
12771 character (space, tab, newline) produces a normal interword space
12772 (@pxref{Multiple Spaces}).
12773
12774
12775 @node Optional Arguments
12776 @section Optional and Repeated Arguments
12777 @cindex Optional and repeated arguments
12778 @cindex Repeated and optional arguments
12779 @cindex Arguments, repeated and optional
12780 @cindex Syntax, optional & repeated arguments
12781 @cindex Meta-syntactic chars for arguments
12782
12783 @c This is consistent with the XEmacs Lisp Reference Manual.
12784 Some entities take optional or repeated arguments, conventionally
12785 specified by using square brackets and ellipses: an argument enclosed
12786 within square brackets is optional, and an argument followed by an
12787 ellipsis is optional and may be repeated more than once.
12788
12789 Thus, [@var{optional-arg}] means that @var{optional-arg} is optional
12790 and @var{repeated-args}@samp{@dots{}} stands for zero or more
12791 arguments. Parentheses are used when several arguments are grouped
12792 into additional levels of list structure in Lisp.
12793
12794 Here is the @code{@@defspec} line of an example of an imaginary
12795 (complicated) special form:
12796
12797 @quotation
12798 @defspec foobar (@var{var} [@var{from} @var{to} [@var{inc}]]) @var{body}@dots{}
12799 @end defspec
12800 @c tex
12801 @c \vskip \parskip
12802 @c end tex
12803 @end quotation
12804
12805 @noindent
12806 In this example, the arguments @var{from} and @var{to} are optional,
12807 but must both be present or both absent. If they are present,
12808 @var{inc} may optionally be specified as well. These arguments are
12809 grouped with the argument @var{var} into a list, to distinguish them
12810 from @var{body}, which includes all remaining elements of the
12811 form.
12812
12813 In a Texinfo source file, this @code{@@defspec} line is written like
12814 this, including a continuation to avoid a long source line.
12815
12816 @example
12817 @group
12818 @@defspec foobar (@@var@{var@} [@@var@{from@} @@var@{to@} @@
12819 [@@var@{inc@}]]) @@var@{body@}@@dots@{@}
12820 @end group
12821 @end example
12822
12823 @noindent
12824 The function is listed in the Command and Variable Index under
12825 @samp{foobar}.
12826
12827
12828 @node @t{@@deffnx}
12829 @section @code{@@deffnx}, et al.: Two or More `First' Lines
12830
12831 @anchor{deffnx}@c old node
12832 @findex deffnx
12833 @cindex Two `First' Lines for @code{@@deffn}
12834 @cindex Grouping two definitions together
12835 @cindex Definitions grouped together
12836
12837 To create two or more `first' or header lines for a definition, follow
12838 the first @code{@@deffn} line by a line beginning with
12839 @code{@@deffnx}. The @code{@@deffnx} command works exactly like
12840 @code{@@deffn} except that it does not generate extra vertical white
12841 space between it and the preceding line.
12842
12843 @need 1000
12844 For example,
12845
12846 @example
12847 @group
12848 @@deffn @{Interactive Command@} isearch-forward
12849 @@deffnx @{Interactive Command@} isearch-backward
12850 These two search commands are similar except @dots{}
12851 @@end deffn
12852 @end group
12853 @end example
12854
12855 @noindent
12856 produces
12857
12858 @deffn {Interactive Command} isearch-forward
12859 @deffnx {Interactive Command} isearch-backward
12860 These two search commands are similar except @dots{}
12861 @end deffn
12862
12863 Each definition command has an `x' form: @code{@@defunx},
12864 @code{@@defvrx}, @code{@@deftypefunx}, etc.
12865
12866 The `x' forms work similarly to @code{@@itemx}
12867 (@pxref{@t{@@itemx}}).
12868
12869
12870 @node Def Cmds in Detail
12871 @section The Definition Commands
12872
12873 Texinfo provides more than a dozen definition commands, all of which
12874 are described in this section.
12875
12876 The definition commands automatically enter the name of the entity in
12877 the appropriate index: for example, @code{@@deffn}, @code{@@defun},
12878 and @code{@@defmac} enter function names in the index of functions;
12879 @code{@@defvr} and @code{@@defvar} enter variable names in the index
12880 of variables.
12881
12882 Although the examples that follow mostly illustrate Lisp, the commands
12883 can be used for other programming languages.
12884
12885 @menu
12886 * Functions Commands:: Commands for functions and similar entities.
12887 * Variables Commands:: Commands for variables and similar entities.
12888 * Typed Functions:: Commands for functions in typed languages.
12889 * Typed Variables:: Commands for variables in typed languages.
12890 * Data Types:: The definition command for data types.
12891 * Abstract Objects:: Commands for object-oriented programming.
12892 @end menu
12893
12894 @node Functions Commands
12895 @subsection Functions and Similar Entities
12896
12897 This section describes the commands for describing functions and similar
12898 entities:
12899
12900 @table @code
12901 @findex deffn
12902 @item @@deffn @var{category} @var{name} @var{arguments}@dots{}
12903 The @code{@@deffn} command is the general definition command for
12904 functions, interactive commands, and similar entities that may take
12905 arguments. You must choose a term to describe the category of entity
12906 being defined; for example, ``Function'' could be used if the entity is
12907 a function. The @code{@@deffn} command is written at the beginning of a
12908 line and is followed on the same line by the category of entity being
12909 described, the name of this particular entity, and its arguments, if
12910 any. Terminate the definition with @code{@@end deffn} on a line of its
12911 own.
12912
12913 @need 750
12914 For example, here is a definition:
12915
12916 @example
12917 @group
12918 @@deffn Command forward-char nchars
12919 Move point forward @@var@{nchars@} characters.
12920 @@end deffn
12921 @end group
12922 @end example
12923
12924 @noindent
12925 This shows a rather terse definition for a ``command'' named
12926 @code{forward-char} with one argument, @var{nchars}.
12927
12928 @code{@@deffn} prints argument names such as @var{nchars} in slanted
12929 type in the printed output, because we think of these names as
12930 metasyntactic variables---they stand for the actual argument values.
12931 Within the text of the description, however, write an argument name
12932 explicitly with @code{@@var} to refer to the value of the argument.
12933 In the example above, we used @samp{@@var@{nchars@}} in this way.
12934
12935 In the extremely unusual case when an argument name contains
12936 @samp{--}, or another character sequence which is treated specially
12937 (@pxref{Conventions}), use @code{@@code} around the special
12938 characters. This avoids the conversion to typographic en-dashes and
12939 em-dashes.
12940 @c @var also works; that's what we used to recommend.
12941
12942 The template for @code{@@deffn} is:
12943
12944 @example
12945 @group
12946 @@deffn @var{category} @var{name} @var{arguments}@dots{}
12947 @var{body-of-definition}
12948 @@end deffn
12949 @end group
12950 @end example
12951
12952 @findex defun
12953 @item @@defun @var{name} @var{arguments}@dots{}
12954 The @code{@@defun} command is the definition command for functions.
12955 @code{@@defun} is equivalent to @samp{@@deffn Function @dots{}}.
12956 Terminate the definition with @code{@@end defun} on a line of its own.
12957 Thus, the template is:
12958
12959 @example
12960 @group
12961 @@defun @var{function-name} @var{arguments}@dots{}
12962 @var{body-of-definition}
12963 @@end defun
12964 @end group
12965 @end example
12966
12967 @findex defmac
12968 @item @@defmac @var{name} @var{arguments}@dots{}
12969 The @code{@@defmac} command is the definition command for macros.
12970 @code{@@defmac} is equivalent to @samp{@@deffn Macro @dots{}} and
12971 works like @code{@@defun}.
12972
12973 @findex defspec
12974 @item @@defspec @var{name} @var{arguments}@dots{}
12975 The @code{@@defspec} command is the definition command for special
12976 forms. (In Lisp, a special form is an entity much like a function;
12977 @pxref{Special Forms,,, lispref, XEmacs Lisp Reference Manual}.)
12978 @code{@@defspec} is equivalent to @samp{@@deffn @{Special Form@}
12979 @dots{}} and works like @code{@@defun}.
12980 @end table
12981
12982 All these commands create entries in the index of functions.
12983
12984
12985 @node Variables Commands
12986 @subsection Variables and Similar Entities
12987
12988 Here are the commands for defining variables and similar
12989 entities:
12990
12991 @table @code
12992 @findex defvr
12993 @item @@defvr @var{category} @var{name}
12994 The @code{@@defvr} command is a general definition command for
12995 something like a variable---an entity that records a value. You must
12996 choose a term to describe the category of entity being defined; for
12997 example, ``Variable'' could be used if the entity is a variable.
12998 Write the @code{@@defvr} command at the beginning of a line and
12999 follow it on the same line by the category of the entity and the
13000 name of the entity.
13001
13002 We recommend capitalizing the category name like a title. If the name
13003 of the category contains spaces, as in the name ``User Option'',
13004 enclose it in braces. Otherwise, the second word will be mistaken for
13005 the name of the entity. For example,
13006
13007 @example
13008 @group
13009 @@defvr @{User Option@} fill-column
13010 This buffer-local variable specifies
13011 the maximum width of filled lines.
13012 @dots{}
13013 @@end defvr
13014 @end group
13015 @end example
13016
13017 Terminate the definition with @code{@@end defvr} on a line of its
13018 own.
13019
13020 The template is:
13021
13022 @example
13023 @group
13024 @@defvr @var{category} @var{name}
13025 @var{body-of-definition}
13026 @@end defvr
13027 @end group
13028 @end example
13029
13030 @code{@@defvr} creates an entry in the index of variables for @var{name}.
13031
13032 @findex defvar
13033 @item @@defvar @var{name}
13034 The @code{@@defvar} command is the definition command for variables.
13035 @code{@@defvar} is equivalent to @samp{@@defvr Variable
13036 @dots{}}.
13037
13038 @need 750
13039 For example:
13040
13041 @example
13042 @group
13043 @@defvar kill-ring
13044 @dots{}
13045 @@end defvar
13046 @end group
13047 @end example
13048
13049 The template is:
13050
13051 @example
13052 @group
13053 @@defvar @var{name}
13054 @var{body-of-definition}
13055 @@end defvar
13056 @end group
13057 @end example
13058
13059 @code{@@defvar} creates an entry in the index of variables for
13060 @var{name}.
13061
13062 @findex defopt
13063 @item @@defopt @var{name}
13064 @cindex User options, marking
13065 The @code{@@defopt} command is the definition command for @dfn{user
13066 options}, i.e., variables intended for users to change according to
13067 taste; XEmacs has many such (@pxref{Variables,,, xemacs, XEmacs User's
13068 Manual}). @code{@@defopt} is equivalent to @samp{@@defvr @{User
13069 Option@} @dots{}} and works like @code{@@defvar}. It creates an entry
13070 in the index of variables.
13071 @end table
13072
13073
13074 @node Typed Functions
13075 @subsection Functions in Typed Languages
13076
13077 @cindex Typed functions
13078 @cindex Functions, in typed languages
13079
13080 The @code{@@deftypefn} command and its variations are for describing
13081 functions in languages in which you must declare types of variables
13082 and functions, such as C and C++.
13083
13084 @table @code
13085 @findex deftypefn
13086 @item @@deftypefn @var{category} @var{data-type} @var{name} @var{arguments}@dots{}
13087 The @code{@@deftypefn} command is the general definition command for
13088 functions and similar entities that may take arguments and that are
13089 typed. The @code{@@deftypefn} command is written at the beginning of
13090 a line and is followed on the same line by the category of entity
13091 being described, the type of the returned value, the name of this
13092 particular entity, and its arguments, if any.
13093
13094 @need 800
13095 @noindent
13096 For example,
13097
13098 @example
13099 @group
13100 @@deftypefn @{Library Function@} int foobar @@
13101 (int @@var@{foo@}, float @@var@{bar@})
13102 @dots{}
13103 @@end deftypefn
13104 @end group
13105 @end example
13106
13107 produces:
13108
13109 @quotation
13110 @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
13111 @dots{}
13112 @end deftypefn
13113 @end quotation
13114
13115 This means that @code{foobar} is a ``library function'' that returns an
13116 @code{int}, and its arguments are @var{foo} (an @code{int}) and
13117 @var{bar} (a @code{float}).
13118
13119 Since in typed languages, the actual names of the arguments are
13120 typically scattered among data type names and keywords, Texinfo cannot
13121 find them without help. You can either (a)@tie{}write everything as
13122 straight text, and it will be printed in slanted type; (b)@tie{}use
13123 @code{@@var} for the variable names, which will uppercase the variable
13124 names in Info and use the slanted typewriter font in printed output;
13125 (c)@tie{}use @code{@@var} for the variable names and @code{@@code} for
13126 the type names and keywords, which will be dutifully obeyed.
13127
13128 The template for @code{@@deftypefn} is:
13129
13130 @example
13131 @group
13132 @@deftypefn @var{category} @var{data-type} @var{name} @var{arguments} @dots{}
13133 @var{body-of-description}
13134 @@end deftypefn
13135 @end group
13136 @end example
13137
13138 @noindent
13139 Note that if the @var{category} or @var{data type} is more than one
13140 word then it must be enclosed in braces to make it a single argument.
13141
13142 If you are describing a procedure in a language that has packages,
13143 such as Ada, you might consider using @code{@@deftypefn} in a manner
13144 somewhat contrary to the convention described in the preceding
13145 paragraphs. For example:
13146
13147 @example
13148 @group
13149 @@deftypefn stacks private push @@
13150 (@@var@{s@}:in out stack; @@
13151 @@var@{n@}:in integer)
13152 @dots{}
13153 @@end deftypefn
13154 @end group
13155 @end example
13156
13157 @noindent
13158 (In these examples the @code{@@deftypefn} arguments are shown using
13159 continuations (@pxref{Def Cmd Continuation Lines}), but could be on a
13160 single line.)
13161
13162 In this instance, the procedure is classified as belonging to the
13163 package @code{stacks} rather than classified as a `procedure' and its
13164 data type is described as @code{private}. (The name of the procedure
13165 is @code{push}, and its arguments are @var{s} and @var{n}.)
13166
13167 @code{@@deftypefn} creates an entry in the index of functions for
13168 @var{name}.
13169
13170 @item @@deftypefun @var{data-type} @var{name} @var{arguments}@dots{}
13171 @findex deftypefun
13172 The @code{@@deftypefun} command is the specialized definition command
13173 for functions in typed languages. The command is equivalent to
13174 @samp{@@deftypefn Function @dots{}}. The template is:
13175
13176 @example
13177 @group
13178 @@deftypefun @var{type} @var{name} @var{arguments}@dots{}
13179 @var{body-of-description}
13180 @@end deftypefun
13181 @end group
13182 @end example
13183
13184 @code{@@deftypefun} creates an entry in the index of functions for
13185 @var{name}.
13186
13187 @end table
13188
13189 @cindex Return type, own line for
13190 @findex deftypefnnewline
13191 Ordinarily, the return type is printed on the same line as the
13192 function name and arguments, as shown above. In source code, GNU
13193 style is to put the return type on a line by itself. So Texinfo
13194 provides an option to do that: @code{@@deftypefnnewline on}.
13195
13196 This affects typed functions only---not untyped functions, not typed
13197 variables, etc.. Specifically, it affects the commands in this
13198 section, and the analogous commands for object-oriented languages,
13199 namely @code{@@deftypeop} and @code{@@deftypemethod}
13200 (@pxref{Object-Oriented Methods}).
13201
13202 Specifying @code{@@deftypefnnewline off} reverts to the default.
13203
13204
13205 @node Typed Variables
13206 @subsection Variables in Typed Languages
13207
13208 @cindex Typed variables
13209 @cindex Variables, in typed languages
13210
13211 Variables in typed languages are handled in a manner similar to
13212 functions in typed languages. @xref{Typed Functions}. The general
13213 definition command @code{@@deftypevr} corresponds to
13214 @code{@@deftypefn} and the specialized definition command
13215 @code{@@deftypevar} corresponds to @code{@@deftypefun}.
13216
13217 @table @code
13218 @findex deftypevr
13219 @item @@deftypevr @var{category} @var{data-type} @var{name}
13220 The @code{@@deftypevr} command is the general definition command for
13221 something like a variable in a typed language---an entity that records
13222 a value. You must choose a term to describe the category of the
13223 entity being defined; for example, ``Variable'' could be used if the
13224 entity is a variable.
13225
13226 The @code{@@deftypevr} command is written at the beginning of a line
13227 and is followed on the same line by the category of the entity
13228 being described, the data type, and the name of this particular
13229 entity.
13230
13231 @need 800
13232 @noindent
13233 For example:
13234
13235 @example
13236 @group
13237 @@deftypevr @{Global Flag@} int enable
13238 @dots{}
13239 @@end deftypevr
13240 @end group
13241 @end example
13242
13243 @noindent
13244 produces the following:
13245
13246 @quotation
13247 @deftypevr {Global Flag} int enable
13248 @dots{}
13249 @end deftypevr
13250 @end quotation
13251
13252 @need 800
13253 The template is:
13254
13255 @example
13256 @@deftypevr @var{category} @var{data-type} @var{name}
13257 @var{body-of-description}
13258 @@end deftypevr
13259 @end example
13260
13261 @findex deftypevar
13262 @item @@deftypevar @var{data-type} @var{name}
13263 The @code{@@deftypevar} command is the specialized definition command
13264 for variables in typed languages. @code{@@deftypevar} is equivalent
13265 to @samp{@@deftypevr Variable @dots{}}. The template is:
13266
13267 @example
13268 @group
13269 @@deftypevar @var{data-type} @var{name}
13270 @var{body-of-description}
13271 @@end deftypevar
13272 @end group
13273 @end example
13274 @end table
13275
13276 These commands create entries in the index of variables.
13277
13278
13279 @node Data Types
13280 @subsection Data Types
13281
13282 Here is the command for data types:
13283
13284 @table @code
13285 @findex deftp
13286 @item @@deftp @var{category} @var{name} @var{attributes}@dots{}
13287 The @code{@@deftp} command is the generic definition command for data
13288 types. The command is written at the beginning of a line and is
13289 followed on the same line by the category, by the name of the type
13290 (which is a word like @code{int} or @code{float}), and then by names of
13291 attributes of objects of that type. Thus, you could use this command
13292 for describing @code{int} or @code{float}, in which case you could use
13293 @code{data type} as the category. (A data type is a category of
13294 certain objects for purposes of deciding which operations can be
13295 performed on them.)
13296
13297 In Lisp, for example, @dfn{pair} names a particular data
13298 type, and an object of that type has two slots called the
13299 @sc{car} and the @sc{cdr}. Here is how you would write the first line
13300 of a definition of @code{pair}.
13301
13302 @example
13303 @group
13304 @@deftp @{Data type@} pair car cdr
13305 @dots{}
13306 @@end deftp
13307 @end group
13308 @end example
13309
13310 @need 950
13311 The template is:
13312
13313 @example
13314 @group
13315 @@deftp @var{category} @var{name-of-type} @var{attributes}@dots{}
13316 @var{body-of-definition}
13317 @@end deftp
13318 @end group
13319 @end example
13320
13321 @code{@@deftp} creates an entry in the index of data types.
13322 @end table
13323
13324
13325 @node Abstract Objects
13326 @subsection Object-Oriented Programming
13327
13328 @cindex Object-oriented programming
13329
13330 Here are the commands for formatting descriptions about abstract
13331 objects, such as are used in object-oriented programming. A class is
13332 a defined type of abstract object. An instance of a class is a
13333 particular object that has the type of the class. An instance
13334 variable is a variable that belongs to the class but for which each
13335 instance has its own value.
13336
13337 @menu
13338 * Variables: Object-Oriented Variables.
13339 * Methods: Object-Oriented Methods.
13340 @end menu
13341
13342
13343 @node Object-Oriented Variables
13344 @subsubsection Object-Oriented Variables
13345
13346 @cindex Variables, object-oriented
13347
13348 These commands allow you to define different sorts of variables in
13349 object-oriented programming languages.
13350
13351 @table @code
13352 @item @@defcv @var{category} @var{class} @var{name}
13353 @findex defcv
13354 The @code{@@defcv} command is the general definition command for
13355 variables associated with classes in object-oriented programming. The
13356 @code{@@defcv} command is followed by three arguments: the category of
13357 thing being defined, the class to which it belongs, and its
13358 name. For instance:
13359
13360 @example
13361 @group
13362 @@defcv @{Class Option@} Window border-pattern
13363 @dots{}
13364 @@end defcv
13365 @end group
13366 @end example
13367
13368 @noindent produces:
13369 @defcv {Class Option} Window border-pattern
13370 @dots{}
13371 @end defcv
13372
13373 @code{@@defcv} creates an entry in the index of variables.
13374
13375 @item @@deftypecv @var{category} @var{class} @var{data-type} @var{name}
13376 @findex deftypecv
13377 The @code{@@deftypecv} command is the definition command for typed
13378 class variables in object-oriented programming. It is analogous to
13379 @code{@@defcv} with the addition of the @var{data-type} parameter to
13380 specify the type of the instance variable. Ordinarily, the data type
13381 is a programming language construct that should be marked with
13382 @code{@@code}. For instance:
13383
13384 @example
13385 @group
13386 @@deftypecv @{Class Option@} Window @@code@{int@} border-pattern
13387 @dots{}
13388 @@end deftypecv
13389 @end group
13390 @end example
13391
13392 @noindent produces:
13393
13394 @deftypecv {Class Option} Window @code{int} border-pattern
13395 @dots{}
13396 @end deftypecv
13397
13398 @code{@@deftypecv} creates an entry in the index of variables.
13399
13400 @item @@defivar @var{class} @var{name}
13401 @findex defivar
13402 The @code{@@defivar} command is the definition command for instance
13403 variables in object-oriented programming. @code{@@defivar} is
13404 equivalent to @samp{@@defcv @{Instance Variable@} @dots{}}. For
13405 instance:
13406
13407 @example
13408 @group
13409 @@defivar Window border-pattern
13410 @dots{}
13411 @@end defivar
13412 @end group
13413 @end example
13414
13415 @noindent produces:
13416
13417 @defivar Window border-pattern
13418 @dots{}
13419 @end defivar
13420
13421 @code{@@defivar} creates an entry in the index of variables.
13422
13423 @item @@deftypeivar @var{class} @var{data-type} @var{name}
13424 @findex deftypeivar
13425 The @code{@@deftypeivar} command is the definition command for typed
13426 instance variables in object-oriented programming. It is analogous to
13427 @code{@@defivar} with the addition of the @var{data-type} parameter to
13428 specify the type of the instance variable. Ordinarily, the data type
13429 is a programming language construct that should be marked with
13430 @code{@@code}. For instance:
13431
13432 @example
13433 @group
13434 @@deftypeivar Window @@code@{int@} border-pattern
13435 @dots{}
13436 @@end deftypeivar
13437 @end group
13438 @end example
13439
13440 @noindent produces:
13441
13442 @deftypeivar Window @code{int} border-pattern
13443 @dots{}
13444 @end deftypeivar
13445
13446 @code{@@deftypeivar} creates an entry in the index of variables.
13447
13448 @end table
13449
13450
13451 @node Object-Oriented Methods
13452 @subsubsection Object-Oriented Methods
13453
13454 @cindex Methods, object-oriented
13455
13456 These commands allow you to define different sorts of function-like
13457 entities resembling methods in object-oriented programming languages.
13458 These entities take arguments, as functions do, but are associated with
13459 particular classes of objects.
13460
13461 @table @code
13462
13463 @findex defop
13464 @item @@defop @var{category} @var{class} @var{name} @var{arguments}@dots{}
13465 The @code{@@defop} command is the general definition command for these
13466 method-like entities.
13467
13468 For example, some systems have constructs called @dfn{wrappers} that
13469 are associated with classes as methods are, but that act more like
13470 macros than like functions. You could use @code{@@defop Wrapper} to
13471 describe one of these.
13472
13473 Sometimes it is useful to distinguish methods and @dfn{operations}.
13474 You can think of an operation as the specification for a method.
13475 Thus, a window system might specify that all window classes have a
13476 method named @code{expose}; we would say that this window system
13477 defines an @code{expose} operation on windows in general. Typically,
13478 the operation has a name and also specifies the pattern of arguments;
13479 all methods that implement the operation must accept the same
13480 arguments, since applications that use the operation do so without
13481 knowing which method will implement it.
13482
13483 Often it makes more sense to document operations than methods. For
13484 example, window application developers need to know about the
13485 @code{expose} operation, but need not be concerned with whether a
13486 given class of windows has its own method to implement this operation.
13487 To describe this operation, you would write:
13488
13489 @example
13490 @@defop Operation windows expose
13491 @end example
13492
13493 The @code{@@defop} command is written at the beginning of a line and
13494 is followed on the same line by the overall name of the category of
13495 operation, the name of the class of the operation, the name of the
13496 operation, and its arguments, if any.
13497
13498 The template is:
13499 @example
13500 @group
13501 @@defop @var{category} @var{class} @var{name} @var{arguments}@dots{}
13502 @var{body-of-definition}
13503 @@end defop
13504 @end group
13505 @end example
13506
13507 @code{@@defop} creates an entry, such as `@code{expose} on
13508 @code{windows}', in the index of functions.
13509
13510 @findex deftypeop
13511 @item @@deftypeop @var{category} @var{class} @var{data-type} @var{name} @var{arguments}@dots{}
13512 The @code{@@deftypeop} command is the definition command for typed
13513 operations in object-oriented programming. It is similar to
13514 @code{@@defop} with the addition of the @var{data-type} parameter to
13515 specify the return type of the method. @code{@@deftypeop} creates an
13516 entry in the index of functions.
13517
13518 @item @@defmethod @var{class} @var{name} @var{arguments}@dots{}
13519 @findex defmethod
13520 The @code{@@defmethod} command is the definition command for methods
13521 in object-oriented programming. A method is a kind of function that
13522 implements an operation for a particular class of objects and its
13523 subclasses.
13524 @ignore
13525 @c ADR: Who cares?!?
13526 @c KB: Oh, I don't know, I think this info is crucial!
13527 In the Lisp Machine, methods actually were functions, but
13528 they were usually defined with @code{defmethod}.
13529 @end ignore
13530
13531 @code{@@defmethod} is equivalent to @samp{@@defop Method @dots{}}.
13532 The command is written at the beginning of a line and is followed by
13533 the name of the class of the method, the name of the method, and its
13534 arguments, if any.
13535
13536 @noindent
13537 For example:
13538 @example
13539 @group
13540 @@defmethod @code{bar-class} bar-method argument
13541 @dots{}
13542 @@end defmethod
13543 @end group
13544 @end example
13545
13546 @noindent
13547 illustrates the definition for a method called @code{bar-method} of
13548 the class @code{bar-class}. The method takes an argument.
13549
13550 @code{@@defmethod} creates an entry in the index of functions.
13551
13552 @item @@deftypemethod @var{class} @var{data-type} @var{name} @var{arguments}@dots{}
13553 @findex defmethod
13554 The @code{@@deftypemethod} command is the definition command for methods
13555 in object-oriented typed languages, such as C++ and Java. It is similar
13556 to the @code{@@defmethod} command with the addition of the
13557 @var{data-type} parameter to specify the return type of the method.
13558 @code{@@deftypemethod} creates an entry in the index of functions.
13559
13560 @end table
13561
13562 The typed commands are affected by the @code{@@deftypefnnewline}
13563 option (@pxref{Typed Functions,, Functions in Typed Languages}).
13564
13565
13566 @node Def Cmd Conventions
13567 @section Conventions for Writing Definitions
13568 @cindex Definition conventions
13569 @cindex Conventions for writing definitions
13570
13571 When you write a definition using @code{@@deffn}, @code{@@defun}, or
13572 one of the other definition commands, please take care to use
13573 arguments that indicate the meaning, as with the @var{count} argument
13574 to the @code{forward-word} function. Also, if the name of an argument
13575 contains the name of a type, such as @var{integer}, take care that the
13576 argument actually is of that type.
13577
13578
13579 @node Sample Function Definition
13580 @section A Sample Function Definition
13581 @cindex Function definitions
13582 @cindex Command definitions
13583 @cindex Macro definitions, programming-language
13584 @cindex Sample function definition
13585
13586 A function definition uses the @code{@@defun} and @code{@@end defun}
13587 commands. The name of the function follows immediately after the
13588 @code{@@defun} command and it is followed, on the same line, by the
13589 parameter list.
13590
13591 Here is a definition from @ref{Calling Functions,,, lispref, XEmacs Lisp
13592 Reference Manual}.
13593
13594 @quotation
13595 @defun apply function &rest arguments
13596 @code{apply} calls @var{function} with @var{arguments}, just
13597 like @code{funcall} but with one difference: the last of
13598 @var{arguments} is a list of arguments to give to
13599 @var{function}, rather than a single argument. We also say
13600 that this list is @dfn{appended} to the other arguments.
13601
13602 @code{apply} returns the result of calling @var{function}.
13603 As with @code{funcall}, @var{function} must either be a Lisp
13604 function or a primitive function; special forms and macros
13605 do not make sense in @code{apply}.
13606
13607 @example
13608 (setq f 'list)
13609 @result{} list
13610 (apply f 'x 'y 'z)
13611 @error{} Wrong type argument: listp, z
13612 (apply '+ 1 2 '(3 4))
13613 @result{} 10
13614 (apply '+ '(1 2 3 4))
13615 @result{} 10
13616
13617 (apply 'append '((a b c) nil (x y z) nil))
13618 @result{} (a b c x y z)
13619 @end example
13620
13621 An interesting example of using @code{apply} is found in the description
13622 of @code{mapcar}.
13623 @end defun
13624 @end quotation
13625
13626 In the Texinfo source file, this example looks like this:
13627
13628 @example
13629 @group
13630 @@defun apply function &rest arguments
13631 @@code@{apply@} calls @@var@{function@} with
13632 @@var@{arguments@}, just like @@code@{funcall@} but with one
13633 difference: the last of @@var@{arguments@} is a list of
13634 arguments to give to @@var@{function@}, rather than a single
13635 argument. We also say that this list is @@dfn@{appended@}
13636 to the other arguments.
13637 @end group
13638
13639 @group
13640 @@code@{apply@} returns the result of calling
13641 @@var@{function@}. As with @@code@{funcall@},
13642 @@var@{function@} must either be a Lisp function or a
13643 primitive function; special forms and macros do not make
13644 sense in @@code@{apply@}.
13645 @end group
13646
13647 @group
13648 @@example
13649 (setq f 'list)
13650 @@result@{@} list
13651 (apply f 'x 'y 'z)
13652 @@error@{@} Wrong type argument: listp, z
13653 (apply '+ 1 2 '(3 4))
13654 @@result@{@} 10
13655 (apply '+ '(1 2 3 4))
13656 @@result@{@} 10
13657
13658 (apply 'append '((a b c) nil (x y z) nil))
13659 @@result@{@} (a b c x y z)
13660 @@end example
13661 @end group
13662
13663 @group
13664 An interesting example of using @@code@{apply@} is found
13665 in the description of @@code@{mapcar@}.
13666 @@end defun
13667 @end group
13668 @end example
13669
13670 @noindent
13671 In this manual, this function is listed in the Command and Variable
13672 Index under @code{apply}.
13673
13674 Ordinary variables and user options are described using a format like
13675 that for functions except that variables do not take arguments.
13676
13677
13678 @node Internationalization
13679 @chapter Internationalization
13680
13681 @cindex Internationalization
13682 Texinfo has some support for writing in languages other than English,
13683 although this area still needs considerable work. (If you are
13684 yourself helping to translate the fixed strings written to documents,
13685 @pxref{Internationalization of Document Strings}.)
13686
13687 For a list of the various accented and special characters Texinfo
13688 supports, see @ref{Inserting Accents}.
13689
13690 @menu
13691 * @t{@@documentlanguage}:: Declaring the current language.
13692 * @t{@@documentencoding}:: Declaring the input encoding.
13693 @end menu
13694
13695
13696 @node @t{@@documentlanguage}
13697 @section @code{@@documentlanguage @var{ll}[_@var{cc}]}: Set the Document Language
13698 @anchor{documentlanguage}
13699
13700 @findex documentlanguage
13701 @cindex Language, declaring
13702 @cindex Locale, declaring
13703 @cindex Document language, declaring
13704
13705 The @code{@@documentlanguage} command declares the current document
13706 locale. Write it on a line by itself, near the beginning of the file,
13707 but after @code{@@setfilename} (@pxref{@t{@@setfilename}}):
13708
13709 @example
13710 @@documentlanguage @var{ll}[_@var{cc}]
13711 @end example
13712
13713 Include a two-letter ISO@tie{}639-2 language code (@var{ll}) following
13714 the command name, optionally followed by an underscore and two-letter
13715 ISO@tie{}3166 two-letter country code (@var{cc}). If you have a
13716 multilingual document, the intent is to be able to use this command
13717 multiple times, to declare each language change. If the command is
13718 not used at all, the default is @code{en_US} for US English.
13719
13720 As with GNU Gettext (@pxref{Top,,, gettext, Gettext}), if the country
13721 code is omitted, the main dialect is assumed where possible. For
13722 example, @code{de} is equivalent to @code{de_DE} (German as spoken in
13723 Germany).
13724
13725 @cindex Document strings, translation of
13726 For Info and other online output, this command changes the translation
13727 of various @dfn{document strings} such as ``see'' in cross references
13728 (@pxref{Cross References}), ``Function' in defuns (@pxref{Definition
13729 Commands}), and so on. Some strings, such as ``Node:'', ``Next:'',
13730 ``Menu:'', etc., are keywords in Info output, so are not translated
13731 there; they are translated in other output formats.
13732
13733 @cindex @file{txi-@var{cc}.tex}
13734 For @TeX{}, this command causes a file @file{txi-@var{locale}.tex} to
13735 be read (if it exists). If @code{@@documentlanguage} argument
13736 contains the optional @samp{_@var{cc}} suffix, this is tried first.
13737 For example, with @code{@@documentlanguage de_DE}, @TeX{} first looks
13738 for @file{txi-de_DE.tex}, then @file{txi-de.tex}.
13739
13740 Such a @file{txi-*} file is intended to redefine the various English
13741 words used in @TeX{} output, such as `Chapter', `See', and so on. We
13742 are aware that individual words like these cannot always be translated
13743 in isolation, and that a very different strategy would be required for
13744 ideographic (among other) scripts. Help in improving Texinfo's
13745 language support is welcome.
13746
13747 @cindex Hyphenation patterns, language-dependent
13748 @code{@@documentlanguage} also changes @TeX{}'s current hyphenation
13749 patterns, if the @TeX{} program being run has the necessary support
13750 included. This will generally not be the case for @command{tex}
13751 itself, but will usually be the case for up-to-date distributions of
13752 the extended @TeX{} programs @command{etex} (DVI output) and
13753 @command{pdftex} (PDF output). @command{texi2dvi} will use the
13754 extended @TeX{}s if they are available (@pxref{Format with
13755 @t{texi2dvi}}).
13756
13757 In September 2006, the W3C Internationalization Activity released a
13758 new recommendation for specifying languages:
13759 @url{http://www.rfc-editor.org/rfc/bcp/bcp47.txt}. When Gettext
13760 supports this new scheme, Texinfo will too.
13761
13762 @cindex ISO 639-2 language codes
13763 @cindex ISO 3166 country codes
13764 @cindex Language codes
13765 @cindex Country codes
13766 Since the lists of language codes and country codes are updated
13767 relatively frequently, we don't attempt to list them here. The valid
13768 language codes are on the official home page for ISO@tie{}639,
13769 @url{http://www.loc.gov/standards/iso639-2/}. The country codes and
13770 the official web site for ISO@tie{}3166 can be found via
13771 @url{http://en.wikipedia.org/wiki/ISO_3166}.
13772
13773
13774 @node @t{@@documentencoding}
13775 @section @code{@@documentencoding @var{enc}}: Set Input Encoding
13776
13777 @anchor{documentencoding}@c old name
13778 @findex documentencoding
13779 @cindex Encoding, declaring
13780 @cindex Input encoding, declaring
13781 @cindex Character set, declaring
13782 @cindex Document input encoding
13783
13784 The @code{@@documentencoding} command declares the input document
13785 encoding. Write it on a line by itself, with a valid encoding
13786 specification following, near the beginning of the file but after
13787 @code{@@setfilename} (@pxref{@t{@@setfilename}}):
13788
13789 @example
13790 @@documentencoding @var{enc}
13791 @end example
13792
13793 At present, Texinfo supports only these encodings:
13794
13795 @table @code
13796 @item US-ASCII
13797 This has no particular effect, but it's included for completeness.
13798
13799 @item UTF-8
13800 The vast global character encoding, expressed in 8-bit bytes.
13801
13802 @item ISO-8859-2
13803 @itemx ISO-8859-1
13804 @itemx ISO-8859-15
13805 These specify the standard encodings for Western European (the first
13806 two) and Eastern European languages (the third), respectively. ISO
13807 8859-15 replaces some little-used characters from 8859-1 (e.g.,
13808 precomposed fractions) with more commonly needed ones, such as the
13809 Euro symbol (@euro{}).
13810
13811 A full description of the encodings is beyond our scope here;
13812 one useful reference is @uref{http://czyborra.com/charsets/iso8859.html}.
13813
13814 @item koi8-r
13815 This is the commonly used encoding for the Russian language.
13816
13817 @item koi8-u
13818 This is the commonly used encoding for the Ukrainian language.
13819
13820 @end table
13821
13822 Specifying an encoding @var{enc} has the following effects:
13823
13824 @cindex Local Variables section, for encoding
13825 @cindex Info output, and encoding
13826 In Info output, a so-called `Local Variables' section (@pxref{File
13827 Variables,,,xemacs, XEmacs User's Manual}) is output including
13828 @var{enc}. This allows Info readers to set the encoding
13829 appropriately. It looks like this:
13830
13831 @example
13832 Local Variables:
13833 coding: @var{enc}
13834 End:
13835 @end example
13836
13837 Also, in Info and plain text output, unless the option
13838 @option{--disable-encoding} is given to @command{makeinfo}, accent
13839 constructs and special characters, such as @code{@@'e}, are output as
13840 the actual 8-bit or UTF-8 character in the given encoding where
13841 possible.
13842
13843 @cindex HTML output, and encodings
13844 @cindex @code{http-equiv}, and charset specification
13845 @cindex @code{<meta>} HTML tag, and charset specification
13846 In HTML output, a @samp{<meta>} tag is output, in the @samp{<head>}
13847 section of the HTML, that specifies @var{enc}. Web servers and
13848 browsers cooperate to use this information so the correct encoding is
13849 used to display the page, if supported by the system. That looks like
13850 this:
13851
13852 @example
13853 <meta http-equiv="Content-Type" content="text/html;
13854 charset=@var{enc}">
13855 @end example
13856
13857 In XML and Docbook output, UTF-8 is always used for the output file,
13858 since all XML processors are supposed to be able to process that
13859 encoding.
13860
13861 @cindex Computer Modern fonts
13862 In @TeX{} output, the characters which are supported in the standard
13863 Computer Modern fonts are output accordingly. (For example, this
13864 means using constructed accents rather than precomposed glyphs.)
13865 Using a missing character generates a warning message, as does
13866 specifying an unimplemented encoding.
13867
13868 Although modern @TeX{} systems support nearly every script in use in
13869 the world, this wide-ranging support is not available in
13870 @file{texinfo.tex}, and it's not feasible to duplicate or incorporate
13871 all that effort. Our plan to support other scripts is to create a
13872 @LaTeX{} back-end to @command{texi2any}, where the support is already
13873 present.
13874
13875
13876 @node Conditionals
13877 @chapter Conditionally Visible Text
13878 @cindex Conditionally visible text
13879 @cindex Text, conditionally visible
13880 @cindex Visibility of conditional text
13881 @cindex If text conditionally visible
13882
13883 The @dfn{conditional commands} allow you to use different text for
13884 different output formats, or for general conditions that you define.
13885 For example, you can use them to specify different text for the
13886 printed manual and the Info output.
13887
13888 The conditional commands comprise the following categories.
13889
13890 @itemize @bullet
13891 @item
13892 Commands specific to an output format (Info, @TeX{}, HTML, @dots{}).
13893
13894 @item
13895 Commands specific to any output format @emph{excluding} a given
13896 one (e.g., not Info, not @TeX{}, @dots{}).
13897
13898 @item
13899 `Raw' formatter text for any output format, passed straight
13900 through with minimal (but not zero) interpretation of @@-commands.
13901
13902 @item
13903 Format-independent variable substitutions, and testing if a variable
13904 is set or clear.
13905
13906 @end itemize
13907
13908 @menu
13909 * Conditional Commands:: Text for a given format.
13910 * Conditional Not Commands:: Text for any format other than a given one.
13911 * Raw Formatter Commands:: Using raw formatter commands.
13912 * Inline Conditionals:: Brace-delimited conditional text.
13913 * @t{@@set @@clear @@value}:: Variable tests and substitutions.
13914 * Testing for Texinfo Commands:: Testing if a Texinfo command is available.
13915 * Conditional Nesting:: Using conditionals inside conditionals.
13916 @end menu
13917
13918
13919 @node Conditional Commands
13920 @section Conditional Commands
13921
13922 Texinfo has an @code{@@if@var{format}} environment for each output
13923 format, to allow conditional inclusion of text for a particular output
13924 format.
13925
13926 @findex ifinfo
13927 @code{@@ifinfo} begins segments of text that should be ignored by
13928 @TeX{} when it typesets the printed manual, and by @command{makeinfo}
13929 when not producing Info output. The segment of text appears only in
13930 the Info file and, for historical compatibility, the plain text
13931 output.
13932
13933 @findex ifdocbook
13934 @findex ifhtml
13935 @findex ifplaintext
13936 @findex iftex
13937 @findex ifxml
13938 The environments for the other formats are analogous, but without the
13939 special historical case:
13940
13941 @table @code
13942 @item @@ifdocbook @dots{} @@end ifdocbook
13943 Text to appear only in the Docbook output.
13944
13945 @item @@ifhtml @dots{} @@end ifhtml
13946 Text to appear only in the HTML output.
13947
13948 @item @@ifplaintext @dots{} @@end ifplaintext
13949 Text to appear only in the plain text output.
13950
13951 @item @@iftex @dots{} @@end iftex
13952 Text to appear only in the printed manual.
13953
13954 @item @@ifxml @dots{} @@end ifxml
13955 Text to appear only in the XML output.
13956 @end table
13957
13958 The @code{@@if@dots{}} and @code{@@end if@dots{}} commands must appear
13959 on lines by themselves in your source file. The newlines following
13960 the commands are (more or less) treated as whitespace, so that the
13961 conditional text is flowed normally into a surrounding paragraph.
13962
13963 The @code{@@if@dots{}} constructs are intended to conditionalize
13964 normal Texinfo source; @pxref{Raw Formatter Commands}, for using
13965 underlying format commands directly.
13966
13967 Here is an example showing all these conditionals:
13968
13969 @example
13970 @@iftex
13971 This text will appear only in the printed manual.
13972 @@end iftex
13973 @@ifinfo
13974 However, this text will appear only in Info and plain text.
13975 @@end ifinfo
13976 @@ifhtml
13977 And this text will only appear in HTML.
13978 @@end ifhtml
13979 @@ifplaintext
13980 Whereas this text will only appear in plain text.
13981 @@end ifplaintext
13982 @@ifxml
13983 Notwithstanding that this will only appear in XML@.
13984 @@end ifxml
13985 @@ifdocbook
13986 Nevertheless, this will only appear in Docbook.
13987 @@end ifdocbook
13988 @end example
13989
13990 @noindent
13991 The preceding example produces the following line:
13992
13993 @iftex
13994 This text will appear only in the printed manual.
13995 @end iftex
13996 @ifinfo
13997 However, this text will appear only in Info and plain text.
13998 @end ifinfo
13999 @ifhtml
14000 And this text will only appear in HTML.
14001 @end ifhtml
14002 @ifplaintext
14003 Whereas this text will only appear in plain text.
14004 @end ifplaintext
14005 @ifxml
14006 Notwithstanding that this will only appear in XML@.
14007 @end ifxml
14008 @ifdocbook
14009 Nevertheless, this will only appear in Docbook.
14010 @end ifdocbook
14011
14012 @noindent
14013 Notice that you only see one of the input lines, depending on which
14014 version of the manual you are reading.
14015
14016 @findex errormsg
14017 In complex documents, you may want Texinfo to issue an error message
14018 in some conditionals that should not ever be processed. The
14019 @code{@@errormsg@{@var{text}@}} command will do this; it takes one
14020 argument, the text of the error message, which is expanded more or
14021 less as if it were Info text.
14022
14023 We mention @code{@@errormsg@{@}} here even though it is not strictly
14024 related to conditionals, since in practice it is most likely to be
14025 useful in that context. Technically, it can be used anywhere.
14026 @xref{External Macro Processors}, for a caveat regarding the line
14027 numbers which @code{@@errormsg} emits in @TeX{}.
14028
14029
14030 @node Conditional Not Commands
14031 @section Conditional Not Commands
14032 @findex ifnotdocbook
14033 @findex ifnothtml
14034 @findex ifnotinfo
14035 @findex ifnotplaintext
14036 @findex ifnottex
14037 @findex ifnotxml
14038
14039 You can specify text to be included in any output format @emph{other}
14040 than a given one with the @code{@@ifnot@dots{}} environments:
14041
14042 @example
14043 @@ifnotdocbook @dots{} @@end ifnotdocbook
14044 @@ifnothtml @dots{} @@end ifnothtml
14045 @@ifnotinfo @dots{} @@end ifnotinfo
14046 @@ifnotplaintext @dots{} @@end ifnotplaintext
14047 @@ifnottex @dots{} @@end ifnottex
14048 @@ifnotxml @dots{} @@end ifnotxml
14049 @end example
14050
14051 @noindent
14052 The @code{@@ifnot@dots{}} command and the @code{@@end} command must
14053 appear on lines by themselves in your actual source file.
14054
14055 If the output file is being made in the given format, the
14056 region is @emph{ignored}. Otherwise, it is included.
14057
14058 There is one exception (for historical compatibility):
14059 @code{@@ifnotinfo} text is omitted for both Info and plain text
14060 output, not just Info. To specify text which appears only in Info and
14061 not in plain text, use @code{@@ifnotplaintext}, like this:
14062
14063 @example
14064 @@ifinfo
14065 @@ifnotplaintext
14066 This will be in Info, but not plain text.
14067 @@end ifnotplaintext
14068 @@end ifinfo
14069 @end example
14070
14071 The regions delimited by these commands are ordinary Texinfo source as
14072 with @code{@@iftex}, not raw formatter source as with @code{@@tex}
14073 (@pxref{Raw Formatter Commands}).
14074
14075
14076 @node Raw Formatter Commands
14077 @section Raw Formatter Commands
14078 @cindex Raw formatter commands
14079
14080 @cindex @TeX{} commands, using ordinary
14081 @cindex Ordinary @TeX{} commands, using
14082 @cindex Commands using raw @TeX{}
14083 @cindex Plain @TeX{}
14084
14085 The @code{@@if@dots{}} conditionals just described must be used only
14086 with normal Texinfo source. For instance, most features of plain
14087 @TeX{} will not work within @code{@@iftex}. The purpose of
14088 @code{@@if@dots{}} is to provide conditional processing for Texinfo
14089 source, not provide access to underlying formatting features. For
14090 that, Texinfo provides so-called @dfn{raw formatter commands}. They
14091 should only be used when truly required (most documents do not need
14092 them).
14093
14094 @findex tex
14095 @cindex Category codes, of plain @TeX{}
14096 The first raw formatter command is @code{@@tex}. You can enter plain
14097 @TeX{} completely, and use @samp{\} in the @TeX{} commands, by
14098 delineating a region with the @code{@@tex} and @code{@@end tex}
14099 commands. All plain @TeX{} commands and category codes are restored
14100 within an @code{@@tex} region. The sole exception is that the
14101 @code{@@} character still introduces a command, so that @code{@@end
14102 tex} can be recognized. Texinfo processors will not output material
14103 in such a region, unless @TeX{} output is being produced.
14104
14105 @findex \gdef @r{within @code{@@tex}}
14106 @findex \globaldefs @r{within @code{@@tex}}
14107 In complex cases, you may wish to define new @TeX{} macros within
14108 @code{@@tex}. You must use @code{\gdef} to do this, not @code{\def},
14109 because @code{@@tex} regions are processed in a @TeX{} group. If you
14110 need to make several definitions, you may wish to set
14111 @code{\globaldefs=1} (its value will be restored to zero as usual when
14112 the group ends at @code{@@end tex}, so it won't cause problems with
14113 the rest of the document).
14114
14115 @cindex Equation, displayed, in plain @TeX{}
14116 @cindex Displayed equation, in plain @TeX{}
14117 As an example, here is a displayed equation written in plain @TeX{}:
14118
14119 @example
14120 @@tex
14121 $$ \chi^2 = \sum_@{i=1@}^N
14122 \left (y_i - (a + b x_i)
14123 \over \sigma_i\right)^2 $$
14124 @@end tex
14125 @end example
14126
14127 @noindent
14128 The output of this example will appear only in a printed manual. If
14129 you are reading this in a format not generated by @TeX{}, you will not
14130 see the equation that appears in the printed manual.
14131
14132 @tex
14133 $$ \chi^2 = \sum_{i=1}^N
14134 \left(y_i - (a + b x_i)
14135 \over \sigma_i\right)^2 $$
14136 @end tex
14137
14138 @cindex HTML, including raw
14139 @findex ifhtml
14140 @findex html
14141 Analogously, you can use @code{@@ifhtml @dots{} @@end ifhtml} to
14142 delimit Texinfo source to be included in HTML output only, and
14143 @code{@@html @dots{} @@end html} for a region of raw HTML.
14144
14145 @cindex XML, including raw
14146 @findex ifxml
14147 @findex xml
14148 Likewise, you can use @code{@@ifxml @dots{} @@end ifxml} to delimit
14149 Texinfo source to be included in XML output only, and @code{@@xml
14150 @dots{} @@end xml} for a region of raw XML@. Regions of raw text in
14151 other formats will also be present in the XML output, but with
14152 protection of XML characters and within corresponding elements. For
14153 example, the raw HTML text:
14154
14155 @example
14156 @group
14157 @@html
14158 <br />
14159 @@end html
14160 @end group
14161 @end example
14162
14163 @noindent
14164 will be included in the XML output as:
14165
14166 @example
14167 @group
14168 <html>
14169 &lt;br /&gt;
14170 </html>
14171 @end group
14172 @end example
14173
14174 @cindex Docbook, including raw
14175 @findex ifdocbook
14176 @findex docbook
14177 Again likewise, you can use @code{@@ifdocbook @dots{} @@end ifdocbook}
14178 to delimit Texinfo source to be included in Docbook output only, and
14179 @code{@@docbook @dots{} @@end docbook} for a region of raw Docbook.
14180
14181 The behavior of newlines in raw regions is unspecified.
14182
14183 In all cases, in raw processing, @code{@@} retains the same meaning as
14184 in the remainder of the document. Thus, the Texinfo processors
14185 recognize and even execute, to some extent, the contents of the raw
14186 regions, regardless of the final output format. Therefore, specifying
14187 changes that globally affect the document inside a raw region leads to
14188 unpredictable and generally undesirable behavior. For example, it
14189 using the @code{@@kbdinputstyle} command inside a raw region is undefined.
14190
14191 The remedy is simple: don't do that. Use the raw formatter commands
14192 for their intended purpose, of providing material directly in the
14193 underlying format. When you simply want to give different Texinfo
14194 specifications for different output formats, use the
14195 @code{@@if@dots{}} conditionals and stay in Texinfo syntax.
14196
14197
14198
14199 @node Inline Conditionals
14200 @section Inline Conditionals: @code{@@inline}, @code{@@inlineifelse}, @code{@@inlineraw}
14201 @findex inlinefmt
14202 @findex inlinefmtifelse
14203 @findex inlineraw
14204 @cindex Inline conditionals
14205 @cindex Conditional commands, inline
14206 @cindex Brace-delimited conditional text
14207 @cindex Newlines, avoiding in conditionals
14208 @cindex Whitespace, controlling in conditionals
14209
14210 Texinfo provides a set of conditional commands with arguments given
14211 within braces:
14212
14213 @table @code
14214 @item @@inlinefmt@{@var{format}, @var{text}@}
14215 Process the Texinfo @var{text} if @var{format} output is being
14216 generated.
14217
14218 @item @@inlinefmtifelse@{@var{format}, @var{then-text}, @var{else-text}@}
14219 Process the Texinfo @var{then-text} if @var{format} output is being
14220 generated; otherwise, process @var{else-text}.
14221
14222 @item @@inlineraw@{@var{format}, @var{text}@}
14223 Similar, but for raw @var{text} (@pxref{Raw Formatter Commands}).
14224 @end table
14225
14226 The supported @var{format} names are:
14227
14228 @example
14229 docbook html info plaintext tex xml
14230 @end example
14231
14232 For example,
14233
14234 @example
14235 @@inlinefmt@{html, @@emph@{HTML-only text@}@}
14236 @end example
14237
14238 @noindent is nearly equivalent to
14239
14240 @example
14241 @@ifhtml
14242 @@emph@{HTML-only text@}
14243 @@end ifhtml
14244 @end example
14245
14246 @noindent except that no whitespace is added, as happens in the latter
14247 (environment) case.
14248
14249 In these commands, whitespace is ignored after the comma separating
14250 the arguments, as usual, but is @emph{not} ignored at the end of
14251 @var{text}.
14252
14253 To insert a literal at sign, left brace, or right brace in one of the
14254 arguments, you must use the alphabetic commands @code{@@atchar@{@}}
14255 (@pxref{Inserting an Atsign}), and @code{@@lbracechar@{@}} or
14256 @code{@@rbracechar@{@}} (@pxref{Inserting Braces}), or the parsing
14257 will become confused.
14258
14259 With @code{@@inlinefmtifelse}, it is also necessary to use
14260 @code{@@comma@{@}} to avoid mistaking a @samp{,} in the text for the
14261 delimiter. With @code{@@inlinefmt} and @code{@@inlineraw},
14262 @code{@@comma@{@}} is not required (though it's fine to use it), since
14263 these commands always have exactly two arguments.
14264
14265 For @TeX{}, the processed @var{text} cannot contain newline-delimited
14266 commands. Text to be ignored (i.e., for non-@TeX{}) can, though.
14267
14268 Two other @code{@@inline...} conditionals complement the
14269 @code{@@ifset} and @code{@@ifclear} commands; see the next section.
14270
14271
14272 @node @t{@@set @@clear @@value}
14273 @section Flags: @code{@@set}, @code{@@clear}, conditionals, and @code{@@value}
14274
14275 @anchor{set clear value}@c old name
14276 You can direct the Texinfo formatting commands to format or ignore parts
14277 of a Texinfo file with the @code{@@set}, @code{@@clear}, @code{@@ifset},
14278 and @code{@@ifclear} commands.
14279
14280 Here are brief descriptions of these commands, see the following
14281 sections for more details:
14282
14283 @table @code
14284 @item @@set @var{flag} [@var{value}]
14285 Set the variable @var{flag}, to the optional @var{value} if specified.
14286
14287 @item @@clear @var{flag}
14288 Undefine the variable @var{flag}, whether or not it was previously defined.
14289
14290 @item @@ifset @var{flag}
14291 If @var{flag} is set, text through the next @code{@@end ifset} command
14292 is formatted. If @var{flag} is clear, text through the following
14293 @code{@@end ifset} command is ignored.
14294
14295 @item @@inlineifset@{@var{flag}, @var{text}@}
14296 Brace-delimited version of @code{@@ifset}.
14297
14298 @item @@ifclear @var{flag}
14299 If @var{flag} is set, text through the next @code{@@end ifclear} command
14300 is ignored. If @var{flag} is clear, text through the following
14301 @code{@@end ifclear} command is formatted.
14302
14303 @item @@inlineifclear@{@var{flag}, @var{text}@}
14304 Brace-delimited version of @code{@@ifclear}.
14305
14306 @end table
14307
14308 @menu
14309 * @t{@@set @@value}:: Expand a flag variable to a string.
14310 * @t{@@ifset @@ifclear}:: Format a region if a flag is set.
14311 * @t{@@inlineifset @@inlineifclear}:: Brace-delimited flag conditionals.
14312 * @t{@@value} Example:: An easy way to update edition information.
14313 @end menu
14314
14315
14316 @node @t{@@set @@value}
14317 @subsection @code{@@set} and @code{@@value}
14318
14319 @anchor{set value}@c old name
14320 @findex set
14321 @findex value
14322 @findex clear
14323
14324 You use the @code{@@set} command to specify a value for a flag, which
14325 is later expanded by the @code{@@value} command.
14326
14327 A @dfn{flag} (aka @dfn{variable}) name is an identifier starting with
14328 an alphanumeric, @samp{-}, or @samp{_}. Subsequent characters, if
14329 any, may not be whitespace, @samp{@@}, braces, angle brackets, or any
14330 of @samp{~`^+|}; other characters, such as @samp{%}, may work.
14331 However, it is best to use only letters and numerals in a flag name,
14332 not @samp{-} or @samp{_} or others---they will work in some contexts,
14333 but not all, due to limitations in @TeX{}.
14334
14335 The value is the remainder of the input line, and can contain anything.
14336 However, unlike most other commands which take the rest of the line as
14337 a value, @code{@@set} need not appear at the beginning of a line.
14338
14339 Write the @code{@@set} command like this:
14340
14341 @example
14342 @@set foo This is a string.
14343 @end example
14344
14345 @noindent
14346 This sets the value of the flag @code{foo} to ``This is a string.''.
14347
14348 The Texinfo formatters then replace an @code{@@value@{@var{flag}@}}
14349 command with the string to which @var{flag} is set. Thus, when
14350 @code{foo} is set as shown above, the Texinfo formatters convert this:
14351
14352 @example
14353 @group
14354 @@value@{foo@}
14355 @exdent @r{to this:}
14356 This is a string.
14357 @end group
14358 @end example
14359
14360 You can write an @code{@@value} command within a paragraph; but you
14361 must write an @code{@@set} command on a line of its own.
14362
14363 If you write the @code{@@set} command like this:
14364
14365 @example
14366 @@set foo
14367 @end example
14368
14369 @noindent
14370 without specifying a string, the value of @code{foo} is the empty string.
14371
14372 If you clear a previously set flag with @code{@@clear @var{flag}}, a
14373 subsequent @code{@@value@{flag@}} command will report an error.
14374
14375 For example, if you set @code{foo} as follows:
14376
14377 @example
14378 @@set howmuch very, very, very
14379 @end example
14380
14381 @noindent
14382 then the formatters transform
14383
14384 @example
14385 @group
14386 It is a @@value@{howmuch@} wet day.
14387 @exdent @r{into}
14388 It is a very, very, very wet day.
14389 @end group
14390 @end example
14391
14392 If you write
14393
14394 @example
14395 @@clear howmuch
14396 @end example
14397
14398 @noindent
14399 then the formatters transform
14400
14401 @example
14402 @group
14403 It is a @@value@{howmuch@} wet day.
14404 @exdent @r{into}
14405 It is a @{No value for "howmuch"@} wet day.
14406 @end group
14407 @end example
14408
14409 @code{@@value} cannot be reliably used as the argument to an accent
14410 command (@pxref{Inserting Accents}). For example, this fails:
14411
14412 @example
14413 @@set myletter a
14414 @@'@@value@{myletter@} @c fails!
14415 @end example
14416
14417
14418 @node @t{@@ifset @@ifclear}
14419 @subsection @code{@@ifset} and @code{@@ifclear}
14420
14421 @anchor{ifset ifclear}@c old name
14422 @findex ifset
14423
14424 When a @var{flag} is set, the Texinfo formatting commands format text
14425 between subsequent pairs of @code{@@ifset @var{flag}} and @code{@@end
14426 ifset} commands. When the @var{flag} is cleared, the Texinfo formatting
14427 commands do @emph{not} format the text. @code{@@ifclear} operates
14428 analogously.
14429
14430 Write the conditionally formatted text between @code{@@ifset @var{flag}}
14431 and @code{@@end ifset} commands, like this:
14432
14433 @example
14434 @group
14435 @@ifset @var{flag}
14436 @var{conditional-text}
14437 @@end ifset
14438 @end group
14439 @end example
14440
14441 For example, you can create one document that has two variants, such as
14442 a manual for a `large' and `small' model:
14443
14444 @cindex Shrubbery
14445 @example
14446 You can use this machine to dig up shrubs
14447 without hurting them.
14448
14449 @@set large
14450
14451 @@ifset large
14452 It can also dig up fully grown trees.
14453 @@end ifset
14454
14455 Remember to replant promptly @dots{}
14456 @end example
14457
14458 @noindent
14459 In the example, the formatting commands will format the text between
14460 @code{@@ifset large} and @code{@@end ifset} because the @code{large}
14461 flag is set.
14462
14463 When @var{flag} is cleared, the Texinfo formatting commands do
14464 @emph{not} format the text between @code{@@ifset @var{flag}} and
14465 @code{@@end ifset}; that text is ignored and does not appear in either
14466 printed or Info output.
14467
14468 For example, if you clear the flag of the preceding example by writing
14469 an @code{@@clear large} command after the @code{@@set large} command
14470 (but before the conditional text), then the Texinfo formatting commands
14471 ignore the text between the @code{@@ifset large} and @code{@@end ifset}
14472 commands. In the formatted output, that text does not appear; in both
14473 printed and Info output, you see only the lines that say, ``You can use
14474 this machine to dig up shrubs without hurting them. Remember to replant
14475 promptly @dots{}''.
14476
14477 @findex ifclear
14478 If a flag is cleared with an @code{@@clear @var{flag}} command, then
14479 the formatting commands format text between subsequent pairs of
14480 @code{@@ifclear} and @code{@@end ifclear} commands. But if the flag
14481 is set with @code{@@set @var{flag}}, then the formatting commands do
14482 @emph{not} format text between an @code{@@ifclear} and an @code{@@end
14483 ifclear} command; rather, they ignore that text. An @code{@@ifclear}
14484 command looks like this:
14485
14486 @example
14487 @@ifclear @var{flag}
14488 @end example
14489
14490
14491 @node @t{@@inlineifset @@inlineifclear}
14492 @subsection @code{@@inlineifset} and @code{@@inlineifclear}
14493
14494 @findex inlineifset
14495 @findex inlineifclear
14496 @cindex Flag conditionals, brace-delimited
14497 @cindex Brace-delimited flag conditionals
14498
14499 @code{@@inlineifset} and @code{@@inlineifclear} provide
14500 brace-delimited alternatives to the @code{@@ifset} and
14501 @code{@@ifclear} forms, similar to the other @code{@@inline...}
14502 Commands (@pxref{Inline Conditionals}). The same caveats about
14503 argument parsing given there apply here too.
14504
14505 @table @code
14506 @item @@inlineifset@{@var{var}, @var{text}@}
14507 Process the Texinfo @var{text} if the flag @var{var} is defined.
14508
14509 @item @@inlineifclear@{@var{var}, @var{text}@}
14510 Process the Texinfo @var{text} if the flag @var{var} is not defined.
14511 @end table
14512
14513 Except for the syntax, their general behavior and purposes is the same
14514 as with @code{@@ifset} and @code{@@ifclear}, described in the previous
14515 section.
14516
14517
14518 @node @t{@@value} Example
14519 @subsection @code{@@value} Example
14520
14521 @anchor{value Example}@c old name
14522
14523 You can use the @code{@@value} command to minimize the number of
14524 places you need to change when you record an update to a manual.
14525 @xref{GNU Sample Texts}, for the full text of an example of using this
14526 to work with Automake distributions.
14527
14528 This example is adapted from @ref{Top,,, make, The GNU Make Manual}.
14529
14530 @enumerate
14531 @item
14532 Set the flags:
14533
14534 @example
14535 @group
14536 @@set EDITION 0.35 Beta
14537 @@set VERSION 3.63 Beta
14538 @@set UPDATED 14 August 1992
14539 @@set UPDATE-MONTH August 1992
14540 @end group
14541 @end example
14542
14543 @item
14544 Write text for the @code{@@copying} section (@pxref{@t{@@copying}}):
14545
14546 @example
14547 @group
14548 @@copying
14549 This is Edition @@value@{EDITION@},
14550 last updated @@value@{UPDATED@},
14551 of @@cite@{The GNU Make Manual@},
14552 for @@code@{make@}, version @@value@{VERSION@}.
14553
14554 Copyright @dots{}
14555
14556 Permission is granted @dots{}
14557 @@end copying
14558 @end group
14559 @end example
14560
14561 @item
14562 Write text for the title page, for people reading the printed manual:
14563
14564 @example
14565 @group
14566 @@titlepage
14567 @@title GNU Make
14568 @@subtitle A Program for Directing Recompilation
14569 @@subtitle Edition @@value@{EDITION@}, @dots{}
14570 @@subtitle @@value@{UPDATE-MONTH@}
14571 @@page
14572 @@insertcopying
14573 @dots{}
14574 @@end titlepage
14575 @end group
14576 @end example
14577
14578 @noindent
14579 (On a printed cover, a date listing the month and the year looks less
14580 fussy than a date listing the day as well as the month and year.)
14581
14582 @item
14583 Write text for the Top node, for people reading the Info file:
14584
14585 @example
14586 @group
14587 @@ifnottex
14588 @@node Top
14589 @@top Make
14590
14591 @@insertcopying
14592 @dots{}
14593 @@end ifnottex
14594 @end group
14595 @end example
14596
14597 After you format the manual, the @code{@@value} constructs have been
14598 expanded, so the output contains text like this:
14599
14600 @example
14601 @group
14602 This is Edition 0.35 Beta, last updated 14 August 1992,
14603 of `The GNU Make Manual', for `make', Version 3.63 Beta.
14604 @end group
14605 @end example
14606 @end enumerate
14607
14608 When you update the manual, you change only the values of the flags; you
14609 do not need to edit the three sections.
14610
14611
14612 @node Testing for Texinfo Commands
14613 @section Testing for Texinfo Commands: @code{@@ifcommanddefined}, @code{@@ifcommandnotdefined}
14614
14615 @cindex Testing for Texinfo commands
14616 @cindex Checking for Texinfo commands
14617 @cindex Texinfo commands, testing for
14618 @cindex Commands, testing for Texinfo
14619 @cindex Versions of Texinfo, adapting to
14620 @cindex Features of Texinfo, adapting to
14621
14622 Occasionally, you may want to arrange for your manual to test if a
14623 given Texinfo command is available and (presumably) do some sort of
14624 fallback formatting if not. There are conditionals
14625 @code{@@ifcommanddefined} and @code{@@ifcommandnotdefined} to do this.
14626 For example:
14627
14628 @example
14629 @@ifcommanddefined node
14630 Good, @@samp@{@@@@node@} is defined.
14631 @@end ifcommanddefined
14632 @end example
14633
14634 @noindent will output the expected `Good, @samp{@@node} is defined.'.
14635
14636 This conditional will also consider true any new commands defined by
14637 the document via @code{@@macro}, @code{@@alias},
14638 @code{@@definfoenclose}, and @code{@@def@r{(}code@r{)}index}
14639 (@pxref{Defining New Texinfo Commands}). Caveat: the @TeX{}
14640 implementation reports internal @TeX{} commands, in addition to all
14641 the Texinfo commands, as being ``defined''; the @code{makeinfo}
14642 implementation is reliable in this regard, however.
14643
14644 @pindex @file{NEWS} file for Texinfo
14645 You can check the @file{NEWS} file in the Texinfo source distribution
14646 and linked from the Texinfo home page
14647 (@url{http://www.gnu.org/software/texinfo}) to see when a particular
14648 command was added.
14649
14650 These command-checking conditionals themselves were added in
14651 Texinfo@tie{}5.0, released in 2013---decades after Texinfo's
14652 inception. In order to test if they themselves are available,
14653 the predefined flag @code{txicommandconditionals} can be tested, like
14654 this:
14655
14656 @example
14657 @@ifset txicommandconditionals
14658 @@ifcommandnotdefined foobarnode
14659 (Good, @samp{@@foobarnode} is not defined.)
14660 @@end ifcommandnotdefined
14661 @@end ifset
14662 @end example
14663
14664 Since flags (see the previous section) were added early in the
14665 existence of Texinfo, there is no problem with assuming they are
14666 available.
14667
14668 We recommend avoiding these tests whenever possible---which is usually
14669 the case. For many software packages, it is reasonable for all
14670 developers to have a given version of Texinfo (or newer) installed,
14671 and thus no reason to worry about older versions. (It is
14672 straightforward for anyone to download and install the Texinfo source;
14673 it does not have any problematic dependencies.)
14674
14675 The issue of Texinfo versions does not generally arise for end-users.
14676 With properly distributed packages, users need not process the Texinfo
14677 manual simply to build and install the package; they can use
14678 preformatted Info (or other) output files. This is desirable in
14679 general, to avoid unnecessary dependencies between packages
14680 (@pxref{Releases,,, standard, GNU Coding Standards}).
14681
14682
14683 @node Conditional Nesting
14684 @section Conditional Nesting
14685 @cindex Conditionals, nested
14686 @cindex Nesting conditionals
14687
14688 Conditionals can be nested; however, the details are a little tricky.
14689 The difficulty comes with failing conditionals, such as
14690 @code{@@ifhtml} when HTML is not being produced, where the included
14691 text is to be ignored. However, it is not to be @emph{completely}
14692 ignored, since it is useful to have one @code{@@ifset} inside another,
14693 for example---that is a way to include text only if two conditions are
14694 met. Here's an example:
14695
14696 @example
14697 @@ifset somevar
14698 @@ifset anothervar
14699 Both somevar and anothervar are set.
14700 @@end ifset
14701 @@ifclear anothervar
14702 Somevar is set, anothervar is not.
14703 @@end ifclear
14704 @@end ifset
14705 @end example
14706
14707 Technically, Texinfo requires that for a failing conditional, the
14708 ignored text must be properly nested with respect to that failing
14709 conditional. Unfortunately, it's not always feasible to check that
14710 @emph{all} conditionals are properly nested, because then the
14711 processors could have to fully interpret the ignored text, which
14712 defeats the purpose of the command. Here's an example illustrating
14713 these rules:
14714
14715 @example
14716 @@ifset a
14717 @@ifset b
14718 @@ifclear ok - ok, ignored
14719 @@end junky - ok, ignored
14720 @@end ifset
14721 @@c WRONG - missing @@end ifset.
14722 @end example
14723
14724 Finally, as mentioned above, all conditional commands must be on lines
14725 by themselves, with no text (even spaces) before or after. Otherwise,
14726 the processors cannot reliably determine which commands to consider
14727 for nesting purposes.
14728
14729
14730 @node Defining New Texinfo Commands
14731 @chapter Defining New Texinfo Commands
14732
14733 @cindex Macros
14734 @cindex Defining new Texinfo commands
14735 @cindex New Texinfo commands, defining
14736 @cindex Texinfo commands, defining new
14737 @cindex User-defined Texinfo commands
14738
14739 Texinfo provides several ways to define new commands (in all cases,
14740 it's not recommended to try redefining existing commands):
14741
14742 @itemize @bullet
14743 @item
14744 A Texinfo @dfn{macro} allows you to define a new Texinfo command as any
14745 sequence of text and/or existing commands (including other macros). The
14746 macro can have any number of @dfn{parameters}---text you supply each
14747 time you use the macro.
14748
14749 Incidentally, these macros have nothing to do with the @code{@@defmac}
14750 command, which is for documenting macros in the subject area of the
14751 manual (@pxref{Def Cmd Template}).
14752
14753 @item
14754 @samp{@@alias} is a convenient way to define a new name for an existing
14755 command.
14756
14757 @item
14758 @samp{@@definfoenclose} allows you to define new commands with
14759 customized output for all non-@TeX{} output formats.
14760
14761 @end itemize
14762
14763 Most generally of all (not just for defining new commands), it is
14764 possible to invoke any external macro processor and have Texinfo
14765 recognize so-called @code{#line} directives for error reporting.
14766
14767 If you want to do simple text substitution, @code{@@set} and
14768 @code{@@value} is the simplest approach (@pxref{@t{@@set @@clear
14769 @@value}}).
14770
14771 @menu
14772 * Defining Macros:: Defining and undefining new commands.
14773 * Invoking Macros:: Using a macro, once you've defined it.
14774 * Macro Details:: Limitations of Texinfo macros.
14775 * @t{@@alias}:: Command aliases.
14776 * @t{@@definfoenclose}:: Customized highlighting.
14777 * External Macro Processors:: @code{#line} directives.
14778 @end menu
14779
14780
14781 @node Defining Macros
14782 @section Defining Macros
14783 @cindex Defining macros
14784 @cindex Macro definitions, Texinfo
14785
14786 @findex macro
14787 You use the Texinfo @code{@@macro} command to define a macro, like this:
14788
14789 @example
14790 @@macro @var{macroname}@{@var{param1}, @var{param2}, @dots{}@}
14791 @var{text} @dots{} \@var{param1}\ @dots{}
14792 @@end macro
14793 @end example
14794
14795 The @dfn{parameters} @var{param1}, @var{param2}, @dots{} correspond to
14796 arguments supplied when the macro is subsequently used in the document
14797 (described in the next section).
14798
14799 @cindex Macro names, valid characters in
14800 @cindex Names of macros, valid characters of
14801 For a macro to work consistently with @TeX{}, @var{macroname} must
14802 consist entirely of letters: no digits, hyphens, underscores, or other
14803 special characters. So, we recommend using only letters. However,
14804 @command{makeinfo} will accept anything consisting of alphanumerics,
14805 and (except as the first character) @samp{-}. The @samp{_} character
14806 is excluded so that macros can be called inside @code{@@math} without
14807 a following space (@pxref{Inserting Math}).
14808
14809 If a macro needs no parameters, you can define it either with an empty
14810 list (@samp{@@macro foo @{@}}) or with no braces at all (@samp{@@macro
14811 foo}).
14812
14813 @cindex Body of a macro
14814 The definition or @dfn{body} of the macro can contain most Texinfo
14815 commands, including macro invocations. However, a macro definition
14816 that defines another macro does not work in @TeX{} due to limitations
14817 in the design of @code{@@macro}.
14818
14819 @cindex Parameters to macros
14820 In the macro body, instances of a parameter name surrounded by
14821 backslashes, as in @samp{\@var{param1}\} in the example above, are
14822 replaced by the corresponding argument from the macro invocation. You
14823 can use parameter names any number of times in the body, including zero.
14824
14825 @cindex Backslash in macros
14826 To get a single @samp{\} in the macro expansion, use @samp{\\}. Any
14827 other use of @samp{\} in the body yields a warning.
14828
14829 @cindex Spaces in macros
14830 @cindex Whitespace in macros
14831 The newline characters after the @code{@@macro} line and before the
14832 @code{@@end macro} line are ignored, that is, not included in the
14833 macro body. All other whitespace is treated according to the usual
14834 Texinfo rules. However, there are still undesirable and unpredictable
14835 interactions between newlines, macros, and commands which are
14836 line-delimited, as warned about below (@pxref{Macro Details}).
14837
14838 @cindex Recursive macro invocations
14839 @findex rmacro
14840 To allow a macro to be used recursively, that is, in an argument to a
14841 call to itself, you must define it with @samp{@@rmacro}, like this:
14842
14843 @example
14844 @@rmacro rmac @{arg@}
14845 a\arg\b
14846 @@end rmacro
14847 @dots{}
14848 @@rmac@{1@@rmac@{text@}2@}
14849 @end example
14850
14851 This produces the output `a1atextb2b'. With @samp{@@macro} instead of
14852 @samp{@@rmacro}, an error message is given.
14853
14854 @findex unmacro
14855 @cindex Macros, undefining
14856 @cindex Undefining macros
14857 You can undefine a macro @var{foo} with @code{@@unmacro @var{foo}}.
14858 It is not an error to undefine a macro that is already undefined.
14859 For example:
14860
14861 @example
14862 @@unmacro foo
14863 @end example
14864
14865
14866 @node Invoking Macros
14867 @section Invoking Macros
14868
14869 @cindex Invoking macros
14870 @cindex Expanding macros
14871 @cindex Running macros
14872 @cindex Macro invocation
14873
14874 After a macro is defined (see the previous section), you can
14875 @dfn{invoke} (use) it in your document like this:
14876
14877 @example
14878 @@@var{macroname} @{@var{arg1}, @var{arg2}, @dots{}@}
14879 @end example
14880
14881 @noindent and the result will be more or less as if you typed the body of
14882 @var{macroname} at that spot. For example:
14883
14884 @example
14885 @@macro foo @{p, q@}
14886 Together: \p\ & \q\.
14887 @@end macro
14888 @@foo@{a, b@}
14889 @end example
14890
14891 @noindent produces:
14892
14893 @display
14894 Together: a & b.
14895 @end display
14896
14897 @cindex Backslash, and macros
14898 Thus, the arguments and parameters are separated by commas and
14899 delimited by braces; any whitespace after (but not before) a comma is
14900 ignored. The braces are required in the invocation even when the
14901 macro takes no arguments, consistent with other Texinfo commands. For
14902 example:
14903
14904 @example
14905 @@macro argless @{@}
14906 No arguments here.
14907 @@end macro
14908 @@argless@{@}
14909 @end example
14910
14911 @noindent produces:
14912
14913 @display
14914 No arguments here.
14915 @end display
14916
14917 @cindex Comma, in macro arguments
14918 Passing macro arguments containing commas requires special care, since
14919 commas also separate the arguments. To include a comma character in
14920 an argument, the most reliable method is to use the @code{@@comma@{@}}
14921 command. For @code{makeinfo}, you can also prepend a backslash
14922 character, as in @samp{\,}, but this does not work with @TeX{}.
14923
14924 @cindex Automatic quoting of commas for some macros
14925 @cindex Quoting, automatic for some macros
14926 It's not always necessary to worry about commas. To facilitate use of
14927 macros, @command{makeinfo} implements two rules for @dfn{automatic
14928 quoting} in some circumstances:
14929
14930 @enumerate 1
14931 @item If a macro takes only one argument, all commas in its invocation
14932 are quoted by default. For example:
14933
14934 @example
14935 @group
14936 @@macro TRYME@{text@}
14937 @@strong@{TRYME: \text\@}
14938 @@end macro
14939
14940 @@TRYME@{A nice feature, though it can be dangerous.@}
14941 @end group
14942 @end example
14943
14944 @noindent
14945 will produce the following output
14946
14947 @example
14948 @strong{TRYME: A nice feature, though it can be dangerous.}
14949 @end example
14950
14951 And indeed, it can. Namely, @command{makeinfo} does not control the
14952 number of arguments passed to one-argument macros, so be careful when
14953 you invoke them.
14954
14955 @item If a macro invocation includes another command (including a
14956 recursive invocation of itself), any commas in the nested command
14957 invocation(s) are quoted by default. For example, in
14958
14959 @example
14960 @@say@{@@strong@{Yes, I do@}, person one@}
14961 @end example
14962
14963 the comma after @samp{Yes} is implicitly quoted. Here's another
14964 example, with a recursive macro:
14965
14966 @example
14967 @group
14968 @@rmacro cat@{a,b@}
14969 \a\\b\
14970 @@end rmacro
14971
14972 @@cat@{@@cat@{foo, bar@}, baz@}
14973 @end group
14974 @end example
14975
14976 @noindent
14977 will produce the string @samp{foobarbaz}.
14978
14979 @item Otherwise, a comma should be explicitly quoted, as above, for it
14980 to be treated as a part of an argument.
14981 @end enumerate
14982
14983 @cindex Braces, in macro arguments
14984 @cindex Backslash, in macro arguments
14985 In addition to the comma, characters that need to be quoted in macro
14986 arguments are curly braces and backslash. For example:
14987
14988 @example
14989 @@@var{macname} @{\\\@{\@}\,@}
14990 @end example
14991
14992 @noindent
14993 will pass the (almost certainly error-producing) argument
14994 @samp{\@{@},} to @var{macname}.
14995
14996 Unfortunately, this has not been reliably implemented in @TeX{}. When
14997 macros are used in the argument to other commands, for example, errors
14998 or incorrect output (the @samp{\} ``escape'' being included literally)
14999 are likely to result.
15000
15001 If a macro is defined to take exactly one argument, it can (but need
15002 not) be invoked without any braces; then the entire rest of the line
15003 after the macro name is used as the argument. (Braces around the
15004 argument(s) are required in all other cases, i.e., if the macro takes
15005 either zero or more than one argument.) For example:
15006
15007 @example
15008 @@macro bar @{p@}
15009 Twice: \p\ & \p\.
15010 @@end macro
15011 @@bar aah
15012 @end example
15013
15014 @noindent produces:
15015
15016 @display
15017 Twice: aah & aah.
15018 @end display
15019
15020 Likewise, if a macro is defined to take exactly one argument, and is
15021 invoked with braces, the braced text is passed as the argument, also
15022 regardless of commas. For example:
15023
15024 @example
15025 @@macro bar @{p@}
15026 Twice: \p\ & \p\.
15027 @@end macro
15028 @@bar@{a,b@}
15029 @end example
15030
15031 @noindent produces:
15032
15033 @display
15034 Twice: a,b & a,b.
15035 @end display
15036
15037 If a macro is defined to take more than one argument, but is called
15038 with only one (in braces), the remaining arguments are set to the
15039 empty string, and no error is given. For example:
15040
15041 @example
15042 @@macro addtwo @{p, q@}
15043 Both: \p\\q\.
15044 @@end macro
15045 @@addtwo@{a@}
15046 @end example
15047
15048 @noindent produces simply:
15049
15050 @display
15051 Both: a.
15052 @end display
15053
15054
15055 @node Macro Details
15056 @section Macro Details and Caveats
15057 @cindex Macro details
15058 @cindex Details of macro usage
15059 @cindex Caveats for macro usage
15060
15061 @cindex Macro expansion, contexts for
15062 @cindex Expansion of macros, contexts for
15063 By design, macro expansion does not happen in the following contexts
15064 in @command{makeinfo}:
15065
15066 @itemize @bullet
15067 @item @code{@@macro} and @code{@@unmacro} lines;
15068
15069 @item @code{@@if...} lines, including @code{@@ifset} and similar;
15070
15071 @item @code{@@set}, @code{@@clear}, @code{@@value};
15072
15073 @item @code{@@clickstyle} lines;
15074
15075 @item @code{@@end} lines.
15076 @end itemize
15077
15078 @noindent Unfortunately, @TeX{} may do some expansion in these situations,
15079 possibly yielding errors.
15080
15081 Also, quite a few macro-related constructs cause problems with @TeX{};
15082 some of the caveats are listed below. Thus, if you get macro-related
15083 errors when producing the printed version of a manual, you might try
15084 expanding the macros with @command{makeinfo} by invoking
15085 @command{texi2dvi} with the @samp{-E} option (@pxref{Format with
15086 @t{texi2dvi}}). Or, more reliably, eschew Texinfo macros altogether
15087 and use a language designed for macro processing, such as M4
15088 (@pxref{External Macro Processors}).
15089
15090 @itemize @bullet
15091 @item
15092 As mentioned earlier, macro names must consist entirely of letters.
15093
15094 @item
15095 It is not advisable to redefine any @TeX{} primitive, plain, or
15096 Texinfo command name as a macro. Unfortunately this is a large and
15097 open-ended set of names, and the possible resulting errors are
15098 unpredictable.
15099
15100 @item
15101 All macros are expanded inside at least one @TeX{} group.
15102
15103 @item
15104 Macro arguments cannot cross lines.
15105
15106 @item
15107 Macros containing a command which must be on a line by itself, such as
15108 a conditional, cannot be invoked in the middle of a line. Similarly,
15109 macros containing line-oriented commands or text, such as
15110 @code{@@example} environments, may behave unpredictably in @TeX{}.
15111
15112 @item
15113 White space is ignored at the beginnings of lines.
15114
15115 @item
15116 Macros can't be reliably used in the argument to accent commands
15117 (@pxref{Inserting Accents}).
15118
15119 @item
15120 The backslash escape for commas in macro arguments does not work;
15121 @code{@@comma@{@}} must be used.
15122
15123 @item
15124 As a consequence, if a macro takes two or more arguments, and you want
15125 to pass an argument with the Texinfo command @code{@@,} (to produce a
15126 cedilla, @pxref{Inserting Accents}), you have to use @code{@@value} or
15127 another work-around. Otherwise, @TeX{} takes the comma as separating
15128 the arguments. Example:
15129
15130 @example
15131 @@macro mactwo@{argfirst, argsecond@}
15132 \argfirst\+\argsecond\.
15133 @@end macro
15134 @@set fc Fran@@,cois
15135 @@mactwo@{@@value@{fc@}@}
15136 @end example
15137
15138 @noindent produces:
15139
15140 @display
15141 Fran@,cois+.
15142 @end display
15143
15144 The natural-seeming @code{@@mactwo@{Fran@@,cois@}} passes the two
15145 arguments @samp{Fran@@} and @samp{cois} to the macro, and nothing good
15146 results. And, as just mentioned, although the comma can be escaped
15147 with a backslash for @code{makeinfo} (@samp{@@\,}), that doesn't work
15148 in @TeX{}, so there is no other solution.
15149
15150 @item
15151 It is usually best to avoid comments inside macro definitions, but
15152 see the next item.
15153
15154 @item
15155 In general, the interaction of newlines in the macro definitions and
15156 invocations depends on the precise commands and context,
15157 notwithstanding the previous statements. You may be able to work
15158 around some problems with judicious use of @code{@@c}. Suppose you
15159 define a macro that is always used on a line by itself:
15160
15161 @example
15162 @@macro linemac
15163 @@cindex whatever @@c
15164 @@end macro
15165 ...
15166 foo
15167 @@linemac
15168 bar
15169 @end example
15170
15171 Without the @code{@@c}, there will be a unwanted blank line between
15172 the @samp{@@cindex whatever} and the @samp{bar} (one newline comes
15173 from the macro definition, one from after the invocation), causing an
15174 unwanted paragraph break.
15175
15176 On the other hand, you wouldn't want the @code{@@c} if the macro was
15177 sometimes invoked in the middle of a line (the text after the
15178 invocation would be treated as a comment).
15179
15180 @item
15181 In general, you can't arbitrarily substitute a macro (or
15182 @code{@@value}) call for Texinfo command arguments, even when the text
15183 is the same. Texinfo is not M4 (or even plain @TeX{}). It might work
15184 with some commands, it fails with others. Best not to do it at all.
15185 For instance, this fails:
15186
15187 @example
15188 @@macro offmacro
15189 off
15190 @@end macro
15191 @@headings @@offmacro
15192 @end example
15193
15194 @noindent
15195 This looks equivalent to @code{@@headings off}, but for @TeX{}nical
15196 reasons, it fails with a mysterious error message (namely,
15197 @samp{Paragraph ended before @@headings was complete}).
15198
15199 @item
15200 Macros cannot define macros in the natural way. To do this, you must
15201 use conditionals and raw @TeX{}. For example:
15202
15203 @example
15204 @@ifnottex
15205 @@macro ctor @{name, arg@}
15206 @@macro \name\
15207 something involving \arg\ somehow
15208 @@end macro
15209 @@end macro
15210 @@end ifnottex
15211 @@tex
15212 \gdef\ctor#1@{\ctorx#1,@}
15213 \gdef\ctorx#1,#2,@{\def#1@{something involving #2 somehow@}@}
15214 @@end tex
15215 @end example
15216 @end itemize
15217
15218 The @command{makeinfo} implementation also has the following
15219 limitations (by design):
15220
15221 @itemize
15222 @item
15223 @code{@@verbatim} and macros do not mix; for instance, you can't start
15224 a verbatim block inside a macro and end it outside
15225 (@pxref{@t{@@verbatim}}). Starting any environment inside a macro
15226 and ending it outside may or may not work, for that matter.
15227
15228 @item
15229 Macros that completely define macros are ok, but it's not possible to
15230 have incompletely nested macro definitions. That is, @code{@@macro}
15231 and @code{@@end macro} (likewise for @code{@@rmacro}) must be
15232 correctly paired. For example, you cannot start a macro definition
15233 within a macro, and then end that nested definition outside the macro.
15234 @end itemize
15235
15236 In the @code{makeinfo} implementation before Texinfo 5.0, ends of
15237 lines from expansion of an @code{@@macro} definition did not end an
15238 @@-command line-delimited argument (@code{@@chapter}, @code{@@center},
15239 etc.). This is no longer the case. For example:
15240
15241 @example
15242 @@macro twolines@{@}
15243 aaa
15244 bbb
15245 @@end macro
15246 @@center @@twolines@{@}
15247 @end example
15248
15249 In the current @code{makeinfo}, this is equivalent to:
15250
15251 @example
15252 @@center aaa
15253 bbb
15254 @end example
15255
15256 @noindent with just @samp{aaa} as the argument to @code{@@center}. In
15257 the earlier implementation, it would have been parsed as this:
15258
15259 @example
15260 @@center aaa bbb
15261 @end example
15262
15263
15264 @node @t{@@alias}
15265 @section @samp{@@alias @var{new}=@var{existing}}
15266
15267 @anchor{alias}@c old name
15268 @cindex Aliases, command
15269 @cindex Command aliases
15270 @findex alias
15271
15272 The @samp{@@alias} command defines a new command to be just like an
15273 existing one. This is useful for defining additional markup names,
15274 thus preserving additional semantic information in the input even
15275 though the output result may be the same.
15276
15277 Write the @samp{@@alias} command on a line by itself, followed by the
15278 new command name, an equals sign, and the existing command name.
15279 Whitespace around the equals sign is optional and ignored if present.
15280 Thus:
15281
15282 @example
15283 @@alias @var{new} = @var{existing}
15284 @end example
15285
15286 For example, if your document contains citations for both books and
15287 some other media (movies, for example), you might like to define a
15288 macro @code{@@moviecite@{@}} that does the same thing as an ordinary
15289 @code{@@cite@{@}} but conveys the extra semantic information as well.
15290 You'd do this as follows:
15291
15292 @example
15293 @@alias moviecite = cite
15294 @end example
15295
15296 Macros do not always have the same effect as aliases, due to vagaries
15297 of argument parsing. Also, aliases are much simpler to define than
15298 macros. So the command is not redundant.
15299
15300 Unfortunately, it's not possible to alias Texinfo environments; for
15301 example, @code{@@alias lang=example} is an error.
15302
15303 Aliases must not be recursive, directly or indirectly.
15304
15305 It is not advisable to redefine any @TeX{} primitive, plain @TeX{}, or
15306 Texinfo command name as an alias. Unfortunately this is a very large
15307 set of names, and the possible resulting errors from @TeX{} are
15308 unpredictable.
15309
15310 @command{makeinfo} will accept the same identifiers for aliases as it
15311 does for macro names, that is, alphanumerics and (except as the first
15312 character) @samp{-}.
15313
15314
15315 @node @t{@@definfoenclose}
15316 @section @code{@@definfoenclose}: Customized Highlighting
15317
15318 @anchor{definfoenclose}@c old name
15319 @cindex Highlighting, customized
15320 @cindex Customized highlighting
15321 @findex definfoenclose
15322
15323 An @code{@@definfoenclose} command may be used to define a
15324 highlighting command for all the non-@TeX{} output formats. A command
15325 defined using @code{@@definfoenclose} marks text by enclosing it in
15326 strings that precede and follow the text. You can use this to get
15327 closer control of your output.
15328
15329 Presumably, if you define a command with @code{@@definfoenclose}, you
15330 will create a corresponding command for @TeX{}, either in
15331 @file{texinfo.tex}, @file{texinfo.cnf}, or within an @samp{@@iftex} of
15332 @samp{@@tex} in your document.
15333
15334 Write an @code{@@definfoenclose} command at the beginning of a line
15335 followed by three comma-separated arguments. The first argument to
15336 @code{@@definfoenclose} is the @@-command name (without the
15337 @code{@@}); the second argument is the start delimiter string; and the
15338 third argument is the end delimiter string. The latter two arguments
15339 enclose the highlighted text in the output.
15340
15341 A delimiter string may contain spaces. Neither the start nor end
15342 delimiter is required. If you do not want a start delimiter but do
15343 want an end delimiter, you must follow the command name with two
15344 commas in a row; otherwise, the end delimiter string you intended will
15345 naturally be (mis)interpreted as the start delimiter string.
15346
15347 If you do an @code{@@definfoenclose} on the name of a predefined
15348 command (such as @code{@@emph}, @code{@@strong}, @code{@@t}, or
15349 @code{@@i}), the enclosure definition will override the built-in
15350 definition. We don't recommend this.
15351
15352 An enclosure command defined this way takes one argument in braces,
15353 since it is intended for new markup commands (@pxref{Marking Text}).
15354
15355 @findex phoo
15356 For example, you can write:
15357
15358 @example
15359 @@definfoenclose phoo,//,\\
15360 @end example
15361
15362 @noindent
15363 near the beginning of a Texinfo file to define @code{@@phoo} as an Info
15364 formatting command that inserts `//' before and `\\' after the argument
15365 to @code{@@phoo}. You can then write @code{@@phoo@{bar@}} wherever you
15366 want `//bar\\' highlighted in Info.
15367
15368 For @TeX{} formatting, you could write
15369
15370 @example
15371 @@iftex
15372 @@global@@let@@phoo=@@i
15373 @@end iftex
15374 @end example
15375
15376 @noindent
15377 to define @code{@@phoo} as a command that causes @TeX{} to typeset the
15378 argument to @code{@@phoo} in italics.
15379
15380 Each definition applies to its own formatter: one for @TeX{}, the
15381 other for everything else. The raw @TeX{} commands need to be in
15382 @samp{@@iftex}. @code{@@definfoenclose} command need not be within
15383 @samp{@@ifinfo}, unless you want to use different definitions for
15384 different output formats.
15385
15386 @findex headword
15387 Here is another example: write
15388
15389 @example
15390 @@definfoenclose headword, , :
15391 @end example
15392
15393 @noindent
15394 near the beginning of the file, to define @code{@@headword} as an Info
15395 formatting command that inserts nothing before and a colon after the
15396 argument to @code{@@headword}.
15397
15398 @samp{@@definfoenclose} definitions must not be recursive, directly or
15399 indirectly.
15400
15401
15402 @node External Macro Processors
15403 @section External Macro Processors: Line Directives
15404 @cindex External macro processors
15405 @cindex Macro processors, external
15406
15407 Texinfo macros (and its other text substitution facilities) work fine
15408 in straightforward cases. If your document needs unusually complex
15409 processing, however, their fragility and limitations can be a problem.
15410 In this case, you may want to use a different macro processor
15411 altogether, such as M4 (@pxref{Top,,, m4, M4}) or CPP (@pxref{Top,,,
15412 cpp, The C Preprocessor}).
15413
15414 With one exception, Texinfo does not need to know whether its input is
15415 ``original'' source or preprocessed from some other source file.
15416 Therefore, you can arrange your build system to invoke whatever
15417 programs you like to handle macro expansion or other preprocessing
15418 needs. Texinfo does not offer built-in support for any particular
15419 preprocessor, since no one program seemed likely to suffice for the
15420 requirements of all documents.
15421
15422 @cindex Line numbers, in error messages
15423 @cindex Error messages, line numbers in
15424 The one exception is line numbers in error messages. In that case,
15425 the line number should refer to the original source file, whatever it
15426 may be. There's a well-known mechanism for this: the so-called
15427 @samp{#line} directive. Texinfo supports this.
15428
15429 @menu
15430 * @t{#line} Directive::
15431 * TeX: @t{#line} and @TeX{}.
15432 * Syntax: @t{#line} Syntax Details.
15433 @end menu
15434
15435
15436 @node @t{#line} Directive
15437 @subsection @samp{#line} Directive
15438
15439 @cindex @samp{#line} directive
15440
15441 An input line such as this:
15442
15443 @example
15444 @hashchar{}line 100 "foo.ptexi"
15445 @end example
15446
15447 @noindent indicates that the next line was line 100 of the file
15448 @file{foo.ptexi}, and so that's what an error message should refer to.
15449 Both M4 (@pxref{Preprocessor features,,, m4, GNU M4}) and CPP
15450 (@pxref{Line Control,,, cpp, The C Preprocessor}, and
15451 @ref{Preprocessor Output,,, cpp, The C Preprocessor}) can generate
15452 such lines.
15453
15454 @vindex CPP_LINE_DIRECTIVES
15455 The @command{makeinfo} program recognizes these lines by default,
15456 except within @code{@@verbatim} blocks (@pxref{@t{@@verbatim}}.
15457 Their recognition can be turned off completely with
15458 @code{CPP_LINE_DIRECTIVES} (@pxref{Other Customization Variables}),
15459 though there is normally no reason to do so.
15460
15461 For those few programs (M4, CPP, Texinfo) which need to document
15462 @samp{#line} directives and therefore have examples which would
15463 otherwise match the pattern, the command @code{@@hashchar@{@}} can be
15464 used (@pxref{Inserting a Hashsign}). The example line above looks
15465 like this in the source for this manual:
15466
15467 @example
15468 @@hashchar@{@}line 100 "foo.ptexi"
15469 @end example
15470
15471 The @code{@@hashchar} command was added to Texinfo in 2013. If you
15472 don't want to rely on it, you can also use @code{@@set} and
15473 @code{@@value} to insert the literal @samp{#}:
15474
15475 @example
15476 @@set hash #
15477 @@value@{hash@}line 1 "example.c"
15478 @end example
15479
15480 Or, if suitable, an @code{@@verbatim} environment can be used instead
15481 of @code{@@example}. As mentioned above, @code{#line}-recognition is
15482 disabled inside verbatim blocks.
15483
15484
15485 @node @t{#line} and @TeX{}
15486 @subsection @samp{#line} and @TeX{}
15487
15488 @cindex @TeX{} and @samp{#line} directives
15489 @cindex @samp{#line} directives, not processing with @TeX{}
15490
15491 As mentioned, @command{makeinfo} recognizes the @samp{#line}
15492 directives described in the previous section. However,
15493 @file{texinfo.tex} does not and cannot. Therefore, such a line will
15494 be incorrectly typeset verbatim if @TeX{} sees it. The solution is to
15495 use @command{makeinfo}'s macro expansion options before running
15496 @TeX{}. There are three approaches:
15497
15498 @itemize @bullet
15499 @item
15500 If you run @command{texi2dvi} or its variants (@pxref{Format with
15501 @t{texi2dvi}}), you can pass @option{-E} and @command{texi2dvi}
15502 will run @command{makeinfo} first to expand macros and eliminate
15503 @samp{#line}.
15504
15505 @item
15506 If you run @command{makeinfo} or its variants (@pxref{Generic
15507 Translator @t{texi2any}}), you can specify @option{--no-ifinfo
15508 --iftex -E somefile.out}, and then give @file{somefile.out} to
15509 @code{texi2dvi} in a separate command.
15510
15511 @item
15512 Or you can run @option{makeinfo --dvi --Xopt -E}. (Or @option{--pdf}
15513 instead of @option{--dvi}.) @command{makeinfo} will then call
15514 @command{texi2dvi -E}.
15515 @end itemize
15516
15517 @findex errormsg@r{, and line numbers in @TeX{}}
15518 One last caveat regarding use with @TeX{}: since the @code{#line}
15519 directives are not recognized, the line numbers emitted by the
15520 @code{@@errormsg@{@}} command (@pxref{Conditional Commands}), or by
15521 @TeX{} itself, are the (incorrect) line numbers from the derived file
15522 which @TeX{} is reading, rather than the preprocessor-specified line
15523 numbers. This is another example of why we recommend running
15524 @command{makeinfo} for the best diagnostics (@pxref{@t{makeinfo}
15525 Advantages}).
15526
15527
15528 @node @t{#line} Syntax Details
15529 @subsection @samp{#line} Syntax Details
15530
15531 @cindex @samp{#line} syntax details
15532 @cindex Syntax details, @samp{#line}
15533 @cindex Regular expression, for @samp{#line}
15534
15535 Syntax details for the @samp{#line} directive: the @samp{#} character
15536 can be preceded or followed by whitespace, the word @samp{line} is
15537 optional, and the file name can be followed by a whitespace-separated
15538 list of integers (these are so-called ``flags'' output by CPP in some
15539 cases). For those who like to know the gory details, the actual
15540 (Perl) regular expression which is matched is this:
15541
15542 @example
15543 /^\s*#\s*(line)? (\d+)(( "([^"]+)")(\s+\d+)*)?\s*$/
15544 @end example
15545
15546 As far as we've been able to tell, the trailing integer flags only
15547 occur in conjunction with a filename, so that is reflected in the
15548 regular expression.
15549
15550 As an example, the following is a syntactically valid @samp{#line}
15551 directive, meaning line 1 of @file{/usr/include/stdio.h}:
15552
15553 @example
15554 @hashchar{} 1 "/usr/include/stdio.h" 2 3 4
15555 @end example
15556
15557 Unfortunately, the quoted filename (@samp{"..."}) has to be optional,
15558 because M4 (especially) can often generate @samp{#line} directives
15559 within a single file. Since the @samp{line} is also optional, the
15560 result is that lines might match which you wouldn't expect, e.g.,
15561
15562 @example
15563 @hashchar{} 1
15564 @end example
15565
15566 The possible solutions are described above (@pxref{@t{#line} Directive}).
15567
15568
15569 @node Include Files
15570 @chapter Include Files
15571
15572 @cindex Include files
15573
15574 When a Texinfo processor sees an @code{@@include} command in a Texinfo
15575 file, it processes the contents of the file named by the
15576 @code{@@include} and incorporates them into the output files being
15577 created. Include files thus let you keep a single large document as a
15578 collection of conveniently small parts.
15579
15580 @menu
15581 * Using Include Files:: How to use the @code{@@include} command.
15582 * @t{texinfo-multiple-files-update}:: How to create and update nodes and
15583 menus when using included files.
15584 * Include Files Requirements:: @code{texinfo-multiple-files-update} needs.
15585 * Sample Include File:: A sample outer file with included files
15586 within it; and a sample included file.
15587 * Include Files Evolution:: How use of the @code{@@include} command
15588 has changed over time.
15589 @end menu
15590
15591
15592 @node Using Include Files
15593 @section How to Use Include Files
15594
15595 @findex include
15596
15597 To include another file within a Texinfo file, write the
15598 @code{@@include} command at the beginning of a line and follow it on
15599 the same line by the name of a file to be included. For example:
15600
15601 @example
15602 @@include buffers.texi
15603 @end example
15604
15605 @@-commands are expanded in file names. The one most likely to be
15606 useful is @code{@@value} (@pxref{@t{@@set @@value}}), and even then
15607 only in complicated situations.
15608
15609 An included file should simply be a segment of text that you expect to
15610 be included as is into the overall or @dfn{outer} Texinfo file; it
15611 should not contain the standard beginning and end parts of a Texinfo
15612 file. In particular, you should not start an included file with a
15613 line saying @samp{\input texinfo}; if you do, that text is inserted
15614 into the output file literally. Likewise, you should not end an
15615 included file with an @code{@@bye} command; nothing after @code{@@bye}
15616 is formatted.
15617
15618 In the long-ago past, you were required to write an
15619 @code{@@setfilename} line at the beginning of an included file, but no
15620 longer. Now, it does not matter whether you write such a line. If an
15621 @code{@@setfilename} line exists in an included file, it is ignored.
15622
15623
15624 @node @t{texinfo-multiple-files-update}
15625 @section @code{texinfo-multiple-files-update}
15626
15627 @findex texinfo-multiple-files-update
15628
15629 XEmacs Texinfo mode provides the
15630 @code{texinfo-multiple-files-update} command. This command creates or
15631 updates `Next', `Previous', and `Up' pointers of included files as
15632 well as those in the outer or overall Texinfo file, and it creates or
15633 updates a main menu in the outer file. Depending on whether you call
15634 it with optional arguments, the command updates only the pointers in
15635 the first @code{@@node} line of the included files or all of them:
15636
15637 @table @kbd
15638 @item M-x texinfo-multiple-files-update
15639 Called without any arguments:
15640
15641 @itemize @minus
15642 @item
15643 Create or update the `Next', `Previous', and `Up' pointers of the
15644 first @code{@@node} line in each file included in an outer or overall
15645 Texinfo file.
15646
15647 @item
15648 Create or update the `Top' level node pointers of the outer or
15649 overall file.
15650
15651 @item
15652 Create or update a main menu in the outer file.
15653 @end itemize
15654
15655 @item C-u M-x texinfo-multiple-files-update
15656 Called with @kbd{C-u} as a prefix argument:
15657
15658 @itemize @minus{}
15659 @item
15660 Create or update pointers in the first @code{@@node} line in each
15661 included file.
15662
15663 @item
15664 Create or update the `Top' level node pointers of the outer file.
15665
15666 @item
15667 Create and insert a master menu in the outer file. The master menu
15668 is made from all the menus in all the included files.
15669 @end itemize
15670
15671 @item C-u 8 M-x texinfo-multiple-files-update
15672 Called with a numeric prefix argument, such as @kbd{C-u 8}:
15673
15674 @itemize @minus
15675 @item
15676 Create or update @strong{all} the `Next', `Previous', and `Up' pointers
15677 of all the included files.
15678
15679 @item
15680 Create or update @strong{all} the menus of all the included
15681 files.
15682
15683 @item
15684 Create or update the `Top' level node pointers of the outer or
15685 overall file.
15686
15687 @item
15688 And then create a master menu in the outer file. This is similar to
15689 invoking @code{texinfo-master-menu} with an argument when you are
15690 working with just one file.
15691 @end itemize
15692 @end table
15693
15694 Note the use of the prefix argument in interactive use: with a regular
15695 prefix argument, just @w{@kbd{C-u}}, the
15696 @code{texinfo-multiple-files-update} command inserts a master menu;
15697 with a numeric prefix argument, such as @kbd{C-u 8}, the command
15698 updates @strong{every} pointer and menu in @strong{all} the files and
15699 then inserts a master menu.
15700
15701
15702 @node Include Files Requirements
15703 @section Include Files Requirements
15704 @cindex Include files requirements
15705 @cindex Requirements for include files
15706
15707 If you plan to use the @code{texinfo-multiple-files-update} command,
15708 the outer Texinfo file that lists included files within it should
15709 contain nothing but the beginning and end parts of a Texinfo file, and
15710 a number of @code{@@include} commands listing the included files. It
15711 should not even include indices, which should be listed in an included
15712 file of their own.
15713
15714 Moreover, each of the included files must contain exactly one highest
15715 level node (conventionally, @code{@@chapter} or equivalent),
15716 and this node must be the first node in the included file.
15717 Furthermore, each of these highest level nodes in each included file
15718 must be at the same hierarchical level in the file structure.
15719 Usually, each is an @code{@@chapter}, an @code{@@appendix}, or an
15720 @code{@@unnumbered} node. Thus, normally, each included file contains
15721 one, and only one, chapter or equivalent-level node.
15722
15723 The outer file should contain only @emph{one} node, the `Top' node. It
15724 should @emph{not} contain any nodes besides the single `Top' node. The
15725 @code{texinfo-multiple-files-update} command will not process
15726 them.
15727
15728
15729 @node Sample Include File
15730 @section Sample File with @code{@@include}
15731 @cindex Sample @code{@@include} file
15732 @cindex Include file sample
15733 @cindex @code{@@include} file sample
15734
15735 Here is an example of an outer Texinfo file with @code{@@include} files
15736 within it before running @code{texinfo-multiple-files-update}, which
15737 would insert a main or master menu:
15738
15739 @example
15740 @group
15741 \input texinfo @@c -*-texinfo-*-
15742 @c %**start of header
15743 @@setfilename include-example.info
15744 @@settitle Include Example
15745 @c %**end of header
15746 @end group
15747
15748 ... @xref{Sample Texinfo Files}, for
15749 examples of the rest of the frontmatter ...
15750
15751 @group
15752 @@ifnottex
15753 @@node Top
15754 @@top Include Example
15755 @@end ifnottex
15756 @end group
15757
15758 @group
15759 @@include foo.texinfo
15760 @@include bar.texinfo
15761 @@include concept-index.texinfo
15762 @@bye
15763 @end group
15764 @end example
15765
15766 An included file, such as @file{foo.texinfo}, might look like this:
15767
15768 @example
15769 @group
15770 @@node First
15771 @@chapter First Chapter
15772
15773 Contents of first chapter @dots{}
15774 @end group
15775 @end example
15776
15777 The full contents of @file{concept-index.texinfo} might be as simple as this:
15778
15779 @example
15780 @group
15781 @@node Concept Index
15782 @@unnumbered Concept Index
15783
15784 @@printindex cp
15785 @end group
15786 @end example
15787
15788 The outer Texinfo source file for @cite{The XEmacs Lisp Reference
15789 Manual} is named @file{lispref.texi}. This outer file contains a master
15790 menu with 417 entries and a list of 41 @code{@@include}
15791 files.
15792
15793
15794 @node Include Files Evolution
15795 @section Evolution of Include Files
15796
15797 When Info was first created, it was customary to create many small
15798 Info files on one subject. Each Info file was formatted from its own
15799 Texinfo source file. This custom meant that XEmacs did not need to
15800 make a large buffer to hold the whole of a large Info file when
15801 someone wanted information; instead, XEmacs allocated just enough
15802 memory for the small Info file that contained the particular
15803 information sought. This way, XEmacs could avoid wasting memory.
15804
15805 References from one file to another were made by referring to the file
15806 name as well as the node name. (@xref{Other Info Files, , Referring to
15807 Other Info Files}. Also, see @ref{Four and Five Arguments, ,
15808 @code{@@xref} with Four and Five Arguments}.)
15809
15810 Include files were designed primarily as a way to create a single,
15811 large printed manual out of several smaller Info files. In a printed
15812 manual, all the references were within the same document, so @TeX{}
15813 could automatically determine the references' page numbers. The Info
15814 formatting commands used include files only for creating joint
15815 indices; each of the individual Texinfo files had to be formatted for
15816 Info individually. (Each, therefore, required its own
15817 @code{@@setfilename} line.)
15818
15819 However, because large Info files are now split automatically, it is
15820 no longer necessary to keep them small.
15821
15822 Nowadays, multiple Texinfo files are used mostly for large documents,
15823 such as @cite{The XEmacs Lisp Reference Manual}, and for projects
15824 in which several different people write different sections of a
15825 document simultaneously.
15826
15827 In addition, the Info formatting commands have been extended to work
15828 with the @code{@@include} command so as to create a single large Info
15829 file that is split into smaller files if necessary. This means that
15830 you can write menus and cross references without naming the different
15831 Texinfo files.
15832
15833
15834 @node Hardcopy
15835 @chapter Formatting and Printing Hardcopy
15836 @cindex Format and print hardcopy
15837 @cindex Printing hardcopy
15838 @cindex Hardcopy, printing it
15839 @cindex Making a printed manual
15840 @cindex Sorting indices
15841 @cindex Indices, sorting
15842 @cindex @TeX{} index sorting
15843
15844 Running the @command{texi2dvi} or @command{texi2pdf} command is the
15845 simplest way to create printable output. These commands are installed
15846 as part of the Texinfo package.
15847
15848 More specifically, three major shell commands are used to print
15849 formatted output from a Texinfo manual: one converts the Texinfo
15850 source into something printable, a second sorts indices, and a third
15851 actually prints the formatted document. When you use the shell
15852 commands, you can either work directly in the operating system shell
15853 or work within a shell inside XEmacs (or some other computing
15854 environment).
15855
15856 If you are using XEmacs, you can use commands provided by Texinfo
15857 mode instead of shell commands. In addition to the three commands to
15858 format a file, sort the indices, and print the result, Texinfo mode
15859 offers key bindings for commands to recenter the output buffer, show the
15860 print queue, and delete a job from the print queue.
15861
15862 Details are in the following sections.
15863
15864 @menu
15865 * Use @TeX{}:: Use @TeX{} to format for hardcopy.
15866 * Format with @t{tex}/@t{texindex}:: How to format with explicit shell commands.
15867 * Format with @t{texi2dvi}:: A simpler way to format.
15868 * Print with @t{lpr}:: How to print.
15869 * Within XEmacs:: How to format and print from an XEmacs shell.
15870 * Texinfo Mode Printing:: How to format and print in Texinfo mode.
15871 * Compile-Command:: How to print using XEmacs's compile command.
15872 * Requirements Summary:: @TeX{} formatting requirements summary.
15873 * Preparing for @TeX{}:: What to do before you use @TeX{}.
15874 * Overfull hboxes:: What are and what to do with overfull hboxes.
15875 * @t{@@smallbook}:: How to print small format books and manuals.
15876 * A4 Paper:: How to print on A4 or A5 paper.
15877 * @t{@@pagesizes}:: How to print with customized page sizes.
15878 * Cropmarks and Magnification:: How to print marks to indicate the size
15879 of pages and how to print scaled up output.
15880 * PDF Output:: Portable Document Format output.
15881 * Obtaining @TeX{}:: How to obtain @TeX{}.
15882 @end menu
15883
15884
15885 @node Use @TeX{}
15886 @section Use @TeX{}
15887
15888 The typesetting program called @TeX{} is used for formatting a Texinfo
15889 file. @TeX{} is a very powerful typesetting program and, when used
15890 correctly, does an exceptionally good job.
15891
15892 @xref{Obtaining @TeX{}}, for information on how to obtain @TeX{}. It
15893 is not included in the Texinfo package, being a vast suite of software
15894 itself.
15895
15896
15897 @node Format with @t{tex}/@t{texindex}
15898 @section Format with @code{tex}/@code{texindex}
15899
15900 @cindex Shell formatting with @code{tex} and @code{texindex}
15901 @cindex Formatting with @code{tex} and @code{texindex}
15902 @cindex DVI file
15903
15904 You can format the Texinfo file with the shell command @code{tex}
15905 followed by the name of the Texinfo file. For example:
15906
15907 @example
15908 tex foo.texi
15909 @end example
15910
15911 @noindent @TeX{} will produce a @dfn{DVI file} as well as several auxiliary
15912 files containing information for indices, cross references, etc. The
15913 DVI file (for @dfn{DeVice Independent} file) can be printed on virtually
15914 any device (see the following sections).
15915
15916 @pindex texindex
15917 The @code{tex} formatting command itself does not sort the indices; it
15918 writes an output file of unsorted index data. To generate a printed
15919 index after running the @command{tex} command, you first need a sorted
15920 index to work from. The @command{texindex} command sorts indices.
15921 (The source file @file{texindex.c} comes as part of the standard
15922 Texinfo distribution, among other places.) (@command{texi2dvi} runs
15923 @command{tex} and @command{texindex} as necessary.)
15924
15925 @anchor{Names of index files}
15926 @cindex Names of index files
15927 @cindex Index file names
15928 @code{tex} formatting command outputs unsorted index files under names
15929 that obey a standard convention: the name of your main input file with
15930 any @samp{.texinfo} (or similar, @pxref{Minimum,, What a Texinfo File
15931 Must Have}), followed by the two letter names of indices. For
15932 example, the raw index output files for the input file
15933 @file{foo.texinfo} would be @file{foo.cp}, @file{foo.vr},
15934 @file{foo.fn}, @file{foo.tp}, @file{foo.pg} and @file{foo.ky}. Those
15935 are exactly the arguments to give to @code{texindex}.
15936
15937 @need 1000
15938 @cindex Wildcards
15939 @cindex Globbing
15940 Instead of specifying all the unsorted index file names explicitly, you
15941 can use @samp{??} as shell wildcards and give the command in this
15942 form:
15943
15944 @example
15945 texindex foo.??
15946 @end example
15947
15948 @noindent
15949 This command will run @code{texindex} on all the unsorted index files,
15950 including any two letter indices that you have defined yourself using
15951 @code{@@defindex} or @code{@@defcodeindex}. You can safely run
15952 @samp{texindex foo.??} even if there are files with two letter
15953 extensions that are not index files, such as @samp{foo.el}. The
15954 @code{texindex} command reports but otherwise ignores such files.
15955
15956 For each file specified, @code{texindex} generates a sorted index file
15957 whose name is made by appending @samp{s} to the input file name. The
15958 @code{@@printindex} command looks for a file with that name
15959 (@pxref{Printing Indices & Menus}). @code{texindex} does not alter the
15960 raw index output file.
15961
15962 After you have sorted the indices, you need to rerun @code{tex} on the
15963 Texinfo file. This regenerates the DVI file, this time with
15964 up-to-date index entries.
15965
15966 Finally, you may need to run @code{tex} one more time, to get the page
15967 numbers in the cross references correct.
15968
15969 To summarize, this is a five step process:
15970
15971 @enumerate
15972 @item
15973 Run @code{tex} on your Texinfo file. This generates a DVI file (with
15974 undefined cross references and no indices), and the raw index files
15975 (with two letter extensions).
15976
15977 @item
15978 Run @code{texindex} on the raw index files. This creates the
15979 corresponding sorted index files (with three letter extensions).
15980
15981 @item
15982 Run @code{tex} again on your Texinfo file. This regenerates the DVI
15983 file, this time with indices and defined cross references, but with
15984 page numbers for the cross references from the previous run, generally
15985 incorrect.
15986
15987 @item
15988 Sort the indices again, with @code{texindex}.
15989
15990 @item
15991 Run @code{tex} one last time. This time the correct page numbers are
15992 written for the cross references.
15993 @end enumerate
15994
15995 @pindex texi2dvi
15996 Alternatively, it's a one-step process: run @code{texi2dvi}
15997 (@pxref{Format with @t{texi2dvi}}).
15998
15999 You need not run @code{texindex} each time after you run @code{tex}. If
16000 you do not, on the next run, the @code{tex} formatting command will use
16001 whatever sorted index files happen to exist from the previous use of
16002 @code{texindex}. This is usually ok while you are debugging.
16003
16004 @cindex Auxiliary files, avoiding
16005 @findex novalidate
16006 @cindex Pointer validation, suppressing
16007 @cindex Chapters, formatting one at a time
16008 Sometimes you may wish to print a document while you know it is
16009 incomplete, or to print just one chapter of a document. In that case,
16010 the usual auxiliary files that @TeX{} creates and warnings @TeX{}
16011 gives when cross references are not satisfied are just nuisances. You
16012 can avoid them with the @code{@@novalidate} command, which you must
16013 give @emph{before} the @code{@@setfilename} command
16014 (@pxref{@t{@@setfilename}}). Thus, the beginning of your file
16015 would look approximately like this:
16016
16017 @example
16018 \input texinfo
16019 @@novalidate
16020 @@setfilename myfile.info
16021 @dots{}
16022 @end example
16023
16024 @noindent @code{@@novalidate} also turns off validation in
16025 @code{makeinfo}, just like its @code{--no-validate} option
16026 (@pxref{Pointer Validation}).
16027
16028
16029 @node Format with @t{texi2dvi}
16030 @section Format with @code{texi2dvi}
16031
16032 @pindex texi2dvi @r{(shell script)}
16033
16034 The @code{texi2dvi} command automatically runs both @TeX{} and
16035 @command{texindex} as many times as necessary to produce a DVI file
16036 with sorted indices and all cross references resolved. It is
16037 therefore simpler than manually executing the
16038 @code{tex}---@code{texindex}---@code{tex}---@code{tex} sequence
16039 described in the previous section.
16040
16041 To run @code{texi2dvi} on an input file @file{foo.texi}, do this (where
16042 @samp{prompt$ } is your shell prompt):
16043
16044 @example
16045 prompt$ @kbd{texi2dvi foo.texi}
16046 @end example
16047
16048 As shown in this example, the input filenames to @code{texi2dvi} must
16049 include any extension (@samp{.texi}, @samp{.texinfo}, etc.). Under
16050 MS-DOS and perhaps in other circumstances, you may need to run @samp{sh
16051 texi2dvi foo.texi} instead of relying on the operating system to invoke
16052 the shell on the @samp{texi2dvi} script.
16053
16054 @opindex --command@r{, for @command{texi2dvi}}
16055 One useful option to @code{texi2dvi} is @samp{--command=@var{cmd}}.
16056 This inserts @var{cmd} on a line by itself after the
16057 @code{@@setfilename} in a temporary copy of the input file before
16058 running @TeX{}. With this, you can specify different printing
16059 formats, such as @code{@@smallbook} (@pxref{@t{@@smallbook}}),
16060 @code{@@afourpaper} (@pxref{A4 Paper}), or @code{@@pagesizes}
16061 (@pxref{@t{@@pagesizes}}), without actually changing the document
16062 source. (You can also do this on a site-wide basis with
16063 @file{texinfo.cnf}; @pxref{Preparing for @TeX{}}).
16064
16065 @opindex --pdf@r{, for @command{texi2dvi}}
16066 @pindex pdftexi2dvi
16067 With the @option{--pdf} option, @command{texi2dvi} produces PDF output
16068 instead of DVI (@pxref{PDF Output}), by running @command{pdftex}
16069 instead of @command{tex}. Alternatively, the command
16070 @command{texi2pdf} is an abbreviation for running @samp{texi2dvi
16071 --pdf}. The command @command{pdftexi2dvi} is also supported as a
16072 convenience to AUC-@TeX{} users (@pxref{Top,,, auctex, AUC-@TeX{}}, since
16073 that program merely prepends @samp{pdf} to DVI producing tools to have
16074 PDF producing tools.
16075
16076 @opindex --dvipdf@r{, for @command{texi2dvi}}
16077 @pindex dvipdfmx
16078 With the @option{--dvipdf} option, @command{texi2dvi} produces PDF
16079 output by running @TeX{} and then a DVI-to-PDF program: if the
16080 @env{DVIPDF} environment variable is set, that value is used, else
16081 the first extant among @code{dvipdfmx}, @code{dvipdfm}, @code{dvipdf},
16082 @code{dvi2pdf}, @code{dvitopdf}. This method can support CJK
16083 typesetting better than @command{pdftex}.
16084
16085 @opindex --ps@r{, for @command{texi2dvi}}
16086 @pindex dvips
16087 With the @option{--ps} option, @command{texi2dvi} produces PostScript
16088 instead of DVI, by running @command{tex} and then @command{dvips}
16089 (@pxref{Top,,, dvips, Dvips}). (Or the value of the @env{DVIPS}
16090 environment variable, if set.)
16091
16092 @cindex @LaTeX{}, processing with @command{texi2dvi}
16093 @command{texi2dvi} can also be used to process @LaTeX{} files; simply
16094 run @samp{texi2dvi filename.ext}.
16095
16096 @opindex --language@r{, for @command{texi2dvi}}
16097 Normally @command{texi2dvi} is able to guess the input file language
16098 by its contents and file name suffix. If, however, it fails to do so
16099 you can specify the input language using
16100 @option{--language=@var{lang}} command line option, where @var{lang}
16101 is either @samp{latex} or @samp{texinfo}.
16102
16103 @command{texi2dvi} will use @command{etex} (or @command{pdfetex}) if
16104 they are available; these extended versions of @TeX{} are not
16105 required, and the DVI (or PDF) output is identical, but they simplify
16106 the @TeX{} programming in some cases, and provide additional tracing
16107 information when debugging @file{texinfo.tex}.
16108
16109 @opindex --translate-file@r{, for @command{texi2dvi}}
16110 Several options are provided for handling documents, written in
16111 character sets other than ASCII@. The
16112 @option{--translate-file=@var{file}} option instructs
16113 @command{texi2dvi} to translate input into internal @TeX{} character
16114 set using @dfn{translation file} @var{file} (@pxref{TCX files, TCX
16115 files, TCX files: Character translations, web2c, Web2c: A @TeX{}
16116 implementation}).
16117
16118 @opindex --recode@r{, for @command{texi2dvi}}
16119 The options @option{--recode} and @option{--recode-from=@var{enc}}
16120 allow conversion of an input document before running @TeX{}. The
16121 @option{--recode} option recodes the document from encoding specified
16122 by @samp{@@documentencoding} command
16123 (@pxref{@t{@@documentencoding}}) to plain 7-bit @samp{texinfo}
16124 encoding.
16125
16126 @opindex --recode-from@r{, for @command{texi2dvi}}
16127 The option @option{--recode-from=@var{enc}} recodes the document from
16128 @var{enc} encoding to the encoding specified by
16129 @samp{@@documentencoding}. This is useful, for example, if the
16130 document is written in @samp{UTF-8} encoding and an equivalent 8-bit
16131 encoding is supported by @command{makeinfo}.
16132
16133 Both @option{--recode} and @option{--recode-from=@var{enc}} use
16134 @command{recode} utility to perform the conversion. If
16135 @command{recode} fails to process the file, @command{texi2dvi} prints
16136 a warning and continues, using the unmodified input file.
16137
16138 The option @option{-E} (equivalently, @option{-e} and
16139 @option{--expand}) does Texinfo macro expansion using
16140 @command{makeinfo} instead of the @TeX{} implementation (@pxref{Macro
16141 Details}). Each implementation has its own limitations and
16142 advantages. If this option is used, the string
16143 @code{@@c@tie{}_texi2dvi} must not appear at the beginning of a line
16144 in the source file.
16145
16146 For the list of all options, run @samp{texi2dvi --help}.
16147
16148
16149 @node Print with @t{lpr}
16150 @section Print With @code{lpr -d} From Shell
16151
16152 @pindex lpr @r{(DVI print command)}
16153
16154 The precise command to print a DVI file depends on your system
16155 installation. Two common ones are @samp{dvips foo.dvi -o} and @samp{lpr
16156 -d foo.dvi}.
16157
16158 For example, the following commands will (perhaps) suffice to sort the
16159 indices, format, and print the @cite{Bison Manual}:
16160
16161 @example
16162 @group
16163 tex bison.texinfo
16164 texindex bison.??
16165 tex bison.texinfo
16166 lpr -d bison.dvi
16167 @end group
16168 @end example
16169
16170 @noindent
16171 (Remember that the shell commands may be different at your site; but
16172 these are commonly used versions.)
16173
16174 Using the @code{texi2dvi} shell script (see the previous section):
16175
16176 @example
16177 @group
16178 texi2dvi bison.texinfo
16179 lpr -d bison.dvi
16180 # or perhaps dvips bison.dvi -o
16181 @end group
16182 @end example
16183
16184 @cindex Shell printing, on MS-DOS/MS-Windows
16185 @cindex Printing DVI files, on MS-DOS/MS-Windows
16186 @pindex lpr@r{-d, replacements on MS-DOS/MS-Windows}
16187 @code{lpr} is a standard program on Unix systems, but it is usually
16188 absent on MS-DOS/MS-Windows. Some network packages come with a
16189 program named @code{lpr}, but these are usually limited to sending files
16190 to a print server over the network, and generally don't support the
16191 @samp{-d} option. If you are unfortunate enough to work on one of these
16192 systems, you have several alternative ways of printing DVI files:
16193
16194 @itemize @bullet{}
16195 @item Find and install a Unix-like @code{lpr} program, or its clone.
16196 If you can do that, you will be able to print DVI files just like
16197 described above.
16198
16199 @item Send the DVI files to a network printer queue for DVI files.
16200 Some network printers have special queues for printing DVI files. You
16201 should be able to set up your network software to send files to that
16202 queue. In some cases, the version of @code{lpr} which comes with your
16203 network software will have a special option to send a file to specific
16204 queues, like this:
16205
16206 @example
16207 lpr -Qdvi -hprint.server.domain bison.dvi
16208 @end example
16209
16210 @item Convert the DVI file to a Postscript or PCL file and send it to your
16211 local printer. @xref{Invoking Dvips,,, dvips, Dvips}, and the man
16212 pages for @code{dvilj}, for detailed description of these tools. Once
16213 the DVI file is converted to the format your local printer understands
16214 directly, just send it to the appropriate port, usually @samp{PRN}.
16215 @end itemize
16216
16217
16218 @node Within XEmacs
16219 @section From an XEmacs Shell
16220 @cindex Print, format from XEmacs shell
16221 @cindex Format, print from XEmacs shell
16222 @cindex Shell, format, print from
16223 @cindex XEmacs shell, format, print from
16224
16225 You can give formatting and printing commands from a shell within
16226 XEmacs. To create a shell within XEmacs, type @kbd{M-x shell}. In this
16227 shell, you can format and print the document. @xref{Hardcopy, , Format
16228 and Print Hardcopy}, for details.
16229
16230 You can switch to and from the shell buffer while @code{tex} is
16231 running and do other editing. If you are formatting a long document
16232 on a slow machine, this can be very convenient.
16233
16234 You can also use @code{texi2dvi} from an XEmacs shell. For example,
16235 here is how to use @code{texi2dvi} to format and print @cite{Using and
16236 Porting GNU CC} from a shell within XEmacs:
16237
16238 @example
16239 @group
16240 texi2dvi gcc.texinfo
16241 lpr -d gcc.dvi
16242 @end group
16243 @end example
16244
16245 See the next section for more information about formatting
16246 and printing in Texinfo mode.
16247
16248
16249 @node Texinfo Mode Printing
16250 @section Formatting and Printing in Texinfo Mode
16251 @cindex Region printing in Texinfo mode
16252 @cindex Format and print in Texinfo mode
16253 @cindex Print and format in Texinfo mode
16254
16255 Texinfo mode provides several predefined key commands for @TeX{}
16256 formatting and printing. These include commands for sorting indices,
16257 looking at the printer queue, killing the formatting job, and
16258 recentering the display of the buffer in which the operations
16259 occur.
16260
16261 @table @kbd
16262 @item C-c C-t C-b
16263 @itemx M-x texinfo-tex-buffer
16264 Run @code{texi2dvi} on the current buffer.
16265
16266 @item C-c C-t C-r
16267 @itemx M-x texinfo-tex-region
16268 Run @TeX{} on the current region.
16269
16270 @item C-c C-t C-i
16271 @itemx M-x texinfo-texindex
16272 Sort the indices of a Texinfo file formatted with
16273 @code{texinfo-tex-region}.
16274
16275 @item C-c C-t C-p
16276 @itemx M-x texinfo-tex-print
16277 Print a DVI file that was made with @code{texinfo-tex-region} or
16278 @code{texinfo-tex-buffer}.
16279
16280 @item C-c C-t C-q
16281 @itemx M-x tex-show-print-queue
16282 Show the print queue.
16283
16284 @item C-c C-t C-d
16285 @itemx M-x texinfo-delete-from-print-queue
16286 Delete a job from the print queue; you will be prompted for the job
16287 number shown by a preceding @kbd{C-c C-t C-q} command
16288 (@code{texinfo-show-tex-print-queue}).
16289
16290 @item C-c C-t C-k
16291 @itemx M-x tex-kill-job
16292 Kill the currently running @TeX{} job started by either
16293 @code{texinfo-tex-region} or @code{texinfo-tex-buffer}, or any other
16294 process running in the Texinfo shell buffer.
16295
16296 @item C-c C-t C-x
16297 @itemx M-x texinfo-quit-job
16298 Quit a @TeX{} formatting job that has stopped because of an error by
16299 sending an @key{x} to it. When you do this, @TeX{} preserves a record
16300 of what it did in a @file{.log} file.
16301
16302 @item C-c C-t C-l
16303 @itemx M-x tex-recenter-output-buffer
16304 Redisplay the shell buffer in which the @TeX{} printing and formatting
16305 commands are run to show its most recent output.
16306 @end table
16307
16308 @need 1000
16309 Thus, the usual sequence of commands for formatting a buffer is as
16310 follows (with comments to the right):
16311
16312 @example
16313 @group
16314 C-c C-t C-b @r{Run @code{texi2dvi} on the buffer.}
16315 C-c C-t C-p @r{Print the DVI file.}
16316 C-c C-t C-q @r{Display the printer queue.}
16317 @end group
16318 @end example
16319
16320 The Texinfo mode @TeX{} formatting commands start a subshell in XEmacs
16321 called the @file{*tex-shell*}. The @code{texinfo-tex-command},
16322 @code{texinfo-texindex-command}, and @code{tex-dvi-print-command}
16323 commands are all run in this shell.
16324
16325 You can watch the commands operate in the @samp{*tex-shell*} buffer,
16326 and you can switch to and from and use the @samp{*tex-shell*} buffer
16327 as you would any other shell buffer.
16328
16329 @need 1500
16330 The formatting and print commands depend on the values of several variables.
16331 The default values are:
16332
16333 @example
16334 @group
16335 @r{Variable} @r{Default value}
16336
16337 texinfo-texi2dvi-command "texi2dvi"
16338 texinfo-tex-command "tex"
16339 texinfo-texindex-command "texindex"
16340 texinfo-delete-from-print-queue-command "lprm"
16341 texinfo-tex-trailer "@@bye"
16342 tex-start-of-header "%**start"
16343 tex-end-of-header "%**end"
16344 tex-dvi-print-command "lpr -d"
16345 tex-show-queue-command "lpq"
16346 @end group
16347 @end example
16348
16349 You can change the values of these variables with the @kbd{M-x
16350 set-variable} command (@pxref{Examining, , Examining and Setting
16351 Variables, xemacs, XEmacs User's Manual}), or with your @file{init.el}
16352 initialization file (@pxref{Init File, , , xemacs, XEmacs User's
16353 Manual}).
16354
16355 @cindex Customize XEmacs package (@t{Development/Docs/Texinfo})
16356 Beginning with version 20, XEmacs offers a user-friendly interface,
16357 called @dfn{Customize}, for changing values of user-definable variables.
16358 @xref{Easy Customization, , Easy Customization Interface, xemacs, XEmacs
16359 User's Manual}, for more details about this. The Texinfo variables can
16360 be found in the @samp{Development/Docs/Texinfo} group, once you invoke
16361 the @kbd{M-x customize} command.
16362
16363
16364 @node Compile-Command
16365 @section Using the Local Variables List
16366 @cindex Local variables
16367 @cindex Compile command for formatting
16368 @cindex Format with the compile command
16369
16370 Yet another way to apply the @TeX{} formatting command to a Texinfo file
16371 is to put that command in a @dfn{local variables list} at the end of the
16372 Texinfo file. You can then specify the @code{tex} or @code{texi2dvi}
16373 commands as a @code{compile-command} and have XEmacs run it by typing
16374 @kbd{M-x compile}. This creates a special shell called the
16375 @file{*compilation*} buffer in which XEmacs runs the compile command.
16376 For example, at the end of the @file{gdb.texinfo} file, after the
16377 @code{@@bye}, you could put the following:
16378
16379 @example
16380 @group
16381 Local Variables:
16382 compile-command: "texi2dvi gdb.texinfo"
16383 End:
16384 @end group
16385 @end example
16386
16387 @noindent
16388 This technique is most often used by programmers who also compile programs
16389 this way; see @ref{Compilation, , , xemacs, XEmacs User's Manual}.
16390
16391
16392 @node Requirements Summary
16393 @section @TeX{} Formatting Requirements Summary
16394 @cindex Requirements for formatting
16395 @cindex Minimal requirements for formatting
16396 @cindex Formatting requirements
16397
16398 Every Texinfo file that is to be input to @TeX{} must begin with a
16399 @code{\input} command and must contain an @code{@@setfilename} command:
16400
16401 @example
16402 \input texinfo
16403 @@setfilename @var{arg-not-used-by-@TeX{}}
16404 @end example
16405
16406 @noindent
16407 The first command instructs @TeX{} to load the macros it needs to
16408 process a Texinfo file and the second command opens auxiliary files.
16409
16410 Every Texinfo file must end with a line that terminates @TeX{}'s
16411 processing and forces out unfinished pages:
16412
16413 @example
16414 @@bye
16415 @end example
16416
16417 Strictly speaking, these lines are all a Texinfo file needs to be
16418 processed successfully by @TeX{}.
16419
16420 Usually, however, the beginning includes an @code{@@settitle} command to
16421 define the title of the printed manual, an @code{@@setchapternewpage}
16422 command, a title page, a copyright page, and permissions. Besides an
16423 @code{@@bye}, the end of a file usually includes indices and a table of
16424 contents. (And of course most manuals contain a body of text as well.)
16425
16426 For more information, see:
16427
16428 @itemize @bullet
16429 @item @ref{@t{@@settitle}}.
16430 @item @ref{@t{@@setchapternewpage}}.
16431 @item @ref{Headings}.
16432 @item @ref{Titlepage & Copyright Page}.
16433 @item @ref{Printing Indices & Menus}.
16434 @item @ref{Contents}.
16435 @end itemize
16436
16437
16438 @node Preparing for @TeX{}
16439 @section Preparing for @TeX{}
16440 @cindex Preparing for @TeX{}
16441 @cindex @TeX{} input initialization
16442 @cindex @b{.profile} initialization file
16443 @cindex @b{.cshrc} initialization file
16444 @cindex Initialization file for @TeX{} input
16445
16446 @TeX{} needs to know where to find the @file{texinfo.tex} file that the
16447 @samp{\input texinfo} command on the first line reads. The
16448 @file{texinfo.tex} file tells @TeX{} how to handle @@-commands; it is
16449 included in all standard GNU distributions. The latest version is
16450 always available from the Texinfo source repository:
16451 @smalldisplay
16452 @uref{http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/doc/texinfo.tex?rev=HEAD}
16453 @end smalldisplay
16454
16455 @pindex texinfo.tex@r{, installing}
16456
16457 Usually, the installer has put the @file{texinfo.tex} file in the
16458 default directory that contains @TeX{} macros when GNU Texinfo, XEmacs or
16459 other GNU software is installed. In this case, @TeX{} will find the
16460 file and you do not need to do anything special. If this has not been
16461 done, you can put @file{texinfo.tex} in the current directory when you
16462 run @TeX{}, and @TeX{} will find it there.
16463
16464 @pindex epsf.tex@r{, installing}
16465 Also, you should install @file{epsf.tex}, if it is not already installed
16466 from another distribution. More details are at the end of the description
16467 of the @code{@@image} command (@pxref{Images}).
16468
16469 @cindex European Computer Modern fonts, installing
16470 @cindex EC fonts, installing
16471 @cindex CM-Super fonts, installing
16472 To be able to use quotation marks other than those used in English
16473 you'll need to install European Computer Modern fonts and optionally
16474 CM-Super fonts, unless they are already installed (@pxref{Inserting
16475 Quotation Marks}).
16476
16477 @pindex feymr10@r{, installing}
16478 @cindex Euro font, installing
16479 If you intend to use the @code{@@euro} command, you should install the
16480 Euro font, if it is not already installed. @xref{@t{@@euro}}.
16481
16482 @pindex texinfo.cnf @r{installation}
16483 @cindex Customizing of @TeX{} for Texinfo
16484 @cindex Site-wide Texinfo configuration file
16485 Optionally, you may create a file @file{texinfo.cnf} for site
16486 configuration. This file is read by @TeX{} when the
16487 @code{@@setfilename} command is executed (@pxref{@t{@@setfilename}}).
16488 You can put any commands you like there, according to local site-wide
16489 conventions. They will be read by @TeX{} when processing any Texinfo
16490 document. For example, if @file{texinfo.cnf} contains the line
16491 @samp{@@afourpaper} (@pxref{A4 Paper}), then all Texinfo documents
16492 will be processed with that page size in effect. If you have nothing
16493 to put in @file{texinfo.cnf}, you do not need to create it.
16494
16495 @cindex Environment variable @code{TEXINPUTS}
16496 @vindex TEXINPUTS
16497 If neither of the above locations for these system files suffice for
16498 you, you can specify the directories explicitly. For
16499 @file{texinfo.tex}, you can do this by writing the complete path for the
16500 file after the @code{\input} command. Another way, that works for both
16501 @file{texinfo.tex} and @file{texinfo.cnf} (and any other file @TeX{}
16502 might read), is to set the @code{TEXINPUTS} environment variable in your
16503 @file{.profile} or @file{.cshrc} file.
16504
16505 Whether you use @file{.profile} or @file{.cshrc} depends on
16506 whether you use a Bourne shell-compatible (@code{sh}, @code{bash},
16507 @code{ksh}, @dots{}) or C shell-compatible (@code{csh}, @code{tcsh})
16508 command interpreter, respeictvely.
16509
16510 In a @file{.profile} file, you could use the following @code{sh} command
16511 sequence:
16512
16513 @example
16514 @group
16515 TEXINPUTS=.:/home/me/mylib:
16516 export TEXINPUTS
16517 @end group
16518 @end example
16519
16520 @need 1000
16521 While in a @file{.cshrc} file, you could use the following @code{csh}
16522 command sequence:
16523
16524 @example
16525 setenv TEXINPUTS .:/home/me/mylib:
16526 @end example
16527
16528
16529 On MS-DOS/MS-Windows, you would say it like this@footnote{Note the use
16530 of the @samp{;} character as directory separator, instead of @samp{:}.}:
16531
16532 @example
16533 @group
16534 set TEXINPUTS=.;d:/home/me/mylib;c:
16535 @end group
16536 @end example
16537
16538 @noindent
16539 It is customary for DOS/Windows users to put such commands in the
16540 @file{autoexec.bat} file, or in the Windows registry.
16541
16542 @noindent
16543 These settings would cause @TeX{} to look for @file{\input} file first
16544 in the current directory, indicated by the @samp{.}, then in a
16545 hypothetical user @samp{me}'s @file{mylib} directory, and finally in
16546 the system directories. (A leading, trailing, or doubled @samp{:}
16547 indicates searching the system directories at that point.)
16548
16549 @cindex Dumping a .fmt file
16550 @cindex Format file, dumping
16551 Finally, you may wish to dump a @file{.fmt} file (@pxref{Memory dumps,,,
16552 web2c, Web2C}) so that @TeX{} can load Texinfo faster. (The
16553 disadvantage is that then updating @file{texinfo.tex} requires
16554 redumping.) You can do this by running this command, assuming
16555 @file{epsf.tex} is findable by @TeX{}:
16556
16557 @example
16558 initex texinfo @@dump
16559 @end example
16560
16561 @noindent
16562 (@code{dump} is a @TeX{} primitive.) Then, move @file{texinfo.fmt} to
16563 wherever your @code{.fmt} files are found; typically, this will be in the
16564 subdirectory @file{web2c} of your @TeX{} installation.
16565
16566
16567 @node Overfull hboxes
16568 @section Overfull ``hboxes''
16569 @cindex Overfull @samp{hboxes}
16570 @cindex @samp{hbox}, overfull
16571 @cindex Final output
16572
16573 @TeX{} is sometimes unable to typeset a line without extending it into
16574 the right margin. This can occur when @TeX{} comes upon what it
16575 interprets as a long word that it cannot hyphenate, such as an
16576 electronic mail network address or a very long title. When this
16577 happens, @TeX{} prints an error message like this:
16578
16579 @example
16580 Overfull @@hbox (20.76302pt too wide)
16581 @end example
16582
16583 @findex hbox
16584 @noindent
16585 (In @TeX{}, lines are in ``horizontal boxes'', hence the term, ``hbox''.
16586 @samp{@@hbox} is a @TeX{} primitive not used in the Texinfo language.)
16587
16588 @TeX{} also provides the line number in the Texinfo source file and
16589 the text of the offending line, which is marked at all the places that
16590 @TeX{} considered hyphenation.
16591 @xref{Debugging with @TeX{}},
16592 for more information about typesetting errors.
16593
16594 If the Texinfo file has an overfull hbox, you can rewrite the sentence
16595 so the overfull hbox does not occur, or you can decide to leave it. A
16596 small excursion into the right margin often does not matter and may not
16597 even be noticeable.
16598
16599 If you have many overfull boxes and/or an antipathy to rewriting, you
16600 can coerce @TeX{} into greatly increasing the allowable interword
16601 spacing, thus (if you're lucky) avoiding many of the bad line breaks,
16602 like this:
16603
16604 @findex \emergencystretch
16605 @example
16606 @@tex
16607 \global\emergencystretch = .9\hsize
16608 @@end tex
16609 @end example
16610
16611 @noindent
16612 (You should adjust the fraction as needed.) This huge value for
16613 @code{\emergencystretch} cannot be the default, since then the typeset
16614 output would generally be of noticeably lower quality; the default
16615 is @samp{.15\hsize}. @code{\hsize} is the @TeX{} dimension
16616 containing the current line width.
16617
16618 @cindex Black rectangle in hardcopy
16619 @cindex Rectangle, black in hardcopy
16620 @cindex Box, ugly black in hardcopy
16621 @cindex Ugly black rectangles in hardcopy
16622 For what overfull boxes you have, however, @TeX{} will print a large,
16623 ugly, black rectangle beside the line that contains the overfull hbox
16624 unless told otherwise. This is so you will notice the location of the
16625 problem if you are correcting a draft.
16626
16627 @findex finalout
16628 To prevent such a monstrosity from marring your final printout, write
16629 the following in the beginning of the Texinfo file on a line of its own,
16630 before the @code{@@titlepage} command:
16631
16632 @example
16633 @@finalout
16634 @end example
16635
16636
16637 @node @t{@@smallbook}
16638 @section @code{@@smallbook}: Printing ``Small'' Books
16639
16640 @anchor{smallbook}@c old name
16641 @findex smallbook
16642 @cindex Small book size
16643 @cindex Book, printing small
16644 @cindex Page sizes for books
16645 @cindex Size of printed book
16646
16647 By default, @TeX{} typesets pages for printing in an 8.5 by 11 inch
16648 format. However, you can direct @TeX{} to typeset a document in a 7 by
16649 9.25 inch format that is suitable for bound books by inserting the
16650 following command on a line by itself at the beginning of the Texinfo
16651 file, before the title page:
16652
16653 @example
16654 @@smallbook
16655 @end example
16656
16657 @noindent
16658 (Since many books are about 7 by 9.25 inches, this command might better
16659 have been called the @code{@@regularbooksize} command, but it came to be
16660 called the @code{@@smallbook} command by comparison to the 8.5 by 11
16661 inch format.)
16662
16663 If you write the @code{@@smallbook} command between the
16664 start-of-header and end-of-header lines, the Texinfo mode @TeX{}
16665 region formatting command, @code{texinfo-tex-region}, will format the
16666 region in ``small'' book size (@pxref{Start of Header}).
16667
16668 @xref{@t{@@small@dots{}}}, for information about commands that make
16669 it easier to produce examples for a smaller manual.
16670
16671 @xref{Format with @t{texi2dvi}}, and @ref{Preparing for @TeX{}},
16672 for other ways to format with @code{@@smallbook} that do not require
16673 changing the source file.
16674
16675
16676 @node A4 Paper
16677 @section Printing on A4 Paper
16678 @cindex A4 paper, printing on
16679 @cindex A5 paper, printing on
16680 @cindex Paper size, A4
16681 @cindex European A4 paper
16682 @findex afourpaper
16683
16684 You can tell @TeX{} to format a document for printing on European size
16685 A4 paper (or A5) with the @code{@@afourpaper} (or @code{@@afivepaper})
16686 command. Write the command on a line by itself near the beginning of
16687 the Texinfo file, before the title page. For example, this is how you
16688 would write the header for this manual:
16689
16690 @example
16691 @group
16692 \input texinfo @@c -*-texinfo-*-
16693 @@c %**start of header
16694 @@setfilename texinfo
16695 @@settitle Texinfo
16696 @@afourpaper
16697 @@c %**end of header
16698 @end group
16699 @end example
16700
16701 @xref{Format with @t{texi2dvi}}, and @ref{Preparing for @TeX{}},
16702 for other ways to format for different paper sizes that do not require
16703 changing the source file.
16704
16705 @findex afourlatex
16706 @findex afourwide
16707 You may or may not prefer the formatting that results from the command
16708 @code{@@afourlatex}. There's also @code{@@afourwide} for A4 paper in
16709 wide format.
16710
16711
16712 @node @t{@@pagesizes}
16713 @section @code{@@pagesizes} [@var{width}][, @var{height}]: Custom Page Sizes
16714 @anchor{pagesizes}@c old node name
16715
16716 @findex pagesizes
16717 @cindex Custom page sizes
16718 @cindex Page sizes, customized
16719 @cindex Text width and height
16720 @cindex Width of text area
16721 @cindex Height of text area
16722 @cindex Depth of text area
16723
16724 You can explicitly specify the height and (optionally) width of the main
16725 text area on the page with the @code{@@pagesizes} command. Write this
16726 on a line by itself near the beginning of the Texinfo file, before the
16727 title page. The height comes first, then the width if desired,
16728 separated by a comma. Examples:
16729
16730 @example
16731 @@pagesizes 200mm,150mm @c for b5 paper
16732 @end example
16733 @noindent and
16734 @example
16735 @@pagesizes 11.5in @c for legal paper
16736 @end example
16737
16738 @cindex B5 paper, printing on
16739 @cindex Legal paper, printing on
16740 This would be reasonable for printing on B5-size paper. To emphasize,
16741 this command specifies the size of the @emph{text area}, not the size of
16742 the paper (which is 250@dmn{mm} by 177@dmn{mm} for B5, 14@dmn{in} by
16743 8.5@dmn{in} for legal).
16744
16745 @cindex Margins on page, not controllable
16746 To make more elaborate changes, such as changing any of the page
16747 margins, you must define a new command in @file{texinfo.tex} or
16748 @file{texinfo.cnf}.
16749
16750 @xref{Format with @t{texi2dvi}}, and @ref{Preparing for @TeX{}},
16751 for other ways to specify @code{@@pagesizes} that do not require
16752 changing the source file.
16753
16754 @code{@@pagesizes} is ignored by @code{makeinfo}.
16755
16756
16757 @node Cropmarks and Magnification
16758 @section Cropmarks and Magnification
16759
16760 @findex cropmarks
16761 @cindex Cropmarks for printing
16762 @cindex Printing cropmarks
16763 You can (attempt to) direct @TeX{} to print cropmarks at the corners
16764 of pages with the @code{@@cropmarks} command. Write the
16765 @code{@@cropmarks} command on a line by itself near the beginning of
16766 the Texinfo file, before the title page, like this:
16767
16768 @example
16769 @@cropmarks
16770 @end example
16771
16772 This command is mainly for printers that typeset several pages on one
16773 sheet of film; but you can attempt to use it to mark the corners of a
16774 book set to 7 by 9.25 inches with the @code{@@smallbook} command.
16775 (Printers will not produce cropmarks for regular sized output that is
16776 printed on regular sized paper.) Since different printing machines
16777 work in different ways, you should explore the use of this command
16778 with a spirit of adventure. You may have to redefine the command in
16779 @file{texinfo.tex}.
16780
16781 The @code{@@cropmarks} command is recognized and ignored in non-@TeX{}
16782 output formats.
16783
16784 @findex \mag @r{(raw @TeX{} magnification)}
16785 @cindex Magnified printing
16786 @cindex Larger or smaller pages
16787 You can attempt to direct @TeX{} to typeset pages larger or smaller
16788 than usual with the @code{\mag} @TeX{} command. Everything that is
16789 typeset is scaled proportionally larger or smaller. (@code{\mag}
16790 stands for ``magnification''.) This is @emph{not} a Texinfo
16791 @@-command, but is a raw @TeX{} command that is prefixed with a
16792 backslash. You have to write this command between @code{@@tex} and
16793 @code{@@end tex} (@pxref{Raw Formatter Commands}).
16794
16795 Follow the @code{\mag} command with an @samp{=} and then a number that
16796 is 1000 times the magnification you desire. For example, to print pages
16797 at 1.2 normal size, write the following near the beginning of the
16798 Texinfo file, before the title page:
16799
16800 @example
16801 @group
16802 @@tex
16803 \mag=1200
16804 @@end tex
16805 @end group
16806 @end example
16807
16808 With some printing technologies, you can print normal-sized copies that
16809 look better than usual by giving a larger-than-normal master to your
16810 print shop. They do the reduction, thus effectively increasing the
16811 resolution.
16812
16813 Depending on your system, DVI files prepared with a
16814 nonstandard-@code{\mag} may not print or may print only with certain
16815 magnifications. Be prepared to experiment.
16816
16817
16818 @node PDF Output
16819 @section PDF Output
16820 @cindex PDF output
16821
16822 @pindex pdftex
16823 The simplest way to generate PDF output from Texinfo source is to run
16824 the convenience script @command{texi2pdf} (or @command{pdftexi2dvi});
16825 this executes the @command{texi2dvi} script with the @option{--pdf}
16826 option (@pxref{Format with @t{texi2dvi}}). If for some reason you
16827 want to process the document by hand, you can run the @command{pdftex}
16828 program instead of plain @command{tex}. That is, run @samp{pdftex
16829 foo.texi} instead of @samp{tex foo.texi}.
16830
16831 @dfn{PDF} stands for `Portable Document Format'. It was invented by
16832 Adobe Systems some years ago for document interchange, based on their
16833 PostScript language. Related links:
16834
16835 @itemize
16836 @item
16837 GNU GV, a @uref{http://www.gnu.org/software/gv/, Ghostscript-based PDF
16838 reader}. (It can also preview PostScript documents.)
16839
16840 @item
16841 @code{xpdf}, a freely available standalone
16842 @uref{http://www.foolabs.com/xpdf/, PDF reader} for the X window
16843 system.
16844
16845 @item
16846 @uref{http://partners.adobe.com/asn/acrobat/sdk/public/docs/, PDF definition}.
16847
16848 @end itemize
16849
16850 At present, Texinfo does not provide @samp{@@ifpdf} or @samp{@@pdf}
16851 commands as for the other output formats, since PDF documents contain
16852 many internal low-level offsets and references that would be hard or
16853 impossible to get right at the Texinfo source level.
16854
16855 PDF files require dedicated software to be displayed, unlike the plain
16856 ASCII formats (Info, HTML) that Texinfo supports. They also tend to
16857 be much larger than the DVI files output by @TeX{} by default.
16858 Nevertheless, a PDF file does define an actual typeset document in a
16859 self-contained file, so it has its place.
16860
16861
16862 @node Obtaining @TeX{}
16863 @section Obtaining @TeX{}
16864 @cindex Obtaining @TeX{}
16865 @cindex @TeX{}, how to obtain
16866
16867 @TeX{} is a document formatter that is used by the FSF for its
16868 documentation. It is the easiest way to get printed output (e.g., PDF
16869 and PostScript) for Texinfo manuals. TeX is freely redistributable,
16870 and you can get it over the Internet or on physical media. See
16871 @url{http://tug.org/texlive}.
16872
16873 @c please keep that text in sync with www.gnu.org/prep/FTP
16874
16875
16876 @node Generic Translator @t{texi2any}
16877 @chapter @code{texi2any}: The Generic Translator for Texinfo
16878
16879 @command{texi2any} is the generic translator for Texinfo that can
16880 produce different output formats and is highly customizable. It
16881 supports these formats:
16882
16883 @table @asis
16884 @item Info (by default, or with @option{--info}),
16885
16886 @item HTML (with @option{--html}),
16887
16888 @item plain text (with @option{--plaintext}),
16889
16890 @item Docbook (with @option{--docbook}),
16891
16892 @item Texinfo XML (with @option{--xml}).
16893 @end table
16894
16895 @command{makeinfo} is an alias for @command{texi2any}. By default,
16896 both @command{texi2any} and @command{makeinfo} generate Info output;
16897 indeed, there are no differences in behavior based on the name.
16898
16899 Beside these default formats, command line options to
16900 @command{texi2any} can change many aspects of the output. Beyond
16901 that, initialization files provide even more control over the final
16902 output---nearly anything not specified in the Texinfo input file.
16903 Initialization files are written in Perl, like the main program, and
16904 anything which can be specified on the command line can also be
16905 specified within a initialization file.
16906
16907 The rest of this chapter goes into the details.
16908
16909 @menu
16910 * Reference Implementation:: @command{texi2any}: the reference implementation.
16911 * Invoking @t{texi2any}:: Running the translator from a shell.
16912 * @t{texi2any} Printed Output:: Calling @command{texi2dvi}.
16913 * Pointer Validation:: How to check that pointers point somewhere.
16914 * Customization Variables:: Configuring @command{texi2any}.
16915 * Internationalization of Document Strings:: Translating program-inserted text.
16916 * Invoking @t{pod2texi}:: Translating Perl pod to Texinfo.
16917 * @t{texi2html}:: An ancestor of @command{texi2any}.
16918 @end menu
16919
16920
16921 @node Reference Implementation
16922 @section @command{texi2any}: A Texinfo Reference Implementation
16923
16924 @cindex @command{texi2any}, as reference implementation
16925 @cindex Reference implementation
16926 @cindex Implementation, @command{texi2any} as reference
16927
16928 Above, we called @command{texi2any} ``the'' translator for Texinfo
16929 instead of just ``a'' translator, even though (of course) it's
16930 technically and legally possible for other implementations to be
16931 written. The reason is that alternative implementations are very
16932 likely to have subtle, or not-so-subtle, differences in behavior, and
16933 thus Texinfo documents would become dependent on the processor.
16934 Therefore, it is important to have a reference implementation that
16935 defines parts of the language not fully specified by the manual (often
16936 intentionally so). It is equally important to have consistent
16937 command-line options and other behavior for all processors.
16938
16939 @cindex Tree representation of documents
16940 @cindex Syntax tree representation of documents
16941 @cindex Abstract syntax tree representation of documents
16942 For this reason, the once-independent @command{texi2html} Perl Texinfo
16943 processor was made compatible with the C implementation of
16944 @command{makeinfo}, to avoid continuing with two different
16945 implementations (@pxref{History}). The current implementation,
16946 @command{texi2any}, serves as the reference implementation. It
16947 inherited the design of customization and other features from
16948 @command{texi2html} (for more on @command{texi2html} compatibility,
16949 @pxref{@t{texi2html}}). However, @code{texi2any} is a full
16950 reimplementation: it constructs a tree-based representation of the
16951 input document for all back-ends to work from.
16952
16953 @cindex Texinfo language tests
16954 @cindex Tests, of Texinfo language
16955 Extensive tests of the language were developed at the same time as
16956 @command{texi2any}; we plead with anyone thinking of writing a program
16957 to parse Texinfo input to at least make use of these tests.
16958
16959 @cindex Examples of using @command{texi2any}
16960 @findex Texinfo::Parser module
16961 The @command{texi2html} wrapper script (@pxref{@t{texi2html}})
16962 provides a very simple example of calling @command{texi2any} from a
16963 shell script; it's in @file{util/texi2html} in the Texinfo sources.
16964 More consequentially, @command{texi-elements-by-size} is an example
16965 Perl script using the @code{Texinfo::Parser} module interface; it's
16966 also in the @file{util} source directory. (Its functionality may also
16967 be useful to authors; @pxref{texi-elements-by-size}.)
16968
16969 @cindex Future of Texinfo implementations
16970 With the release of @command{texi2any} as the reference
16971 implementation, development of both the C implementation of
16972 @command{makeinfo} and @command{texi2html} has been halted. Going
16973 forward, we ask authors of Texinfo documents to use only
16974 @command{texi2any}.
16975
16976
16977 @node Invoking @t{texi2any}
16978 @section Invoking @command{texi2any}/@code{makeinfo} from a Shell
16979
16980 @anchor{Invoking makeinfo}
16981 @pindex makeinfo
16982 @pindex texi2any
16983
16984 To process a Texinfo file, invoke @command{texi2any} or
16985 @command{makeinfo} (the two names are synonyms for the same program;
16986 we'll use the names interchangeably) followed by the name of the
16987 Texinfo file. Also select the format you want to output with the
16988 appropriate command line option (default is Info). Thus, to create
16989 the Info file for Bison, type the following to the shell:
16990
16991 @example
16992 texi2any --info bison.texinfo
16993 @end example
16994
16995 You can specify more than one input file name; each is processed in
16996 turn. If an input file name is @samp{-}, standard input is read.
16997
16998 @anchor{@t{makeinfo} Options}
16999 @c anchor{makeinfo options}@c prev name, but case-insensitive clash
17000 @cindex @code{makeinfo} options
17001 @cindex Options for @code{makeinfo}
17002 @anchor{texi2any Options}
17003 @cindex @code{texi2any} options
17004 @cindex Options for @code{texi2any}
17005
17006 The @command{texi2any} program accept many options. Perhaps the
17007 most basic are those that change the output format. By default,
17008 @command{texi2any} outputs Info.
17009
17010 Each command line option is either a long name preceded by @samp{--}
17011 or a single letter preceded by @samp{-}. You can use abbreviations
17012 for the long option names as long as they are unique.
17013
17014 For example, you could use the following shell command to create an
17015 Info file for @file{bison.texinfo} in which lines are filled to only
17016 68 columns:
17017
17018 @example
17019 texi2any --fill-column=68 bison.texinfo
17020 @end example
17021
17022 You can write two or more options in sequence, like this:
17023
17024 @example
17025 texi2any --no-split --fill-column=70 @dots{}
17026 @end example
17027
17028 @noindent
17029 (This would keep the Info file together as one possibly very long
17030 file and would also set the fill column to 70.)
17031
17032 The options are (approximately in alphabetical order):
17033
17034 @table @code
17035 @item --commands-in-node-names
17036 @opindex --commands-in-node-names
17037 This option now does nothing, but remains for compatibility. (It used
17038 to ensure that @@-commands in node names were expanded throughout the
17039 document, especially @code{@@value}. This is now done by default.)
17040
17041 @item --conf-dir=@var{path}
17042 @opindex --conf-dir=@var{path}
17043 Prepend @var{path} to the directory search list for finding
17044 customization files that may be loaded with @option{--init-file} (see
17045 below). The @var{path} value can be a single directory, or a list of
17046 several directories separated by the usual path separator character
17047 (@samp{:} on Unix-like systems, @samp{;} on Windows). @c @xref{Loading
17048 @c Init Files}.
17049
17050 @item --css-include=@var{file}
17051 @opindex --css-include
17052 When producing HTML, literally include the contents of @var{file},
17053 which should contain W3C cascading style sheets specifications, in the
17054 @samp{<style>} block of the HTML output. If @var{file} is @samp{-},
17055 read standard input. @xref{HTML CSS}.
17056
17057 @item --css-ref=@var{url}
17058 @opindex --css-ref
17059 When producing HTML, add a @samp{<link>} tag to the output which
17060 references a cascading style sheet at @var{url}. This allows using
17061 standalone style sheets.
17062
17063 @item -D @var{var}
17064 @opindex -D @var{var}
17065 Cause the Texinfo variable @var{var} to be defined. This is
17066 equivalent to @code{@@set @var{var}} in the Texinfo file
17067 (@pxref{@t{@@set @@clear @@value}}).
17068
17069 @item --disable-encoding
17070 @itemx --enable-encoding
17071 @opindex --disable-encoding
17072 @opindex --enable-encoding
17073 By default, or with @option{--enable-encoding}, output accented and
17074 special characters in Info and plain text output based on
17075 @samp{@@documentencoding}. With @option{--disable-encoding}, 7-bit
17076 ASCII transliterations are output. @xref{@t{@@documentencoding}},
17077 and @ref{Inserting Accents}.
17078
17079 @item --docbook
17080 @opindex --docbook
17081 Generate Docbook output (rather than Info).
17082
17083 @item --document-language=@var{lang}
17084 @opindex --document-language
17085 Use @var{lang} to translate Texinfo keywords which end up in the
17086 output document. The default is the locale specified by the
17087 @code{@@documentlanguage} command if there is one, otherwise English
17088 (@pxref{@t{@@documentlanguage}}).
17089
17090 @item --dvi
17091 @opindex --dvi
17092 Generate a TeX DVI file using @command{texi2dvi}, rather than Info
17093 (@pxref{@t{texi2any} Printed Output}).
17094
17095 @item --dvipdf
17096 @opindex --dvipdf
17097 Generate a PDF file using @command{texi2dvi --dvipdf}, rather than
17098 Info (@pxref{@t{texi2any} Printed Output}).
17099
17100 @item --error-limit=@var{limit}
17101 @itemx -e @var{limit}
17102 @opindex --error-limit=@var{limit}
17103 @opindex -e @var{limit}
17104 Report @var{LIMIT} errors before aborting (on the assumption that
17105 continuing would be useless); default 100.
17106
17107 @item --fill-column=@var{width}
17108 @itemx -f @var{width}
17109 @opindex --fill-column=@var{width}
17110 @opindex -f @var{width}
17111 Specify the maximum number of columns in a line; this is the
17112 right-hand edge of a line. Paragraphs that are filled will be filled
17113 to this width. (Filling is the process of breaking up and connecting
17114 lines so that lines are the same length as or shorter than the number
17115 specified as the fill column. Lines are broken between words.) The
17116 default value is 72.
17117
17118 @item --footnote-style=@var{style}
17119 @itemx -s @var{style}
17120 @opindex --footnote-style=@var{style}
17121 @opindex -s @var{style}
17122 Set the footnote style to @var{style}: either @samp{end} for the end
17123 node style (the default) or @samp{separate} for the separate node
17124 style. The value set by this option overrides the value set in a
17125 Texinfo file by an @code{@@footnotestyle} command (@pxref{Footnote
17126 Styles}).
17127
17128 When the footnote style is @samp{separate}, @code{makeinfo} makes a
17129 new node containing the footnotes found in the current node. When the
17130 footnote style is @samp{end}, @code{makeinfo} places the footnote
17131 references at the end of the current node.
17132
17133 In HTML, when the footnote style is @samp{end}, or if the output is
17134 not split, footnotes are put at the end of the output. If set to
17135 @samp{separate}, and the output is split, they are placed in a
17136 separate file.
17137
17138 @item --force
17139 @itemx -F
17140 @opindex --force
17141 @opindex -F
17142 Ordinarily, if the input file has errors, the output files are not
17143 created. With this option, they are preserved.
17144
17145 @item --help
17146 @itemx -h
17147 @opindex --help@r{, for @command{texi2any}}
17148 @opindex -h
17149 Print a message with available options and basic usage, then exit
17150 successfully.
17151
17152 @item --html
17153 @opindex --html
17154 Generate HTML output (rather than Info). By default, the HTML output
17155 is split into one output file per Texinfo source node, and the split
17156 output is written into a subdirectory based on the name of the
17157 top-level Info file. @xref{Generating HTML}.
17158
17159 @item -I @var{path}
17160 @opindex -I @var{path}
17161 Append @var{path} to the directory search list for finding files that
17162 are included using the @code{@@include} command. By default,
17163 @code{texi2any} searches only the current directory. If @var{path} is
17164 not given, the current directory is appended. The @var{path} value
17165 can be a single directory or a list of several directories separated
17166 by the usual path separator character (@samp{:} on Unix-like systems,
17167 @samp{;} on Windows).
17168
17169 @item --ifdocbook
17170 @opindex --ifdocbook
17171 @itemx --ifhtml
17172 @opindex --ifhtml
17173 @itemx --ifinfo
17174 @opindex --ifinfo
17175 @itemx --ifplaintext
17176 @opindex --ifplaintext
17177 @itemx --iftex
17178 @opindex --iftex
17179 @itemx --ifxml
17180 @opindex --ifxml
17181 For the given format, process @samp{@@if@var{format}} and
17182 @samp{@@@var{format}} commands, and do not process
17183 @samp{@@ifnot@var{format}}, regardless of the format being output.
17184 For instance, if @option{--iftex} is given, then @samp{@@iftex} and
17185 @samp{@@tex} blocks will be read, and @samp{@@ifnottex} blocks will be
17186 ignored.
17187
17188 @item --info
17189 @opindex --info
17190 Generate Info output. By default, if the output file contains more
17191 than about 300,000 bytes, it is split into shorter subfiles of about
17192 that size. The name of the output file and any subfiles is determined
17193 by @code{@@setfilename} (@pxref{@t{@@setfilename}}). @xref{Tag and
17194 Split Files}.
17195
17196 @item --init-file=@var{file}
17197 @opindex --init-file=@var{file}
17198 Load @var{file} as code to modify the behavior and output of the
17199 generated manual. It is customary to use the @code{.pm} or the
17200 @code{.init} extensions for these customization files, but that is not
17201 enforced; the @var{file} name can be anything. The
17202 @option{--conf-dir} option (see above) can be used to add to the list
17203 of directories in which these customization files are searched for.
17204 @c @xref{Loading Init Files}.
17205
17206 @item --internal-links=@var{file}
17207 @opindex --internal-links=@var{file}
17208 @cindex Internal links, of HTML
17209 In HTML mode, output a tab-separated file containing three columns:
17210 the internal link to an indexed item or item in the table of contents,
17211 the name of the index (or table of contents) in which it occurs, and
17212 the term which was indexed or entered. The items are in the natural
17213 sorting order for the given element. This dump can be useful for
17214 post-processors.
17215
17216 @item --macro-expand=@var{file}
17217 @itemx -E @var{file}
17218 @opindex --macro-expand=@var{file}
17219 @opindex -E @var{file}
17220 Output the Texinfo source, with all Texinfo macros expanded, to
17221 @var{file}. Normally, the result of macro expansion is used
17222 internally by @code{makeinfo} and then discarded.
17223
17224 @item --no-headers
17225 @opindex --no-headers
17226 @cindex Node separators, omitting with @option{--no-headers}
17227 @cindex Generating plain text files with @option{--no-headers}
17228 @cindex Menus, omitting with @option{--no-headers}
17229 Do not include menus or node separator lines in the output.
17230
17231 When generating Info, this is the same as using @option{--plaintext},
17232 resulting in a simple plain text file. Furthermore,
17233 @code{@@setfilename} is ignored, and output is to standard output
17234 unless overridden with @option{-o}. (This behavior is for backward
17235 compatibility.)
17236
17237 @cindex Navigation links, omitting
17238 When generating HTML, and output is split, also output navigation
17239 links only at the beginning of each file. If output is not split, do
17240 not include navigation links at the top of each node at all.
17241 @xref{Generating HTML}.
17242
17243 @item --no-ifdocbook
17244 @opindex --no-ifdocbook
17245 @itemx --no-ifhtml
17246 @opindex --no-ifhtml
17247 @itemx --no-ifinfo
17248 @opindex --no-ifinfo
17249 @itemx --no-ifplaintext
17250 @opindex --no-ifplaintext
17251 @itemx --no-iftex
17252 @opindex --no-iftex
17253 @itemx --no-ifxml
17254 @opindex --no-ifxml
17255 For the given format, do not process @samp{@@if@var{format}} and
17256 @samp{@@@var{format}} commands, and do process
17257 @samp{@@ifnot@var{format}}, regardless of the format being output.
17258 For instance, if @option{--no-ifhtml} is given, then @samp{@@ifhtml}
17259 and @samp{@@html} blocks will not be read, and @samp{@@ifnothtml}
17260 blocks will be.
17261
17262 @item --no-node-files
17263 @itemx --node-files
17264 @opindex --no-node-files
17265 @opindex --node-files
17266 When generating HTML, create redirection files for anchors and any
17267 nodes not already output with the file name corresponding to the node
17268 name (@pxref{HTML Xref Node Name Expansion}). This makes it possible
17269 for section- and chapter-level cross-manual references to succeed
17270 (@pxref{HTML Xref Configuration}).
17271
17272 If the output is split, this is enabled by default. If the output is
17273 not split, @option{--node-files} enables the creation of the
17274 redirection files, in addition to the monolithic main output file.
17275 @option{--no-node-files} suppresses the creation of redirection files
17276 in any case. This option has no effect with any output format other
17277 than HTML@. @xref{Generating HTML}.
17278
17279 @item --no-number-footnotes
17280 @opindex --no-number-footnotes
17281 Suppress automatic footnote numbering. By default, footnotes are
17282 numbered sequentially within a node, i.e., the current footnote number
17283 is reset to 1 at the start of each node.
17284
17285 @item --no-number-sections
17286 @itemx --number-sections
17287 @opindex --no-number-sections
17288 @opindex --number-sections
17289 With @option{--number_sections} (the default), output chapter,
17290 section, and appendix numbers as in printed manuals. This works only
17291 with hierarchically-structured manuals. You should specify
17292 @code{--no-number-sections} if your manual is not normally structured.
17293
17294 @item --no-pointer-validate
17295 @itemx --no-validate
17296 @opindex --no-pointer-validate
17297 @opindex --no-validate
17298 @cindex Pointer validation, suppressing from command line
17299 Suppress the pointer-validation phase of @code{makeinfo}---a dangerous
17300 thing to do. This can also be done with the @code{@@novalidate}
17301 command (@pxref{Use @TeX{}}). Normally, consistency checks are made
17302 to ensure that cross references can be resolved, etc. @xref{Pointer
17303 Validation}.
17304
17305 @item --no-warn
17306 @opindex --no-warn
17307 Suppress warning messages (but not error messages).
17308
17309 @item --output=@var{file}
17310 @itemx -o @var{file}
17311 @opindex --output=@var{file}
17312 @opindex -o @var{file}
17313 Specify that the output should be directed to @var{file}. This
17314 overrides any file name specified in an @code{@@setfilename} command
17315 found in the Texinfo source. If neither @code{@@setfilename} nor this
17316 option are specified, the input file name is used to determine the
17317 output name. @xref{@t{@@setfilename}}.
17318
17319 If @var{file} is @samp{-}, output goes to standard output and
17320 @samp{--no-split} is implied.
17321
17322 If @var{file} is a directory or ends with a @samp{/} the usual rules
17323 are used to determine the output file name (namely, use
17324 @code{@@setfilename} or the input file name) but the files are written
17325 to the @var{file} directory. For example, @samp{makeinfo -o bar/
17326 foo.texi}, with or without @option{--no-split}, will write
17327 @file{bar/foo.info}, and possibly other files, under @file{bar/}.
17328
17329 When generating HTML and output is split, @var{file} is used as the
17330 name for the directory into which all files are written. For example,
17331 @samp{makeinfo -o bar --html foo.texi} will write
17332 @file{bar/index.html}, among other files.
17333
17334 @item --output-indent=@var{val}
17335 @opindex --outputindent
17336 This option now does nothing, but remains for compatibility. (It used
17337 to alter indentation in XML/Docbook output.)
17338
17339 @item -P @var{path}
17340 @opindex -P @var{path}
17341 Prepend @var{path} to the directory search list for @code{@@include}.
17342 If @var{path} is not given, the current directory is prepended. See
17343 @samp{-I} above.
17344
17345 @item --paragraph-indent=@var{indent}
17346 @itemx -p @var{indent}
17347 @opindex --paragraph-indent=@var{indent}
17348 @opindex -p @var{indent}
17349 Set the paragraph indentation style to @var{indent}. The value set by
17350 this option overrides the value set in a Texinfo file by an
17351 @code{@@paragraphindent} command (@pxref{@t{@@paragraphindent}}).
17352 The value of @var{indent} is interpreted as follows:
17353
17354 @table @asis
17355 @item @samp{asis}
17356 Preserve any existing indentation (or lack thereof) at the beginnings
17357 of paragraphs.
17358
17359 @item @samp{0} or @samp{none}
17360 Delete any existing indentation.
17361
17362 @item @var{num}
17363 Indent each paragraph by @var{num} spaces.
17364 @end table
17365
17366 The default is to indent by two spaces, except for paragraphs
17367 following a section heading, which are not indented.
17368
17369 @item --pdf
17370 @opindex --pdf
17371 Generate a PDF file using @command{texi2dvi --pdf}, rather than Info
17372 (@pxref{@t{texi2any} Printed Output}).
17373
17374 @item --plaintext
17375 @opindex --plaintext
17376 @cindex Plain text output with @option{--plaintext}
17377 @cindex ASCII text output with @option{--plaintext}
17378 @cindex Generating plain text files with @option{--plaintext}
17379 @cindex Node separators, omitting with @option{--plaintext}
17380 @cindex Menus, omitting with @option{--plaintext}
17381 @cindex @file{INSTALL} file, generating
17382 Output a plain text file (rather than Info): do not include menus or
17383 node separator lines in the output. This results in a straightforward
17384 plain text file that you can (for example) send in email without
17385 complications, or include in a distribution (for example, an
17386 @file{INSTALL} file).
17387
17388 With this option, @code{@@setfilename} is ignored and the output goes
17389 to standard output by default; this can be overridden with @option{-o}.
17390
17391 @item --ps
17392 @opindex --ps
17393 Generate a PostScript file using @command{texi2dvi --ps}, rather than
17394 Info (@pxref{@t{texi2any} Printed Output}).
17395
17396 @item --set-customization-variable @var{var}=@var{value}
17397 @itemx -c @var{var}=@var{value}
17398 @opindex --set-customization-variable @var{var}=@var{value}
17399 @opindex -c @var{var}=@var{value}
17400 Set the customization variable @var{var} to @var{value}. The @code{=}
17401 is optional, but both @var{var} and @var{value} must be quoted to the
17402 shell as necessary so the result is a single word. Many aspects of
17403 @command{texi2any} behavior and output may be controlled by
17404 customization variables, beyond what can be set in the document by
17405 @@-commands and with other command line switches. @xref{Customization
17406 Variables}.
17407
17408 @item --split=@var{how}
17409 @itemx --no-split
17410 @opindex --split=@var{how}
17411 @opindex --no-split
17412 @cindex Splitting of output files
17413 @cindex Output file splitting
17414 @anchor{Splitting Output}
17415 @c
17416 When generating Info, by default large output files are split into
17417 smaller subfiles, of approximately 300k bytes. When generating HTML,
17418 by default each output file contains one node (@pxref{Generating
17419 HTML}). @option{--no-split} suppresses this splitting of the output.
17420
17421 Alternatively, @option{--split=@var{how}} may be used to specify at
17422 which level the HTML output should be split. The possible values for
17423 @var{how} are:
17424
17425 @table @samp
17426 @item chapter
17427 The output is split at @code{@@chapter} and other sectioning
17428 @@-commands at this level (@code{@@appendix}, etc.).
17429
17430 @item section
17431 The output is split at @code{@@section} and similar.
17432
17433 @item node
17434 The output is split at every node. This is the default.
17435 @end table
17436
17437 @item --split-size=@var{num}
17438 @opindex --split-size=@var{num}
17439 Keep Info files to at most @var{num} characters if possible; default
17440 is 300,000. (However, a single node will never be split across Info
17441 files.)
17442
17443 @item --transliterate-file-names
17444 @opindex --transliterate-file-names
17445 Enable transliteration of 8-bit characters in node names for the
17446 purpose of file name creation. @xref{HTML Xref 8-bit Character Expansion}.
17447
17448 @item -U @var{var}
17449 Cause @var{var} to be undefined. This is equivalent to @code{@@clear
17450 @var{var}} in the Texinfo file (@pxref{@t{@@set @@clear @@value}}).
17451
17452 @item --verbose
17453 @opindex --verbose
17454 Cause @code{makeinfo} to display messages saying what it is doing.
17455 Normally, @code{makeinfo} only outputs messages if there are errors or
17456 warnings.
17457
17458 @item --version
17459 @itemx -V
17460 @opindex --version@r{, for @command{texi2any}}
17461 @opindex -V
17462 Print the version number, then exit successfully.
17463
17464 @item --Xopt @var{str}
17465 @opindex --Xopt @var{str}
17466 Pass @var{str} (a single shell word) to @command{texi2dvi}; may be
17467 repeated (@pxref{@t{texi2any} Printed Output}).
17468
17469 @item --xml
17470 @opindex --xml
17471 Generate Texinfo XML output (rather than Info).
17472
17473 @end table
17474
17475 @vindex TEXINFO_OUTPUT_FORMAT
17476 @cindex Environment variable @code{TEXINFO_OUTPUT_FORMAT}
17477 @command{makeinfo} also reads the environment variable
17478 @env{TEXINFO_OUTPUT_FORMAT} to determine the output format, if not
17479 overridden by a command line option. The value should be one of:
17480
17481 @example
17482 docbook dvi dvipdf html info pdf plaintext ps xml
17483 @end example
17484
17485 If not set or otherwise specified, Info output is the default.
17486
17487 The customization variable of the same name is also read; if set, that
17488 overrides an environment variable setting, but not a command-line
17489 option. @xref{Customization Variables for @@-Commands}.
17490
17491
17492 @node @t{texi2any} Printed Output
17493 @section @command{texi2any} Printed Output
17494
17495 @cindex Printed output, through @command{texi2any}
17496 @cindex Output, printed through @command{texi2any}
17497
17498 To justify the name Texinfo-to-@emph{any}, @command{texi2any} has
17499 basic support for creating printed output in the various formats:
17500 @TeX{} DVI, PDF, and PostScript. This is done via the simple method
17501 of executing the @command{texi2dvi} program when those outputs are
17502 requested.
17503
17504 The output format options for this are @option{--dvi},
17505 @option{--dvipdf}, @option{--pdf}, and @option{--ps}. @xref{Format
17506 with @t{texi2dvi}}, for more details on these options and general
17507 @command{texi2dvi} operation. In addition, the @option{--verbose},
17508 @option{--silent}, and @option{--quiet} options are passed on if
17509 specified; the @option{-I} and @option{-o} options are likewise passed
17510 on with their arguments, and @option{--debug} without its argument.
17511
17512 The only option remaining that is related to the @command{texi2dvi}
17513 invocation is @option{--Xopt}. Here, just the argument is passed on
17514 and multiple @option{--Xopt} options accumulate. This provides a way
17515 to construct an arbitrary command line for @command{texi2dvi}. For
17516 example, running
17517
17518 @example
17519 texi2any --Xopt -t --Xopt @@a4paper --pdf foo.texi
17520 @end example
17521
17522 @noindent is equivalent to running
17523
17524 @example
17525 texi2dvi -t @@a4paper --pdf foo.texi
17526 @end example
17527
17528 Although one might wish that other options to @command{texi2any} would
17529 take effect, they don't. For example, running @samp{texi2any
17530 --no-number-sections --dvi foo.texi} still results in a DVI file with
17531 numbered sections. (Perhaps this could be improved in the future, if
17532 requests are received.)
17533
17534 The actual name of the command that is invoked is specified by the
17535 @code{TEXI2DVI} customization variable (@pxref{Other Customization
17536 Variables}). As you might guess, the default is @samp{texi2dvi}.
17537
17538 @command{texi2any} itself does not generate any output when it invokes
17539 @command{texi2dvi}.
17540
17541
17542 @node Pointer Validation
17543 @section Pointer Validation
17544 @cindex Pointer validation with @code{makeinfo}
17545 @cindex Validation of pointers
17546
17547 If you do not suppress pointer validation with the
17548 @samp{--no-validate} option or the @code{@@novalidate} command in the
17549 source file (@pxref{Use @TeX{}}), @code{makeinfo} will check the
17550 validity of the Texinfo file.
17551
17552 Most validation checks are different depending on whether node
17553 pointers are explicitly or implicitly determined. With explicit node
17554 pointers, here is the list of what is checked:
17555
17556 @enumerate
17557 @item
17558 If a `Next', `Previous', or `Up' node reference is a reference to a
17559 node in the current file and is not an external reference such as to
17560 @file{(dir)}, then the referenced node must exist.
17561
17562 @item
17563 Every node except the `Top' node must have an `Up' pointer.
17564
17565 @item
17566 The node referenced by an `Up' pointer must itself reference the
17567 current node through a menu item, unless the node referenced by `Up'
17568 has the form @samp{(@var{file})}.
17569 @end enumerate
17570
17571 With implicit node pointers, the above error cannot occur, as such.
17572 (Which is a major reason why we recommend using this feature of
17573 @code{makeinfo}, and not specifying any node pointers yourself.)
17574
17575 Instead, @code{makeinfo} checks that the tree constructed from the
17576 document's menus matches the tree constructed from the sectioning
17577 commands. For example, if a chapter-level menu mentions nodes
17578 @var{n1} and @var{n2}, in that order, nodes @var{n1} and @var{n2} must
17579 be associated with @code{@@section} commands in the chapter.
17580
17581 Finally, with both explicit and implicit node pointers,
17582 @code{makeinfo} checks that every node except the `Top' node is
17583 referenced in a menu.
17584
17585
17586 @node Customization Variables
17587 @section Customization Variables
17588
17589 @quotation Warning
17590 These customization variable names and meanings may change in any
17591 Texinfo release. We always try to avoid incompatible changes, but we
17592 cannot absolutely promise, since needs change over time.
17593 @end quotation
17594
17595 Many aspects of the behavior and output of @command{texi2any} may be
17596 modified by modifying so-called @dfn{customization variables}. These
17597 fall into a few general categories:
17598
17599 @itemize @bullet
17600 @item
17601 Those associated with @@-commands; for example,
17602 @code{@@documentlanguage}.
17603
17604 @item
17605 Those associated with command-line options; for example, the
17606 customization variable @code{SPLIT} is associated with the
17607 @option{--split} command-line option, and @code{TEXINFO_OUTPUT_FORMAT}
17608 allows specifying the output format.
17609
17610 @item
17611 Those associated with customizing the HTML output.
17612
17613 @item
17614 Other ad hoc variables.
17615 @end itemize
17616
17617 Customization variables may set on the command line using
17618 @code{--set-customization-variable '@var{var} @var{value}'} (quoting
17619 the variable/value pair to the shell) or
17620 @code{--set-customization-variable @var{var}=@var{value}} (using
17621 @code{=}). A special @var{value} is @samp{undef}, which sets the
17622 variable to this special ``undefined'' Perl value.
17623
17624 The sections below give the details for each of these.
17625
17626 @menu
17627 * Commands: Customization Variables for @@-Commands.
17628 * Options: Customization Variables and Options.
17629 * HTML: HTML Customization Variables.
17630 * Other: Other Customization Variables.
17631 @end menu
17632
17633
17634 @node Customization Variables for @@-Commands
17635 @subsection Customization Variables for @@-Commands
17636
17637 @cindex Customization variables for @@-commands
17638 @cindex @@-commands, customization variables for
17639
17640 Each of the following @@-commands has an associated customization
17641 variable with the same name (minus the leading @code{@@}):
17642
17643 @smallexample
17644 @@allowcodebreaks @@clickstyle @@codequotebacktick
17645 @@codequoteundirected @@contents @@deftypefnnewline
17646 @@documentdescription @@documentencoding @@documentlanguage
17647 @@evenfooting @@evenfootingmarks
17648 @@evenheading @@evenheadingmarks
17649 @@everyfooting @@everyfootingmarks
17650 @@everyheading @@everyheadingmarks
17651 @@exampleindent @@firstparagraphindent
17652 @@fonttextsize @@footnotestyle @@frenchspacing @@headings
17653 @@kbdinputstyle @@novalidate
17654 @@oddfooting @@oddfootingmarks
17655 @@oddheading @@oddheadingmarks
17656 @@pagesizes @@paragraphindent
17657 @@setchapternewpage @@setcontentsaftertitlepage
17658 @@setfilename
17659 @@setshortcontentsaftertitlepage @@shortcontents
17660 @@urefbreakstyle @@xrefautomaticsectiontitle
17661 @end smallexample
17662
17663 Setting such a customization variable to a value @samp{foo} is similar
17664 to executing @code{@@@var{cmd} foo}. It is not exactly the same,
17665 though, since any side effects of parsing the Texinfo source are not
17666 redone. Also, some variables do not take Texinfo code when generating
17667 particular formats, but an argument that is already formatted. This
17668 is the case, for example, for HTML for @code{documentdescription}.
17669
17670
17671 @node Customization Variables and Options
17672 @subsection Customization Variables and Options
17673
17674 @cindex Customization variables for options
17675 @cindex Options, customization variables for
17676
17677 The following table gives the customization variables associated with
17678 some command line options. @xref{Invoking @t{texi2any}}, for the
17679 meaning of the options.
17680
17681 @multitable @columnfractions 0.5 0.5
17682 @headitem Option @tab Variable
17683 @vindex ENABLE_ENCODING
17684 @item @option{--enable-encoding} @tab @code{ENABLE_ENCODING}
17685 @vindex documentlanguage
17686 @item @option{--document-language} @tab @code{documentlanguage}
17687 @vindex ERROR_LIMIT
17688 @item @option{--error-limit} @tab @code{ERROR_LIMIT}
17689 @vindex FILLCOLUMN
17690 @item @option{--fill-column} @tab @code{FILLCOLUMN}
17691 @vindex footnotestyle
17692 @item @option{--footnote-style} @tab @code{footnotestyle}
17693 @vindex FORCE
17694 @item @option{--force} @tab @code{FORCE}
17695 @vindex INTERNAL_LINKS
17696 @item @option{--internal-links} @tab @code{INTERNAL_LINKS}
17697 @vindex MACRO_EXPAND
17698 @item @option{--macro-expand} @tab @code{MACRO_EXPAND}
17699 @vindex HEADERS
17700 @vindex SHOW_MENU
17701 @item @option{--headers} @tab @code{HEADERS}, @code{SHOW_MENU}
17702 @vindex NO_WARN
17703 @item @option{--no-warn} @tab @code{NO_WARN}
17704 @vindex novalidate
17705 @item @option{--no-validate} @tab @code{novalidate}
17706 @vindex NUMBER_FOOTNOTES
17707 @item @option{--number-footnotes} @tab @code{NUMBER_FOOTNOTES}
17708 @vindex NUMBER_SECTIONS
17709 @item @option{--number-sections} @tab @code{NUMBER_SECTIONS}
17710 @vindex NODE_FILES
17711 @item @option{--node-files} @tab @code{NODE_FILES}
17712 @vindex OUT
17713 @vindex OUTFILE
17714 @vindex SUBDIR
17715 @item @option{--output} @tab @code{OUT}, @code{OUTFILE},
17716 @code{SUBDIR}
17717 @vindex paragraphindent
17718 @item @option{--paragraph-indent} @tab @code{paragraphindent}
17719 @vindex SILENT
17720 @item @option{--silent} @tab @code{SILENT}
17721 @vindex SPLIT
17722 @item @option{--split} @tab @code{SPLIT}
17723 @vindex SPLIT_SIZE
17724 @item @option{--split-size} @tab @code{SPLIT_SIZE}
17725 @vindex TRANSLITERATE_FILE_NAMES
17726 @item @option{--transliterate-file-names} @tab @code{TRANSLITERATE_FILE_NAMES}
17727 @vindex VERBOSE
17728 @item @option{--verbose} @tab @code{VERBOSE}
17729 @end multitable
17730
17731 Setting such a customization variable to a value @samp{foo} is
17732 essentially the same as specifying the @code{--@var{opt}=foo} if the
17733 option takes an argument, or @code{--@var{opt}} if not.
17734
17735 @vindex TEXINFO_OUTPUT_FORMAT
17736 In addition, the customization variable @code{TEXINFO_OUTPUT_FORMAT}
17737 allows specifying what @code{makeinfo} outputs, either one of the usual
17738 output formats that can be specified with options, or various other
17739 forms:
17740
17741 @ftable @samp
17742 @item docbook
17743 @itemx dvi
17744 @itemx dvipdf
17745 @itemx html
17746 @itemx info
17747 @itemx pdf
17748 @itemx plaintext
17749 @itemx ps
17750 @itemx xml
17751 These correspond to the command-line options (and
17752 @code{TEXINFO_OUTPUT_FORMAT} environment variable values) of the same
17753 name. @xref{Invoking @t{texi2any}}.
17754
17755 @item debugcount
17756 Instead of generating a regular output format, output the count of
17757 bytes and lines obtained when converting to Info, and other information.
17758
17759 @item debugtree
17760 @cindex tree representation, for debugging
17761 @cindex debugging document, with tree representation
17762 Instead of generating a regular output format, output a text representation
17763 of the tree obtained by parsing the input texinfo document.
17764
17765 @item parse
17766 Do only Texinfo source parsing; there is no output.
17767
17768 @item plaintexinfo
17769 Output the Texinfo source with all the macros, @code{@@include} and
17770 @code{@@value@{@}} expanded. This is similar to setting
17771 @option{--macro-expand}, but instead of being output in addition to
17772 the normal conversion, output of Texinfo is the main output.
17773
17774 @item rawtext
17775 @cindex raw text output
17776 Output raw text, with minimal formatting. For example, footnotes are
17777 ignored and there is no paragraph filling. This is used by the parser
17778 for file names and copyright text in HTML comments, for example.
17779
17780 @item structure
17781 Do only Texinfo source parsing and determination of the document
17782 structure; there is no output.
17783
17784 @item texinfosxml
17785 @cindex SXML output
17786 @cindex S-expressions, output format
17787 Output the document in TexinfoSXML representation, a syntax for
17788 writing XML data using Lisp S-expressions.
17789
17790 @item textcontent
17791 @cindex spell checking
17792 @cindex word counting
17793 @pindex detexinfo
17794 @cindex stripping Texinfo commands
17795 Output the text content only, stripped of commands; this is useful for
17796 spell checking or word counting, for example. The trivial
17797 @code{detexinfo} script setting this is in the @file{util} directory
17798 of the Texinfo source as an example. It's one line:
17799
17800 @example
17801 exec texi2any -c TEXINPUT_OUTPUT_FORMAT=textcontent "$@@"
17802 @end example
17803 @end ftable
17804
17805
17806 @node HTML Customization Variables
17807 @subsection HTML Customization Variables
17808
17809 This table gives the customization variables which apply to HTML
17810 output only. A few other customization variable apply to both HTML
17811 and other output formats; those are given in the next section.
17812
17813 @vtable @code
17814 @item AVOID_MENU_REDUNDANCY
17815 For HTML@. If set, and the menu entry and menu description are the
17816 same, then do not print the menu description; default false.
17817
17818 @item AFTER_BODY_OPEN
17819 For HTML@. If set, the corresponding text will appear at the
17820 beginning of each HTML file; default unset.
17821
17822 @item AFTER_ABOUT
17823 For HTML, when an About-element is output. If set, the corresponding
17824 text will appear at the end of the About element; default unset.
17825
17826 @item AFTER_OVERVIEW
17827 @itemx AFTER_TOC_LINES
17828 For HTML@. If set, the corresponding text is output after the short
17829 table of contents for @code{AFTER_OVERVIEW} and after the table of
17830 contents for @code{AFTER_TOC_LINES}; otherwise, a default string is
17831 used. At the time of writing, a @code{</div>} element is closed.
17832
17833 In general, you should set @code{BEFORE_OVERVIEW} if
17834 @code{AFTER_OVERVIEW} is set, and you should set
17835 @code{BEFORE_TOC_LINES} if @code{AFTER_TOC_LINES} is set.
17836
17837
17838 @item BASEFILENAME_LENGTH
17839 For HTML@. The maximum length of the base filenames; default 245.
17840 Changing this would make cross-manual references to such long node
17841 names invalid (@pxref{HTML Xref Link Basics}).
17842
17843 @item BEFORE_OVERVIEW
17844 @itemx BEFORE_TOC_LINES
17845 For HTML@. If set, the corresponding text is output before the short
17846 table of contents for @code{BEFORE_OVERVIEW} and before the table of
17847 contents for @code{BEFORE_TOC_LINES}, otherwise a default string is
17848 used. At the time of writing, a @code{<div ...>} element is opened.
17849
17850 In general you should set @code{AFTER_OVERVIEW} if
17851 @code{BEFORE_OVERVIEW} is set, and you should set
17852 @code{AFTER_TOC_LINES} if @code{BEFORE_TOC_LINES} is set.
17853
17854
17855 @item BIG_RULE
17856 For HTML@. Rule used after and before the top element and before
17857 special elements, but not for footers and headers; default
17858 @code{<hr>}.
17859
17860 @item BODYTEXT
17861 @cindex @code{<body>} text, customizing
17862 For HTML, the text appearing in @code{<body>}. By default, set
17863 automatically, taking into account the document language
17864 (@pxref{@t{@@documentlanguage}}).
17865
17866 @item CASE_INSENSITIVE_FILENAMES
17867 For HTML@. Construct output file names as if the filesystem were case
17868 insensitive (@pxref{HTML Splitting}); default false.
17869
17870 @item CHAPTER_HEADER_LEVEL
17871 For HTML@. Header formatting level used for chapter level sectioning
17872 commands; default @samp{2}.
17873
17874 @item CHECK_HTMLXREF
17875 For HTML@. Check that manuals which are the target of external
17876 cross references (@pxref{Four and Five Arguments}) are present in
17877 @file{htmlxref.cnf} (@pxref{HTML Xref Configuration}); default false.
17878
17879 @item COMPLEX_FORMAT_IN_TABLE
17880 For HTML@. If set, use tables for indentation of complex formats; default
17881 false.
17882
17883 @item CSS_LINES
17884 For HTML@. CSS output, automatically determined by default (@pxref{HTML CSS}).
17885
17886 @item DATE_IN_HEADER
17887 For HTML@. Put the document generation date in the header; off by default.
17888
17889 @item DEF_TABLE
17890 For HTML@. If set, a @code{<table>} construction for @code{@@deffn}
17891 and similar @@-commands is used (looking more like the @TeX{} output),
17892 instead of definition lists; default false.
17893
17894 @item DEFAULT_RULE
17895 For HTML@. Rule used between element, except before and after the
17896 top element, and before special elements, and for footers and headers;
17897 default @code{<hr>}.
17898
17899 @item DO_ABOUT
17900 For HTML@. If set to 0 never do an About special element;
17901 if set to 1 always do an About special element;
17902 default 0.
17903 @c @xref{Output Elements Defined}.
17904
17905 @item EXTERNAL_DIR
17906 For HTML@. Base directory for external manuals; default none. It is
17907 better to use the general external cross reference mechanism
17908 (@pxref{HTML Xref Configuration}) than this variable.
17909
17910 @item EXTRA_HEAD
17911 For HTML@. Additional text appearing within @code{<head>}; default unset.
17912
17913 @item FOOTNOTE_END_HEADER_LEVEL
17914 For HTML@. Header formatting level used for the footnotes header with
17915 the `end' footnotestyle; default @samp{4}. @xref{Footnote Styles}.
17916
17917 @item FOOTNOTE_SEPARATE_HEADER_LEVEL
17918 For HTML@. Header formatting level used for the footnotes header with
17919 the `separate' footnotestyle; default @samp{4}. @xref{Footnote
17920 Styles}.
17921
17922 @item FRAMES
17923 For HTML@. If set, a file describing the frame layout is generated,
17924 together with a file with the short table of contents; default false.
17925
17926 @item FRAMESET_DOCTYPE
17927 For HTML@. Same as DOCTYPE, but for the file containing the frame
17928 description.
17929
17930 @item HEADER_IN_TABLE
17931 For HTML@. Use tables for header formatting rather than a simple
17932 @code{<div>} element; default false.
17933
17934 @item ICONS
17935 For HTML@. Use icons for the navigation panel; default false.
17936
17937 @item IMAGE_LINK_PREFIX
17938 For HTML@. If set, the associated value is prepended to the image file
17939 links; default unset.
17940
17941 @item INLINE_CONTENTS
17942 For HTML@. If set, output the contents where the @code{@@contents} and
17943 similar @@-commands are located; default true. This is ignored if
17944 @code{@@set*contentsaftertitlepage} is set (@pxref{Contents}).
17945
17946 @item INLINE_CSS_STYLE
17947 For HTML@. Put CSS directly in HTML elements rather than at the
17948 beginning of the output; default false.
17949
17950 @item KEEP_TOP_EXTERNAL_REF
17951 For HTML@. If set, do not ignore @samp{Top} as the first
17952 argument for an external ref to a manual, as is done by default.
17953 @xref{Top Node Naming}.
17954
17955 @item L2H
17956 For HTML@. If set, @command{latex2html} is used to convert @code{@@math}
17957 and @code{@@tex} sections; default false. Best used with @option{--iftex}.
17958
17959 @item L2H_CLEAN
17960 (Relevant only if @code{L2H} is set.) If set, the intermediate files
17961 generated in relation with @command{latex2html} are removed; default
17962 true.
17963
17964 @item L2H_FILE
17965 (Relevant only if @code{L2H} is set.) If set, the given file is used
17966 as @command{latex2html}'s init file; default unset.
17967
17968 @item L2H_HTML_VERSION
17969 (Relevant only if @code{L2H} is set.) The HTML version used in the
17970 @command{latex2html} call; default unset.
17971
17972 @item L2H_L2H
17973 (Relevant only if @code{L2H} is set.) The program invoked as
17974 @command{latex2html}; default is @code{latex2html}.
17975
17976 @item L2H_SKIP
17977 (Relevant only if @code{L2H} is set.) If set to a true value, the
17978 actual call to @command{latex2html} is skipped; previously generated
17979 content is reused instead. If set to 0, the cache is not used at all.
17980 If set to @samp{undef}, the cache is used for as many @TeX{} fragments as
17981 possible and for any remaining the command is run. The default is
17982 @samp{undef}.
17983
17984 @item L2H_TMP
17985 (Relevant only if @code{L2H} is set.) Set the directory used for
17986 temporary files. None of the file name components in this directory
17987 name may start with @samp{.}; otherwise, @command{latex2html} will
17988 fail (because of @command{dvips}). The default is the empty string,
17989 which means the current directory.
17990
17991 @item MAX_HEADER_LEVEL
17992 For HTML@. Maximum header formatting level used (higher header
17993 formatting level numbers correspond to lower sectioning levels);
17994 default @samp{4}.
17995
17996 @item MENU_SYMBOL
17997 For HTML@. Symbol used in front of menu entries when node names are used
17998 for menu entries formatting; default @samp{&bull;}.
17999
18000 @item MONOLITHIC
18001 For HTML@. Output only one file including the table of contents. Set
18002 by default, but only relevant when the output is not split.
18003
18004 @item NO_CSS
18005 For HTML@. Do not use CSS; default false. @xref{HTML CSS}.
18006
18007 @item NODE_FILE_EXTENSION
18008 For HTML@. Extension for node files if @code{NODE_FILENAMES} is set;
18009 default @samp{html}.
18010
18011 @item PRE_ABOUT
18012 For HTML, when an About element is output. If set to a text string,
18013 this text will appear at the beginning of the About element. If set
18014 to a reference on a subroutine, the result of the subroutine call will
18015 appear at the beginning of the About element. If not set (the
18016 default), default text is used.
18017
18018 @item PRE_BODY_CLOSE
18019 For HTML@. If set, the given text will appear at the footer of each
18020 HTML file; default unset.
18021
18022 @item PROGRAM_NAME_IN_FOOTER
18023 For HTML@. If set, output the program name and miscellaneous related
18024 information in the page footers; default false.
18025
18026 @item SHORTEXTN
18027 For HTML@. If set, use @samp{.htm} as extension; default false.
18028
18029 @item SHOW_TITLE
18030 For HTML@. If set, output the title at the beginning of the document;
18031 default true.
18032
18033 @item SIMPLE_MENU
18034 For HTML@. If set, use a simple preformatted style for the menu,
18035 instead of breaking down the different parts of the menu; default false.
18036 @xref{Menu Parts}.
18037
18038 @item TOC_LINKS
18039 For HTML@. If set, links from headings to toc entries are created;
18040 default false.
18041
18042 @item TOP_FILE
18043 This file name may be used for the top-level file. The extension is
18044 set appropriately, if necessary. This is used to override the default,
18045 and is, in general, only taken into account when output is split, and
18046 for HTML@.
18047
18048 @item TOP_NODE_FILE
18049 For HTML@. File name used for the Top node, if @code{NODE_FILENAMES}
18050 is set; default is @code{index}.
18051
18052 @item TOP_NODE_FILE_TARGET
18053 For HTML@. File name used for the Top node in cross references;
18054 default is @code{index}.
18055
18056 @item TOP_NODE_UP_URL
18057 For HTML@. The url used for the Up pointer of the Top node; default
18058 @code{undef}, meaning no link is generated.
18059
18060 @item USE_ACCESSKEY
18061 @cindex @code{accesskey}, customization variable for
18062 For HTML@. Use @code{accesskey} in cross references; default true.
18063
18064 @item USE_ISO
18065 For HTML@. Use entities for doubled single-quote characters
18066 (@pxref{Inserting Quotation Marks}), and @samp{---} and @samp{--}
18067 (@pxref{Conventions}); default true.
18068
18069 @item USE_LINKS
18070 @cindex @code{<link>} HTML tag, in @code{<head>}
18071 @cindex @code{<head>} HTML tag, and @code{<link>}
18072 For HTML@. Generate @code{<link>} elements in the HTML @code{<head>}
18073 output; default true.
18074
18075 @item USE_REL_REV
18076 For HTML@. Use @code{rel} in cross references; default true.
18077
18078 @item VERTICAL_HEAD_NAVIGATION
18079 For HTML@. If set, a vertical navigation panel is used; default false.
18080
18081 @item WORDS_IN_PAGE
18082 @cindex Navigation panel, bottom of page
18083 For HTML, with output split at nodes. Specifies the approximate
18084 minimum page length at which a navigation panel is placed at the
18085 bottom of a page. To avoid ever having the navigation buttons at the
18086 bottom of a page, set this to a sufficiently large number. The
18087 default is 300.
18088
18089 @item XREF_USE_FLOAT_LABEL
18090 For HTML@. If set, for the float name in cross references, use the
18091 float label instead of the type followed by the float number
18092 (@pxref{@t{@@float}}). The default is off.
18093
18094 @item XREF_USE_NODE_NAME_ARG
18095 For HTML@. Only relevant for cross reference commands with no cross
18096 reference name (second argument). If set to@tie{}1, use the node name
18097 (first) argument in cross reference @@-commands for the text displayed
18098 as the hyperlink. If set to@tie{}0, use the node name if
18099 @code{USE_NODES} is set, otherwise the section name. If set to
18100 @samp{undef}, use the first argument in preformatted environments,
18101 otherwise use the node name or section name depending on
18102 @code{USE_NODES}. The default is @samp{undef}.
18103
18104 @end vtable
18105
18106
18107 @node Other Customization Variables
18108 @subsection Other Customization Variables
18109
18110 This table gives the remaining customization variables, which apply to
18111 multiple formats, or affect global behavior, or otherwise don't fit
18112 into the categories of the previous sections.
18113
18114 @vtable @code
18115 @item CLOSE_QUOTE_SYMBOL
18116 When a closing quote is needed, use this character; default @code{&rsquo;}
18117 in HTML, @code{&#8217;} in Docbook. The default for Info is the same
18118 as @code{OPEN_QUOTE_SYMBOL} (see below).
18119
18120 @c @item COMPLETE_IMAGE_PATHS
18121 @c If set, the image files are computed to be relative from the document
18122 @c directory to the source manual directory, and then to the image.
18123
18124 @item CPP_LINE_DIRECTIVES
18125 Recognize @code{#line} directives in a ``preprocessing'' pass
18126 (@pxref{External Macro Processors}); on by default.
18127
18128 @item DEBUG
18129 If set, debugging output is generated; default is off (zero).
18130 @c The integer value specifies what kinds of debugging output are
18131 @c generated. It is a bitmask. Setting it to 255 ensures having all
18132 @c available debugging output.
18133
18134 @item DOCTYPE
18135 @vindex SystemLiteral
18136 For Docbook, HTML, XML@. Specifies the @code{SystemLiteral}, the
18137 entity's system identifier. This is a URI which may be used to
18138 retrieve the entity, and identifies the canonical DTD for the
18139 document. The default value is different for each of HTML, Docbook
18140 and Texinfo@tie{}XML.
18141
18142 @item DUMP_TEXI
18143 For debugging. If set, no conversion is done, only parsing and macro
18144 expansion. If the option @option{--macro-expand} is set, the Texinfo
18145 source is also expanded to the corresponding file. Default false.
18146
18147 @item DUMP_TREE
18148 For debugging. If set, the tree constructed upon parsing a Texinfo
18149 document is output to standard error; default false.
18150
18151 @item ENABLE_ENCODING_USE_ENTITY
18152 For HTML, XML@. If @option{--enable-encoding} is set, and there is an
18153 entity corresponding with the letter or the symbol being output,
18154 prefer the entity. Set by default for HTML, but not XML.
18155
18156 @item EXTERNAL_CROSSREF_SPLIT
18157 For cross references to other manuals, this determines if the other
18158 manual is considered to be split or monolithic. By default, it is set
18159 based on the value of @code{SPLIT}. @xref{HTML Xref}, and @pxref{HTML
18160 Xref Configuration}.
18161
18162 @item EXTENSION
18163 The extension added to the output file name. The default is different
18164 for each output format.
18165
18166 @item FIX_TEXINFO
18167 For ``plain Texinfo'' (see the @code{PLAINTEXINFO} item). If set to
18168 false, the resulting Texinfo does not have all errors corrected, such
18169 as missing @samp{@@end}; default true. This variable is only
18170 relevant when expanding Texinfo; other converters always try to
18171 output something sane even if the input is erroneous.
18172
18173 @c @item IDX_SUMMARY
18174 @c If set, for each @code{@@printindex} a file named
18175 @c @file{@var{docname}_@var{idxname}.idx} is created, containing lines of
18176 @c the form:
18177 @c
18178 @c @example
18179 @c @var{key} @var{reference}
18180 @c @end example
18181 @c
18182 @c @noindent sorted alphabetically (case matters).
18183
18184 @item IGNORE_BEFORE_SETFILENAME
18185 If set, begin outputting at @code{@@setfilename}, if
18186 @code{@@setfilename} is present; default true.
18187
18188 @item IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME
18189 If set, spaces are ignored after an @@-command that takes braces.
18190 Default true, matching the @TeX{} behavior.
18191
18192 @item INDEX_ENTRY_COLON
18193 Symbol used between the index entry and the associated node or section;
18194 default @samp{:}.
18195
18196 @item INFO_SPECIAL_CHARS_WARNING
18197 If set, warn about problematic constructs for Info output (such as the
18198 string @samp{::}) in node names, menu items, and cross references;
18199 default true. Do not warn about index entries, since parsing problems
18200 there don't prevent navigation; readers can still relatively easily
18201 find their way to the node in question.
18202
18203 @item INLINE_INSERTCOPYING
18204 If set, @code{@@insertcopying} is replaced by the @code{@@copying}
18205 content (@pxref{@t{@@copying}}) as if @code{@@insertcopying} were a
18206 user-defined macro; default false.
18207
18208 @item INPUT_ENCODING_NAME
18209 Normalized encoding name suitable for output. Should be a usable
18210 charset name in HTML, typically one of the preferred IANA encoding
18211 names. You should not need to use this variable, since it is set by
18212 @code{@@documentencoding} (@pxref{@t{@@documentencoding}}).
18213
18214 @item INPUT_PERL_ENCODING
18215 Perl encoding used to process the Texinfo source. You should not need
18216 to use that variable, since it is set by @code{@@documentencoding}
18217 (@pxref{@t{@@documentencoding}}).
18218
18219 @item MACRO_BODY_IGNORES_LEADING_SPACE
18220 Ignore white space at the beginning of user defined macro body line,
18221 mimicking a @TeX{} limitation (@pxref{Macro Details}). Default off.
18222
18223 @item MAX_MACRO_CALL_NESTING
18224 The maximal number of recursive calls of @@-commands defined through
18225 @code{@@rmacro}; default 100000. The purpose of this variable is to
18226 avoid infinite recursions.
18227
18228 @item MENU_ENTRY_COLON
18229 Symbol used between the menu entry and the description; default
18230 @samp{:}.
18231
18232 @item NO_USE_SETFILENAME
18233 If set, do not use @code{@@setfilename} to set the document name;
18234 instead, base the output document name only on the input file name.
18235 The default is false.
18236
18237 @item NODE_FILENAMES
18238 If set, node names are used to construct file names. By default, it
18239 is set if the output is split by node, or if @code{NODE_FILES} is set
18240 and the output is split in any way.
18241
18242 @item NODE_NAME_IN_INDEX
18243 If set, use node names in index entries, otherwise prefer section names;
18244 default true.
18245
18246 @item NODE_NAME_IN_MENU
18247 If set, use node names in menu entries, otherwise prefer section names;
18248 default true.
18249
18250 @item OPEN_QUOTE_SYMBOL
18251 When an opening quote is needed, e.g., for @samp{@@samp} output, use
18252 the specified character; default @code{&lsquo;} for HTML,
18253 @code{&#8216;} for Docbook. For Info, the default depends on the
18254 enabled document encoding (@pxref{@t{@@documentencoding}}); if no
18255 document encoding is set, or the encoding is US-ASCII, etc., @samp{'}
18256 is used. This character usually appears as an undirected single quote
18257 on modern systems. If the document encoding is Unicode, the Info
18258 output uses a Unicode left quote.
18259
18260 @item OUTPUT_ENCODING_NAME
18261 Normalized encoding name used for output files. Should be a usable
18262 charset name in HTML, typically one of the preferred IANA encoding
18263 names. By default, if an input encoding is set (typically through
18264 @code{@@documentencoding} or @code{INPUT_ENCODING_NAME}), this
18265 information is used to set the output encoding name. If no input
18266 encoding is specified, the default output encoding name may be set by
18267 the output format. In particular, the XML-based formats use
18268 @code{utf-8} for @code{OUTPUT_ENCODING_NAME} if the encoding is not
18269 otherwise specified. @xref{@t{@@documentencoding}}.
18270
18271 @item OVERVIEW_LINK_TO_TOC
18272 If set, the cross references in the Overview link to the corresponding
18273 Table of Contents entries; default true.
18274
18275 @item PACKAGE
18276 @itemx PACKAGE_VERSION
18277 @itemx PACKAGE_AND_VERSION
18278 @itemx PACKAGE_URL
18279 @itemx PACKAGE_NAME
18280 The implementation's short package name, package version, package name
18281 and version concatenated, package url, and full package name,
18282 respectively. By default, these variables are all set through
18283 Autoconf, Automake, and @code{configure}.
18284
18285 @item PREFIX
18286 The output file prefix, which is prepended to some output file names.
18287 By default it is set by @code{@@setfilename} or from the input file
18288 (@pxref{@t{@@setfilename}}). How this value is used depends on the
18289 value of other customization variables or command line options, such
18290 as whether the output is split and @code{NODE_FILENAMES}. The default
18291 is unset.
18292
18293 @item PROGRAM
18294 Name of the program used. By default, it is set to the name of the
18295 program launched, with a trailing @samp{.pl} removed.
18296
18297 @item RENAMED_NODES_FILE
18298 If set, use the value for the renamed nodes description file. If not
18299 set, the file is @file{@var{doc_basename}-noderename.cnf}.
18300 @xref{HTML Xref Link Preservation}.
18301
18302 @item RENAMED_NODES_REDIRECTIONS
18303 If set, create redirection files for renamed nodes. Set by default
18304 when generating HTML@.
18305
18306 @item SHOW_MENU
18307 @opindex --no-headers
18308 If set, Texinfo menus are output. By default, it is set unless
18309 generating Docbook or if @option{--no-headers} is specified.
18310
18311 @item SORT_ELEMENT_COUNT
18312 @pindex texi-elements-by-size
18313 @cindex Longest nodes, finding
18314 @cindex Sorting nodes by size
18315 If set, the name of a file to which a list of elements (nodes or
18316 sections, depending on the output format) is dumped, sorted by the
18317 number of lines they contain after removal of @@-commands; default
18318 unset. This is used by the program @code{texi-elements-by-size} in
18319 the @file{util/} directory of the Texinfo source distribution
18320 (@pxref{texi-elements-by-size}).
18321
18322 @item SORT_ELEMENT_COUNT_WORDS
18323 When dumping the elements-by-size file (see preceding item), use word
18324 counts instead of line counts; default false.
18325
18326 @c @item SPLIT_INDEX
18327 @c For HTML@. If set, the output is split, and the output from
18328 @c @code{@@printindex} happens in a sectioning element at the level of
18329 @c splitting, then split index pages at the next letter after they have
18330 @c more than that many entries. If set to 0, no index splitting.
18331
18332 @item TEST
18333 If set to true, some variables which are normally dynamically
18334 generated anew for each run (date, program name, version) are set to
18335 fixed and given values. This is useful to compare the output to a
18336 reference file, as is done for the tests. The default is false.
18337
18338 @item TEXI2DVI
18339 Name of the command used to produce PostScript, PDF, and DVI; default
18340 @samp{texi2dvi}. @xref{@t{texi2any} Printed Output}.
18341
18342 @item TEXI2HTML
18343 @cindex compatibility, with @command{texi2html}
18344 Generate HTML and try to be as compatible as possible with
18345 @command{texi2html}; default false.
18346
18347 @item TEXINFO_COLUMN_FOR_DESCRIPTION
18348 Used with the @code{indent_menu_descriptions} tree transformation,
18349 described below; default 32 (matching
18350 @code{texinfo-column-for-description} in XEmacs)).
18351
18352 @item TEXINFO_DTD_VERSION
18353 For XML@. Version of the DTD used in the XML output preamble. The
18354 default is set based on a variable in @file{configure.ac}.
18355
18356 @item TEXTCONTENT_COMMENT
18357 For stripped text content output (i.e., when
18358 @code{TEXINFO_OUTPUT_FORMAT} is set to @code{textcontent}). If set,
18359 also output comments. Default false.
18360
18361 @item TOP_NODE_UP
18362 Up node for the Top node; default @samp{(dir)}.
18363
18364 @item TREE_TRANSFORMATIONS
18365 The associated value is a comma separated list of transformations that
18366 can be applied to the Texinfo tree prior to outputting the result. If
18367 more than one is specified, the ordering is irrelevant; each is always
18368 applied at the necessary point during processing.
18369
18370 The only one executed by default is
18371 @samp{move_index_entries_after_items} for HTML and Docbook output.
18372 Here's an example of updating the master menu in a document:
18373
18374 @example
18375 makeinfo \
18376 -c TREE_TRANSFORMATIONS=regenerate_master_menu \
18377 -c PLAINTEXINFO=1 \
18378 mydoc.texi \
18379 -o /tmp/out
18380 @end example
18381
18382 @noindent (Caveat: Since @code{PLAINTEXINFO} output does expand
18383 Texinfo macros and conditionals, it's necessary to remove any such
18384 differences before installing the updates in the original document.
18385 This will be remedied in a future release.)
18386
18387 The following transformations are currently supported (many are used
18388 in the @code{pod2texi} utility distributed with Texinfo;
18389 @pxref{Invoking @t{pod2texi}}):
18390
18391 @ftable @samp
18392 @item complete_tree_nodes_menus
18393 Add menu entries or whole menus for nodes associated with sections of
18394 any level, based on the sectioning tree.
18395
18396 @item fill_gaps_in_sectioning
18397 Adds empty @code{@@unnumbered...} sections in a tree to fill gaps in
18398 sectioning. For example, an @code{@@unnumberedsec} will be inserted
18399 if an @code{@@chapter} is followed by an @code{@@subsection}.
18400
18401 @item indent_menu_descriptions
18402 Reformat menus so that descriptions start at column
18403 @code{TEXINFO_COLUMN_DESCRIPTION}.
18404
18405 @item insert_nodes_for_sectioning_commands
18406 Insert nodes for sectioning commands lacking a corresponding node.
18407
18408 @item move_index_entries_after_items
18409 In @code{@@enumerate} and @code{@@itemize}, move index entries
18410 appearing just before an @code{@@item} to just after the
18411 @code{@@item}. Comment lines between index entries are moved too. As
18412 mentioned, this is always done for HTML and Docbook output.
18413
18414 @item regenerate_master_menu
18415 Update the Top node master menu, either replacing the (first)
18416 @code{@@detailmenu} in the Top node menu, or creating it at the end of
18417 the Top node menu.
18418
18419 @item simple_menu
18420 Mostly the same as @code{SIMPLE_MENU}: use a simple preformatted style
18421 for the menu. It differs from setting @code{SIMPLE_MENU} in that
18422 @code{SIMPLE_MENU} only has an effect in HTML output.
18423
18424 @end ftable
18425
18426 @item USE_NODES
18427 Preferentially use nodes to decide where elements are separated. If
18428 set to false, preferentially use sectioning to decide where elements
18429 are separated. The default is true.
18430
18431 @item USE_NODE_TARGET
18432 If set, use the node associated with a section for the section target
18433 in cross references; default true.
18434
18435 @item USE_NUMERIC_ENTITY
18436 For HTML and XML@. If set, use numeric entities instead of ASCII
18437 characters when there is no named entity. By default, set to true for
18438 HTML.
18439
18440 @item USE_UP_NODE_FOR_ELEMENT_UP
18441 Fill in up sectioning direction with node direction when there is no
18442 sectioning up direction. In practice this can only happen when there
18443 is no @@top section. Not set by default.
18444
18445 @item USE_SETFILENAME_EXTENSION
18446 Default is on for Info, off for other output. If set, use exactly
18447 what @code{@@setfilename} gives for the output file name, including
18448 the extension. You should not need to explicitly set this variable.
18449
18450 @item USE_TITLEPAGE_FOR_TITLE
18451 Use the full @code{@@titlepage} as the title, not a simple title string;
18452 default false.
18453
18454 @item USE_UNIDECODE
18455 @pindex Text::Unidecode
18456 If set to false, do not use the @code{Text::Unidecode} Perl module to
18457 transliterate more characters; default true.
18458
18459 @end vtable
18460
18461
18462 @node Internationalization of Document Strings
18463 @section Internationalization of Document Strings
18464
18465 @cindex I18n, of document strings
18466 @cindex Internationalization of document strings
18467 @cindex Document strings, internationalization of
18468 @cindex Output document strings, internationalization of
18469 @cindex Translating strings in output documents
18470
18471 @vindex documentlanguage @r{customization variable}
18472 @command{texi2any} writes fixed strings into the output document at
18473 various places: cross references, page footers, the help page,
18474 alternate text for images, and so on. The string chosen depends on
18475 the value of the @code{documentlanguage} at the time of the string
18476 being output (@pxref{@t{@@documentlanguage}}, for the Texinfo
18477 command interface).
18478
18479 @pindex libintl-perl @r{Gettext implementation}
18480 The Gettext framework is used for those strings (@pxref{Top,,,
18481 gettext, Gettext}). The @code{libintl-perl} package is used as the
18482 @code{gettext} implementation; more specifically, the pure Perl
18483 implementation is used, so Texinfo can support consistent behavior
18484 across all platforms and installations, which would not otherwise be
18485 possible. @code{libintl-perl} is included in the Texinfo distribution
18486 and always installed, to ensure that it is available if needed. It is
18487 also possible to use the system @code{gettext} (the choice can be made
18488 at build-time).
18489
18490 @vindex texinfo_document @r{Gettext domain}
18491 @cindex Perl format strings for translation
18492 The Gettext domain @samp{texinfo_document} is used for the strings.
18493 Translated strings are written as Texinfo, and may include
18494 @@-commands. In translated strings, the varying parts of the string
18495 are not usually denoted by @code{%s} and the like, but by
18496 @samp{@{arg_name@}}. (This convention is common for @code{gettext} in
18497 Perl and is fully supported in GNU Gettext; @pxref{perl-format,, Perl
18498 Format Strings, gettext, GNU Gettext}.) For example, in the
18499 following, @samp{@{section@}} will be replaced by the section name:
18500
18501 @example
18502 see @{section@}
18503 @end example
18504
18505 These Perl-style brace format strings are used for two reasons: first,
18506 changing the order of @code{printf} arguments is only available since
18507 Perl@tie{}5.8.0; second, and more importantly, the order of arguments
18508 is unpredictable, since @@-command expansion may lead to different
18509 orders depending on the output format.
18510
18511 The expansion of a translation string is done like this:
18512
18513 @enumerate
18514 @item First, the string is translated. The locale
18515 is @var{@@documentlanguage}@code{.}@var{@@documentencoding}.
18516
18517 @cindex @code{us-ascii} encoding, and translations
18518 If the @var{@@documentlanguage} has the form @samp{ll_CC}, that is
18519 tried first, and then just @samp{ll}. If that does not exist, and the
18520 encoding is not @code{us-ascii}, then @code{us-ascii} is tried.
18521
18522 The idea is that if there is a @code{us-ascii} encoding, it means that
18523 all the characters in the charset may be expressed as @@-commands.
18524 For example, there is a @code{fr.us-ascii} locale that can accommodate
18525 any encoding, since all the Latin@tie{}1 characters have associated
18526 @@-commands. On the other hand, Japanese has only a translation
18527 @code{ja.utf-8}, since there are no @@-commands for Japanese
18528 characters.
18529
18530 @item Next, the string is expanded as Texinfo, and converted.
18531 The arguments are substituted; for example, @samp{@{arg_name@}} is
18532 replaced by the corresponding actual argument.
18533
18534 @end enumerate
18535
18536 In the following example, @samp{@{date@}}, @samp{@{program_homepage@}}
18537 and @samp{@{program@}} are the arguments of the string. Since they
18538 are used in @code{@@uref}, their order is not predictable.
18539 @samp{@{date@}}, @samp{@{program_homepage@}} and @samp{@{program@}} are
18540 substituted after the expansion:
18541
18542 @example
18543 Generated on @@emph@{@{date@}@} using
18544 @@uref@{@{program_homepage@}, @@emph@{@{program@}@}@}.
18545 @end example
18546
18547 This approach is admittedly a bit complicated. Its usefulness is that
18548 it supports having translations available in different encodings for
18549 encodings which can be covered by @@-commands, and also specifying how
18550 the formatting for some commands is done, independently of the output
18551 format---yet still be language-dependent. For example, the
18552 @samp{@@pxref} translation string can be like this:
18553
18554 @example
18555 see @{node_file_href@} section `@{section@}\' in @@cite@{@{book@}@}
18556 @end example
18557
18558 @noindent
18559 which allows for specifying a string independently of the output
18560 format, while nevertheless with rich formatting it may be translated
18561 appropriately in many languages.
18562
18563
18564 @node Invoking @t{pod2texi}
18565 @section Invoking @t{pod2texi}: Convert POD to Texinfo
18566
18567 @pindex pod2texi
18568 @cindex Invoking @code{pod2texi}
18569 @cindex POD, converting to Texinfo
18570 @cindex Perl POD, converting to Texinfo
18571
18572 The @code{pod2texi} program translates Perl pod documentation file(s)
18573 to Texinfo. There are two basic modes of operation: generating a
18574 standalone manual from each input pod, or (if @code{--base-level=1} or
18575 higher is given) generating Texinfo subfiles suitable for use
18576 with @code{@@include}.
18577
18578 Although ordinarily this documentation in the Texinfo manual would be
18579 the best place to look, in this case we have documented all the
18580 options and examples in the @code{pod2texi} program itself, since it
18581 may be useful outside of the rest of Texinfo. Thus, please see the
18582 output of @code{pod2texi --help}, the version on the web at
18583 @url{http://www.gnu.org/software/texinfo/manual/pod2texi.html}, etc.
18584
18585 For an example of using @code{pod2texi} to make Texinfo out of the
18586 Perl documentation itself, see
18587 @url{http://svn.savannah.gnu.org/viewvc/trunk/contrib/perldoc-all/?root=texinfo,
18588 @file{contrib/perldoc-all}} in the Texinfo source distribution (the
18589 output is available at @url{http://www.gnu.org/software/perl/manual}).
18590
18591
18592 @node @t{texi2html}
18593 @section @code{texi2html}: Ancestor of @code{texi2any}
18594
18595 @pindex texi2html
18596
18597 @cindex Cons, Lionel
18598 Conceptually, the @command{texi2html} program is the parent of today's
18599 @command{texi2any} program. @command{texi2html} was developed
18600 independently, originally by Lionel Cons in 1998; at the time,
18601 @command{makeinfo} could not generate HTML@. Many other people
18602 contributed to @command{texi2html} over the years.
18603
18604 The present @command{texi2any} uses little of the actual code of
18605 @command{texi2html}, and has quite a different basic approach to the
18606 implementation (namely, parsing the Texinfo document into a tree), but
18607 still, there is a family resemblance.
18608
18609 By design, @command{texi2any} supports nearly all the features of
18610 @command{texi2html} in some way. However, we did not attempt to
18611 maintain strict compatibility, so no @command{texi2html} executable is
18612 installed by the Texinfo package. An approximation can be run with an
18613 invocation like this (available as @file{util/texi2html} in the
18614 Texinfo source):
18615
18616 @example
18617 texi2any --set-customization-variable TEXI2HTML=1 ...
18618 @end example
18619
18620 @noindent but, to emphasize, this is @emph{not} a drop-in replacement
18621 for the previous @command{texi2html}. Here are the biggest differences:
18622
18623 @itemize @bullet
18624 @item Most blatantly, the command line options of @command{texi2html}
18625 are now customization variables, for the most part. A table of
18626 approximate equivalents is given below.
18627
18628 @item The program-level customization API is very different in
18629 @command{texi2any}.
18630
18631 @item Indices cannot be split.
18632
18633 @item Translated strings cannot be customized; we hope to introduce
18634 this feature in @command{texi2any} in the future.
18635
18636 @end itemize
18637
18638 Aside from the last, we do not intend to reimplement these
18639 differences. Therefore, the route forward for authors is alter
18640 manuals and build processes as necessary to use the new features and
18641 methods of @command{texi2any}. The @command{texi2html} maintainers
18642 (one of whom is the principal author of @command{texi2any}) do not
18643 intend to make further releases.
18644
18645 @cindex Options of @command{texi2html}
18646 @cindex Command-line options of @command{texi2html}
18647 Here is the table showing @command{texi2html} options and
18648 corresponding @command{texi2any} customization variables.
18649 @c (@pxref{texi2any Output Customization,, @command{texi2any} Output
18650 @c Customization}).
18651
18652 @multitable {@option{--ignore-preamble-text}} {@code{IGNORE_PREAMBLE_TEXT}}
18653 @item @option{--toc-links} @tab @code{TOC_LINKS}
18654 @item @option{--short-ext} @tab @code{SHORTEXTN}
18655 @item @option{--prefix} @tab @code{PREFIX}
18656 @item @option{--short-ref} @tab @code{SHORT_REF}
18657 @item @option{--idx-sum} @tab @code{IDX_SUMMARY}
18658 @item @option{--def-table} @tab @code{DEF_TABLE}
18659 @item @option{--ignore-preamble-text} @tab @code{IGNORE_PREAMBLE_TEXT}
18660 @item @option{--html-xref-prefix} @tab @code{EXTERNAL_DIR}
18661 @item @option{--l2h} @tab @code{L2H}
18662 @item @option{--l2h-l2h} @tab @code{L2H_L2H}
18663 @item @option{--l2h-skip} @tab @code{L2H_SKIP}
18664 @item @option{--l2h-tmp} @tab @code{L2H_TMP}
18665 @item @option{--l2h-file} @tab @code{L2H_FILE}
18666 @item @option{--l2h-clean} @tab @code{L2H_CLEAN}
18667 @item @option{--use-nodes} @tab @code{USE_NODES}
18668 @item @option{--monolithic} @tab @code{MONOLITHIC}
18669 @item @option{--top-file} @tab @code{TOP_FILE}
18670 @item @option{--toc-file} @tab @code{TOC_FILE}
18671 @item @option{--frames} @tab @code{FRAMES}
18672 @item @option{--menu} @tab @code{SHOW_MENU}
18673 @item @option{--debug} @tab @code{DEBUG}
18674 @item @option{--doctype} @tab @code{DOCTYPE}
18675 @item @option{--frameset-doctype} @tab @code{FRAMESET_DOCTYPE}
18676 @item @option{--test} @tab @code{TEST}
18677 @end multitable
18678
18679 @cindex @file{texi2oldapi.texi}, for @command{texi2any}
18680 Finally, any @command{texi2html} users seeking more detailed
18681 information can check the draft file @file{doc/texi2oldapi.texi} in
18682 the Texinfo source repository. It consists mainly of very rough
18683 notes, but may still be useful to some.
18684
18685
18686 @node Creating and Installing Info Files
18687 @chapter Creating and Installing Info Files
18688
18689 This chapter describes how to create and install Info files.
18690 @xref{Info Files}, for general information about the file format
18691 itself.
18692
18693 @menu
18694 * Creating an Info File::
18695 * Installing an Info File::
18696 @end menu
18697
18698
18699 @node Creating an Info File
18700 @section Creating an Info File
18701 @cindex Creating an Info file
18702 @cindex Info, creating an online file
18703 @cindex Formatting a file for Info
18704
18705 @code{makeinfo} is a program that converts a Texinfo file into an Info
18706 file, HTML file, or plain text. @code{texinfo-format-region} and
18707 @code{texinfo-format-buffer} are XEmacs functions that convert
18708 Texinfo to Info.
18709
18710 For information on installing the Info file in the Info system,
18711 @pxref{Installing an Info File}.
18712
18713 @menu
18714 * @t{makeinfo} Advantages:: @code{makeinfo} provides better error checking.
18715 * @t{makeinfo} in XEmacs:: How to run @code{makeinfo} from XEmacs.
18716 * @t{texinfo-format} commands:: Two Info formatting commands written
18717 in Emacs Lisp are an alternative
18718 to @code{makeinfo}.
18719 * Batch Formatting:: How to format for Info in XEmacs Batch mode.
18720 * Tag and Split Files:: How tagged and split files help Info
18721 to run better.
18722 @end menu
18723
18724
18725 @node @t{makeinfo} Advantages
18726 @subsection @code{makeinfo} Advantages
18727
18728 @anchor{makeinfo advantages}@c old name
18729
18730 The @code{makeinfo} utility creates an Info file from a Texinfo source
18731 providing better error messages than either of the XEmacs formatting
18732 commands. We recommend it. The @code{makeinfo} program is
18733 independent of XEmacs. You can run @code{makeinfo} in any of three
18734 ways: from an operating system shell, from a shell inside XEmacs, or by
18735 typing the @kbd{C-c C-m C-r} or the @kbd{C-c C-m C-b} command in
18736 Texinfo mode in XEmacs.
18737
18738 The @code{texinfo-format-region} and the @code{texinfo-format-buffer}
18739 commands may be useful if you cannot run @code{makeinfo}.
18740
18741
18742 @node @t{makeinfo} in XEmacs
18743 @subsection Running @code{makeinfo} Within XEmacs
18744
18745 @c anchor{makeinfo in XEmacs}@c prev name
18746 @cindex Running @code{makeinfo} in XEmacs
18747 @cindex @code{makeinfo} inside XEmacs
18748 @cindex Shell, running @code{makeinfo} in
18749
18750 You can run @code{makeinfo} in XEmacs Texinfo mode by using either the
18751 @code{makeinfo-region} or the @code{makeinfo-buffer} commands. In
18752 Texinfo mode, the commands are bound to @kbd{C-c C-m C-r} and @kbd{C-c
18753 C-m C-b} by default.
18754
18755 @table @kbd
18756 @item C-c C-m C-r
18757 @itemx M-x makeinfo-region
18758 Format the current region for Info.
18759 @findex makeinfo-region
18760
18761 @item C-c C-m C-b
18762 @itemx M-x makeinfo-buffer
18763 Format the current buffer for Info.
18764 @findex makeinfo-buffer
18765 @end table
18766
18767 When you invoke @code{makeinfo-region} the output goes to a temporary
18768 buffer. When you invoke @code{makeinfo-buffer} output goes to the
18769 file set with @code{@@setfilename} (@pxref{@t{@@setfilename}}).
18770
18771 The XEmacs @code{makeinfo-region} and @code{makeinfo-buffer} commands
18772 run the @code{makeinfo} program in a temporary shell buffer. If
18773 @code{makeinfo} finds any errors, XEmacs displays the error messages in
18774 the temporary buffer.
18775
18776 @cindex Errors, parsing
18777 @cindex Parsing errors
18778 @findex next-error
18779 You can parse the error messages by typing @kbd{C-x `}
18780 (@code{next-error}). This causes XEmacs to go to and position the
18781 cursor on the line in the Texinfo source that @code{makeinfo} thinks
18782 caused the error. @xref{Compilation, , Running @code{make} or
18783 Compilers Generally, xemacs, XEmacs User's Manual}, for more
18784 information about using the @code{next-error} command.
18785
18786 In addition, you can kill the shell in which the @code{makeinfo}
18787 command is running or make the shell buffer display its most recent
18788 output.
18789
18790 @table @kbd
18791 @item C-c C-m C-k
18792 @itemx M-x makeinfo-kill-job
18793 @findex makeinfo-kill-job
18794 Kill the current running @code{makeinfo} job
18795 (from @code{makeinfo-region} or @code{makeinfo-buffer}).
18796
18797 @item C-c C-m C-l
18798 @itemx M-x makeinfo-recenter-output-buffer
18799 @findex makeinfo-recenter-output-buffer
18800 Redisplay the @code{makeinfo} shell buffer to display its most recent
18801 output.
18802 @end table
18803
18804 @noindent
18805 (Note that the parallel commands for killing and recentering a @TeX{}
18806 job are @kbd{C-c C-t C-k} and @kbd{C-c C-t C-l}. @xref{Texinfo Mode
18807 Printing}.)
18808
18809 You can specify options for @code{makeinfo} by setting the
18810 @code{makeinfo-options} variable with either the @kbd{M-x
18811 customize} or the @kbd{M-x set-variable} command, or by setting the
18812 variable in your @file{init.el} initialization file.
18813
18814 For example, you could write the following in your @file{init.el} file:
18815
18816 @example
18817 @group
18818 (setq makeinfo-options
18819 "--paragraph-indent=0 --no-split
18820 --fill-column=70 --verbose")
18821 @end group
18822 @end example
18823
18824 @noindent
18825 @c Writing these three cross references using xref results in
18826 @c three references to the same named manual, which looks strange.
18827 @iftex
18828 For more information, see @ref{@t{makeinfo} Options}, as well as
18829 ``Easy Customization Interface,'' ``Examining and Setting Variables,''
18830 and ``Init File'' in @cite{XEmacs User's Manual}.
18831 @end iftex
18832 @ifnottex
18833 For more information, see@*
18834 @ref{Easy Customization, , Easy Customization Interface, xemacs, XEmacs User's Manual},@*
18835 @ref{Examining, , Examining and Setting Variables, xemacs, XEmacs User's Manual},@*
18836 @ref{Init File, , , xemacs, XEmacs User's Manual}, and@*
18837 @ref{@t{makeinfo} Options}.
18838 @end ifnottex
18839
18840
18841 @node @t{texinfo-format} commands
18842 @subsection The @code{texinfo-format@dots{}} Commands
18843
18844 @c anchor{texinfo-format commands}@c prev name
18845
18846 In XEmacs in Texinfo mode, you can format part or all of a Texinfo
18847 file with the @code{texinfo-format-region} command. This formats the
18848 current region and displays the formatted text in a temporary buffer
18849 called @samp{*Info Region*}.
18850
18851 Similarly, you can format a buffer with the
18852 @code{texinfo-format-buffer} command. This command creates a new
18853 buffer and generates the Info file in it. Typing @kbd{C-x C-s} will
18854 save the Info file under the name specified by the
18855 @code{@@setfilename} line which must be near the beginning of the
18856 Texinfo file.
18857
18858 @table @kbd
18859 @item C-c C-e C-r
18860 @itemx @code{texinfo-format-region}
18861 @findex texinfo-format-region
18862 Format the current region for Info.
18863
18864 @item C-c C-e C-b
18865 @itemx @code{texinfo-format-buffer}
18866 @findex texinfo-format-buffer
18867 Format the current buffer for Info.
18868 @end table
18869
18870 The @code{texinfo-format-region} and @code{texinfo-format-buffer}
18871 commands provide you with some error checking, and other functions can
18872 provide you with further help in finding formatting errors. These
18873 procedures are described in an appendix; see @ref{Catching Mistakes}.
18874 However, the @code{makeinfo} program provides better error checking
18875 (@pxref{@t{makeinfo} in XEmacs}).
18876
18877
18878 @node Batch Formatting
18879 @subsection Batch Formatting
18880 @cindex Batch formatting for Info
18881 @cindex Info batch formatting
18882
18883 You can format Texinfo files for Info using @code{batch-texinfo-format}
18884 and XEmacs Batch mode. You can run XEmacs in Batch mode from any shell,
18885 including a shell inside of XEmacs. (@xref{Command Arguments,,,
18886 xemacs, XEmacs User's Manual}.)
18887
18888 Here is a shell command to format all the files that end in
18889 @file{.texinfo} in the current directory:
18890
18891 @example
18892 xemacs -batch -funcall batch-texinfo-format *.texinfo
18893 @end example
18894
18895 @noindent
18896 XEmacs processes all the files listed on the command line, even if an
18897 error occurs while attempting to format some of them.
18898
18899 Run @code{batch-texinfo-format} only with XEmacs in Batch mode as shown;
18900 it is not interactive. It kills the Batch mode XEmacs on completion.
18901
18902 @code{batch-texinfo-format} is convenient if you lack @code{makeinfo}
18903 and want to format several Texinfo files at once. When you use Batch
18904 mode, you create a new XEmacs process. This frees your current XEmacs, so
18905 you can continue working in it. (When you run
18906 @code{texinfo-format-region} or @code{texinfo-format-buffer}, you cannot
18907 use that XEmacs for anything else until the command finishes.)
18908
18909 @node Tag and Split Files
18910 @subsection Tag Files and Split Files
18911 @cindex Making a tag table automatically
18912 @cindex Tag table, making automatically
18913
18914 If a Texinfo file has more than 30,000 bytes,
18915 @code{texinfo-format-buffer} automatically creates a tag table
18916 for its Info file; @code{makeinfo} always creates a tag table. With
18917 a @dfn{tag table}, Info can jump to new nodes more quickly than it can
18918 otherwise.
18919
18920 @cindex Indirect subfiles
18921 In addition, if the Texinfo file contains more than about 300,000
18922 bytes, @code{texinfo-format-buffer} and @code{makeinfo} split the
18923 large Info file into shorter @dfn{indirect} subfiles of about 300,000
18924 bytes each. Big files are split into smaller files so that XEmacs does
18925 not need to make a large buffer to hold the whole of a large Info
18926 file; instead, XEmacs allocates just enough memory for the small, split-off
18927 file that is needed at the time. This way, XEmacs avoids wasting
18928 memory when you run Info. (Before splitting was implemented, Info
18929 files were always kept short and @dfn{include files} were designed as
18930 a way to create a single, large printed manual out of the smaller Info
18931 files. @xref{Include Files}, for more information. Include files are
18932 still used for very large documents, such as @cite{The XEmacs Lisp
18933 Reference Manual}, in which each chapter is a separate file.)
18934
18935 When a file is split, Info itself makes use of a shortened version of
18936 the original file that contains just the tag table and references to
18937 the files that were split off. The split-off files are called
18938 @dfn{indirect} files.
18939
18940 The split-off files have names that are created by appending @w{@samp{-1}},
18941 @w{@samp{-2}}, @w{@samp{-3}} and so on to the file name specified by the
18942 @code{@@setfilename} command. The shortened version of the original file
18943 continues to have the name specified by @code{@@setfilename}.
18944
18945 At one stage in writing this document, for example, the Info file was saved
18946 as the file @file{test-texinfo} and that file looked like this:
18947
18948 @example
18949 @group
18950 Info file: test-texinfo, -*-Text-*-
18951 produced by texinfo-format-buffer
18952 from file: new-texinfo-manual.texinfo
18953
18954 ^_
18955 Indirect:
18956 test-texinfo-1: 102
18957 test-texinfo-2: 50422
18958 @end group
18959 @group
18960 test-texinfo-3: 101300
18961 ^_^L
18962 Tag table:
18963 (Indirect)
18964 Node: overview^?104
18965 Node: info file^?1271
18966 @end group
18967 @group
18968 Node: printed manual^?4853
18969 Node: conventions^?6855
18970 @dots{}
18971 @end group
18972 @end example
18973
18974 @noindent
18975 (But @file{test-texinfo} had far more nodes than are shown here.) Each of
18976 the split-off, indirect files, @file{test-texinfo-1},
18977 @file{test-texinfo-2}, and @file{test-texinfo-3}, is listed in this file
18978 after the line that says @samp{Indirect:}. The tag table is listed after
18979 the line that says @samp{Tag table:}.
18980
18981 In the list of indirect files, the number following the file name
18982 records the cumulative number of bytes in the preceding indirect
18983 files, not counting the file list itself, the tag table, or any
18984 permissions text in the first file. In the tag table, the number
18985 following the node name records the location of the beginning of the
18986 node, in bytes from the beginning of the (unsplit) output.
18987
18988 If you are using @code{texinfo-format-buffer} to create Info files,
18989 you may want to run the @code{Info-validate} command. (The
18990 @code{makeinfo} command does such a good job on its own, you do not
18991 need @code{Info-validate}.) However, you cannot run the @kbd{M-x
18992 Info-validate} node-checking command on indirect files. For
18993 information on how to prevent files from being split and how to
18994 validate the structure of the nodes, see @ref{Using
18995 @t{Info-validate}}.
18996
18997
18998 @node Installing an Info File
18999 @section Installing an Info File
19000 @cindex Installing an Info file
19001 @cindex Info file installation
19002 @cindex @file{dir} directory for Info installation
19003
19004 Info files are usually kept in the @file{info} directory. You can
19005 read Info files using the standalone Info program or the Info reader
19006 built into XEmacs. (@xref{Top,,, info, Info}, for an introduction to
19007 Info.)
19008
19009 @menu
19010 * Directory File:: The top level menu for all Info files.
19011 * New Info File:: Listing a new Info file.
19012 * Other Info Directories:: How to specify Info files that are
19013 located in other directories.
19014 * Installing Dir Entries:: How to specify what menu entry to add
19015 to the Info directory.
19016 * Invoking @t{install-info}:: @code{install-info} options.
19017 @end menu
19018
19019
19020 @node Directory File
19021 @subsection The Directory File @file{dir}
19022
19023 For Info to work, the @file{info} directory must contain a file that
19024 serves as a top level directory for the Info system. By convention,
19025 this file is called @file{dir}. (You can find the location of this file
19026 within XEmacs by typing @kbd{C-h i} to enter Info and then typing
19027 @kbd{C-x C-f} to see the pathname to the @file{info} directory.)
19028
19029 The @file{dir} file is itself an Info file. It contains the top level
19030 menu for all the Info files in the system. The menu looks like
19031 this:
19032
19033 @example
19034 @group
19035 * Menu:
19036 * Info: (info). Documentation browsing system.
19037 * XEmacs: (xemacs). The extensible, self-documenting
19038 text editor.
19039 * Texinfo: (texinfo). With one source file, make
19040 either a printed manual using
19041 @@TeX@{@} or an Info file.
19042 @dots{}
19043 @end group
19044 @end example
19045
19046 Each of these menu entries points to the `Top' node of the Info file
19047 that is named in parentheses. (The menu entry does not need to
19048 specify the `Top' node, since Info goes to the `Top' node if no node
19049 name is mentioned. @xref{Other Info Files, , Nodes in Other Info
19050 Files}.)
19051
19052 Thus, the @samp{Info} entry points to the `Top' node of the
19053 @file{info} file and the @samp{XEmacs} entry points to the `Top' node
19054 of the @file{xemacs} file.
19055
19056 In each of the Info files, the `Up' pointer of the `Top' node refers
19057 back to the @code{dir} file. For example, the line for the `Top'
19058 node of the Emacs manual looks like this in Info:
19059
19060 @example
19061 File: xemacs Node: Top, Up: (DIR), Next: Distrib
19062 @end example
19063
19064 @noindent
19065 In this case, the @file{dir} file name is written in uppercase
19066 letters---it can be written in either upper- or lowercase. This is not
19067 true in general, it is a special case for @file{dir}.
19068
19069
19070 @node New Info File
19071 @subsection Listing a New Info File
19072 @cindex Adding a new Info file
19073 @cindex Listing a new Info file
19074 @cindex New Info file, listing it in @file{dir} file
19075 @cindex Info file, listing a new
19076 @cindex @file{dir} file listing
19077
19078 To add a new Info file to your system, you must write a menu entry to
19079 add to the menu in the @file{dir} file in the @file{info} directory.
19080 For example, if you were adding documentation for GDB, you would write
19081 the following new entry:
19082
19083 @example
19084 * GDB: (gdb). The source-level C debugger.
19085 @end example
19086
19087 @noindent
19088 The first part of the menu entry is the menu entry name, followed by a
19089 colon. The second part is the name of the Info file, in parentheses,
19090 followed by a period. The third part is the description.
19091
19092 The name of an Info file often has a @file{.info} extension. Thus, the
19093 Info file for GDB might be called either @file{gdb} or @file{gdb.info}.
19094 The Info reader programs automatically try the file name both with and
19095 without @file{.info}@footnote{On MS-DOS/MS-Windows systems, Info will
19096 try the @file{.inf} extension as well.}; so it is better to avoid
19097 clutter and not to write @samp{.info} explicitly in the menu entry. For
19098 example, the GDB menu entry should use just @samp{gdb} for the file
19099 name, not @samp{gdb.info}.
19100
19101
19102 @node Other Info Directories
19103 @subsection Info Files in Other Directories
19104 @cindex Installing Info in another directory
19105 @cindex Info installed in another directory
19106 @cindex Another Info directory
19107 @cindex @file{dir} files and Info directories
19108
19109 If an Info file is not in the @file{info} directory, there are three
19110 ways to specify its location:
19111
19112 @enumerate
19113 @item
19114 Write the pathname in the @file{dir} file as the second part of the menu.
19115
19116 @item
19117 Specify the Info directory name in the @code{INFOPATH} environment
19118 variable in your @file{.profile} or @file{.cshrc} initialization file.
19119 (Only you and others who set this environment variable will be able to
19120 find Info files whose location is specified this way.)
19121
19122 @item
19123 If you are using XEmacs, list the name of the file in a second @file{dir}
19124 file, in its directory; and then add the name of that directory to the
19125 @code{Info-directory-list} variable in your personal or site
19126 initialization file.
19127
19128 This variable tells XEmacs where to look for @file{dir} files (the files
19129 must be named @file{dir}). XEmacs merges the files named @file{dir} from
19130 each of the listed directories. (In XEmacs version 18, you can set the
19131 @code{Info-directory} variable to the name of only one
19132 directory.)
19133 @end enumerate
19134
19135 For example, to reach a test file in the @file{/home/bob/info}
19136 directory, you could add an entry like this to the menu in the
19137 standard @file{dir} file:
19138
19139 @example
19140 * Test: (/home/bob/info/info-test). Bob's own test file.
19141 @end example
19142
19143 @noindent
19144 In this case, the absolute file name of the @file{info-test} file is
19145 written as the second part of the menu entry.
19146
19147 @vindex INFOPATH
19148 @cindex Environment variable @code{INFOPATH}
19149 If you don't want to edit the system @file{dir} file, you can tell
19150 Info where to look by setting the @code{INFOPATH} environment variable
19151 in your shell startup file. This works with both the XEmacs and
19152 standalone Info readers.
19153
19154 Specifically, if you use a Bourne-compatible shell such as @code{sh}
19155 or @code{bash} for your shell command interpreter, you set the
19156 @code{INFOPATH} environment variable in the @file{.profile}
19157 initialization file; but if you use @code{csh} or @code{tcsh}, you set
19158 the variable in the @file{.cshrc} initialization file. On
19159 MS-DOS/MS-Windows systems, you must set @code{INFOPATH} in your
19160 @file{autoexec.bat} file or in the registry. Each type of shell uses
19161 a different syntax.
19162
19163 @itemize @bullet
19164 @item
19165 In a @file{.cshrc} file, you could set the @code{INFOPATH}
19166 variable as follows:
19167
19168 @smallexample
19169 setenv INFOPATH .:~/info:/usr/local/xemacs/info
19170 @end smallexample
19171
19172 @item
19173 In a @file{.profile} file, you would achieve the same effect by writing:
19174
19175 @smallexample
19176 INFOPATH=.:$HOME/info:/usr/local/xemacs/info
19177 export INFOPATH
19178 @end smallexample
19179
19180 @item
19181 @pindex autoexec.bat
19182 In a @file{autoexec.bat} file, you write this command (note the
19183 use of @samp{;} as the directory separator, and a different syntax for
19184 using values of other environment variables):
19185
19186 @smallexample
19187 set INFOPATH=.;%HOME%/info;c:/usr/local/Xemacs/info
19188 @end smallexample
19189 @end itemize
19190
19191 @noindent
19192 The @samp{.} indicates the current directory as usual. XEmacs uses the
19193 @code{INFOPATH} environment variable to initialize the value of XEmacs's
19194 own @code{Info-directory-list} variable. The standalone Info reader
19195 merges any files named @file{dir} in any directory listed in the
19196 @env{INFOPATH} variable into a single menu presented to you in the node
19197 called @samp{(dir)Top}.
19198
19199 @cindex Colon, last in @env{INFOPATH}
19200 However you set @env{INFOPATH}, if its last character is a colon (on
19201 MS-DOS/MS-Windows systems, use a semicolon instead), this is replaced
19202 by the default (compiled-in) path. This gives you a way to augment
19203 the default path with new directories without having to list all the
19204 standard places. For example (using @code{sh} syntax):
19205
19206 @example
19207 INFOPATH=/home/bob/info:
19208 export INFOPATH
19209 @end example
19210
19211 @noindent
19212 will search @file{/home/bob/info} first, then the standard directories.
19213 Leading or doubled colons are not treated specially.
19214
19215 @cindex @file{dir} file, creating your own
19216 When you create your own @file{dir} file for use with
19217 @code{Info-directory-list} or @env{INFOPATH}, it's easiest to start by
19218 copying an existing @file{dir} file and replace all the text after the
19219 @samp{* Menu:} with your desired entries. That way, the punctuation
19220 and special @kbd{CTRL-_} characters that Info needs will be present.
19221
19222 As one final alternative, which works only with XEmacs Info, you can
19223 change the @code{Info-directory-list} variable. For example:
19224
19225 @example
19226 (add-hook 'Info-mode-hook '(lambda ()
19227 (add-to-list 'Info-directory-list
19228 (expand-file-name "~/info"))))
19229 @end example
19230
19231
19232 @node Installing Dir Entries
19233 @subsection Installing Info Directory Files
19234
19235 When you install an Info file onto your system, you can use the program
19236 @code{install-info} to update the Info directory file @file{dir}.
19237 Normally the makefile for the package runs @code{install-info}, just
19238 after copying the Info file into its proper installed location.
19239
19240 @findex dircategory
19241 @findex direntry
19242 In order for the Info file to work with @code{install-info}, you include
19243 the commands @code{@@dircategory} and
19244 @code{@@direntry}@dots{}@code{@@end direntry} in the Texinfo source
19245 file. Use @code{@@direntry} to specify the menu entries to add to the
19246 Info directory file, and use @code{@@dircategory} to specify which part
19247 of the Info directory to put it in. Here is how these commands are used
19248 in this manual:
19249
19250 @smallexample
19251 @@dircategory Texinfo documentation system
19252 @@direntry
19253 * Texinfo: (texinfo). The GNU documentation format.
19254 * install-info: (texinfo)Invoking install-info. @dots{}
19255 @dots{}
19256 @@end direntry
19257 @end smallexample
19258
19259 Here's what this produces in the Info file:
19260
19261 @smallexample
19262 INFO-DIR-SECTION Texinfo documentation system
19263 START-INFO-DIR-ENTRY
19264 * Texinfo: (texinfo). The GNU documentation format.
19265 * install-info: (texinfo)Invoking install-info. @dots{}
19266 @dots{}
19267 END-INFO-DIR-ENTRY
19268 @end smallexample
19269
19270 @noindent
19271 The @code{install-info} program sees these lines in the Info file, and
19272 that is how it knows what to do.
19273
19274 Always use the @code{@@direntry} and @code{@@dircategory} commands near
19275 the beginning of the Texinfo input, before the first @code{@@node}
19276 command. If you use them later on in the input, @code{install-info}
19277 will not notice them.
19278
19279 @code{install-info} will automatically reformat the description of the
19280 menu entries it is adding. As a matter of convention, the description
19281 of the main entry (above, @samp{The GNU documentation format}) should
19282 start at column 32, starting at zero (as in
19283 @code{what-cursor-position} in XEmacs). This will make it align with
19284 most others. Description for individual utilities best start in
19285 column 48, where possible. For more information about formatting see
19286 the @samp{--calign}, @samp{--align}, and @samp{--max-width} options in
19287 @ref{Invoking @t{install-info}}.
19288
19289 If you use @code{@@dircategory} more than once in the Texinfo source,
19290 each usage specifies the `current' category; any subsequent
19291 @code{@@direntry} commands will add to that category.
19292
19293 @cindex Free Software Directory
19294 @cindex Dir categories, choosing
19295 @cindex Categories, choosing
19296 When choosing a category name for the @code{@@dircategory} command, we
19297 recommend consulting the @uref{http://www.gnu.org/directory,
19298 Free Software Directory}. If your program is not listed there,
19299 or listed incorrectly or incompletely, please report the situation to
19300 the directory maintainers (@email{bug-directory@@gnu.org}) so that the
19301 category names can be kept in sync.
19302
19303 Here are a few examples (see the @file{util/dir-example} file in the
19304 Texinfo distribution for large sample @code{dir} file):
19305
19306 @display
19307 XEmacs
19308 Localization
19309 Printing
19310 Software development
19311 Software libraries
19312 Text creation and manipulation
19313 @end display
19314
19315 @cindex Invoking nodes, including in dir file
19316 Each `Invoking' node for every program installed should have a
19317 corresponding @code{@@direntry}. This lets users easily find the
19318 documentation for the different programs they can run, as with the
19319 traditional @command{man} system.
19320
19321
19322 @node Invoking @t{install-info}
19323 @subsection Invoking @command{install-info}
19324
19325 @pindex install-info
19326
19327 @code{install-info} inserts menu entries from an Info file into the
19328 top-level @file{dir} file in the Info system (see the previous sections
19329 for an explanation of how the @file{dir} file works). @code{install-info}
19330 also removes menu entries from the @file{dir} file. It's most often
19331 run as part of software installation, or when constructing a @file{dir} file
19332 for all manuals on a system. Synopsis:
19333
19334 @example
19335 install-info [@var{option}]@dots{} [@var{info-file} [@var{dir-file}]]
19336 @end example
19337
19338 If @var{info-file} or @var{dir-file} are not specified, the options
19339 (described below) that define them must be. There are no compile-time
19340 defaults, and standard input is never used. @code{install-info} can
19341 read only one Info file and write only one @file{dir} file per invocation.
19342
19343 @cindex @file{dir}, created by @code{install-info}
19344 If @var{dir-file} (however specified) does not exist,
19345 @code{install-info} creates it if possible (with no entries).
19346
19347 @cindex Compressed dir files, reading
19348 @cindex XZ-compressed dir files, reading
19349 @cindex Bzipped dir files, reading
19350 @cindex Lzip-compressed dir files, reading
19351 @cindex LZMA-compressed dir files, reading
19352 @cindex Dir files, compressed
19353 If any input file is compressed with @code{gzip} (@pxref{Top,,, gzip,
19354 Gzip}), @code{install-info} automatically uncompresses it for reading.
19355 And if @var{dir-file} is compressed, @code{install-info} also
19356 automatically leaves it compressed after writing any changes. If
19357 @var{dir-file} itself does not exist, @code{install-info} tries to
19358 open @file{@var{dir-file}.gz}, @file{@var{dir-file}.xz},
19359 @file{@var{dir-file}.bz2}, @file{@var{dir-file}.lz}, and
19360 @file{@var{dir-file}.lzma}, in that order.
19361
19362 Options:
19363
19364 @table @code
19365 @item --add-once
19366 @opindex --add-once@r{, for @command{install-info}}
19367 Specifies that the entry or entries will only be put into a single section.
19368
19369 @item --align=@var{column}
19370 @opindex --align=@var{column}@r{, for @command{install-info}}
19371 Specifies the column that the second and subsequent lines of menu entry's
19372 description will be formatted to begin at. The default for this option is
19373 @samp{35}. It is used in conjunction with the @samp{--max-width} option.
19374 @var{column} starts counting at 1.
19375
19376 @item --append-new-sections
19377 @opindex --append-new-sections@r{, for @command{install-info}}
19378 Instead of alphabetizing new sections, place them at the end of the DIR file.
19379
19380 @item --calign=@var{column}
19381 @opindex --calign=@var{column}@r{, for @command{install-info}}
19382 Specifies the column that the first line of menu entry's description will
19383 be formatted to begin at. The default for this option is @samp{33}. It is
19384 used in conjunction with the @samp{--max-width} option.
19385 When the name of the menu entry exceeds this column, entry's description
19386 will start on the following line.
19387 @var{column} starts counting at 1.
19388
19389 @item --debug
19390 @opindex --debug@r{, for @command{install-info}}
19391 Report what is being done.
19392
19393 @item --delete
19394 @opindex --delete@r{, for @command{install-info}}
19395 Delete the entries in @var{info-file} from @var{dir-file}. The file
19396 name in the entry in @var{dir-file} must be @var{info-file} (except for
19397 an optional @samp{.info} in either one). Don't insert any new entries.
19398 Any empty sections that result from the removal are also removed.
19399
19400 @item --description=@var{text}
19401 @opindex --description=@var{text}@r{, for @command{install-info}}
19402 Specify the explanatory portion of the menu entry. If you don't specify
19403 a description (either via @samp{--entry}, @samp{--item} or this option),
19404 the description is taken from the Info file itself.
19405
19406 @item --dir-file=@var{name}
19407 @opindex --dir-file=@var{name}@r{, for @command{install-info}}
19408 Specify file name of the Info directory file. This is equivalent to
19409 using the @var{dir-file} argument.
19410
19411 @item --dry-run
19412 @opindex --dry-run@r{, for @command{install-info}}
19413 Same as @samp{--test}.
19414
19415 @item --entry=@var{text}
19416 @opindex --entry=@var{text}@r{, for @command{install-info}}
19417 Insert @var{text} as an Info directory entry; @var{text} should have the
19418 form of an Info menu item line plus zero or more extra lines starting
19419 with whitespace. If you specify more than one entry, they are all
19420 added. If you don't specify any entries, they are determined from
19421 information in the Info file itself.
19422
19423 @item --help
19424 @opindex --help@r{, for @command{texindex}}
19425 Display a usage message with basic usage and all available options,
19426 then exit successfully.
19427
19428 @item --info-file=@var{file}
19429 @opindex --info-file=@var{file}@r{, for @command{install-info}}
19430 Specify Info file to install in the directory. This is
19431 equivalent to using the @var{info-file} argument.
19432
19433 @item --info-dir=@var{dir}
19434 @opindex --info-dir=@var{dir}@r{, for @command{install-info}}
19435 Specify the directory where the directory file @file{dir} resides.
19436 Equivalent to @samp{--dir-file=@var{dir}/dir}.
19437
19438 @item --infodir=@var{dir}
19439 @opindex --infodir=@var{dir}@r{, for @command{install-info}}
19440 Same as @samp{--info-dir}.
19441
19442 @item --item=@var{text}
19443 @opindex --item=@var{text}@r{, for @command{install-info}}
19444 Same as @samp{--entry=@var{text}}. An Info directory entry is actually
19445 a menu item.
19446
19447 @item --keep-old
19448 @opindex --keep-old@r{, for @command{install-info}}
19449 Do not replace pre-existing menu entries. When @samp{--remove} is specified,
19450 this option means that empty sections are not removed.
19451
19452 @item --max-width=@var{column}
19453 @opindex --max-width=@var{column}@r{, for @command{install-info}}
19454 Specifies the column that the menu entry's description will be word-wrapped
19455 at. @var{column} starts counting at 1.
19456
19457 @item --maxwidth=@var{column}
19458 @opindex --maxwidth=@var{column}@r{, for @command{install-info}}
19459 Same as @samp{--max-width}.
19460
19461 @item --menuentry=@var{text}
19462 @opindex --menuentry=@var{text}@r{, for @command{install-info}}
19463 Same as @samp{--name}.
19464
19465 @item --name=@var{text}
19466 @opindex --name=@var{text}@r{, for @command{install-info}}
19467 Specify the name portion of the menu entry. If the @var{text} does
19468 not start with an asterisk @samp{*}, it is presumed to be the text
19469 after the @samp{*} and before the parentheses that specify the Info
19470 file. Otherwise @var{text} is taken verbatim, and is taken as
19471 defining the text up to and including the first period (a space is
19472 appended if necessary). If you don't specify the name (either via
19473 @samp{--entry}, @samp{--item} or this option), it is taken from the
19474 Info file itself. If the Info does not contain the name, the basename
19475 of the Info file is used.
19476
19477 @item --no-indent
19478 @opindex --no-indent@r{, for @command{install-info}}
19479 Suppress formatting of new entries into the @file{dir} file.
19480
19481 @item --quiet
19482 @itemx --silent
19483 @opindex --quiet@r{, for @command{install-info}}
19484 @opindex --silent@r{, for @command{install-info}}
19485 Suppress warnings, etc., for silent operation.
19486
19487 @item --remove
19488 @opindex --remove@r{, for @command{install-info}}
19489 Same as @samp{--delete}.
19490
19491 @item --remove-exactly
19492 @opindex --remove-exactly@r{, for @command{install-info}}
19493 Also like @samp{--delete}, but only entries if the Info file name
19494 matches exactly; @code{.info} and/or @code{.gz} suffixes are
19495 @emph{not} ignored.
19496
19497 @item --section=@var{sec}
19498 @opindex --section=@var{sec}@r{, for @command{install-info}}
19499 Put this file's entries in section @var{sec} of the directory. If you
19500 specify more than one section, all the entries are added in each of the
19501 sections. If you don't specify any sections, they are determined from
19502 information in the Info file itself. If the Info file doesn't specify
19503 a section, the menu entries are put into the Miscellaneous section.
19504
19505 @item --section @var{regex} @var{sec}
19506 @opindex --section @var{regex} @var{sec}@r{, for @command{install-info}}
19507 Same as @samp{--regex=@var{regex} --section=@var{sec} --add-once}.
19508
19509 @code{install-info} tries to detect when this alternate syntax is used,
19510 but does not always guess correctly. Here is the heuristic that
19511 @code{install-info} uses:
19512 @enumerate
19513 @item
19514 If the second argument to @code{--section} starts with a hyphen, the
19515 original syntax is presumed.
19516
19517 @item
19518 If the second argument to @code{--section} is a file that can be
19519 opened, the original syntax is presumed.
19520
19521 @item
19522 Otherwise the alternate syntax is used.
19523 @end enumerate
19524
19525 When the heuristic fails because your section title starts with a
19526 hyphen, or it happens to be a filename that can be opened, the syntax
19527 should be changed to @samp{--regex=@var{regex} --section=@var{sec}
19528 --add-once}.
19529
19530 @item --regex=@var{regex}
19531 @opindex --regex=@var{regex}@r{, for @command{install-info}}
19532 Put this file's entries into any section that matches @var{regex}. If
19533 more than one section matches, all of the entries are added in each of the
19534 sections. Specify @var{regex} using basic regular expression syntax, more
19535 or less as used with @command{grep}, for example.
19536
19537 @item --test
19538 @opindex --test@r{, for @command{install-info}}
19539 Suppress updating of the directory file.
19540
19541 @item --version
19542 @opindex --version@r{, for @command{install-info}}
19543 @cindex Version number, for install-info
19544 Display version information and exit successfully.
19545
19546 @end table
19547
19548
19549 @node Generating HTML
19550 @chapter Generating HTML
19551
19552 @cindex Generating HTML
19553 @cindex Outputting HTML
19554
19555 @command{makeinfo} generates Info output by default, but given the
19556 @option{--html} option, it will generate HTML, for web browsers and
19557 other programs. This chapter gives some details on such HTML output.
19558
19559 @command{makeinfo} has many user-definable customization variables
19560 with which you can influence the HTML output. @xref{Customization
19561 Variables}.
19562
19563 @command{makeinfo} can also produce output in XML and Docbook formats,
19564 but we do not as yet describe these in detail. @xref{Output Formats},
19565 for a brief overview of all the output formats.
19566
19567 @menu
19568 * HTML Translation:: Details of the HTML output.
19569 * HTML Splitting:: How HTML output is split.
19570 * HTML CSS:: Influencing HTML output with Cascading Style Sheets.
19571 * HTML Xref:: Cross references in HTML output.
19572 @end menu
19573
19574
19575 @node HTML Translation
19576 @section HTML Translation
19577
19578 @command{makeinfo} will include segments of Texinfo source between
19579 @code{@@ifhtml} and @code{@@end ifhtml} in the HTML output (but not
19580 any of the other conditionals, by default). Source between
19581 @code{@@html} and @code{@@end html} is passed without change to the
19582 output (i.e., suppressing the normal escaping of input @samp{<},
19583 @samp{>} and @samp{&} characters which have special significance in
19584 HTML). @xref{Conditional Commands}.
19585
19586 @cindex Navigation bar, in HTML output
19587 By default, a navigation bar is inserted at the start of each node,
19588 analogous to Info output. If the @samp{--no-headers} option is used,
19589 the navigation bar is only inserted at the beginning of split files.
19590 Header @code{<link>} elements in split output can support Info-like
19591 navigation with browsers like Lynx and @w{XEmacs W3} which implement
19592 this HTML@tie{}1.0 feature.
19593
19594 @cindex Footnote styles, in HTML
19595 In HTML, when the footnote style is @samp{end}, or if the output is
19596 not split, footnotes are put at the end of the output. If set to
19597 @samp{separate}, and the output is split, they are placed in a
19598 separate file. @xref{Footnote Styles}.
19599
19600 @cindex HTML output, browser compatibility of
19601 The HTML generated is standard HTML@tie{}4. It also tries to be as
19602 compatible as possible with earlier standards (e.g., HTML@tie{}2.0,
19603 RFC-1866). Some minor exceptions: 1)@tie{}HTML@tie{}3.2 tables are
19604 generated for the @code{@@multitable} command (@pxref{Multi-column
19605 Tables}), but they should degrade reasonably in browsers without table
19606 support; 2)@tie{}The HTML@tie{}4 @samp{lang} attribute on the
19607 @samp{<html>} attribute is used; 3)@tie{} Entities that are not in the
19608 HTML@tie{}3.2 standard are also used. 4)@tie{} CSS is used
19609 (@pxref{HTML CSS}). 5)@tie{} A few HTML@tie{}4 elements are used
19610 (@code{thead}, @code{abbr}, @code{acronym}).
19611
19612 Using @samp{--init-file=html32.pm} produces strict HTML@tie{}3.2
19613 output (@pxref{Invoking @t{texi2any}}).
19614
19615 Please report output from an error-free run of @code{makeinfo} which
19616 has browser portability problems as a bug (@pxref{Reporting Bugs}).
19617
19618
19619 @node HTML Splitting
19620 @section HTML Splitting
19621 @cindex Split HTML output
19622 @cindex HTML output, split
19623
19624 When splitting output at nodes (which is the default),
19625 @command{makeinfo} writes HTML output into (basically) one output file
19626 per Texinfo source @code{@@node}.
19627
19628 Each output file name is the node name with spaces replaced by
19629 @samp{-}'s and special characters changed to @samp{_} followed by
19630 their code point in hex (@pxref{HTML Xref}). This is to make it
19631 portable and easy to use as a filename. In the unusual case of two
19632 different nodes having the same name after this treatment, they are
19633 written consecutively to the same file, with HTML anchors so each can
19634 be referred to independently.
19635
19636 If @command{makeinfo} is run on a system which does not distinguish
19637 case in file names, nodes which are the same except for case (e.g.,
19638 @samp{index} and @samp{Index}) will also be folded into the same
19639 output file with anchors. You can also pretend to be on a case
19640 insensitive filesystem by setting the customization variable
19641 @code{CASE_INSENSITIVE_FILENAMES}.
19642
19643 It is also possible to split at chapters or sections with
19644 @option{--split} (@pxref{Invoking @t{texi2any}}). In that case,
19645 the file names are constructed after the name of the node associated
19646 with the relevant sectioning command. Also, unless
19647 @option{--no-node-files} is specified, a redirection file is output
19648 for every node in order to more reliably support cross references to
19649 that manual (@pxref{HTML Xref}).
19650
19651 When splitting, the HTML output files are written into a subdirectory,
19652 with the name chosen as follows:
19653
19654 @enumerate
19655 @item
19656 @command{makeinfo} first tries the subdirectory with the base name
19657 from @code{@@setfilename} (that is, any extension is removed). For
19658 example, HTML output for @code{@@setfilename gcc.info} would be
19659 written into a subdirectory named @samp{gcc/}.
19660
19661 @item
19662 If that directory cannot be created for any reason, then
19663 @command{makeinfo} tries appending @samp{.html} to the directory name.
19664 For example, output for @code{@@setfilename texinfo} would be written
19665 to @samp{texinfo.html/}.
19666
19667 @item
19668 If the @samp{@var{name}.html} directory can't be created either,
19669 @code{makeinfo} gives up.
19670
19671 @end enumerate
19672
19673 @noindent In any case, the top-level output file within the directory
19674 is always named @samp{index.html}.
19675
19676 Monolithic output (@code{--no-split}) is named according to
19677 @code{@@setfilename} (with any @samp{.info} extension is replaced with
19678 @samp{.html}), @code{--output} (the argument is used literally), or
19679 based on the input file name as a last resort
19680 (@pxref{@t{@@setfilename}}).
19681
19682
19683 @node HTML CSS
19684 @section HTML CSS
19685 @cindex HTML, and CSS
19686 @cindex CSS, and HTML output
19687 @cindex Cascading Style Sheets, and HTML output
19688
19689 Cascading Style Sheets (CSS for short) is an Internet standard for
19690 influencing the display of HTML documents: see
19691 @uref{http://www.w3.org/Style/CSS/}.
19692
19693 By default, @command{makeinfo} includes a few simple CSS commands to
19694 better implement the appearance of some Texinfo environments. Here
19695 are two of them, as an example:
19696
19697 @example
19698 pre.display @{ font-family:inherit @}
19699 pre.smalldisplay @{ font-family:inherit; font-size:smaller @}
19700 @end example
19701
19702 A full explanation of CSS is (far) beyond this manual; please see the
19703 reference above. In brief, however, the above tells the web browser
19704 to use a `smaller' font size for @code{@@smalldisplay} text, and to
19705 use the same font as the main document for both @code{@@smalldisplay}
19706 and @code{@@display}. By default, the HTML @samp{<pre>} command uses
19707 a monospaced font.
19708
19709 You can influence the CSS in the HTML output with two
19710 @command{makeinfo} options: @option{--css-include=@var{file}} and
19711 @option{--css-ref=@var{url}}.
19712
19713 @pindex texinfo-bright-colors.css
19714 @cindex Visualizing Texinfo CSS
19715 The option @option{--css-ref=@var{url}} adds to each output HTML file
19716 a @samp{<link>} tag referencing a CSS at the given @var{url}. This
19717 allows using external style sheets. You may find the file
19718 @file{texi2html/examples/texinfo-bright-colors.css} useful for
19719 visualizing the CSS elements in Texinfo output.
19720
19721 The option @option{--css-include=@var{file}} includes the contents
19722 @var{file} in the HTML output, as you might expect. However, the
19723 details are somewhat tricky, as described in the following, to provide
19724 maximum flexibility.
19725
19726 @cindex @@import specifications, in CSS files
19727 The CSS file may begin with so-called @samp{@@import} directives,
19728 which link to external CSS specifications for browsers to use when
19729 interpreting the document. Again, a full description is beyond our
19730 scope here, but we'll describe how they work syntactically, so we can
19731 explain how @command{makeinfo} handles them.
19732
19733 @cindex Comments, in CSS files
19734 There can be more than one @samp{@@import}, but they have to come
19735 first in the file, with only whitespace and comments interspersed, no
19736 normal definitions. (Technical exception: an @samp{@@charset}
19737 directive may precede the @samp{@@import}'s. This does not alter
19738 @command{makeinfo}'s behavior, it just copies the @samp{@@charset} if
19739 present.) Comments in CSS files are delimited by @samp{/* ... */}, as
19740 in C@. An @samp{@@import} directive must be in one of these two forms:
19741
19742 @example
19743 @@import url(http://example.org/foo.css);
19744 @@import "http://example.net/bar.css";
19745 @end example
19746
19747 As far as @command{makeinfo} is concerned, the crucial characters are
19748 the @samp{@@} at the beginning and the semicolon terminating the
19749 directive. When reading the CSS file, it simply copies any such
19750 @samp{@@}-directive into the output, as follows:
19751
19752 @itemize
19753 @item If @var{file} contains only normal CSS declarations, it is
19754 included after @command{makeinfo}'s default CSS, thus overriding it.
19755
19756 @item If @var{file} begins with @samp{@@import} specifications (see
19757 below), then the @samp{import}'s are included first (they have to come
19758 first, according to the standard), and then @command{makeinfo}'s
19759 default CSS is included. If you need to override @command{makeinfo}'s
19760 defaults from an @samp{@@import}, you can do so with the @samp{!@:
19761 important} CSS construct, as in:
19762 @example
19763 pre.smallexample @{ font-size: inherit ! important @}
19764 @end example
19765
19766 @item If @var{file} contains both @samp{@@import} and inline CSS
19767 specifications, the @samp{@@import}'s are included first, then
19768 @command{makeinfo}'s defaults, and lastly the inline CSS from
19769 @var{file}.
19770
19771 @item Any @@-directive other than @samp{@@import} and @samp{@@charset}
19772 is treated as a CSS declaration, meaning @command{makeinfo} includes
19773 its default CSS and then the rest of the file.
19774 @end itemize
19775
19776 If the CSS file is malformed or erroneous, @command{makeinfo}'s output
19777 is unspecified. @command{makeinfo} does not try to interpret the
19778 meaning of the CSS file in any way; it just looks for the special
19779 @samp{@@} and @samp{;} characters and blindly copies the text into the
19780 output. Comments in the CSS file may or may not be included in the
19781 output.
19782
19783 In addition to the possibilities offered by CSS, @command{makeinfo}
19784 has many user-definable customization variables with which you can
19785 influence the HTML output. @xref{Customization Variables}.
19786
19787
19788 @node HTML Xref
19789 @section HTML Cross References
19790 @cindex HTML cross references
19791 @cindex Cross references, in HTML output
19792
19793 Cross references between Texinfo manuals in HTML format become, in the
19794 end, a standard HTML @code{<a>} link, but the details are
19795 unfortunately complex. This section describes the algorithm used in
19796 detail, so that Texinfo can cooperate with other programs, such as
19797 @command{texi2html}, by writing mutually compatible HTML files.
19798
19799 This algorithm may or may not be used for links @emph{within} HTML
19800 output for a Texinfo file. Since no issues of compatibility arise in
19801 such cases, we do not need to specify this.
19802
19803 We try to support references to such ``external'' manuals in both
19804 monolithic and split forms. A @dfn{monolithic} (mono) manual is
19805 entirely contained in one file, and a @dfn{split} manual has a file
19806 for each node. (@xref{HTML Splitting}.)
19807
19808 @cindex Dumas, Patrice
19809 The algorithm was primarily devised by Patrice Dumas in 2003--04.
19810
19811 @menu
19812 * Link Basics: HTML Xref Link Basics.
19813 * Node Expansion: HTML Xref Node Name Expansion.
19814 * Command Expansion: HTML Xref Command Expansion.
19815 * 8-bit Expansion: HTML Xref 8-bit Character Expansion.
19816 * Mismatch: HTML Xref Mismatch.
19817 * Configuration: HTML Xref Configuration. htmlxref.cnf.
19818 * Preserving links: HTML Xref Link Preservation. MANUAL-noderename.cnf.
19819 @end menu
19820
19821
19822 @node HTML Xref Link Basics
19823 @subsection HTML Cross Reference Link Basics
19824 @cindex HTML cross reference link basics
19825
19826 For our purposes, an HTML link consists of four components: a host
19827 name, a directory part, a file part, and a target part. We
19828 always assume the @code{http} protocol. For example:
19829
19830 @example
19831 http://@var{host}/@var{dir}/@var{file}.html#@var{target}
19832 @end example
19833
19834 The information to construct a link comes from the node name and
19835 manual name in the cross reference command in the Texinfo source
19836 (@pxref{Cross References}), and from @dfn{external information}
19837 (@pxref{HTML Xref Configuration}).
19838
19839 We now consider each part in turn.
19840
19841 The @var{host} is hardwired to be the local host. This could either
19842 be the literal string @samp{localhost}, or, according to the rules for
19843 HTML links, the @samp{http://localhost/} could be omitted entirely.
19844
19845 The @var{dir} and @var{file} parts are more complicated, and depend on
19846 the relative split/mono nature of both the manual being processed and
19847 the manual that the cross reference refers to. The underlying idea is
19848 that there is one directory for Texinfo manuals in HTML, and a given
19849 @var{manual} is either available as a monolithic file
19850 @file{@var{manual}.html}, or a split subdirectory
19851 @file{@var{manual}/*.html}. Here are the cases:
19852
19853 @itemize @bullet
19854 @item
19855 If the present manual is split, and the referent manual is also split,
19856 the directory is @samp{../@var{referent/}} and the file is the
19857 expanded node name (described later).
19858
19859 @item
19860 If the present manual is split, and the referent manual is mono, the
19861 directory is @samp{../} and the file is @file{@var{referent}.html}.
19862
19863 @item
19864 If the present manual is mono, and the referent manual is split, the
19865 directory is @file{@var{referent}/} and the file is the expanded node
19866 name.
19867
19868 @item
19869 If the present manual is mono, and the referent manual is also mono,
19870 the directory is @file{./} (or just the empty string), and the file is
19871 @file{@var{referent}.html}.
19872
19873 @end itemize
19874
19875 @vindex BASEFILENAME_LENGTH
19876 Another rule, that only holds for filenames, is that base filenames
19877 are truncated to 245 characters, to allow for an extension to be
19878 appended and still comply with the 255-character limit which is common
19879 to many filesystems. Although technically this can be changed with
19880 the @code{BASEFILENAME_LENGTH} customization variable (@pxref{Other
19881 Customization Variables}), doing so would make cross-manual references
19882 to such nodes invalid.
19883
19884 Any directory part in the filename argument of the source cross
19885 reference command is ignored. Thus, @code{@@xref@{,,,../foo@}} and
19886 @code{@@xref@{,,,foo@}} both use @samp{foo} as the manual name. This
19887 is because any such attempted hardwiring of the directory is very
19888 unlikely to be useful for both Info and HTML output.
19889
19890 Finally, the @var{target} part is always the expanded node name.
19891
19892 Whether the present manual is split or mono is determined by user
19893 option; @command{makeinfo} defaults to split, with the
19894 @option{--no-split} option overriding this.
19895
19896 Whether the referent manual is split or mono, however, is another bit
19897 of the external information (@pxref{HTML Xref Configuration}). By
19898 default, @command{makeinfo} uses the same form of the referent manual
19899 as the present manual.
19900
19901 Thus, there can be a mismatch between the format of the referent
19902 manual that the generating software assumes, and the format it's
19903 actually present in. @xref{HTML Xref Mismatch}.
19904
19905
19906 @node HTML Xref Node Name Expansion
19907 @subsection HTML Cross Reference Node Name Expansion
19908 @cindex HTML cross reference node name expansion
19909 @cindex node name expansion, in HTML cross references
19910 @cindex expansion, of node names in HTML cross references
19911
19912 As mentioned in the previous section, the key part of the HTML cross
19913 reference algorithm is the conversion of node names in the Texinfo
19914 source into strings suitable for XHTML identifiers and filenames. The
19915 restrictions are similar for each: plain ASCII letters, numbers, and
19916 the @samp{-} and @samp{_} characters are all that can be used.
19917 (Although HTML anchors can contain most characters, XHTML is more
19918 restrictive.)
19919
19920 Cross references in Texinfo can refer either to nodes or anchors
19921 (@pxref{@t{@@anchor}}). However, anchors are treated identically
19922 to nodes in this context, so we'll continue to say ``node'' names for
19923 simplicity.
19924
19925 A special exception: the Top node (@pxref{The Top Node}) is always
19926 mapped to the file @file{index.html}, to match web server software.
19927 However, the HTML @emph{target} is @samp{Top}. Thus (in the split case):
19928
19929 @example
19930 @@xref@{Top,,, xemacs, XEmacs User's Manual@}.
19931 @result{} <a href="xemacs/index.html#Top">
19932 @end example
19933
19934 @enumerate
19935 @item
19936 The standard ASCII letters (a-z and A-Z) are not modified. All other
19937 characters may be changed as specified below.
19938
19939 @item
19940 The standard ASCII numbers (0-9) are not modified except when a number
19941 is the first character of the node name. In that case, see below.
19942
19943 @item
19944 Multiple consecutive space, tab and newline characters are transformed
19945 into just one space. (It's not possible to have newlines in node
19946 names with the current implementation, but we specify it anyway, just
19947 in case.)
19948
19949 @item
19950 Leading and trailing spaces are removed.
19951
19952 @item
19953 After the above has been applied, each remaining space character is
19954 converted into a @samp{-} character.
19955
19956 @item
19957 Other ASCII 7-bit characters are transformed into @samp{_00@var{xx}},
19958 where @var{xx} is the ASCII character code in (lowercase) hexadecimal.
19959 This includes @samp{_}, which is mapped to @samp{_005f}.
19960
19961 @item
19962 If the node name does not begin with a letter, the literal string
19963 @samp{g_t} is prefixed to the result. (Due to the rules above, that
19964 string can never occur otherwise; it is an arbitrary choice, standing
19965 for ``GNU Texinfo''.) This is necessary because XHTML requires that
19966 identifiers begin with a letter.
19967
19968 @end enumerate
19969
19970 For example:
19971
19972 @example
19973 @@node A node --- with _'%
19974 @result{} A-node-_002d_002d_002d-with-_005f_0027_0025
19975 @end example
19976
19977 Notice in particular:
19978
19979 @itemize @bullet
19980 @item @samp{_} @result{} @samp{_005f}
19981 @item @samp{-} @result{} @samp{_002d}
19982 @item @samp{A node} @result{} @samp{A-node}
19983 @end itemize
19984
19985 On case-folding computer systems, nodes differing only by case will be
19986 mapped to the same file. In particular, as mentioned above, Top
19987 always maps to the file @file{index.html}. Thus, on a case-folding
19988 system, Top and a node named `Index' will both be written to
19989 @file{index.html}. Fortunately, the targets serve to distinguish
19990 these cases, since HTML target names are always case-sensitive,
19991 independent of operating system.
19992
19993
19994 @node HTML Xref Command Expansion
19995 @subsection HTML Cross Reference Command Expansion
19996 @cindex HTML cross reference command expansion
19997
19998 Node names may contain @@-commands (@pxref{Node Line Requirements}).
19999 This section describes how they are handled.
20000
20001 First, comments are removed.
20002
20003 Next, any @code{@@value} commands (@pxref{@t{@@set @@value}}) and
20004 macro invocations (@pxref{Invoking Macros}) are fully expanded.
20005
20006 Then, for the following commands, the command name and braces are removed,
20007 and the text of the argument is recursively transformed:
20008
20009 @example
20010 @@asis @@b @@cite @@code @@command @@dfn @@dmn @@dotless
20011 @@emph @@env @@file @@i @@indicateurl @@kbd @@key
20012 @@samp @@sansserif @@sc @@slanted @@strong @@t @@var @@verb @@w
20013 @end example
20014
20015 @noindent For @code{@@sc}, any letters are capitalized.
20016
20017 In addition, the following commands are replaced by constant text, as
20018 shown below. If any of these commands have non-empty arguments, as in
20019 @code{@@TeX@{bad@}}, it is an error, and the result is unspecified.
20020 In this table, `(space)' means a space character and `(nothing)' means
20021 the empty string. The notation `U+@var{hhhh}' means Unicode code
20022 point @var{hhhh} (in hex, as usual). There are further
20023 transformations of many of these expansions for the final file or
20024 target name, such as space characters to @samp{-}, etc., according to
20025 the other rules.
20026
20027 @multitable @columnfractions .3 .5
20028 @item @code{@@(newline)} @tab (space)
20029 @item @code{@@(space)} @tab (space)
20030 @item @code{@@(tab)} @tab (space)
20031 @item @code{@@!} @tab @samp{!}
20032 @item @code{@@*} @tab (space)
20033 @item @code{@@-} @tab (nothing)
20034 @item @code{@@.} @tab @samp{.}
20035 @item @code{@@:} @tab (nothing)
20036 @item @code{@@?} @tab @samp{?}
20037 @item @code{@@@@} @tab @samp{@@}
20038 @item @code{@@@{} @tab @samp{@{}
20039 @item @code{@@@}} @tab @samp{@}}
20040 @item @code{@@LaTeX} @tab @samp{LaTeX}
20041 @item @code{@@TeX} @tab @samp{TeX}
20042 @item @code{@@arrow} @tab U+2192
20043 @item @code{@@bullet} @tab U+2022
20044 @item @code{@@comma} @tab @samp{,}
20045 @item @code{@@copyright} @tab U+00A9
20046 @item @code{@@dots} @tab U+2026
20047 @item @code{@@enddots} @tab @samp{...}
20048 @item @code{@@equiv} @tab U+2261
20049 @item @code{@@error} @tab @samp{error-->}
20050 @item @code{@@euro} @tab U+20AC
20051 @item @code{@@exclamdown} @tab U+00A1
20052 @item @code{@@expansion} @tab U+21A6
20053 @item @code{@@geq} @tab U+2265
20054 @item @code{@@leq} @tab U+2264
20055 @item @code{@@minus} @tab U+2212
20056 @item @code{@@ordf} @tab U+00AA
20057 @item @code{@@ordm} @tab U+00BA
20058 @item @code{@@point} @tab U+2605
20059 @item @code{@@pounds} @tab U+00A3
20060 @item @code{@@print} @tab U+22A3
20061 @item @code{@@questiondown} @tab U+00BF
20062 @item @code{@@registeredsymbol} @tab U+00AE
20063 @item @code{@@result} @tab U+21D2
20064 @item @code{@@textdegree} @tab U+00B0
20065 @item @code{@@tie} @tab (space)
20066 @end multitable
20067
20068 Quotation mark @@-commands (@code{@@quotedblright@{@}} and the like),
20069 are likewise replaced by their Unicode values. Normal quotation
20070 @emph{characters} (e.g., ASCII ` and ') are not altered.
20071 @xref{Inserting Quotation Marks}.
20072
20073 Any @code{@@acronym}, @code{@@abbr}, @code{@@email}, and
20074 @code{@@image} commands are replaced by their first argument. (For
20075 these commands, all subsequent arguments are optional, and ignored
20076 here.) @xref{@t{@@acronym}}, and @ref{@t{@@email}}, and @ref{Images}.
20077
20078 Any other command is an error, and the result is unspecified.
20079
20080
20081 @node HTML Xref 8-bit Character Expansion
20082 @subsection HTML Cross Reference 8-bit Character Expansion
20083 @cindex HTML cross reference 8-bit character expansion
20084 @cindex 8-bit characters, in HTML cross references
20085 @cindex Expansion of 8-bit characters in HTML cross references
20086 @cindex Transliteration of 8-bit characters in HTML cross references
20087
20088 Usually, characters other than plain 7-bit ASCII are transformed into
20089 the corresponding Unicode code point(s) in Normalization Form@tie{}C,
20090 which uses precomposed characters where available. (This is the
20091 normalization form recommended by the W3C and other bodies.) This
20092 holds when that code point is @code{0xffff} or less, as it almost
20093 always is.
20094
20095 These will then be further transformed by the rules above into the
20096 string @samp{_@var{hhhh}}, where @var{hhhh} is the code point in hex.
20097
20098 For example, combining this rule and the previous section:
20099
20100 @example
20101 @@node @@b@{A@} @@TeX@{@} @@u@{B@} @@point@{@}@@enddots@{@}
20102 @result{} A-TeX-B_0306-_2605_002e_002e_002e
20103 @end example
20104
20105 Notice: 1)@tie{}@code{@@enddots} expands to three periods which in
20106 turn expands to three @samp{_002e}'s; 2)@tie{}@code{@@u@{B@}} is a `B'
20107 with a breve accent, which does not exist as a pre-accented Unicode
20108 character, therefore expands to @samp{B_0306} (B with combining
20109 breve).
20110
20111 When the Unicode code point is above @code{0xffff}, the transformation
20112 is @samp{__@var{xxxxxx}}, that is, two leading underscores followed by
20113 six hex digits. Since Unicode has declared that their highest code
20114 point is @code{0x10ffff}, this is sufficient. (We felt it was better
20115 to define this extra escape than to always use six hex digits, since
20116 the first two would nearly always be zeros.)
20117
20118 This method works fine if the node name consists mostly of ASCII
20119 characters and contains only few 8-bit ones. If the document is
20120 written in a language whose script is not based on the Latin alphabet
20121 (for example, Ukrainian), it will create file names consisting
20122 entirely of @samp{_@var{xxxx}} notations, which is inconvenient and
20123 all but unreadable.
20124
20125 To handle such cases, @command{makeinfo} offers the
20126 @option{--transliterate-file-names} command line option. This option
20127 enables @dfn{transliteration} of node names into ASCII characters for
20128 the purposes of file name creation and referencing. The
20129 transliteration is based on phonetic principles, which makes the
20130 generated file names more easily understanable.
20131
20132 @cindex Normalization Form C, Unicode
20133 For the definition of Unicode Normalization Form@tie{}C, see Unicode
20134 report UAX#15, @uref{http://www.unicode.org/reports/tr15/}. Many
20135 related documents and implementations are available elsewhere on the
20136 web.
20137
20138
20139 @node HTML Xref Mismatch
20140 @subsection HTML Cross Reference Mismatch
20141 @cindex HTML cross reference mismatch
20142 @cindex Mismatched HTML cross reference source and target
20143
20144 As mentioned earlier (@pxref{HTML Xref Link Basics}), the generating
20145 software may need to guess whether a given manual being cross
20146 referenced is available in split or monolithic form---and, inevitably,
20147 it might guess wrong. However, when the @emph{referent} manual is
20148 generated, it is possible to handle at least some mismatches.
20149
20150 In the case where we assume the referent is split, but it is actually
20151 available in mono, the only recourse would be to generate a
20152 @file{manual/} subdirectory full of HTML files which redirect back to
20153 the monolithic @file{manual.html}. Since this is essentially the same
20154 as a split manual in the first place, it's not very appealing.
20155
20156 On the other hand, in the case where we assume the referent is mono,
20157 but it is actually available in split, it is possible to use
20158 JavaScript to redirect from the putatively monolithic
20159 @file{manual.html} to the different @file{manual/node.html} files.
20160 Here's an example:
20161
20162 @example
20163 function redirect() @{
20164 switch (location.hash) @{
20165 case "#Node1":
20166 location.replace("manual/Node1.html#Node1"); break;
20167 case "#Node2" :
20168 location.replace("manual/Node2.html#Node2"); break;
20169 @dots{}
20170 default:;
20171 @}
20172 @}
20173 @end example
20174
20175 Then, in the @code{<body>} tag of @file{manual.html}:
20176
20177 @example
20178 <body onLoad="redirect();">
20179 @end example
20180
20181 Once again, this is something the software which generated the
20182 @emph{referent} manual has to do in advance, it's not something the
20183 software generating the cross reference in the present manual can
20184 control.
20185
20186
20187 @node HTML Xref Configuration
20188 @subsection HTML Cross Reference Configuration: @file{htmlxref.cnf}
20189
20190 @pindex htmlxref.cnf
20191 @cindex HTML cross reference configuration
20192 @cindex Cross reference configuration, for HTML
20193 @cindex Configuration, for HTML cross-manual references
20194
20195 @command{makeinfo} reads a file named @file{htmlxref.cnf} to gather
20196 information for cross references to other manuals in HTML output. It
20197 is looked for in the following directories:
20198
20199 @table @file
20200 @item ./
20201 (the current directory)
20202
20203 @item ./.texinfo/
20204 (under the current directory)
20205
20206 @item ~/.texinfo/
20207 (where @code{~} is the current user's home directory)
20208
20209 @item @var{sysconfdir}/texinfo/
20210 (where @var{sysconfdir} is the system configuration directory
20211 specified at compile-time, e.g., @file{/usr/local/etc})
20212
20213 @item @var{datadir}/texinfo/
20214 (likewise specified at compile time, e.g., @file{/usr/local/share})
20215 @end table
20216
20217 All files found are used, with earlier entries overriding later ones.
20218 The Texinfo distribution includes a default file which handles many
20219 GNU manuals; it is installed in the last of the above directories,
20220 i.e., @file{@var{datadir}/texinfo/htmlxref.cnf}.
20221
20222 The file is line-oriented. Lines consisting only of whitespace are
20223 ignored. Comments are indicated with a @samp{#} at the beginning of a
20224 line, optionally preceded by whitespace. Since @samp{#} can occur in
20225 urls (like almost any character), it does not otherwise start a
20226 comment.
20227
20228 Each non-blank non-comment line must be either a @dfn{variable
20229 assignment} or @dfn{manual information}.
20230
20231 A variable assignment line looks like this:
20232
20233 @example
20234 @var{varname} = @var{varvalue}
20235 @end example
20236
20237 Whitespace around the @samp{=} is optional and ignored. The
20238 @var{varname} should consist of letters; case is significant. The
20239 @var{varvalue} is an arbitrary string, continuing to the end of the
20240 line. Variables are then referenced with @samp{$@{@var{varname}@}};
20241 variable references can occur in the @var{varvalue}.
20242
20243 A manual information line looks like this:
20244
20245 @example
20246 @var{manual} @var{keyword} @var{urlprefix}
20247 @end example
20248
20249 @noindent
20250 with @var{manual} the short identifier for a manual, @var{keyword}
20251 being one of: @code{mono}, @code{node}, @code{section},
20252 @code{chapter}, and @var{urlprefix} described below. Variable
20253 references can occur only in the @var{urlprefix}. For example (used
20254 in the canonical @file{htmlxref.cnf}):
20255
20256 @smallexample
20257 G = http://www.gnu.org
20258 GS = $@{G@}/software
20259 hello mono $@{GS@}/hello/manual/hello.html
20260 hello chapter $@{GS@}/hello/manual/html_chapter/
20261 hello section $@{GS@}/hello/manual/html_section/
20262 hello node $@{GS@}/hello/manual/html_node/
20263 @end smallexample
20264
20265 @cindex monolithic manuals, for HTML cross references
20266 If the keyword is @code{mono}, @var{urlprefix} gives the host,
20267 directory, and file name for @var{manual} as one monolithic file.
20268
20269 @cindex split manuals, for HTML cross references
20270 If the keyword is @code{node}, @code{section}, or @code{chapter},
20271 @var{urlprefix} gives the host and directory for @var{manual} split
20272 into nodes, sections, or chapters, respectively.
20273
20274 When available, @command{makeinfo} will use the ``corresponding''
20275 value for cross references between manuals. That is, when generating
20276 monolithic output (@option{--no-split}), the @code{mono} url will be
20277 used, when generating output that is split by node, the @code{node}
20278 url will be used, etc. However, if a manual is not available in that
20279 form, anything that is available can be used. Here is the search
20280 order for each style:
20281
20282 @smallexample
20283 node @result{} node, section, chapter, mono
20284 section @result{} section, chapter, node, mono
20285 chapter @result{} chapter, section, node, mono
20286 mono @result{} mono, chapter, section, node
20287 @end smallexample
20288
20289 @opindex --node-files@r{, and HTML cross references}
20290 These section- and chapter-level cross-manual references can succeed
20291 only when the target manual was created using @option{--node-files};
20292 this is the default for split output.
20293
20294 If you have additions or corrections to the @file{htmlxref.cnf}
20295 distributed with Texinfo, please email @email{bug-texinfo@@gnu.org} as
20296 usual. You can get the latest version from
20297 @url{http://ftpmirror.gnu.org/@/texinfo/@/htmlxref.cnf}.
20298
20299
20300 @node HTML Xref Link Preservation
20301 @subsection HTML Cross Reference Link Preservation: @var{manual}@file{-noderename.cnf}
20302
20303 @pindex noderename.cnf
20304 @pindex @var{manual}-noderename.cnf
20305 @cindex HTML cross reference link preservation
20306 @cindex Preserving HTML links to old nodes
20307 @cindex Old nodes, preserving links to
20308 @cindex Renaming nodes, and preserving links
20309 @cindex Links, preserving to renamed nodes
20310 @cindex Node renaming, and preserving links
20311
20312 Occasionally changes in a program require removing (or renaming) nodes
20313 in the manual in order to have the best documentation. Given the
20314 nature of the web, however, links may exist anywhere to such a removed
20315 node (renaming appears the same as removal for this purpose), and it's
20316 not ideal for those links to simply break.
20317
20318 @vindex RENAMED_NODES_FILE
20319 Therefore, Texinfo provides a way for manual authors to specify old
20320 node names and the new nodes to which the old names should be
20321 redirected, via the file @var{manual}@file{-noderename.cnf}, where
20322 @var{manual} is the base name of the manual. For example, the manual
20323 @file{texinfo.texi} would be supplemented by a file
20324 @file{texinfo-noderename}.cnf. (This name can be overridden by
20325 setting the @file{RENAMED_NODES_FILE} customization variable;
20326 @pxref{Customization Variables}).
20327
20328 The file is read in pairs of lines, as follows:
20329
20330 @example
20331 @var{old-node-name}
20332 @@@@@{@} @var{new-node-name}
20333 @end example
20334
20335 The usual conversion from Texinfo node names to HTML names is applied;
20336 see this entire section for details (@pxref{HTML Xref}). The unusual
20337 @samp{@@@@@{@}} separator is used because it is not a valid Texinfo
20338 construct, so can't appear in the node names.
20339
20340 The effect is that @command{makeinfo} generates a redirect from
20341 @var{old-node-name} to @var{new-node-name} when producing HTML output.
20342 Thus, external links to the old node are preserved.
20343
20344 Lines consisting only of whitespace are ignored. Comments are
20345 indicated with an @samp{@@c} at the beginning of a line, optionally
20346 preceded by whitespace.
20347
20348 Another approach to preserving links to deleted or renamed nodes is to
20349 use anchors (@pxref{@t{@@anchor}}). There is no effective
20350 difference between the two approaches.
20351
20352
20353 @node Command List
20354 @appendix @@-Command List
20355 @cindex Alphabetical @@-command list
20356 @cindex List of @@-commands
20357 @cindex @@-command list
20358 @cindex Reference to @@-commands
20359
20360 Here is an alphabetical list of the @@-commands in Texinfo. Square
20361 brackets, @t{[}@w{ }@t{]}, indicate optional arguments; an ellipsis,
20362 @samp{@dots{}}, indicates repeated text.
20363
20364 More specifics on the general syntax of different @@-commands are
20365 given in the section below.
20366
20367 @menu
20368 * Command Syntax:: General syntax for varieties of @@-commands.
20369 * Command Contexts:: Guidelines for which commands can be used where.
20370 @end menu
20371
20372 @sp 1
20373 @table @code
20374 @item @@@var{whitespace}
20375 An @code{@@} followed by a space, tab, or newline produces a normal,
20376 stretchable, interword space. @xref{Multiple Spaces}.
20377
20378 @item @@!
20379 Produce an exclamation point that ends a sentence (usually after an
20380 end-of-sentence capital letter). @xref{Ending a Sentence}.
20381
20382 @item @@"
20383 @itemx @@'
20384 Generate an umlaut or acute accent, respectively, over the next
20385 character, as in @"o and @'o. @xref{Inserting Accents}.
20386
20387 @item @@*
20388 Force a line break. @xref{Line Breaks}.
20389
20390 @item @@,@{@var{c}@}
20391 Generate a cedilla accent under @var{c}, as in @,{c}. @xref{Inserting
20392 Accents}.
20393
20394 @item @@-
20395 Insert a discretionary hyphenation point. @xref{@t{@@- @@hyphenation}}.
20396
20397 @item @@.
20398 Produce a period that ends a sentence (usually after an
20399 end-of-sentence capital letter). @xref{Ending a Sentence}.
20400
20401 @item @@/
20402 Produces no output, but allows a line break. @xref{Line Breaks}.
20403
20404 @item @@:
20405 Tell @TeX{} to refrain from inserting extra whitespace after an
20406 immediately preceding period, question mark, exclamation mark, or
20407 colon, as @TeX{} normally would. @xref{Not Ending a Sentence}.
20408
20409 @item @@=
20410 Generate a macron (bar) accent over the next character, as in @=o.
20411 @xref{Inserting Accents}.
20412
20413 @item @@?
20414 Produce a question mark that ends a sentence (usually after an
20415 end-of-sentence capital letter). @xref{Ending a Sentence}.
20416
20417 @item @@@@
20418 @itemx @@atchar@{@}
20419 Insert an at sign, @samp{@@}. @xref{Inserting an Atsign}.
20420
20421 @item @@\
20422 @itemx @@backslashchar@{@}
20423 Insert a backslash, @samp{\}; @code{@@backslashchar@{@}} works
20424 anywhere, while @code{@@\} works only inside @code{@@math}.
20425 @xref{Inserting a Backslash}, and @ref{Inserting Math}.
20426
20427 @item @@^
20428 @itemx @@`
20429 Generate a circumflex (hat) or grave accent, respectively, over the next
20430 character, as in @^o and @`e.
20431 @xref{Inserting Accents}.
20432
20433 @item @@@{
20434 @itemx @@lbracechar@{@}
20435 Insert a left brace, @samp{@{}. @xref{Inserting Braces}.
20436
20437 @item @@@}
20438 @itemx @@rbracechar@{@}
20439 Insert a right brace, @samp{@}}. @xref{Inserting Braces}.
20440
20441 @item @@~
20442 Generate a tilde accent over the next character, as in @~N.
20443 @xref{Inserting Accents}.
20444
20445 @item @@AA@{@}
20446 @itemx @@aa@{@}
20447 Generate the uppercase and lowercase Scandinavian A-ring letters,
20448 respectively: @AA{}, @aa{}. @xref{Inserting Accents}.
20449
20450 @item @@abbr@{@var{abbreviation}@}
20451 Indicate a general abbreviation, such as `Comput.'.
20452 @xref{@t{@@abbr}}.
20453
20454 @item @@acronym@{@var{acronym}@}
20455 Indicate an acronym in all capital letters, such as `NASA'.
20456 @xref{@t{@@acronym}}.
20457
20458 @item @@AE@{@}
20459 @itemx @@ae@{@}
20460 Generate the uppercase and lowercase AE ligatures, respectively:
20461 @AE{}, @ae{}. @xref{Inserting Accents}.
20462
20463 @item @@afivepaper
20464 Change page dimensions for the A5 paper size. @xref{A4 Paper}.
20465
20466 @item @@afourlatex
20467 @itemx @@afourpaper
20468 @itemx @@afourwide
20469 Change page dimensions for the A4 paper size. @xref{A4 Paper}.
20470
20471 @item @@alias @var{new}=@var{existing}
20472 Make the command @samp{@@@var{new}} a synonym for the existing command
20473 @samp{@@@var{existing}}. @xref{@t{@@alias}}.
20474
20475 @item @@allowcodebreaks @var{true-false}
20476 Control breaking at @samp{-} and @samp{_} in @TeX{}.
20477 @xref{@t{@@allowcodebreaks}}.
20478
20479 @item @@anchor@{@var{name}@}
20480 Define @var{name} as the current location for use as a cross reference
20481 target. @xref{@t{@@anchor}}.
20482
20483 @item @@appendix @var{title}
20484 Begin an appendix. The title appears in the table of contents. In
20485 Info, the title is underlined with asterisks.
20486 @xref{@t{@@unnumbered @@appendix}}.
20487
20488 @item @@appendixsec @var{title}
20489 @itemx @@appendixsection @var{title}
20490 Begin an appendix section within an appendix. The section title
20491 appears in the table of contents. In Info, the title is underlined
20492 with equal signs. @code{@@appendixsection} is a longer spelling of
20493 the @code{@@appendixsec} command. @xref{@t{@@unnumberedsec
20494 @@appendixsec @@heading}}.
20495
20496 @item @@appendixsubsec @var{title}
20497 Begin an appendix subsection. The title appears in the table of
20498 contents. In Info, the title is underlined with hyphens.
20499 @xref{@t{@@unnumberedsubsec @@appendixsubsec @@subheading}}.
20500
20501 @item @@appendixsubsubsec @var{title}
20502 Begin an appendix subsubsection. The title appears in the table of
20503 contents. In Info, the title is underlined with periods.
20504 @xref{@t{@@subsubsection}}.
20505
20506 @item @@arrow@{@}
20507 Generate a right arrow glyph: @samp{@arrow{}}. Used by default
20508 for @code{@@click}. @xref{Click Sequences}.
20509
20510 @item @@asis
20511 Used following @code{@@table}, @code{@@ftable}, and @code{@@vtable} to
20512 print the table's first column without highlighting (``as is'').
20513 @xref{@t{@@asis}}.
20514
20515 @item @@author @var{author}
20516 Typeset @var{author} flushleft and underline it. @xref{@t{@@title
20517 @@subtitle @@author}}.
20518
20519 @item @@b@{@var{text}@}
20520 Set @var{text} in a @b{bold} font. No effect in Info. @xref{Fonts}.
20521
20522 @item @@bullet@{@}
20523 Generate a large round dot, @bullet{} (@samp{*} in Info). Often used
20524 with @code{@@table}. @xref{@t{@@bullet}}.
20525
20526 @item @@bye
20527 Stop formatting a file. The formatters do not see anything in the
20528 input file following @code{@@bye}. @xref{Ending a File}.
20529
20530 @item @@c @var{comment}
20531 Begin a comment in Texinfo. The rest of the line does not appear in
20532 any output. A synonym for @code{@@comment}. @kbd{DEL} also
20533 starts a comment. @xref{Comments}.
20534
20535 @item @@caption
20536 Define the full caption for an @code{@@float}. @xref{@t{@@caption
20537 @@shortcaption}}.
20538
20539 @item @@cartouche
20540 Highlight an example or quotation by drawing a box with rounded
20541 corners around it. Pair with @code{@@end cartouche}. No effect in
20542 Info. @xref{@t{@@cartouche}}.
20543
20544 @item @@center @var{line-of-text}
20545 Center the line of text following the command.
20546 @xref{@t{@@titlefont @@center @@sp}}.
20547
20548 @item @@centerchap @var{line-of-text}
20549 Like @code{@@chapter}, but centers the chapter title. @xref{@t{@@chapter}}.
20550
20551 @item @@chapheading @var{title}
20552 Print an unnumbered chapter-like heading, but omit from the table of
20553 contents. In Info, the title is underlined with asterisks.
20554 @xref{@t{@@majorheading @@chapheading}}.
20555
20556 @item @@chapter @var{title}
20557 Begin a numbered chapter. The chapter title appears in the table of
20558 contents. In Info, the title is underlined with asterisks.
20559 @xref{@t{@@chapter}}.
20560
20561 @item @@cindex @var{entry}
20562 Add @var{entry} to the index of concepts. @xref{Index Entries, ,
20563 Defining the Entries of an Index}.
20564
20565 @item @@cite@{@var{reference}@}
20566 Highlight the name of a book or other reference that has no companion
20567 Info file. @xref{@t{@@cite}}.
20568
20569 @item @@clear @var{flag}
20570 Unset @var{flag}, preventing the Texinfo formatting commands from
20571 formatting text between subsequent pairs of @code{@@ifset @var{flag}}
20572 and @code{@@end ifset} commands, and preventing
20573 @code{@@value@{@var{flag}@}} from expanding to the value to which
20574 @var{flag} is set. @xref{@t{@@set @@clear @@value}}.
20575
20576 @item @@click@{@}
20577 Represent a single ``click'' in a GUI@. Used within
20578 @code{@@clicksequence}. @xref{Click Sequences}.
20579
20580 @item @@clicksequence@{@var{action} @@click@{@} @var{action}@}
20581 Represent a sequence of clicks in a GUI@. @xref{Click Sequences}.
20582
20583 @item @@clickstyle @@@var{cmd}
20584 Execute @@@var{cmd} for each @code{@@click}; the default is
20585 @code{@@arrow}. The usual following empty braces on @@@var{cmd} are
20586 omitted. @xref{Click Sequences}.
20587
20588 @item @@code@{@var{sample-code}@}
20589 Indicate an expression, a syntactically complete token of a program,
20590 or a program name. Unquoted in Info output. @xref{@t{@@code}}.
20591
20592 @item @@codequotebacktick @var{on-off}
20593 @itemx @@codequoteundirected @var{on-off}
20594 Control output of @code{`} and @code{'} in code examples.
20595 @xref{Inserting Quote Characters}.
20596
20597 @item @@comma@{@}
20598 Insert a comma `,' character; only needed when a literal comma would
20599 be taken as an argument separator. @xref{Inserting a Comma}.
20600
20601 @item @@command@{@var{command-name}@}
20602 Indicate a command name, such as @command{ls}. @xref{@t{@@command}}.
20603
20604 @item @@comment @var{comment}
20605 Begin a comment in Texinfo. The rest of the line does not appear in
20606 any output. A synonym for @code{@@c}.
20607 @xref{Comments}.
20608
20609 @item @@contents
20610 Print a complete table of contents. Has no effect in Info, which uses
20611 menus instead. @xref{Contents, , Generating a Table of Contents}.
20612
20613 @item @@copying
20614 Specify copyright holders and copying conditions for the document Pair
20615 with @code{@@end cartouche}. @xref{@t{@@copying}}.
20616
20617 @item @@copyright@{@}
20618 Generate the copyright symbol @copyright{}.
20619 @xref{@t{@@copyright}}.
20620
20621 @item @@defcodeindex @var{index-name}
20622 Define a new index and its indexing command. Print entries in an
20623 @code{@@code} font. @xref{New Indices, , Defining New Indices}.
20624
20625 @item @@defcv @var{category} @var{class} @var{name}
20626 @itemx @@defcvx @var{category} @var{class} @var{name}
20627 Format a description for a variable associated with a class in
20628 object-oriented programming. Takes three arguments: the category of
20629 thing being defined, the class to which it belongs, and its name.
20630 @xref{Definition Commands}.
20631
20632 @item @@deffn @var{category} @var{name} @var{arguments}@dots{}
20633 @itemx @@deffnx @var{category} @var{name} @var{arguments}@dots{}
20634 Format a description for a function, interactive command, or similar
20635 entity that may take arguments. @code{@@deffn} takes as arguments the
20636 category of entity being described, the name of this particular
20637 entity, and its arguments, if any. @xref{Definition Commands}.
20638
20639 @item @@defindex @var{index-name}
20640 Define a new index and its indexing command. Print entries in a roman
20641 font. @xref{New Indices, , Defining New Indices}.
20642
20643 @item @@definfoenclose @var{newcmd}, @var{before}, @var{after}
20644 Must be used within @code{@@ifinfo}; create a new command
20645 @code{@@@var{newcmd}} for Info that marks text by enclosing it in
20646 strings that precede and follow the text.
20647 @xref{@t{@@definfoenclose}}.
20648
20649 @item @@defivar @var{class} @var{instance-variable-name}
20650 @itemx @@defivarx @var{class} @var{instance-variable-name}
20651 Format a description for an instance variable in object-oriented
20652 programming. The command is equivalent to @samp{@@defcv @{Instance
20653 Variable@} @dots{}}. @xref{Definition Commands}.
20654
20655 @item @@defmac @var{macroname} @var{arguments}@dots{}
20656 @itemx @@defmacx @var{macroname} @var{arguments}@dots{}
20657 Format a description for a macro; equivalent to @samp{@@deffn Macro
20658 @dots{}}. @xref{Definition Commands}.
20659
20660 @item @@defmethod @var{class} @var{method-name} @var{arguments}@dots{}
20661 @itemx @@defmethodx @var{class} @var{method-name} @var{arguments}@dots{}
20662 Format a description for a method in object-oriented programming;
20663 equivalent to @samp{@@defop Method @dots{}}. @xref{Definition
20664 Commands}.
20665
20666 @item @@defop @var{category} @var{class} @var{name} @var{arguments}@dots{}
20667 @itemx @@defopx @var{category} @var{class} @var{name} @var{arguments}@dots{}
20668 Format a description for an operation in object-oriented programming.
20669 @code{@@defop} takes as arguments the name of the category of
20670 operation, the name of the operation's class, the name of the
20671 operation, and its arguments, if any. @xref{Definition Commands}, and
20672 @ref{Abstract Objects}.
20673
20674 @item @@defopt @var{option-name}
20675 @itemx @@defoptx @var{option-name}
20676 Format a description for a user option; equivalent to @samp{@@defvr
20677 @{User Option@} @dots{}}. @xref{Definition Commands}.
20678
20679 @item @@defspec @var{special-form-name} @var{arguments}@dots{}
20680 @itemx @@defspecx @var{special-form-name} @var{arguments}@dots{}
20681 Format a description for a special form; equivalent to @samp{@@deffn
20682 @{Special Form@} @dots{}}. @xref{Definition Commands}.
20683
20684 @item @@deftp @var{category} @var{name-of-type} @var{attributes}@dots{}
20685 @itemx @@deftpx @var{category} @var{name-of-type} @var{attributes}@dots{}
20686 Format a description for a data type; its arguments are the category,
20687 the name of the type (e.g., @samp{int}) , and then the names of
20688 attributes of objects of that type. @xref{Definition Commands}, and
20689 @ref{Data Types}.
20690
20691 @item @@deftypecv @var{category} @var{class} @var{data-type} @var{name}
20692 @itemx @@deftypecvx @var{category} @var{class} @var{data-type} @var{name}
20693 Format a description for a typed class variable in object-oriented programming.
20694 @xref{Definition Commands}, and @ref{Abstract Objects}.
20695
20696 @item @@deftypefn @var{category} @var{data-type} @var{name} @var{arguments}@dots{}
20697 @itemx @@deftypefnx @var{category} @var{data-type} @var{name} @var{arguments}@dots{}
20698 Format a description for a function or similar entity that may take
20699 arguments and that is typed. @code{@@deftypefn} takes as arguments the
20700 category of entity being described, the type, the name of the
20701 entity, and its arguments, if any. @xref{Definition Commands}.
20702
20703 @item @@deftypefnnewline @var{on-off}
20704 Specifies whether return types for @code{@@deftypefn} and similar are
20705 printed on lines by themselves; default is off. @xref{Typed
20706 Functions,, Functions in Typed Languages}.
20707
20708 @item @@deftypefun @var{data-type} @var{function-name} @var{arguments}@dots{}
20709 @itemx @@deftypefunx @var{data-type} @var{function-name} @var{arguments}@dots{}
20710 Format a description for a function in a typed language.
20711 The command is equivalent to @samp{@@deftypefn Function @dots{}}.
20712 @xref{Definition Commands}.
20713
20714 @item @@deftypeivar @var{class} @var{data-type} @var{variable-name}
20715 @itemx @@deftypeivarx @var{class} @var{data-type} @var{variable-name}
20716 Format a description for a typed instance variable in object-oriented
20717 programming. @xref{Definition Commands}, and @ref{Abstract Objects}.
20718
20719 @item @@deftypemethod @var{class} @var{data-type} @var{method-name} @var{arguments}@dots{}
20720 @itemx @@deftypemethodx @var{class} @var{data-type} @var{method-name} @var{arguments}@dots{}
20721 Format a description for a typed method in object-oriented programming.
20722 @xref{Definition Commands}.
20723
20724 @item @@deftypeop @var{category} @var{class} @var{data-type} @var{name} @var{arguments}@dots{}
20725 @itemx @@deftypeopx @var{category} @var{class} @var{data-type} @var{name} @var{arguments}@dots{}
20726 Format a description for a typed operation in object-oriented programming.
20727 @xref{Definition Commands}, and @ref{Abstract Objects}.
20728
20729 @item @@deftypevar @var{data-type} @var{variable-name}
20730 @itemx @@deftypevarx @var{data-type} @var{variable-name}
20731 Format a description for a variable in a typed language. The command is
20732 equivalent to @samp{@@deftypevr Variable @dots{}}. @xref{Definition
20733 Commands}.
20734
20735 @item @@deftypevr @var{category} @var{data-type} @var{name}
20736 @itemx @@deftypevrx @var{category} @var{data-type} @var{name}
20737 Format a description for something like a variable in a typed
20738 language---an entity that records a value. Takes as arguments the
20739 category of entity being described, the type, and the name of the
20740 entity. @xref{Definition Commands}.
20741
20742 @item @@defun @var{function-name} @var{arguments}@dots{}
20743 @itemx @@defunx @var{function-name} @var{arguments}@dots{}
20744 Format a description for a function; equivalent to
20745 @samp{@@deffn Function @dots{}}. @xref{Definition Commands}.
20746
20747 @item @@defvar @var{variable-name}
20748 @itemx @@defvarx @var{variable-name}
20749 Format a description for a variable; equivalent to @samp{@@defvr
20750 Variable @dots{}}. @xref{Definition Commands}.
20751
20752 @item @@defvr @var{category} @var{name}
20753 @itemx @@defvrx @var{category} @var{name}
20754 Format a description for any kind of variable. @code{@@defvr} takes
20755 as arguments the category of the entity and the name of the entity.
20756 @xref{Definition Commands}.
20757
20758 @item @@detailmenu
20759 Mark the (optional) detailed node listing in a master menu.
20760 @xref{Master Menu Parts}.
20761
20762 @item @@dfn@{@var{term}@}
20763 Indicate the introductory or defining use of a term. @xref{@t{@@dfn}}.
20764
20765 @item @@DH@{@}
20766 @itemx @@dh@{@}
20767 Generate the uppercase and lowercase Icelandic letter eth, respectively:
20768 @DH{}, @dh{}. @xref{Inserting Accents}.
20769
20770 @item @@dircategory @var{dirpart}
20771 Specify a part of the Info directory menu where this file's entry should
20772 go. @xref{Installing Dir Entries}.
20773
20774 @item @@direntry
20775 Begin the Info directory menu entry for this file. Pair with
20776 @code{@@end direntry}. @xref{Installing Dir Entries}.
20777
20778 @item @@display
20779 Begin a kind of example. Like @code{@@example} (indent text, do not
20780 fill), but do not select a new font. Pair with @code{@@end display}.
20781 @xref{@t{@@display}}.
20782
20783 @item @@dmn@{@var{dimension}@}
20784 Format a unit of measure, as in 12@dmn{pt}. Causes @TeX{} to insert a
20785 thin space before @var{dimension}. No effect in Info.
20786 @xref{@t{@@dmn}}.
20787
20788 @item @@docbook
20789 Enter Docbook completely. Pair with @code{@@end docbook}. @xref{Raw
20790 Formatter Commands}.
20791
20792 @item @@documentdescription
20793 Set the document description text, included in the HTML output. Pair
20794 with @code{@@end documentdescription}. @xref{@t{@@documentdescription}}.
20795
20796 @item @@documentencoding @var{enc}
20797 Declare the input encoding to be @var{enc}.
20798 @xref{@t{@@documentencoding}}.
20799
20800 @item @@documentlanguage @var{CC}
20801 Declare the document language as the two-character ISO-639 abbreviation
20802 @var{CC}. @xref{@t{@@documentlanguage}}.
20803
20804 @item @@dotaccent@{@var{c}@}
20805 Generate a dot accent over the character @var{c}, as in @dotaccent{o}.
20806 @xref{Inserting Accents}.
20807
20808 @item @@dotless@{@var{i-or-j}@}
20809 Generate dotless i (`@dotless{i}') and dotless j (`@dotless{j}').
20810 @xref{Inserting Accents}.
20811
20812 @item @@dots@{@}
20813 Generate an ellipsis, @samp{@dots{}}.
20814 @xref{@t{@@dots}}.
20815
20816 @item @@email@{@var{address}[, @var{displayed-text}]@}
20817 Indicate an electronic mail address. @xref{@t{@@email}}.
20818
20819 @item @@emph@{@var{text}@}
20820 Emphasize @var{text}, by using @emph{italics} where possible, and
20821 enclosing in asterisks in Info. @xref{Emphasis, , Emphasizing Text}.
20822
20823 @item @@end @var{environment}
20824 Ends @var{environment}, as in @samp{@@end example}. @xref{Formatting
20825 Commands,,@@-commands}.
20826
20827 @item @@enddots@{@}
20828 Generate an end-of-sentence ellipsis, like this: @enddots{}
20829 @xref{@t{@@dots}}.
20830
20831 @item @@enumerate [@var{number-or-letter}]
20832 Begin a numbered list, using @code{@@item} for each entry.
20833 Optionally, start list with @var{number-or-letter}. Pair with
20834 @code{@@end enumerate}. @xref{@t{@@enumerate}}.
20835
20836 @item @@env@{@var{environment-variable}@}
20837 Indicate an environment variable name, such as @env{PATH}.
20838 @xref{@t{@@env}}.
20839
20840 @item @@equiv@{@}
20841 Indicate to the reader the exact equivalence of two forms with a
20842 glyph: @samp{@equiv{}}. @xref{@t{@@equiv}}.
20843
20844 @item @@error@{@}
20845 Indicate to the reader with a glyph that the following text is
20846 an error message: @samp{@error{}}. @xref{@t{@@error}}.
20847
20848 @item @@errormsg@{@var{msg}@}
20849 Report @var{msg} as an error to standard error, and exit unsuccessfully.
20850 Texinfo commands within @var{msg} are expanded to plain text.
20851 @xref{Conditionals}, and @ref{External Macro Processors}.
20852
20853 @item @@euro@{@}
20854 Generate the Euro currency sign. @xref{@t{@@euro}}.
20855
20856 @item @@evenfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
20857 @itemx @@evenheading [@var{left}] @@| [@var{center}] @@| [@var{right}]
20858 Specify page footings resp.@: headings for even-numbered (left-hand)
20859 pages. @xref{Custom Headings, ,
20860 How to Make Your Own Headings}.
20861
20862 @item @@everyfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
20863 @itemx @@everyheading [@var{left}] @@| [@var{center}] @@| [@var{right}]
20864 Specify page footings resp.@: headings for every page. Not relevant to
20865 Info. @xref{Custom Headings, , How to Make Your Own Headings}.
20866
20867 @item @@example
20868 Begin an example. Indent text, do not fill, and select fixed-width
20869 font. Pair with @code{@@end example}. @xref{@t{@@example}}.
20870
20871 @item @@exampleindent @var{indent}
20872 Indent example-like environments by @var{indent} number of spaces
20873 (perhaps 0). @xref{@t{@@exampleindent}}.
20874
20875 @item @@exclamdown@{@}
20876 Generate an upside-down exclamation point. @xref{Inserting Accents}.
20877
20878 @item @@exdent @var{line-of-text}
20879 Remove any indentation a line might have. @xref{@t{@@exdent}}.
20880
20881 @item @@expansion@{@}
20882 Indicate the result of a macro expansion to the reader with a special
20883 glyph: @samp{@expansion{}}. @xref{@t{@@expansion}}.
20884
20885 @item @@file@{@var{filename}@}
20886 Highlight the name of a file, buffer, node, directory, etc.
20887 @xref{@t{@@file}}.
20888
20889 @item @@finalout
20890 Prevent @TeX{} from printing large black warning rectangles beside
20891 over-wide lines. @xref{Overfull hboxes}.
20892
20893 @item @@findex @var{entry}
20894 Add @var{entry} to the index of functions. @xref{Index Entries, ,
20895 Defining the Entries of an Index}.
20896
20897 @item @@firstparagraphindent @var{word}
20898 Control indentation of the first paragraph after section headers
20899 according to @var{word}, one of `none' or `insert'.
20900 @xref{@t{@@firstparagraphindent}}.
20901
20902 @item @@float
20903 Environment to define floating material. Pair with @code{@@end float}.
20904 @xref{Floats}.
20905
20906 @item @@flushleft
20907 @itemx @@flushright
20908 Do not fill text; left (right) justify every line while leaving the
20909 right (left) end ragged. Leave font as is. Pair with @code{@@end
20910 flushleft} (@code{@@end flushright}). @xref{@t{@@flushleft
20911 @@flushright}}.
20912
20913 @item @@fonttextsize @var{10-11}
20914 Change the size of the main body font in the @TeX{} output.
20915 @xref{Fonts}.
20916
20917 @item @@footnote@{@var{text-of-footnote}@}
20918 Enter a footnote. Footnote text is printed at the bottom of the page
20919 by @TeX{}; Info may format in either `End' node or `Separate' node style.
20920 @xref{Footnotes}.
20921
20922 @item @@footnotestyle @var{style}
20923 Specify an Info file's footnote style, either @samp{end} for the end
20924 node style or @samp{separate} for the separate node style.
20925 @xref{Footnotes}.
20926
20927 @item @@format
20928 Begin a kind of example. Like @code{@@display}, but do not indent.
20929 Pair with @code{@@end format}. @xref{@t{@@example}}.
20930
20931 @item @@frenchspacing @var{on-off}
20932 Control spacing after punctuation. @xref{@t{@@frenchspacing}}.
20933
20934 @item @@ftable @var{formatting-command}
20935 Begin a two-column table, using @code{@@item} for each entry.
20936 Automatically enter each of the items in the first column into the
20937 index of functions. Pair with @code{@@end ftable}. The same as
20938 @code{@@table}, except for indexing. @xref{@t{@@ftable @@vtable}}.
20939
20940 @item @@geq@{@}
20941 Generate a greater-than-or-equal sign, `@geq{}'. @xref{@t{@@geq @@leq}}.
20942
20943 @item @@group
20944 Disallow page breaks within following text. Pair with @code{@@end
20945 group}. Ignored in Info. @xref{@t{@@group}}.
20946
20947 @item @@guillemetleft@{@}
20948 @itemx @@guillemetright@{@}
20949 @item @@guillemotleft@{@}
20950 @itemx @@guillemotright@{@}
20951 @itemx @@guilsinglleft@{@}
20952 @itemx @@guilsinglright@{@}
20953 Double and single angle quotation marks: @guillemetleft{}
20954 @guillemetright{} @guilsinglleft{} @guilsinglright{}.
20955 @code{@@guillemotleft} and @code{@@guillemotright} are synonyms for
20956 @code{@@guillemetleft} and @code{@@guillemetright}. @xref{Inserting
20957 Quotation Marks}.
20958
20959 @item @@H@{@var{c}@}
20960 Generate the long Hungarian umlaut accent over @var{c}, as in @H{o}.
20961
20962 @item @@hashchar@{@}
20963 Insert a hash `#' character; only needed when a literal hash would
20964 introduce @code{#line} directive. @xref{Inserting a Hashsign}, and
20965 @ref{External Macro Processors}.
20966
20967 @item @@heading @var{title}
20968 Print an unnumbered section-like heading, but omit from the table of
20969 contents. In Info, the title is underlined with equal signs.
20970 @xref{@t{@@unnumberedsec @@appendixsec @@heading}}.
20971
20972 @item @@headings @var{on-off-single-double}
20973 Turn page headings on or off, and/or specify single-sided or double-sided
20974 page headings for printing. @xref{@t{@@headings}}.
20975
20976 @item @@headitem
20977 Begin a heading row in a multitable. @xref{Multitable Rows}.
20978
20979 @item @@headitemfont@{@var{text}@}
20980 Set @var{text} in the font used for multitable heading rows; mostly
20981 useful in multitable templates. @xref{Multitable Rows}.
20982
20983 @item @@html
20984 Enter HTML completely. Pair with @code{@@end html}. @xref{Raw
20985 Formatter Commands}.
20986
20987 @item @@hyphenation@{@var{hy-phen-a-ted words}@}
20988 Explicitly define hyphenation points. @xref{@t{@@- @@hyphenation}}.
20989
20990 @item @@i@{@var{text}@}
20991 Set @var{text} in an @i{italic} font. No effect in Info. @xref{Fonts}.
20992
20993 @item @@ifclear @var{txivar}
20994 If the Texinfo variable @var{txivar} is not set, format the following
20995 text. Pair with @code{@@end ifclear}. @xref{@t{@@set @@clear
20996 @@value}}.
20997
20998 @item @@ifcommanddefined @var{txicmd}
20999 @itemx @@ifcommandnotdefined @var{txicmd}
21000 If the Texinfo code @samp{@@@var{txicmd}} is (not) defined, format the
21001 follow text. Pair with the corresponding @code{@@end ifcommand...}.
21002 @xref{Testing for Texinfo Commands}.
21003
21004 @item @@ifdocbook
21005 @itemx @@ifhtml
21006 @itemx @@ifinfo
21007 Begin text that will appear only in the given output format.
21008 @code{@@ifinfo} output appears in both Info and (for historical
21009 compatibility) plain text output. Pair with @code{@@end ifdocbook}
21010 resp.@: @code{@@end ifhtml} resp.@: @code{@@end ifinfo}.
21011 @xref{Conditionals}.
21012
21013 @item @@ifnotdocbook
21014 @itemx @@ifnothtml
21015 @itemx @@ifnotplaintext
21016 @itemx @@ifnottex
21017 @itemx @@ifnotxml
21018 Begin text to be ignored in one output format but not the others.
21019 @code{@@ifnothtml} text is omitted from HTML output, etc. Pair with
21020 the corresponding @code{@@end ifnot@var{format}}.
21021 @xref{Conditionals}.
21022
21023 @item @@ifnotinfo
21024 Begin text to appear in output other than Info and (for historical
21025 compatibility) plain text. Pair with @code{@@end ifnotinfo}.
21026 @xref{Conditionals}.
21027
21028 @item @@ifplaintext
21029 Begin text that will appear only in the plain text output.
21030 Pair with @code{@@end ifplaintext}. @xref{Conditionals}.
21031
21032 @item @@ifset @var{txivar}
21033 If the Texinfo variable @var{txivar} is set, format the following
21034 text. Pair with @code{@@end ifset}. @xref{@t{@@set @@clear
21035 @@value}}.
21036
21037 @item @@iftex
21038 Begin text to appear only in the @TeX{} output. Pair with @code{@@end
21039 iftex}. @xref{Conditionals, , Conditionally Visible Text}.
21040
21041 @item @@ifxml
21042 Begin text that will appear only in the XML output. Pair with
21043 @code{@@end ifxml}. @xref{Conditionals}.
21044
21045 @item @@ignore
21046 Begin text that will not appear in any output. Pair with @code{@@end
21047 ignore}. @xref{Comments, , Comments and Ignored Text}.
21048
21049 @item @@image@{@var{filename}, [@var{width}], [@var{height}], [@var{alt}], [@var{ext}]@}
21050 Include graphics image in external @var{filename} scaled to the given
21051 @var{width} and/or @var{height}, using @var{alt} text and looking for
21052 @samp{@var{filename}.@var{ext}} in HTML@. @xref{Images}.
21053
21054 @item @@include @var{filename}
21055 Read the contents of Texinfo source file @var{filename}. @xref{Include Files}.
21056
21057 @item @@indent
21058 Insert paragraph indentation. @xref{@t{@@indent}}.
21059
21060 @item @@indentedblock
21061 Indent a block of arbitary text on the left. Pair with @code{@@end
21062 indentedblock}. @xref{@t{@@indentedblock}}.
21063
21064 @item @@indicateurl@{@var{indicateurl}@}
21065 Indicate text that is a uniform resource locator for the World Wide
21066 Web. @xref{@t{@@indicateurl}}.
21067
21068 @item @@inforef@{@var{node-name}, [@var{entry-name}], @var{info-file-name}@}
21069 Make a cross reference to an Info file for which there is no printed
21070 manual. @xref{@t{@@inforef}}.
21071
21072 @item @@inlinefmt@{@var{fmt}, @var{text}@}
21073 Insert @var{text} only if the output format is @var{fmt}.
21074 @xref{Inline Conditionals}.
21075
21076 @item @@inlinefmtifelse@{@var{fmt}, @var{text}, @var{else-text}@}
21077 Insert @var{text} if the output format is @var{fmt}, else @var{else-text}.
21078
21079 @item @@inlineifclear@{@var{var}, @var{text}@}
21080 @itemx @@inlineifset@{@var{var}, @var{text}@}
21081 Insert @var{text} only if the Texinfo variable @var{var} is (not) set.
21082
21083 @item @@inlineraw@{@var{fmt}, @var{raw-text}@}
21084 Insert @var{text} as in a raw conditional, only if the output format
21085 is @var{fmt}.
21086
21087 @item \input @var{macro-definitions-file}
21088 Use the specified macro definitions file. This command is used only
21089 in the first line of a Texinfo file to cause @TeX{} to make use of the
21090 @file{texinfo} macro definitions file. The @code{\} in @code{\input}
21091 is used instead of an @code{@@} because @TeX{} does not recognize
21092 @code{@@} until after it has read the definitions file. @xref{Texinfo
21093 File Header}.
21094
21095 @item @@insertcopying
21096 Insert the text previously defined with the @code{@@copying}
21097 environment. @xref{@t{@@insertcopying}}.
21098
21099 @item @@item
21100 Indicate the beginning of a marked paragraph for @code{@@itemize} and
21101 @code{@@enumerate}; indicate the beginning of the text of a first column
21102 entry for @code{@@table}, @code{@@ftable}, and @code{@@vtable}.
21103 @xref{Lists and Tables}.
21104
21105 @item @@itemize @var{mark-generating-character-or-command}
21106 Begin an unordered list: indented paragraphs with a mark, such as
21107 @code{@@bullet}, inside the left margin at the beginning of each item.
21108 Pair with @code{@@end itemize}. @xref{@t{@@itemize}}.
21109
21110 @item @@itemx
21111 Like @code{@@item} but do not generate extra vertical space above the
21112 item text. Thus, when several items have the same description, use
21113 @code{@@item} for the first and @code{@@itemx} for the others.
21114 @xref{@t{@@itemx}}.
21115
21116 @item @@kbd@{@var{keyboard-characters}@}
21117 Indicate characters of input to be typed by users. @xref{@t{@@kbd}}.
21118
21119 @item @@kbdinputstyle @var{style}
21120 Specify when @code{@@kbd} should use a font distinct from
21121 @code{@@code} according to @var{style}: @code{code}, @code{distinct},
21122 @code{example}. @xref{@t{@@kbd}}.
21123
21124 @item @@key@{@var{key-name}@}
21125 Indicate the name of a key on a keyboard. @xref{@t{@@key}}.
21126
21127 @item @@kindex @var{entry}
21128 Add @var{entry} to the index of keys.
21129 @xref{Index Entries, , Defining the Entries of an Index}.
21130
21131 @item @@L@{@}
21132 @itemx @@l@{@}
21133 Generate the uppercase and lowercase Polish suppressed-L letters,
21134 respectively: @L{}, @l{}.
21135
21136 @item @@LaTeX@{@}
21137 Generate the @LaTeX{} logo. @xref{@t{@@TeX @@LaTeX}}.
21138
21139 @item @@leq@{@}
21140 Generate a less-than-or-equal sign, `@leq{}'. @xref{@t{@@geq @@leq}}.
21141
21142 @item @@lisp
21143 Begin an example of Lisp code. Indent text, do not fill, and select
21144 fixed-width font. Pair with @code{@@end lisp}. @xref{@t{@@lisp}}.
21145
21146 @item @@listoffloats
21147 Produce a table-of-contents-like listing of @code{@@float}s.
21148 @xref{@t{@@listoffloats}}.
21149
21150 @item @@lowersections
21151 Change subsequent chapters to sections, sections to subsections, and so
21152 on. @xref{Raise/lower sections, , @code{@@raisesections} and
21153 @code{@@lowersections}}.
21154
21155 @item @@macro @var{macroname} @{@var{params}@}
21156 Define a new Texinfo command @code{@@@var{macroname}@{@var{params}@}}.
21157 Pair with @code{@@end macro}. @xref{Defining Macros}.
21158
21159 @item @@majorheading @var{title}
21160 Print an unnumbered chapter-like heading, but omit from the table of
21161 contents. This generates more vertical whitespace before the heading
21162 than the @code{@@chapheading} command. @xref{@t{@@majorheading
21163 @@chapheading}}.
21164
21165 @item @@math@{@var{mathematical-expression}@}
21166 Format a mathematical expression. @xref{Inserting Math}.
21167
21168 @item @@menu
21169 Mark the beginning of a menu of nodes. No effect in a printed manual.
21170 Pair with @code{@@end menu}. @xref{Menus}.
21171
21172 @item @@minus@{@}
21173 Generate a minus sign, `@minus{}'. @xref{@t{@@minus}}.
21174
21175 @item @@multitable @var{column-width-spec}
21176 Begin a multi-column table. Begin each row with @code{@@item} or
21177 @code{@@headitem}, and separate columns with @code{@@tab}. Pair with
21178 @code{@@end multitable}. @xref{Multitable Column Widths}.
21179
21180 @item @@need @var{n}
21181 Start a new page in a printed manual if fewer than @var{n} mils
21182 (thousandths of an inch) remain on the current page.
21183 @xref{@t{@@need}}.
21184
21185 @item @@node @var{name}, @var{next}, @var{previous}, @var{up}
21186 Begin a new node. @xref{@t{@@node}}.
21187
21188 @item @@noindent
21189 Prevent text from being indented as if it were a new paragraph.
21190 @xref{@t{@@noindent}}.
21191
21192 @item @@novalidate
21193 Suppress validation of node references and omit creation of auxiliary
21194 files with @TeX{}. Use before @code{@@setfilename}. @xref{Pointer
21195 Validation}.
21196
21197 @item @@O@{@}
21198 @itemx @@o@{@}
21199 Generate the uppercase and lowercase O-with-slash letters, respectively:
21200 @O{}, @o{}.
21201
21202 @item @@oddfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
21203 @itemx @@oddheading [@var{left}] @@| [@var{center}] @@| [@var{right}]
21204 Specify page footings resp.@: headings for odd-numbered (right-hand)
21205 pages. @xref{Custom Headings, ,
21206 How to Make Your Own Headings}.
21207
21208 @item @@OE@{@}
21209 @itemx @@oe@{@}
21210 Generate the uppercase and lowercase OE ligatures, respectively:
21211 @OE{}, @oe{}. @xref{Inserting Accents}.
21212
21213 @item @@ogonek@{@var{c}@}
21214 Generate an ogonek diacritic under the next character, as in
21215 @ogonek{a}. @xref{Inserting Accents}.
21216
21217 @item @@option@{@var{option-name}@}
21218 Indicate a command-line option, such as @option{-l} or
21219 @option{--help}. @xref{@t{@@option}}.
21220
21221 @item @@ordf@{@}
21222 @itemx @@ordm@{@}
21223 Generate the feminine and masculine Spanish ordinals, respectively:
21224 @ordf{}, @ordm{}. @xref{Inserting Accents}.
21225
21226 @item @@page
21227 Start a new page in a printed manual. No effect in Info.
21228 @xref{@t{@@page}}.
21229
21230 @item @@pagesizes [@var{width}][, @var{height}]
21231 Change page dimensions. @xref{pagesizes}.
21232
21233 @item @@paragraphindent @var{indent}
21234 Indent paragraphs by @var{indent} number of spaces (perhaps 0); preserve
21235 source file indentation if @var{indent} is @code{asis}.
21236 @xref{@t{@@paragraphindent}}.
21237
21238 @item @@part @var{title}
21239 Begin a group of chapters or appendixes; included in the tables of
21240 contents and produces a page of its own in printed output.
21241 @xref{@t{@@part}}.
21242
21243 @item @@pindex @var{entry}
21244 Add @var{entry} to the index of programs. @xref{Index Entries, , Defining
21245 the Entries of an Index}.
21246
21247 @item @@point@{@}
21248 Indicate the position of point in a buffer to the reader with a glyph:
21249 @samp{@point{}}. @xref{@t{@@point}}.
21250
21251 @item @@pounds@{@}
21252 Generate the pounds sterling currency sign.
21253 @xref{@t{@@pounds}}.
21254
21255 @item @@print@{@}
21256 Indicate printed output to the reader with a glyph: @samp{@print{}}.
21257 @xref{@t{@@print}}.
21258
21259 @item @@printindex @var{index-name}
21260 Generate the alphabetized index for @var{index-name} (using two
21261 columns in a printed manual). @xref{Printing Indices & Menus}.
21262
21263 @item @@pxref@{@var{node}, [@var{entry}], [@var{node-title}], [@var{info-file}], [@var{manual}]@}
21264 Make a reference that starts with a lowercase `see' in a printed
21265 manual. Use within parentheses only. Only the first argument is
21266 mandatory. @xref{@t{@@pxref}}.
21267
21268 @item @@questiondown@{@}
21269 Generate an upside-down question mark. @xref{Inserting Accents}.
21270
21271 @item @@quotation
21272 Narrow the margins to indicate text that is quoted from another work.
21273 Takes optional argument specifying prefix text, e.g., an author name.
21274 Pair with @code{@@end quotation}. @xref{@t{@@quotation}}.
21275
21276 @item @@quotedblleft@{@}
21277 @itemx @@quotedblright@{@}
21278 @itemx @@quoteleft@{@}
21279 @itemx @@quoteright@{@}
21280 @itemx @@quotedblbase@{@}
21281 @itemx @@quotesinglbase@{@}
21282 Produce various quotation marks: @quotedblleft{} @quotedblright{}
21283 @quoteleft{} @quoteright{} @quotedblbase{} @quotesinglbase{}.
21284 @xref{Inserting Quotation Marks}.
21285
21286 @item @@r@{@var{text}@}
21287 Set @var{text} in the regular @r{roman} font. No effect in Info.
21288 @xref{Fonts}.
21289
21290 @item @@raggedright
21291 Fill text; left justify every line while leaving the right end ragged.
21292 Leave font as is. Pair with @code{@@end raggedright}. No effect in
21293 Info. @xref{@t{@@raggedright}}.
21294
21295 @item @@raisesections
21296 Change subsequent sections to chapters, subsections to sections, and so
21297 on. @xref{Raise/lower sections}.
21298
21299 @item @@ref@{@var{node}, [@var{entry}], [@var{node-title}], [@var{info-file}], [@var{manual}]@}
21300 Make a plain reference that does not start with any special text.
21301 Follow command with a punctuation mark. Only the first argument is
21302 mandatory. @xref{@t{@@ref}}.
21303
21304 @item @@refill
21305 @findex refill
21306 This command used to refill and indent the paragraph after all the
21307 other processing has been done. It is no longer needed, since all
21308 formatters now automatically refill as needed, but you may still see
21309 it in the source to some manuals, as it does no harm.
21310
21311 @item @@registeredsymbol@{@}
21312 Generate the legal symbol @registeredsymbol{}.
21313 @xref{@t{@@registeredsymbol}}.
21314
21315 @item @@result@{@}
21316 Indicate the result of an expression to the reader with a special
21317 glyph: @samp{@result{}}. @xref{@t{@@result}}.
21318
21319 @item @@ringaccent@{@var{c}@}
21320 Generate a ring accent over the next character, as in @ringaccent{o}.
21321 @xref{Inserting Accents}.
21322
21323 @item @@samp@{@var{text}@}
21324 Indicate a literal example of a sequence of characters, in general.
21325 Quoted in Info output. @xref{@t{@@samp}}.
21326
21327 @item @@sansserif@{@var{text}@}
21328 Set @var{text} in a @sansserif{sans serif} font if possible. No
21329 effect in Info. @xref{Fonts}.
21330
21331 @item @@sc@{@var{text}@}
21332 Set @var{text} in a small caps font in printed output, and uppercase
21333 in Info. @xref{Smallcaps}.
21334
21335 @item @@section @var{title}
21336 Begin a section within a chapter. The section title appears in the
21337 table of contents. In Info, the title is underlined with equal signs.
21338 Within @code{@@chapter} and @code{@@appendix}, the section title is
21339 numbered; within @code{@@unnumbered}, the section is unnumbered.
21340 @xref{@t{@@section}}.
21341
21342 @item @@set @var{txivar} [@var{string}]
21343 Define the Texinfo variable @var{txivar}, optionally to the value
21344 @var{string}. @xref{@t{@@set @@clear @@value}}.
21345
21346 @item @@setchapternewpage @var{on-off-odd}
21347 Specify whether chapters start on new pages, and if so, whether on
21348 odd-numbered (right-hand) new pages. @xref{@t{@@setchapternewpage}}.
21349
21350 @item @@setcontentsaftertitlepage
21351 Put the table of contents after the @samp{@@end titlepage} even if the
21352 @code{@@contents} command is at the end. @xref{Contents}.
21353
21354 @item @@setfilename @var{info-file-name}
21355 Provide a name to be used for the output files. This command is essential
21356 for @TeX{} formatting as well, even though it produces no output of
21357 its own. @xref{@t{@@setfilename}}.
21358
21359 @item @@setshortcontentsaftertitlepage
21360 Place the short table of contents after the @samp{@@end titlepage}
21361 command even if the @code{@@shortcontents} command is at the end.
21362 @xref{Contents}.
21363
21364 @item @@settitle @var{title}
21365 Specify the title for page headers in a printed manual, and the
21366 default document title for HTML @samp{<head>}.
21367 @xref{@t{@@settitle}}.
21368
21369 @item @@shortcaption
21370 Define the short caption for an @code{@@float}. @xref{@t{@@caption
21371 @@shortcaption}}.
21372
21373 @item @@shortcontents
21374 Print a short table of contents, with chapter-level entries only. Not
21375 relevant to Info, which uses menus rather than tables of contents.
21376 @xref{Contents, , Generating a Table of Contents}.
21377
21378 @item @@shorttitlepage @var{title}
21379 Generate a minimal title page. @xref{@t{@@titlepage}}.
21380
21381 @item @@slanted@{@var{text}@}
21382 Set @var{text} in a @slanted{slanted} font if possible. No effect
21383 in Info. @xref{Fonts}.
21384
21385 @item @@smallbook
21386 Cause @TeX{} to produce a printed manual in a 7 by 9.25 inch format
21387 rather than the regular 8.5 by 11 inch format.
21388 @xref{@t{@@smallbook}}. Also, see @ref{@t{@@small@dots{}}}.
21389
21390 @item @@smalldisplay
21391 Begin a kind of example. Like @code{@@display}, but use a smaller
21392 font size where possible. Pair with @code{@@end smalldisplay}.
21393 @xref{@t{@@small@dots{}}}.
21394
21395 @item @@smallexample
21396 Begin an example. Like @code{@@example}, but use a smaller font size
21397 where possible. Pair with @code{@@end smallexample}.
21398 @xref{@t{@@small@dots{}}}.
21399
21400 @item @@smallformat
21401 Begin a kind of example. Like @code{@@format}, but use a smaller font
21402 size where possible. Pair with @code{@@end smallformat}.
21403 @xref{@t{@@small@dots{}}}.
21404
21405 @item @@smallindentedblock
21406 Like @code{@@indentedblock}, but use a smaller font size where
21407 possible. Pair with @code{@@end smallindentedblock}.
21408 @xref{@t{@@small@dots{}}}.
21409
21410 @item @@smalllisp
21411 Begin an example of Lisp code. Same as @code{@@smallexample}. Pair
21412 with @code{@@end smalllisp}. @xref{@t{@@small@dots{}}}.
21413
21414 @item @@smallquotation
21415 Like @code{@@quotation}, but use a smaller font size where possible.
21416 Pair with @code{@@end smallquotation}. @xref{@t{@@small@dots{}}}.
21417
21418 @item @@sp @var{n}
21419 Skip @var{n} blank lines. @xref{@t{@@sp}}.
21420
21421 @item @@ss@{@}
21422 Generate the German sharp-S es-zet letter, @ss{}. @xref{Inserting Accents}.
21423
21424 @item @@strong @{@var{text}@}
21425 Emphasize @var{text} more strongly than @code{@@emph}, by using
21426 @strong{boldface} where possible; enclosed in asterisks in Info.
21427 @xref{emph & strong, , Emphasizing Text}.
21428
21429 @item @@subheading @var{title}
21430 Print an unnumbered subsection-like heading, but omit from the table
21431 of contents of a printed manual. In Info, the title is underlined
21432 with hyphens. @xref{@t{@@unnumberedsubsec @@appendixsubsec @@subheading}}.
21433
21434 @item @@subsection @var{title}
21435 Begin a subsection within a section. The subsection title appears in
21436 the table of contents. In Info, the title is underlined with hyphens.
21437 Same context-dependent numbering as @code{@@section}.
21438 @xref{@t{@@subsection}}.
21439
21440 @item @@subsubheading @var{title}
21441 Print an unnumbered subsubsection-like heading, but omit from the
21442 table of contents of a printed manual. In Info, the title is
21443 underlined with periods. @xref{@t{@@subsubsection}}.
21444
21445 @item @@subsubsection @var{title}
21446 Begin a subsubsection within a subsection. The subsubsection title
21447 appears in the table of contents. In Info, the title is underlined
21448 with periods. Same context-dependent numbering as @code{@@section}.
21449 @xref{@t{@@subsubsection}}.
21450
21451 @item @@subtitle @var{title}
21452 In a printed manual, set a subtitle in a normal sized font flush to
21453 the right-hand side of the page. Not relevant to Info, which does not
21454 have title pages. @xref{@t{@@title @@subtitle @@author}}.
21455
21456 @item @@summarycontents
21457 Print a short table of contents. Synonym for @code{@@shortcontents}.
21458 @xref{Contents, , Generating a Table of Contents}.
21459
21460 @item @@syncodeindex @var{from-index} @var{to-index}
21461 Merge the index named in the first argument into the index named in
21462 the second argument, formatting the entries from the first index with
21463 @code{@@code}. @xref{Combining Indices}.
21464
21465 @item @@synindex @var{from-index} @var{to-index}
21466 Merge the index named in the first argument into the index named in
21467 the second argument. Do not change the font of @var{from-index}
21468 entries. @xref{Combining Indices}.
21469
21470 @item @@t@{@var{text}@}
21471 Set @var{text} in a @t{fixed-width}, typewriter-like font. No effect
21472 in Info. @xref{Fonts}.
21473
21474 @item @@tab
21475 Separate columns in a row of a multitable. @xref{Multitable Rows}.
21476
21477 @item @@table @var{formatting-command}
21478 Begin a two-column table (description list), using @code{@@item} for
21479 each entry. Write each first column entry on the same line as
21480 @code{@@item}. First column entries are printed in the font resulting
21481 from @var{formatting-command}. Pair with @code{@@end table}.
21482 @xref{Two-column Tables, , Making a Two-column Table}. Also see
21483 @ref{@t{@@ftable @@vtable}}, and @ref{@t{@@itemx}}.
21484
21485 @item @@TeX@{@}
21486 Generate the @TeX{} logo. @xref{@t{@@TeX @@LaTeX}}.
21487
21488 @item @@tex
21489 Enter @TeX{} completely. Pair with @code{@@end tex}. @xref{Raw
21490 Formatter Commands}.
21491
21492 @item @@textdegree@{@}
21493 Generate the degree symbol. @xref{@t{@@textdegree}}.
21494
21495 @item @@thischapter
21496 @itemx @@thischaptername
21497 @itemx @@thischapternum
21498 @itemx @@thisfile
21499 @itemx @@thispage
21500 @itemx @@thistitle
21501 Only allowed in a heading or footing. Stands for, respectively, the
21502 number and name of the current chapter (in the format `Chapter 1:
21503 Title'), the current chapter name only, the current chapter number
21504 only, the filename, the current page number, and the title of the
21505 document, respectively. @xref{Custom Headings, , How to Make Your Own
21506 Headings}.
21507
21508 @item @@TH@{@}
21509 @itemx @@th@{@}
21510 Generate the uppercase and lowercase Icelandic letter thorn, respectively:
21511 @TH{}, @th{}. @xref{Inserting Accents}.
21512
21513 @item @@tie@{@}
21514 Generate a normal interword space at which a line break is not
21515 allowed. @xref{@t{@@tie}}.
21516
21517 @item @@tieaccent@{@var{cc}@}
21518 Generate a tie-after accent over the next two characters @var{cc}, as in
21519 `@tieaccent{oo}'. @xref{Inserting Accents}.
21520
21521 @item @@tindex @var{entry}
21522 Add @var{entry} to the index of data types. @xref{Index Entries, ,
21523 Defining the Entries of an Index}.
21524
21525 @item @@title @var{title}
21526 In a printed manual, set a title flush to the left-hand side of the
21527 page in a larger than normal font and underline it with a black rule.
21528 Not relevant to Info, which does not have title pages.
21529 @xref{@t{@@title @@subtitle @@author}}.
21530
21531 @item @@titlefont@{@var{text}@}
21532 In a printed manual, print @var{text} in a larger than normal font.
21533 @xref{@t{@@titlefont @@center @@sp}}.
21534
21535 @item @@titlepage
21536 Begin the title page. Write the command on a line of its own, paired
21537 with @code{@@end titlepage}. Nothing between @code{@@titlepage} and
21538 @code{@@end titlepage} appears in Info. @xref{@t{@@titlepage}}.
21539
21540 @item @@today@{@}
21541 Insert the current date, in `1 Jan 1900' style. @xref{Custom
21542 Headings, , How to Make Your Own Headings}.
21543
21544 @item @@top @var{title}
21545 Mark the topmost @code{@@node} in the file, which must be defined on
21546 the line immediately preceding the @code{@@top} command. The title is
21547 formatted as a chapter-level heading. The entire top node, including
21548 the @code{@@node} and @code{@@top} lines, are normally enclosed with
21549 @code{@@ifnottex ... @@end ifnottex}. In @TeX{} and
21550 @code{texinfo-format-buffer}, the @code{@@top} command is merely a
21551 synonym for @code{@@unnumbered}. @xref{@t{makeinfo} Pointer
21552 Creation}.
21553
21554 @item @@u@{@var{c}@}
21555 @itemx @@ubaraccent@{@var{c}@}
21556 @itemx @@udotaccent@{@var{c}@}
21557 Generate a breve, underbar, or underdot accent, respectively, over or
21558 under the character @var{c}, as in @u{o}, @ubaraccent{o},
21559 @udotaccent{o}. @xref{Inserting Accents}.
21560
21561 @item @@unmacro @var{macroname}
21562 Undefine the macro @code{@@@var{macroname}} if it has been defined.
21563 @xref{Defining Macros}.
21564
21565 @item @@unnumbered @var{title}
21566 Begin a chapter that appears without chapter numbers of any kind. The
21567 title appears in the table of contents. In Info, the title is
21568 underlined with asterisks. @xref{@t{@@unnumbered @@appendix}}.
21569
21570 @item @@unnumberedsec @var{title}
21571 Begin a section that appears without section numbers of any kind. The
21572 title appears in the table of contents of a printed manual. In Info,
21573 the title is underlined with equal signs. @xref{@t{@@unnumberedsec
21574 @@appendixsec @@heading}}.
21575
21576 @item @@unnumberedsubsec @var{title}
21577 Begin an unnumbered subsection. The title appears in the table of
21578 contents. In Info, the title is underlined with hyphens.
21579 @xref{@t{@@unnumberedsubsec @@appendixsubsec @@subheading}}.
21580
21581 @item @@unnumberedsubsubsec @var{title}
21582 Begin an unnumbered subsubsection. The title appears in the table of
21583 contents. In Info, the title is underlined with periods.
21584 @xref{@t{@@subsubsection}}.
21585
21586 @item @@uref@{@var{url}[, @var{displayed-text}][, @var{replacement}@}
21587 @itemx @@url@{@var{url}[, @var{displayed-text}][, @var{replacement}@}
21588 Define a cross reference to an external uniform resource locator,
21589 e.g., for the World Wide Web. @xref{@t{@@url}}.
21590
21591 @item @@urefbreakstyle @var{style}
21592 Specify how @code{@@uref}/@code{@@url} should break at special
21593 characters: @code{after}, @code{before}, @code{none}.
21594 @xref{@t{@@url}}.
21595
21596 @item @@v@{@var{c}@}
21597 Generate check accent over the character @var{c}, as in @v{o}.
21598 @xref{Inserting Accents}.
21599
21600 @item @@value@{@var{txivar}@}
21601 Insert the value, if any, of the Texinfo variable @var{txivar},
21602 previously defined by @code{@@set}. @xref{@t{@@set @@clear
21603 @@value}}.
21604
21605 @item @@var@{@var{metasyntactic-variable}@}
21606 Highlight a metasyntactic variable, which is something that stands for
21607 another piece of text. @xref{@t{@@var}}.
21608
21609 @item @@verb@{@var{delim} @var{literal} @var{delim}@}
21610 Output @var{literal}, delimited by the single character @var{delim},
21611 exactly as is (in the fixed-width font), including any whitespace or
21612 Texinfo special characters. @xref{@t{@@verb}}.
21613
21614 @item @@verbatim
21615 Output the text of the environment exactly as is (in the fixed-width
21616 font). Pair with @code{@@end verbatim}. @xref{@t{@@verbatim}}.
21617
21618 @item @@verbatiminclude @var{filename}
21619 Output the contents of @var{filename} exactly as is (in the
21620 fixed-width font). @xref{@t{@@verbatiminclude}}.
21621
21622 @item @@vindex @var{entry}
21623 Add @var{entry} to the index of variables. @xref{Index Entries, ,
21624 Defining the Entries of an Index}.
21625
21626 @item @@vskip @var{amount}
21627 In a printed manual, insert whitespace so as to push text on the
21628 remainder of the page towards the bottom of the page. Used in
21629 formatting the copyright page with the argument @samp{0pt plus
21630 1filll}. (Note spelling of @samp{filll}.) @code{@@vskip} may be used
21631 only in contexts ignored for Info. @xref{Copyright}.
21632
21633 @item @@vtable @var{formatting-command}
21634 Begin a two-column table, using @code{@@item} for each entry.
21635 Automatically enter each of the items in the first column into the
21636 index of variables. Pair with @code{@@end vtable}. The same as
21637 @code{@@table}, except for indexing. @xref{@t{@@ftable @@vtable}}.
21638
21639 @item @@w@{@var{text}@}
21640 Disallow line breaks within @var{text}. @xref{@t{@@w}}.
21641
21642 @item @@xml
21643 Enter XML completely. Pair with @code{@@end xml}. @xref{Raw
21644 Formatter Commands}.
21645
21646 @item @@xref@{@var{node}, [@var{entry}], [@var{node-title}], [@var{info-file}], [@var{manual}]@}
21647 Make a reference that starts with `See' in a printed manual. Follow
21648 command with a punctuation mark. Only the first argument is
21649 mandatory. @xref{@t{@@xref}}.
21650
21651 @item @@xrefautomaticsectiontitle @var{on-off}
21652 By default, use the section title instead of the node name in cross
21653 references. @xref{Three Arguments}.
21654
21655 @end table
21656
21657
21658 @node Command Syntax
21659 @section @@-Command Syntax
21660 @cindex @@-command syntax
21661 @cindex Syntax, of @@-commands
21662 @cindex Command syntax
21663
21664 The character @samp{@@} is used to start all Texinfo commands. (It
21665 has the same meaning that @samp{\} has in plain @TeX{}.) Texinfo has
21666 four types of @@-command:
21667
21668 @table @asis
21669 @item 1. Non-alphabetic commands.
21670 These commands consist of an @@ followed by a punctuation mark or
21671 other character that is not part of the Latin alphabet. Non-alphabetic
21672 commands are almost always part of the text within a paragraph. The
21673 non-alphabetic commands include @code{@@@@}, @code{@@@{}, @code{@@@}},
21674 @code{@@.}, @code{@@@kbd{SPACE}}, most of the accent commands, and
21675 many more.
21676
21677 @item 2. Alphabetic commands that do not require arguments.
21678 These commands start with @@ followed by a word followed by a
21679 left and right- brace. These commands insert special symbols in
21680 the document; they do not take arguments. Some examples:
21681 @code{@@dots@{@}} @result{} @samp{@dots{}}, @code{@@equiv@{@}}
21682 @result{} @samp{@equiv{}}, @code{@@TeX@{@}} @result{} `@TeX{}', and
21683 @code{@@bullet@{@}} @result{} @samp{@bullet{}}.
21684
21685 @item 3. Alphabetic commands that require arguments within braces.
21686 These commands start with @@ followed by a letter or a word, followed by an
21687 argument within braces. For example, the command @code{@@dfn} indicates
21688 the introductory or defining use of a term; it is used as follows: @samp{In
21689 Texinfo, @@@@-commands are @@dfn@{mark-up@} commands.}
21690
21691 @item 4. Alphabetic commands that occupy an entire line.
21692 These commands occupy an entire line. The line starts with @@,
21693 followed by the name of the command (a word); for example, @code{@@center}
21694 or @code{@@cindex}. If no argument is needed, the word is followed by
21695 the end of the line. If there is an argument, it is separated from
21696 the command name by a space. Braces are not used.
21697 @end table
21698
21699 Whitespace following an @@-command name are optional and (usually)
21700 ignored if present. The exceptions are contexts whee whitespace is
21701 significant, e.g., an @code{@@example} environment.
21702
21703 @cindex Braces and argument syntax
21704 Thus, the alphabetic commands fall into classes that have
21705 different argument syntaxes. You cannot tell to which class a command
21706 belongs by the appearance of its name, but you can tell by the
21707 command's meaning: if the command stands for a glyph, it is in
21708 class 2 and does not require an argument; if it makes sense to use the
21709 command among other text as part of a paragraph, the command
21710 is in class 3 and must be followed by an argument in braces;
21711 otherwise, it is in class 4 and uses the rest of the line as its
21712 argument.
21713
21714 The purpose of having a different syntax for commands of classes 3
21715 and@tie{}4 is to make Texinfo files easier to read, and also to help
21716 the XEmacs paragraph and filling commands work properly. There is
21717 only one exception to this rule: the command @code{@@refill}, which is
21718 always used at the end of a paragraph immediately following the final
21719 period or other punctuation character. @code{@@refill} takes no
21720 argument and does @emph{not} require braces. @code{@@refill} never
21721 confuses the XEmacs paragraph commands because it cannot appear at the
21722 beginning of a line. It is also no longer needed, since all
21723 formatters now refill paragraphs automatically.
21724
21725
21726 @node Command Contexts
21727 @section @@-Command Contexts
21728
21729 @cindex Contexts, of @@-commands
21730
21731 Here we describe approximately which @@-commands can be used in which
21732 contexts. It merely gives the general idea and is not exhaustive or
21733 meant to be a complete reference. Discrepancies between the
21734 information here and the @code{makeinfo} or @TeX{} implementations
21735 are most likely to be resolved in favor of the implementation.
21736
21737 By @dfn{general text} below, we mean anything except sectioning and
21738 other such outer-level document commands, such as @code{@@section},
21739 @code{@@node}, and @code{@@setfilename}.
21740
21741 @code{@@c}, @code{@@comment} and @code{@@if ... @@end if} conditional
21742 commands may appear anywhere (except the conditionals must still be on
21743 lines by themselves). @code{@@caption} may only appear in
21744 @code{@@float} but may contain general text. @code{@@footnote}
21745 content likewise.
21746
21747 @@-commands with braces marking text (such as @code{@@strong},
21748 @code{@@sc}, @code{@@asis}) may contain raw formatter commands such as
21749 @code{@@html} but no other block commands (other commands terminated
21750 by @code{@@end}) and may not be split across paragraphs, but may
21751 otherwise contain general text.
21752
21753 In addition to the block command restriction, on @code{@@center},
21754 @code{@@exdent} and @code{@@item} in @code{@@table} lines, @@-commands
21755 that makes only sense in a paragraph are not accepted, such as
21756 @code{@@indent}.
21757
21758 In addition to the above, sectioning commands cannot contain
21759 @code{@@anchor}, @code{@@footnote} or @code{@@verb}.
21760
21761 In addition to the above, remaining commands (@code{@@node},
21762 @code{@@anchor}, @code{@@printindex}, @code{@@ref}, @code{@@math},
21763 @code{@@cindex}, @code{@@url}, @code{@@image}, and so on) cannot
21764 contain cross reference commands (@code{@@ref}, @code{@@xref},
21765 @code{@@pxref} and @code{@@inforef}). In one last addition,
21766 @code{@@shortcaption} may only appear inside @code{@@float}.
21767
21768 For precise and complete information, we suggest looking into the
21769 extensive test suite in the sources, which exhaustively try
21770 combinations.
21771
21772
21773 @node Tips
21774 @appendix Tips and Hints
21775
21776 Here are some tips for writing Texinfo documentation:
21777
21778 @cindex Tips
21779 @cindex Usage tips
21780 @cindex Hints
21781 @itemize @bullet
21782 @item
21783 Write in the present tense, not in the past or the future.
21784
21785 @item
21786 Write actively! For example, write ``We recommend that @dots{}'' rather
21787 than ``It is recommended that @dots{}''.
21788
21789 @item
21790 Use 70 or 72 as your fill column. Longer lines are hard to read.
21791
21792 @item
21793 Include a copyright notice and copying permissions.
21794 @end itemize
21795
21796
21797 @subsubheading Index, Index, Index!
21798
21799 Write many index entries, in different ways.
21800 Readers like indices; they are helpful and convenient.
21801
21802 Although it is easiest to write index entries as you write the body of
21803 the text, some people prefer to write entries afterwards. In either
21804 case, write an entry before the paragraph to which it applies. This
21805 way, an index entry points to the first page of a paragraph that is
21806 split across pages.
21807
21808 Here are more index-related hints we have found valuable:
21809
21810 @itemize @bullet
21811 @item
21812 Write each index entry differently, so each entry refers to a different
21813 place in the document.
21814
21815 @item
21816 Write index entries only where a topic is discussed significantly. For
21817 example, it is not useful to index ``debugging information'' in a
21818 chapter on reporting bugs. Someone who wants to know about debugging
21819 information will certainly not find it in that chapter.
21820
21821 @item
21822 Consistently capitalize the first word of every concept index entry,
21823 or else consistently use lowercase. Terse entries often call for
21824 lowercase; longer entries for capitalization. Whichever case
21825 convention you use, please use one or the other consistently! Mixing
21826 the two styles looks bad.
21827
21828 @item
21829 Always capitalize or use uppercase for those words in an index for
21830 which this is proper, such as names of countries or acronyms. Always
21831 use the appropriate case for case-sensitive names, such as those in C or
21832 Lisp.
21833
21834 @item
21835 Write the indexing commands that refer to a whole section immediately
21836 after the section command, and write the indexing commands that refer to
21837 a paragraph before that paragraph.
21838
21839 In the example that follows, a blank line comes after the index
21840 entry for ``Leaping'':
21841
21842 @example
21843 @group
21844 @@section The Dog and the Fox
21845 @@cindex Jumping, in general
21846 @@cindex Leaping
21847
21848 @@cindex Dog, lazy, jumped over
21849 @@cindex Lazy dog jumped over
21850 @@cindex Fox, jumps over dog
21851 @@cindex Quick fox jumps over dog
21852 The quick brown fox jumps over the lazy dog.
21853 @end group
21854 @end example
21855
21856 @noindent
21857 (Note that the example shows entries for the same concept that are
21858 written in different ways---@samp{Lazy dog}, and @samp{Dog, lazy}---so
21859 readers can look up the concept in different ways.)
21860 @end itemize
21861
21862
21863 @subsubheading Blank Lines
21864
21865 @itemize @bullet
21866 @item
21867 Insert a blank line between a sectioning command and the first following
21868 sentence or paragraph, or between the indexing commands associated with
21869 the sectioning command and the first following sentence or paragraph, as
21870 shown in the tip on indexing. It makes the source easier to read.
21871
21872 @item
21873 Always insert a blank line before an @code{@@table} command and after an
21874 @code{@@end table} command; but never insert a blank line after an
21875 @code{@@table} command.
21876
21877 @need 1000
21878 For example,
21879
21880 @example
21881 @group
21882 Types of fox:
21883
21884 @@table @@samp
21885 @@item Quick
21886 Jump over lazy dogs.
21887 @end group
21888
21889 @group
21890 @@item Brown
21891 Also jump over lazy dogs.
21892 @@end table
21893
21894 @end group
21895 @group
21896 @@noindent
21897 On the other hand, @dots{}
21898 @end group
21899 @end example
21900
21901 Insert blank lines before and after @code{@@itemize} @dots{} @code{@@end
21902 itemize} and @code{@@enumerate} @dots{} @code{@@end enumerate} in the
21903 same way.
21904 @end itemize
21905
21906
21907 @subsubheading Complete Phrases
21908
21909 Complete phrases are easier to read than @dots{}
21910
21911 @itemize @bullet
21912 @item
21913 Write entries in an itemized list as complete sentences; or at least, as
21914 complete phrases. Incomplete expressions @dots{} awkward @dots{} like
21915 this.
21916
21917 @item
21918 Write the prefatory sentence or phrase for a multi-item list or table as
21919 a complete expression. Do not write ``You can set:''; instead, write
21920 ``You can set these variables:''. The former expression sounds cut off.
21921 @end itemize
21922
21923
21924 @subsubheading Editions, Dates and Versions
21925
21926 Include edition numbers, version numbers, and dates in the
21927 @code{@@copying} text (for people reading the Texinfo file, and for the
21928 legal copyright in the output files). Then use @code{@@insertcopying}
21929 in the @code{@@titlepage} section for people reading the printed
21930 output (@pxref{Short Sample}).
21931
21932 It is easiest to handle such version information using @code{@@set}
21933 and @code{@@value}. @xref{@t{@@value} Example}, and @ref{GNU
21934 Sample Texts}.
21935
21936
21937 @subsubheading Definition Commands
21938
21939 Definition commands are @code{@@deffn}, @code{@@defun},
21940 @code{@@defmac}, and the like, and enable you to write descriptions in
21941 a uniform format.
21942
21943 @itemize @bullet
21944 @item
21945 Write just one definition command for each entity you define with a
21946 definition command. The automatic indexing feature creates an index
21947 entry that leads the reader to the definition.
21948
21949 @item
21950 Use @code{@@table} @dots{} @code{@@end table} in an appendix that
21951 contains a summary of functions, not @code{@@deffn} or other definition
21952 commands.
21953 @end itemize
21954
21955
21956 @subsubheading Capitalization
21957
21958 @itemize @bullet
21959 @item
21960 Capitalize ``Texinfo''; it is a name. Do not write the @samp{x} or
21961 @samp{i} in uppercase.
21962
21963 @item
21964 Capitalize ``Info''; it is a name.
21965
21966 @item
21967 Write @TeX{} using the @code{@@TeX@{@}} command. Note the uppercase
21968 @samp{T} and @samp{X}. This command causes the formatters to
21969 typeset the name according to the wishes of Donald Knuth, who wrote
21970 @TeX{}. (Likewise @code{@@LaTeX@{@}} for @LaTeX{}.)
21971 @end itemize
21972
21973
21974 @subsubheading Spaces
21975
21976 Do not use spaces to format a Texinfo file, except inside of
21977 @code{@@example} @dots{} @code{@@end example} and other literal
21978 environments and commands.
21979
21980 @need 700
21981 For example, @TeX{} fills the following:
21982
21983 @example
21984 @group
21985 @@kbd@{C-x v@}
21986 @@kbd@{M-x vc-next-action@}
21987 Perform the next logical operation
21988 on the version-controlled file
21989 corresponding to the current buffer.
21990 @end group
21991 @end example
21992
21993 @need 950
21994 @noindent
21995 so it looks like this:
21996
21997 @iftex
21998 @quotation
21999 @kbd{C-x v}
22000 @kbd{M-x vc-next-action}
22001 Perform the next logical operation on the version-controlled file
22002 corresponding to the current buffer.
22003 @end quotation
22004 @end iftex
22005 @ifnottex
22006 @quotation
22007 `C-x v' `M-x vc-next-action' Perform the next logical operation on the
22008 version-controlled file corresponding to the current buffer.
22009 @end quotation
22010 @end ifnottex
22011
22012 @noindent
22013 In this case, the text should be formatted with
22014 @code{@@table}, @code{@@item}, and @code{@@itemx}, to create a table.
22015
22016
22017 @subsubheading @@code, @@samp, @@var, and @samp{---}
22018
22019 @itemize @bullet
22020 @item
22021 Use @code{@@code} around Lisp symbols, including command names.
22022 For example,
22023
22024 @example
22025 The main function is @@code@{vc-next-action@}, @dots{}
22026 @end example
22027
22028 @item
22029 Avoid putting letters such as @samp{s} immediately after an
22030 @samp{@@code}. Such letters look bad.
22031
22032 @item
22033 Use @code{@@var} around meta-variables. Do not write angle brackets
22034 around them.
22035
22036 @item
22037 Use three hyphens in a row, @samp{---}, to indicate a long dash. @TeX{}
22038 typesets these as a long dash and the Info formatters reduce three
22039 hyphens to two.
22040 @end itemize
22041
22042
22043 @subsubheading Periods Outside of Quotes
22044
22045 Place periods and other punctuation marks @emph{outside} of quotations,
22046 unless the punctuation is part of the quotation. This practice goes
22047 against some publishing conventions in the United States, but enables the
22048 reader to distinguish between the contents of the quotation and the
22049 whole passage.
22050
22051 For example, you should write the following sentence with the period
22052 outside the end quotation marks:
22053
22054 @example
22055 Evidently, @samp{au} is an abbreviation for ``author''.
22056 @end example
22057
22058 @noindent
22059 since @samp{au} does @emph{not} serve as an abbreviation for
22060 @samp{author.} (with a period following the word).
22061
22062
22063 @subsubheading Introducing New Terms
22064
22065 @itemize @bullet
22066 @item
22067 Introduce new terms so that a reader who does not know them can
22068 understand them from context; or write a definition for the term.
22069
22070 For example, in the following, the terms ``check in'', ``register'' and
22071 ``delta'' are all appearing for the first time; the example sentence should be
22072 rewritten so they are understandable.
22073
22074 @quotation
22075 The major function assists you in checking in a file to your
22076 version control system and registering successive sets of changes to
22077 it as deltas.
22078 @end quotation
22079
22080 @item
22081 Use the @code{@@dfn} command around a word being introduced, to indicate
22082 that the reader should not expect to know the meaning already, and
22083 should expect to learn the meaning from this passage.
22084 @end itemize
22085
22086
22087 @subsubheading Program Invocation Nodes
22088
22089 You can invoke programs such as XEmacs, GCC, and @code{gawk} from a
22090 shell. The documentation for each program should contain a section that
22091 describes this. Unfortunately, if the node names and titles for these
22092 sections are all different, they are difficult for users to find.
22093
22094 So, there is a convention to name such sections with a phrase beginning
22095 with the word `Invoking', as in `Invoking XEmacs'; this way, users can
22096 find the section easily.
22097
22098
22099 @subsubheading ANSI C Syntax
22100
22101 When you use @code{@@example} to describe a C function's calling
22102 conventions, use the ANSI C syntax, like this:
22103
22104 @example
22105 void dld_init (char *@@var@{path@});
22106 @end example
22107
22108 @noindent
22109 And in the subsequent discussion, refer to the argument values by
22110 writing the same argument names, again highlighted with
22111 @code{@@var}.
22112
22113 @need 800
22114 Avoid the obsolete style that looks like this:
22115
22116 @example
22117 #include <dld.h>
22118
22119 dld_init (path)
22120 char *path;
22121 @end example
22122
22123 Also, it is best to avoid writing @code{#include} above the
22124 declaration just to indicate that the function is declared in a
22125 header file. The practice may give the misimpression that the
22126 @code{#include} belongs near the declaration of the function. Either
22127 state explicitly which header file holds the declaration or, better
22128 yet, name the header file used for a group of functions at the
22129 beginning of the section that describes the functions.
22130
22131 @anchor{texi-elements-by-size}
22132 @subsubheading Node Length
22133
22134 Keep nodes (sections) to a reasonable length, whatever reasonable
22135 might be in the given context. Don't hesitate break up long nodes
22136 into subnodes and have an extensive tree structure; that's what it's
22137 there for. Many times, readers will probably try to find a single
22138 specific point in the manual, using search, indexing, or just plain
22139 guessing, rather than reading the whole thing from beginning to end.
22140
22141 You can use the @command{texi-elements-by-size} utility to see a list
22142 of all nodes (or sections) in the document, sorted by size (either
22143 lines or words), to find candidates for splitting. It's in the
22144 @file{util/} subdirectory of the Texinfo sources.
22145
22146
22147 @subsubheading Bad Examples
22148
22149 Here are several examples of bad writing to avoid:
22150
22151 In this example, say, `` @dots{} you must @code{@@dfn}@{check
22152 in@} the new version.'' That flows better.
22153
22154 @quotation
22155 When you are done editing the file, you must perform a
22156 @code{@@dfn}@{check in@}.
22157 @end quotation
22158
22159 In the following example, say, ``@dots{} makes a unified interface such as VC
22160 mode possible.''
22161
22162 @quotation
22163 SCCS, RCS and other version-control systems all perform similar
22164 functions in broadly similar ways (it is this resemblance which makes
22165 a unified control mode like this possible).
22166 @end quotation
22167
22168 And in this example, you should specify what `it' refers to:
22169
22170 @quotation
22171 If you are working with other people, it assists in coordinating
22172 everyone's changes so they do not step on each other.
22173 @end quotation
22174
22175
22176 @subsubheading And Finally @dots{}
22177
22178 @itemize @bullet
22179 @item
22180 Pronounce @TeX{} as if the @samp{X} were a Greek `chi', as the last
22181 sound in the name `Bach'. But pronounce Texinfo as in `speck':
22182 ``teckinfo''.
22183
22184 @item
22185 Write notes for yourself at the very end of a Texinfo file after the
22186 @code{@@bye}. None of the formatters process text after the
22187 @code{@@bye}; it is as if the text were within @code{@@ignore} @dots{}
22188 @code{@@end ignore}.
22189 @end itemize
22190
22191
22192 @node Sample Texinfo Files
22193 @appendix Sample Texinfo Files
22194 @cindex Sample Texinfo files
22195
22196 The first example is from the first chapter (@pxref{Short Sample}),
22197 given here in its entirety, without commentary. The second
22198 includes the full texts to be used in GNU manuals.
22199
22200 @menu
22201 * Short Sample Texinfo File::
22202 * GNU Sample Texts::
22203 * Verbatim Copying License::
22204 * All-permissive Copying License::
22205 @end menu
22206
22207
22208 @node Short Sample Texinfo File
22209 @section Short Sample
22210 @cindex Sample Texinfo file, no comments
22211
22212 Here is a complete, short sample Texinfo file, without any commentary.
22213 You can see this file, with comments, in the first chapter. @xref{Short
22214 Sample}.
22215
22216 In a nutshell: The @command{makeinfo} program transforms a Texinfo
22217 source file such as this into an Info file or HTML; and @TeX{} typesets
22218 it for a printed manual.
22219
22220
22221 @sp 1
22222 @example
22223 \input texinfo @@c -*-texinfo-*-
22224 @@c %**start of header
22225 @@setfilename sample.info
22226 @@settitle Sample Manual 1.0
22227 @@c %**end of header
22228
22229 @@copying
22230 This is a short example of a complete Texinfo file.
22231
22232 Copyright @@copyright@{@} 2013 Free Software Foundation, Inc.
22233 @@end copying
22234
22235 @@titlepage
22236 @@title Sample Title
22237 @@page
22238 @@vskip 0pt plus 1filll
22239 @@insertcopying
22240 @@end titlepage
22241
22242 @@c Output the table of the contents at the beginning.
22243 @@contents
22244
22245 @@ifnottex
22246 @@node Top
22247 @@top GNU Sample
22248
22249 @@insertcopying
22250 @@end ifnottex
22251
22252 @@menu
22253 * First Chapter:: The first chapter is the
22254 only chapter in this sample.
22255 * Index:: Complete index.
22256 @@end menu
22257
22258
22259 @@node First Chapter
22260 @@chapter First Chapter
22261
22262 @@cindex chapter, first
22263
22264 This is the first chapter.
22265 @@cindex index entry, another
22266
22267 Here is a numbered list.
22268
22269 @@enumerate
22270 @@item
22271 This is the first item.
22272
22273 @@item
22274 This is the second item.
22275 @@end enumerate
22276
22277
22278 @@node Index
22279 @@unnumbered Index
22280
22281 @@printindex cp
22282
22283 @@bye
22284 @end example
22285
22286
22287 @node GNU Sample Texts
22288 @section GNU Sample Texts
22289
22290 @cindex GNU sample texts
22291 @cindex Sample texts, GNU
22292 @cindex Full texts, GNU
22293
22294 Following is a sample Texinfo document with the full texts that should
22295 be used (adapted as necessary) in GNU manuals.
22296
22297 As well as the legal texts, it also serves as a practical example of how
22298 many elements in a GNU system can affect the manual. If you're not
22299 familiar with all these different elements, don't worry. They're not
22300 required and a perfectly good manual can be written without them.
22301 They're included here nonetheless because many manuals do (or could)
22302 benefit from them.
22303
22304 @xref{Short Sample}, for a minimal example of a Texinfo file.
22305 @xref{Beginning a File}, for a full explanation of that minimal
22306 example.
22307
22308 Here are some notes on the example:
22309
22310 @itemize @bullet
22311 @item
22312 @cindex $Id
22313 @cindex CVS $Id
22314 @cindex RCS $Id
22315 @cindex Documentation identification
22316 @cindex Identification of documentation
22317 The @samp{$Id:} comment is for the CVS (@pxref{Top,,, cvs, Concurrent
22318 Versions System}), RCS (@pxref{Top,,, rcs, Revision Control System})
22319 and other version control systems, which expand it into a string such
22320 as:
22321
22322 @example
22323 $Id$
22324 @end example
22325
22326 (This is potentially useful in all sources that use version control,
22327 not just manuals.) You may wish to include the @samp{$Id:} comment in
22328 the @code{@@copying} text, if you want a completely unambiguous
22329 reference to the documentation source version.
22330
22331 If you want to literally write @t{@w{$}Id$}, use @code{@@w}:
22332 @code{@@w@{$@}Id$}. Unfortunately, this technique does not work in
22333 plain text output, where it's not clear what should be done.
22334
22335 @item
22336 @pindex automake@r{, and version info}
22337 @vindex UPDATED @r{Automake variable}
22338 @vindex VERSION @r{Automake variable}
22339 @pindex time-stamp.el
22340 The @file{version.texi} in the @code{@@include} command is maintained
22341 automatically by Automake (@pxref{Top,,, automake, GNU Automake}). It
22342 sets the @samp{VERSION} and @samp{UPDATED} values used elsewhere. If
22343 your distribution doesn't use Automake, but you do use XEmacs, you may
22344 find the time-stamp.el package helpful (@pxref{Time Stamps,,, xemacs,
22345 XEmacs User's Manual}).
22346
22347 @item
22348 The @code{@@syncodeindex} command reflects the recommendation to use
22349 only one index where possible, to make it easier for readers to look up
22350 index entries.
22351
22352 @item
22353 The @code{@@dircategory} is for constructing the Info directory.
22354 @xref{Installing Dir Entries}, which includes a variety of recommended
22355 category names.
22356
22357 @item
22358 The `Invoking' node is a GNU standard to help users find the basic
22359 information about command-line usage of a given program. @xref{Manual
22360 Structure Details,,, standards, GNU Coding Standards}.
22361
22362 @item
22363 @cindex GNU Free Documentation License, including entire
22364 @cindex Free Documentation License, including entire
22365 It is best to include the entire GNU Free Documentation License in a GNU
22366 manual, unless the manual is only a few pages long. Of course this
22367 sample is even shorter than that, but it includes the FDL anyway in
22368 order to show one conventional way to do so. The @file{fdl.texi} file
22369 is available on the GNU machines and in the Texinfo and other GNU
22370 source distributions.
22371
22372 The FDL provides for omitting itself under certain conditions, but in
22373 that case the sample texts given here have to be modified. @xref{GNU
22374 Free Documentation License}.
22375
22376 @item
22377 If the FSF is not the copyright holder, then use the appropriate name.
22378
22379 @item
22380 If your manual is published on paper by the FSF or is longer than 400
22381 pages, you should include the standard FSF cover texts (@pxref{License
22382 Notices for Documentation,,, maintain, GNU Maintainer Information}).
22383
22384 @item
22385 For documents that express your personal views, feelings or
22386 experiences, it is more appropriate to use a license permitting only
22387 verbatim copying, rather than the FDL@. @xref{Verbatim Copying
22388 License}.
22389
22390 @end itemize
22391
22392 Here is the sample document:
22393
22394 @verbatim
22395 \input texinfo @c -*-texinfo-*-
22396 @comment $Id@w{$}
22397 @comment %**start of header
22398 @setfilename sample.info
22399 @include version.texi
22400 @settitle GNU Sample @value{VERSION}
22401 @syncodeindex pg cp
22402 @comment %**end of header
22403 @copying
22404 This manual is for GNU Sample (version @value{VERSION}, @value{UPDATED}),
22405 which is an example in the Texinfo documentation.
22406
22407 Copyright @copyright{} 2013 Free Software Foundation, Inc.
22408
22409 @quotation
22410 Permission is granted to copy, distribute and/or modify this document
22411 under the terms of the GNU Free Documentation License, Version 1.3 or
22412 any later version published by the Free Software Foundation; with no
22413 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
22414 Texts. A copy of the license is included in the section entitled
22415 ``GNU Free Documentation License''.
22416 @end quotation
22417 @end copying
22418
22419 @dircategory Texinfo documentation system
22420 @direntry
22421 * sample: (sample)Invoking sample.
22422 @end direntry
22423
22424 @titlepage
22425 @title GNU Sample
22426 @subtitle for version @value{VERSION}, @value{UPDATED}
22427 @author A.U. Thor (@email{bug-sample@@gnu.org})
22428 @page
22429 @vskip 0pt plus 1filll
22430 @insertcopying
22431 @end titlepage
22432
22433 @contents
22434
22435 @ifnottex
22436 @node Top
22437 @top GNU Sample
22438
22439 This manual is for GNU Sample (version @value{VERSION}, @value{UPDATED}).
22440 @end ifnottex
22441
22442 @menu
22443 * Invoking sample::
22444 * GNU Free Documentation License::
22445 * Index::
22446 @end menu
22447
22448
22449 @node Invoking sample
22450 @chapter Invoking sample
22451
22452 @pindex sample
22453 @cindex invoking @command{sample}
22454
22455 This is a sample manual. There is no sample program to
22456 invoke, but if there were, you could see its basic usage
22457 and command line options here.
22458
22459
22460 @node GNU Free Documentation License
22461 @appendix GNU Free Documentation License
22462
22463 @include fdl.texi
22464
22465
22466 @node Index
22467 @unnumbered Index
22468
22469 @printindex cp
22470
22471 @bye
22472 @end verbatim
22473
22474
22475 @node Verbatim Copying License
22476 @section Verbatim Copying License
22477
22478 @cindex Verbatim copying license
22479 @cindex License for verbatim copying
22480
22481 For software manuals and other documentation, it is critical to use a
22482 license permitting free redistribution and updating, so that when a free
22483 program is changed, the documentation can be updated as well.
22484
22485 On the other hand, for documents that express your personal views,
22486 feelings or experiences, it is more appropriate to use a license
22487 permitting only verbatim copying.
22488
22489 Here is sample text for such a license permitting verbatim copying only.
22490 This is just the license text itself. For a complete sample document,
22491 see the previous sections.
22492
22493 @verbatim
22494 @copying
22495 This document is a sample for allowing verbatim copying only.
22496
22497 Copyright @copyright{} 2013 Free Software Foundation, Inc.
22498
22499 @quotation
22500 Permission is granted to make and distribute verbatim copies
22501 of this entire document without royalty provided the
22502 copyright notice and this permission notice are preserved.
22503 @end quotation
22504 @end copying
22505 @end verbatim
22506
22507
22508 @node All-permissive Copying License
22509 @section All-permissive Copying License
22510
22511 @cindex All-permissive copying license
22512 @cindex License for all-permissive copying
22513
22514 For software manuals and other documentation, it is important to use a
22515 license permitting free redistribution and updating, so that when a free
22516 program is changed, the documentation can be updated as well.
22517
22518 On the other hand, for small supporting files, short manuals (under 300
22519 lines long) and rough documentation (README files, INSTALL files, etc.),
22520 the full FDL would be overkill. They can use a simple all-permissive
22521 license.
22522
22523 Here is sample text for such an all-permissive license. This is just
22524 the license text itself. For a complete sample document, see the
22525 previous sections.
22526
22527 @example
22528 Copyright @@copyright@{@} 2013 Free Software Foundation, Inc.
22529
22530 Copying and distribution of this file, with or without modification,
22531 are permitted in any medium without royalty provided the copyright
22532 notice and this notice are preserved.
22533 @end example
22534
22535
22536 @node Headings
22537 @appendix Page Headings
22538 @cindex Headings
22539 @cindex Footings
22540 @cindex Page numbering
22541 @cindex Page headings
22542 @cindex Formatting headings and footings
22543
22544 Most printed manuals contain headings along the top of every page
22545 except the title and copyright pages. Some manuals also contain
22546 footings. @c HTML output also supports something like these, but in a
22547 @c completely different way: @pxref{Customizing HTML Page Layout}.
22548 Headings and footings have no meaning in Info or the other output
22549 formats.
22550
22551 @menu
22552 * Headings Introduced:: Conventions for using page headings.
22553 * Heading Format:: Standard page heading formats.
22554 * Heading Choice:: How to specify the type of page heading.
22555 * Custom Headings:: How to create your own headings and footings.
22556 @end menu
22557
22558 @node Headings Introduced
22559 @section Headings Introduced
22560
22561 Texinfo provides standard page heading formats for manuals that are
22562 printed on one side of each sheet of paper and for manuals that are
22563 printed on both sides of the paper. Typically, you will use these
22564 formats, but you can specify your own format if you wish.
22565
22566 In addition, you can specify whether chapters should begin on a new
22567 page, or merely continue the same page as the previous chapter; and if
22568 chapters begin on new pages, you can specify whether they must be
22569 odd-numbered pages.
22570
22571 By convention, a book is printed on both sides of each sheet of paper.
22572 When you open a book, the right-hand page is odd-numbered, and
22573 chapters begin on right-hand pages---a preceding left-hand page is
22574 left blank if necessary. Reports, however, are often printed on just
22575 one side of paper, and chapters begin on a fresh page immediately
22576 following the end of the preceding chapter. In short or informal
22577 reports, chapters often do not begin on a new page at all, but are
22578 separated from the preceding text by a small amount of whitespace.
22579
22580 The @code{@@setchapternewpage} command controls whether chapters begin
22581 on new pages, and whether one of the standard heading formats is used.
22582 In addition, Texinfo has several heading and footing commands that you
22583 can use to generate your own heading and footing formats.
22584
22585 In Texinfo, headings and footings are single lines at the tops and
22586 bottoms of pages; you cannot create multiline headings or footings.
22587 Each header or footer line is divided into three parts: a left part, a
22588 middle part, and a right part. Any part, or a whole line, may be left
22589 blank. Text for the left part of a header or footer line is set
22590 flushleft; text for the middle part is centered; and, text for the
22591 right part is set flushright.
22592
22593
22594 @node Heading Format
22595 @section Standard Heading Formats
22596
22597 Texinfo provides two standard heading formats, one for manuals printed
22598 on one side of each sheet of paper, and the other for manuals printed
22599 on both sides of the paper.
22600
22601 By default, nothing is specified for the footing of a Texinfo file,
22602 so the footing remains blank.
22603
22604 The standard format for single-sided printing consists of a header
22605 line in which the left-hand part contains the name of the chapter, the
22606 central part is blank, and the right-hand part contains the page
22607 number.
22608
22609 @need 950
22610 A single-sided page looks like this:
22611
22612 @example
22613 @group
22614 _______________________
22615 | |
22616 | chapter page number |
22617 | |
22618 | Start of text ... |
22619 | ... |
22620 | |
22621 @end group
22622 @end example
22623
22624 The standard format for two-sided printing depends on whether the page
22625 number is even or odd. By convention, even-numbered pages are on the
22626 left- and odd-numbered pages are on the right. (@TeX{} will adjust the
22627 widths of the left- and right-hand margins. Usually, widths are
22628 correct, but during double-sided printing, it is wise to check that
22629 pages will bind properly---sometimes a printer will produce output in
22630 which the even-numbered pages have a larger right-hand margin than the
22631 odd-numbered pages.)
22632
22633 In the standard double-sided format, the left part of the left-hand
22634 (even-numbered) page contains the page number, the central part is
22635 blank, and the right part contains the title (specified by the
22636 @code{@@settitle} command). The left part of the right-hand
22637 (odd-numbered) page contains the name of the chapter, the central part
22638 is blank, and the right part contains the page number.
22639
22640 @need 750
22641 Two pages, side by side as in an open book, look like this:
22642
22643 @example
22644 @group
22645 _______________________ _______________________
22646 | | | |
22647 | page number title | | chapter page number |
22648 | | | |
22649 | Start of text ... | | More text ... |
22650 | ... | | ... |
22651 | | | |
22652 @end group
22653 @end example
22654
22655 @noindent
22656 The chapter name is preceded by the word ``Chapter'', the chapter number
22657 and a colon. This makes it easier to keep track of where you are in the
22658 manual.
22659
22660 @node Heading Choice
22661 @section Specifying the Type of Heading
22662
22663 @TeX{} does not begin to generate page headings for a standard Texinfo
22664 file until it reaches the @code{@@end titlepage} command. Thus, the
22665 title and copyright pages are not numbered. The @code{@@end
22666 titlepage} command causes @TeX{} to begin to generate page headings
22667 according to a standard format specified by the
22668 @code{@@setchapternewpage} command that precedes the
22669 @code{@@titlepage} section.
22670
22671 @need 1000
22672 There are four possibilities:
22673
22674 @table @asis
22675 @item No @code{@@setchapternewpage} command
22676 Cause @TeX{} to specify the single-sided heading format, with chapters
22677 on new pages. This is the same as @code{@@setchapternewpage on}.
22678
22679 @item @code{@@setchapternewpage on}
22680 Specify the single-sided heading format, with chapters on new pages.
22681
22682 @item @code{@@setchapternewpage off}
22683 Cause @TeX{} to start a new chapter on the same page as the last page
22684 of the preceding chapter, after skipping some vertical whitespace.
22685 Also cause @TeX{} to typeset for single-sided printing. (You can
22686 override the headers format with the @code{@@headings double} command;
22687 @pxref{@t{@@headings}}.)
22688
22689 @item @code{@@setchapternewpage odd}
22690 Specify the double-sided heading format, with chapters on new pages.
22691 @end table
22692
22693 @noindent
22694 Texinfo lacks an @code{@@setchapternewpage even} command.
22695
22696
22697 @node Custom Headings
22698 @section How to Make Your Own Headings
22699
22700 You can use the standard headings provided with Texinfo or specify
22701 your own. By default, Texinfo has no footers, so if you specify them,
22702 the available page size for the main text will be slightly reduced.
22703
22704 Texinfo provides six commands for specifying headings and
22705 footings:
22706 @itemize @bullet
22707 @item
22708 @code{@@everyheading} and @code{@@everyfooting} generate page headers and
22709 footers that are the same for both even- and odd-numbered pages.
22710 @item
22711 @code{@@evenheading} and @code{@@evenfooting} command generate headers
22712 and footers for even-numbered (left-hand) pages.
22713 @item
22714 @code{@@oddheading} and @code{@@oddfooting} generate headers and footers
22715 for odd-numbered (right-hand) pages.
22716 @end itemize
22717
22718 Write custom heading specifications in the Texinfo file immediately
22719 after the @code{@@end titlepage} command. You must cancel the
22720 predefined heading commands with the @code{@@headings off} command
22721 before defining your own specifications.
22722
22723 @need 1000
22724 Here is how to tell @TeX{} to place the chapter name at the left, the
22725 page number in the center, and the date at the right of every header
22726 for both even- and odd-numbered pages:
22727
22728 @example
22729 @group
22730 @@headings off
22731 @@everyheading @@thischapter @@| @@thispage @@| @@today@{@}
22732 @end group
22733 @end example
22734
22735 @noindent
22736 You need to divide the left part from the central part and the central
22737 part from the right part by inserting @samp{@@|} between parts.
22738 Otherwise, the specification command will not be able to tell where
22739 the text for one part ends and the next part begins.
22740
22741 Each part can contain text or @@-commands. The text is printed as if
22742 the part were within an ordinary paragraph in the body of the page.
22743 The @@-commands replace themselves with the page number, date, chapter
22744 name, or whatever.
22745
22746 @need 950
22747 Here are the six heading and footing commands:
22748
22749 @table @code
22750 @item @@everyheading @var{left} @@| @var{center} @@| @var{right}
22751 @itemx @@everyfooting @var{left} @@| @var{center} @@| @var{right}
22752 @findex everyheading
22753 @findex everyfooting
22754 The `every' commands specify the format for both even- and odd-numbered
22755 pages. These commands are for documents that are printed on one side
22756 of each sheet of paper, or for documents in which you want symmetrical
22757 headers or footers.
22758
22759 @item @@evenheading @var{left} @@| @var{center} @@| @var{right}
22760 @itemx @@oddheading @var{left} @@| @var{center} @@| @var{right}
22761 @itemx @@evenfooting @var{left} @@| @var{center} @@| @var{right}
22762 @itemx @@oddfooting @var{left} @@| @var{center} @@| @var{right}
22763 @findex evenheading
22764 @findex evenfooting
22765 @findex oddheading
22766 @findex oddfooting
22767 The `even' and `odd' commands specify the format for even-numbered
22768 pages and odd-numbered pages. These commands are for books and
22769 manuals that are printed on both sides of each sheet of paper.
22770 @end table
22771
22772 Use the @samp{@@this@dots{}} series of @@-commands to
22773 provide the names of chapters
22774 and sections and the page number. You can use the
22775 @samp{@@this@dots{}} commands in the left, center, or right portions
22776 of headers and footers, or anywhere else in a Texinfo file so long as
22777 they are between @code{@@iftex} and @code{@@end iftex} commands.
22778
22779 @need 1000
22780 Here are the @samp{@@this@dots{}} commands:
22781
22782 @table @code
22783 @item @@thispage
22784 @findex thispage
22785 Expands to the current page number.
22786
22787 @item @@thissectionname
22788 @findex thissectionname
22789 Expands to the name of the current section.
22790
22791 @item @@thissectionnum
22792 @findex thissectionnum
22793 Expands to the number of the current section.
22794
22795 @item @@thissection
22796 @findex thissection
22797 Expands to the number and name of the current section, in the format
22798 `Section 1: Title'.
22799
22800 @item @@thischaptername
22801 @findex thischaptername
22802 Expands to the name of the current chapter.
22803
22804 @item @@thischapternum
22805 @findex thischapternum
22806 Expands to the number of the current chapter, or letter of the current
22807 appendix.
22808
22809 @item @@thischapter
22810 @findex thischapter
22811 Expands to the number and name of the current
22812 chapter, in the format `Chapter 1: Title'.
22813
22814 @item @@thistitle
22815 @findex thistitle
22816 Expands to the name of the document, as specified by the
22817 @code{@@settitle} command.
22818
22819 @item @@thisfile
22820 @findex thisfile
22821 For @code{@@include} files only: expands to the name of the current
22822 @code{@@include} file. If the current Texinfo source file is not an
22823 @code{@@include} file, this command has no effect. This command does
22824 @emph{not} provide the name of the current Texinfo source file unless
22825 it is an @code{@@include} file. (@xref{Include Files}, for more
22826 information about @code{@@include} files.)
22827 @end table
22828
22829 @noindent
22830 You can also use the @code{@@today@{@}} command, which expands to the
22831 current date, in `1 Jan 1900' format.
22832 @findex today
22833
22834 Other @@-commands and text are printed in a header or footer just as
22835 if they were in the body of a page. It is useful to incorporate text,
22836 particularly when you are writing drafts:
22837
22838 @example
22839 @group
22840 @@headings off
22841 @@everyheading @@emph@{Draft!@} @@| @@thispage @@| @@thischapter
22842 @@everyfooting @@| @@| Version: 0.27: @@today@{@}
22843 @end group
22844 @end example
22845
22846 Beware of overlong titles: they may overlap another part of the
22847 header or footer and blot it out.
22848
22849 If you have very short chapters and/or sections, several of them can
22850 appear on a single page. You can specify which chapters and sections
22851 you want @code{@@thischapter}, @code{@@thissection} and other such
22852 macros to refer to on such pages as follows:
22853
22854 @table @code
22855 @item @@everyheadingmarks @var{ref}
22856 @itemx @@everyfootingmarks @var{ref}
22857 @findex everyheadingmarks
22858 @findex everyfootingmarks
22859 The @var{ref} argument can be either @code{top} (the @code{@@this...}
22860 commands will refer to the chapter/section at the top of a page) or
22861 @code{bottom} (the commands will reflect the situation at the bottom
22862 of a page). These @samp{@@every...} commands specify what to do on
22863 both even- and odd-numbered pages.
22864
22865 @item @@evenheadingmarks @var{ref}
22866 @itemx @@oddheadingmarks @var{ref}
22867 @itemx @@evenfootingmarks @var{ref}
22868 @itemx @@oddfootingmarks @var{ref}
22869 @findex evenheadingmarks
22870 @findex oddheadingmarks
22871 @findex evenfootingmarks
22872 @findex oddfootingmarks
22873 These @samp{@@even...} and @samp{@@odd...} commands specify what to do
22874 on only even- or odd-numbered pages, respectively. The @var{ref}
22875 argument is the same as with the @samp{@@every...} commands.
22876 @end table
22877
22878 Write these commands immediately after the @code{@@...contents}
22879 commands, or after the @code{@@end titlepage} command if you don't
22880 have a table of contents or if it is printed at the end of your
22881 manual.
22882
22883 By default the @code{@@this...} commands reflect the situation at the
22884 bottom of a page both in headings and in footings.
22885
22886
22887 @node Catching Mistakes
22888 @appendix Catching Mistakes
22889 @cindex Structure, catching mistakes in
22890 @cindex Nodes, catching mistakes
22891 @cindex Catching mistakes
22892 @cindex Correcting mistakes
22893 @cindex Mistakes, catching
22894 @cindex Problems, catching
22895 @cindex Debugging the Texinfo structure
22896
22897 Besides mistakes in the content of your documentation, there are two
22898 kinds of mistake you can make with Texinfo: you can make mistakes with
22899 @@-commands, and you can make mistakes with the structure of the nodes
22900 and chapters.
22901
22902 XEmacs has two tools for catching the @@-command mistakes and two for
22903 catching structuring mistakes.
22904
22905 For finding problems with @@-commands, you can run @TeX{} or a region
22906 formatting command on the region that has a problem; indeed, you can
22907 run these commands on each region as you write it.
22908
22909 For finding problems with the structure of nodes and chapters, you can use
22910 @kbd{C-c C-s} (@code{texinfo-show-structure}) and the related @code{occur}
22911 command and you can use the @kbd{M-x Info-validate} command.
22912
22913 @menu
22914 * @t{makeinfo} Preferred:: @code{makeinfo} finds errors.
22915 * Debugging with Info:: How to catch errors with Info formatting.
22916 * Debugging with @TeX{}:: How to catch errors with @TeX{} formatting.
22917 * Using @t{texinfo-show-structure}:: How to use @code{texinfo-show-structure}.
22918 * Using @t{occur}:: How to list all lines containing a pattern.
22919 * Running @t{Info-validate}:: How to find badly referenced nodes.
22920 @end menu
22921
22922
22923 @node @t{makeinfo} Preferred
22924 @section @code{makeinfo} Preferred
22925
22926 @c anchor{makeinfo Preferred}@c prev name
22927
22928 The @code{makeinfo} program does an excellent job of catching errors
22929 and reporting them---far better than @code{texinfo-format-region} or
22930 @code{texinfo-format-buffer}. In addition, the various functions for
22931 automatically creating and updating node pointers and menus remove
22932 many opportunities for human error.
22933
22934 If you can, use the updating commands to create and insert pointers
22935 and menus. These prevent many errors. Then use @code{makeinfo} (or
22936 its Texinfo mode manifestations, @code{makeinfo-region} and
22937 @code{makeinfo-buffer}) to format your file and check for other
22938 errors. This is the best way to work with Texinfo. But if you
22939 cannot use @code{makeinfo}, or your problem is very puzzling, then you
22940 may want to use the tools described in this appendix.
22941
22942
22943 @node Debugging with Info
22944 @section Catching Errors with Info Formatting
22945 @cindex Catching errors with Info formatting
22946 @cindex Debugging with Info formatting
22947
22948 After you have written part of a Texinfo file, you can use the
22949 @code{texinfo-format-region} or the @code{makeinfo-region} command to
22950 see whether the region formats properly.
22951
22952 Most likely, however, you are reading this section because for some
22953 reason you cannot use the @code{makeinfo-region} command; therefore, the
22954 rest of this section presumes that you are using
22955 @code{texinfo-format-region}.
22956
22957 If you have made a mistake with an @@-command,
22958 @code{texinfo-format-region} will stop processing at or after the
22959 error and display an error message. To see where in the buffer the
22960 error occurred, switch to the @samp{*Info Region*} buffer; the cursor
22961 will be in a position that is after the location of the error. Also,
22962 the text will not be formatted after the place where the error
22963 occurred (or more precisely, where it was detected).
22964
22965 For example, if you accidentally end a menu with the command @code{@@end
22966 menus} with an `s' on the end, instead of with @code{@@end menu}, you
22967 will see an error message that says:
22968
22969 @example
22970 @@end menus is not handled by texinfo
22971 @end example
22972
22973 @noindent
22974 The cursor will stop at the point in the buffer where the error
22975 occurs, or not long after it. The buffer will look like this:
22976
22977 @example
22978 @group
22979 ---------- Buffer: *Info Region* ----------
22980 * Menu:
22981
22982 * Using texinfo-show-structure:: How to use
22983 `texinfo-show-structure'
22984 to catch mistakes.
22985 * Running Info-validate:: How to check for
22986 unreferenced nodes.
22987 @@end menus
22988 @point{}
22989 ---------- Buffer: *Info Region* ----------
22990 @end group
22991 @end example
22992
22993 The @code{texinfo-format-region} command sometimes provides slightly
22994 odd error messages. For example, the following cross reference fails to format:
22995
22996 @example
22997 (@@xref@{Catching Mistakes, for more info.)
22998 @end example
22999
23000 @noindent
23001 In this case, @code{texinfo-format-region} detects the missing closing
23002 brace but displays a message that says @samp{Unbalanced parentheses}
23003 rather than @samp{Unbalanced braces}. This is because the formatting
23004 command looks for mismatches between braces as if they were
23005 parentheses.
23006
23007 Sometimes @code{texinfo-format-region} fails to detect mistakes. For
23008 example, in the following, the closing brace is swapped with the
23009 closing parenthesis:
23010
23011 @example
23012 (@@xref@{Catching Mistakes), for more info.@}
23013 @end example
23014
23015 @noindent
23016 Formatting produces:
23017 @example
23018 (*Note for more info.: Catching Mistakes)
23019 @end example
23020
23021 The only way for you to detect this error is to realize that the
23022 reference should have looked like this:
23023
23024 @example
23025 (*Note Catching Mistakes::, for more info.)
23026 @end example
23027
23028 Incidentally, if you are reading this node in Info and type @kbd{f
23029 @key{RET}} (@code{Info-follow-reference}), you will generate an error
23030 message that says:
23031
23032 @example
23033 No such node: "Catching Mistakes) The only way @dots{}
23034 @end example
23035
23036 @noindent
23037 This is because Info perceives the example of the error as the first
23038 cross reference in this node and if you type a @key{RET} immediately
23039 after typing the Info @kbd{f} command, Info will attempt to go to the
23040 referenced node. If you type @kbd{f catch @key{TAB} @key{RET}}, Info
23041 will complete the node name of the correctly written example and take
23042 you to the `Catching Mistakes' node. (If you try this, you can return
23043 from the `Catching Mistakes' node by typing @kbd{l}
23044 (@code{Info-last}).)
23045
23046
23047 @node Debugging with @TeX{}
23048 @section Debugging with @TeX{}
23049 @cindex Catching errors with @TeX{} formatting
23050 @cindex Debugging with @TeX{} formatting
23051
23052 You can also catch mistakes when you format a file with @TeX{}.
23053
23054 Usually, you will want to do this after you have run
23055 @code{texinfo-format-buffer} (or, better, @code{makeinfo-buffer}) on
23056 the same file, because @code{texinfo-format-buffer} sometimes displays
23057 error messages that make more sense than @TeX{}. (@xref{Debugging
23058 with Info}, for more information.)
23059
23060 For example, @TeX{} was run on a Texinfo file, part of which is shown
23061 here:
23062
23063 @example
23064 ---------- Buffer: texinfo.texi ----------
23065 name of the Texinfo file as an extension. The
23066 @@samp@{??@} are `wildcards' that cause the shell to
23067 substitute all the raw index files. (@@xref@{sorting
23068 indices, for more information about sorting
23069 indices.)@@refill
23070 ---------- Buffer: texinfo.texi ----------
23071 @end example
23072
23073 @noindent
23074 (The cross reference lacks a closing brace.)
23075 @TeX{} produced the following output, after which it stopped:
23076
23077 @example
23078 ---------- Buffer: *tex-shell* ----------
23079 Runaway argument?
23080 @{sorting indices, for more information about sorting
23081 indices.) @@refill @@ETC.
23082 ! Paragraph ended before @@xref was complete.
23083 <to be read again>
23084 @@par
23085 l.27
23086
23087 ?
23088 ---------- Buffer: *tex-shell* ----------
23089 @end example
23090
23091 In this case, @TeX{} produced an accurate and
23092 understandable error message:
23093
23094 @example
23095 Paragraph ended before @@xref was complete.
23096 @end example
23097
23098 @noindent
23099 @samp{@@par} is an internal @TeX{} command of no relevance to Texinfo.
23100 @samp{l.27} means that @TeX{} detected the problem on line 27 of the
23101 Texinfo file. The @samp{?} is the prompt @TeX{} uses in this
23102 circumstance.
23103
23104 Unfortunately, @TeX{} is not always so helpful, and sometimes you must
23105 truly be a Sherlock Holmes to discover what went wrong.
23106
23107 In any case, if you run into a problem like this, you can do one of three
23108 things.
23109
23110 @enumerate
23111 @item
23112 You can tell @TeX{} to continue running and ignore just this error by
23113 typing @key{RET} at the @samp{?} prompt.
23114
23115 @item
23116 You can tell @TeX{} to continue running and to ignore all errors as best
23117 it can by typing @kbd{r @key{RET}} at the @samp{?} prompt.
23118
23119 This is often the best thing to do. However, beware: the one error
23120 may produce a cascade of additional error messages as its consequences
23121 are felt through the rest of the file. To stop @TeX{} when it is
23122 producing such an avalanche of error messages, type @kbd{C-c} (or
23123 @kbd{C-c C-c}, if you are running a shell inside XEmacs).
23124
23125 @item
23126 You can tell @TeX{} to stop this run by typing @kbd{x @key{RET}}
23127 at the @samp{?} prompt.
23128 @end enumerate
23129
23130 If you are running @TeX{} inside XEmacs, you need to switch to the shell
23131 buffer and line at which @TeX{} offers the @samp{?} prompt.
23132
23133 Sometimes @TeX{} will format a file without producing error messages even
23134 though there is a problem. This usually occurs if a command is not ended
23135 but @TeX{} is able to continue processing anyhow. For example, if you fail
23136 to end an itemized list with the @code{@@end itemize} command, @TeX{} will
23137 write a DVI file that you can print out. The only error message that
23138 @TeX{} will give you is the somewhat mysterious comment:
23139
23140 @example
23141 (@@end occurred inside a group at level 1)
23142 @end example
23143
23144 @noindent
23145 However, if you print the DVI file, you will find that the text
23146 of the file that follows the itemized list is entirely indented as if
23147 it were part of the last item in the itemized list. The error message
23148 is the way @TeX{} says that it expected to find an @code{@@end}
23149 command somewhere in the file; but that it could not determine where
23150 it was needed.
23151
23152 Another source of notoriously hard-to-find errors is a missing
23153 @code{@@end group} command. If you ever are stumped by
23154 incomprehensible errors, look for a missing @code{@@end group} command
23155 first.
23156
23157 If the Texinfo file lacks header lines,
23158 @TeX{} may stop in the
23159 beginning of its run and display output that looks like the following.
23160 The @samp{*} indicates that @TeX{} is waiting for input.
23161
23162 @example
23163 This is TeX, Version 3.14159 (Web2c 7.0)
23164 (test.texinfo [1])
23165 *
23166 @end example
23167
23168 @noindent
23169 In this case, simply type @kbd{\end @key{RET}} after the asterisk. Then
23170 write the header lines in the Texinfo file and run the @TeX{} command
23171 again. (Note the use of the backslash, @samp{\}. @TeX{} uses @samp{\}
23172 instead of @samp{@@}; and in this circumstance, you are working
23173 directly with @TeX{}, not with Texinfo.)
23174
23175 @node Using @t{texinfo-show-structure}
23176 @section Using @code{texinfo-show-structure}
23177
23178 @cindex Showing the structure of a file
23179 @findex texinfo-show-structure
23180
23181 It is not always easy to keep track of the nodes, chapters, sections, and
23182 subsections of a Texinfo file. This is especially true if you are revising
23183 or adding to a Texinfo file that someone else has written.
23184
23185 In XEmacs, in Texinfo mode, the @code{texinfo-show-structure}
23186 command lists all the lines that begin with the @@-commands that
23187 specify the structure: @code{@@chapter}, @code{@@section},
23188 @code{@@appendix}, and so on. With an argument (@w{@kbd{C-u}}
23189 as prefix argument, if interactive),
23190 the command also shows the @code{@@node} lines. The
23191 @code{texinfo-show-structure} command is bound to @kbd{C-c C-s} in
23192 Texinfo mode, by default.
23193
23194 The lines are displayed in a buffer called the @samp{*Occur*} buffer,
23195 indented by hierarchical level. For example, here is a part of what was
23196 produced by running @code{texinfo-show-structure} on this manual:
23197
23198 @example
23199 @group
23200 Lines matching "^@@\\(chapter \\|sect\\|subs\\|subh\\|
23201 unnum\\|major\\|chapheading \\|heading \\|appendix\\)"
23202 in buffer texinfo.texi.
23203 @dots{}
23204 4177:@@chapter Nodes
23205 4198: @@heading Two Paths
23206 4231: @@section Node and Menu Illustration
23207 4337: @@section The @@code@{@@@@node@} Command
23208 4393: @@subheading Choosing Node and Pointer Names
23209 4417: @@subsection How to Write an @@code@{@@@@node@} Line
23210 4469: @@subsection @@code@{@@@@node@} Line Tips
23211 @dots{}
23212 @end group
23213 @end example
23214
23215 This says that lines 4337, 4393, and 4417 of @file{texinfo.texi} begin
23216 with the @code{@@section}, @code{@@subheading}, and @code{@@subsection}
23217 commands respectively. If you move your cursor into the @samp{*Occur*}
23218 window, you can position the cursor over one of the lines and use the
23219 @kbd{C-c C-c} command (@code{occur-mode-goto-occurrence}), to jump to
23220 the corresponding spot in the Texinfo file. @xref{Other Repeating
23221 Search, , Using Occur, xemacs, XEmacs User's Manual}, for more
23222 information about @code{occur-mode-goto-occurrence}.
23223
23224 The first line in the @samp{*Occur*} window describes the @dfn{regular
23225 expression} specified by @var{texinfo-heading-pattern}. This regular
23226 expression is the pattern that @code{texinfo-show-structure} looks for.
23227 @xref{Regexps, , Using Regular Expressions, xemacs, XEmacs User's Manual},
23228 for more information.
23229
23230 When you invoke the @code{texinfo-show-structure} command, XEmacs will
23231 display the structure of the whole buffer. If you want to see the
23232 structure of just a part of the buffer, of one chapter, for example,
23233 use the @kbd{C-x n n} (@code{narrow-to-region}) command to mark the
23234 region. (@xref{Narrowing, , , xemacs, XEmacs User's Manual}.) This is
23235 how the example used above was generated. (To see the whole buffer
23236 again, use @kbd{C-x n w} (@code{widen}).)
23237
23238 If you call @code{texinfo-show-structure} with a prefix argument by
23239 typing @w{@kbd{C-u C-c C-s}}, it will list lines beginning with
23240 @code{@@node} as well as the lines beginning with the @@-sign commands
23241 for @code{@@chapter}, @code{@@section}, and the like.
23242
23243 You can remind yourself of the structure of a Texinfo file by looking at
23244 the list in the @samp{*Occur*} window; and if you have mis-named a node
23245 or left out a section, you can correct the mistake.
23246
23247 @node Using @t{occur}
23248 @section Using @code{occur}
23249
23250 @cindex Occurrences, listing with @code{@@occur}
23251 @findex occur
23252
23253 Sometimes the @code{texinfo-show-structure} command produces too much
23254 information. Perhaps you want to remind yourself of the overall structure
23255 of a Texinfo file, and are overwhelmed by the detailed list produced by
23256 @code{texinfo-show-structure}. In this case, you can use the @code{occur}
23257 command directly. To do this, type:
23258
23259 @example
23260 @kbd{M-x occur}
23261 @end example
23262
23263 @noindent
23264 and then, when prompted, type a @dfn{regexp}, a regular expression for
23265 the pattern you want to match. (@xref{Regexps, , Regular Expressions,
23266 xemacs, XEmacs User's Manual}.) The @code{occur} command works from
23267 the current location of the cursor in the buffer to the end of the
23268 buffer. If you want to run @code{occur} on the whole buffer, place
23269 the cursor at the beginning of the buffer.
23270
23271 For example, to see all the lines that contain the word
23272 @samp{@@chapter} in them, just type @samp{@@chapter}. This will
23273 produce a list of the chapters. It will also list all the sentences
23274 with @samp{@@chapter} in the middle of the line.
23275
23276 If you want to see only those lines that start with the word
23277 @samp{@@chapter}, type @samp{^@@chapter} when prompted by
23278 @code{occur}. If you want to see all the lines that end with a word
23279 or phrase, end the last word with a @samp{$}; for example,
23280 @samp{catching mistakes$}. This can be helpful when you want to see
23281 all the nodes that are part of the same chapter or section and
23282 therefore have the same `Up' pointer.
23283
23284 @xref{Other Repeating Search, , Using Occur, xemacs, XEmacs User's Manual},
23285 for more information.
23286
23287
23288 @node Running @t{Info-validate}
23289 @section Finding Badly Referenced Nodes
23290
23291 @anchor{Running Info-Validate}@c old name
23292 @findex Info-validate
23293 @cindex Nodes, checking for badly referenced
23294 @cindex Checking for badly referenced nodes
23295 @cindex Looking for badly referenced nodes
23296 @cindex Finding badly referenced nodes
23297 @cindex Badly referenced nodes
23298
23299 You can use the @code{Info-validate} command to check whether any of
23300 the `Next', `Previous', `Up' or other node pointers fail to point to a
23301 node. This command checks that every node pointer points to an
23302 existing node. The @code{Info-validate} command works only on Info
23303 files, not on Texinfo files.
23304
23305 The @code{makeinfo} program validates pointers automatically, so you
23306 do not need to use the @code{Info-validate} command if you are using
23307 @code{makeinfo}. You only may need to use @code{Info-validate} if you
23308 are unable to run @code{makeinfo} and instead must create an Info file
23309 using @code{texinfo-format-region} or @code{texinfo-format-buffer}, or
23310 if you write an Info file from scratch.
23311
23312 @menu
23313 * Using @t{Info-validate}:: How to run @code{Info-validate}.
23314 * Unsplit:: How to create an unsplit file.
23315 * Tagifying:: How to tagify a file.
23316 * Splitting:: How to split a file manually.
23317 @end menu
23318
23319
23320 @node Using @t{Info-validate}
23321 @subsection Using @code{Info-validate}
23322
23323 @cindex Using @code{Info-validate}
23324 @cindex Info validating a large file
23325 @cindex Validating a large file
23326
23327 To use @code{Info-validate}, visit the Info file you wish to check and
23328 type:
23329
23330 @example
23331 M-x Info-validate
23332 @end example
23333
23334 @noindent
23335 Note that the @code{Info-validate} command requires an uppercase
23336 `I'@. You may also need to create a tag table before running
23337 @code{Info-validate}. @xref{Tagifying}.
23338
23339 If your file is valid, you will receive a message that says ``File appears
23340 valid''. However, if you have a pointer that does not point to a node,
23341 error messages will be displayed in a buffer called @samp{*problems in
23342 info file*}.
23343
23344 For example, @code{Info-validate} was run on a test file that contained
23345 only the first node of this manual. One of the messages said:
23346
23347 @example
23348 In node "Overview", invalid Next: Texinfo Mode
23349 @end example
23350
23351 @noindent
23352 This meant that the node called @samp{Overview} had a `Next' pointer that
23353 did not point to anything (which was true in this case, since the test file
23354 had only one node in it).
23355
23356 Now suppose we add a node named @samp{Texinfo Mode} to our test case
23357 but we do not specify a `Previous' for this node. Then we will get
23358 the following error message:
23359
23360 @example
23361 In node "Texinfo Mode", should have Previous: Overview
23362 @end example
23363
23364 @noindent
23365 This is because every `Next' pointer should be matched by a
23366 `Previous' (in the node where the `Next' points) which points back.
23367
23368 @code{Info-validate} also checks that all menu entries and cross references
23369 point to actual nodes.
23370
23371 @code{Info-validate} requires a tag table and does not work with files
23372 that have been split. (The @code{texinfo-format-buffer} command
23373 automatically splits large files.) In order to use @code{Info-validate}
23374 on a large file, you must run @code{texinfo-format-buffer} with an
23375 argument so that it does not split the Info file; and you must create a
23376 tag table for the unsplit file.
23377
23378 @node Unsplit
23379 @subsection Creating an Unsplit File
23380 @cindex Creating an unsplit file
23381 @cindex Unsplit file creation
23382
23383 You can run @code{Info-validate} only on a single Info file that has a
23384 tag table. The command will not work on the indirect subfiles that
23385 are generated when a master file is split. If you have a large file
23386 (longer than 300,000 bytes or so), you need to run the
23387 @code{texinfo-format-buffer} or @code{makeinfo-buffer} command in such
23388 a way that it does not create indirect subfiles. You will also need
23389 to create a tag table for the Info file. After you have done this,
23390 you can run @code{Info-validate} and look for badly referenced
23391 nodes.
23392
23393 The first step is to create an unsplit Info file. To prevent
23394 @code{texinfo-format-buffer} from splitting a Texinfo file into
23395 smaller Info files, give a prefix to the @kbd{M-x
23396 texinfo-format-buffer} command:
23397
23398 @example
23399 C-u M-x texinfo-format-buffer
23400 @end example
23401
23402 @noindent
23403 or else
23404
23405 @example
23406 C-u C-c C-e C-b
23407 @end example
23408
23409 @noindent
23410 When you do this, Texinfo will not split the file and will not create
23411 a tag table for it.
23412 @cindex Making a tag table manually
23413 @cindex Tag table, making manually
23414
23415 @node Tagifying
23416 @subsection Tagifying a File
23417
23418 After creating an unsplit Info file, you must create a tag table for
23419 it. Visit the Info file you wish to tagify and type:
23420
23421 @example
23422 M-x Info-tagify
23423 @end example
23424
23425 @noindent
23426 (Note the uppercase @samp{I} in @code{Info-tagify}.) This creates an
23427 Info file with a tag table that you can validate.
23428
23429 The third step is to validate the Info file:
23430
23431 @example
23432 M-x Info-validate
23433 @end example
23434
23435 @noindent
23436 (Note the uppercase @samp{I} in @code{Info-validate}.)
23437 In brief, the steps are:
23438
23439 @example
23440 @group
23441 C-u M-x texinfo-format-buffer
23442 M-x Info-tagify
23443 M-x Info-validate
23444 @end group
23445 @end example
23446
23447 After you have validated the node structure, you can rerun
23448 @code{texinfo-format-buffer} in the normal way so it will construct a
23449 tag table and split the file automatically, or you can make the tag
23450 table and split the file manually.
23451
23452 @node Splitting
23453 @subsection Splitting a File Manually
23454 @cindex Splitting an Info file manually
23455 @cindex Info file, splitting manually
23456
23457 You should split a large file or else let the
23458 @code{texinfo-format-buffer} or @code{makeinfo-buffer} command do it
23459 for you automatically. (Generally you will let one of the formatting
23460 commands do this job for you. @xref{Creating an Info File}.)
23461
23462 The split-off files are called the indirect subfiles.
23463
23464 Info files are split to save memory. With smaller files, XEmacs does not
23465 have to make such a large buffer to hold the information.
23466
23467 If an Info file has more than 30 nodes, you should also make a tag
23468 table for it. @xref{Using @t{Info-validate}}, for information
23469 about creating a tag table. (Again, tag tables are usually created
23470 automatically by the formatting command; you only need to create a tag
23471 table yourself if you are doing the job manually. Most likely, you
23472 will do this for a large, unsplit file on which you have run
23473 @code{Info-validate}.)
23474
23475 Visit the Info file you wish to tagify and split and type the two
23476 commands:
23477
23478 @example
23479 M-x Info-tagify
23480 M-x Info-split
23481 @end example
23482
23483 @noindent
23484 (Note that the @samp{I} in @samp{Info} is uppercase.)
23485
23486 When you use the @code{Info-split} command, the buffer is modified into a
23487 (small) Info file which lists the indirect subfiles. This file should be
23488 saved in place of the original visited file. The indirect subfiles are
23489 written in the same directory the original file is in, with names generated
23490 by appending @samp{-} and a number to the original file name.
23491
23492 The primary file still functions as an Info file, but it contains just
23493 the tag table and a directory of subfiles.
23494
23495
23496 @node Info Format Specification
23497 @appendix Info Format Specification
23498
23499 @cindex Info format specification
23500 @cindex Specification of Info format
23501 @cindex Definition of Info format
23502
23503 Here we describe the technical details of the Info format.
23504
23505 This format definition was written some 25 years after the Info format
23506 was first devised. So in the event of conflicts between this
23507 definition and actual practice, practice wins. It also assumes some
23508 general knowledge of Texinfo; it is meant to be a guide for
23509 implementors rather than a rigid technical standard. We often refer
23510 back to other parts of this manual for examples and definitions,
23511 rather than redundantly spelling out every detail.
23512
23513 In this formal description, the characters @code{<>*()|=#} are used
23514 for the language of the description itself. Other characters are
23515 literal. The formal constructs used are typical: @code{<...>}
23516 indicates a metavariable name, @samp{=} means definition, @samp{*}
23517 repetition, @samp{?} optional, @samp{()} grouping, @samp{|}
23518 alternation, @samp{#} comment. Exception: @samp{*} at the beginning
23519 of a line is literal.
23520
23521 We specify literal parentheses (those that are part of the Info
23522 format) with @t{<lparen>} and @t{<rparen>}, meaning the single
23523 characters @samp{(} and @samp{)} respectively.
23524
23525 Finally, the two-character sequence @samp{^@var{x}} means the single
23526 character @samp{CTRL-@var{x}}, for any @var{x}.
23527
23528 @menu
23529 * General: Info Format General Layout.
23530 * Text: Info Format Text Constructs.
23531 @end menu
23532
23533
23534 @node Info Format General Layout
23535 @section Info Format General Layout
23536
23537 This section describes the overall layout of Info manuals.
23538
23539 @menu
23540 * Whole: Info Format Whole Manual. Split vs.@: nonsplit manuals.
23541 * Preamble: Info Format Preamble.
23542 * Indirect: Info Format Indirect Tag Table.
23543 * Tag table: Info Format Tag Table.
23544 * Local variables: Info Format Local Variables.
23545 * Regular nodes: Info Format Regular Nodes.
23546 @end menu
23547
23548
23549 @node Info Format Whole Manual
23550 @subheading Info Format: A Whole Manual
23551
23552 @cindex Nonsplit manuals, Info format of
23553 @cindex Split manuals, Info format of
23554 @cindex Whole manual, in Info format
23555
23556 To begin, an Info manual is either @dfn{nonsplit} (contained wholly
23557 within a single file) or @dfn{split} (across several files).
23558
23559 The syntax for a nonsplit manual is:
23560
23561 @example
23562 <nonsplit info file> =
23563 <preamble>
23564 <node>*
23565 <tag table>
23566 (<local variables>)?
23567 @end example
23568
23569 When split, there is a @dfn{main file}, which contains only pointers
23570 to the nodes given in other @dfn{subfiles}. The main file looks
23571 like this:
23572
23573 @example
23574 <split info main file> =
23575 <preamble>
23576 <indirect table>
23577 <tag table>
23578 (<local variables>)?
23579 @end example
23580
23581 The subfiles in a split manual have the following syntax:
23582
23583 @example
23584 <split info subfile> =
23585 <preamble>
23586 <node>*
23587 @end example
23588
23589
23590 @node Info Format Preamble
23591 @subheading Info Format: Preamble
23592
23593 @cindex Preamble, in Info format
23594
23595 The @t{<preamble>} is text at the beginning of all output files.
23596 It is not intended to be visible by default in an Info viewer, but
23597 may be displayed upon user request.
23598
23599 @example
23600 <preamble> =
23601 <identification> # "This is FILENAME, produced by ..."
23602 <copying text> # Expansion of @@copying text.
23603 <dir entries> # Derived from @@dircategory and @@direntry.
23604 @end example
23605
23606 These pieces are:
23607
23608 @table @t
23609 @item <identification line>
23610 An arbitrary string beginning the output file, followed by a blank
23611 line.
23612
23613 @item <copying text>
23614 The expansion of an @code{@@copying} environment, if the manual has
23615 one (@pxref{@t{@@copying}}).
23616
23617 @item <dir entries>
23618 The result of any @code{@@dircategory} and @code{@@direntry}
23619 commands present in the manual (@pxref{Installing Dir Entries}).
23620
23621 @end table
23622
23623
23624 @node Info Format Indirect Tag Table
23625 @subheading Info Format: Indirect Tag Table
23626
23627 @cindex Indirect tag table, in Info format
23628
23629 The indirect table is written to the main file in the case of split
23630 output only. It specifies the starting byte position of each split
23631 output file (as a decimal integer):
23632
23633 @example
23634 <indirect table> =
23635 ^_
23636 Indirect:
23637 (<filename>: <bytepos>)*
23638 @end example
23639
23640 The number of preamble bytes written to each output file is included
23641 in the positions. Neither the preamble nor the size of the top-level
23642 output file is included.
23643
23644 The first actual node of content will be pointed to by the first
23645 entry.
23646
23647 Unfortunately, Info-creating programs such as @code{makeinfo} have not
23648 always implemented these rules perfectly, due to various bugs and
23649 oversights. Therefore, robust Info viewers should fall back to
23650 searching ``nearby'' the given position for a node, instead of just
23651 giving up if the position is not perfectly at a node beginning.
23652
23653 As an example, suppose split output is generated for the GDB manual.
23654 The top-level file @file{gdb.info} will contain something like this:
23655
23656 @example
23657 ^_
23658 Indirect:
23659 gdb.info-1: 1878
23660 gdb.info-2: 295733
23661 ...
23662 @end example
23663
23664 This tells Info viewers that the first node of the manual occurs at
23665 byte 1878 (i.e., after the preamble) of the file @file{gdb.info-1}.
23666 The first node written to @file{gdb.info-2} would start at byte 295733
23667 if the subsequent @file{gdb.info-*} files (not including
23668 @file{gdb.info} files were appended to @file{gdb.info-1}, including
23669 their preambles.
23670
23671
23672 @node Info Format Tag Table
23673 @subheading Info Format: Tag Table
23674
23675 @cindex Tag table, in Info format
23676
23677 The tag table specifies the starting byte position of each node and anchor
23678 in the file. It is written in the main output file only, not (in the
23679 case of split output) any subfiles.
23680
23681 @example
23682 <tag table> =
23683 ^_
23684 Tag Table:
23685 <lparen>Indirect<rparen> # this line appears in split output only
23686 (Node|Ref): <nodeid>^?<bytepos>
23687 ^_
23688 End Tag Table
23689 @end example
23690
23691 The @samp{(Indirect)} line is the next line after @samp{Tag Table:}
23692 in the case of split output only.
23693
23694 Each following line defines an identifier as either an anchor or a
23695 node, as specific. It is an error to define the same identifier both
23696 ways. For example, @samp{Node: Top^?1647} says that the node named
23697 @samp{Top} starts at byte 1647 while @samp{Ref:
23698 Overview-Footnote-1^?30045} says that the anchor named
23699 @samp{Overview-Footnote-1} starts at byte 30045.
23700
23701 In the case of nonsplit output, the byte positions simply refer to the
23702 location in the output file. In the case of split output, the byte
23703 positions refer to an imaginary file created by concatenating all the
23704 split files (but not the top-level file). See the previous section.
23705
23706 Here is an example:
23707
23708 @example
23709 ^_
23710 Tag Table:
23711 Node: Top^_89
23712 Node: Ch1^_292
23713 ^_
23714 End Tag Table
23715 @end example
23716
23717 This specifies a manual with two nodes, `Top' and `Ch1', at byte
23718 positions 89 and 292 respectively. Because the @samp{(Indirect)} line
23719 is not present, the manual is not split.
23720
23721
23722 @node Info Format Local Variables
23723 @subheading Info Format: Local Variables
23724
23725 @cindex Local variable section, in Info format
23726
23727 The local variables section is optional and is currently used to give the
23728 encoding information. It may be augmented in the future.
23729
23730 @example
23731 <local variables> =
23732 ^_
23733 Local Variables:
23734 coding: <encoding>
23735 End:
23736 @end example
23737
23738 @xref{@t{@@documentencoding}}.
23739
23740
23741 @node Info Format Regular Nodes
23742 @subheading Info Format: Regular Nodes
23743
23744 @cindex Info nodes, in Info format
23745
23746 Regular nodes look like this:
23747
23748 @example
23749 <node> =
23750 ^_
23751 File: <fn>, Node: <id1>, (Next: <id2>, )? (Prev: <id3>, )? Up: <id4>
23752
23753 <general text, until the next ^_ or end-of-file>
23754 @end example
23755
23756 The @code{Next} and @code{Prev} pointers are optional. The @code{Up}
23757 pointer may technically also be absent, although this is most likely the
23758 case of a wrongly-structured Info manual. At least one space must be
23759 present after each colon and comma, but any number of spaces are
23760 ignored.
23761
23762 This @t{<node>} defines @t{<id1>} in file @t{<fn>}, which is typically
23763 just @samp{manualname} or perhaps @samp{manualname.info}. Each of the
23764 other references @t{<id2>}, @t{<id3>}, and @t{<id4>} must be defined
23765 with either @samp{Node} or @samp{Ref} in the @t{<tag table>}.
23766
23767 Conventionally the nodes are arranged to form a tree, but this is not
23768 a requirement of the format. Each pointer can refer to any defined
23769 identifier.
23770
23771 Identifiers cannot include periods, commas, colons or parentheses
23772 (including @@-commands which produce any of these); these can confuse
23773 Info readers. @xref{Node Line Requirements}.
23774
23775 The @t{<general text>} of the node can include the special constructs
23776 described next.
23777
23778
23779 @node Info Format Text Constructs
23780 @section Info Format Text Constructs
23781
23782 @cindex Info format text constructs
23783 @cindex text constructs, Info format
23784
23785 These special Info constructs can appear within the text of a node.
23786
23787 @menu
23788 * Menu: Info Format Menu.
23789 * Image: Info Format Image.
23790 * Printindex: Info Format Printindex.
23791 * Xref: Info Format Cross Reference.
23792 @end menu
23793
23794
23795 @node Info Format Menu
23796 @subsection Info Format: Menu
23797
23798 @cindex Menus, in Info format
23799
23800 Conventionally menus appear at the end of nodes, but the Info format
23801 places no restrictions on their location.
23802
23803 @example
23804 <menu> =
23805 * Menu:
23806 (<menu entry> | <menu comment>)*
23807 @end example
23808
23809 The parts of a @t{<menu entry>} are described in @ref{Menu Parts}.
23810
23811 A @t{<menu comment>} is any line not beginning with @samp{*} that
23812 appears either at the beginning of the menu or is separated from a
23813 menu entry by one or more blank lines. These comments are intended to
23814 be displayed as part of the menu, as-is (@pxref{Writing a Menu}).
23815
23816
23817 @node Info Format Image
23818 @subsection Info Format: Image
23819
23820 @cindex Images, in Info format
23821
23822 The @code{@@image} command results in the following special directive
23823 within the Info file (@pxref{Images}):
23824
23825 @example
23826 <image> =
23827 ^@@^H[image src="<image file>"
23828 (text="<txt file contents>")?
23829 (alt="<alt text>")?
23830 ^@@^H]
23831 @end example
23832
23833 The line breaks and indentation in this description are editorial; the
23834 whitespace between the different parts of the directive in Info files
23835 is arbitrary.
23836
23837 In the string @t{<image file>}, @t{<txt file contents>} and @t{<alt
23838 text>}, @samp{"} is quoted as @samp{\"} and @samp{\} is quoted as
23839 @samp{\\}. The text and alt specifications are optional.
23840
23841 The @t{alt} value serves the same purpose as in HTML: A prose
23842 description of the image. In text-only displays or speech systems,
23843 for example, the @t{alt} value may be used instead of displaying the
23844 (typically graphical) @t{<image file>}.
23845
23846 The @t{<txt file contents>}, if present, should be taken as an ASCII
23847 representation of the image, and also may be used on a text-only
23848 display.
23849
23850 The format does not prescribe the choice between displaying the
23851 @t{<image file>}, the @t{<alt text>} or @t{<txt file contents>}.
23852
23853
23854 @node Info Format Printindex
23855 @subsection Info Format: Printindex
23856
23857 @cindex Indices, in Info format
23858
23859 Indices in Info format are generally written as a menu
23860 (@pxref{Indices}), but with an additional directive at the beginning
23861 marking this as an index node:
23862
23863 @example
23864 <printindex> =
23865 ^@@^H[index^@@^H]
23866 * Menu:
23867
23868 <index entry>*
23869 @end example
23870
23871 The @t{<index entry>} items are similar to normal menu entries, but
23872 the free-format description is replaced by the line number of where
23873 the entries occurs in the text:
23874
23875 @example
23876 <index entry> =
23877 * <entry text>: <entry node>. <lparen>line <lineno><rparen>
23878 @end example
23879
23880 @noindent
23881 The @t{<entry text>} is the index term. The @t{<lineno>} is an
23882 unsigned integer, given relative to the start of the @t{<entry node>}.
23883 There may be arbitrary whitespace after the colon and period, as usual
23884 in menus. Here is an example:
23885
23886 @example
23887 ^@@^H[index^@@^H]
23888 * Menu:
23889
23890 * thunder: Weather Phenomena. (line 5)
23891 @end example
23892
23893 This means that an index entry for `thunder' appears at line 5 of the
23894 node `Weather Phenomena'.
23895
23896
23897 @node Info Format Cross Reference
23898 @subsection Info Format: Cross Reference
23899
23900 @cindex Cross references, in Info format
23901
23902 A general cross reference in Info format is written as follows:
23903
23904 @example
23905 <cross-reference> =
23906 * (N|n)ote (<id>:: | <label>:(<lparen><infofile><rparen>)?<id>(.|,))
23907 @end example
23908
23909 Whether @samp{note} or @samp{Note} is used is not significant.
23910
23911 The @samp{<id>::} form indicates a node or anchor reference within the
23912 current manual.
23913
23914 The longer form indicates a general reference, typically used to refer
23915 to a node or anchor in a different manual, but possibly to the current
23916 manual. The @t{<label>} is descriptive text; the optional
23917 @samp{(<infofile>)} is the filename of the manual being referenced,
23918 and the @t{<id>} is the node or anchor within that manual, terminated
23919 by a comma or period. That final punctuation is part of the
23920 surrounding sentence, and should be displayed.
23921
23922 Here are some examples:
23923
23924 @example
23925 *note GNU Free Documentation License::
23926 *note Tag table: Info Format Tag Table, for details.
23927 *Note Overview: (make)Top.
23928 @end example
23929
23930 The first shows the short form, a reference to a node in the current
23931 manual.
23932
23933 The second also refers to a node in the current manual, namely `Info
23934 Format Tag Table'; the `Tag table' before the @samp{:} is only a label
23935 on this particular reference.
23936
23937 The third example refers to the node `Top' in another manual, namely
23938 @samp{make}, with `Overview' being the label for this cross reference.
23939
23940 @xref{Cross References}.
23941
23942
23943 @c The simple description in the command summary seems sufficient to me
23944 @c these days, so ignore this appendix. --karl, 13mar04.
23945 @c
23946 @c @node Refilling Paragraphs
23947 @c @appendix Refilling Paragraphs
23948 @c @cindex Refilling paragraphs
23949 @c @cindex Filling paragraphs
23950 @c @cindex Paragraphs, filling
23951 @c @findex refill
23952 @c
23953 @c The @code{@@refill} command refills and, optionally, indents the first
23954 @c line of a paragraph.@footnote{Perhaps the command should have been
23955 @c called the @code{@@refillandindent} command, but @code{@@refill} is
23956 @c shorter and the name was chosen before indenting was possible.} The
23957 @c @code{@@refill} command is no longer important, but we describe it here
23958 @c because you once needed it. You will see it in many old Texinfo
23959 @c files.
23960 @c
23961 @c Without refilling, paragraphs containing long @@-constructs may look
23962 @c bad after formatting because the formatter removes @@-commands and
23963 @c shortens some lines more than others. In the past, neither the
23964 @c @code{texinfo-format-region} command nor the
23965 @c @code{texinfo-format-buffer} command refilled paragraphs
23966 @c automatically. The @code{@@refill} command had to be written at the
23967 @c end of every paragraph to cause these formatters to fill them. (Both
23968 @c @TeX{} and @code{makeinfo} have always refilled paragraphs
23969 @c automatically.) Now, all the Info formatters automatically fill and
23970 @c indent those paragraphs that need to be filled and indented.
23971 @c
23972 @c The @code{@@refill} command causes @code{texinfo-format-region} and
23973 @c @code{texinfo-format-buffer} to refill a paragraph in the Info file
23974 @c @emph{after} all the other processing has been done. For this reason,
23975 @c you can not use @code{@@refill} with a paragraph containing either
23976 @c @code{@@*} or @code{@@w@{ @dots{} @}} since the refilling action will
23977 @c override those two commands.
23978 @c
23979 @c The @code{texinfo-format-region} and @code{texinfo-format-buffer}
23980 @c commands now automatically append @code{@@refill} to the end of each
23981 @c paragraph that should be filled. They do not append @code{@@refill} to
23982 @c the ends of paragraphs that contain @code{@@*} or @w{@code{@@w@{ @dots{}@}}}
23983 @c and therefore do not refill or indent them.
23984
23985
23986 @c These are no longer ``new'', and the explanations
23987 @c are all given elsewhere anyway. So ignore the entire appendix.
23988 @c --karl, 25apr97.
23989 @c node New Features, Command and Variable Index, Obtaining TeX, Top
23990 @c appendix Second Edition Features
23991
23992 @c @tex
23993 @c % Widen the space for the first column so three control-character %
23994 @c strings fit in the first column. Switched back to default .8in %
23995 @c value at end of chapter. \global\tableindent=1.0in
23996 @c @end tex
23997 @c
23998 @c The second edition of the Texinfo manual describes more than 20 new
23999 @c Texinfo mode commands and more than 50 previously undocumented Texinfo
24000 @c @@-commands. This edition is more than twice the length of the first
24001 @c edition.
24002 @c
24003 @c Here is a brief description of the new commands.
24004 @c
24005 @c @c menu
24006 @c * New Texinfo Mode Commands:: The updating commands are especially useful.
24007 @c * New Commands:: Many newly described @@-commands.
24008 @c @c end menu
24009 @c
24010 @c @c node New Texinfo Mode Commands, New Commands, Obtaining TeX, Obtaining TeX
24011 @c @c appendixsec New Texinfo Mode Commands
24012 @c
24013 @c Texinfo mode provides commands and features especially designed for
24014 @c working with Texinfo files. More than 20 new commands have been
24015 @c added, including commands for automatically creating and updating
24016 @c both nodes and menus. This is a tedious task when done by hand.
24017 @c
24018 @c The keybindings are intended to be somewhat mnemonic.
24019 @c
24020 @c @c subheading Update all nodes and menus
24021 @c
24022 @c The @code{texinfo-master-menu} command is the primary command:
24023 @c
24024 @c @table @kbd
24025 @c @item C-c C-u m
24026 @c @itemx M-x texinfo-master-menu
24027 @c Create or update a master menu.
24028 @c With @kbd{C-u} as a prefix argument,
24029 @c first create or update all nodes
24030 @c and regular menus.
24031 @c @end table
24032 @c
24033 @c @c subheading Update Pointers
24034 @c
24035 @c @noindent
24036 @c Create or update `Next', `Previous', and `Up' node pointers.
24037 @c
24038 @c @noindent
24039 @c @xref{Updating Nodes and Menus}.
24040 @c
24041 @c @table @kbd
24042 @c @item C-c C-u C-n
24043 @c @itemx M-x texinfo-update-node
24044 @c Update a node.
24045 @c
24046 @c @item C-c C-u C-e
24047 @c @itemx M-x texinfo-every-node-update
24048 @c Update every node in the buffer.
24049 @c @end table
24050 @c
24051 @c @c subheading Update Menus
24052 @c
24053 @c @noindent
24054 @c Create or update menus.
24055 @c
24056 @c @noindent
24057 @c @xref{Updating Nodes and Menus}.
24058 @c
24059 @c @table @kbd
24060 @c @item C-c C-u C-m
24061 @c @itemx M-x texinfo-make-menu
24062 @c Make or update a menu.
24063 @c
24064 @c @item C-c C-u C-a
24065 @c @itemx M-x texinfo-all-menus-update
24066 @c Make or update all the menus in a buffer.
24067 @c With @kbd{C-u} as a prefix argument,
24068 @c first update all the nodes.
24069 @c @end table
24070 @c
24071 @c @c subheading Insert Title as Description
24072 @c
24073 @c @noindent
24074 @c Insert a node's chapter or section title in the space for the
24075 @c description in a menu entry line; position point so you can edit the
24076 @c insert. (This command works somewhat differently than the other
24077 @c insertion commands, which insert only a predefined string.)
24078 @c
24079 @c @noindent
24080 @c @xref{Inserting, Inserting Frequently Used Commands}.
24081 @c
24082 @c @table @kbd
24083 @c @item C-c C-c C-d
24084 @c Insert title.
24085 @c @end table
24086 @c
24087 @c @c subheading Format for Info
24088 @c
24089 @c @noindent
24090 @c Provide keybindings both for the Info formatting commands that are
24091 @c written in Emacs Lisp and for @code{makeinfo} that is written in
24092 @c C.
24093 @c
24094 @c @noindent
24095 @c @xref{Info Formatting}.
24096 @c
24097 @c @noindent
24098 @c Use the Emacs lisp @code{texinfo-format@dots{}} commands:
24099 @c
24100 @c @table @kbd
24101 @c @item C-c C-e C-r
24102 @c Format the region.
24103 @c
24104 @c @item C-c C-e C-b
24105 @c Format the buffer.
24106 @c @end table
24107 @c
24108 @c @noindent
24109 @c Use @code{makeinfo}:
24110 @c
24111 @c @table @kbd
24112 @c @item C-c C-m C-r
24113 @c Format the region.
24114 @c
24115 @c @item C-c C-m C-b
24116 @c Format the buffer.
24117 @c
24118 @c @item C-c C-m C-l
24119 @c Recenter the @code{makeinfo} output buffer.
24120 @c
24121 @c @item C-c C-m C-k
24122 @c Kill the @code{makeinfo} formatting job.
24123 @c @end table
24124 @c
24125 @c @c subheading Typeset and Print
24126 @c
24127 @c @noindent
24128 @c Typeset and print Texinfo documents from within XEmacs.
24129 @c
24130 @c @noindent
24131 @c @xref{Printing}.
24132 @c
24133 @c @table @kbd
24134 @c @item C-c C-t C-b
24135 @c Run @code{texi2dvi} on the buffer.
24136 @c
24137 @c @item C-c C-t C-r
24138 @c Run @TeX{} on the region.
24139 @c
24140 @c @item C-c C-t C-i
24141 @c Run @code{texindex}.
24142 @c
24143 @c @item C-c C-t C-p
24144 @c Print the DVI file.
24145 @c
24146 @c @item C-c C-t C-q
24147 @c Show the print queue.
24148 @c
24149 @c @item C-c C-t C-d
24150 @c Delete a job from the print queue.
24151 @c
24152 @c @item C-c C-t C-k
24153 @c Kill the current @TeX{} formatting job.
24154 @c
24155 @c @item C-c C-t C-x
24156 @c Quit a currently stopped @TeX{} formatting job.
24157 @c
24158 @c @item C-c C-t C-l
24159 @c Recenter the output buffer.
24160 @c @end table
24161 @c
24162 @c @c subheading Other Updating Commands
24163 @c
24164 @c @noindent
24165 @c The ``other updating commands'' do not have standard keybindings because
24166 @c they are used less frequently.
24167 @c
24168 @c @noindent
24169 @c @xref{Other Updating Commands}.
24170 @c
24171 @c @table @kbd
24172 @c @item M-x texinfo-insert-node-lines
24173 @c Insert missing @code{@@node} lines using
24174 @c section titles as node names.
24175 @c
24176 @c @item M-x texinfo-multiple-files-update
24177 @c Update a multi-file document.
24178 @c With a numeric prefix, such as @kbd{C-u 8},
24179 @c update @strong{every} pointer and
24180 @c menu in @strong{all} the files and
24181 @c then insert a master menu.
24182 @c
24183 @c @item M-x texinfo-indent-menu-description
24184 @c Indent descriptions in menus.
24185 @c
24186 @c @item M-x texinfo-sequential-node-update
24187 @c Insert node pointers in strict sequence.
24188 @c @end table
24189 @c
24190 @c @c no.de New Commands, , New Texinfo Mode Commands, Obtaining TeX
24191 @c @c appendix.sec New Texinfo @@-Commands
24192 @c
24193 @c The second edition of the Texinfo manual describes more than 50
24194 @c commands that were not described in the first edition. A third or so
24195 @c of these commands existed in Texinfo but were not documented in the
24196 @c manual; the others are new. Here is a listing, with brief
24197 @c descriptions of them:
24198 @c
24199 @c @c subheading Indexing
24200 @c
24201 @c @noindent
24202 @c Create your own index, and merge indices.
24203 @c
24204 @c @noindent
24205 @c @xref{Indices}.
24206 @c
24207 @c @table @kbd
24208 @c @item @@defindex @var{index-name}
24209 @c Define a new index and its indexing command.
24210 @c See also the @code{@@defcodeindex} command.
24211 @c
24212 @c @c written verbosely to avoid overfull hbox
24213 @c @item @@synindex @var{from-index} @var{into-index}
24214 @c Merge the @var{from-index} index into the @var{into-index} index.
24215 @c See also the @code{@@syncodeindex} command.
24216 @c @end table
24217 @c
24218 @c @c subheading Definitions
24219 @c
24220 @c @noindent
24221 @c Describe functions, variables, macros,
24222 @c commands, user options, special forms, and other such artifacts in a
24223 @c uniform format.
24224 @c
24225 @c @noindent
24226 @c @xref{Definition Commands}.
24227 @c
24228 @c @table @kbd
24229 @c @item @@deffn @var{category} @var{name} @var{arguments}@dots{}
24230 @c Format a description for functions, interactive
24231 @c commands, and similar entities.
24232 @c
24233 @c @item @@defvr, @@defop, @dots{}
24234 @c 15 other related commands.
24235 @c @end table
24236 @c
24237 @c @c subheading Glyphs
24238 @c
24239 @c @noindent
24240 @c Indicate the results of evaluation, expansion,
24241 @c printed output, an error message, equivalence of expressions, and the
24242 @c location of point.
24243 @c
24244 @c @noindent
24245 @c @xref{Glyphs}.
24246 @c
24247 @c @table @kbd
24248 @c @item @@equiv@{@}
24249 @c @itemx @equiv{}
24250 @c Equivalence:
24251 @c
24252 @c @item @@error@{@}
24253 @c @itemx @error{}
24254 @c Error message
24255 @c
24256 @c @item @@expansion@{@}
24257 @c @itemx @expansion{}
24258 @c Macro expansion
24259 @c
24260 @c @item @@point@{@}
24261 @c @itemx @point{}
24262 @c Position of point
24263 @c
24264 @c @item @@print@{@}
24265 @c @itemx @print{}
24266 @c Printed output
24267 @c
24268 @c @item @@result@{@}
24269 @c @itemx @result{}
24270 @c Result of an expression
24271 @c @end table
24272 @c
24273 @c @c subheading Page Headings
24274 @c
24275 @c @noindent
24276 @c Customize page headings.
24277 @c
24278 @c @noindent
24279 @c @xref{Headings}.
24280 @c
24281 @c @table @kbd
24282 @c @item @@headings @var{on-off-single-double}
24283 @c Headings on or off, single, or double-sided.
24284 @c
24285 @c @item @@evenfooting [@var{left}] @@| [@var{center}] @@| [@var{right}]
24286 @c Footings for even-numbered (left-hand) pages.
24287 @c
24288 @c @item @@evenheading, @@everyheading, @@oddheading, @dots{}
24289 @c Five other related commands.
24290 @c
24291 @c @item @@thischapter
24292 @c Insert name of chapter and chapter number.
24293 @c
24294 @c @item @@thischaptername, @@thisfile, @@thistitle, @@thispage
24295 @c Related commands.
24296 @c @end table
24297 @c
24298 @c @c subheading Formatting
24299 @c
24300 @c @noindent
24301 @c Format blocks of text.
24302 @c
24303 @c @noindent
24304 @c @xref{Quotations and Examples}, and@*
24305 @c @ref{Lists and Tables, , Making Lists and Tables}.
24306 @c
24307 @c @table @kbd
24308 @c @item @@cartouche
24309 @c Draw rounded box surrounding text (no effect in Info).
24310 @c
24311 @c @item @@enumerate @var{optional-arg}
24312 @c Enumerate a list with letters or numbers.
24313 @c
24314 @c @item @@exdent @var{line-of-text}
24315 @c Remove indentation.
24316 @c
24317 @c @item @@flushleft
24318 @c Left justify.
24319 @c
24320 @c @item @@flushright
24321 @c Right justify.
24322 @c
24323 @c @item @@format
24324 @c Do not narrow nor change font.
24325 @c
24326 @c @item @@ftable @var{formatting-command}
24327 @c @itemx @@vtable @var{formatting-command}
24328 @c Two-column table with indexing.
24329 @c
24330 @c @item @@lisp
24331 @c For an example of Lisp code.
24332 @c
24333 @c @item @@smallexample
24334 @c @itemx @@smalllisp
24335 @c Like @@table and @@lisp, but for (originally) @@smallbook.
24336 @c @end table
24337 @c
24338 @c @c subheading Conditionals
24339 @c
24340 @c @noindent
24341 @c Conditionally format text.
24342 @c
24343 @c @noindent
24344 @c @xref{set clear value, , @code{@@set} @code{@@clear} @code{@@value}}.
24345 @c
24346 @c @table @kbd
24347 @c @item @@set @var{flag} [@var{string}]
24348 @c Set a flag. Optionally, set value
24349 @c of @var{flag} to @var{string}.
24350 @c
24351 @c @item @@clear @var{flag}
24352 @c Clear a flag.
24353 @c
24354 @c @item @@value@{@var{flag}@}
24355 @c Replace with value to which @var{flag} is set.
24356 @c
24357 @c @item @@ifset @var{flag}
24358 @c Format, if @var{flag} is set.
24359 @c
24360 @c @item @@ifclear @var{flag}
24361 @c Ignore, if @var{flag} is set.
24362 @c @end table
24363 @c
24364 @c @c subheading @@heading series for Titles
24365 @c
24366 @c @noindent
24367 @c Produce unnumbered headings that do not appear in a table of contents.
24368 @c
24369 @c @noindent
24370 @c @xref{Structuring}.
24371 @c
24372 @c @table @kbd
24373 @c @item @@heading @var{title}
24374 @c Unnumbered section-like heading not listed
24375 @c in the table of contents of a printed manual.
24376 @c
24377 @c @item @@chapheading, @@majorheading, @@c subheading, @@subsubheading
24378 @c Related commands.
24379 @c @end table
24380 @c
24381 @c @need 1000
24382 @c @c subheading Font commands
24383 @c
24384 @c @need 1000
24385 @c @noindent
24386 @c @xref{Smallcaps}, and @*
24387 @c @ref{Fonts}.
24388 @c
24389 @c @table @kbd
24390 @c @item @@r@{@var{text}@}
24391 @c Print in roman font.
24392 @c
24393 @c @item @@sc@{@var{text}@}
24394 @c Print in @sc{small caps} font.
24395 @c @end table
24396 @c
24397 @c @c subheading Miscellaneous
24398 @c
24399 @c @noindent
24400 @c See @ref{title subtitle author, , @code{@@title} @code{@@subtitle} and @code{@@author} Commands},@*
24401 @c see @ref{Customized Highlighting},@*
24402 @c see @ref{Overfull hboxes},@*
24403 @c see @ref{Footnotes},@*
24404 @c see @ref{dmn, , Format a Dimension},@*
24405 @c see @ref{Raise/lower sections, , @code{@@raisesections} and @code{@@lowersections}},@*
24406 @c see @ref{math, , @code{@@math}: Inserting Mathematical Expressions}.@*
24407 @c see @ref{minus, , Inserting a Minus Sign},@*
24408 @c see @ref{paragraphindent, , Paragraph Indenting},@*
24409 @c see @ref{Cross Reference Commands},@*
24410 @c see @ref{title subtitle author, , @code{@@title} @code{@@subtitle} and @code{@@author}}, and@*
24411 @c see @ref{Custom Headings, , How to Make Your Own Headings}.
24412 @c
24413 @c @table @kbd
24414 @c @item @@author @var{author}
24415 @c Typeset author's name.
24416 @c
24417 @c @c @item @@definfoenclose @var{new-command}, @var{before}, @var{after},
24418 @c @c Define a highlighting command for Info. (Info only.)
24419 @c
24420 @c @item @@finalout
24421 @c Produce cleaner printed output.
24422 @c
24423 @c @item @@footnotestyle @var{end-or-separate}
24424 @c Specify footnote style, either @samp{end} or @samp{separate}.
24425 @c @xref{Footnote Styles}.
24426 @c
24427 @c @item @@dmn@{@var{dimension}@}
24428 @c Format a dimension.
24429 @c
24430 @c @item @@global@@let@var{new-cmd}=@var{existing-cmd}
24431 @c Define a highlighting command for @TeX{}. (@TeX{} only.)
24432 @c
24433 @c @item @@lowersections
24434 @c Reduce hierarchical level of sectioning commands.
24435 @c
24436 @c @item @@math@{@var{mathematical-expression}@}
24437 @c Format a mathematical expression.
24438 @c
24439 @c @item @@minus@{@}
24440 @c Generate a minus sign.
24441 @c
24442 @c @item @@paragraphindent @var{asis-or-number}
24443 @c Specify amount of paragraph indentation.
24444 @c
24445 @c @item @@raisesections
24446 @c Raise hierarchical level of sectioning commands.
24447 @c
24448 @c @item @@ref@{@var{node-name}, @r{[}@var{entry}@r{]}, @r{[}@var{topic-or-title}@r{]}, @r{[}@var{info-file}@r{]}, @r{[}@var{manual}@r{]}@}
24449 @c Make a reference. In the printed manual, the
24450 @c reference does not start with the word `see'.
24451 @c
24452 @c @item @@title @var{title}
24453 @c Typeset @var{title} in the alternative
24454 @c title page format.
24455 @c
24456 @c @item @@subtitle @var{subtitle}
24457 @c Typeset @var{subtitle} in the alternative
24458 @c title page format.
24459 @c
24460 @c @item @@today@{@}
24461 @c Insert the current date.
24462 @c @end table
24463 @c @tex
24464 @c % Switch width of first column of tables back to default value
24465 @c \global\tableindent=.8in
24466 @c @end tex
24467
24468
24469 @node GNU Free Documentation License
24470 @appendix GNU Free Documentation License
24471
24472 @include fdl.texi
24473
24474
24475 @node Command and Variable Index
24476 @unnumbered Command and Variable Index
24477
24478 This is an alphabetical list of all the @@-commands, assorted XEmacs Lisp
24479 functions, and several variables. To make the list easier to use, the
24480 commands are listed without their preceding @samp{@@}.
24481
24482 @printindex fn
24483
24484
24485 @node General Index
24486 @unnumbered General Index
24487
24488 @printindex cp
24489
24490
24491 @bye