LaTeX forum ⇒ Math & ScienceCurly Braces in Equation Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Amitavo Roy
Posts: 14
Joined: Sat Apr 06, 2013 11:50 am

Curly Braces in Equation

Postby Amitavo Roy » Sun Apr 07, 2013 10:45 am

I am new with LaTeX. I don't understand why this code line is not working.
  1. \begin{equation}
  2. \label{eq:4.20}
  3. \eta_{elec}=
  4. \left{
  5. \frac {\gamma_{j,in} - {\langle{\gamma_j}\rangle}_j} {\gamma_{j,in}-1}
  6. \right}
  7. \end{equation}

Please suggest me
Last edited by cgnieder on Sun Apr 07, 2013 11:25 am, edited 1 time in total.

User avatar
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Sun Apr 07, 2013 11:20 am

And please always provide a self-contained and minimal example to give an adequate problem description. Those who try to help are rarely motivated to write a complete example from scratch.

If you want curly braces in the output, you have to escape them by a backslash (\) and so make them a command. Curly braces are usually used for grouping so this measure is necessary to get them printed.

The actual error is caused by the fact that \left and \right expect a delimiter (braces, brackets, parentheses). otherwise they will produce error.
  1. \documentclass[11pt]{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackahe{mathtools} % loads »amsmath«
  5. \begin{document}
  6. \begin{equation}\label{eq:dummy}
  7. \eta_text{elec}=\left\{\frac{\gamma_{j,in} - \langle\gamma_j\rangle_j}{\gamma_{j,in}-1}\right\}
  8. \end{equation}
  9. \end{document}

For more clarity in your code you should avoid superfluous braces (see above).

Basic reading:

Further reading:

LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

Amitavo Roy
Posts: 14
Joined: Sat Apr 06, 2013 11:50 am

Postby Amitavo Roy » Sun Apr 07, 2013 11:55 am

Thanks a lot, localghost.

Now it is perfect.

Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 2 guests