这个问题是从帖子中找到的这里如何移动水平虚线,使其稍微远离上标“T”?此外,当移动这条水平线时,如何水平对齐所有三条水平虚线?这是从原始链接中找到的解决方案代码:
\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}
\begin{document}
\begin{equation}
\left[
\begin{array}{c;{2pt/2pt}c}
N & B_i \\ \hdashline[2pt/2pt]
B_i^T & 0
\end{array}
\right]
\left[
\begin{array}{c}
x_i \\ \hdashline[2pt/2pt]
k
\end{array}
\right]
=\left[
\begin{array}{c}
n \\ \hdashline[2pt/2pt]
0
\end{array}
\right]
\text{ with } n = A^TPl
\end{equation}
\end{document}
答案1
改变\arraystretch
:
\renewcommand{\arraystretch}{1.4} %% adjsut as you wish
代码:
\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}
\begin{document}
\begin{equation}
\renewcommand{\arraystretch}{1.4}
\left[
\begin{array}{c;{2pt/2pt}c}
N & B_i \\ \hdashline[2pt/2pt]
B_i^T & 0
\end{array}
\right]
\left[
\begin{array}{c}
x_i \\ \hdashline[2pt/2pt]
k
\end{array}
\right]
=\left[
\begin{array}{c}
n \\ \hdashline[2pt/2pt]
0
\end{array}
\right]
\text{ with } n = A^TPl
\end{equation}
\end{document}
您还可以定义\strut
自己的
\newcommand{\mystrut}{\rule{0pt}{2.5ex}}
并像使用它一样
\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}
\newcommand{\mystrut}{\rule{0pt}{2.5ex}}
\begin{document}
\begin{equation}
%\renewcommand{\arraystretch}{1.4}
\left[
\begin{array}{c;{2pt/2pt}c}
N & B_i \\ \hdashline[2pt/2pt]
\mystrut B_i^T & 0
\end{array}
\right]
\left[
\begin{array}{c}
x_i \\ \hdashline[2pt/2pt]
\mystrut k
\end{array}
\right]
=\left[
\begin{array}{c}
n \\ \hdashline[2pt/2pt]
\mystrut 0
\end{array}
\right]
\text{ with } n = A^TPl
\end{equation}
\end{document}