Copy the package file to /usr/local/texlive/texmf-local/tex/latex/local
on your machine. This can be accomplished with the following commands:
sudo make install
If you need to uninstall just remove the file by running the following command:
sudo rm /usr/local/texlive/texmf-local/tex/latex/local/explain-math.sty
Once you have that you can just call the package:
\usepackage{explain-math}
See an example of some commands in the example PDF
Description: Explain some math
Required parent environment: align
or align*
Parameters:
- Explanation (normal mode)
- Math (math mode)
Example:
\begin{align*}
\explain{Here is some math}{2 + 2 = 4}
\explain{Here is some multiline math}{
\step{ 2 + 2 = 4 }
\step{ 10 - 10 = 0 }
}
\end{align*}
Description: A step inside the math section of the \explain
environment
Required parent environment: None, but should be inside \explain
arg #2
Parameters:
- Math (math mode)
Example:
\begin{align*}
\explain{Here is some multiline math}{
\step{ 2 + 2 = 4 }
\step{ 10 - 10 = 0 }
}
\end{align*}
Description: Equation
Required parent environment: align
or align*
Parameters:
- Equation (math mode)
Example:
\begin{align*}
\eq{c^2 = a^2 + b^2}
\end{align*}
Description: Formula
Required parent environment: align
or align*
Parameters:
- Formula (math mode)
Example:
\begin{align*}
\formula{P = x + b}
\end{align*}
Description: Math statement
Required parent environment: align
or align*
Parameters:
- Math statement (math mode)
Example:
\begin{align*}
\statement{-2(x + 2) = 6}
\end{align*}
Description: Define variables that should be plugged into a formula
Required parent environment: align
or align*
Parameters:
- Variables (math mode)
Example:
\begin{align*}
\variables{a = 2}
\varables{
a = 10 \\
b = 2 \\
c = 10
}
\end{align*}
Description: Variable declaration
Required parent environment: align
or align*
Parameters:
- Name (math mode)
- Value (math mode)
\var{x}{10}
Description: Variable declaration with name in text
Required parent environment: align
or align*
Parameters:
- Name (normal mode)
- Value (math mode)
\vart{x}{10}
Description: Variable declaration with unit
Required parent environment: align
or align*
Parameters:
- Name (math mode)
- Value (math mode)
- Unit (normal mode)
\varu{x}{10}{cm}
Description: Variable declaration with text and unit
Required parent environment: align
or align*
Parameters:
- Name (normal mode)
- Value (math mode)
- Unit (normal mode)
\vartu{x}{10}{cm}
Description: Solution to a problem
Required parent environment: None
Parameters:
- Solution (normal mode)
Example:
\sol{All real numbers}
Description: Solution to a problem with math
Required parent environment: None
Parameters:
- Solution (math mode)
Example:
\msol{x = 10}
Description: Braced explanation below some math
Required parent environment: Math environment
Parameters:
- Note (normal mode)
- Math (math mode)
Example:
$ \bexplain{This isn't true}{2 + 2 = 0} $
Description: Braced explanation above some math
Required parent environment: Math environment
Parameters:
- Note (normal mode)
- Math (math mode)
Example:
$ \aexplain{This is true}{2 + 2 = 4} $