0

I have the following MWE:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
  A1 &= \left\{\frac{1}{2\omega} \right. \\
     & \enspace \left. \left[\frac{z_{v}^2}{\left(\omega + \frac{z_{v}^2}{\omega}\right) t_{v}\left(z_{v}\right)}\right]\right\} \\
  A2 &= ...\\
\end{align}

\end{document}

Now, the problem is that the rectangular brackets do not completely surround the larger inner curvy brackets in the major fraction denominator (themselves containing a minor fraction). Similarly, the outer curly brackets do not completely surround the rectangular brackets surrounding the major fraction. Is there a relatively straightforward way to automatically extend those rectangular brackets to surround the larger curvy brackets in the major fraction denominator and to extend the curly brackets just enough to surround the rectangular brackets?

I tried to use the usual \bigl-\bigr, \biggl-\biggr, \Bigl-\Bigr, and \Biggl-\Biggr combinations, but they are not large enough. I also tried to use vphantom, but that is too ad-hoc for my taste. I was looking for something cleaner. In principle, the \left-\right combination should work. Maybe that \frac command is preventing the left rectangular delimeter from gaining access to the extended delimeters in the major fraction denominator. Not sure. If there is no \left-\right-based solution available, I might need to set \vastl-\vastr and \Vastl-\Vastr commands as in this example: mathtools brackets larger than \Bigg but, if possible, I want to avoid that and stick to a \left-\right-based solution. The \left(\rule{0cm}{2cm}\right. approach could be an option, but I have equations with brackets opening in one line and closing in another. Not sure how to break sets of brackets across lines with \left(\rule{0cm}{2cm}\right.. Any help would be very welcome!

enter image description here

UPDATE: @Mico/@Werner: I just extended the original MWE to a multiline equation with a shorter major fraction (and a shorter left rectangular bracket) on the first line and a taller major fraction (and a taller right rectangular bracket) on the second line, whereby said equation is part of several within the broader align and split environments I use. I can of course use fixed size brackets like \Biggl-\Biggr, but they cannot adequately surround the inner curvy brackets surrounding the minor fraction in the denominator of the major fraction in the second line. That is the actual problem!

10
  • 2
    Please don't down vote posts without explaining how they can be improved!
    – cfr
    Commented Oct 28, 2023 at 2:35
  • 1
    Which of these options do you prefer?
    – Werner
    Commented Oct 28, 2023 at 4:24
  • @Werner: thanks a lot for the help! Well, I would prefer the one on the left-hand side, but ideally with the term in the numerator also vertically centered (right now only the term in the denominator looks vertically centered to me). Still, I would be interested in having both codes, since I need to harmonize quite long equations, and the solution on the right-hand side might unexpectedly become useful.
    – Euclides
    Commented Oct 28, 2023 at 4:51
  • I've taken the liberty of extending your code snippet into an actual, i.e., compilable MWE. Feel free to revert.
    – Mico
    Commented Oct 28, 2023 at 4:54
  • @Mico: no problem! I am engaged in multiple fronts and wanted to have this issue addressed as soon as possible, so I wrote text and code a bit in a rush. My sincere apologies for that!
    – Euclides
    Commented Oct 28, 2023 at 4:55

2 Answers 2

0

Some comments regarding your setup:

  • Think about using some space to spread out your constructions so it's easier to see the grouping of elements.
  • Use Left/Right across multi-line equation to spread a large construction across a multi-line equation structure. For this, the suggested solution is to use a \vphantom to spread the brackets in locations it doesn't have sufficient height.
  • Superficial stretching of \left/\right delimiters can be achieved with a strut - \rule[<height/depth>]{0pt}{0pt}.

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
  A1 &= \left\{ 
          \vphantom{
            \left[
              \frac
                {z_v^2}
                {\rule[-10pt]{0pt}{0pt}
                  \left(\omega + \frac{z_v^2}{\omega}\right) t_v (z_v)}
            \right]
          }
          \dfrac{1}{2 \omega} 
        \right. \\
     & \qquad 
        \left.
          \left[
            \frac
              {z_v^2}
              {\rule[-10pt]{0pt}{0pt}
                \left(\omega + \frac{z_v^2}{\omega}\right) t_v (z_v)}
          \right]
        \right\} \\
  A2 &= \ldots
\end{align}

\end{document}
4
  • @Werner: thanks a lot! This is almost perfect. I say almost, because we still have that empty space above the term in the numerator, I guess because \left and \right always center the fraction bar. I tried to use the same strut with \biggl and \biggr (which do not center the fraction bar), but the bracket won't extend. Is there any solution for this? If this is solved, then I will almost certainly upvote your answer. I prepared a version with inline fractions as suggested by @Mico, and it looks good, except that it costs me one extra bracket type, which I need for my expressions.
    – Euclides
    Commented Oct 29, 2023 at 3:32
  • @Werner: obviously the strut won't work with \biggl and \biggr as these are non extensible brackets. Perhaps this (link) approach could be useful? Not sure.
    – Euclides
    Commented Oct 29, 2023 at 3:50
  • @Euclides: If you're wanting to reduce the empty space above the numerator you won't have the braces on the vertical center. For this, review How to get uneven size/space of numerator and denominator in fraction enclosed by \left\{ and \right} brackets.
    – Werner
    Commented Oct 29, 2023 at 4:26
  • @Werner: those uneven braces would be interesting, but would require quite extensive programming, especially with my multiline equations. I think I can live with that space above the numerator, for now. In any case, I will work in more detail on versions with display or inline fractions and see how those look like, before finally upvoting an answer (latest in about 12 hours), Thanks a lot for your help Werner!
    – Euclides
    Commented Oct 29, 2023 at 4:39
0

I'd like to suggest a third option to complement @Werner's two options: An all-inline-fraction solution. It's shown on the left in the following screenshot, along with my own interpretation of one of @Werner's options; note that I don't use \left[ and \right] as I don't want to force LaTeX to place the fraction's horizontal line in in the middle of the space created by the square brackets.

enter image description here

If the \Big symbols are too big for your taste, you could always switch to \big.

Inline-style fraction notation has been around for at least a couple of centuries. Don't underestimate your readers' ability to understand it right away. Compared with \frac notation, one of its main advantages is that the symbols don't ever become very small.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
%% all-inline-fraction notation
\Bigl\{
z_{v}^2 \Big/ \Bigl[(\omega + z_{v}^2/\omega)\, t_{v}(z_{v})\Bigr]
\Bigr\}
\qquad
%% my interpretation of one of @Werner's suggestions
\left\{
  \begin{bmatrix}
  \frac{z_{v}^2}{\bigl(\omega + \frac{z_{v}^2}{\omega}\bigr)
  t_{v}(z_{v})}
  \end{bmatrix}
\right\}
\]
\end{document}
9
  • @Mico: thanks a lot! I will prepare a version of my (multiple) multiline (roughly 4 line) equations with only inline fractions and see how that looks like. Still, I would be grateful if I could access Werner's solution for display fractions with correctly sized nested brackets.
    – Euclides
    Commented Oct 28, 2023 at 5:14
  • @Euclides - I've edited my answer to include code with my own interpretation of how to code one of Werner's solution suggestions.
    – Mico
    Commented Oct 28, 2023 at 6:20
  • @Mico: interesting approach. I might try to add yet another matrix layer with curly brackets. Just to see if the inner matrix is better surrounded by the outer matrix. But as it is this already is an improvement. However, I have rectangular brackets starting in one line and ending in another, and I guess the matrix cannot start in one line and end in another, without affecting bracket sizes, or can it?
    – Euclides
    Commented Oct 28, 2023 at 6:46
  • @Euclides - Replacing \left\{ ... \end\} in the second solution with \begin{Bmatrix} ... \end{Bmatrix} won't change the result. About your guess: A single matrix-like environment cannot span several lines. Neither can \left in one row and \right in another.
    – Mico
    Commented Oct 28, 2023 at 7:11
  • @Mico: absolutely! Question: is there an equation linebreak set of commands for \begin{Bmatrix}-\end{Bmatrix} that's equivalent to the \right. \\ and \left. ones used for \left-\right?
    – Euclides
    Commented Oct 28, 2023 at 16:21

You must log in to answer this question.

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