3

The refman document class has a big left margin for text. Only the headings are on the normal left margin. Perfect for what I'm doing.

But I have a wide table (float) that must be centered on the full page width (like table* in two-column mode).

So far closest to success is the changepage package adjustwidth environment. It takes care of the table (tabular env) just fine.

But the caption remains centered with respect to the wide left margin, even though it's inside the adjustwidth.

A MWE:

\documentclass[11pt,letterpaper]{refart}
\usepackage[strict]{changepage} 
\usepackage{array}
\begin{document}
\section{A section}
Here is some normal text at the normal margin.
Now let's insert wide Table~\ref{tbl:thetable}. \begin{table}
% Uncommenting this environment will move the 
    % table contents left, but not the caption!
%\begin{adjustwidth}{-1.5in}{}
\caption{The caption.}
\begin{tabular}{>{\sf}llp{7cm}}
{\bf Schedule item} & {\bf Type} & {\bf Description} \\ \hline 
Start semifinals logins & 
      date & 
      semifinalists can log in to either 
      home page but not submit semifinal designs\\
\end{tabular}
\label{tbl:thetable}
%\end{adjustwidth}
\end{table}
And finish with more text.
\end{document}

This is frustrating! How can both table and caption be convinced to use full width?

  • 1
    Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – egreg Jul 20 '13 at 21:11
  • @egreg Done with MWE! – Gene Jul 20 '13 at 21:48
4

You have to back up by \leftmarginwidth; enclosing the table in a minipage will accomplish the centering.

The lipsum package is just to provide filler text.

\documentclass[11pt,letterpaper]{refart}
\usepackage{array,lipsum}

\newenvironment{fulltable}[1][tbp]
 {\begin{table}[#1]%
  \hspace*{-\leftmarginwidth}%
  \begin{minipage}{\fullwidth}}
 {\end{minipage}\end{table}}

\begin{document}
\section{A section}
Here is some normal text at the normal margin.
Now let's insert wide Table~\ref{tbl:thetable}.

\begin{fulltable}
\centering
\caption{The caption.}

\medskip

\begin{tabular}{>{\sffamily}llp{7cm}}
\bfseries Schedule item & \bfseries Type & \bfseries Description \\
\hline 
Start semifinals logins & 
      date & 
      semifinalists can log in to either 
      home page but not submit semifinal designs\\
\end{tabular}
\label{tbl:thetable}
\end{fulltable}

And finish with more text.
\lipsum[1-4]
\end{document}

enter image description here

  • Perfect! Thanks. Looks great. Have not done LaTeX for some years and I appreciate the memory jog. – Gene Jul 21 '13 at 2:14
0

This is a very late answer. But for people who may be having problems with full pages and refman, refart, refrep, etc.

Just enclose what you want within a fullpage environment.

\begin{fullpage}

\end{fullpage}

You don't need to define anything. It is a cleaner way to do this.

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Symbol 1 Jul 15 '15 at 6:34

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.