Skip to content

Commit

Permalink
Biblio with DocumenterBibliography (#390)
Browse files Browse the repository at this point in the history
* Biblio with DocumenterBibliography

* Remove extra line

* Use const

* Fix

* Fix

* Fix

* Fix format
  • Loading branch information
blegat authored Nov 8, 2024
1 parent e885a31 commit 33bfbf6
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 7 deletions.
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Clarabel = "61c947e1-3e6d-4ee4-985a-eec8c727bd6e"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Dionysos = "d92c97cf-b87d-42c1-a9c0-25df00b4d958"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
GLPK = "60bf3e95-4087-53dc-ae20-288a0d20c6a6"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
Expand Down Expand Up @@ -33,4 +34,5 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Documenter = "1"
DocumenterCitations = "1"
Libtiff_jll = "4.4.0"
15 changes: 14 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Dionysos
using Documenter, Literate
import DocumenterCitations

const EXAMPLES_SOLVERS_DIR = joinpath(@__DIR__, "src", "examples", "solvers")
const EXAMPLES_UTILS_DIR = joinpath(@__DIR__, "src", "examples", "utils")
Expand Down Expand Up @@ -46,20 +47,32 @@ const _PAGES = [
end,
"Developer Docs" =>
["Set up" => "developers/setup.md", "Git" => "developers/git.md"],
"Bibliography" => "bibliography.md",
]

const BIBLIO = DocumenterCitations.CitationBibliography(
joinpath(@__DIR__, "src", "references.bib");
style = :authoryear,
)

makedocs(;
sitename = "Dionysos",
# See https://github.com/JuliaDocs/Documenter.jl/issues/868
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", nothing) == "true",
assets = ["assets/extra_styles.css"],
assets = ["assets/extra_styles.css", "assets/citations.css"],
),
pages = _PAGES,
# The following ensures that we only include the docstrings from
# this module for functions defined in Base that we overwrite.
# It also errors in case we don't include a docstring in the docs
modules = [Dionysos],
plugins = [
DocumenterCitations.CitationBibliography(
joinpath(@__DIR__, "src", "references.bib");
style = :authoryear,
),
],
)

deploydocs(; repo = "github.com/dionysos-dev/Dionysos.jl.git", push_preview = true)
17 changes: 17 additions & 0 deletions docs/src/assets/citations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.citation dl {
display: grid;
grid-template-columns: max-content auto; }
.citation dt {
grid-column-start: 1; }
.citation dd {
grid-column-start: 2;
margin-bottom: 0.75em; }
.citation ul {
padding: 0 0 2.25em 0;
margin: 0;
list-style: none !important;}
.citation ul li {
text-indent: -2.25em;
margin: 0.33em 0.5em 0.5em 2.25em;}
.citation ol li {
padding-left:0.75em;}
4 changes: 4 additions & 0 deletions docs/src/bibliography.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Bibliography

```@bibliography
```
8 changes: 2 additions & 6 deletions docs/src/examples/solvers/Path planning.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using Test #src
#md # [![Binder](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/generated/Path planning.ipynb)
#md # [![nbviewer](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](@__NBVIEWER_ROOT_URL__/generated/Path planning.ipynb)
#
# This example was borrowed from [1, IX. Examples, A] whose dynamics comes from the model given in [2, Ch. 2.4].
# This example was borrowed from [reissig2016feedback; IX. Examples, A](@cite) whose dynamics comes from the model given in [aastrom2007feedback; Ch. 2.4](@cite).
# This is a **reachability problem** for a **continuous system**.
#
# Let us consider the 3-dimensional state space control system of the form
Expand All @@ -24,7 +24,7 @@ using Test #src
# In order to study the concrete system and its symbolic abstraction in a unified framework, we will solve the problem
# for the sampled system with a sampling time $\tau$.
# For the construction of the relations in the abstraction, it is necessary to over-approximate attainable sets of
# a particular cell. In this example, we consider the used of a growth bound function [1, VIII.2, VIII.5] which is one of the possible methods to over-approximate
# a particular cell. In this example, we consider the used of a growth bound function [reissig2016feedback; VIII.2, VIII.5](@cite) which is one of the possible methods to over-approximate
# attainable sets of a particular cell based on the state reach by its center.
#
# For this reachability problem, the abstraction controller is built by solving a fixed-point equation which consists in computing the pre-image
Expand Down Expand Up @@ -162,7 +162,3 @@ plot!(

# We display the concrete trajectory
plot!(control_trajectory; ms = 0.5)

# ### References
# 1. G. Reissig, A. Weber and M. Rungger, "Feedback Refinement Relations for the Synthesis of Symbolic Controllers," in IEEE Transactions on Automatic Control, vol. 62, no. 4, pp. 1781-1796.
# 2. K. J. Aström and R. M. Murray, Feedback systems. Princeton University Press, Princeton, NJ, 2008.
20 changes: 20 additions & 0 deletions docs/src/references.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@article{reissig2016feedback,
title={Feedback refinement relations for the synthesis of symbolic controllers},
author={Reissig, Gunther and Weber, Alexander and Rungger, Matthias},
journal={IEEE Transactions on Automatic Control},
volume={62},
number={4},
pages={1781--1796},
year={2016},
publisher={IEEE},
doi={10.1109/CDC.2014.7039364}
}

@article{aastrom2007feedback,
title={Feedback systems},
author={{\AA}str{\"o}m, Karl Johan and Murray, Richard M},
journal={An Introduction for Scientists and Engineers, Karl Johan Astr{\"o}m and Richard M Murray},
pages={27--64},
year={2007},
publisher={Citeseer}
}

0 comments on commit 33bfbf6

Please sign in to comment.