I'm including latex files with \input within a subfigure environment:
\documentclass[a4paper]{report}
\usepackage[usenames,dvipsnames]{color}
\usepackage{linegoal}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{subcaption}
\begin{document}
\begin{figure}[ht]
\begin{subfigure}[b]{0.5\textwidth}
\scalebox{.4}{\input{figures/steps/step-001.tex}}
\caption{Step 1 of the example run}
\label{step1er}
\end{subfigure}
\begin{subfigure}[b]{0.5\textwidth}
\scalebox{.4}{\input{figures/steps/step-002.tex}}
\caption{Step 2 of the example run}
\label{step2er}
\end{subfigure}
\end{figure}
\end{document}
But they simply refuse to scale, and the output is completely messed up. The right figure stretches even more vertically.
Here is what it looks like in the PDF:
Best Answer
The problem is I think quite simply that the
\parbox
in yourstep
-files is too narrow to fit the text, so it overflows out of the parbox, and hence out of the\fcolorbox
. If you use a large enough width, in this specific case1.5\linewidth
seems to fit well, the result is better:I'm not entirely sure why the second box is that narrow, but I suppose it has to do with
linegoal
, and how the remainder of the line in question is calculated.