From 3a5b1cb650d763e231205294b1d60df600c9a6d9 Mon Sep 17 00:00:00 2001 From: schillic Date: Sat, 25 Jan 2025 20:22:48 +0100 Subject: [PATCH 1/2] fix some issues in docs --- docs/src/about.md | 2 +- docs/src/examples/examples.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/about.md b/docs/src/about.md index 6d9a6fb..c6e1b56 100644 --- a/docs/src/about.md +++ b/docs/src/about.md @@ -36,7 +36,7 @@ To run the unit tests locally, you can do: ```julia julia> using Pkg -julia> Pkg.test("ReachabilityBase") +julia> Pkg.test("SpaceExParser") ``` We also advise adding new unit tests when adding new features to ensure diff --git a/docs/src/examples/examples.md b/docs/src/examples/examples.md index 0ee8def..74dae74 100644 --- a/docs/src/examples/examples.md +++ b/docs/src/examples/examples.md @@ -20,10 +20,10 @@ The examples consist of single hybrid automata that are constructed via flatteni However, note that the flattening process changes the original model and may induce parsing errors. The parsing errors only appear when the constructed model is visualized/analyzed with the Model Editor or/and the Web Interface. There are no parsing errors with the source code/executable SpaceEx. A list of identified parsing problems follows below. -1. Special symbols, e.g. ~, _ in the variable and location names +1. Special symbols, e.g. `~`, `_` in the variable and location names 2. Special characters, e.g. Greek or Russian letters -3. Nondeterministic flows, e.g. x'==x+w1, where 0 Date: Sat, 25 Jan 2025 20:22:57 +0100 Subject: [PATCH 2/2] use DocumenterCitations for bibliography --- docs/Project.toml | 2 ++ docs/make.jl | 8 ++++++-- docs/src/assets/citations.css | 17 +++++++++++++++++ docs/src/bibliography.md | 4 ++++ docs/src/index.md | 8 +++----- docs/src/refs.bib | 13 +++++++++++++ 6 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 docs/src/assets/citations.css create mode 100644 docs/src/bibliography.md create mode 100644 docs/src/refs.bib diff --git a/docs/Project.toml b/docs/Project.toml index 0aee1b2..8be338f 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,9 +1,11 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" LazySets = "b4f0291d-fe17-52bc-9479-3d1a343d9043" SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" [compat] Documenter = "1" +DocumenterCitations = "1.3" LazySets = "3" SymEngine = "0.11, 0.12" diff --git a/docs/make.jl b/docs/make.jl index e9a8556..e66dc2d 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,17 +1,21 @@ -using Documenter, SpaceExParser +using Documenter, SpaceExParser, DocumenterCitations DocMeta.setdocmeta!(SpaceExParser, :DocTestSetup, :(using SpaceExParser); recursive=true) +bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib"); style=:alpha) + makedocs(; sitename="SpaceExParser.jl", modules=[SpaceExParser], format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true", - assets=["assets/aligned.css"]), + assets=["assets/aligned.css", "assets/citations.css"]), pagesonly=true, + plugins=[bib], pages=["Home" => "index.md", "Examples" => Any["Introduction" => "examples/examples.md", "Bouncing ball" => "examples/bball.md"], "Library" => Any["Types" => "lib/types.md", "Methods" => "lib/methods.md"], + "Bibliography" => "bibliography.md", "About" => "about.md"]) deploydocs(; repo="github.com/JuliaReach/SpaceExParser.jl.git", diff --git a/docs/src/assets/citations.css b/docs/src/assets/citations.css new file mode 100644 index 0000000..b0c6326 --- /dev/null +++ b/docs/src/assets/citations.css @@ -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;} diff --git a/docs/src/bibliography.md b/docs/src/bibliography.md new file mode 100644 index 0000000..a987675 --- /dev/null +++ b/docs/src/bibliography.md @@ -0,0 +1,4 @@ +# Bibliography + +```@bibliography +``` diff --git a/docs/src/index.md b/docs/src/index.md index 9d02ec0..4d84902 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -2,11 +2,9 @@ `SpaceExParser` is a [Julia](http://julialang.org) package to read SpaceEx model files. -The SpaceEx modeling language (SpaceExParser) is a format for the mathematical description -of hybrid dynamical systems. It has been described in -[The SpaceEx Modeling Language](http://spaceex.imag.fr/sites/default/files/spaceex_modeling_language_0.pdf), -Scott Cotton, Goran Frehse, Olivier Lebeltel. See also [An Introduction to SpaceEx](http://spaceex.imag.fr/sites/default/files/introduction_to_spaceex_0.pdf), -Goran Frehse, 2010. +The SpaceEx modeling language (SpaceExParser) is a format for the mathematical +description of hybrid dynamical systems. It has been described in [CottonFL10](@citet). +See also [Frehse10](@citet). A visual model editor is available for download on the [SpaceEx website](http://spaceex.imag.fr/download-6). See the examples in this documentation for screenshots and further details. diff --git a/docs/src/refs.bib b/docs/src/refs.bib new file mode 100644 index 0000000..2004e59 --- /dev/null +++ b/docs/src/refs.bib @@ -0,0 +1,13 @@ +@misc{CottonFL10, + author = {Cotton, Scott and Frehse, Goran and Lebeltel, Olivier}, + title = {The {SpaceEx} modeling language}, + year = {2010}, + url = {http://spaceex.imag.fr/sites/default/files/spaceex_modeling_language_0.pdf} +} + +@misc{Frehse10, + author = {Frehse, Goran}, + title = {An Introduction to {SpaceEx} v0.8}, + year = {2010}, + url = {http://spaceex.imag.fr/sites/default/files/introduction_to_spaceex_0.pdf} +}