Consider the following MWE:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
we have $\sigma_V$, $\sigma_\text{V}$, but $\sigma_\text{\scriptsize v}$
\end{document}
This produces a warning (using pandoc.exe .\mwe.tex -o mwe.docx,
[WARNING] Could not convert TeX math \sigma_\text{\scriptsize v}, rendering as TeX:
\sigma_\text{\scriptsize v}
^
unexpected "\\"
expecting "}", text, "{", "$", "$$", "\\(" or "\\["
Correspondingly, the docx output is

Now, in Pandoc LaTeX to .docx, change font size the answer states that pandoc doesn't recognise \scriptsize (and other) commands. Is there a way to
- make pandoc understand those, or
- make pandoc ignore them?
(In my application, the font size commands show up mostly in subscripts. Ignoring them which is something I could live with for the word output, whcih is for sharing with colleagues, but not in the LaTeX source. If it helps, most instances of the form \sigma_\text{\scriptsize v} appear in defined \newcommands, so maybe pandoc can use its own newcomamnds without the \scriptsize(?).)
\sigma_\text{\scriptsize v}is (1) dangerous andf (2)\scriptsizeis a math command and the argument to\textis text not math.\sigma_{v}would give the same.a_\text{...}is just plain wrong and should never be used. It is pure change that it actually works. – daleif Dec 02 '22 at 09:27\scriptsizeis text mode command (unlike\scriptstyle), andthe output of\sigma_\text{\scriptsize v}is obviously different from \sigma_v. (3) What is wrong abouta_\text{...}? – user104694 Dec 02 '22 at 09:34x_\text{...}to work, it does due to low level parsing weirdness if you use a full tex parser but it is not latex syntax, it shoud bex_{\text{...}}alsox_{\mathrm{...}}is almost always preferable as it uses the fonts specified for math – David Carlisle Dec 02 '22 at 09:50x_\text{...}since forever. Should I expect it to stop working at any point? (I would have to rewrite all my old files...) – user104694 Dec 02 '22 at 10:11_parse like a macro argument\fbox\text{x}is\fbox{\text}{x}and an error._\text{x}is not_{\text}{x}it magically braces itself and expands to_{\text{x}}and "works" but if you have that in a document I'd use an editor to fix the markup. – David Carlisle Dec 02 '22 at 10:19sed -i '' s/_\\text/_\\mathrm/g *.tex? – Thruston Dec 02 '22 at 11:37text, but would have to add curly braces around the subscript. If I have to, I will try to cook up a regular expression... – user104694 Dec 02 '22 at 11:52