Skip to content

Commit

Permalink
Improve latex print
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Aug 21, 2024
1 parent 37d9cf3 commit d00fbd4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,17 @@ end

function _show(io::IO, mime::MIME, p::Polynomial{B}) where {B}
if B != Monomial
print(io, B)
if mime isa MIME"text/latex"
print(io, "\\text{")
end
if B == Chebyshev
print(io, "Cheby")
else
print(io, B)
end
if mime isa MIME"text/latex"
print(io, "}")
end
print(io, "(")
end
print(io, SA.trim_LaTeX(mime, sprint(show, mime, p.monomial)))
Expand Down

0 comments on commit d00fbd4

Please sign in to comment.