Skip to content

Commit ae057d9

Browse files
authored
Issue248 (#249)
* address use of bmatrix
1 parent 9680c51 commit ae057d9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/display.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@ show(io::IO, ::MIME"text/latex", x::Sym) = print(io, latex(x, mode="equation*"))
6161
function show(io::IO, ::MIME"text/latex", x::AbstractArray{Sym})
6262
function toeqnarray(x::Vector{Sym})
6363
a = join([latex(x[i]) for i in 1:length(x)], "\\\\")
64-
"\\begin{bmatrix}$a\\end{bmatrix}"
64+
"""\\[ \\left[ \\begin{array}{r}$a\\end{array} \\right] \\]"""
65+
# "\\begin{bmatrix}$a\\end{bmatrix}"
6566
end
6667
function toeqnarray(x::AbstractArray{Sym,2})
6768
sz = size(x)
6869
a = join([join(map(latex, x[i,:]), "&") for i in 1:sz[1]], "\\\\")
69-
"\\begin{bmatrix}$a\\end{bmatrix}"
70+
"\\[\\left[ \\begin{array}{" * repeat("r",sz[2]) * "}" * a * "\\end{array}\\right]\\]"
71+
# "\\begin{bmatrix}$a\\end{bmatrix}"
7072
end
7173
print(io, toeqnarray(x))
7274
end

0 commit comments

Comments
 (0)