2012年10月5日星期五

LaTeX centering a table that is larger than text width

Had this problem today with my thesis proposal, and luckily the solution is not hard to find:
http://mathandprogramming.blogspot.com/2011/07/latex-centering-table-larger-than.html

You basically need to use a package called chngpage and add an environment surrounding the table:

% allows for temporary adjustment of side margins
\usepackage{chngpage}

\begin{table}
    \begin{adjustwidth}{-.5in}{-.5in}  
        \begin{center}
        \begin{tabular}{|c|}
           % really wide table here
        \end{tabular} 
        \caption{This way the caption will also be the same width as the table, wider than the other text. }
        \label{myTable}
        \end{center}
    \end{adjustwidth}
\end{table}

没有评论: