680 Manufactura
686 Impresión
686.2 Imprenta
686.22 Tipografía
686.225 Composición

6.1 Entornos LaTeX estándar

Standard LaTEX has two families of environments that allow material to be lined up in columns — namely, the tabbing environment and the tabular and array environments. The main differences between the two kinds of environments are:

  • The tabbing environment is not as general as the tabular environment. It can be typeset only as a separate paragraph, whereas a tabular environment can be placed anywhere in the text or inside mathematics.

  • The tabbing environment can be broken between pages, whereas the standard tabular environment cannot.

  • With the tabbing environment the user must specify the position of each tab stop explicitly. With the tabular environment LaTEX can automatically determine the width of the columns.

  • Multiple tabbing environments cannot be nested, whereas tabular environments can, thus allowing complex alignments to be realized.

6.1.1 Usando el entorno de tabulación

This section deals with some of the lesser-known features of the tabbing environment. First, it must be realized that formatting is under the complete control of the user. Somewhat unexpectedly, when moving to a given tab stop, you always end up at the exact horizontal position where it was defined, independently of where the current point is. As a consequence, the current point can move backward and overwrite previous text. The scope of declarations within rows is usually limited to the region between tab stops, e.g.,

Be aware that the usual LaTEX commands for making accents, ’, ‘, and =, are redefined inside the tabbing environment. The accents are available by typing ’, ’, and = instead (or by using accented characters directly). The - command, which normally signals a possible hyphenation point, is also redefined, but this consideration is not so important because the lines in a tabbing environment are never broken.

If the command ’ is used between two tab stops, then all text to the left of it is placed into the previous tab region and typeset flush right against the previous tab stop (only separated by a distance of ). The default value for is set equal to , which in turn is usually 5pt. To set text flush right to the right margin you can use ’. The effect of both commands is shown below in the next example.

There exist a few common ways to define tab stops— that is, using a line to be typeset or explicitly specifying a skip to the next tab stop. The command may be used to terminate a line that is only used to set tab stops: the line itself is not typeset. The following example demonstrates this and shows the redefinition of tab stops on the fourth line.

6.1.2 tabto - Una forma alternativa de tabulación

As an alternative to the standard tabbing environment Donald Arseneau developed the tabto package that offers a set of commands for moving to tab positions that can be used within normal text, list environments, etc., without the need to be confined in a special environment.

6.1.3 Usando el entorno tabular

In general, when tables of any degree of complexity are required, it is usually easier to consider the tabular-like environments defined by LaTEX. These environments align material horizontally in rows (separated by \) and vertically in columns (separated by &). The \ command accepts an optional argument for requesting additional vertical space after the row. How this argument is interpreted depends unfortunately on the type of the rightmost column in the table; see Section 6.2.1 on the facing page for a discussion of the pitfalls and its behavior in the array package.