Previous: , Up: Tabs and Fields   [Contents][Index]


5.12.2 Fields

Fields are a more general way of laying out tabular data. A field is defined as the data between a pair of delimiting characters. It contains substrings that are separated by padding characters. The width of a field is the distance on the input line from the position where the field starts to the next tab stop. A padding character inserts an adjustable space similar to TeX’s \hss command (thus it can even be negative) to make the sum of all substring lengths plus the adjustable space equal to the field width. If more than one padding character is inserted, the available space is evenly distributed among them.

Request: .fc [delim-char [padding-char]]

Define a delimiting and a padding character for fields. If the latter is missing, the padding character defaults to a space character. If there is no argument at all, the field mechanism is disabled (which is the default). In contrast to, e.g., the tab repetition character, delimiting and padding characters are not associated with the environment (see Environments).

.fc # ^
.ta T 3i
#foo^bar^smurf#
.br
#foo^^bar^smurf#
    ⇒ foo         bar          smurf
    ⇒ foo            bar       smurf