Question: few issues with Latex in LinearAlgebra

I assume the goal is to have the Latex output close to the screen output in Maple. In these examples this is the case.

Example 1

restart;
A:=Matrix([[1,-1,0,2],[1,2,2,-2],[0,2,3,-1]]):
LinearAlgebra:-NullSpace(A)

But the Latex generated for the above, using the Latex() command is

\{ \left[\begin{array}{c}0 \\2 \\-1 \\1 \end{array}\right] \} 

Which when compiled

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\[
\{ \left[\begin{array}{c}0 \\2 \\-1 \\1 \end{array}\right] \} 
\]
\end{document}

gives

The latex should instead be 

\left\{ \left[\begin{array}{c}0 \\2 \\-1 \\1 \end{array}\right] \right\} 

Which compiles to

Example 2

restart;
A:=Matrix([[1,-1,0,2],[1,2,2,-2],[0,2,3,-1]]):
LinearAlgebra:-RowSpace(A)

The Latex of the above is 

[\left[\begin{array}{cccc}1 & 0 & 0 & 0 \end{array}\right], 
\left[\begin{array}{cccc}0 & 1 & 0 & -2 \end{array}\right], 
\left[\begin{array}{cccc}0 & 0 & 1 & 1 \end{array}\right]]

Which when compiled gives

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\[
[\left[\begin{array}{cccc}1 & 0 & 0 & 0 \end{array}\right], 
\left[\begin{array}{cccc}0 & 1 & 0 & -2 \end{array}\right], 
\left[\begin{array}{cccc}0 & 0 & 1 & 1 \end{array}\right]]
\]  
\end{document}

gives

A better Latex would be

\left[\left[\begin{array}{cccc}1 & 0 & 0 & 0 \end{array}\right], 
\left[\begin{array}{cccc}0 & 1 & 0 & -2 \end{array}\right], 
\left[\begin{array}{cccc}0 & 0 & 1 & 1 \end{array}\right]\right]

Which compiles to

Now the size of the [[ is the same on both ends.

example 3

restart;
A:=Matrix([[1,-1,0,2],[1,2,2,-2],[0,2,3,-1]]):
LinearAlgebra:-ColumnSpace(A)

The Latex given for the above is

[\left[\begin{array}{c}1 \\0 \\0 \end{array}\right], 
\left[\begin{array}{c}0 \\1 \\0 \end{array}\right], 
\left[\begin{array}{c}0 \\0 \\1 \end{array}\right]]

Which when compiled

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\[
[\left[\begin{array}{c}1 \\0 \\0 \end{array}\right], 
\left[\begin{array}{c}0 \\1 \\0 \end{array}\right], 
\left[\begin{array}{c}0 \\0 \\1 \end{array}\right]]
\]  
\end{document}

gives

A better Latex is

\left[\left[\begin{array}{c}1 \\0 \\0 \end{array}\right], 
\left[\begin{array}{c}0 \\1 \\0 \end{array}\right], 
\left[\begin{array}{c}0 \\0 \\1 \end{array}\right]\right]

Which compiles to 

Maple 2020.2 with Physics  891 

Please Wait...