59

Actual solution in LaTeX Just write like\textsubscript{this} You do not need preamble fixes anymore. Example: \documentclass{article} \begin{document} like\textsubscript{this} \end{document} Because all the fixes of package fixltx2e were enabled by default in the LaTeX format in 2015, the odd lack of this "expectable" command in LaTeX kernel is now ...


52

First of all, the problem presents for textual subscripts, such as those used in physics to distinguish between vectors with the same name (say a force) by a subscripted label that should go in upright type. Textual subscripts are used in many other fields. In what follows, amsmath is assumed. $W_{\rm total}$ is totally wrong as it relies on a deprecated ...


44

In TeX and LaTeX, it is vital to distinguish between "commands" or "control sequences" on the one hand and TeX-special characters on the other. Only the former begin, in general, with a backslash (\) character. (But see the final paragraph below for examples of commands which do not start with a backslash.) ^ and _ are but two examples of TeX-special ...


36

I have used the following which puts x -> y under the limit. \lim\limits_{x \to y}


36

You can force the subscripts to be under the summation, by using \limits, like this: \sum\limits_{j=1} A_{xj} An alternative way is to change the typesetting style of the formula by using \displaystyle. You probably already noticed, that the typesetting of math differs depending on what 'mode' your in: inline math or display math: \documentclass[10pt,...


32

You mean \frac{d}{dx}\Bigr|_{\substack{x=1\\y=2}} from the package \usepackage{amsmath} ?


29

Delay the closing of the group: after _, one can use \bgroup. \documentclass{article} \makeatletter \newcommand\dH{\bgroup d_H\@ifstar{^*\egroup}{\egroup}} \makeatother \begin{document} $B_\dH$ and $B_\dH*$ \end{document} But avoid it.


27

I think you can justly regard this strange behaviour as kind of a bug in TeX's sub- and superscript positioning algorithm; it doesn't make sense that both the sub- and the superscript are raised. See below for some suggestions on how to fix the problem. At the end I offer a new positioning algorithm, and I compare it with the old algorithm. (Sorry for the ...


24

This can be solved using the mathtools package and its command \adjustlimits: \documentclass{article} \usepackage{mathtools} \begin{document} \[ \adjustlimits\sum_{i \in X}\sum_{i \in \bar{X}} \] \end{document}


23

This essentially duplicates \substack, but adding an alignment point. \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\subalign}[1]{% \vcenter{% \Let@ \restore@math@cr \default@tag \baselineskip\fontdimen10 \scriptfont\tw@ \advance\baselineskip\fontdimen12 \scriptfont\tw@ \lineskip\thr@@\fontdimen8 \scriptfont\thr@@ ...


19

It's a feature in TeX. A subformula in math mode is a group of symbols surrounded by braces or by \left-\right. For instance $a+{b+c}$ has a subformula.1 If you type ${(a+b)}^{2}$, the exponent will be higher than in $(a+b)^{2}$, because you are setting an exponent to the whole subformula in the former case, to the parenthesis in the latter case. By the way,...


18

Why is the vertical positioning different in the two expressions? Because in the first case you're adding subscripts and superscripts to the parenthesis, while in the second case the whole subformula is the nucleus of the math atom to which the superscript and subscript fields are added. Is there anything the LaTeX user should pay attention to to get such ...


18

Working from Akiiino's answer I came up with this, which also works in display mode \documentclass[a4paper]{article} \usepackage{amsmath} \newcommand{\dotriangle}[1]{% \raisebox{-.7ex}{$\vcenter{#1\kern.2ex\hbox{$\triangle$}\kern.2ex}$}% } \newcommand{\tripow}[3]{% Syntax: \tripow{#1}{#2}{#3} gives you #1 ^ {#2} = #3 \mathop{% We want it to an ...


17

_ is equal to \sb. Just use $3\sb{x}$.


17

For even smaller, you could scale the sub-subscript: \documentclass{article} \usepackage{scalerel} \begin{document} $a_{b_{\scaleto{c}{1pt}}}$ \end{document} If you need consistency across a range of subscripts, you may wish to add a normalizer like a \mathstrut: \documentclass{article} \usepackage{scalerel} \begin{document} $a_{b_{\scaleto{c\mathstrut}{...


17

You can use \DeclareMathSizes; declare also other sizes if needed. \RequirePackage{fix-cm} % arbitrary font scaling \documentclass{article} \DeclareMathSizes{10}{10}{7}{4} \begin{document} $a_{b_{c}}$ \end{document} Compare to the standard and decide for yourself if it's worth the trouble. I wouldn't go below four points.


17

The standard today is to use mhchem (or similar packages), less typing \documentclass{article} \usepackage[version=4]{mhchem} \begin{document} \ce{CO2} \end{document} The the mhchem documentation for details.


16

This is called subscript and is activated (in math mode) with _: \theta_1 \theta_2 You might (should) be interested in further reading, I recommend the Not So Short Introduction to LaTeX2e (surely available in your language). MWE (some examples) \documentclass{article} \begin{document}\noindent \verb|\theta_1| gives: \( \theta_1 \) ...


16

LaTeX provides \raisebox{<len>}{<stuff>} (based on TeX's \raise) which raises (and boxes) <stuff> by <len>. A negative <len> drops the contents: \documentclass{article} \begin{document} It's easy to make subscripts in math mode: $a_i$. How do I make a subscript outside math environment, like\raisebox{-.4ex}{\scriptsize this}? ...


16

The best solution I have seen so far was: ${}_{2}x_{1}$ For the more general case of left and right superscript and subscript, one writes: ${}^{1}_{2}x^{3}_{4}$


16

Correct is a relative concept here. They are giving you different results. If you read the TeXbook then Don Knuth clearly intended to have the input syntax as concise as possible, i.e., I claim for most situations he would maintain that $p_1$ is the input that should be used. However, as mentioned they produce different output, because the ^{} is seen as an ...


16

You have several options: \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{textcomp} \begin{document} \begin{align*} M_\text{\textonehalf}&= ... \text{ The smallest}\\ M_{\frac{1}{2}}&= ... \text{ Normal \texttt{frac}} \\ M_{\tfrac{1}{2}}&= ... \text{ In-between, \texttt{tfrac}}\\ M_{\dfrac{1}{2}}&= ... \text{ Displaystyle \...


16

Try this one: $F^{\mathrm{fr}}_{s\mathrm{MAX}}$. In math mode ^ means superscript and _ means subscript.


15

Math fonts do not make ff into a ligature the way text fonts do as it may sometimes obscure the meaning of two separate identifiers juxtaposed, $\tau_{ff}$ $\tau_{f\!f}$ $\tau_{\mathit{ff}}$ If the meaning of your subscript is some kind of invisible product of two f then use one of the first two, or some other negative space other than \! to taste. If on ...


15

Is this what you mean? If so, here are three possibilities: \documentclass{article} \usepackage{stackengine} \begin{document} \( \left. {\frac{\partial x}{\partial t}}% \right|_{% \stackunder[1pt]{$\scriptscriptstyle t=0$}{$\scriptscriptstyle t=1$}} \) ~~ \( \left. {\frac{\partial x}{\partial t}}% _{\stackunder[1pt]{}{}}% \right|_{% \stackon[1pt]{$\...


14

You may want to load the amsmath package to access its \text macro and type (in math mode, obviously): \nu_{\text{FWHM}} Don't use the \rm command in a LaTeX document. Addendum -- @AndrewSwann has pointed out that FHWM, being an acronym, should be typeset in small-caps letters, i.e., as \textsc{fhwm}. Defining the acronym command \FHWM with \newcommand\...


14

The default positions of sub and superscripts are closer to the baseline in textstyle as TeX tries to maximise the chance that the expression does not disturb the paragraph line spacing. Your first example is the standard setting for inline math, however with the larger scripts caused by the subscripting, TeX has to move them further apart. This is ...


Only top voted, non community-wiki answers of a minimum length are eligible