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

  1. This is Info file texinfo.info, produced by Makeinfo-1.64 from the
  2. input file /ade-src/fsf/texinfo/texinfo.texi.
  3.  
  4.   This file documents Texinfo, a documentation system that uses a single
  5. source file to produce both on-line information and a printed manual.
  6.  
  7.   Copyright (C) 1988, 1990, 1991, 1992, 1993, 1995 Free Software
  8. Foundation, Inc.
  9.  
  10.   This is the second edition of the Texinfo documentation,
  11. and is consistent with version 2 of `texinfo.tex'.
  12.  
  13.   Permission is granted to make and distribute verbatim copies of this
  14. manual provided the copyright notice and this permission notice are
  15. preserved on all copies.
  16.  
  17.   Permission is granted to copy and distribute modified versions of this
  18. manual under the conditions for verbatim copying, provided that the
  19. entire resulting derived work is distributed under the terms of a
  20. permission notice identical to this one.
  21.  
  22.   Permission is granted to copy and distribute translations of this
  23. manual into another language, under the above conditions for modified
  24. versions, except that this permission notice may be stated in a
  25. translation approved by the Free Software Foundation.
  26.  
  27. 
  28. File: texinfo.info,  Node: Abstract Objects,  Next: Data Types,  Prev: Typed Variables,  Up: Def Cmds in Detail
  29.  
  30. Object-Oriented Programming
  31. ---------------------------
  32.  
  33.   Here are the commands for formatting descriptions about abstract
  34. objects, such as are used in object-oriented programming.  A class is a
  35. defined type of abstract object.  An instance of a class is a
  36. particular object that has the type of the class.  An instance variable
  37. is a variable that belongs to the class but for which each instance has
  38. its own value.
  39.  
  40.   In a definition, if the name of a class is truly a name defined in the
  41. programming system for a class, then you should write an `@code' around
  42. it.  Otherwise, it is printed in the usual text font.
  43.  
  44. `@defcv CATEGORY CLASS NAME'
  45.      The `@defcv' command is the general definition command for
  46.      variables associated with classes in object-oriented programming.
  47.      The `@defcv' command is followed by three arguments: the category
  48.      of thing being defined, the class to which it belongs, and its
  49.      name.  Thus,
  50.  
  51.           @defcv {Class Option} Window border-pattern
  52.           ...
  53.           @end defcv
  54.  
  55.      illustrates how you would write the first line of a definition of
  56.      the `border-pattern' class option of the class `Window'.
  57.  
  58.      The template is
  59.  
  60.           @defcv CATEGORY CLASS NAME
  61.           ...
  62.           @end defcv
  63.  
  64.      `@defcv' creates an entry in the index of variables.
  65.  
  66. `@defivar CLASS NAME'
  67.      The `@defivar' command is the definition command for instance
  68.      variables in object-oriented programming.  `@defivar' is
  69.      equivalent to `@defcv {Instance Variable} ...'
  70.  
  71.      The template is:
  72.  
  73.           @defivar CLASS INSTANCE-VARIABLE-NAME
  74.           BODY-OF-DEFINITION
  75.           @end defivar
  76.  
  77.      `@defivar' creates an entry in the index of variables.
  78.  
  79. `@defop CATEGORY CLASS NAME ARGUMENTS...'
  80.      The `@defop' command is the general definition command for
  81.      entities that may resemble methods in object-oriented programming.
  82.      These entities take arguments, as functions do, but are associated
  83.      with particular classes of objects.
  84.  
  85.      For example, some systems have constructs called "wrappers" that
  86.      are associated with classes as methods are, but that act more like
  87.      macros than like functions.  You could use `@defop Wrapper' to
  88.      describe one of these.
  89.  
  90.      Sometimes it is useful to distinguish methods and "operations".
  91.      You can think of an operation as the specification for a method.
  92.      Thus, a window system might specify that all window classes have a
  93.      method named `expose'; we would say that this window system
  94.      defines an `expose' operation on windows in general.  Typically,
  95.      the operation has a name and also specifies the pattern of
  96.      arguments; all methods that implement the operation must accept
  97.      the same arguments, since applications that use the operation do
  98.      so without knowing which method will implement it.
  99.  
  100.      Often it makes more sense to document operations than methods.  For
  101.      example, window application developers need to know about the
  102.      `expose' operation, but need not be concerned with whether a given
  103.      class of windows has its own method to implement this operation.
  104.      To describe this operation, you would write:
  105.  
  106.           @defop Operation windows expose
  107.  
  108.      The `@defop' command is written at the beginning of a line and is
  109.      followed on the same line by the overall name of the category of
  110.      operation, the name of the class of the operation, the name of the
  111.      operation, and its arguments, if any.
  112.  
  113.      The template is:
  114.  
  115.           @defop CATEGORY CLASS NAME ARGUMENTS...
  116.           BODY-OF-DEFINITION
  117.           @end defop
  118.  
  119.      `@defop' creates an entry, such as ``expose' on `windows'', in the
  120.      index of functions.
  121.  
  122. `@defmethod CLASS NAME ARGUMENTS...'
  123.      The `@defmethod' command is the definition command for methods in
  124.      object-oriented programming.  A method is a kind of function that
  125.      implements an operation for a particular class of objects and its
  126.      subclasses.  In the Lisp Machine, methods actually were functions,
  127.      but they were usually defined with `defmethod'.
  128.  
  129.      `@defmethod' is equivalent to `@defop Method ...'.  The command is
  130.      written at the beginning of a line and is followed by the name of
  131.      the class of the method, the name of the method, and its
  132.      arguments, if any.
  133.  
  134.      For example,
  135.  
  136.           @defmethod `bar-class' bar-method argument
  137.           ...
  138.           @end defmethod
  139.  
  140.      illustrates the definition for a method called `bar-method' of the
  141.      class `bar-class'.  The method takes an argument.
  142.  
  143.      The template is:
  144.  
  145.           @defmethod CLASS METHOD-NAME ARGUMENTS...
  146.           BODY-OF-DEFINITION
  147.           @end defmethod
  148.  
  149.      `@defmethod' creates an entry, such as ``bar-method' on
  150.      `bar-class'', in the index of functions.
  151.  
  152. 
  153. File: texinfo.info,  Node: Data Types,  Prev: Abstract Objects,  Up: Def Cmds in Detail
  154.  
  155. Data Types
  156. ----------
  157.  
  158.   Here is the command for data types:
  159.  
  160. `@deftp CATEGORY NAME ATTRIBUTES...'
  161.      The `@deftp' command is the generic definition command for data
  162.      types.  The command is written at the beginning of a line and is
  163.      followed on the same line by the category, by the name of the type
  164.      (which is a word like `int' or `float'), and then by names of
  165.      attributes of objects of that type.  Thus, you could use this
  166.      command for describing `int' or `float', in which case you could
  167.      use `data type' as the category.  (A data type is a category of
  168.      certain objects for purposes of deciding which operations can be
  169.      performed on them.)
  170.  
  171.      In Lisp, for example,  "pair" names a particular data type, and an
  172.      object of that type has two slots called the CAR and the CDR.
  173.      Here is how you would write the first line of a definition of
  174.      `pair'.
  175.  
  176.           @deftp {Data type} pair car cdr
  177.           ...
  178.           @end deftp
  179.  
  180.      The template is:
  181.  
  182.           @deftp CATEGORY NAME-OF-TYPE ATTRIBUTES...
  183.           BODY-OF-DEFINITION
  184.           @end deftp
  185.  
  186.      `@deftp' creates an entry in the index of data types.
  187.  
  188. 
  189. File: texinfo.info,  Node: Def Cmd Conventions,  Next: Sample Function Definition,  Prev: Def Cmds in Detail,  Up: Definition Commands
  190.  
  191. Conventions for Writing Definitions
  192. ===================================
  193.  
  194.   When you write a definition using `@deffn', `@defun', or one of the
  195. other definition commands, please take care to use arguments that
  196. indicate the meaning, as with the COUNT argument to the `forward-word'
  197. function.  Also, if the name of an argument contains the name of a
  198. type, such as INTEGER, take care that the argument actually is of that
  199. type.
  200.  
  201. 
  202. File: texinfo.info,  Node: Sample Function Definition,  Prev: Def Cmd Conventions,  Up: Definition Commands
  203.  
  204. A Sample Function Definition
  205. ============================
  206.  
  207.   A function definition uses the `@defun' and `@end defun' commands.
  208. The name of the function follows immediately after the `@defun' command
  209. and it is followed, on the same line, by the parameter list.
  210.  
  211.   Here is a definition from `The GNU Emacs Lisp Reference Manual'.
  212. (*Note Calling Functions: (elisp)Calling Functions.)
  213.  
  214.       - Function: apply FUNCTION &rest ARGUMENTS
  215.           `apply' calls FUNCTION with ARGUMENTS, just like `funcall'
  216.           but with one difference: the last of ARGUMENTS is a list of
  217.           arguments to give to FUNCTION, rather than a single argument.
  218.           We also say that this list is "appended" to the other
  219.           arguments.
  220.  
  221.           `apply' returns the result of calling FUNCTION.  As with
  222.           `funcall', FUNCTION must either be a Lisp function or a
  223.           primitive function; special forms and macros do not make
  224.           sense in `apply'.
  225.  
  226.                (setq f 'list)
  227.                     => list
  228.                (apply f 'x 'y 'z)
  229.                error--> Wrong type argument: listp, z
  230.                (apply '+ 1 2 '(3 4))
  231.                     => 10
  232.                (apply '+ '(1 2 3 4))
  233.                     => 10
  234.                
  235.                (apply 'append '((a b c) nil (x y z) nil))
  236.                     => (a b c x y z)
  237.  
  238.           An interesting example of using `apply' is found in the
  239.           description of `mapcar'.
  240.  
  241.   In the Texinfo source file, this example looks like this:
  242.  
  243.      @defun apply function &rest arguments
  244.      
  245.      @code{apply} calls @var{function} with
  246.      @var{arguments}, just like @code{funcall} but with one
  247.      difference: the last of @var{arguments} is a list of
  248.      arguments to give to @var{function}, rather than a single
  249.      argument.  We also say that this list is @dfn{appended}
  250.      to the other arguments.
  251.      
  252.      @code{apply} returns the result of calling
  253.      @var{function}.  As with @code{funcall},
  254.      @var{function} must either be a Lisp function or a
  255.      primitive function; special forms and macros do not make
  256.      sense in @code{apply}.
  257.      
  258.      @example
  259.      (setq f 'list)
  260.           @result{} list
  261.      (apply f 'x 'y 'z)
  262.      @error{} Wrong type argument: listp, z
  263.      (apply '+ 1 2 '(3 4))
  264.           @result{} 10
  265.      (apply '+ '(1 2 3 4))
  266.           @result{} 10
  267.      
  268.      (apply 'append '((a b c) nil (x y z) nil))
  269.           @result{} (a b c x y z)
  270.      @end example
  271.      
  272.      An interesting example of using @code{apply} is found
  273.      in the description of @code{mapcar}.@refill
  274.      @end defun
  275.  
  276. In this manual, this function is listed in the Command and Variable
  277. Index under `apply'.
  278.  
  279.   Ordinary variables and user options are described using a format like
  280. that for functions except that variables do not take arguments.
  281.  
  282. 
  283. File: texinfo.info,  Node: Footnotes,  Next: Conditionals,  Prev: Definition Commands,  Up: Top
  284.  
  285. Footnotes
  286. *********
  287.  
  288.   A "footnote" is for a reference that documents or elucidates the
  289. primary text.(1) (*note Footnotes-Footnotes::)
  290.  
  291. * Menu:
  292.  
  293. * Footnote Commands::           How to write a footnote in Texinfo.
  294. * Footnote Styles::             Controlling how footnotes appear in Info.
  295.  
  296. 
  297. File: texinfo.info,  Node: Footnotes-Footnotes,  Up: Footnotes
  298.  
  299.   (1)  A footnote should complement or expand upon the primary text,
  300. but a reader should not need to read a footnote to understand the
  301. primary text.  For a thorough discussion of footnotes, see `The Chicago
  302. Manual of Style', which is published by the University of Chicago Press.
  303.  
  304. 
  305. File: texinfo.info,  Node: Footnote Commands,  Next: Footnote Styles,  Up: Footnotes
  306.  
  307. Footnote Commands
  308. =================
  309.  
  310.   In Texinfo, footnotes are created with the `@footnote' command.  This
  311. command is followed immediately by a left brace, then by the text of
  312. the footnote, and then by a terminating right brace.  The template is:
  313.  
  314.      @footnote{TEXT}
  315.  
  316.   Footnotes may be of any length, but are usually short.
  317.  
  318.   For example, this clause is followed by a sample footnote(1) (*note
  319. Footnote Commands-Footnotes::); in the Texinfo source, it looks like
  320. this:
  321.  
  322.      ...a sample footnote @footnote{Here is the sample
  323.      footnote.}; in the Texinfo source...
  324.  
  325.   *Warning:* Don't use footnotes in the argument of the `@item' command
  326. for a `@table' table.  This doesn't work; because of limitations of
  327. TeX, there is no way to fix it.  To avoid the problem, move the
  328. footnote into the body text of the table.
  329.  
  330.   In a printed manual or book, the reference mark for a footnote is a
  331. small, superscripted number; the text of the footnote appears at the
  332. bottom of the page, below a horizontal line.
  333.  
  334.   In Info, the reference mark for a footnote is a pair of parentheses
  335. with the footnote number between them, like this: `(1)'.
  336.  
  337. 
  338. File: texinfo.info,  Node: Footnote Commands-Footnotes,  Up: Footnote Commands
  339.  
  340.   (1)  Here is the sample footnote.
  341.  
  342. 
  343. File: texinfo.info,  Node: Footnote Styles,  Prev: Footnote Commands,  Up: Footnotes
  344.  
  345. Footnote Styles
  346. ===============
  347.  
  348.   Info has two footnote styles, which determine where the text of the
  349. footnote is located:
  350.  
  351.    * In the `End' node style, all the footnotes for a single node are
  352.      placed at the end of that node.  The footnotes are separated from
  353.      the rest of the node by a line of dashes with the word `Footnotes'
  354.      within it.  Each footnote begins with an `(N)' reference mark.
  355.  
  356.      Here is an example of a single footnote in the end of node style:
  357.  
  358.            --------- Footnotes ---------
  359.           
  360.           (1)  Here is a sample footnote.
  361.  
  362.    * In the `Separate' node style, all the footnotes for a single node
  363.      are placed in an automatically constructed node of their own.  In
  364.      this style, a "footnote reference" follows each `(N)' reference
  365.      mark in the body of the node.  The footnote reference is actually
  366.      a cross reference which you use to reach the footnote node.
  367.  
  368.      The name of the node containing the footnotes is constructed by
  369.      appending `-Footnotes' to the name of the node that contains the
  370.      footnotes. (Consequently, the footnotes' node for the `Footnotes'
  371.      node is `Footnotes-Footnotes'!)  The footnotes' node has an `Up'
  372.      node pointer that leads back to its parent node.
  373.  
  374.      Here is how the first footnote in this manual looks after being
  375.      formatted for Info in the separate node style:
  376.  
  377.           File: texinfo.info  Node: Overview-Footnotes, Up: Overview
  378.           
  379.           (1) Note that the first syllable of "Texinfo" is
  380.           pronounced like "speck", not "hex". ...
  381.  
  382.   A Texinfo file may be formatted into an Info file with either footnote
  383. style.
  384.  
  385.   Use the `@footnotestyle' command to specify an Info file's footnote
  386. style.  Write this command at the beginning of a line followed by an
  387. argument, either `end' for the end node style or `separate' for the
  388. separate node style.
  389.  
  390.   For example,
  391.  
  392.      @footnotestyle end
  393.  
  394. or
  395.      @footnotestyle separate
  396.  
  397.   Write an `@footnotestyle' command before or shortly after the
  398. end-of-header line at the beginning of a Texinfo file.  (If you include
  399. the `@footnotestyle' command between the start-of-header and
  400. end-of-header lines, the region formatting commands will format
  401. footnotes as specified.)
  402.  
  403.   If you do not specify a footnote style, the formatting commands use
  404. their default style.  Currently, `texinfo-format-buffer' and
  405. `texinfo-format-region' use the `separate' style and `makeinfo' uses
  406. the `end' style.
  407.  
  408.   This chapter contains two footnotes.
  409.  
  410. 
  411. File: texinfo.info,  Node: Conditionals,  Next: Format/Print Hardcopy,  Prev: Footnotes,  Up: Top
  412.  
  413. Conditionally Visible Text
  414. **************************
  415.  
  416.   Sometimes it is good to use different text for a printed manual and
  417. its corresponding Info file.  In this case, you can use the
  418. "conditional commands" to specify which text is for the printed manual
  419. and which is for the Info file.
  420.  
  421. * Menu:
  422.  
  423. * Conditional Commands::        How to specify text for Info or TeX.
  424. * Using Ordinary TeX Commands::  You can use any and all TeX commands.
  425. * set clear value::             How to designate which text to format (for
  426.                                   both Info and TeX); and how to set a
  427.                                   flag to a string that you can insert.
  428.  
  429. 
  430. File: texinfo.info,  Node: Conditional Commands,  Next: Using Ordinary TeX Commands,  Prev: Conditionals,  Up: Conditionals
  431.  
  432. Using `@ifinfo' and `@iftex'
  433. ============================
  434.  
  435.   `@ifinfo' begins segments of text that should be ignored by TeX when
  436. it typesets the printed manual.  The segment of text appears only in
  437. the Info file.  The `@ifinfo' command should appear on a line by
  438. itself;  end the Info-only text with a line containing `@end ifinfo' by
  439. itself.  At the beginning of a Texinfo file, the Info permissions are
  440. contained within a region marked by `@ifinfo' and `@end ifinfo'. (*Note
  441. Info Summary and Permissions::.)
  442.  
  443.   The `@iftex' and `@end iftex' commands are similar to the `@ifinfo'
  444. and `@end ifinfo' commands, except that they specify text that will
  445. appear in the printed manual but not in the Info file.
  446.  
  447.   For example,
  448.  
  449.      @iftex
  450.      This text will appear only in the printed manual.
  451.      @end iftex
  452.      
  453.      @ifinfo
  454.      However, this text will appear only in Info.
  455.      @end ifinfo
  456.  
  457. The preceding example produces the following line:
  458.  
  459.   However, this text will appear only in Info.
  460.  
  461. Note how you only see one of the two lines, depending on whether you
  462. are reading the Info version or the printed version of this manual.
  463.  
  464.   The `@titlepage' command is a special variant of `@iftex' that is
  465. used for making the title and copyright pages of the printed manual.
  466. (*Note `@titlepage': titlepage.)
  467.  
  468. 
  469. File: texinfo.info,  Node: Using Ordinary TeX Commands,  Next: set clear value,  Prev: Conditional Commands,  Up: Conditionals
  470.  
  471. Using Ordinary TeX Commands
  472. ===========================
  473.  
  474.   Inside a region delineated by `@iftex' and `@end iftex', you can
  475. embed some PlainTeX commands.  Info will ignore these commands since
  476. they are only in that part of the file which is seen by TeX.  You can
  477. write the TeX commands as you would write them in a normal TeX file,
  478. except that you must replace the `\' used by TeX with an `@'.  For
  479. example, in the `@titlepage' section of a Texinfo file, you can use the
  480. TeX command `@vskip' to format the copyright page.  (The `@titlepage'
  481. command causes Info to ignore the region automatically, as it does with
  482. the `@iftex' command.)
  483.  
  484.   However, many features of PlainTeX will not work, as they are
  485. overridden by features of Texinfo.
  486.  
  487.   You can enter PlainTeX completely, and use `\' in the TeX commands,
  488. by delineating a region with the `@tex' and `@end tex' commands.  (The
  489. `@tex' command also causes Info to ignore the region, like the `@iftex'
  490. command.)
  491.  
  492.   For example, here is a mathematical expression written in PlainTeX:
  493.  
  494.      @tex
  495.      $$ \chi^2 = \sum_{i=1}^N
  496.                \left (y_i - (a + b x_i)
  497.                \over \sigma_i\right)^2 $$
  498.      @end tex
  499.  
  500. The output of this example will appear only in a printed manual.  If
  501. you are reading this in Info, you will not see anything after this
  502. paragraph.
  503.  
  504. 
  505. File: texinfo.info,  Node: set clear value,  Prev: Using Ordinary TeX Commands,  Up: Conditionals
  506.  
  507. `@set', `@clear', and `@value'
  508. ==============================
  509.  
  510.   You can direct the Texinfo formatting commands to format or ignore
  511. parts of a Texinfo file with the `@set', `@clear', `@ifset', and
  512. `@ifclear' commands.
  513.  
  514.   In addition, you can use the `@set FLAG' command to set the value of
  515. FLAG to a string of characters; and use `@value{FLAG}' to insert that
  516. string.  You can use `@set', for example, to set a date and use
  517. `@value' to insert the date in several places in the Texinfo file.
  518.  
  519. * Menu:
  520.  
  521. * ifset ifclear::               Format a region if a flag is set.
  522. * value::                       Replace a flag with a string.
  523. * value Example::               An easy way to update edition information.
  524.  
  525. 
  526. File: texinfo.info,  Node: ifset ifclear,  Next: value,  Prev: set clear value,  Up: set clear value
  527.  
  528. `@ifset' and `@ifclear'
  529. -----------------------
  530.  
  531.   When a FLAG is set, the Texinfo formatting commands format text
  532. between subsequent pairs of `@ifset FLAG' and `@end ifset' commands.
  533. When the FLAG is cleared, the Texinfo formatting commands do *not*
  534. format the text.
  535.  
  536.   Use the `@set FLAG' command to turn on, or "set", a FLAG; a "flag"
  537. can be any single word.  The format for the command looks like this:
  538.  
  539.      @set FLAG
  540.  
  541.   Write the conditionally formatted text between `@ifset FLAG' and
  542. `@end ifset' commands, like this:
  543.  
  544.      @ifset FLAG
  545.      CONDITIONAL-TEXT
  546.      @end ifset
  547.  
  548.   For example, you can create one document that has two variants, such
  549. as a manual for a `large' and `small' model:
  550.  
  551.      You can use this machine to dig up shrubs
  552.      without hurting them.
  553.      
  554.      @set large
  555.      
  556.      @ifset large
  557.      It can also dig up fully grown trees.
  558.      @end ifset
  559.      
  560.      Remember to replant promptly ...
  561.  
  562. In the example, the formatting commands will format the text between
  563. `@ifset large' and `@end ifset' because the `large' flag is set.
  564.  
  565.   Use the `@clear FLAG' command to turn off, or "clear", a flag.
  566. Clearing a flag is the opposite of setting a flag.  The command looks
  567. like this:
  568.  
  569.      @clear FLAG
  570.  
  571. Write the command on a line of its own.
  572.  
  573.   When FLAG is cleared, the Texinfo formatting commands do *not* format
  574. the text between `@ifset FLAG' and `@end ifset'; that text is ignored
  575. and does not appear in either printed or Info output.
  576.  
  577.   For example, if you clear the flag of the preceding example by writing
  578. an `@clear large' command after the `@set large' command (but before
  579. the conditional text), then the Texinfo formatting commands ignore the
  580. text between the `@ifset large' and `@end ifset' commands.  In the
  581. formatted output, that text does not appear; in both printed and Info
  582. output, you see only the lines that say, "You can use this machine to
  583. dig up shrubs without hurting them.  Remember to replant promptly ...".
  584.  
  585.   If a flag is cleared with an `@clear FLAG' command, then the
  586. formatting commands format text between subsequent pairs of `@ifclear'
  587. and `@end ifclear' commands.  But if the flag is set with `@set FLAG',
  588. then the formatting commands do *not* format text between an `@ifclear'
  589. and an `@end ifclear' command; rather, they ignore that text.  An
  590. `@ifclear' command looks like this:
  591.  
  592.      @ifclear FLAG
  593.  
  594.   In brief, the commands are:
  595.  
  596. `@set FLAG'
  597.      Tell the Texinfo formatting commands that FLAG is set.
  598.  
  599. `@clear FLAG'
  600.      Tell the Texinfo formatting commands that FLAG is cleared.
  601.  
  602. `@ifset FLAG'
  603.      If FLAG is set, tell the Texinfo formatting commands to format the
  604.      text up to the following `@end ifset' command.
  605.  
  606.      If FLAG is cleared, tell the Texinfo formatting commands to ignore
  607.      text up to the following `@end ifset' command.
  608.  
  609. `@ifclear FLAG'
  610.      If FLAG is set, tell the Texinfo formatting commands to ignore the
  611.      text up to the following `@end ifclear' command.
  612.  
  613.      If FLAG is cleared, tell the Texinfo formatting commands to format
  614.      the text up to the following `@end ifclear' command.
  615.  
  616. 
  617. File: texinfo.info,  Node: value,  Next: value Example,  Prev: ifset ifclear,  Up: set clear value
  618.  
  619. `@value'
  620. --------
  621.  
  622.   You can use the `@set' command to specify a value for a flag, which
  623. is expanded by the `@value' command.  The value is a string a
  624. characters.
  625.  
  626.   Write the `@set' command like this:
  627.  
  628.      @set foo This is a string.
  629.  
  630. This sets the value of `foo' to "This is a string."
  631.  
  632.   The Texinfo formatters replace an `@value{FLAG}' command with the
  633. string to which FLAG is set.
  634.  
  635.   Thus, when `foo' is set as shown above, the Texinfo formatters convert
  636.  
  637.      @value{foo}
  638. to
  639.      This is a string.
  640.  
  641.   You can write an `@value' command within a paragraph; but you must
  642. write an `@set' command on a line of its own.
  643.  
  644.   If you write the `@set' command like this:
  645.  
  646.      @set foo
  647.  
  648. without specifying a string, the value of `foo' is an empty string.
  649.  
  650.   If you clear a previously set flag with an `@clear FLAG' command, a
  651. subsequent `@value{flag}' command is invalid and the string is replaced
  652. with an error message that says `{No value for "FLAG"}'.
  653.  
  654.   For example, if you set `foo' as follows:
  655.  
  656.      @set how-much very, very, very
  657.  
  658. then the formatters transform
  659.  
  660.      It is a @value{how-much} wet day.
  661. into
  662.      It is a very, very, very wet day.
  663.  
  664.   If you write
  665.  
  666.      @clear how-much
  667.  
  668. then the formatters transform
  669.  
  670.      It is a @value{how-much} wet day.
  671. into
  672.      It is a {No value for "how-much"} wet day.
  673.  
  674. 
  675. File: texinfo.info,  Node: value Example,  Prev: value,  Up: set clear value
  676.  
  677. `@value' Example
  678. ----------------
  679.  
  680.   You can use the `@value' command to limit the number of places you
  681. need to change when you record an update to a manual.  Here is how it
  682. is done in `The GNU Make Manual':
  683.  
  684. Set the flags:
  685.  
  686.      @set EDITION 0.35 Beta
  687.      @set VERSION 3.63 Beta
  688.      @set UPDATED 14 August 1992
  689.      @set UPDATE-MONTH August 1992
  690.  
  691. Write text for the first `@ifinfo' section, for people reading the
  692. Texinfo file:
  693.  
  694.      This is Edition @value{EDITION},
  695.      last updated @value{UPDATED},
  696.      of @cite{The GNU Make Manual},
  697.      for @code{make}, Version @value{VERSION}.
  698.  
  699. Write text for the title page, for people reading the printed manual:
  700.  
  701.      @title GNU Make
  702.      @subtitle A Program for Directing Recompilation
  703.      @subtitle Edition @value{EDITION}, ...
  704.      @subtitle @value{UPDATE-MONTH}
  705.  
  706. (On a printed cover, a date listing the month and the year looks less
  707. fussy than a date listing the day as well as the month and year.)
  708.  
  709. Write text for the Top node, for people reading the Info file:
  710.  
  711.      This is Edition @value{EDITION}
  712.      of the @cite{GNU Make Manual},
  713.      last updated @value{UPDATED}
  714.      for @code{make} Version @value{VERSION}.
  715.  
  716.   After you format the manual, the text in the first `@ifinfo' section
  717. looks like this:
  718.  
  719.      This is Edition 0.35 Beta, last updated 14 August 1992,
  720.      of `The GNU Make Manual', for `make', Version 3.63 Beta.
  721.  
  722.   When you update the manual, change only the values of the flags; you
  723. do not need to rewrite the three sections.
  724.  
  725. 
  726. File: texinfo.info,  Node: Format/Print Hardcopy,  Next: Create an Info File,  Prev: Conditionals,  Up: Top
  727.  
  728. Format and Print Hardcopy
  729. *************************
  730.  
  731.   There are three major shell commands for making a printed manual from
  732. a Texinfo file: one for converting the Texinfo file into a file that
  733. will be printed, a second for sorting indices, and a third for printing
  734. the formatted document.  When you use the shell commands, you can either
  735. work directly in the operating system shell or work within a shell
  736. inside GNU Emacs.
  737.  
  738.   If you are using GNU Emacs, you can use commands provided by Texinfo
  739. mode instead of shell commands.  In addition to the three commands to
  740. format a file, sort the indices, and print the result, Texinfo mode
  741. offers key bindings for commands to recenter the output buffer, show the
  742. print queue, and delete a job from the print queue.
  743.  
  744. * Menu:
  745.  
  746. * Use TeX::                     Use TeX to format for hardcopy.
  747. * Format with tex/texindex::    How to format in a shell.
  748. * Format with texi2dvi::        A simpler way to use the shell.
  749. * Print with lpr::              How to print.
  750. * Within Emacs::                How to format and print from an Emacs shell.
  751. * Texinfo Mode Printing::       How to format and print in Texinfo mode.
  752. * Compile-Command::             How to print using Emacs's compile command.
  753. * Requirements Summary::        TeX formatting requirements summary.
  754. * Preparing for TeX::           What you need to do to use TeX.
  755. * Overfull hboxes::             What are and what to do with overfull hboxes.
  756. * smallbook::                   How to print small format books and manuals.
  757. * A4 Paper::                    How to print on European A4 paper.
  758. * Cropmarks and Magnification::  How to print marks to indicate the size
  759.                                 of pages and how to print scaled up output.
  760.  
  761. 
  762. File: texinfo.info,  Node: Use TeX,  Next: Format with tex/texindex,  Prev: Format/Print Hardcopy,  Up: Format/Print Hardcopy
  763.  
  764. Use TeX
  765. =======
  766.  
  767.   The typesetting program called TeX is used for formatting a Texinfo
  768. file.  TeX is a very powerful typesetting program and, if used right,
  769. does an exceptionally good job.  *Note How to Obtain TeX: Obtaining
  770. TeX, for information on how to obtain TeX.
  771.  
  772.   The `makeinfo', `texinfo-format-region', and `texinfo-format-buffer'
  773. commands read the very same @-commands in the Texinfo file as does TeX,
  774. but process them differently to make an Info file; see *Note Create an
  775. Info File::.
  776.  
  777. 
  778. File: texinfo.info,  Node: Format with tex/texindex,  Next: Format with texi2dvi,  Prev: Use TeX,  Up: Format/Print Hardcopy
  779.  
  780. Format using `tex' and `texindex'
  781. =================================
  782.  
  783.   Format the Texinfo file with the shell command `tex' followed by the
  784. name of the Texinfo file.  This command produces a formatted DVI file
  785. as well as several auxiliary files containing indices, cross
  786. references, etc.  The DVI file (for "DeVice Independent" file) can be
  787. printed on a wide variety of printers.
  788.  
  789.   The `tex' formatting command itself does not sort the indices; it
  790. writes an output file of unsorted index data.  This is a misfeature of
  791. TeX.  (The `texi2dvi' command automatically generates indices; see
  792. *Note Format using `texi2dvi': Format with texi2dvi.)  To generate a
  793. printed index after running the `tex' command, you first need a sorted
  794. index to work from.  The `texindex' command sorts indices.  (The source
  795. file `texindex.c' comes as part of the standard GNU distribution and is
  796. usually installed when Emacs is installed.)
  797.  
  798.   The `tex' formatting command outputs unsorted index files under names
  799. that obey a standard convention.  These names are the name of your main
  800. input file to the `tex' formatting command, with everything after the
  801. first period thrown away, and the two letter names of indices added at
  802. the end.  For example, the raw index output files for the input file
  803. `foo.texinfo' would be `foo.cp', `foo.vr', `foo.fn', `foo.tp', `foo.pg'
  804. and `foo.ky'.  Those are exactly the arguments to give to `texindex'.
  805.  
  806.   Or else, you can use `??' as "wild-cards" and give the command in
  807. this form:
  808.  
  809.      texindex foo.??
  810.  
  811. This command will run `texindex' on all the unsorted index files,
  812. including any that you have defined yourself using `@defindex' or
  813. `@defcodeindex'.  (You may execute `texindex foo.??' even if there are
  814. similarly named files with two letter extensions that are not index
  815. files, such as `foo.el'.  The `texindex' command reports but otherwise
  816. ignores such files.)
  817.  
  818.   For each file specified, `texindex' generates a sorted index file
  819. whose name is made by appending `s' to the input file name.  The
  820. `@printindex' command knows to look for a file of that name.
  821. `texindex' does not alter the raw index output file.
  822.  
  823.   After you have sorted the indices, you need to rerun the `tex'
  824. formatting command on the Texinfo file.  This regenerates a formatted
  825. DVI file with up-to-date index entries.(1) (*note Format with
  826. tex/texindex-Footnotes::)
  827.  
  828.   To summarize, this is a three step process:
  829.  
  830.   1. Run the `tex' formatting command on the Texinfo file.  This
  831.      generates the formatted DVI file as well as the raw index files
  832.      with two letter extensions.
  833.  
  834.   2. Run the shell command `texindex' on the raw index files to sort
  835.      them.  This creates the corresponding sorted index files.
  836.  
  837.   3. Rerun the `tex' formatting command on the Texinfo file.  This
  838.      regenerates a formatted DVI file with the index entries in the
  839.      correct order.  This second run also corrects the page numbers for
  840.      the cross references.  (The tables of contents are always correct.)
  841.  
  842.   You need not run `texindex' each time after you run the `tex'
  843. formatting.  If you do not, on the next run, the `tex' formatting
  844. command will use whatever sorted index files happen to exist from the
  845. previous use of `texindex'.  This is usually OK while you are debugging.
  846.  
  847. 
  848. File: texinfo.info,  Node: Format with tex/texindex-Footnotes,  Up: Format with tex/texindex
  849.  
  850.   (1)  If you use more than one index and have cross references to an
  851. index other than the first, you must run `tex' *three times* to get
  852. correct output: once to generate raw index data; again (after
  853. `texindex') to output the text of the indices and determine their true
  854. page numbers; and a third time to output correct page numbers in cross
  855. references to them.  However, cross references to indices are rare.
  856.  
  857. 
  858. File: texinfo.info,  Node: Format with texi2dvi,  Next: Print with lpr,  Prev: Format with tex/texindex,  Up: Format/Print Hardcopy
  859.  
  860. Format using `texi2dvi'
  861. =======================
  862.  
  863.   The `texi2dvi' command is a shell script that automatically runs both
  864. `tex' and `texindex' as needed to produce a DVI file with up-to-date,
  865. sorted indices.  It simplifies the `tex'--`texindex'--`tex' sequence
  866. described in the previous section.
  867.  
  868.   The syntax for `texi2dvi' is like this (where `%' is the shell
  869. prompt):
  870.  
  871.      % texi2dvi FILENAME...
  872.  
  873. 
  874. File: texinfo.info,  Node: Print with lpr,  Next: Within Emacs,  Prev: Format with texi2dvi,  Up: Format/Print Hardcopy
  875.  
  876. Shell Print Using `lpr -d'
  877. ==========================
  878.  
  879.   You can print a DVI file with the DVI print command.  The precise
  880. printing command to use depends on your system; `lpr -d' is common.
  881. The DVI print command may require a file name without any extension or
  882. with a `.dvi' extension.
  883.  
  884.   The following commands, for example, sort the indices, format, and
  885. print the `Bison Manual' (where `%' is the shell prompt):
  886.  
  887.      % tex bison.texinfo
  888.      % texindex bison.??
  889.      % tex bison.texinfo
  890.      % lpr -d bison.dvi
  891.  
  892. (Remember that the shell commands may be different at your site; but
  893. these are commonly used versions.)
  894.  
  895.   Using the `texi2dvi' shell script, you simply need type:
  896.  
  897.      % texi2dvi bison.texinfo
  898.      % lpr -d bison.dvi
  899.  
  900. 
  901. File: texinfo.info,  Node: Within Emacs,  Next: Texinfo Mode Printing,  Prev: Print with lpr,  Up: Format/Print Hardcopy
  902.  
  903. From an Emacs Shell ...
  904. =======================
  905.  
  906.   You can give formatting and printing commands from a shell within GNU
  907. Emacs.  To create a shell within Emacs, type `M-x shell'.  In this
  908. shell, you can format and print the document.  *Note Format and Print
  909. Hardcopy: Format/Print Hardcopy, for details.
  910.  
  911.   You can switch to and from the shell buffer while `tex' is running
  912. and do other editing.  If you are formatting a long document on a slow
  913. machine, this can be very convenient.
  914.  
  915.   You can also use `texi2dvi' from an Emacs shell.  For example, here
  916. is how to use `texi2dvi' to format and print `Using and Porting GNU CC'
  917. from a shell within Emacs (where `%' is the shell prompt):
  918.  
  919.      % texi2dvi gcc.texinfo
  920.      % lpr -d gcc.dvi
  921.  
  922.   *Note Texinfo Mode Printing::, for more information about formatting
  923. and printing in Texinfo mode.
  924.  
  925. 
  926. File: texinfo.info,  Node: Texinfo Mode Printing,  Next: Compile-Command,  Prev: Within Emacs,  Up: Format/Print Hardcopy
  927.  
  928. Formatting and Printing in Texinfo Mode
  929. =======================================
  930.  
  931.   Texinfo mode provides several predefined key commands for TeX
  932. formatting and printing.  These include commands for sorting indices,
  933. looking at the printer queue, killing the formatting job, and
  934. recentering the display of the buffer in which the operations occur.
  935.  
  936. `C-c C-t C-b'
  937. `M-x texinfo-tex-buffer'
  938.      Run `texi2dvi' on the current buffer.
  939.  
  940. `C-c C-t C-r'
  941. `M-x texinfo-tex-region'
  942.      Run TeX on the current region.
  943.  
  944. `C-c C-t C-i'
  945. `M-x texinfo-texindex'
  946.      Sort the indices of a Texinfo file formatted with
  947.      `texinfo-tex-region'.
  948.  
  949. `C-c C-t C-p'
  950. `M-x texinfo-tex-print'
  951.      Print a DVI file that was made with `texinfo-tex-region' or
  952.      `texinfo-tex-buffer'.
  953.  
  954. `C-c C-t C-q'
  955. `M-x tex-show-print-queue'
  956.      Show the print queue.
  957.  
  958. `C-c C-t C-d'
  959. `M-x texinfo-delete-from-print-queue'
  960.      Delete a job from the print queue; you will be prompted for the job
  961.      number shown by a preceding `C-c C-t C-q' command
  962.      (`texinfo-show-tex-print-queue').
  963.  
  964. `C-c C-t C-k'
  965. `M-x tex-kill-job'
  966.      Kill the currently running TeX job started by `texinfo-tex-region'
  967.      or `texinfo-tex-buffer', or any other process running in the
  968.      Texinfo shell buffer.
  969.  
  970. `C-c C-t C-x'
  971. `M-x texinfo-quit-job'
  972.      Quit a TeX formatting job that has stopped because of an error by
  973.      sending an x to it.  When you do this, TeX preserves a record of
  974.      what it did in a `.log' file.
  975.  
  976. `C-c C-t C-l'
  977. `M-x tex-recenter-output-buffer'
  978.      Redisplay the shell buffer in which the TeX printing and formatting
  979.      commands are run to show its most recent output.
  980.  
  981.   Thus, the usual sequence of commands for formatting a buffer is as
  982. follows (with comments to the right):
  983.  
  984.      C-c C-t C-b             Run `texi2dvi' on the buffer.
  985.      C-c C-t C-p             Print the DVI file.
  986.      C-c C-t C-q             Display the printer queue.
  987.  
  988.   The Texinfo mode TeX formatting commands start a subshell in Emacs
  989. called the `*tex-shell*'.  The `texinfo-tex-command',
  990. `texinfo-texindex-command', and `tex-dvi-print-command' commands are
  991. all run in this shell.
  992.  
  993.   You can watch the commands operate in the `*tex-shell*' buffer, and
  994. you can switch to and from and use the `*tex-shell*' buffer as you
  995. would any other shell buffer.
  996.  
  997.   The formatting and print commands depend on the values of several
  998. variables.  The default values are:
  999.  
  1000.           Variable                              Default value
  1001.      
  1002.      texinfo-texi2dvi-command                  "texi2dvi"
  1003.      texinfo-tex-command                       "tex"
  1004.      texinfo-texindex-command                  "texindex"
  1005.      texinfo-delete-from-print-queue-command   "lprm"
  1006.      texinfo-tex-trailer                       "@bye"
  1007.      tex-start-of-header                       "%**start"
  1008.      tex-end-of-header                         "%**end"
  1009.      tex-dvi-print-command                     "lpr -d"
  1010.      tex-show-queue-command                    "lpq"
  1011.  
  1012.   You can change the values of these variables with the `M-x
  1013. edit-options' command (*note Editing Variable Values: (emacs)Edit
  1014. Options.), with the `M-x set-variable' command (*note Examining and
  1015. Setting Variables: (emacs)Examining.), or with your `.emacs'
  1016. initialization file (*note Init File: (emacs)Init File.).
  1017.  
  1018. 
  1019. File: texinfo.info,  Node: Compile-Command,  Next: Requirements Summary,  Prev: Texinfo Mode Printing,  Up: Format/Print Hardcopy
  1020.  
  1021. Using the Local Variables List
  1022. ==============================
  1023.  
  1024.   Yet another way to apply the TeX formatting command to a Texinfo file
  1025. is to put that command in a "local variables list" at the end of the
  1026. Texinfo file.  You can then specify the `tex' or `texi2dvi' commands as
  1027. a `compile-command' and have Emacs run it by typing `M-x compile'.
  1028. This creates a special shell called the `*compilation*' buffer in which
  1029. Emacs runs the compile command.  For example, at the end of the
  1030. `gdb.texinfo' file, after the `@bye', you could put the following:
  1031.  
  1032.      @c Local Variables:
  1033.      @c compile-command: "texi2dvi gdb.texinfo"
  1034.      @c End:
  1035.  
  1036. This technique is most often used by programmers who also compile
  1037. programs this way; see *Note Compilation: (emacs)Compilation.
  1038.  
  1039. 
  1040. File: texinfo.info,  Node: Requirements Summary,  Next: Preparing for TeX,  Prev: Compile-Command,  Up: Format/Print Hardcopy
  1041.  
  1042. TeX Formatting Requirements Summary
  1043. ===================================
  1044.  
  1045.   Every Texinfo file that is to be input to TeX must begin with a
  1046. `\input' command and contain an `@settitle' command:
  1047.  
  1048.      \input texinfo
  1049.      @settitle NAME-OF-MANUAL
  1050.  
  1051. The first command instructs TeX to load the macros it needs to process
  1052. a Texinfo file and the second command specifies the title of printed
  1053. manual.
  1054.  
  1055.   Every Texinfo file must end with a line that terminates TeX
  1056. processing and forces out unfinished pages:
  1057.  
  1058.      @bye
  1059.  
  1060.   Strictly speaking, these three lines are all a Texinfo file needs for
  1061. TeX, besides the body.  (The `@setfilename' line is the only line that
  1062. a Texinfo file needs for Info formatting.)
  1063.  
  1064.   Usually, the file's first line contains an `@c -*-texinfo-*-' comment
  1065. that causes Emacs to switch to Texinfo mode when you edit the file.  In
  1066. addition, the beginning usually includes an `@setfilename' for Info
  1067. formatting, an `@setchapternewpage' command, a title page, a copyright
  1068. page, and permissions.  Besides an `@bye', the end of a file usually
  1069. includes indices and a table of contents.
  1070.  
  1071. For more information, see
  1072. *Note `@setchapternewpage': setchapternewpage,
  1073. *Note Page Headings: Headings,
  1074. *Note Titlepage & Copyright Page::,
  1075. *Note Printing Indices & Menus::, and
  1076. *Note Contents::.
  1077.  
  1078. 
  1079. File: texinfo.info,  Node: Preparing for TeX,  Next: Overfull hboxes,  Prev: Requirements Summary,  Up: Format/Print Hardcopy
  1080.  
  1081. Preparing to Use TeX
  1082. ====================
  1083.  
  1084. TeX needs to know where to find the `texinfo.tex' file that you have
  1085. told it to input with the `\input texinfo' command at the beginning of
  1086. the first line.  The `texinfo.tex' file tells TeX how to handle
  1087. @-commands.  (`texinfo.tex' is included in the standard GNU
  1088. distributions.)
  1089.  
  1090.   Usually, the `texinfo.tex' file is put in the default directory that
  1091. contains TeX macros (the `/usr/lib/tex/macros' directory) when GNU
  1092. Emacs or other GNU software is installed.  In this case, TeX will find
  1093. the file and you do not need to do anything special.  Alternatively,
  1094. you can put `texinfo.tex' in the directory in which the Texinfo source
  1095. file is located, and TeX will find it there.
  1096.  
  1097.   However, you may want to specify the location of the `\input' file
  1098. yourself.  One way to do this is to write the complete path for the file
  1099. after the `\input' command.  Another way is to set the `TEXINPUTS'
  1100. environment variable in your `.cshrc' or `.profile' file.  The
  1101. `TEXINPUTS' environment variable will tell TeX where to find the
  1102. `texinfo.tex' file and any other file that you might want TeX to use.
  1103.  
  1104.   Whether you use a `.cshrc' or `.profile' file depends on whether you
  1105. use `csh', `sh', or `bash' for your shell command interpreter.  When
  1106. you use `csh', it looks to the `.cshrc' file for initialization
  1107. information, and when you use `sh' or `bash', it looks to the
  1108. `.profile' file.
  1109.  
  1110.   In a `.cshrc' file, you could use the following `csh' command
  1111. sequence:
  1112.  
  1113.      setenv TEXINPUTS .:/usr/me/mylib:/usr/lib/tex/macros
  1114.  
  1115.   In a `.profile' file, you could use the following `sh' command
  1116. sequence:
  1117.  
  1118.      TEXINPUTS=.:/usr/me/mylib:/usr/lib/tex/macros
  1119.      export TEXINPUTS
  1120.  
  1121. This would cause TeX to look for `\input' file first in the current
  1122. directory, indicated by the `.', then in a hypothetical user's
  1123. `me/mylib' directory, and finally in the system library.
  1124.  
  1125. 
  1126. File: texinfo.info,  Node: Overfull hboxes,  Next: smallbook,  Prev: Preparing for TeX,  Up: Format/Print Hardcopy
  1127.  
  1128. Overfull "hboxes"
  1129. =================
  1130.  
  1131.   TeX is sometimes unable to typeset a line without extending it into
  1132. the right margin.  This can occur when TeX comes upon what it
  1133. interprets as a long word that it cannot hyphenate, such as an
  1134. electronic mail network address or a very long title.  When this
  1135. happens, TeX prints an error message like this:
  1136.  
  1137.      Overfull \hbox (20.76302pt too wide)
  1138.  
  1139. (In TeX, lines are in "horizontal boxes", hence the term, "hbox".  The
  1140. backslash, `\', is the TeX equivalent of `@'.)
  1141.  
  1142.   TeX also provides the line number in the Texinfo source file and the
  1143. text of the offending line, which is marked at all the places that TeX
  1144. knows how to hyphenate words.  *Note Catching Errors with TeX
  1145. Formatting: Debugging with TeX, for more information about typesetting
  1146. errors.
  1147.  
  1148.   If the Texinfo file has an overfull hbox, you can rewrite the sentence
  1149. so the overfull hbox does not occur, or you can decide to leave it.  A
  1150. small excursion into the right margin often does not matter and may not
  1151. even be noticeable.
  1152.  
  1153.   However, unless told otherwise, TeX will print a large, ugly, black
  1154. rectangle beside the line that contains the overful hbox.  This is so
  1155. you will notice the location of the problem if you are correcting a
  1156. draft.
  1157.  
  1158.   To prevent such a monstrosity from marring your final printout, write
  1159. the following in the beginning of the Texinfo file on a line of its own,
  1160. before the `@titlepage' command:
  1161.  
  1162.      @finalout
  1163.  
  1164. 
  1165. File: texinfo.info,  Node: smallbook,  Next: A4 Paper,  Prev: Overfull hboxes,  Up: Format/Print Hardcopy
  1166.  
  1167. Printing "Small" Books
  1168. ======================
  1169.  
  1170.   By default, TeX typesets pages for printing in an 8.5 by 11 inch
  1171. format.  However, you can direct TeX to typeset a document in a 7 by
  1172. 9.25 inch format that is suitable for bound books by inserting the
  1173. following command on a line by itself at the beginning of the Texinfo
  1174. file, before the title page:
  1175.  
  1176.      @smallbook
  1177.  
  1178. (Since regular sized books are often about 7 by 9.25 inches, this
  1179. command might better have been called the `@regularbooksize' command,
  1180. but it came to be called the `@smallbook' command by comparison to the
  1181. 8.5 by 11 inch format.)
  1182.  
  1183.   If you write the `@smallbook' command between the start-of-header and
  1184. end-of-header lines, the Texinfo mode TeX region formatting command,
  1185. `texinfo-tex-region', will format the region in "small" book size
  1186. (*note Start of Header::.).
  1187.  
  1188.   The Free Software Foundation distributes printed copies of `The GNU
  1189. Emacs Manual' and other manuals in the "small" book size.  *Note
  1190. `@smallexample' and `@smalllisp': smallexample & smalllisp, for
  1191. information about commands that make it easier to produce examples for
  1192. a smaller manual.
  1193.  
  1194. 
  1195. File: texinfo.info,  Node: A4 Paper,  Next: Cropmarks and Magnification,  Prev: smallbook,  Up: Format/Print Hardcopy
  1196.  
  1197. Printing on A4 Paper
  1198. ====================
  1199.  
  1200.   You can tell TeX to typeset a document for printing on European size
  1201. A4 paper with the `@afourpaper' command.  Write the command on a line
  1202. by itself between `@iftex' and `@end iftex' lines near the beginning of
  1203. the Texinfo file, before the title page:
  1204.  
  1205.   For example, this is how you would write the header for this manual:
  1206.  
  1207.      \input texinfo    @c -*-texinfo-*-
  1208.      @c %**start of header
  1209.      @setfilename texinfo
  1210.      @settitle Texinfo
  1211.      @syncodeindex vr fn
  1212.      @iftex
  1213.      @afourpaper
  1214.      @end iftex
  1215.      @c %**end of header
  1216.  
  1217. 
  1218. File: texinfo.info,  Node: Cropmarks and Magnification,  Prev: A4 Paper,  Up: Format/Print Hardcopy
  1219.  
  1220. Cropmarks and Magnification
  1221. ===========================
  1222.  
  1223.   You can attempt to direct TeX to print cropmarks at the corners of
  1224. pages with the `@cropmarks' command.  Write the `@cropmarks' command on
  1225. a line by itself between `@iftex' and `@end iftex' lines near the
  1226. beginning of the Texinfo file, before the title page, like this:
  1227.  
  1228.      @iftex
  1229.      @cropmarks
  1230.      @end iftex
  1231.  
  1232.   This command is mainly for printers that typeset several pages on one
  1233. sheet of film; but you can attempt to use it to mark the corners of a
  1234. book set to 7 by 9.25 inches with the `@smallbook' command.  (Printers
  1235. will not produce cropmarks for regular sized output that is printed on
  1236. regular sized paper.)  Since different printing machines work in
  1237. different ways, you should explore the use of this command with a
  1238. spirit of adventure.  You may have to redefine the command in the
  1239. `texinfo.tex' definitions file.
  1240.  
  1241.   You can attempt to direct TeX to typeset pages larger or smaller than
  1242. usual with the `\mag' TeX command.  Everything that is typeset is
  1243. scaled proportionally larger or smaller.  (`\mag' stands for
  1244. "magnification".)  This is *not* a Texinfo @-command, but is a PlainTeX
  1245. command that is prefixed with a backslash.  You have to write this
  1246. command between `@tex' and `@end tex' (*note Using Ordinary TeX
  1247. Commands: Using Ordinary TeX Commands.).
  1248.  
  1249.   Follow the `\mag' command with an `=' and then a number that is 1000
  1250. times the magnification you desire.  For example, to print pages at 1.2
  1251. normal size, write the following near the beginning of the Texinfo
  1252. file, before the title page:
  1253.  
  1254.      @tex
  1255.      \mag=1200
  1256.      @end tex
  1257.  
  1258.   With some printing technologies, you can print normal-sized copies
  1259. that look better than usual by using a larger-than-normal master.
  1260.  
  1261.   Depending on your system, `\mag' may not work or may work only at
  1262. certain magnifications.  Be prepared to experiment.
  1263.  
  1264. 
  1265. File: texinfo.info,  Node: Create an Info File,  Next: Install an Info File,  Prev: Format/Print Hardcopy,  Up: Top
  1266.  
  1267. Creating an Info File
  1268. *********************
  1269.  
  1270.   `makeinfo' is a utility that converts a Texinfo file into an Info
  1271. file; `texinfo-format-region' and `texinfo-format-buffer' are GNU Emacs
  1272. functions that do the same.
  1273.  
  1274.   A Texinfo file must possess an `@setfilename' line near its
  1275. beginning, otherwise the Info formatting commands will fail.
  1276.  
  1277.   For information on installing the Info file in the Info system, see
  1278. *Note Install an Info File::.
  1279.  
  1280. * Menu:
  1281.  
  1282. * makeinfo advantages::         `makeinfo' provides better error checking.
  1283. * Invoking makeinfo::           How to run `makeinfo' from a shell.
  1284. * makeinfo options::            Specify fill-column and other options.
  1285. * Pointer Validation::          How to check that pointers point somewhere.
  1286. * makeinfo in Emacs::           How to run `makeinfo' from Emacs.
  1287. * texinfo-format commands::     Two Info formatting commands written
  1288.                                   in Emacs Lisp are an alternative
  1289.                                   to `makeinfo'.
  1290. * Batch Formatting::            How to format for Info in Emacs Batch mode.
  1291. * Tag and Split Files::         How tagged and split files help Info
  1292.                                   to run better.
  1293.  
  1294. 
  1295. File: texinfo.info,  Node: makeinfo advantages,  Next: Invoking makeinfo,  Prev: Create an Info File,  Up: Create an Info File
  1296.  
  1297. `makeinfo' Preferred
  1298. ====================
  1299.  
  1300.   The `makeinfo' utility creates an Info file from a Texinfo source
  1301. file more quickly than either of the Emacs formatting commands and
  1302. provides better error messages.  We recommend it.  `makeinfo' is a C
  1303. program that is independent of Emacs.  You do not need to run Emacs to
  1304. use `makeinfo', which means you can use `makeinfo' on machines that are
  1305. too small to run Emacs. You can run `makeinfo' in any one of three
  1306. ways: from an operating system shell, from a shell inside Emacs, or by
  1307. typing a key command in Texinfo mode in Emacs.
  1308.  
  1309.   The `texinfo-format-region' and the `texinfo-format-buffer' commands
  1310. are useful if you cannot run `makeinfo'.  Also, in some circumstances,
  1311. they format short regions or buffers more quickly than `makeinfo'.
  1312.  
  1313. 
  1314. File: texinfo.info,  Node: Invoking makeinfo,  Next: makeinfo options,  Prev: makeinfo advantages,  Up: Create an Info File
  1315.  
  1316. Running `makeinfo' from a Shell
  1317. ===============================
  1318.  
  1319.   To create an Info file from a Texinfo file, type `makeinfo' followed
  1320. by the name of the Texinfo file.  Thus, to create the Info file for
  1321. Bison, type the following at the shell prompt (where `%' is the prompt):
  1322.  
  1323.      % makeinfo bison.texinfo
  1324.  
  1325.   (You can run a shell inside Emacs by typing `M-x shell'.)
  1326.  
  1327.   Sometimes you will want to specify options.  For example, if you wish
  1328. to discover which version of `makeinfo' you are using, type:
  1329.  
  1330.      % makeinfo --version
  1331.  
  1332.   *Note makeinfo options::, for more information.
  1333.  
  1334.