I want to write following in MathJax:
L(A)\L(B)
When I type following:
$L(A)\ L(B)$
It prints: $L(A)\ L(B)$
When I type following:
$L(A)\\ L(B)$
It prints: $L(A)\\ L(B)$
How can I make \
appear in MathJax?
I want to write following in MathJax:
L(A)\L(B)
When I type following:
$L(A)\ L(B)$
It prints: $L(A)\ L(B)$
When I type following:
$L(A)\\ L(B)$
It prints: $L(A)\\ L(B)$
How can I make \
appear in MathJax?
If you want a real backslash, and not something spaced like a binary operation, use
L(A)\backslash L(B)
to get
$$
L(A) \backslash L(B)
$$
\backslash
with \mathbin
or \mathrel
to change the spacing, giving something similar (the same?) as \setminus
. So L(A)\mathbin{\backslash} L(B)
gives $L(A)\mathbin{\backslash} L(B)$ while L(A)\mathrel{\backslash} L(B)
gives $L(A)\mathrel{\backslash} L(B)$. (The spacing is different, honest!)
$\endgroup$
Here's a list of possible solutions that I could come up with (includes a curated Detexify output), the first two are the other two current answers:
$L(A)\backslash L(B)$
$L(A)\setminus L(B)$
(looks the same as the next too)$L(A)\mathbin{\backslash}L(B)$
$ L(A)⧵L(B)$
using U+29F5 "Reverse Solidus Operator"$L(A)\text{\ }\!L(B)$
PS /
also works in \text
$L(A)$\ $\!L(A)$
(broken into two MathJax pieces) and similarly$L(A)$ \ $L(A)$
$A \diagdown B$
$L(A)╲L(B)$
using U+2572 "Box Drawings Light Diagonal Upper Left to Lower Right"$A \smallsetminus B$
$L(A)﹨L(B)$
using U+FE68 "Small Reverse Solidus"$L(A)\L(B)$
using U+FF3C "Fullwidth Reverse Solidus"$L(A)\backprime L(B)$
$L(A)\searrow L(B)$
\unicode{x29f5}
: $L(A)\unicode{x29f5}L(B)$. Same for points 9, 11 and 12.
$\endgroup$
For fun:
How can I make \ appear in MathJax?
The command \cancel
produces a forward slash: $\require{cancel}\cancel{\phantom{k}}$. A simple rotation flips it around to produce a backslash. So
\require{cancel}
L(A)\!\!\!
\style{display: inline-block; transform: rotate(90deg)}{\cancel{\phantom{mm}}}
\!\!\! L(B)
gives
$$\require{cancel}L(A)\!\!\! \style{display: inline-block; transform: rotate(90deg)}{\cancel{\phantom{mm}}}\!\!\! L(B).$$
This is clearly easier better than \setminus
or \backslash
:P