Latex - superscript & subscript together

  • LaTeX
  • Thread starter csopi
  • Start date
  • Tags
    Latex
In summary, latex can't make the formula V(ij)_{\sigma_1\sigma_2}^{\tau_1\tau_2} more compact. Forceing it to do so makes it look ugly.
  • #1
csopi
82
2
latex -- superscript & subscript together

Hi,

I need to use expressions that have arguments, multiple superscript and subscript indices at the same time, e.g

[tex]
V(ij)_{\sigma_1\sigma_2}^{\tau_1\tau_2}
[/tex]

Is it possible to force latex to make this formula more compact, ie. to put the sigma and tau indices right after V, above / below (ij)?

Thanks for your help!
 
Physics news on Phys.org
  • #2


Something like this:
$$\underset{\sigma_1 \sigma_2}{\overset{\tau_1 \tau_2}{V_{i,j}}}$$If you need to do it a lot, you'll want to define a new command:

\newcommand{\vc}[3]{\overset{#2}{\underset{#3}{#1}}}

... the use would be \vc{bace}{over}{under}

\vc{X}{a,b}{c,d}$$\newcommand{\vc}[3]{\overset{#2}{\underset{#3}{#1}}} \vc{X}{a,b}{c,d}$$
 
Last edited:
  • #3


Thank you very much, that is really nice! Is it possible to put them to the top right / bottom right corner of V?
 
  • #4
They are at the top-right/bottom-right corners of the V... well the start there.
You want them to end there?
Well ... using _a^bV^c_d:$$_a^bV^c_d$$... or \sideset{_a^b}{_d^c}V$$\sideset{_a^b}{_d^c}V$$... hmmm, pretty much the same (bit more square).$$\overset{\tau_1 \; \tau_2}{\underset{\sigma_1 \; \sigma_2}{V_{i,j}}}$$... expoits the centering by adding a horizontal space. I can make it wider:$$\overset{\tau_1 \;\; \tau_2}{\underset{\sigma_1 \;\; \sigma_2}{V_{i,j}}}$$... nesting the subscripts is pretty messy though.

Try looking through ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf for more possibilities.
 
Last edited:
  • #5


That's what I was looking for not long ago...

[tex]C \iiint^{+\infty}_{-\infty}e^{-\frac \beta {2m} (p^2_x+p^2_y+p^2_z)}dp_x dp_y dp_z = 1[/tex]

[tex]C \underset{-\infty}{\overset{+\infty} \iiint} e^{-\frac \beta {2m} (p^2_x+p^2_y+p^2_z)}dp_x dp_y dp_z = 1[/tex]

Still not perfect, but already better.
 
  • #6


Borek said:
That's what I was looking for not long ago...

[tex]C \iiint^{+\infty}_{-\infty}e^{-\frac \beta {2m} (p^2_x+p^2_y+p^2_z)}dp_x dp_y dp_z = 1[/tex]

[tex]C \underset{-\infty}{\overset{+\infty} \iiint} e^{-\frac \beta {2m} (p^2_x+p^2_y+p^2_z)}dp_x dp_y dp_z = 1[/tex]

Still not perfect, but already better.

That first one looks like a pair of indefinite integrals over a definite integral. The latter is rather non-standard.

What you are trying to say is that you want to integrate over all of momentum space (I assume p is some generalized momentum). There's nothing wrong with [itex]\iiint_V f(V)\,dV[/itex], where V is the volume to be integrated over. Using [itex]\iiint_V f(x,y,z)\,dx\,dy\,dz[/itex] is perhaps an abuse of notation, but it is a widely used and widely understood abuse of notation. Your momentum space is ℝ3. So just say so:

[tex]C \iiint_{\mathbb R^3}e^{-\frac \beta {2m} (p^2_x+p^2_y+p^2_z)}dp_x dp_y dp_z = 1[/tex]
 
  • #7


Thank you Simon, I really appreciate your help!
 
  • #8


D H said:
The latter is rather non-standard.

That's the way it was shown in the Physical Chemistry textbook printed here many times since at least seventies and considered for many years to be a standard text (called "a brick" for the size, weight, and cover color). Doesn't make it correct, it is just not something I made up - rather something I selected for aesthetic reasons.
 
  • #9


@csopi: no worries.

@D_H: I have also seen:$$\underset{\infty}{\iiint}f(x,y,z)dxdydz$$... as a shorthand for integrating over all space. Sometimes not even a triple-int sign. It may even be $$\underset{\infty}{\int}Fd\tau$$... so these things are used whatever we may think of them.
I mostly associate this sort of thing with the preliminary notes in a handwritten document.

Sometimes it looks tidier to write$$\underset{-\infty}{\int}^\infty f(x)dx$$... but I'm like: "meh": it looks ugly with pretty much anything else.
 

Related to Latex - superscript & subscript together

1. What is the syntax for creating superscript and subscript together in Latex?

The syntax for creating superscript and subscript together in Latex is to use the ^ symbol to indicate the superscript and the _ symbol to indicate the subscript. For example, x^2_1 would create a superscript of 2 and a subscript of 1 for the variable x.

2. Can I have multiple superscripts and subscripts in one expression?

Yes, you can have multiple superscripts and subscripts in one expression by using curly braces to group them. For example, x^{2}_1 would create a superscript of 2 and a subscript of 1 for the variable x, while x^{2}_{1,2} would create a superscript of 2 and subscripts of 1 and 2 for the variable x.

3. How do I change the size of the superscript and subscript?

To change the size of the superscript and subscript, you can use the \scriptsize, \footnotesize, \small, or \large commands before the superscript or subscript. For example, x^{\scriptsize 2}_{\small 1} would create a smaller superscript of 2 and subscript of 1 for the variable x.

4. Can I use mathematical symbols in the superscript and subscript?

Yes, you can use mathematical symbols in the superscript and subscript by enclosing them in curly braces. For example, x^{\alpha}_{\beta} would create a superscript of α and a subscript of β for the variable x.

5. How do I align the superscript and subscript horizontally with the base character?

To align the superscript and subscript horizontally with the base character, you can use the \vphantom command. This command creates a vertical phantom character that takes up space but is invisible, allowing you to adjust the horizontal alignment. For example, x^2_{\vphantom{2}1} would align the subscript of 1 with the base character x.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
457
Replies
3
Views
958
  • Topology and Analysis
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
873
  • Special and General Relativity
Replies
9
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
4K
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
10K
Back
Top