-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathmake.jl
More file actions
73 lines (68 loc) · 2.33 KB
/
make.jl
File metadata and controls
73 lines (68 loc) · 2.33 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using ChainRulesCore
using Documenter
using DocThemeIndigo
using Markdown
DocMeta.setdocmeta!(
ChainRulesCore,
:DocTestSetup,
quote
using Random
Random.seed!(0) # frule doctest shows output
using ChainRulesCore
# These rules are all actually defined in ChainRules.jl, but we redefine them here to
# avoid the dependency.
@scalar_rule(sin(x), cos(x)) # frule and rrule doctest
@scalar_rule(sincos(x), @setup((sinx, cosx) = Ω), cosx, -sinx) # frule doctest
@scalar_rule(hypot(x::Real, y::Real), (x / Ω, y / Ω)) # rrule doctest
end
)
indigo = DocThemeIndigo.install(ChainRulesCore)
makedocs(
modules=[ChainRulesCore],
format=Documenter.HTML(
prettyurls=false,
assets=[indigo],
mathengine=MathJax3(
Dict(
:tex => Dict(
"inlineMath" => [["\$","\$"], ["\\(","\\)"]],
"tags" => "ams",
# TODO: remove when using physics package
"macros" => Dict(
"ip" => ["{\\left\\langle #1, #2 \\right\\rangle}", 2],
"Re" => "{\\operatorname{Re}}",
"Im" => "{\\operatorname{Im}}",
"tr" => "{\\operatorname{tr}}",
),
),
),
),
),
sitename="ChainRules",
authors="Jarrett Revels and other contributors",
pages=[
"Introduction" => "index.md",
"FAQ" => "FAQ.md",
"Writing Good Rules" => "writing_good_rules.md",
"Complex Numbers" => "complex.md",
"Deriving Array Rules" => "arrays.md",
"Debug Mode" => "debug_mode.md",
"Gradient Accumulation" => "gradient_accumulation.md",
"Usage in AD" => [
"Overview" => "autodiff/overview.md",
"Operator Overloading" => "autodiff/operator_overloading.md",
],
"Design" => [
"Changing the Primal" => "design/changing_the_primal.md",
"Many Differential Types" => "design/many_differentials.md",
"The AbstractArray Dilemma" => "design/abstract_array_dilemma.md",
],
"API" => "api.md",
],
strict=true,
checkdocs=:exports,
)
deploydocs(
repo = "github.com/JuliaDiff/ChainRulesCore.jl.git",
push_preview=true,
)