如何在 LaTeX 图中绘制带标签的矩阵?

huangapple go评论62阅读模式
英文:

How to draw matrices with a label in a latex figure?

问题

I want to create tables as part of a figure in latex. I want to achieve this look:
如何在 LaTeX 图中绘制带标签的矩阵?

英文:

I want to create tables as part of a figure in latex. I want to achieve this look:
如何在 LaTeX 图中绘制带标签的矩阵?

I have no idea which package/commands to use.

答案1

得分: 2

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{figure}
  \centering
  \includegraphics[width=0.4\linewidth]{example-image}
  
  \medskip
  
  $\sigma_1 \rightarrow \sigma_2 :
    \begin{array}{ | *{5}{c|} }
      a & b & c & e & f \\
      \hline
      a & b & c & e & f
    \end{array}$ \quad
  $\sigma_1 \rightarrow \sigma_3 :
    \begin{array}{ | *{5}{c|} }
      a & b & c &  e  & f \\
      \hline
      a & b & c & \gg & f
    \end{array}$
  \caption{A figure caption}
\end{figure}

\end{document}
英文:

Nothing fancy here; just some math as part of the figure environment:

如何在 LaTeX 图中绘制带标签的矩阵?

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{figure}
  \centering
  \includegraphics[width=0.4\linewidth]{example-image}
  
  \medskip
  
  $\sigma_1 \rightarrow \sigma_2 :
    \begin{array}{ | *{5}{c|} }
      a & b & c & e & f \\
      \hline
      a & b & c & e & f
    \end{array}$ \quad
  $\sigma_1 \rightarrow \sigma_3 :
    \begin{array}{ | *{5}{c|} }
      a & b & c &  e  & f \\
      \hline
      a & b & c & \gg & f
    \end{array}$
  \caption{A figure caption}
\end{figure}

\end{document}

huangapple
  • 本文由 发表于 2023年2月14日 00:14:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/75438475.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定