I am trying to center a table but it is not formatting well. I have looked at questions like this but none of the answers there seem to solve my problem.
\documentclass[11pt]{article}
\begin{document}
\begin{center}
\begin{tabular}{ | c | c | c | c | c | c | c | c | c | c | c | c | }
\hline
Steps & Trial 1 & Trial 2 & Trial 3 & Trial 4 & Trial 5 & Trial 6 & Trial 7 & Trial 8 & Trial 9 & Trial 10 \\ \hline
1 & 1 & 1 & -1 & 1 & 1 & 1 & -1 & -1 & -1 & 1 \\
2 & 0 & 2 & 0 & 0 & 2 & 0 & -2 & -2 & -2 & 0 \\
3 & 1 & 1 & -1 & 1 & 3 & 1 & -3 & -1 & -3 & 1 \\
4 & 0 & 0 & -2 & 2 & 4 & 2 & -4 & 0 & -2 & 2 \\
5 & 1 & -1 & -3 & 1 & 5 & 3 & -5 & 1 & -1 & 3 \\
6 & 2 & -2 & -2 & 0 & 6 & 4 & -6 & 0 & -2 & 2 \\
7 & 1 & -1 & -1 & -1 & 5 & 3 & -7 & -1 & -1 & 1 \\
8 & 2 & 0 & 0 & -2 & 4 & 4 & -8 & -2 & -2 & 0 \\
9 & 3 & -1 & -1 & -1 & 3 & 5 & -9 & -1 & -1 & 1 \\
10 & 2 & 0 & -2 & -2 & 2 & 6 & -8 & -2 & 0 & 0 \\
11 & 3 & -1 & -1 & -3 & 3 & 5 & -7 & -3 & 1 & 1 \\
12 & 2 & -2 & -2 & -4 & 4 & 4 & -8 & -4 & 2 & 2 \\
13 & 1 & -3 & -3 & -3 & 3 & 5 & -9 & -3 & 3 & 3 \\
14 & 2 & -2 & -4 & -2 & 4 & 4 & -10 & -2 & 4 & 2 \\
15 & 1 & -3 & -3 & -3 & 3 & 3 & -9 & -1 & 3 & 1 \\
16 & 0 & -2 & -2 & -4 & 4 & 2 & -8 & -2 & 2 & 0 \\
17 & 1 & -3 & -1 & -5 & 5 & 3 & -9 & -3 & 3 & -1 \\
18 & 2 & -4 & -2 & -4 & 6 & 2 & -10 & -4 & 2 & -2 \\
19 & 3 & -3 & -3 & -5 & 7 & 3 & -11 & -5 & 3 & -3 \\
20 & 2 & -2 & -4 & -4 & 6 & 2 & -10 & -4 & 2 & -2 \\
21 & 3 & -1 & -5 & -5 & 5 & 1 & -9 & -5 & 3 & -3 \\
22 & 2 & -2 & -6 & -6 & 6 & 0 & -8 & -4 & 4 & -2 \\
23 & 1 & -1 & -7 & -7 & 7 & -1 & -9 & -3 & 3 & -3 \\
24 & 0 & 0 & -6 & -8 & 6 & -2 & -10 & -4 & 4 & -4 \\
25 & 1 & -1 & -7 & -9 & 7 & -1 & -9 & -3 & 3 & -3 \\
26 & 0 & -2 & -6 & -10 & 8 & -2 & -10 & -2 & 4 & -2 \\
27 & 1 & -3 & -7 & -11 & 7 & -1 & -9 & -1 & 5 & -3 \\
28 & 0 & -2 & -6 & -10 & 6 & 0 & -8 & 0 & 4 & -4 \\
29 & -1 & -1 & -7 & -11 & 5 & 1 & -7 & -1 & 3 & -3 \\
30 & 0 & 0 & -8 & -12 & 4 & 2 & -6 & 0 & 2 & -4 \\
\hline
\end{tabular}
\end{center}
\end{document}
I tried a lot of different styles to format this like \centering
instead of \begin{center}...\end{center}
but none of them work properly.
In the end, the table looks like this
What should I do to fix this issue
Best Answer
You can use package called geometry to solved your table problem