Is there a way to mirror a symbol like \mathcal{P}, but keep it cursive in the right way? Using \reflectbox{\mathcal{P}} gives a mirrored version of \mathcal{P} that slopes in the wrong direction.

  • Is there a reason you need this, other than intellectual curiosity and/or fun? I'm unsure whether I'd consider a math article with mirrored mathcal symbols to have good notation. :p
    – tomsmeding
    Aug 8 '20 at 10:39
  • 2
    I thought it would be fun to use for the contravariant powerset functor, as it is the reverse of my covariant powerset functor. Not sure if I'd use it in a paper though :) Aug 8 '20 at 11:44

This also uses pdf magic, set up in a systematic way. Unfortunately, it seems each glyph needs its own custom kern. However, when accounted for, the result does not suffer from falling outside of its boundary issues..

        \pdfsetmatrix{1 0 #1 1}%



enter image description here


You can pair \mathpalette with some PDF magic. This will only work in pdfTeX. It's not fine-tuned and I've only tested it somewhat for the letter P. It doesn't look that great in subscripts and weird shit is happening when you use multiple letters, but you get the idea.




    \pdfsetmatrix{-1 0 .633 1}%






\fbox{$\mathcalr{ABC}$} % oops

enter image description here


With unicode-math, it is possible to make a math font slant left with a negative value of FakeSlant=, before reflecting it. You will still need some manual kerning before and after the \reflectbox.



\setmathfontface{\mathleftslant}{Latin Modern Math}[FakeSlant=-0.6]

\[ \mathcal{P}\mirrorcalP\mathcal{Q} \]

Latin Modern Math sample

While it would be possible to define a \mirrorcal{P} command, it would require individual fine-tuning for every symbol anyway, and you probably only need one or two of them.

You might, however, define \mirrorcalP as \@mirrorsym{\mscrP}{-2.5em}{0.1em} if you need to declare a large number of these.

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.