Skip to content

Commit 2de1804

Browse files
committed
Merge remote-tracking branch 'refs/remotes/base/master'
Conflicts: Project.toml README.md src/Polynomials.jl src/show.jl test/runtests.jl
2 parents bf03dca + 96017b6 commit 2de1804

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/show.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ types "text/plain" (default), "text/latex", and "text/html" are supported. By
9797
default, the terms are in order of ascending powers, matching the order in
9898
`coeffs(p)`; specifying `descending_powers=true` reverses the order.
9999
`offset` allows for an integer number to be added to the exponent, just for printing.
100+
`var` allows for overriding the variable used for printing.
100101
101102
# Examples
102103
```jldoctest
@@ -108,6 +109,8 @@ julia> printpoly(stdout, Polynomial([2, 3, 1], :z), descending_powers=true, offs
108109
1 + 3*z^-1 + 2*z^-2
109110
julia> printpoly(stdout, Polynomial([-1, 0, 1], :z), offset=-1, descending_powers=true)
110111
z - z^-1
112+
julia> printpoly(stdout, Poly([-1, 0, 1], :z), offset=-1, descending_powers=true, var=:x)
113+
x - x^-1
111114
```
112115
"""
113116
function printpoly(io::IO, p::P, mimetype=MIME"text/plain"(); descending_powers=false, offset::Int=0) where {T,P<:AbstractPolynomial{T}}

0 commit comments

Comments
 (0)