Discussion:
Negation: LyX or LaTeX?
Ernesto Posse
2007-11-01 19:40:44 UTC
Permalink
Hello. I have an issue with the use of \not in math mode, but I am not
sure if the poblem is with LyX or LaTeX itself.

When I try to write "aRb" with the R negated, the diagonal which is
supposed to go over the R does not appear in the right place. I've
tried each of the following, both in ERT and using LyX's math
interface:

$a\not Rb$ result: big space between a and R, / just a little over R.
$a\not R b$ result: same
$a\not{R}b$ result: same
$a{\not R}b$ result: smaller space between a and R, but / still not
completely over R.
$a{\not{R}}b$ result: same

It seems that the only way to make it look right is with negative
spaces, but that seems like an ugly hack. Is there any way to negate
the "right" way?
--
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse
Enrico Forestieri
2007-11-02 00:32:31 UTC
Permalink
Post by Ernesto Posse
Hello. I have an issue with the use of \not in math mode, but I am not
sure if the poblem is with LyX or LaTeX itself.
When I try to write "aRb" with the R negated, the diagonal which is
supposed to go over the R does not appear in the right place. I've
tried each of the following, both in ERT and using LyX's math
$a\not Rb$ result: big space between a and R, / just a little over R.
$a\not R b$ result: same
$a\not{R}b$ result: same
$a{\not R}b$ result: smaller space between a and R, but / still not
completely over R.
$a{\not{R}}b$ result: same
It seems that the only way to make it look right is with negative
spaces, but that seems like an ugly hack. Is there any way to negate
the "right" way?
Note that \not is supposed to negate math relations, so I think
that you can get what you want by using

$a\not\mathrel Rb$

Also note that you will get automatic spacing around your new math
relation. If you don't like that, then use

$a{\not\mathrel R}b$

HTH
--
Enrico
Ernesto Posse
2007-11-02 02:27:40 UTC
Permalink
That seems to work. Thanks.
Post by Enrico Forestieri
Post by Ernesto Posse
Hello. I have an issue with the use of \not in math mode, but I am not
sure if the poblem is with LyX or LaTeX itself.
When I try to write "aRb" with the R negated, the diagonal which is
supposed to go over the R does not appear in the right place. I've
tried each of the following, both in ERT and using LyX's math
$a\not Rb$ result: big space between a and R, / just a little over R.
$a\not R b$ result: same
$a\not{R}b$ result: same
$a{\not R}b$ result: smaller space between a and R, but / still not
completely over R.
$a{\not{R}}b$ result: same
It seems that the only way to make it look right is with negative
spaces, but that seems like an ugly hack. Is there any way to negate
the "right" way?
Note that \not is supposed to negate math relations, so I think
that you can get what you want by using
$a\not\mathrel Rb$
Also note that you will get automatic spacing around your new math
relation. If you don't like that, then use
$a{\not\mathrel R}b$
HTH
--
Enrico
--
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse
Loading...