Skip to content

Commit 8b8055d

Browse files
authored
Doctests and documentation patch (#571)
* Add lowest_terms doc for site Polynomials.RationalFunction makes a reference to lowest_terms * Add more doctests and syntax highlighting tags * Fix latex syntax in docstrings * Remove names from doctest blocks The named doctest blocks don't share scope and don't need to have the same environment * Fix spacing * Use markdown lists in docstrings * Fix more spacing * Use identity check for nothing-ness * Pull list text into list
1 parent a285740 commit 8b8055d

19 files changed

+276
-287
lines changed

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
44
GR_jll = "d2c73de3-f751-5644-a686-071e5b155ba9"
5+
GenericLinearAlgebra = "14197337-ba66-59df-a3e3-ca00e7dcff7a"
56
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
67
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
78

docs/src/extending.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,24 +283,24 @@ We need to add in the vector-space operations:
283283

284284
```jldoctest new_container_type
285285
julia> function Base.:+(p::AliasPolynomialType{B,T,X}, q::AliasPolynomialType{B,S,X}) where {B,S,T,X}
286-
R = promote_type(T,S)
287-
n = maximum(degree, (p,q))
288-
cs = [p[i] + q[i] for i in 0:n]
289-
AliasPolynomialType{B,R,X}(Val(false), cs) # save a copy
290-
end
286+
R = promote_type(T,S)
287+
n = maximum(degree, (p,q))
288+
cs = [p[i] + q[i] for i in 0:n]
289+
AliasPolynomialType{B,R,X}(Val(false), cs) # save a copy
290+
end
291291
292292
julia> function Base.:-(p::AliasPolynomialType{B,T,X}, q::AliasPolynomialType{B,S,X}) where {B,S,T,X}
293-
R = promote_type(T,S)
294-
n = maximum(degree, (p,q))
295-
cs = [p[i] - q[i] for i in 0:n]
296-
AliasPolynomialType{B,R,X}(Val(false), cs)
297-
end
293+
R = promote_type(T,S)
294+
n = maximum(degree, (p,q))
295+
cs = [p[i] - q[i] for i in 0:n]
296+
AliasPolynomialType{B,R,X}(Val(false), cs)
297+
end
298298
299299
julia> function Base.map(fn, p::P) where {B,T,X,P<:AliasPolynomialType{B,T,X}}
300-
cs = map(fn, p.coeffs)
301-
R = eltype(cs)
302-
AliasPolynomialType{B,R,X}(Val(false), cs)
303-
end
300+
cs = map(fn, p.coeffs)
301+
R = eltype(cs)
302+
AliasPolynomialType{B,R,X}(Val(false), cs)
303+
end
304304
305305
```
306306

0 commit comments

Comments
 (0)