3

I have a very long table that cannot be displayed on the page because it is too long and the right hand side of the table has been cutoff.

How can I modify the \begin{center} to something else so that the whole table will flushright or flushright?

\begin{widetext}
\begin{center}
\begin{table} [!h]
\begin{tabular}{|c||c|c|}
\hline
$\omega$ &  $S$  & Induced   \\[0mm]  \hline \hline
\end{tabular}
\caption{ The shorthand of ... }
\label{}
\end{table}
\end{center}
\end{widetext}
Masroor
  • 17,842
wonderich
  • 2,387
  • btw, there is a similar issue here: http://tex.stackexchange.com/questions/48556/how-to-align-longtable-at-the-left-side; but mine is just table not longtable. – wonderich Apr 28 '14 at 01:15

1 Answers1

2

You can use adjustbox package and it adjustbox environment. Use max width= <width> so that the table is resized only if it exceeds that width.

\documentclass{article}
\usepackage{adjustbox}
\usepackage{showframe}  %% just for demo
\begin{document}
\begin{table} [!h]
\begin{adjustbox}{max width=1.1\textwidth,center}% fbox,
\begin{tabular}{|c||c|c|}
\hline
$\omega$ some dummy &  $S$ some dummmy text to make this long & Induced some more dummy   \\[0mm]  \hline \hline
\end{tabular}
\end{adjustbox}
\caption{ The shorthand of ... }
\label{}
\end{table}

\end{document}

enter image description here

On the other hand you can use a box.

\documentclass{article}
\usepackage{showframe}  %% just for demo
\begin{document}
\begin{table} [!h]
\makebox[\textwidth][c]{%
\begin{tabular}{|c||c|c|}
\hline
$\omega$ some dummy &  $S$ some dummmy text to make this long & Induced some more dummy   \\[0mm]  \hline \hline
\end{tabular}
}
\caption{ The shorthand of ... }
\label{}
\end{table}

\end{document}

enter image description here