2

The following MWE is rendered as shown below:

\documentclass{article}

\begin{document}
\begin{array}[t]{@{}l@{}}
  \left[\int abc\right]\\
  \left[abc\right]
\end{array}
\end{document}

Misaligned brackets

Why aren't the left brackets aligned? Removing the \int fixes it, but why? Is there a way to fix the alignment? (My real example involves nested arrays instead of an integral, but this was the simplest I could get).

3
  • Off-topic: Something bizarre seems to be happening: Your MWE doesn't switch to math mode to typeset the array. Nevertheless, the presence of the [t] position specifier seems to suffice to avoid generating an error message. If [t] is removed, it's necessary to place the array in math mode explicitly.
    – Mico
    Commented Mar 11, 2016 at 6:21
  • 1
    @Mico Interesting feature.
    – egreg
    Commented Mar 11, 2016 at 9:30
  • 2
    The brackets are aligned; it happens that the bigger one has a larger sidebearing on its left.
    – egreg
    Commented Mar 11, 2016 at 9:31

1 Answer 1

2

The cause seems to be different size of brackets. For your (simple) case try the following:

\documentclass{article}

\begin{document}
\[
\begin{array}{@{}l@{}}
  \left[\int abc\right]\\
  \left[\strut abc\right]
\end{array}
\]
\end{document}

Alternative solution is use \bigl[ ...\bigr] instead left[ ...\right]. With this you will achieve equal big brackets:

\documentclass{article}

\begin{document}
\[
\begin{array}{@{}l@{}}
  \bigl[\int abc\bigr]\\
  \bigl[ abc\bigr]
\end{array}
\]
\end{document}

enter image description here

3
  • Can you explain how/why this work? (And ideally why I should have expected the behaviour above!)
    – Clément
    Commented Mar 11, 2016 at 4:55
  • Also, is there a way to add an "anti"\strut to the previous line instead?
    – Clément
    Commented Mar 11, 2016 at 4:55
  • Good questions ... Problem is probably that bracket in your MWE has different size, added \strut, which add invisible vertical lines before "abc", which make brackets around "abc" equal big as they are around \int. Of course, the given solution works just for given example. I will edit my answer.
    – Zarko
    Commented Mar 11, 2016 at 5:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .