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} $
标签:latex,ifxxx,rr,text,ttt,xxxxxx,array,用法 来源: https://blog.csdn.net/Chenciyuan_nj/article/details/122030267