Skip to content

Commit 6675b92

Browse files
use DocumenterCodeBlocks.jl (#313)
Co-authored-by: Joshua Lampert <joshua.lampert@uni-hamburg.de> Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
1 parent 9354d1c commit 6675b92

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
Changelog = "5217a498-cd5d-4ec6-b8c2-9b85a09b6e3e"
33
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
4+
DocumenterCodeBlocks = "b6400b83-267f-4b55-9fd8-bffc853bdfd8"
45
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
56
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
67
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
@@ -11,6 +12,7 @@ TrixiBase = "9a0f1c46-06d5-4909-a5a3-ce25d3fa3284"
1112
[compat]
1213
Changelog = "1"
1314
Documenter = "1"
15+
DocumenterCodeBlocks = "1.0"
1416
OrdinaryDiffEqTsit5 = "1, 2"
1517
Plots = "1.9"
1618
Printf = "1"

docs/make.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Documenter
2+
using DocumenterCodeBlocks: CodeBlocks
23
using DispersiveShallowWater
34
using TrixiBase
45
using Changelog: Changelog
@@ -79,6 +80,9 @@ makedocs(;
7980
assets = ["assets/favicon.ico"],
8081
size_threshold = 1200 * 1024, # the generated .gif files can be too large
8182
size_threshold_warn = 1000 * 1024),
83+
# Improve code blocks in the documentation by using DocumenterCodeBlocks.jl
84+
plugins = [CodeBlocks()],
85+
# Explicitly specify documentation structure
8286
pages = ["Home" => "index.md",
8387
"Overview" => "overview.md",
8488
"Basic Example" => "basic_example.md",

docs/src/basic_example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ More examples sorted by the simulated equations can be found in the [examples/](
158158

159159
Here follows a version of the program without any comments.
160160

161-
```Julia
161+
```julia
162162
using DispersiveShallowWater, OrdinaryDiffEqTsit5
163163

164164
equations = BBMBBMEquations1D(bathymetry_type = bathymetry_variable, gravity = 9.81)

src/equations/hyperbolic_sainte_marie_1d.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
88
Hyperbolic approximation of the Sainte-Marie system
99
[`SainteMarieEquations1D`](@ref) in one spatial dimension
10-
(with parameter ``\gamma = 2`` compared to the original literature)
1110
derived by Escalante, Dumbser and Castro (2019).
12-
The equations are given by
11+
The equations (with parameter ``\gamma = 2`` compared to the original literature)
12+
are given by
1313
```math
1414
\begin{aligned}
1515
h_t + (h v)_x &= 0,\\

src/solver.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ end
7676
"""
7777
Solver(D1, D2 = nothing, D3 = nothing)
7878
79-
Create a solver, where `D1` is an `AbstractDerivativeOperator`
79+
Create a solver given the three summation-by-parts (SBP) first-, second-, and third-derivative operators
80+
`D1`, `D2`, and `D3`.
81+
`D1` is an `AbstractDerivativeOperator`
8082
from [SummationByPartsOperators.jl](https://github.com/ranocha/SummationByPartsOperators.jl)
8183
of first `derivative_order`, `D2` is an `AbstractDerivativeOperator`
8284
of second `derivative_order` or an `AbstractMatrix`, and `D3` is an `AbstractDerivativeOperator`

0 commit comments

Comments
 (0)