Defining Variables

Generated pdf

Click here to download the PDF.



LaTeX source

Click here to download the TEX file.

\documentclass{article}
\usepackage[elliptic]{qed}

\begin{document}



\section*{Defining variables}

We can define a variable for use later in the document by using the
equivalence (\verb!\equiv!) symbol inside an equation:
%
\begin{qed}
    x \equiv \sqrt{16}
\end{qed}
%
Note the icon next to the equation; \textsf{qed} did not perform
any tests but instead stored the expression for $x$.
%
We can then reference $x$ in subsequent equations, and \textsf{qed}
will recognize it and automatically substitute its definition:
%
\begin{qed}
    x = 4
\end{qed}
%
For convenience, users can also use the starred version of the
equivalence commmand (\verb!\equiv*!), which behaves in the same
way but typesets as a regular equality symbol:
%
%
\begin{qed}
    y \equiv* \sqrt{25}
\end{qed}
%
This works just as before:
%
\begin{qed}
    y = 5
\end{qed}
%
%
\end{document}

Building the PDF

To build the PDF, run

qed-setup

in the same directory as the tex file, then compile it by running

pdflatex defining_variables.tex
qed
pdflatex defining_variables.tex

if you have pdfLaTeX installed, or

tectonic defining_variables.tex --keep-intermediates
qed
tectonic defining_variables.tex

if you’re using tectonic.