proper interline spacing in tables?

79 views
Skip to first unread message

Stefano Franchi

unread,
Oct 15, 2009, 6:15:47 PM10/15/09
to latexus...@googlegroups.com
Dear all,

I am trying to build a table with cells containing text in small font
(scriptsize or footnote size) and single spacing paragraphs, However, I cannot
control the text spacing (i.e. the "leading) properly with the set space
package. I attach a minimal example below, a 4-cell table with text in sizes
from script to normal. There are two problems I would like to solve:

1. Only the paragraph with normal size font has correct paragraph spacing. the
other three font sizes change the spacing


2. Furthermore, even when it works, single spacing is not tight enough for the
smallest font sizes.


On problem (1): is there an incompatibility between the setspace package and
the tabular environment? Perhaps I should use a different strategy?

Any help appreciated.


Stefano

minimal example:

\documentclass[letterpaper,11pt]{scrartcl}
\usepackage{array}
\usepackage{setspace}
\singlespace

\begin{document}

\section{A table that should contain single spaced text in various font sizes}

\begin{tabular}{|>{\centering}p{1.2in}|>{\centering}p{1.2in}|
>{\centering}p{1.2in}|>{\centering}p{1.2in}|}
\hline

{\scriptsize Lorem ipsum dolor sit amet, consectetuer adipiscing elit. }
{\scriptsize \par}
{\scriptsize Ut purus elit, vestibulum ut, placerat ac, }
&
{\footnotesize Lorem ipsum dolor sit amet, consectetuer adipiscing
elit.}
{\footnotesize \par}
{\footnotesize Ut purus elit, vestibulum ut, placerat ac,}
&
{\small Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
{\small \par}
{\small Ut purus elit, vestibulum ut, placerat ac,}
&
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Ut purus elit, vestibulum ut, placerat ac,
\tabularnewline
\hline
\end{tabular}
\end{document}

______________________________________________________________
Stefano Franchi
Department of Philosophy Ph: (979) 862-2211
Texas A&M University Fax: (979) 845-0458
305B Bolton Hall fra...@philosophy.tamu.edu
College Station, TX 77843-4237

Anish Tondwalkar

unread,
Oct 15, 2009, 7:08:08 PM10/15/09
to latexus...@googlegroups.com
Stefano,

When you use \tabular{p}, it makes a table of single paragraphs. Using \par or otherwise breaking it into different paragraphs breaks it.

Try this:

\begin{tabular}{|>{\centering}p{1.2in}|>{\centering}p{1.2in}|
>{\centering}p{1.2in}|>{\centering}p{1.2in}|}
\hline
{\scriptsize Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
&
{\footnotesize Lorem ipsum dolor sit amet, consectetuer adipiscing
elit.}
&
{\small Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
&
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \\&

{\scriptsize Ut purus elit, vestibulum ut, placerat ac, } &
{\footnotesize Ut purus elit, vestibulum ut, placerat ac,} &
{\small Ut purus elit, vestibulum ut, placerat ac,} &

Ut purus elit, vestibulum ut, placerat ac,
\tabularnewline
\hline
\end{tabular}

--
Anish Tondwalkar


jon

unread,
Oct 15, 2009, 7:12:05 PM10/15/09
to LaTeX Users Group
if you simplify your table, it looks like your problems are solved
regarding spacing (assuming google doesn't mix up the lines, that is):

\documentclass[letterpaper,11pt]{scrartcl}
\usepackage{array}
% \usepackage{setspace}
% \singlespace

\begin{document}

\section{A table that should contain single spaced text in various
font sizes}

\begin{tabular}{|>{\centering}p{1.2in}|>{\centering}p{1.2in}|
>{\centering}p{1.2in}|>{\centering}p{1.2in}|}

\hline

\scriptsize Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\par%
Ut purus elit, vestibulum ut, placerat ac,
&
\footnotesize Lorem ipsum dolor sit amet, consectetuer adipiscing
elit.
\par%
Ut purus elit, vestibulum ut, placerat ac,
&
\small Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\par%
Ut purus elit, vestibulum ut, placerat ac,
&
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\par%
Reply all
Reply to author
Forward
0 new messages