1

OK, I know that the text symbol ¡ can be written as

!`

but I need ¡ as a math symbol. If I write

\text{!`} 

or

\mbox{!`} 

then the symbol becomes italic in theorems and places where text, but not math, is italicized. How should I define the symbol ¡ so that it behaves as ! in math mode?

  • 1
    Use \textrm{!`}. – Bernard Jun 1 '16 at 9:50
0

I use

{\scriptstyle \text{\rm !`}}

General hint: find someone who did what you want on the arXiv and download the source file :)

1

Define properly a mathchar for the reverse exclamation mark; for instance

\DeclareMathSymbol{\revexcl}{\mathclose}{operators}{'074}

and use

$n\revexcl$

which will also change size in superscripts and subscripts.

If you want to be able to input !`, it's possible with some tricks.

\documentclass{article}

\DeclareMathSymbol{\revexcl}{\mathclose}{operators}{'074}
\DeclareMathSymbol{\excl}{\mathclose}{operators}{'041}
\makeatletter
\begingroup\lccode`~=`! \lowercase{\endgroup
  \def~}{\@ifnextchar`{\revexcl\@gobble}{\excl}}
\mathcode`!="8000
\makeatother

\begin{document}

$n!$

$n!`$

$A_{n!}$

$A_{n!`}$

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.