2

I would like to reduce the height of the \left\{ in the following, to make it the same height as the equations:

%\usepackage{esdiff}

\begin{align*}
\mathcal L&= - 0.75 w(S) - 0.25 w(F) + \lambda \big(\ln(256) -3\ln(w(S)) - \ln(w(F)) \big)\\ 
&\hspace{10mm}+ \mu\big(\ln(16) - \ln(w(S)) + \ln(w(F))\big)\\[1ex]
&\left\{\parbox{0.8\linewidth}{
\begin{flalign}
0=\diffp{\mathcal L}{{w(S)}} &= -0.75 -\frac{3\lambda}{w(S)} - \frac\mu{w(S)}\\
0=\diffp{\mathcal L}{{w(F)}} &= -0.25 - \frac\lambda{w(F)} + \frac\mu{w(F)}&
\end{flalign}}\right.
\end{align*}

I wanted to use flalign as opposed to array to make it easy to get the fractions in \displaystyle. I understand that with \begin{array}{rllrl}*, I would have to use \dfrac instead of \frac, and I would want to adjust \arraycolsep, because I don't like the big gap before the = sign in the array environment in this situation. You're welcome to suggest an improvement to my code!

*Generally, with derivatives of a Lagrangian, I would use the third l for an \implies sign, followed by a simplification of the equation.

  • 1
    you can (should) use one of the ams in-equation alignments such as aligned rather than nest a parbox with flalign algned, split etc all use display math. (but do you need the equation numbering?) – David Carlisle May 31 '19 at 9:34
  • @DavidCarlisle I like your answer, as it is simple. I don't always need the equation numbering - but I could just tag the equations if I do. You're welcome to tell me a more complete list of the available in-equation environments, or where to find that information. – ahorn May 31 '19 at 9:49
  • 1
    texdoc amsmath – David Carlisle May 31 '19 at 9:50
  • @DavidCarlisle it isn't easy to find that information in amsmath.pdf, because that document seems to just be about how the package is written, and the available environments for nesting aren't all in one place. – ahorn May 31 '19 at 9:58
  • 1
    that's why I asked if you needed numbers... empheq as in the accepted answer is probably your friend. – David Carlisle May 31 '19 at 10:23
1

I don't know whether it is the best method, but I suggest using empheq (needless to load amsmath) and linegoal. The latter package calculates the remaining width at the current point on the line (requires 2 compilations):

\documentclass[11pt]{article}
\usepackage{empheq}
\usepackage{esdiff}
\usepackage[showframe]{geometry}
\usepackage{linegoal}

\begin{document}

\begin{align*}
\mathcal L&= - 0.75 w(S) - 0.25 w(F) + \lambda \big(\ln(256) -3\ln(w(S)) - \ln(w(F)) \big)\\
&\hspace{10mm}+ \mu\big(\ln(16) - \ln(w(S)) + \ln(w(F))\big)\\[1ex]
&\parbox{1\linegoal}{
\begin{empheq}[left =\empheqlbrace]{flalign}
0=\diffp{\mathcal L}{{w(S)}} &= -0.75 -\frac{3\lambda}{w(S)} - \frac\mu{w(S)}\\
0=\diffp{\mathcal L}{{w(F)}} &= -0.25 - \frac\lambda{w(F)} + \frac\mu{w(F)}&
\end{empheq}}
\end{align*}

\end{document} 

enter image description here

1

Basing the height of \left\{ on an invisible vertical line will give you control over its height:

... &\left\{\rule{0pt}{6.6ex}\right.\parbox{0.8\linewidth}{
\begin{flalign*} ...

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.