0

I am trying to write a payoff matrix in latex, but when I do so, the outcome that I take is the following: enter image description here As you can see, the matrix is in the end of the page, below the date and the footnotes, while it should be below the proposition that refers "Example 1.1 ...payoff matrix". Why is this so? Is there any command that could help me to give the direction that I want to the matrix?

I use the package

\usepackage{multirow,array} and the code is

\begin{table}
\setlength{\extrarowheight}{3pt}
\begin{tabular}{cc|c|c|}
  & \multicolumn{1}{c}{} & \multicolumn{2}{c}{Player $Y$}\\
  & \multicolumn{1}{c}{} & \multicolumn{1}{c}{$A$}  & \multicolumn{1}{c}{$B$} \\\cline{3-4}
  \multirow{2}*{Player $X$}  & $A$ & $(2,1)$ & $(0,0)$ \\\cline{3-4}
  & $B$ & $(0,0)$ & $(1,2)$ \\\cline{3-4}
\end{tabular}
\end{table}

Thank you in advance!

David Carlisle
  • 757,742
Nav89
  • 133
  • the default float position includes b but you can stop that by using \begin{table}[tp] (or [htp] if you want to include h position – David Carlisle Sep 07 '21 at 08:48
  • 2
    But why is this in a table at all? do you want it to move? You could just use tabular without the surrounding table if it is part of the proposition text. – David Carlisle Sep 07 '21 at 08:51
  • These types of matrices are the standard notation to present the players payoffs in game theory. This is why I need the table. However, You mean that I can do the same job without using the table command? – Nav89 Sep 07 '21 at 08:53
  • I meant why have you got \begin{table} that specifies that latex may move the content to help with page breaking. It is not directly related to having a table/matrix in the content. – David Carlisle Sep 07 '21 at 08:54
  • well i wanted the table to be centralized. I think [htp] beside the \begin{table} command does the job – Nav89 Sep 07 '21 at 08:58
  • 1
    table does not affect the horizontal position it just affects moving (or not) the content to the top or bottom of a page but glad [htbp] worked for you. – David Carlisle Sep 07 '21 at 08:59
  • Yes I think it answers to my question – Nav89 Sep 07 '21 at 09:02
  • @David Carlisle one last question. If i want to have two matrices instead of one and I want them in the same line, the one besides the other, how can I do this? – Nav89 Sep 07 '21 at 09:16
  • 1
    just put two tabular next to each other – David Carlisle Sep 07 '21 at 09:16

0 Answers0