LaTeX forum ⇒ Math & Sciencebig left brace with multiline eqnarray

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
BastienBastien
Posts: 36
Joined: Mon Aug 20, 2012 2:27 pm

big left brace with multiline eqnarray

Postby BastienBastien » Sun Aug 06, 2017 8:50 pm

Hello dear LaTeX users,

I've got a question for you.

I am used to use \left{ \right. with multiple equations "in" the left brace.
I am used to use \begin{eqnarray} \end{eqnarray}.
But I don't know how to use both at the same time.

I would need to write something like that :
a big brace on the left and a "column" with several equations and on the right, one number for each equation, automatically added by the eqnarray environment.

Do you have an idea ?

I have been investigating equationarray, eqnarray, equation environment, without any success.

Regards,
Bastien

Tags:

User avatar
thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france

Postby thomasb » Mon Aug 07, 2017 1:15 am

What about something like that :
  1. \[f(x) = \begin{cases} x & \text{si $x > 0$,} \\
  2. -x & \text{sinon} \end{cases}\]

BastienBastien
Posts: 36
Joined: Mon Aug 20, 2012 2:27 pm

Postby BastienBastien » Mon Aug 07, 2017 8:54 am

Hello,

In such a case there is no "equation numbering".
This is why I do not use the "cases" environment.

Me

User avatar
Stefan Kottwitz
Site Admin
Posts: 8544
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Mon Aug 07, 2017 12:41 pm

You could use empheq, such as:

  1. \documentclass{article}
  2. \usepackage{empheq}
  3. \begin{document}
  4. \begin{empheq}[left=\empheqlbrace]{align}
  5. 2x+y &= 1 \\
  6. 8x*y &= 12 \\
  7. 12x/c^2 &= 10
  8. \end{empheq}
  9. \end{document}


Stefan
Site admin

BastienBastien
Posts: 36
Joined: Mon Aug 20, 2012 2:27 pm

Postby BastienBastien » Tue Aug 08, 2017 9:55 am

Thanks, I will try this.
It seems to be the perfekt solution I have been looking for over the last two days.

BastienBastien
Posts: 36
Joined: Mon Aug 20, 2012 2:27 pm

Postby BastienBastien » Thu Aug 10, 2017 4:11 pm

Hi,
Yesterday evening while writing documents I realised that
this solution doesn´t insert the same kind of numeration than subequations evironment.

The perfekt solution for me would be to get such numeration for all three equations:
3.1a
3.1b
3.1c

and not
3.1
3.2
3.3

Is there a possibility to get such numeration?

Regards,
Me

User avatar
thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france

Postby thomasb » Thu Aug 10, 2017 5:13 pm

Tadam :
  1. \documentclass{article}
  2. \usepackage{empheq}
  3. \begin{document}
  4. \begin{empheq}[left=\empheqlbrace]{align}
  5. 2x+y &= 1 \tag{3.1a}\\
  6. 8x*y &= 12 \tag{3.1b}\\
  7. 12x/c^2 &= 10 \tag{3.1c}
  8. \end{empheq}
  9. \end{document}
Last edited by thomasb on Thu Aug 10, 2017 5:14 pm, edited 1 time in total.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8544
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Aug 10, 2017 5:14 pm

Perhap another question: do you really have to number everything?

A good common habit in science and book writing is, to number everything what is referenced to. The whole meaning of numbering is for references. So, all intermediate calculations and parts of equation systems don't get numbers if the text doesn't refer to. That keeps numbering clean and reference lookup is easier.

In that case a numbering 3.1.b is not needed if the text doesn't refer to that 3.1.b via \label and \ref.

Writers without experience tend to number everything. If you would write a work with a supervisor, you can speak with the supervisor about that efficient numbering for reference that I mentioned above.

Stefan
Site admin

BastienBastien
Posts: 36
Joined: Mon Aug 20, 2012 2:27 pm

Postby BastienBastien » Thu Aug 10, 2017 5:25 pm

Hi,

Thanks for your complete, detailed answer.
Yes in the past I was used to number everything then my manager told me not to do so, for the same reasons you just told me.
In this case I have to number the three equations in the "big left brace", because I have to find witch
conditions make the equations being equals to zero.

It would be more elegant to use 3.1a, 3.1b and 3.1c as it imediatly shows those equations are in the same system of equation.

subequations was fine but.... there is no possibility to add a big left brace!

Regards,
Me

User avatar
Stefan Kottwitz
Site Admin
Posts: 8544
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Aug 10, 2017 5:41 pm

Thomas has posted an answer above - did you see it? Just in case that it may have been missed since it came before my answer.

Stefan
Site admin


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests