你好,我想在我的学士论文报告中描述我在程序中使用的值数组。我以为它在 latex 中看起来会更同步,但它看起来确实很奇怪。
您对如何格式化如下值数组有什么建议吗:
\documentclass
$$
\left\{
\begin{align}
n_{keepers},\\
n_{defenders},\\
n_{defenders},\\
n_{defenders},\\
n_{defenders},\\
n_{midfielders},\\
n_{midfielders},\\
n_{midfielders},\\
n_{midfielders},\\
n_{attackers},\\
n_{attackers} \end{align}
\right\}
$$
\end{document}
我应该用表格来代替吗?
答案1
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{Bmatrix}
n_{\mathrm{keepers}},\\
n_{\mathrm{defenders}},\\
n_{\mathrm{defenders}},\\
n_{\mathrm{defenders}},\\
n_{\mathrm{defenders}},\\
n_{\mathrm{midfielders}},\\
n_{\mathrm{midfielders}},\\
n_{\mathrm{midfielders}},\\
n_{\mathrm{midfielders}},\\
n_{\mathrm{attackers}},\\
n_{\mathrm{attackers}}
\end{Bmatrix}
\]
\end{document}
永远不要使用默认数学字体,因为单词midfielders
被设置为 1 个字母变量的乘积。