Skip to content

Commit 8d1e65d

Browse files
authored
Merge pull request #321 from JuliaReach/schillic/bibliography
Use `DocumenterCitations` for bibliography
2 parents fe6922f + fb33359 commit 8d1e65d

File tree

6 files changed

+38
-6
lines changed

6 files changed

+38
-6
lines changed

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
34
LazySets = "b4f0291d-fe17-52bc-9479-3d1a343d9043"
45

56
[compat]
67
Documenter = "1"
8+
DocumenterCitations = "1.3"
79
LazySets = "2, 3"

docs/make.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
using Documenter, MathematicalSystems
1+
using Documenter, MathematicalSystems, DocumenterCitations
22
import LazySets
33

44
DocMeta.setdocmeta!(MathematicalSystems, :DocTestSetup,
55
:(using MathematicalSystems); recursive=true)
66

7+
bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib"); style=:alpha)
8+
79
makedocs(; sitename="MathematicalSystems.jl",
810
modules=[MathematicalSystems],
911
format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true",
10-
assets=["assets/aligned.css"], size_threshold_warn=150 * 2^10),
12+
assets=["assets/aligned.css", "assets/citations.css"],
13+
size_threshold_warn=150 * 2^10),
1114
pagesonly=true,
15+
plugins=[bib],
1216
pages=["Home" => "index.md",
1317
"Manual" => Any["Overview of System Types" => "man/systems.md"],
1418
"Library" => Any["Types" => "lib/types.md",
1519
"Methods" => "lib/methods.md",
1620
"Internals" => "lib/internals.md"],
21+
"Bibliography" => "bibliography.md",
1722
"About" => "about.md"])
1823

1924
deploydocs(; repo="github.com/JuliaReach/MathematicalSystems.jl.git",

docs/src/assets/citations.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.citation dl {
2+
display: grid;
3+
grid-template-columns: max-content auto; }
4+
.citation dt {
5+
grid-column-start: 1; }
6+
.citation dd {
7+
grid-column-start: 2;
8+
margin-bottom: 0.75em; }
9+
.citation ul {
10+
padding: 0 0 2.25em 0;
11+
margin: 0;
12+
list-style: none !important;}
13+
.citation ul li {
14+
text-indent: -2.25em;
15+
margin: 0.33em 0.5em 0.5em 2.25em;}
16+
.citation ol li {
17+
padding-left:0.75em;}

docs/src/bibliography.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Bibliography
2+
3+
```@bibliography
4+
```

docs/src/refs.bib

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@book{Sontag13,
2+
title={Mathematical control theory: deterministic finite dimensional systems},
3+
author={Sontag, Eduardo D},
4+
volume={6},
5+
year={2013},
6+
publisher={Springer Science \& Business Media}
7+
}

src/abstract.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Determines whether the dynamics of system `s` is specified by linear equations.
129129
130130
### Notes
131131
132-
We adopt the notion from [Section 2.7, 1]. For example, the system with inputs
132+
We adopt the notion from [Sontag13; Section 2.7](@citet). For example, the system with inputs
133133
``x' = f(t, x, u) = A x + B u`` is linear, since the function ``f(t, ⋅, ⋅)`` is
134134
linear in ``(x, u)`` for each ``t ∈ \\mathbb{R}``. On the other hand,
135135
``x' = f(t, x, u) = A x + B u + c`` is affine but not linear, since it is not
@@ -139,9 +139,6 @@ The result of this function only depends on the system type, not the value, and
139139
can also be applied to `typeof(s)`. So, if a system type allows an instance that
140140
is not linear, it returns `false` by default. For example, polynomial systems
141141
can be nonlinear; hence `islinear` returns `false`.
142-
143-
[1] Sontag, Eduardo D. *Mathematical control theory: deterministic finite dimensional
144-
systems.* Vol. 6. Springer Science & Business Media, 2013.
145142
"""
146143
function islinear(::AbstractSystem) end
147144

0 commit comments

Comments
 (0)