Skip to content

Commit 7e6cc17

Browse files
authored
add Base.print method with compact display; close issue #283 (#285)
* add Base.print method with compact display * version bump
1 parent cd8ced2 commit 7e6cc17

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "Polynomials"
22
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
33
license = "MIT"
44
author = "JuliaMath"
5-
version = "1.1.10"
5+
version = "1.1.11"
66

77
[deps]
88
Intervals = "d8418881-c3e1-53bb-8760-2df7ec849ed5"

src/show.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ function Base.show(io::IO, mimetype::MIME"text/html", p::AbstractPolynomial)
6767
printpoly(io, p, mimetype)
6868
end
6969

70+
# print uses compact representation
71+
Base.print(io::IO, p::AbstractPolynomial) = printpoly(io, p, MIME("text/plain"), compact=true)
72+
7073
#####
7174

7275
"Show different operations depending on mimetype. `l-` is leading minus sign."

0 commit comments

Comments
 (0)