diff --git a/.gitignore b/.gitignore index b16eb018..ec2f89bc 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ *.jld2 *.json !.zenodo.json +!.markdownlint.json # System-specific files and directories generated by the BinaryProvider and BinDeps packages # They contain absolute paths specific to the host computer, and so should not be committed diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 00000000..c4960442 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,4 @@ +{ + "MD046": false, + "MD013": false +} \ No newline at end of file diff --git a/docs/make.jl b/docs/make.jl index f69c1704..fc08a7e9 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -129,8 +129,6 @@ Draft = false =# makedocs(; draft=false, - #draft=true, - #warnonly=[:cross_references, :autodocs_block], sitename="OptimalControl.jl", format=Documenter.HTML(; repolink="https://" * repo_url, @@ -141,6 +139,7 @@ makedocs(; assets=[ asset("https://control-toolbox.org/assets/css/documentation.css"), asset("https://control-toolbox.org/assets/js/documentation.js"), + "assets/custom.css", ], ), pages=[ diff --git a/docs/src/assets/Manifest.toml b/docs/src/assets/Manifest.toml index 38d140e8..5b99b680 100644 --- a/docs/src/assets/Manifest.toml +++ b/docs/src/assets/Manifest.toml @@ -1677,7 +1677,7 @@ version = "0.5.6+0" deps = ["ADNLPModels", "CTBase", "CTDirect", "CTFlows", "CTModels", "CTParser", "CommonSolve", "DocStringExtensions", "ExaModels"] path = "/Users/ocots/Research/logiciels/dev/control-toolbox/OptimalControl" uuid = "5f98b655-cc9a-415a-b60e-744165666948" -version = "1.1.2" +version = "1.1.3" [[deps.Opus_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] diff --git a/docs/src/assets/custom.css b/docs/src/assets/custom.css new file mode 100644 index 00000000..4bc1dbcf --- /dev/null +++ b/docs/src/assets/custom.css @@ -0,0 +1,36 @@ +/* Responsive layout for two-column content */ +.responsive-columns-left-priority { + display: flex; + gap: 1rem; + align-items: flex-start; + margin-bottom: 1em; +} + +.responsive-columns-left-priority > div { + flex: 1; + min-width: 0; + transition: opacity 0.5s ease-in-out, flex 0.5s ease-in-out, max-width 0.5s ease-in-out, max-height 0.5s ease-in-out; +} + +.responsive-columns-left-priority > div:last-child { + opacity: 1; + max-width: 100%; + max-height: none; +} + +/* Media query for screens smaller than 700px */ +@media (max-width: 700px) { + .responsive-columns-left-priority > div:last-child { + opacity: 0; + max-width: 0; + max-height: 0; + flex: 0 0 0; + overflow: hidden; + margin: 0; + padding: 0; + } + + .responsive-columns-left-priority > div:first-child { + flex: 1 1 100%; + } +} \ No newline at end of file diff --git a/docs/src/example-double-integrator-energy.md b/docs/src/example-double-integrator-energy.md index c6b078ec..98857b88 100644 --- a/docs/src/example-double-integrator-energy.md +++ b/docs/src/example-double-integrator-energy.md @@ -13,8 +13,7 @@ We assume that the mass is constant and equal to one, and that there is no frict \dot x_1(t) = x_2(t), \quad \dot x_2(t) = u(t),\quad u(t) \in \R, ``` -which is simply the [double integrator](https://en.wikipedia.org/w/index.php?title=Double_integrator&oldid=1071399674) system. -Let us consider a transfer starting at time $t_0 = 0$ and ending at time $t_f = 1$, for which we want to minimise the transfer energy +which is simply the [double integrator](https://en.wikipedia.org/w/index.php?title=Double_integrator&oldid=1071399674) system. Let us consider a transfer starting at time $t_0 = 0$ and ending at time $t_f = 1$, for which we want to minimise the transfer energy ```math \frac{1}{2}\int_{0}^{1} u^2(t) \, \mathrm{d}t @@ -22,9 +21,7 @@ Let us consider a transfer starting at time $t_0 = 0$ and ending at time $t_f = starting from $x(0) = (-1, 0)$ and aiming to reach the target $x(1) = (0, 0)$. -First, we need to import the [OptimalControl.jl](https://control-toolbox.org/OptimalControl.jl) package to define the -optimal control problem, [NLPModelsIpopt.jl](https://jso.dev/NLPModelsIpopt.jl) to solve it, -and [Plots.jl](https://docs.juliaplots.org) to visualise the solution. +First, we need to import the [OptimalControl.jl](https://control-toolbox.org/OptimalControl.jl) package to define the optimal control problem, [NLPModelsIpopt.jl](https://jso.dev/NLPModelsIpopt.jl) to solve it, and [Plots.jl](https://docs.juliaplots.org) to visualise the solution. ```@example main using OptimalControl @@ -36,6 +33,11 @@ using Plots Let us define the problem with the [`@def`](@ref) macro: +```@raw html +