And we can dub this, um, let me see, ... ActiveteX.  :-)<br>
<br><br><div class="gmail_quote">2010/12/28 Philip Taylor (Webmaster, Ret'd) <span dir="ltr"><<a href="mailto:P.Taylor@rhul.ac.uk">P.Taylor@rhul.ac.uk</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im"><br>
<br>
François Patte wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Thanks for this answer. It is not too nice if you have to write:<br>
<br>
Multiply 5 by 7: $7\times 5 = 35$<br>
</blockquote>
<br></div>
Bonjour, François : is this perhaps the sort of<br>
thing you had in mind ?<br>
<br>
\documentclass {minimal}<br>
\usepackage {fontspec}<br>
\setmainfont {Linux Libertine O}<br>
\begin {document}<div class="im"><br>
Multiply 5 by 7: $7\times 5 = 35$<br>
<br></div>
\catcode `\5 = \active<br>
\catcode `\7 = \active<br>
\def 5{\ifmmode \string 5 \else $5$\fi}<br>
\def 7{\ifmmode \string 7 \else $7$\fi}<div class="im"><br>
Multiply 5 by 7: $7\times 5 = 35$<br>
<br></div>
\end {document}<br>
<br>
Obviously you can \catcode and \def all digits<br>
from zero to nine in a simple loop to cope with<br>
the general case.<br><font color="#888888">
<br>
Philip TAYLOR</font><div><div></div><div class="h5"><br>
<br>
<br>
--------------------------------------------------<br>
Subscriptions, Archive, and List information, etc.:<br>
 <a href="http://tug.org/mailman/listinfo/xetex" target="_blank">http://tug.org/mailman/listinfo/xetex</a><br>
</div></div></blockquote></div><br>