ps怎么画横线

1个回答

写回答

菠菜1

2022-01-21 05:21

+ 关注

可以使用以下几种方式来画横线:

1. 使用矩阵环境:

latex

\begin{matrix}

\vdots & \vdots & \vdots \\

\hline

x_1 & x_2 & x_3 \\

\vdots & \vdots & \vdots

\end{matrix}

2. 使用rule命令:

latex

abc\rule[-1.2ex]{2em}{0.4pt}def

其中,-1.2ex表示下移1.2ex(单位为ex),2em表示长度为2em,0.4pt表示线宽为0.4pt。

3. 使用hrulefill命令:

latex

abc\hspace{1em}\hrulefill\hspace{1em}def

其中,\hrulefill命令会填满剩余空间。

4. 使用makebox命令:

latex

abc\makebox[2cm][c]{\hrulefill}def

其中,2cm表示长度为2cm,c表示居中对齐。

5. 使用tabular环境:

latex

\begin{tabular}{ccc}

x_1 & x_2 & x_3 \\

\cline{2-3}

\end{tabular}

其中,\cline{2-3}表示从第2列到第3列画线。

这些方法可以根据需要选择适合的画横线方式。

举报有用(17分享收藏

Copyright © 2025 IZhiDa.com All Rights Reserved.

知答 版权所有 粤ICP备2023042255号