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.

Double-spacing seems to mess up the vertical spacing inside of arrays. For example, the braces below extend too high. Is there a way to have the array contents centered vertically within the braces?

\documentclass{article}
\usepackage[doublespacing]{setspace}
\begin{document}
$\left\{ \begin{array}{c} abcde \\ abcde \end{array} \right\}$
\end{document}

Tall Braces

The problem gets more obvious as the line spacing increases. For example, compare the space above the first line with the space below the second one:

\documentclass{article}
\begin{document}
\renewcommand\arraystretch{3}
$\left\{\begin{array}{c} abcde \\ abcde \end{array} \right\}$
\end{document}

Taller Braces

share|improve this question
add comment

4 Answers

easiest (tested with the MWE, I didn't try your thesis class) is to add

\renewcommand\arraystretch{0.7}

to the preamble of the document.

share|improve this answer
    
Thanks, I tried this as well. It's a good way of obscuring the problem (by condensing everything vertically), but the underlying asymmetry is still there. Specifically, there is still more space above the text than below it. By comparison, \renewcommand\arraystretch{1.5} makes the underlying problem more apparent. –  Noah Dec 16 '12 at 20:54
1  
There is more space above than below in standard latex without any double spacing, as arrays are designed to give even line spacing in normal situations, so every line has a \strut an invisible rule, so there is enough space above the baseline of each row for a construct such as (A) with a bracketed capital, and your example has just lower case. –  David Carlisle Dec 16 '12 at 21:12
    
Ah, thank you for the explanation. I see the logic behind equal line spacing in arrays, and for leaving enough room for a bracketed capital like (A). However, there still seems to be an inordinate amount of space above when the line spacing is large. For example, try the following: \renewcommand\arraystretch{4} $\left\{ \begin{array}{c}(Aq) \\ (Aq) \end{array} \right\}$ Is there a simple way to decrease the space above the array lines without affecting the space below? The best I've come up with is raising each line with \raisebox. –  Noah Dec 17 '12 at 1:25
1  
arraystretch just multiplies the height and depth of the strut in equal proportion so normally there is roughly .7 baselineskip height and .3 depth so if you multiply by 4 there is 2.8 baselineskip height and 1.2 baselineskip depth –  David Carlisle Dec 17 '12 at 9:23
add comment

I would really avoid using such monsters inline. As you can see not only it messes up the spacing but also eyes get misty while reading it. Use a smallmatrix instead.

\documentclass{article}
\usepackage{amsmath}
\usepackage[doublespacing]{setspace}
\begin{document}
Lorem ipsum and you know $\left\{
\begin{smallmatrix} abcde \\ abcde \end{smallmatrix} 
\right\}$
oh and a small matrix. I'm getting better at making up stupid sentences (or I 
was until the last one). 
$\left\{
\begin{array}{c} abcde \\ abcde \end{array} 
\right\}$
It might speak for itself. 

\end{document}

enter image description here

share|improve this answer
    
Thanks for pointing out the smallmatrix command. However, I do want double-spacing within the array. I want to avoid the problem that as line spacing increases the space above each line gets bigger than the space below. –  Noah Dec 17 '12 at 15:58
1  
@Noah Well you've been warned. It's actually trying to help you but you want to break and fix at the same time. Nevertheless here is something related: tex.stackexchange.com/questions/19457/… –  percusse Dec 17 '12 at 16:02
add comment

I can get the output I want by manually removing space before the first array line, as follows. However this solution requires re-calculating the amount of space to remove with any change in line spacing.

\documentclass{article}
\usepackage[doublespacing]{setspace}
\begin{document}
$\left\{
\begin{array}{c} \\[-2.3em]
abcde \\ abcde
\end{array}
\right\}$
\end{document}

Better Braces

share|improve this answer
add comment
up vote 0 down vote accepted

I've adapted Hendrik Vogt's solution here as follows. (He also has a clearer discussion of the problem.)

\documentclass{article}
\usepackage[doublespacing]{setspace}
\usepackage{amsmath,etoolbox}
\makeatletter
\newif\ifcenter@asb@\center@asb@false
\def\center@arstrutbox{%
    \setbox\@arstrutbox\hbox{$\vcenter{\box\@arstrutbox}$}%
    }
\newcommand*{\CenteredArraystretch}[1]{%
    \ifcenter@asb@\else
      \pretocmd{\@mkpream}{\center@arstrutbox}{}{}%
      \center@asb@true
    \fi
    \renewcommand{\arraystretch}{#1}%
    }
\makeatother
\CenteredArraystretch{1}
\begin{document}
$\left\{ \begin{array}{c} abcde \\ abcde \end{array} \right\}$
\end{document}
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.