25 Febbraio 2012 alle 14:17
#70302
::
Fantastico Enrico! 🙂
Volendo anche gli apici posso modificare così?
`\makeatletter
\mathcode`_=\string”8000
\catcode`_=\active
\def_{\@ifnextchar[\ItOrUp@sb@mathrm\sb}
\def\ItOrUp@sb@mathrm[#1]{\sb\mathrm{#1}}
\@makeother\_
\mathcode`^=\string”8000
\catcode`^=\active
\def^{\@ifnextchar[\ItOrUp@sp@mathrm\sp}
\def\ItOrUp@sp@mathrm[#1]{\sp\mathrm{#1}}
\@makeother\^
\makeatother`
Sono andato a braccio, ma sembra funzionare.
Grazie!