Skip to content

Instantly share code, notes, and snippets.

@thomwiggers
Created September 27, 2012 16:21
Show Gist options
  • Save thomwiggers/3794926 to your computer and use it in GitHub Desktop.
Save thomwiggers/3794926 to your computer and use it in GitHub Desktop.
XOR voor LaTeX
% prints the \oplus always in math mode
\newcommand*\xor{\ensuremath{\mathbin{\oplus}}\ }
%
% \xorequation{a}{b}{c}
% Produces:
% a
% b \xor
% ---
% c
\newcommand{\xorequation}[3]
{
\ensuremath{
\begin{array}{ll}
{#1} & \\
{#2} & \xor\\
\hline
{#3} & \\
\end{array}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment