Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to include some gnuplot-generated figures using the epslatex terminal, which creates an .eps file and a .tex file. The way to include these figures in the document is writing

\include{./figure}

These files include all the commands that set the tics, the legend and so on. My question is: is it possible to change the size of the whole set of elements included in figure.tex without modifying that file?

Something like this:

\resizebox{\linewidth}{!}{
\begin{figure}
    \include{./presion_posicion2}
    \caption{Diagrama presión-posición para el ensayo 2}
    \label{fig:ensayo2}
\end{figure}
}
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

it should be \input instead of \include and the other way round with \resizebox:

\begin{figure}
\resizebox{\linewidth}{!}{\input{./presion_posicion2}}
    \caption{Diagrama presión-posición para el ensayo 2}
    \label{fig:ensayo2}
\end{figure}

You can everything define inside the figure environment, it will be valid for the code of \input

share|improve this answer
    
@Herbert, which one do you prefer \scalebox or \resizebox ? –  xport Dec 26 '10 at 15:41
1  
@xport: \scalebox only when I have a lot of images and want all scale down by the same factor and no one is wider than \linewidth. When I need some images as wide as the linewidth or part of it, then \resizebox is the better choice. –  Herbert Dec 26 '10 at 15:59
    
@Herbert, thank you for this tip of the day. –  xport Dec 26 '10 at 16:05
    
@Herbert, may I also ask why should be \input instead? I read this tex.stackexchange.com/questions/246/… but I didn't see the point –  Juanlu001 Dec 26 '10 at 20:50
    
Anyway, thank you for your answer. It worked! –  Juanlu001 Dec 26 '10 at 20:51
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.