## Mathjax Tutorial (Typeset Logic Neatly So That People Read Your Posts)

• 2.5k
This forum has Mathjax support. Mathjax is a typesetting tool for mathematics.

It turns

(x)=(x/(n+1))*arctan(x*sqrt(sum_{i=1}^{\infty} \lambda_i)) into:

$\frac{x}{n+1}\text{arctan}(x*\sqrt(\sum_{i=1}^{\infty} \lambda_i)$

through

$\frac{x}{n+1}\text{arctan}(x*\sqrt(\sum_{i=1}^{\infty} \lambda_i)$


or

Ex(~(x=y)&F(x))|-Ax(Px<=>Fx)

into

\begin{align}\exists x (\neg(x=y)\wedge F(x))\implies \forall x (Px \Leftrightarrow Fx)\end{align}

through

\begin{align}\exists x (\neg(x=y)\wedge F(x))\implies \forall x (Px \Leftrightarrow Fx)\end{align}


To use Mathjax in a post, all you need to do is use to 'math' environment. This can be summoned by
$...$


Useful logical symbols are:

logical conjunction: $\wedge$ is
$\wedge$

logical disjunction: $\vee$ is
$\vee$

negation: $\neg$ is
$\neg$

existential quantifier: $\exists$ is
$\exists$

universal quantifier: $\forall$ is
$\forall$

forward implication: $\Rightarrow$ is
$\Rightarrow$

backward implication: $\Leftarrow$ is
$\Leftarrow$

biconditional $\Leftrightarrow$ is
$\leftrightarrow$


see here for a long list, the far right column's 'Latex' symbols usually work

Useful mathematical symbols are

subset: $\subset$ is
$\subset$

superset $\supset$
$\\supset$

belongs to $\in$
$\in$


fractions: $\frac{x}{y}$ is
$\frac{x}{y}$

subscripts and superscripts: $x_1 ^2$ is
$x_1 ^2$

prime: $\prime$ is
$\prime$

sigma notation: $\sum_{i=1}^{i=n}$ is
$\sum_{i=1}^{i=n}$

note that you can bracket an expression with {} and Mathjax will treat it as a single expression in the intended place, whereas without {} it will usually treat what you write as two expressions. EG, if you want to obtain $x^{21}$, you write
$x^{21}$

rather than
$x^21$

which gives the wrong thing $x^21$)

limits: $\lim_{n\rightarrow\infty}$ is
$\lim_{n\rightarrow\infty}$


you can write matrices or vectors using the \bmatrix environment

1 0
0 1

can be represented as

$\begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix}$

which is given by

$\begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix}$


taking a new line is \\.

If you are presenting a mathematical expression not inline consider wrapping what you write with:

\begin{align} ... \end{align}


multi line derivations can be achieved by using \\ within the align environment.

You can make things a lot prettier than I have here with more effort, but hopefully people take notice and logic posts become more readable.
• 8k
• 2.5k

Wasn't aware there's already a thread for it. I'll pin this one, thanks for including the reference.
• 2.5k
@andrewk@SophistiCat@fishfry@Owen, missing anything vital?
• 2.1k
I usually use \to for $\to$ rather than $\Rightarrow$ because it is quicker to write, and more commonly used in logic texts. It's worth noting that changing to lower case the first letter of the code for any of the arrows above changes the symbol from a double to a single arrow, eg
\leftrightarrow for $\leftrightarrow$ instead of \Leftrightarrow for $\Leftrightarrow$

Other signs I've found useful in logic are \vdash for $\vdash$
\bigcup_{j=1}^n for $\bigcup_{j=1}^n$
\bigcap_{j=1}^n for $\bigcap_{j=1}^n$

\bigvee_{j=1}^n for $\bigvee_{j=1}^n$

\bigwedge_{j=1}^n for $\bigwedge_{j=1}^n$
• 822
Nice. I hardly know any latex, so thanks for the convenient tutorial.
• 3.9k
$\frac{1}{2}$
$x^{78}+2$
• 3.9k
$\ A \subset B$
• 3.3k
$\frac{x}{n+Schopenhauer}\text{arctan}(x*\sqrt(\sum_{i=1}^{\infty} \lambda_i)$

Cool
• 3.9k
$\frac{1}{34}$
• 3.9k
$\sqrt4$
• 3.9k
$\frac{1}{\infty} = 0$
• 3.9k
$\infty$
• 3.9k
$\lim_{n\rightarrow\infty}\frac{x}{n}=0$

$\lim_{x\rightarrow\infty}\frac{1}{x}=0$
• 190
Cool
• 190
$\sum_{i=1}^{i=n}$
• 190
$\sum_{i=1}^{i=n}$ $\frac{-1^n}{n}$
• 190
$\sum_{n=1}^{n=\infty}$ $\frac{-1^n}{n}$
• 190
$\lambda$
• 3.9k
$x^{2}+x-2$
• 189
$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$

It works!!! :starstruck: :starstruck: :starstruck:
• 3.9k
$1+2+3+4+...= -\frac{1}{12}$

$\frac{1}{12}$
• 3.9k
$\sum_{i=1}^{\infty}i=-\frac{1}{12}$

edit (fdrake): \sum, it's a command.
bold
italic
underline
strike
code
quote
ulist
image
url
mention
reveal