latex array用法

$\begin{array}{*{3}{rlr}}
	-xxxxxx & \text{ifxxx } x < 0, & xxxxxa &ss &ww &ggg\\
	0xxxxxx & \text{ifxxxxx } x = 0, & ddxxxxx&rr&ttt&ttttt\\
	xxxxxx & \text{ifxxx } x > 0.& ddxxxxxd&ttt&rr&t
\end{array} $

*{3}连在一起用,表示前3列
{rlr}表示前三列分别右对齐、左对齐、右对齐
在这里插入图片描述
若3改为5,格式还不变

$\begin{array}{*{5}{rlr}}
	-xxxxxx & \text{ifxxx } x < 0, & xxxxxa &ss &ww &ggg\\
	0xxxxxx & \text{ifxxxxx } x = 0, & ddxxxxx&rr&ttt&ttttt\\
	xxxxxx & \text{ifxxx } x > 0.& ddxxxxxd&ttt&rr&t
\end{array} $

在这里插入图片描述
若格式也改变

$\begin{array}{*{5}{rlcrr}}
	-xxxxxx & \text{ifxxx } x < 0, & xxxxxa &ss &ww &ggg\\
	0xxxxxx & \text{ifxxxxx } x = 0, & ddxxxxx&rr&ttt&ttttt\\
	xxxxxx & \text{ifxxx } x > 0.& ddxxxxxd&ttt&rr&t
\end{array} $

在这里插入图片描述


版权声明:本文为Chenciyuan_nj原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
THE END
< <上一篇
下一篇>>