Go to the first, previous, next, last section, table of contents.

@smallexample and @smalllisp

In addition to the regular @example and @lisp commands, Texinfo has two other "example-style" commands. These are the @smallexample and @smalllisp commands. Both these commands are designed for use with the @smallbook command that causes TeX to produce a printed manual in a 7 by 9.25 inch format rather than the regular 8.5 by 11 inch format.

In TeX, the @smallexample and @smalllisp commands typeset text in a smaller font for the smaller @smallbook format than for the 8.5 by 11 inch format. Consequently, many examples containing long lines fit in a narrower, @smallbook page without needing to be shortened. Both commands typeset in the normal font size when you format for the 8.5 by 11 inch size; indeed, in this situation, the @smallexample and @smalllisp commands are defined to be the @example and @lisp commands.

In Info, the @smallexample and @smalllisp commands are equivalent to the @example and @lisp commands, and work exactly the same.

Mark the end of @smallexample or @smalllisp with @end smallexample or @end smalllisp, respectively.

Here is an example written in the small font used by the @smallexample and @smalllisp commands:

This is an example of text written between @smallexample and
@end smallexample.  In Info and in an 8.5 by 11 inch manual,
this text appears in its normal size; but in a 7 by 9.25 inch manual,
this text appears in a smaller font.

The @smallexample and @smalllisp commands make it easier to prepare smaller format manuals without forcing you to edit examples by hand to fit them onto narrower pages.

As a general rule, a printed document looks better if you write all the examples in a chapter consistently in @example or in @smallexample. Only occasionally should you mix the two formats.

See section Printing "Small" Books, for more information about the @smallbook command.


Go to the first, previous, next, last section, table of contents.