Friday, November 25, 2011

Table Notes

Tables can be used to attach tabular environments to captions. You can either use the caption command or simple plain text inside a table. The caption package is sometimes needed. Here is some examples:

\begin{table}
    blah
    \begin{longtable}{|l|}
      \hline
      a \\
      \hline
    \end{longtable}
  \end{table}

And an example of the caption

  \begin{table}
    \caption{\huge Section Header}
    \begin{longtable}{|l|}
      \hline
      a \\
      \hline
    \end{longtable}

This is a command to use the caption, but remove the prefix Table 1:

  \begin{table}
    \captionsetup{labelformat=empty,justification=raggedleft}
    \caption{\huge Section Header}
    \begin{longtable}{|l|}
      \hline
      a \\
      \hline
    \end{longtable}

Tables naturally float and here is some code to disable that

\begin{table}[!htbp]
    \huge
    blah
    \begin{longtable}{|l|}
      \hline
      \writetenrows
      %\writetenrows
      \hline
    \end{longtable}
  \end{table}

No comments:

Post a Comment