Quick (probably easy) Latex Question

  • LaTeX
  • Thread starter latentcorpse
  • Start date
  • Tags
    Latex
In summary, the conversation revolved around writing equations in LaTeX and specifically the use of square brackets in an align environment. The individual was experiencing errors with their code and was seeking help on how to properly use \left and \right in this context. The conversation ended with a suggested solution to resize the brackets in the partial using \partial \left [_\nu e_\rho \right ].
  • #1
latentcorpse
1,444
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
  • #2
Like this?
$$q_{[a} p_{b]}$$
 
  • #3
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
 
  • #4
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:
  • #5


Hi,

To write the LaTeX code for something like q_{ [a } p_{ b] }, you can use the \left[ and \right] commands to enclose the subscripts in square brackets. Your code would look like this:

q_{\left[ a \right]} p_{\left[ b \right]}

This will prevent any errors and correctly typeset the equation. Additionally, you can use the \substack command to stack multiple subscripts or superscripts under or above a single symbol, if needed.

Hope this helps! Happy typesetting!
 

1. How do I insert a new line in Latex?

To insert a new line in Latex, use the command \\ at the end of the line where you want the new line to start. This will create a new paragraph without indenting.

2. How do I change the font size in Latex?

To change the font size in Latex, use the command \fontsize{size}{skip} before the text you want to change. Replace "size" with the desired font size and "skip" with the amount of space you want to skip before the text. For example, \fontsize{12}{15}\selectfont will set the font size to 12pt and skip 15pt of space before the text.

3. How do I add a table in Latex?

To add a table in Latex, use the tabular environment. Define the number of columns and their alignment, then use the & symbol to separate columns and \\ to start a new row. You can also add borders and caption to the table for better organization.

4. How do I include images in Latex?

To include images in Latex, use the graphicx package and the command \includegraphics{image-file-name}. Make sure the image file is in the same directory as your Latex document. You can also specify the width and height of the image using \includegraphics[width=0.5\textwidth]{image-file-name} for example.

5. How do I create a bibliography in Latex?

To create a bibliography in Latex, use the bibtex tool and the thebibliography environment. Add your sources in a .bib file and cite them in your document using \cite{key} where "key" is the label for the source in your .bib file. Then, use the \bibliography{bib-file-name} command to include the bibliography in your document.

Similar threads

  • Special and General Relativity
Replies
9
Views
537
  • Advanced Physics Homework Help
Replies
2
Views
2K
  • Special and General Relativity
Replies
7
Views
2K
  • Special and General Relativity
Replies
2
Views
1K
  • Differential Geometry
Replies
2
Views
890
  • Quantum Physics
Replies
3
Views
1K
  • Special and General Relativity
Replies
5
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
30
Views
5K
Back
Top