LaTeX

LaTeX is a typesetting language designed to provide mathematicians and computer scientists with an easier way to write their academic papers. LaTeX is a high level markup language that accesses the power of TeX, while hiding its inner workings.

In essence, TeX handles the layout side, while LaTeX handles the content side for document processing. LaTeX comprises a collection of TeX macros and a program to process LaTeX documents, and because the plain TeX formatting commands are elementary, it provides authors with ready-made commands for formatting and layout requirements such as chapter headings, footnotes, cross-references and bibliographies.

To learn more, read the LaTeX written on Wikipedia.

When LaTeX is compiled and rendered, the font you are presented with is distinctly TeX. The font is named Computer Modern, was named by its author, Donald Knuth, who himself created the original TeX typesetting engine. The modern-day successor to Computer Modern, known as Latin Modern, retains the original essence of Computer Modern, but adds support for UTF-8 encoding of all of its underlying symbols, along with many new ones, giving this font a robust support for internationalization as it continues to gain popularity with the spread of TeX. The American Math Society, for instance, uses Latin Modern in all of their formal publications and academic research papers.

As for what is rendering this webpage, however, the story continues on. The mathematical symbols you see below were rendered not in LaTeX, but in KaTeX. Written by the engineers at Khan Academy in an effort to help scale their educational content learning platform, KaTeX was built to be, first and foremost, a typesetting language that is fast, lightweight, intuitive.

Thanks to their work, anyone can render documents written in TeX into actual mathematical notation, and presents the fully-rendered symbolic representation of the underlying contents directly within the web browser! Doing so is as simple as importing the cross-browser JavaScript library that KaTeX is written in, and then using the katex function to render the LaTeX code.

For additional instructions on installing KaTeX. visit the official KaTeX website

Syntax

Examples


Symbolic Logic

KaTeX reference: https://katex.org/docs/supported.html#logic-and-set-theory

Wikipedia references:

List of common symbols used in first-order logic:

SymbolUsage$Representation$
$=$equal$=$
$\neq$not equal$\neq$
$\equiv$equivalent ([material equivalence])$\equiv$
$\forall$for all (universal quantification)$\forall$
$\exists$exists (existential quantification)$\exists$
$\exists !$(uniqueness quantification)$\exists !$
$\nexists$does not exist$\nexists$
$\in$lies within$\in$
$\notin$outside of$\notin$
$\mid$such that$\mid$
$\lnot$not (the logical negation)$\lnot$ (or $neg$)
$\land$and (the logical conjunction)$\land$
$\lor$or (the logical disjunction)$\lor$
$\veebar$ or $\oplus$xor (the exclusive disjunction)$\veebar$ or $\oplus$
$\therefore$$\therefore$
$\because$$\because$
$\cup$set union$\cup$
$\cap$set intersection$\cap$
$\subset$proper subset$\subset$
$\subseteq$subset$\subseteq$
$\supset$proper superset$\supset$
$\supseteq$superset$\supseteq$
$\varnothing$the empty set$\varnothing$
$\to$$\to$
$\gets$$\gets$
$\vDash$entails$\vDash$
$\implies$implies$\implies$
$\impliedby$implied by$\impliedby$
$\iff$if and only if$\iff$
$\setminus$set difference$\setminus$
$\mapsto$maps to$\mapsto$
$\sim$similar to$\sim$
$\cong$congruent with$\congruent$
$\propto$proportional to$\propto$
$\prec$precedes$\prec$
$\succ$succeedes$\succ$
$\vdash$proves$\vdash$
$\models$models$\models$
$\top$tautology "verum"$\top$
$\bot$contradiction "falsum"$\bot$

Set Difference
Given two sets $A$ and $B$, the set of elements that are in $A$ but are not in $B$ is what's known as the set difference of $A$ and $B$.

The set resulting from taking the set difference of $A$ and $B$ is also known as the relative complement of $A$ in $B$.

In formal notation, taking the set difference of $A$ and $B$ results in creating the set that is the relative complement of $A$ in $B$

$$ A \setminus B = {x \in B \mid x \notin A} $$

Tip: An easy way to remember the meaning of the complement of a set: In order for a compliment (different spelling, mind you) to mean anything to you, it has to be coming from someone else, outside of you.