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
  • 1
    Use \textrm{!`}.
    – Bernard
    Commented Jun 1, 2016 at 9:50

2 Answers 2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .