Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gleich/explain-math
🧮 LaTeX package for writing readable and explained mathematics
https://github.com/gleich/explain-math
latex math mathematics
Last synced: about 2 months ago
JSON representation
🧮 LaTeX package for writing readable and explained mathematics
- Host: GitHub
- URL: https://github.com/gleich/explain-math
- Owner: gleich
- License: mit
- Created: 2021-02-28T19:44:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-01T03:38:51.000Z (almost 2 years ago)
- Last Synced: 2024-04-22T05:09:28.004Z (8 months ago)
- Topics: latex, math, mathematics
- Language: TeX
- Homepage:
- Size: 2.35 MB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# explain-math
🧮 A handy LaTeX package for writing readable and explained mathematics
- [explain-math](#explain-math)
- [🚀 Installation](#-installation)
- [✨ Commands](#-commands)
- [`\explain`](#explain)
- [`\step`](#step)
- [`\eq`](#eq)
- [`\formula`](#formula)
- [`\statement`](#statement)
- [`\variables`](#variables)
- [`\var`](#var)
- [`\vart`](#vart)
- [`\varu`](#varu)
- [`\vartu`](#vartu)
- [`\sol`](#sol)
- [`\bexplain`](#bexplain)
- [`\aexplain`](#aexplain)## 🚀 Installation
Copy the [package file](explain-math.sty) to `/usr/local/texlive/texmf-local/tex/latex/local` on your machine. This can be accomplished with the following commands:
```bash
sudo make install
```If you need to uninstall just remove the file by running the following command:
```bash
sudo rm /usr/local/texlive/texmf-local/tex/latex/local/explain-math.sty
```Once you have that you can just call the package:
```tex
\usepackage{explain-math}
```## ✨ Commands
See an example of some commands in the [example PDF](example.pdf)
### `\explain`
Description: Explain some math
Required parent environment: `align` or `align*`
Parameters:
1. Explanation (normal mode)
2. Math (math mode)Example:
```tex
\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*}
```### `\step`
Description: A step inside the math section of the `\explain` environment
Required parent environment: None, but should be inside `\explain` arg #2
Parameters:
1. Math (math mode)
Example:
```tex
\begin{align*}
\explain{Here is some multiline math}{
\step{ 2 + 2 = 4 }
\step{ 10 - 10 = 0 }
}
\end{align*}
```### `\eq`
Description: Equation
Required parent environment: `align` or `align*`
Parameters:
1. Equation (math mode)
Example:
```tex
\begin{align*}
\eq{c^2 = a^2 + b^2}
\end{align*}
```### `\formula`
Description: Formula
Required parent environment: `align` or `align*`
Parameters:
1. Formula (math mode)
Example:
```tex
\begin{align*}
\formula{P = x + b}
\end{align*}
```### `\statement`
Description: Math statement
Required parent environment: `align` or `align*`
Parameters:
1. Math statement (math mode)
Example:
```tex
\begin{align*}
\statement{-2(x + 2) = 6}
\end{align*}
```### `\variables`
Description: Define variables that should be plugged into a formula
Required parent environment: `align` or `align*`
Parameters:
1. Variables (math mode)
Example:
```tex
\begin{align*}
\variables{a = 2}
\varables{
a = 10 \\
b = 2 \\
c = 10
}
\end{align*}
```### `\var`
Description: Variable declaration
Required parent environment: `align` or `align*`
Parameters:
1. Name (math mode)
2. Value (math mode)```tex
\var{x}{10}
```### `\vart`
Description: Variable declaration with name in text
Required parent environment: `align` or `align*`
Parameters:
1. Name (normal mode)
2. Value (math mode)```tex
\vart{x}{10}
```### `\varu`
Description: Variable declaration with unit
Required parent environment: `align` or `align*`
Parameters:
1. Name (math mode)
2. Value (math mode)
3. Unit (normal mode)```tex
\varu{x}{10}{cm}
```### `\vartu`
Description: Variable declaration with text and unit
Required parent environment: `align` or `align*`
Parameters:
1. Name (normal mode)
2. Value (math mode)
3. Unit (normal mode)```tex
\vartu{x}{10}{cm}
```### `\sol`
Description: Solution to a problem
Required parent environment: `align` or `align*`
Parameters:
1. Solution (math mode)
Example:
```tex
\sol{x = 10}
```### `\bexplain`
Description: Braced explanation below some math
Required parent environment: Math environment
Parameters:
1. Note (normal mode)
2. Math (math mode)Example:
```tex
$ \bexplain{This isn't true}{2 + 2 = 0} $
```### `\aexplain`
Description: Braced explanation above some math
Required parent environment: Math environment
Parameters:
1. Note (normal mode)
2. Math (math mode)Example:
```tex
$ \aexplain{This is true}{2 + 2 = 4} $
```