[Tex/LaTex] Changing margins so a table fits in current page

marginstables

I'm trying to fit a table in a specific a4paper page without success.
The problem seems quite trivial to solve but i'm not getting the table in place.
Saw on the web that newgeometry affects the whole page so maybe that's why is floating to a new page, but i dont know any other solution to locally change margins of a single page multiple times.
The following page illustrates the problem.

Any ideas? Thank you.

enter image description here

Best Answer

Here I use a \makebox[\textwidth]{} into which I place something wider than \textwidth. While I show it inside of a table, that is not necessary to employ this technique.

\documentclass{article}
\usepackage{lipsum,tabularx}
\begin{document}
\lipsum[1]
\begin{table}[ht]
\makebox[\textwidth]{\begin{tabularx}{1.2\textwidth}{|c|c|X|}
\hline
This & is & a test\\
\hline
\end{tabularx}}
\end{table}
\lipsum[2]
\end{document}

enter image description here

Related Question