# How to write the independence symbol?

I wanted to write this formula in an answer:

All the instructions I found involved creating new command or extra packages, is there a list of available symbols supported by Exchange? I got stuck in this meta search where the result would be on Exchange about LaTex but not about LaTex on Exchange :)

• I tried detexify, but didn't find anything. There is information about $\LaTeX$ here: Reviewing questions and applying LaTeX format. Jan 13 '18 at 22:11
• On the attempted migration: 1. We have quite a few MathJax questions here on meta. Did our policy on them change? 2. We shouldn't migrate stuff that isn't on topic at the destination. MathJax questions are often seen as off-topic on tex.SE (e.g. see this answer), which says in part "While mathjax uses LaTeX syntax, it uses Javascript and HTML's DOM model rather than TeX technology, making it mostly off topic for this site.". How they're drawing the border in practice is unclear, suggesting we usually shouldn't migrate these. Jan 14 '18 at 21:29
• For the sake of consistency, I have reopened. If the question re-closes, I will leave it alone. Jan 14 '18 at 22:05
• I'm not sure why this is off topic here, since MathJax is very much part of "the software that powers the Stack Exchange network" (from the bullet point above). As noted by @Glen_b, it is off-topic for the TeX SE site, and it seems to me to be natural to ask about how to use MathJax here in meta. Where else would one suggest it be asked? Stack Overflow itself does get MathJax questions, so that is a possibility, and the MathJax forums is another, but if the issue is a symbol like this, wouldn't the community that uses the symbol be more likely to know than a more general forum? Jan 14 '18 at 22:09
• I agree with @Glen_b that this is on-topic here. Jan 15 '18 at 8:12

One thing to keep in mind is that a hack to produce a visual version of the symbol may well be a problem for the visually challenged, who may be using screen readers or other assistive technology, or those with dyslexia whose screen readers read each symbol separately with background highlighting. Hacks like superimposing two \perp symbols will cause confusion in those situations.

An alternative would be to use \mathrel{\unicode{x2AEB}} to obtain $A\mathrel{\unicode{x2AEB}}B$ by calling on the correct Unicode symbol. Since this is not in the MathJax fonts, however, it relies on the reader's system fonts to provide the symbol, and not everyone will have a font that contains this one, so the results may vary from user to user.

• The builtin screenreader of macOS 10.13 reads "to obtain A double up tack B A x2AEB; B by calling". So it correctly read the symbol but then it said "A x2AEB; B", which is also what you get when copying the statement. This might be some MathJax related shortcoming? Jan 15 '18 at 14:14
• @Lejafar, there are several issues involved, here. First, I incorrectly used 0x2AEB when I should have used just x2AEB in the \unicode{} macro. That caused the "x2AEB" instead of the "double up tack". I have fixed it in my answer above, so now you should get "A double up tack B" twice. The reason for this is that MathJax inserts a MathML version of the mathematics (hidden from view) that is read by the screen reader, while marking the visual math as not to be read by the reader. Unfortunately, VoiceOver seems to be ignoring the area-hidden="true" attribute that should ... Jan 15 '18 at 21:07
• prevent it from being read by VoiceOver. So VoiceOver reads both the layer out math and the MathML, and you get the double voicing of the expression. Note that in this case, both are the same, but for more complicated math (like roots or fractions), reading the visual math would produce incorrect results (which is why it is supposed to be hidden from the screen reader). Jan 15 '18 at 21:09
• One work around for that would be to use the MathJax contextual menu to select the MathML output renderer (which will insert only one version of the math) and that will be read properly by VoiceOver. Jan 15 '18 at 21:10

Is $A\perp\kern-5pt\perp B \mid C$ good enough for your purposes?

It's a slight kludge (A\perp\kern-5pt\perp B \mid C) but it looks okay to me; if you just need something for CV I'd think that would suffice.

I wish to address the general question of fabricating unusual $\TeX$ symbols. $\newcommand{\ConditionallyIndependent}[3]{#1 \perp\kern-5pt \perp #2 \mid #3}$

### The workaround

The lack of a $\TeX$ symbol for your preferred notation is a strong indication that your notation is not well known. At a minimum, then, please define and explain your notation on or before its first use.

Now, given that such a definition is necessary, why not adopt a more convenient notation instead? Thus, you might write

Let $X \perp Y \mid Z$ mean that $X$ and $Y$ are conditionally independent given $Z.$

Let $\ConditionallyIndependent{X}{Y}{Z}$ mean that $X$ and $Y$ are conditionally independent given $Z.$

The first uses the standard $\TeX$ symbol \perp while the second is more involved. The rest of this answer describes the second solution.

### When you must

The only situation where such a solution would not be acceptable would be where you must emulate some other document. If that "document" is a question you are answering or commenting on, and you wish to use its notation, then likely the solution already appears in the question itself: imitate that. Otherwise, then either (a) the notation in the question is a mere image or (b) you wish to use notation from some authority or reference material. In these cases several good options have been offered in other replies in this thread. The principal objection is that most of them are unreadable in their raw form, creating problems for alternative rendering mechanisms (such as screen readers).

Might I suggest the use of macros to solve this problem? As an example, in the first line of this post I defined the following macro using Glen_b's $\TeX$ solution:

\newcommand{\ConditionallyIndependent}[3]{#1 \perp\kern-5pt \perp #2 \mid #3}

This definition did not result in anything being rendered: it is invisible to the reader. Now, although a screen reader might render it, its initial parts will make it apparent to the listener what is being done: "he's defining a $\TeX$ macro called ConditionallyIndependent; I probably don't need to know the details."

Then, whenever this symbol is needed, it will be rendered in all forms (raw or interpreted) in a meaningful way. The screen reader, for instance, will display the following line

$$\ConditionallyIndependent{X}{Y}{Z}$$

in its raw form as \ConditionallyIndependent{X}{Y}{Z}. Not a bad compromise.

• While I agree that using a macro to make things easier to author is a good idea (I almost suggested it myself), it does not help the screen reader situation in the way you suggest (at least not on SE sites). When MathJax runs, the original TeX is removed from the page and replaced by the typeset version (marked as not to be read by screen readers) and the hidden MathML version (hidden from visual users). So the screen reason does not read the TeX version as you suggest, but will read the converted MathML version. Generally, the TeX source is not an appropriate form for screen readers... Jan 17 '18 at 14:44
• @Davide That is disappointing but useful information. Thank you for sharing it.
– whuber Mod
Jan 17 '18 at 14:45
• ... and will be more difficult for the listener to interpret. There are some sites, however, that convert TeX to images and include the TeX source as the alt text for the image. In those situations, screen readers will read that alt text (so the TeX source) in place of the image. Perhaps that is the usage you have in mind. Jan 17 '18 at 14:47
• A user can, however, select the "Plain Source" renderer, in which case the TeX code is shown rather than typeset math (with no MathML version inserted), and then a screen reader will read the TeX source instead. So you can get the result you are suggesting, but the reader will have to select a different renderer using the MathJax contextual menu, and all the math will be read as TeX source. Jan 17 '18 at 14:49

$$A \,\bot\, B \mid C$$
using A \,\bot\, B \mid C? I recommend this Wikipedia article for the glossary of symbols + $\TeX$ symbols.