6
$\begingroup$

The title says it all: How can I use math symbol \Perp (like $\perp$ but with two verticals) from txfonts/pxfonts in mathjax? It is sometimes used in probability to denote independence.

$\endgroup$
3
  • 6
    $\begingroup$ $\perp\!\!\!\perp$ = $\perp\!\!\!\perp$ $\endgroup$
    – Surb
    Apr 24, 2017 at 5:36
  • 1
    $\begingroup$ Thanks! Let us try: $\newcommand{\Perp}{\perp\!\!\!\perp}$ $\Perp$ $\endgroup$ Apr 24, 2017 at 6:05
  • 2
    $\begingroup$ This one: $\perp\,\!\,\!\,\!\,\!\,\!\,\!\,\!\!\!\!\perp$ is even nicer but more complicated: $\perp\,\!\,\!\,\!\,\!\,\!\,\!\,\!\!\!\!\perp$ $\endgroup$
    – Surb
    Apr 25, 2017 at 13:04

2 Answers 2

7
$\begingroup$

You could use \unicode{x2AEB}, but note that this character is not in the MathJax TeX fonts, so it would rely on the user having a font with this character installed on their system. The STIX fonts are one such set of fonts, and if you are authoring your own pages, you could configure MathJax to use the STIX-Web font so that it would be available.

$\endgroup$
2
$\begingroup$

The solutions using the negative space \! gave me problems with wrong spacing in mathjax, and I wanted to avoid setting up a font just for this, so I found the following alternative:

\newcommand{\Perp}{\mathrel{\rlap{\perp}\mkern1mu\perp}}

$\newcommand{\Perp}{\mathrel{\rlap{\perp}\mkern1mu\perp}}A \Perp B$

$\endgroup$
3
  • $\begingroup$ Looks like it works to me. Is this not the desired output? i.stack.imgur.com/Fae0R.png $\endgroup$ May 13 at 8:47
  • $\begingroup$ @CalvinKhor: weird, now it works for me too! Maybe I made a typo while trying it. I modified the answer accordingly. $\endgroup$ May 14 at 10:38
  • $\begingroup$ at certain zooms (and only if I'm using the XITS fonts) the base is slightly misaligned. $\endgroup$ May 14 at 10:44

You must log in to answer this question.

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