3

I'm trying to write a derivative wrt to time i.e. dot, in a bold face matrix, which uses the leftindex environment, but Overleaf nags about double subscript (even though it shows it correctly). Can someone tell me what's going on? The offending codes is:

\boldsymbol{\Omega} = \leftindex^{B}_{}{\mathbf{\dot{R}_T}}

which gives the error,

Double subscript. You have written a double subscript incorrectly as
a_b_c. Remember to include {and} when using multiple subscripts. Try
a_{b_c} instead. Learn more

<argument> ...aystyle \mathbf {\dot {R}T} \sb {xxxxxx}$ l.560 ...= \leftindex^{B}{}{ \mathbf{\dot{R}_T} } I treat x_1_2' essentially likex_1{}_2'.

It renders it correctly however, as below:

enter image description here

UPDATE: A complete example is this:

\documentclass{article}
\usepackage{mathtools,leftindex}

\begin{document}

\begin{equation} \boldsymbol{\Omega} = \leftindex^{B}_{}{ \mathbf{\dot{R}_T} } \end{equation}

\end{document}

Jorge
  • 133
  • 3
  • 4
    the error is not from overleaf (that is just hosting tex for you) it is from tex, but it's hard to debug an image, please provide an example. But after any error any pdf output is at best a debugging aid, it is not intended to be usable. – David Carlisle Nov 21 '23 at 14:40
  • \leftindex^{B}_{}{\mathbf{\/\dot{R}_T}} but do you really want the dot and the suvscript T to be bold?! – campa Nov 21 '23 at 14:44
  • Yes! I want the both bold. Otherwise, putting _T outside solves the problem. – Jorge Nov 21 '23 at 14:46
  • @DavidCarlisle I'm sorry but what kind of example do you need? Isn't the code I posted enough? – Jorge Nov 21 '23 at 14:54
  • 1
    An example starting with \documentclass and ending with \end{document}. – campa Nov 21 '23 at 14:55

2 Answers2

3

I'd recommend putting the "intended" subscript outside instead.

%! TEX program = pdflatex
\documentclass{article}
\usepackage{amsmath,leftindex}
\begin{document}
\[
    \boldsymbol{\Omega} = \leftindex^{B}{\mathbf{\dot{R}}}_{\mathbf{T}}
\]
\end{document}

Reason being, the documentation of the package has...

package documentation

so you shouldn't really be putting anything more than a single symbol in the argument.

(of course the \dot is an abuse here, but it can't be helped)

This works well in other cases (and preserve the slant correction!), for example:

%! TEX program = pdflatex
\documentclass{article}
\usepackage{amsmath,leftindex,bm}
\begin{document}
\[
    \boldsymbol{\Omega} = {\leftindex^x_y{\bm{\dot{f}}}}_{\bm{T}}
\]
\end{document}

Output

On the other hand, the sole reason for the existence of the package, as explained in Low-level command for controlling left superscript spacing, is to adjust the better spacing. So, because the R has no slant anyway, it might as well be easier to use \prescript (despite the lack of corrective slanting factor, this command has been around for longer thus should be more well-tested).


user202729
  • 7,143
2

Braces are stripped around an Acc atom, you must add a zero kern \/ or an empty group {}.

\documentclass{article}
\usepackage{amsmath,leftindex}
\begin{document}
\[
\boldsymbol{\Omega} = \leftindex^{B}{\mathbf{\/\dot{R}_T}}
\]
\end{document}

enter image description here

campa
  • 31,130