如何用Latex 表示下图矩阵

发布于 2025-01-02 16:18:14
关注者
1
被浏览
141
2 个回答
Sagittarius Rover
我要成为Typst糕手/(ㄒoㄒ)/~~

texdoc nicematrix

请根据上面命令呼出的文档自行补充...

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{nicematrix}
\begin{document}
\[
    \begin{bNiceArray}{*6c*6c}[columns-width=2mm,margin]
        \Block[borders={bottom,right,tikz=dashed}]{6-6}<\LARGE>{\mathbf{E}_{6m}}&&& & & &\Block[borders={bottom,right,tikz=dashed}]{2-4}<\Large>{\mathbf{O}} & & & & \Block[borders={bottom,tikz=dashed}]{2-2}<\Large>{\mathbf{E}_{2m}}& \\
        & &&&& & & & & & & \\
        & &&&& &\Block[borders={bottom,right,tikz=dashed}]{4-4}<\Large>{\mathbf{E}_{4m}} & & & &\Block[borders={bottom,tikz=dashed}]{4-2}<\Large>{\mathbf{O}} & \\
        & &&&& & & & & & & \\
        & &&&& & & & & & & \\
        & &&&& & & & & & & \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
    \end{bNiceArray}
\]
\end{document}

image.png

同时强烈建议掌握围栏代码块语法。

坚强岁月
坚强岁月 4天前
这家伙很懒,什么也没写!

这是我把代码放到论文里的整个代码,请问如何调整这个矩阵的大小?

{
  \documentclass[UTF8]{ctexart}
\usepackage[a4paper, top=1.6cm, bottom=2.54cm, left=3.18cm, right=3.18cm]{geometry} % 调整上边距为2cm
%\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{nicematrix}
\title{\kaishu{查漏补缺}}
\author{\kaishu制作人:{}}
\date{\today}
\bibliographystyle{plain}
\begin{document}
\maketitle
\begin{center}
\textbf{\kaishu{认真就是水平, 扎实就是能力.}  }

\textbf{ \kaishu{}  }
\end{center}
 
\section*{\kaishu {薄弱点}}
\[
    \begin{bNiceArray}{*6c*6c}[columns-width=0.5mm,margin]
        \Block[borders={bottom,right,tikz=dashed}]{6-6}<\LARGE>{\mathbf{E}_{6m}}&&& & & &\Block[borders={bottom,right,tikz=dashed}]{2-4}<\Large>{\mathbf{O}} & & & & \Block[borders={bottom,tikz=dashed}]{2-2}<\Large>{\mathbf{E}_{2m}}& \\
        & &&&& & & & & & & \\
        & &&&& &\Block[borders={bottom,right,tikz=dashed}]{4-4}<\Large>{E_{4m}} & & & &\Block[borders={bottom,tikz=dashed}]{4-2}<\Large>{\mathbf{O}} & \\
        & &&&& & & & & & & \\
        & &&&& & & & & & & \\
        & &&&& & & & & & & \\
        
        \Block[borders={bottom,right,tikz=dashed}]{5-1}<\Large>{\mathbf{O}} &\Block[borders={bottom,right,tikz=dashed}]{5-5}<\LARGE>{\mathbf{E}_{5m}}&& & & &\Block[borders={tikz=dashed}]{6-6}<\Large>{\mathbf{E}_{6m}} & & & & & \\
        & &&&& & & & & & & \\
        & &&&& & & & & & & \\
        & &&&& & & & & & & \\
        & &&&& & & & & & & \\
        \Block[borders={bottom,right,tikz=dashed}]{1-1}<\Large>{\mathbf{E}_{m}}&
        \Block[borders={bottom,right,tikz=dashed}]{1-5}<\Large>{\mathbf{O}} &&&& & & & & & & \\
        
    \end{bNiceArray}
\]
 
\end{document} 
}

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览