<div dir="ltr"><div>No latex font size command is valid in math mode. The fonts need to be set up before math is entered. It really should be an error but it's a warning for historical reasons.</div><div><br></div><div>If you try it anyway then sometime it apparently has an effect and sometimes that effect does change the size of some of the letters, but the details are unpredictable</div><div>and affected by what math expressions have already been used in the document and how many fonts are already "known", and whether (like arrays) the math does</div><div> in fact  switch to a new math list for each cell, so typically you see that math in alignments is affected by the font size, but math outside is not.<br></div><div><br></div><div>Possibly you are looking for \scriptstyle but \scriptsyle is the default style in sub and superscripts so would do nothing at the place you show.</div><div><br></div><div>David</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 7 May 2020 at 09:40, Doug McKenna <<a href="mailto:doug@mathemaesthetics.com">doug@mathemaesthetics.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've been trying to put a LaTeX verbatim quote in a superscript or subscript.  Here's a simple MWE:<br>
<br>
<br>
% !TEX TS-program = pdflatex<br>
<br>
\documentclass{letter}<br>
\begin{document}<br>
<br>
\verb|normal|, $10^{\scriptsize \verb|foo|}$, $A_{\scriptsize \verb|bar|}$, or $2^{2^{-{\tiny \verb|foobar|}}}$<br>
<br>
\end{document}<br>
<br>
<br>
It seems to work quite well or at least as expected, except that LaTeX issues the following warning messages which, given that it seems to work, don't make much sense:<br>
<br>
<br>
LaTeX Font Warning: Command \scriptsize invalid in math mode on input line 6.<br>
<br>
LaTeX Font Warning: Command \scriptsize invalid in math mode on input line 6.<br>
<br>
LaTeX Font Warning: Command \tiny invalid in math mode on input line 6.<br>
<br>
<br>
What is it that one needs to do better or correctly to keep such warnings at bay?<br>
<br>
<br>
Doug McKenna<br>
Mathemaesthetics, Inc.<br>
<br>
</blockquote></div>