I am not an expert in LaTeX. Thus, the question may sound trivial. I am using the tabbing environment, and I have long lines to wrap. Thus, I am using the \tabfill
command in order to do so.
\newcommand\tabfill[1]{%\dimen@\linewidth%
\advance\dimen@\@totalleftmargin%
\advance\dimen@-\dimen\@curtab%
\parbox[t]\dimen@{#1\ifhmode\strut\fi}%
% or, to avoid stretching:
% \parbox[t]\dimen@{\raggedright #1\ifhmode\strut\fi}%
}
The only problem that I have with this command is that the text inside the \tabfill
box is aligned to the left margin. I would like that when this text is wrapped (since it is inside a tabbing environment) it is also indented in the rows following the first. Any idea about how to modify this tabfill command in order to achieve this goal? Or any other solution?
Example of what I am looking for:
Column 1 Column 2
bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla
bla bla bla bla
Code (generating no indent):
\begin{tabbing}
\hspace{3.1cm} \= \kill
Column 1 \> Column 2\\
bla bla \> \tabfill{bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla}\\
bla bla \> \tabfill{bla bla}
\end{tabbing}
Does it make sense?
Best Answer
This is what I get from your original code (the first setting to
\dimen@
uncommented):Let's add a
\leftskip
setting:If you don't plan using very complicated things inside the argument to
\tabfill
such as itemized or enumerated lists, this is the simplest solution. If you want to add\raggedright
, place it in front of\leftskip
.