Originally, I intended to use the command $\not\mathcal{R}$ as the negation of a binary relation, but there is a problem with that concatenation of commands. So I did what anyone would do in a situation like this, which is create my own symbol.Searching for information on this page, I came across the following code:


This code solves the initial problem, but it generates another one, namely the concatenation of commands $y\TCNegation{\mathcal{T}} g$ is not to my liking. I'd like to rotate it a bit more to better visualize the negation, but I lose the alignment of the characters involved.

Is there a better way to fix the initial problem?

Is it possible to improve the code?

  • use the slanted \not character rather than a rule? Jul 31, 2023 at 19:40
  • From a design point of view, I would use the bar notation like in probability.
    – projetmbc
    Dec 29, 2023 at 9:52

1 Answer 1


You could tweak this some more but I'd use the slanted \not not a rule, with optional per-character offset

enter image description here



  \csname foo#1\endcsname




Two packages offering similar functionality are slashed and centernot.

  • 1
    Since almost no \mathcal capitals have a descender ("Q" is the only exception), I'd be inclined to raise the \not just a bit, to appear more symmetrical. The horizontal placement looks good as you have it, but would have to be adjusted a bit to the left if the overlay is shifted up. Jul 31, 2023 at 20:17
  • @barbarabeeton I did wonder about that Jul 31, 2023 at 20:18
  • Good thing that this and more is already available as a package ctan.org/pkg/slashed :-) Jul 31, 2023 at 22:07
  • 1
    @WillieWong Oh wow! Brilliant package, who wrote that! Jul 31, 2023 at 22:13
  • Too bad it lacks documentation. Aug 1, 2023 at 1:22

You must log in to answer this question.

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