枚举游戏

枚举游戏

我想列举这三款游戏。有人能帮我吗?谢谢。

\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或来结束你的。我添加了一个前导以将游戏推向右侧,尽管这可能不是你想要的。centerenumerateenumerate\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}

在此处输入图片描述

相关内容