4

Using IEEEtran, I am trying to combine two tabulars in a single double-width table* environment. (This is the only way I could figure out to correctly order the tables in the paper, otherwise LaTeX gets creative.)

My problem is that the page the table* is on does not fit into the proper margins. I receive the following errors from EDAS when trying to submit:

The paper has a top margin of 0.667 inches on page 7, which does not leave 0.7 inches of margin.

I have tried reducing the spacing between the tables (by removing the \newlines and \vspace between them), and reducing the space after the table (by tweaking \vspace after the table), but no matter what I do, the page retains the same margins.

\documentclass[conference]{IEEEtran}
\usepackage{caption}
\usepackage{comment}
\usepackage{float}
\usepackage{lipsum}
\captionsetup{justification=centering}

\begin{document}
\lipsum[1-10]

\begin{table*} [t]
\caption{First Caption}
\centering
\begin{tabular} {|c|c|c|}
  \hline
   a & b & c \\
  \hline
\end{tabular}
\newline \vspace*{1 mm} \newline
\caption{Second Caption}
\centering
  \begin{tabular} {|c|c|c|}
    \hline
    a & b & c \\
    \hline
  \end{tabular}
\end{table*}
\lipsum[1-10]
\end{document} 

So, I can change the vertical spacing on the page, and it's obviously reflected in the document, but the document's margins are still incorrect. All of the other pages in the document are fine. Does anyone know what's wrong?

  • 1
    latex never gets creative, it just follows the instructions you put in the file. Please fix your example so that it can be run to demonstrate the warning, otherwise it is very hard to suggest anything. – David Carlisle Apr 10 '15 at 15:37
  • or just add \small after \begin{table*} so the tables are smaller. – David Carlisle Apr 10 '15 at 15:38
  • The culprit would appear to be the caption package: if you don't load it (and, obviously don't execute the \captionsetup instruction either), the top page margin isn't penetrated by the table's first caption. – Mico Apr 10 '15 at 15:45
  • I have updated the example so that it should recreate the problem. – Chance Apr 10 '15 at 16:42
4

The caption package -- at least if it's loaded with no other options than justification=centering (which is the default anyway) -- seems to be causing the penetration of the top margin by the first caption of the table* environment.

A workable fix would appear to consist of loading the package with options skip=5pt and position=bottom as well (even though the captions are to be placed on top rather than at the bottom of each tabular). In addition, you really need to specify the option size=footnotesize as the IEEEtran document class sets tabular material in that size.

Note that since table* environments can only appear at the top of a page, nothing is gained by specifying the [t] location specifier.

A reworked/expanded version of your example code that implements these recommendations:

\documentclass[conference]{IEEEtran}
  \usepackage{caption}
  \usepackage{comment}
  \usepackage{lipsum}
  \captionsetup{size=footnotesize,
    %justification=centering, %% not needed
    skip=5pt, position = bottom}

\begin{document}

\lipsum[1-3] % filler text

  \begin{table*}
  \centering

  \caption{First caption}
  \begin{tabular} {ccc}
      \hline
       a & b & c\\
      \hline
  \end{tabular}

  \bigskip
  \caption{Second caption}
  \begin{tabular} {ccc}
      \hline
      d & e & f \\
      \hline
  \end{tabular}
\end{table*}

\lipsum[4-30] % more filler text
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.