-
Notifications
You must be signed in to change notification settings - Fork 1
/
Handcalcs.jl
39 lines (34 loc) · 1.06 KB
/
Handcalcs.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
Module for better calc documentation.
"""
module Handcalcs
using Latexify: latexify, set_default, get_default, reset_default, @latexdefine
using MacroTools: postwalk, prewalk
using MacroTools
using LaTeXStrings
using CodeTracking, Revise
using InteractiveUtils
import AbstractTrees: Leaves
using PrecompileTools: @setup_workload, @compile_workload
export @handcalc, @handcalcs, @handfunc, multiline_latex, collect_exprs
export set_handcalcs, reset_handcalcs, get_handcalcs #, initialize_format
export latexify, @latexdefine, set_default, get_default, reset_default
# function initialize_format()
# @eval begin
# using Format
# set_default(fmt=x->format(round(x, digits=4)))
# end
# end
const math_syms = [
:*, :/, :^, :+, :-, :%,
:.*, :./, :.^, :.+, :.-, :.%,
:<, :>, Symbol(==), :<=, :>=,
:.<, :.>, :.==, :.<=, :.>=,
:sqrt, :sin, :cos, :tan]
const h_syms = [:cols, :spa, :h_env, :len]
include("default_h_kwargs.jl")
include("handcalc_marco.jl")
include("handcalcs_macro.jl")
include("handfunc_macro.jl")
include("precompile.jl")
end