manpagez: man pages & more
info texinfo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.4.1 Using the @table Command

Use the @table command to produce two-column tables. It is typically used when you have a list of items and a brief text with each one, such as “definition lists”.

Write the @table command at the beginning of a line, after a blank line, and follow it on the same line with an argument that is a Texinfo “indicating” command such as @code, @samp, @var, @option, or @kbd (see section Indicating Definitions, Commands, etc.).

This command will be applied to the text that goes into the first column of each item and thus determines how it will be highlighted. For example, @table @code will cause the text in the first column to be output as if it had been the argument to an @code command.

You may also use the @asis command as an argument to @table. @asis is a command that does nothing; if you use this command after @table, the first column entries are output without added highlighting (“as is”).

The @table command works with other commands besides those explicitly mentioned here. However, you can only use predefined Texinfo commands that normally take an argument in braces. You cannot reliably use a new command defined with @macro, but an @alias (for a suitable predefined command) is acceptable. See section Defining New Texinfo Commands.

Begin each table entry with an @item command at the beginning of a line. Write the first column text on the same line as the @item command. Write the second column text on the line following the @item line and on subsequent lines. (You do not need to type anything for an empty second column entry.) You may write as many lines of supporting text as you wish, even several paragraphs. But only the text on the same line as the @item will be placed in the first column (including any footnotes).

Normally, you should put a blank line before an @item line (except the first one). This puts a blank line in the Info file. Except when the entries are very brief, a blank line looks better.

End the table with a line consisting of @end table, followed by a blank line. TeX will always start a new paragraph after the table, so the blank line is needed for the Info output to be analogous.

The following table, for example, highlights the text in the first column with an @samp command:

@table @samp
@item foo
This is the text for

@item bar
Text for @samp{bar}.
@end table

This produces:


This is the text for ‘foo’.


Text for ‘bar’.

If you want to list two or more named items with a single block of text, use the @itemx command. (See section @itemx: Second and Subsequent Items.)

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October 2, 2013 using texi2html 5.0.

© 2000-2021
Individual documents may contain additional copyright information.