Forgot password
 Register account
View 1401|Reply 2

矩阵里能不能把几个元素框起来?

[Copy link]

414

Threads

1641

Posts

15

Reputation

Show all posts

abababa posted 2020-3-26 19:34 |Read mode
如题,比如有矩阵
\[\begin{bmatrix}
a_1 & a_2 & a_3\\
a_4 & a_5 & a_6\\
a_7 & a_8 & a_9
\end{bmatrix}\]

现在想把$a_1$框起来,就是在$a_1$周围都加上虚线或实线等等的一个方框,这个要怎么做?或者是把左上角的$2 \times 2$部分框起来。

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2020-3-26 20:37
我只会用 tikz 画起来 两种方式,一是像 forum.php?mod=viewthread&tid=5069 那样搞个 tikzmark 来标记两点再画框,二是将整个矩阵改用 tikz 来画。

414

Threads

1641

Posts

15

Reputation

Show all posts

original poster abababa posted 2020-3-28 18:31
回复 2# kuing

谢谢,那个帖子在发这帖之前就看了,感觉不太符合这种直接的使用。
本帖问题最终我采用了给文字加颜色的方法做的,也能标识出来,但还是觉得能加框最好,分块矩阵等等很多地方都常用这类功能,要是能在原来的命令begin{xxx-matrix}里提供就好了,比如这样的:
  1. \begin{bmatrix}
  2. ...
  3. \border[实线虚线、颜色粗细等等参数]{1,1}{1,2}{2,1}{2,2}
  4. \end{bmatrix}
Copy the Code
用那个 border 把要求的元素框起来,这样就最好了

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-20 06:11 GMT+8

Powered by Discuz!

Processed in 0.015841 seconds, 22 queries