Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I started using Latex recently and I put together 4 ways of changing the space in a table. Two general ways defining the general space between cols and rows as well as two ways of adding space between certain rows or cols. I was wondering if the 4 ways I use are the best or most common one to use to adjust space in a table?

Here is my simple example:

\begin{table}

    \setlength{\tabcolsep}{6pt} % General space between cols (6pt standard)
    \renewcommand{\arraystretch}{1} % General space between rows (1 standard)
    % Add @{\hskip Xpt} to tabular to add space between certain columns
    % Add [Xpt] after \\ of a certain row to add extra space before next row

    \begin{tabular}{c@{\hskip 12pt}c}

        % table content

    \end{tabular}

\end{table}
share|improve this question
add comment

2 Answers 2

Your described ways are correct. In the next steps I will quote the manual of array and the documentation of LaTeX2e source2e:

array

@{decl.}

Suppresses inter-column space and inserts decl. instead.

source2e:

ARRAY PARMETERS:

\arraycolsep

: half the width separating columns in an array environment

\tabcolsep

: half the width separating columns in a tabular environment

\arraystretch

: line spacing in array and tabular environments is done by placing a strut in every row of height and depth \arraystretch times the height and depth of the strut produced by an ordinary \strut commmand.

\extracolsep{WIDTH}

: for use inside an @ in the preamble. Causes a WIDTH space to be added between columns for the rest of the columns. This is in addition to the ordinary intercolumn space.

combination of array and source2e

In the macro \@array the line separator \\ is \let to the command \@arraycr.

\@argarraycr[LENGTH]
share|improve this answer
add comment

I normally use changing tabcolsep and arraystretch, as you showed in the question:

\setlength{\tabcolsep}{6pt} % General space between cols (6pt standard)
\renewcommand{\arraystretch}{1} % General space between rows (1 standard)

I've had bad experiences with [Xpt] in very complex tables (multirows and multicols), and the syntax @{\hskip Xpt}... first time I see this!

Hope this helped!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.