![枚举游戏](https://linux22.com/image/431961/%E6%9E%9A%E4%B8%BE%E6%B8%B8%E6%88%8F.png)
我想列举这三款游戏。有人能帮我吗?谢谢。
\documentclass[12pt, titlepage=false]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[margin = 1in]{geometry}
\usepackage{setspace}
\usepackage{amsthm, amsmath, amsfonts, mathtools, amssymb}
\usepackage{sgame, tikz}
\usepackage[inline]{enumitem}
\begin{document}
\begin{enumerate}
\begin{center}
\begin{table}[h!]
\hspace{2cm}
\item \begin{game}{2}{2}[Player 1][Player 2]
& Heads & Tails \\
Heads & $1, -1$ & $-1, 1$ \\
Tails & $-1, 1$ & $1, -1$\\
\end{game}
\end{table}
\begin{table}[h!]
\hspace{2cm}
\item \begin{game}{2}{2}[Player 1][Player 2]
& Heads & Tails \\
Heads & $2, 2$ & $0, 0$ \\
Tails & $0, 0$ & $1, 1$\\
\end{game}
\end{table}
\vspace{-2.7cm}
\begin{table}[h!]
\hspace{9.5cm}
\item \begin{game}{2}{2}[Player 1][Player 2]
& Heads & Tails \\
Heads & $3, 1$ & $0, 0$ \\
Tails & $0, 0$ & $1, 3$\\
\end{game}
\end{table}
\end{center}
\end{document}
答案1
也许是这样的?
更改:不要在 ;内使用table
或来结束你的。我添加了一个前导以将游戏推向右侧,尽管这可能不是你想要的。center
enumerate
enumerate
\hfil
如果您希望enumerate
标签更靠近水平中心,可以考虑将enumerate
内部设置得更窄一些minipage
。
\documentclass[12pt, titlepage=false]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[margin = 1in]{geometry}
\usepackage{setspace}
\usepackage{amsthm, amsmath, amsfonts, mathtools, amssymb}
\usepackage{sgame, tikz}
\usepackage[inline]{enumitem}
\begin{document}
\begin{enumerate}
\item\hfil \begin{game}{2}{2}[Player 1][Player 2]
& Heads & Tails \\
Heads & $1, -1$ & $-1, 1$ \\
Tails & $-1, 1$ & $1, -1$\\
\end{game}
\item\hfil \begin{game}{2}{2}[Player 1][Player 2]
& Heads & Tails \\
Heads & $2, 2$ & $0, 0$ \\
Tails & $0, 0$ & $1, 1$\\
\end{game}
\item\hfil \begin{game}{2}{2}[Player 1][Player 2]
& Heads & Tails \\
Heads & $3, 1$ & $0, 0$ \\
Tails & $0, 0$ & $1, 3$\\
\end{game}
\end{enumerate}
\end{document}
另外,如果您希望它浮动table
,则删除enumerate
并添加手动标签:
\documentclass[12pt, titlepage=false]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[margin = 1in]{geometry}
\usepackage{setspace}
\usepackage{amsthm, amsmath, amsfonts, mathtools, amssymb}
\usepackage{sgame, tikz}
\usepackage[inline]{enumitem}
\begin{document}
\begin{table}[ht]
\caption{My game tables}
\centering
1) \begin{game}{2}{2}[Player 1][Player 2]
& Heads & Tails \\
Heads & $1, -1$ & $-1, 1$ \\
Tails & $-1, 1$ & $1, -1$\\
\end{game}\bigskip
2) \begin{game}{2}{2}[Player 1][Player 2]
& Heads & Tails \\
Heads & $2, 2$ & $0, 0$ \\
Tails & $0, 0$ & $1, 1$\\
\end{game}\bigskip
3) \begin{game}{2}{2}[Player 1][Player 2]
& Heads & Tails \\
Heads & $3, 1$ & $0, 0$ \\
Tails & $0, 0$ & $1, 3$\\
\end{game}
\end{table}
\end{document}