Latex - superscript & subscript together

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

Discussion Overview

The discussion revolves around formatting LaTeX expressions that involve both superscripts and subscripts, particularly in the context of mathematical notation used in physics. Participants explore various methods to achieve a more compact representation of these expressions, including the placement of indices relative to variables.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks to format expressions with multiple superscript and subscript indices compactly, specifically wanting to position them directly after a variable.
  • Another participant suggests using the LaTeX command \underset and \overset to achieve the desired formatting, and proposes defining a new command for repeated use.
  • A later reply discusses the positioning of indices, indicating that while they start at the top-right and bottom-right corners, adjustments can be made for aesthetic preferences.
  • Some participants share examples of integrals formatted with superscripts and subscripts, noting that while they are not perfect, they are improvements over previous attempts.
  • Concerns are raised about the non-standard nature of certain formatting choices, with references to historical usage in textbooks and aesthetic considerations influencing these choices.
  • Participants mention shorthand notations for integrating over all space, indicating variability in how these expressions are presented in different contexts.

Areas of Agreement / Disagreement

Participants express varying opinions on the aesthetic and standardization of LaTeX formatting for mathematical expressions. There is no consensus on a single "correct" method, and multiple competing views on formatting remain present throughout the discussion.

Contextual Notes

Some formatting choices may depend on personal or contextual preferences, and there are references to historical practices that may not align with current standards. The discussion includes unresolved questions about the appropriateness of certain notations.

csopi
Messages
81
Reaction score
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

<br /> V(ij)_{\sigma_1\sigma_2}^{\tau_1\tau_2}<br />

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


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:


Thank you very much, that is really nice! Is it possible to put them to the top right / bottom right corner of V?
 
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:


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

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

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

Still not perfect, but already better.
 


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

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

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

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 \iiint_V f(V)\,dV, where V is the volume to be integrated over. Using \iiint_V f(x,y,z)\,dx\,dy\,dz 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:

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
 


Thank you Simon, I really appreciate your help!
 


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.
 


@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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • Sticky
  • · Replies 60 ·
3
Replies
60
Views
190K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 766 ·
26
Replies
766
Views
744K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K