2

My code is of the form

\begin{multline}
\left[ \frac{foo}{bar} \\ foo \right]
\end{multline}

This code gives an error for missing \right. etc. To remedy this, I used this code

\begin{multline}
\left[ \frac{foo}{bar} \right. \\\left. foo \right]
\end{multline}

However, in this code, the right ] bracket is small and is not the same size as the left [. Please let me know if a solution to this exists.

4

Manually scaling, i.e. \big, \Big, \bigg or \Bigg. There is no other way. \left...\right has to look at its contents in order to auto scale, and thus line breaks are not allowed.

0

The [c] indicates center alignment of the stack. [l] and [r] are also options there. Additionally, the stack gap is (by default) 3pt between items. That can be changed with an appropriate specification. Finally, the [ and ] are merely scaled to fit the stack. You can use an optional argument to \scaleleftright as a width limiting feature, if the width of the brackets is too large.

EDITED to show two approaches, depending on how you want your math axis.

\documentclass{article}
\usepackage{stackengine}
\usepackage{scalerel}
\begin{document}
\[
math-axis 
\scaleleftright{[}
{\Shortstack[c]{$\displaystyle\frac{foo}{bar}$ $foo$}}
{]}
\]
\def\stackalignment{l}
\[
math-axis 
\scaleleftright{[}
{\stackanchor[5pt]{$\displaystyle\frac{foo}{bar}$}{$foo$}}
{]}
\]
\end{document}

enter image description here

0

I offer to use the empheq package:

\documentclass[varwidth]{standalone}

\usepackage{amsmath,amssymb,amsthm}
\usepackage{empheq}

\begin{document}
    \begin{empheq}[left=\empheqlbrace,right=\empheqrbrace]{align}
        \frac{foo}{bar} \\
        foo
    \end{empheq}
\end{document}

Result:

enter image description here

And, without numbering (align*):

enter image description here

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.