indenting a subset of rows in a table

3,697 views
Skip to first unread message

Mike

unread,
Jan 27, 2009, 12:39:18 PM1/27/09
to LaTeX Users Group

Hi,

I'd like to indent (or offset by some amount) a subset of the rows in
a table. This (below) works, but I'd like to know if there is a more
elegant way to do this. I've tried \indent and \noindent to no avail.

Thanks,
Mike

------------------------

\parindent0em
\begin{table}[p]
\begin{center}
\caption{Trend in terms of the terrestrial water budget.} \label
{tab:trendtable}
\begin{tabular}{lll}
\midrule[1pt]
\multicolumn{1}{c} {Term} &
\multicolumn{1}{c} {Magnitude, mm} &
\multicolumn{1}{c} {Period of Record} \\ \midrule[1pt]
\textbf{MajorGroup} & & \\
\mbox{ INDENT} & & \\
\mbox{ INDENT} & & \\
\textbf{MajorGroup} & & \\
\textbf{MajorGroup} & & \\
\end{tabular}
\end{center}
\end{table}

Werner Grundlingh

unread,
Jan 28, 2009, 5:50:10 PM1/28/09
to LaTeX Users Group
You set the paragraph indentation to be 0em. Hence, using \indent
would leave a horizontal space (or indent) before a paragraph of
exactly 0em, or nothing. Remove \parindent0em and you'll notice the
difference when using
\indent INDENT & & \\
instead of
\mbox{ INDENT} & & \\

Other alternatives also exist. For example, using
\hspace{2cm}INDENT & & \\
\hskip 2cm INDENT & & \\
or you could even set a column with a specific width (like p{2cm}) to
obtain a certain, fixed indentation per line.

Werner
Reply all
Reply to author
Forward
0 new messages