@@ -2,6 +2,7 @@ using QuantumControl
2
2
using QuantumPropagators
3
3
using Krotov
4
4
using Documenter
5
+ using Documenter. HTMLWriter: KaTeX
5
6
using DocumenterCitations
6
7
using DocumenterInterLinks
7
8
using Pkg
@@ -22,6 +23,17 @@ if endswith(VERSION, "dev")
22
23
DEV_OR_STABLE = " dev/"
23
24
end
24
25
26
+
27
+ function org_inv (pkgname)
28
+ objects_inv =
29
+ joinpath (@__DIR__ , " .." , " .." , " $pkgname .jl" , " docs" , " build" , " objects.inv" )
30
+ if isfile (objects_inv)
31
+ return (" https://juliaquantumcontrol.github.io/$pkgname .jl/dev/" , objects_inv,)
32
+ else
33
+ return " https://juliaquantumcontrol.github.io/$pkgname .jl/$DEV_OR_STABLE "
34
+ end
35
+ end
36
+
25
37
links = InterLinks (
26
38
" Julia" => (
27
39
" https://docs.julialang.org/en/v1/" ,
@@ -32,9 +44,9 @@ links = InterLinks(
32
44
" https://github.com/KristofferC/TimerOutputs.jl" ,
33
45
joinpath (@__DIR__ , " src" , " inventories" , " TimerOutputs.toml" )
34
46
),
35
- " QuantumPropagators" => " https://juliaquantumcontrol.github.io/ QuantumPropagators.jl/ $DEV_OR_STABLE " ,
36
- " QuantumControl" => " https://juliaquantumcontrol.github.io/ QuantumControl.jl/ $DEV_OR_STABLE " ,
37
- " GRAPE" => " https://juliaquantumcontrol.github.io/ GRAPE.jl/ $DEV_OR_STABLE " ,
47
+ " QuantumPropagators" => org_inv ( " QuantumPropagators" ) ,
48
+ " QuantumControl" => org_inv ( " QuantumControl" ) ,
49
+ " GRAPE" => org_inv ( " GRAPE" ) ,
38
50
" Examples" => " https://juliaquantumcontrol.github.io/QuantumControlExamples.jl/$DEV_OR_STABLE " ,
39
51
" ComponentArrays" => (
40
52
" https://jonniedie.github.io/ComponentArrays.jl/stable/" ,
@@ -79,7 +91,17 @@ makedocs(;
79
91
),
80
92
],
81
93
size_threshold_ignore= [" externals.md" ],
82
- mathengine= KaTeX (),
94
+ mathengine= KaTeX (
95
+ Dict (
96
+ :macros => Dict (
97
+ " \\ Op" => " \\ hat{#1}" ,
98
+ " \\ ket" => " \\ vert#1\\ rangle" ,
99
+ " \\ bra" => " \\ langle#1\\ vert" ,
100
+ " \\ Im" => " \\ operatorname{Im}" ,
101
+ " \\ Re" => " \\ operatorname{Re}" ,
102
+ ),
103
+ ),
104
+ ),
83
105
footer= " [$NAME .jl]($GITHUB ) v$VERSION docs powered by [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl)." ,
84
106
),
85
107
pages= PAGES,
0 commit comments