1

Code sth like this:

\begin{table}
\centering
\caption{...}
\begin{subtable}[t]{0.55\linewidth}
...
\end{subtable}%
\begin{subtable}[t]{0.55\linewidth}
...
\end{subtable}
\end{table}

I have to make it slightly larger in width so that the contained tabular fits in.

Multiple issues:

  • The result is not centered as I want it.
  • It only increases in width to the right. (Which is basically the same problem reformulated.)
  • On the subtable, I get a warning overfull \hbox.

How do I resolve this?

I was thinking about increasing the \linewidth within the table, but I don't really know how to do this.

1
  • You can use the adjustwidth environment, from changepage, to increase \linewidthboth on the left and n the right margin.
    – Bernard
    Oct 27, 2018 at 21:28

1 Answer 1

1

Just use a \makebox[\textwidth] command:

(The tikzpicture added to show the real 1.1\textwidth)

\documentclass{article}
\usepackage{subcaption}
\usepackage{tikz}
\usepackage{lipsum}
\begin{document}

\begin{table}
\centering
\caption{Test Table caption}
\makebox[\textwidth]{\begin{subtable}[t]{0.55\linewidth}
\begin{tabular}{@{}ccc@{}}
Test Text here e& long enough to fill &  line \\
Test Text here e& long enough to fill &  line \\
\end{tabular}
\end{subtable}
\begin{subtable}[t]{0.55\linewidth}
\begin{tabular}{ccc}
Test Text here & long enough to fill &  line\\
Test Text here & long enough to fill &  line \\
\end{tabular}
\end{subtable}}
\end{table}
\noindent\makebox[\textwidth]{\begin{tikzpicture}
\draw[-,red](0,0)--(1.1\textwidth,0);
\end{tikzpicture}}

\lipsum[1]

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .