Math & Sciencebig left brace with multiline eqnarray

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

big left brace with multiline eqnarray

Post by BastienBastien »

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

big left brace with multiline eqnarray

Post by thomasb »

What about something like that :

Code: Select all

\[f(x) = \begin{cases} x & \text{si $x > 0$,} \\
                      -x & \text{sinon} \end{cases}\]
BastienBastien
Posts: 40
Joined: Mon Aug 20, 2012 2:27 pm

big left brace with multiline eqnarray

Post by BastienBastien »

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: 10321
Joined: Mon Mar 10, 2008 9:44 pm

big left brace with multiline eqnarray

Post by Stefan Kottwitz »

You could use empheq, such as:

Code: Select all

\documentclass{article}
\usepackage{empheq}
\begin{document}
\begin{empheq}[left=\empheqlbrace]{align}
  2x+y    &=  1 \\
  8x*y    &= 12 \\
  12x/c^2 &= 10
\end{empheq}
\end{document}
Stefan
LaTeX.org admin
BastienBastien
Posts: 40
Joined: Mon Aug 20, 2012 2:27 pm

big left brace with multiline eqnarray

Post by BastienBastien »

Thanks, I will try this.
It seems to be the perfekt solution I have been looking for over the last two days.
BastienBastien
Posts: 40
Joined: Mon Aug 20, 2012 2:27 pm

big left brace with multiline eqnarray

Post by BastienBastien »

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
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

big left brace with multiline eqnarray

Post by thomasb »

Tadam :

Code: Select all

\documentclass{article}
\usepackage{empheq}
\begin{document}
\begin{empheq}[left=\empheqlbrace]{align}
  2x+y    &=  1 \tag{3.1a}\\
  8x*y    &= 12 \tag{3.1b}\\
  12x/c^2 &= 10 \tag{3.1c}
\end{empheq}
\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: 10321
Joined: Mon Mar 10, 2008 9:44 pm

big left brace with multiline eqnarray

Post by Stefan Kottwitz »

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
LaTeX.org admin
BastienBastien
Posts: 40
Joined: Mon Aug 20, 2012 2:27 pm

big left brace with multiline eqnarray

Post by BastienBastien »

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: 10321
Joined: Mon Mar 10, 2008 9:44 pm

big left brace with multiline eqnarray

Post by Stefan Kottwitz »

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
LaTeX.org admin
Post Reply