Quick (probably easy) Latex Question

  • Context: LaTeX 
  • Thread starter Thread starter latentcorpse
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary

Discussion Overview

The discussion revolves around writing LaTeX equations, specifically focusing on the correct formatting of square brackets within subscripts in an align environment. Participants are addressing issues related to errors encountered when attempting to implement this formatting in their LaTeX code.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant shares their LaTeX code and describes an issue with splitting square brackets over different subscripts, leading to errors.
  • Another participant suggests a possible solution using the format $$q_{[a} p_{b]}$$.
  • A later reply questions whether a particular package is needed for the suggested solution to work correctly.
  • Further analysis of the original code indicates that the use of \left and \right for brackets may be causing confusion, as LaTeX does not recognize separate curly brackets for resizing brackets.
  • One participant proposes an alternative formatting approach to improve clarity, while noting that it may visually imply a different relationship between variables.
  • There is a correction regarding the initial claim that the suggested code was used correctly, indicating a misunderstanding or oversight.

Areas of Agreement / Disagreement

Participants express differing views on the correct formatting approach and whether the initial code was implemented as suggested. The discussion remains unresolved regarding the best method to achieve the desired formatting without errors.

Contextual Notes

Participants have not reached a consensus on the appropriate LaTeX formatting techniques, and there are indications of confusion regarding the use of brackets and subscripts.

latentcorpse
Messages
1,411
Reaction score
0
Hi,

I'm trying to write some equations in LaTeX. They are inside an align environment. My code is the following:

\begin{align*}
\omega_\mu{}^{ab}(e) &= \frac{1}{2} \eta^{ac} \eta^{bd} e^\nu_c e^\rho_d ( \Omega_{[\mu \nu] \rho} - \Omega_{[\nu \rho] \mu} + \Omega_{[\rho \mu] \nu})
\\ &= \frac{1}{2} e^{\nu a} e^{\rho b} ( \Omega_{[\mu \nu] \rho} - \Omega_{[\nu \rho] \mu} + \Omega_{[\rho \mu] \nu})
\intertext{now we use the result $\Omega_{[\mu \nu] \rho} = 2 \partial_{ \left[ \mu } e_{ \nu \right] }{}^a e_{a \rho}$ from eqn $(7.89)$}
\\ &=e^{\nu a} e^{\rho b} \left( \partial_{[\mu} e_{\nu]}{}^c e_{c \rho} - \partial_{[\nu} e_{\rho]}{}^c e_{c \mu} + \partial_{[\rho} e_{\mu]}{}^c e_{c \nu} \right)
\end{align*}

The problem is the last couple of lines where i split square brackets over two different subscripts. LaTeX doesn't like this and complains - a LOT!

So I guess my question boils down to how to write the LaTeX code for something like this:

q_{ [a } p_{ b] }

without getting lots of errors!

Thanks very much!
 
Physics news on Phys.org
Like this?
$$q_{[a} p_{b]}$$
 
Simon Bridge said:
Like this?
$$q_{[a} p_{b]}$$

Yes. Do I need a particular package to get that to work or something?

If you look at the chunk of code I posted above, I have used exactly what you've written but it gives me errors about not having properly closed the parenthesis
 
Looking through your code I get:$$\begin{align}\omega_\mu{}^{ab}(e) &= \frac{1}{2} \eta^{ac} \eta^{bd} e^\nu_c e^\rho_d ( \Omega_{[\mu \nu] \rho} - \Omega_{[\nu \rho] \mu} + \Omega_{[\rho \mu] \nu})
\\ &= \frac{1}{2} e^{\nu a} e^{\rho b} ( \Omega_{[\mu \nu] \rho} - \Omega_{[\nu \rho] \mu} + \Omega_{[\rho \mu] \nu})
\\ &\ldots \text{ now we use the result $\Omega_{[\mu \nu] \rho} = 2 \partial_{[ \mu } e_{ \nu] }{}^a e_{a \rho}$ from eqn $(7.89)$}

\\ &=e^{\nu a} e^{\rho b} \left( \partial_{[\mu} e_{\nu]}{}^c e_{c \rho} - \partial_{[\nu} e_{\rho]}{}^c e_{c \mu} + \partial_{[\rho} e_{\mu]}{}^c e_{c \nu} \right)\end{align}$$
... I think I see what you want to do: you want the square brackets in the partial (in the intertext) to resize so they are bigger than the e in the second part... the trouble was when you used the \left [ ... \right ] inside separate curly brackets latex did not see where the other side to each was. i.e. {\left [}{\right ]} is not allowed and that's the only reason I can think of for wanting to use \left \right in that context.

##2\partial \left [_\nu e_\rho \right ]## ... better?
Though it does kinda make it look like the nu belongs to the e.

[edit]
I have used exactly what you've written
I'm afraid you didn't. Take a closer look ;)

[note: that equ. reference should really be a link too - jic ;) ]
 
Last edited:

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K