1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
<html>
<head><title>tabbing</title></head>
<body>
<h1>tabbing</h1>
<P>
<PRE>
\begin{tabbing}
text \= more text \= still more text \= last text \\
second row \> \> more \\
.
.
.
\end{tabbing}
</PRE>
<P>
The <CODE>tabbing</CODE> environment provides a way to align text in columns.
It works by setting tab stops and tabbing to them much the way you do
with an ordinary typewriter.
</P>
<P>
It is best suited for cases where the width of each column is constant
and known in advance.
</P>
<P>
This environment can be broken across pages, unlike the <CODE>tabular</CODE>
environment.
</P>
<P>
The following commands can be used inside a <CODE>tabbing</CODE> enviroment:
</P>
<DL COMPACT>
<DT><CODE>\=</CODE>
<DD>
Sets a tab stop at the current position.
<DT><CODE>\></CODE>
<DD>
Advances to the next tab stop.
<DT><CODE>\<</CODE>
<DD>
This command allows you to put something to the left of the
local margin without changing the margin.
Can only be used at the start of the line.
<DT><CODE>\+</CODE>
<DD>
Moves the left margin of the next and all the
following commands one tab stop to the right.
<DT><CODE>\-</CODE>
<DD>
Moves the left margin of the next and all the
following commands one tab stop to the left.
<DT><CODE>\'</CODE>
<DD>
Moves everything that you have typed so far in the
current column, i.e. everything from the most recent <CODE>\></CODE>,
<CODE>\<</CODE>, <CODE>\'</CODE>, <CODE>\\</CODE>, or <CODE>\kill</CODE> command, to the right
of the previous column, flush against the current column's tab stop.
<DT><CODE>\`</CODE>
<DD>
Allows you to put text flush right against any tab stop, including tab
stop 0. However, it can't move text to the right of the last column
because there's no tab stop there. The <CODE>\`</CODE> command moves all the
text that follows it, up to the <CODE>\\</CODE> or <CODE>\end{tabbing}</CODE>
command that ends the line, to the right margin of the tabbing
environment. There must be no <CODE>\></CODE> or <CODE>\'</CODE> command between
the <CODE>\`</CODE> and the command that ends the line.
<DT><CODE>\kill</CODE>
<DD>
Sets tab stops without producing
text. Works just like <CODE>\\</CODE> except that it throws away the
current line instead of producing output for it. The effect of any
<CODE>\=</CODE>, <CODE>\+</CODE> or <CODE>\-</CODE> commands in that line remain in
effect.
<DT><CODE>\pushtabs</CODE>
<DD>
Saves all current tab stop positions. Useful for
temporarily changing tab stop positions in the middle of a
<CODE>tabbing</CODE> environment.
<DT><CODE>\pushtabs</CODE>
<DD>
Restores the tab stop positions saved by the last <CODE>\pushtabs</CODE>.
<DT><CODE>\a</CODE>
<DD>
In a <CODE>tabbing</CODE> environment, the commands <CODE>\=</CODE>, <CODE>\'</CODE> and
<CODE>\`</CODE> do not produce accents as normal. Instead, the commands
<CODE>\a=</CODE>, <CODE>\a'</CODE> and <CODE>\a`</CODE> are used.
</DL>
<P>
This example typesets a Pascal function in a traditional format:
</P>
<PRE>
\begin{tabbing}
function \= fact(n : integer) : integer;\\
\> begin \= \+ \\
\> if \= n $>$ 1 then \+ \\
fact := n * fact(n-1) \- \\
else \+ \\
fact := 1; \-\- \\
end;\\
\end{tabbing}
</PRE>
<p>--><a href="index.html">LaTeX index</a>
</body>
</html>
|