Handcalcs.Handcalcs
— ModuleModule for better calc documentation.
Handcalcs.@handcalc
— Macro@handcalc expression
Create LaTeXString
representing expression
. The expression being a vaiable followed by an equals sign and an algebraic equation. Any side effects of the expression, like assignments, are evaluated as well. The RHS can be formatted or otherwise transformed by supplying a function as kwarg post
.
Examples
julia> a = 2
2
julia> b = 5
5
julia> @handcalc c = a + b
L"$c = a + b = 2 + 5 = 7$"
julia> c
7
Handcalcs.@handcalcs
— Macro@handcalcs expressions
Create LaTeXString
representing expressions
. The expressions representing a number of expressions. A single expression being a vaiable followed by an equals sign and an algebraic equation. Any side effects of the expression, like assignments, are evaluated as well. The RHS can be formatted or otherwise transformed by supplying a function as kwarg post
. Can also add comments to the end of equations. See example below.
Examples
julia> a = 2
2
julia> b = 5
5
julia> @handcalcs begin
c = a + b; "eq 1"
d = a - c
end
L"$egin{align}
\\c = a + b = 2 + 5 = 7\text{ }(\text{eq 1})
\\d = a - c = 2 - 7 = -5
nd{align}$"
julia> c
7
julia> d
-5