1

I have a tall array that I would like to make square. Unlike the solution here, which works but makes the array wider to match up with the width, I would like to decrease the spaces between rows to make it square.

    \documentclass[12pt]{report}
    \usepackage{wasysym}      
    \usepackage{amsmath} 
    \usepackage{arydshln}
    \begin{document}

    $\left[\begin{array}{ccc:ccc}
    \times&\times&\times&\times&\times&\times\\
    \Circle&\times&\times&\times&\times&\times\\
    \Circle&\odot&\times&\times&\times&\times\\\hdashline
    \Circle&\Circle&\Circle&\times&\times&\Circle\\
    \Circle&\Circle&\times&\times&\times&\times\\
    \Circle&\Circle&\times&\times&\times&\times\\\end{array}\right]$

    \end{document}

enter image description here

  • Please, make a full example from \documentclass to \end{document} – egreg Jan 27 '16 at 19:19
  • The MWE doesn't produce such a tall matrix, but rather a wide one. Do you have some “double space” setting in your document? – egreg Jan 27 '16 at 19:28
  • Ah, yes, double spacing is built into the template I'm using. – Mark Jan 27 '16 at 19:33
2

Disclaimer: Because a minimal example is missing, I do not know, where your large vertical space comes from. I had to increase the spacing to get it square with a plain document class.


Usually the vertical spacing inside a tabular or array can be influenced by setting \arraystretch:

\documentclass{article}
\usepackage{arydshln}% \hdashline
\usepackage{wasysym}% \Circle
\begin{document}
\[
  \left[
    \renewcommand*{\arraystretch}{1.5}
    \begin{array}{ccc:ccc}
      \times&\times&\times&\times&\times&\times\\
      \Circle&\times&\times&\times&\times&\times\\
      \Circle&\odot&\times&\times&\times&\times\\\hdashline
      \Circle&\Circle&\Circle&\times&\times&\Circle\\
      \Circle&\Circle&\times&\times&\times&\times\\
      \Circle&\Circle&\times&\times&\times&\times\\
    \end{array}
  \right]
\]
\end{document}

Result

  • Using \arraystretch with 0.8 seems to work, thanks! – Mark Jan 27 '16 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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