LaTeX forum ⇒ Math & Science(solved) Aligned equations, individually numbered, all inside one pair of delimiters?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Mrhnhrm
Posts: 3
Joined: Tue Dec 03, 2019 9:29 am

(solved) Aligned equations, individually numbered, all inside one pair of delimiters?

Postby Mrhnhrm » Tue Dec 03, 2019 11:57 am

Hi, and thanks for taking a look.

So, I am trying to make a bunch of equations that are aligned, individually automatically numbered, and all of them neatly packaged into an arbitrary set of delimiters. As they say, a picture is worth a thousand words; so, please see the attached image for a (very) schematic example of what I am trying to achieve.

Any ideas on how to do this would be kindly appreciated.

p.s. solution found here.
Attachments
math-visual-example.png
math-visual-example.png (25.43 KiB) Viewed 108 times
Last edited by Mrhnhrm on Thu Dec 05, 2019 8:17 am, edited 1 time in total.


Mrhnhrm
Posts: 3
Joined: Tue Dec 03, 2019 9:29 am

Postby Mrhnhrm » Tue Dec 03, 2019 2:52 pm


Many thanks. May I ask for some further explanation? I looked through the (rather concise) manual for the package cases, and I couldn't figure out how to customize the alignment. The expressions (left part of the cases environment) seem to be invariably left-aligned, and the explanations (right part of the environment) form another left-aligned column, with unnecessarily wide horizontal gap. My example renders like this:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[]{article}
  2. \usepackage{cases}
  3.  
  4. \begin{document}
  5.  
  6. \begin{numcases}{}
  7. e \approx 2.72 \\
  8. \pi \approx 3.14 \\
  9. e\pi \approx 8.5397
  10. \end{numcases}
  11.  
  12. \begin{numcases}{}
  13. e & $ \approx 2.72 $ \\
  14. \pi & $ \approx 3.14 $ \\
  15. e\pi & $ \approx 8.5397 $
  16. \end{numcases}
  17.  
  18. \end{document}
Attachments
Screenshot_20191203_194751.png
Screenshot_20191203_194751.png (18.83 KiB) Viewed 99 times

Mrhnhrm
Posts: 3
Joined: Tue Dec 03, 2019 9:29 am

Postby Mrhnhrm » Thu Dec 05, 2019 8:09 am

... and nailed it. Package empheq gets the job done. For example...
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[]{article}
  2. \usepackage{amsmath}
  3. \usepackage{empheq}
  4. \begin{document}
  5. \begin{subequations}
  6. \begin{empheq} [left=\empheqlbrace] {align}
  7. e & \approx 2.72 \\
  8. \pi & \approx 3.14 \\
  9. e\pi & \approx 8.5397
  10. \end{empheq}
  11. \end{subequations}
  12.  
  13. \end{document}


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 9 guests