2

enter image description here

I am trying to get \Centerstack to create space around the contents of every item, but it seems that the vertical space of 1em above the baseline for each item. Is it possible to modify this?

\documentclass[12pt,a4paper]{article}

\usepackage{mathtools}

\usepackage{stackengine}

\begin{document}

\Centerstack[l]{ {Text} {$\displaystyle \frac{1}{1}$} {Text} }

\end{document}

1 Answers1

0

A \Centerstack is a "long stack" using a fixed baselineskip, defaulting to \normalbaselineskip. You could increase that baselineskip, as in the 2nd example. However, there, the added baselineskip applies to the top and bottom rows, as well, which is probably not desired.

In the 3rd example, a "short stack" is employed, which uses a constant gap between the content of each row. However, short stacks are not vertically centered, so you have to apply a \vcenter to achieve that effect, if desired.

\documentclass[12pt,a4paper]{article}

\usepackage{mathtools}

\usepackage{stackengine}

\begin{document}

\Centerstack[l]{ {Text} {$\displaystyle \frac{1}{1}$} {Text} } blah blah\blah

\hrulefill\ \setstackgap{L}{1.5\normalbaselineskip} \Centerstack[l]{ {Text} {$\displaystyle \frac{1}{1}$} {Text} } blah blah\blah

\hrulefill\ \setstackgap{S}{6pt} $\vcenter{\hbox{\Shortstack[l]{ {Text} {$\displaystyle \frac{1}{1}$} {Text} }}}$ blah blah\blah

\hrulefill \end{document}

enter image description here