From 53cae5bd83e18d697e18a52f30c8b7802ebd5e4f Mon Sep 17 00:00:00 2001 From: Morten Piibeleht Date: Fri, 3 Jul 2020 18:26:40 +1200 Subject: [PATCH] Use Documenter 0.25 (#53) * Test documenter 0.24 * Use 0.25 * Fix docs/Project.toml --- docs/Project.toml | 2 +- docs/make.jl | 33 ++++++++++++++++++++++++++++++- docs/src/assets/latex.js | 42 ---------------------------------------- 3 files changed, 33 insertions(+), 44 deletions(-) delete mode 100644 docs/src/assets/latex.js diff --git a/docs/Project.toml b/docs/Project.toml index ce87d15..531318e 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -2,4 +2,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" [compat] -Documenter = "~0.21" +Documenter = "0.25" diff --git a/docs/make.jl b/docs/make.jl index b2d6968..2601eb1 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -13,7 +13,38 @@ makedocs( "Other utilities" => "utilities.md", "Internals" => "internals.md", ], - assets = ["assets/latex.js"], + format = Documenter.HTML( + mathengine = MathJax(Dict( + :TeX => Dict( + :equationNumbers => Dict(:autoNumber => "AMS"), + :Macros => Dict( + :defd => "≝", + :ket => ["|#1\\rangle", 1], + :bra => ["\\langle#1|", 1], + :braket => ["\\langle#1|#2\\rangle", 2], + :ketbra => ["|#1\\rangle\\!\\langle#2|", 2], + :matrixel => ["\\langle#1|#2|#3\\rangle", 3], + :vec => ["\\mathbf{#1}", 1], + :mat => ["\\mathsf{#1}", 1], + :conj => ["#1^*", 1], + :im => "\\mathrm{i}", + :operator => ["\\mathfrak{#1}", 1], + :Hamiltonian => "\\operator{H}", + :hamiltonian => "\\operator{h}", + :Lagrangian => "\\operator{L}", + :fock => "\\operator{f}", + :lagrange => ["\\epsilon_{#1}", 1], + :vary => ["\\delta_{#1}", 1], + :onebody => ["(#1|#2)", 2], + :twobody => ["[#1|#2]", 2], + :twobodydx => ["[#1||#2]", 2], + :direct => ["{\\operator{J}_{#1}}", 1], + :exchange => ["{\\operator{K}_{#1}}", 1], + :diff => ["\\mathrm{d}#1\\,", 1] + ) + ) + )) + ) ) deploydocs(repo = "github.com/JuliaAtoms/AtomicLevels.jl.git") diff --git a/docs/src/assets/latex.js b/docs/src/assets/latex.js deleted file mode 100644 index 4330f15..0000000 --- a/docs/src/assets/latex.js +++ /dev/null @@ -1,42 +0,0 @@ -requirejs.config({ - paths: { - 'mathjax': 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML', - }, - shim: { - 'mathjax' : { - exports: "MathJax" - }, - } -}); - -require(['mathjax'], function(MathJax) { - MathJax.Hub.Config({ - TeX: { - Macros: { - defd: "≝", - ket: ["|#1\\rangle",1], - bra: ["\\langle#1|",1], - braket: ["\\langle#1|#2\\rangle",2], - ketbra: ["|#1\\rangle\\!\\langle#2|",2], - matrixel: ["\\langle#1|#2|#3\\rangle",3], - vec: ["\\mathbf{#1}",1], - mat: ["\\mathsf{#1}",1], - conj: ["#1^*",1], - im: "\\mathrm{i}", - operator : ["\\mathfrak{#1}",1], - Hamiltonian : "\\operator{H}", - hamiltonian : "\\operator{h}", - Lagrangian : "\\operator{L}", - fock : "\\operator{f}", - lagrange : ["\\epsilon_{#1}",1], - vary : ["\\delta_{#1}",1], - onebody : ["(#1|#2)",2], - twobody : ["[#1|#2]",2], - twobodydx : ["[#1||#2]",2], - direct : ["{\\operator{J}_{#1}}",1], - exchange : ["{\\operator{K}_{#1}}",1], - diff : ["\\mathrm{d}#1\\,",1] - } - } - }); -})