When I include a eps/latex combo generated by, say, gnuplot or xfig using \input{*} command, how do I set the width analogous to \includegraphic[width=0.8\textwidth]{*}?
I know one way is to edit the \includegraphic line in the generated latex file, but if the same eps/latex combo is to be used in multiple documents with potentially different width (e.g. single column versus two columns), it makes sense to be able to set it in the master document.
Thank,
--MZ
Graphics, Figures & Tables ⇒ setting size for epslatex
NEW: TikZ book now 40% off at Amazon.com for a short time.
setting size for epslatex
Use \resizebox{} around the \input{} to scale the entire figure. The correct font sizes and placements are automatically calculated relative to the size of the drawing. Using the output from xfig as an example
The syntax is \resizebox{width}{height}, in the example the ! keeps the aspect ratio.
Code: Select all
\begin{figure}[htb]
\centering
\resizebox{1.0\textwidth}{!}{\input{fig.pstex_t}}
\end{figure}