0

I'm inserted figures and tables in my document in the following way:

\begin{figure}[!htbp]
\centering
\includegraphics[width=110mm]{figure.jpg}
\caption{The caption.}
\label{fig:label}
\end{figure}

\begin{table}[!htbp]
\caption{The caption.}
\centering
\resizebox{12cm}{!}{\input{table}}
\label{tab:label}
\end{table}

The figure and table is larger then the text width, thus I'm resizing it. Of course I can adjust the value so that it fits more or less the text width. But is there a possibility that it is automatically scaled to the text width?

7
  • use \textwidth instead of 110mm and 12cm (but scaling tables is horrible ) Commented Jan 26, 2016 at 20:14
  • [width=\textwidth] ou \resizebox{\textwidth} should be enough.
    – Bernard
    Commented Jan 26, 2016 at 20:15
  • @DavidCarlisle Thank you very much, this worked. What would you do instead of scaling tables? The problem is that the table is too large and does not fit ino the page.
    – machinery
    Commented Jan 26, 2016 at 21:28
  • unlike an image a table is text, you don't make paragraphs of text fit the page by making each line an arbitrary sized font just to make things fit, you choose a suitable size in advance from a small fixed list so different units use the same size (\normalsize, \small, \footnotesize etc) and then arrange linebreaking so the text fits. the same should apply (more so) to tables, Commented Jan 26, 2016 at 21:47
  • @David Carlisle What about the idea to scale tables via tex.stackexchange.com/questions/140796/… ? Create an Image and scale Image could be possible? Am I wrong? Commented Mar 30, 2016 at 19:15

1 Answer 1

2

In both cases, you can use use \textwidth (or \columnwidth for two column documents) instead of specific lengths such as 110mm and 12cm.

You must log in to answer this question.

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