Live editor - Latex equation - Vertical line separating matrix columns
35 次查看(过去 30 天)
显示 更早的评论
How to create a vertical line separaing matrix columns in the Latex equation in the Live Editor? Like for example:
![eq1.gif](https://www.mathworks.com/matlabcentral/answers/uploaded_files/216763/eq1.gif)
The horizontal line can be created by "\hline", but the vertical line specified in the column alignment argument does not work:
\left( \begin{array}{c|cc} 1 & 2 & 3 \\ \hline 4 & 5 & 6 \\ 7 & 8 & 9 \end{array} \right)
![eq2.GIF](https://www.mathworks.com/matlabcentral/answers/uploaded_files/216764/eq2.gif)
"\vline" does not work neither:
\left( \begin{array}{cccc} 1 & \vline & 2 & 3 \\ \hline 4 & \vline & 5 & 6 \\ 7 & \vline & 8 & 9 \end{array} \right)
![eq3.GIF](https://www.mathworks.com/matlabcentral/answers/uploaded_files/216765/eq3.gif)
2 个评论
Subhadeep Koley
2020-2-16
@ Pavel Trnka, acoording to the documentation of Live Editor only \hline is supported. \vline is not mentioned in the list of supported LaTeX commands. The below workaround generates broken vertical lines. Try it that works!
\left( \begin{array}{ccc} 1 \vert & 2 & 3 \\ \hline 4 \vert & 5 & 6 \\ 7 \vert & 8 & 9 \end{array} \right)
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 LaTeX 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!