0

I'm trying to fit a table to the page width. I'm using the adjustbox package:

\documentclass[letterpaper]{report}
\begin{document}

\begin{adjustbox}{width=0.8*\the\textwidth}
\input{tables/table_2_increasingPolishingHardness}
\end{adjustbox}

The output is a table that is still too wide for the page, but with the text 'width=0.8*497.92322pt' printed just above the table.

Why is the width parameter being printed and not evaluated?

Thanks!

  • 3
    Correct usage would be \begin{adjustbox}{width=0.8\textwidth}. However I would strongly adwise against using an adjustbox to fit a table to the textwidth (causes inconsistent font size...). Instead improve or redesign the table itself. – leandriis Mar 23 '18 at 20:07

1 Answers1

2

Your example code is incomplete (e.g. doesn't load the adjustbox package). So I can't see why this happens.

To set the width to 80% of the textwidth use width=0.8\textwidth. The following works with me:

\documentclass[letterpaper]{report}
\usepackage{adjustbox}
\begin{document}

\begin{adjustbox}{width=0.8\textwidth}
\input{tables/table_2_increasingPolishingHardness}
\end{adjustbox}
\end{document}

If this doesn't work for you please update your code example.

Martin Scharrer
  • 262,582