Try this version of \scalefiginput[<scale>]{<file>}
:

\documentclass{article}
\usepackage{graphicx}
\usepackage{filecontents}
\begin{filecontents*}{myfig.tex}
\begin{figure}
\centering
\begin{tabular}{c}
\includegraphics[scale=0.45]{example-image} \\
Some text
\end{tabular}
\end{figure}
\end{filecontents*}
\let\oldincludegraphics\includegraphics
\newcommand{\scalefiginput}[2][1]{%
% Update \includegraphics to scale its argument
\renewcommand{\includegraphics}[2][]{\scalebox{#1}{\oldincludegraphics[##1]{##2}}}%
\input{#2}% Input figure
% Restore \includegraphics
\let\includegraphics\oldincludegraphics
}
\begin{document}
\input{myfig.tex}
\scalefiginput{myfig.tex}
\scalefiginput[.5]{myfig.tex}
\end{document}
The macro updates the way \includegraphics
functions, changing it into a \scalebox{<scale>}{\includegraphics[..]{...}}
version just for the inclusion of the <file>
.
The <scale>
is optional (defaulting to 1
). You can also make it mandatory, if needed.
If you wish to scale everything (image and text), the following should do the trick:

\documentclass{article}
\usepackage{graphicx,environ}
\usepackage{filecontents}
\begin{filecontents*}{myfig.tex}
\begin{figure}
\centering
\begin{tabular}{c}
\includegraphics[scale=0.45]{example-image} \\
Some text
\end{tabular}
\end{figure}
\end{filecontents*}
\let\oldtabular\tabular
\let\endoldtabular\endtabular
\newcommand{\scalefiginput}[2][1]{{%
\RenewEnviron{tabular}[1]{%
\scalebox{#1}{\begin{oldtabular}{##1}
\BODY
\end{oldtabular}}}%
\input{#2}%
}}
\begin{document}
\input{myfig.tex}
\scalefiginput{myfig.tex}
\scalefiginput[.5]{myfig.tex}
\end{document}
The idea is to redefine the tabular
environment so you can capture its entire contents and scale it to your liking.
\incudegraphics
– Marco Daniel Feb 21 '17 at 16:15scalebox
approach may be failing because of how you structuredmyfig.tex
, we need to see a bit more of your approach to help you (but not too much otherwise it's difficult to cut through the noise) – Bordaigorl Feb 21 '17 at 16:25standalone
document class) and then you can use\includegraphics
with specified width to scale them to your liking. – JPi Feb 21 '17 at 18:20\scalebox
afigure
environment. But we still need some more info I think. Do you set thewidth
key for\includegraphics
explicitly in your.tex
files? – Torbjørn T. Mar 4 '17 at 21:49