I want to create a page with two images and some text. The images will get recreated from time to time, which possibly results in different image-sizes. I do not want to manually set the maximum height and width of these images in my Latex document each time they get recreated - So is there a way to force these images to appear in the maximum possible size (So both images are 150% it's original size or only 90% it's original size)
I tried to place them in one figure environment and set they're width and height to width=\textwidth,height=\textheight
and set the keepaspectratio
attribute.
\newpage
\begin{figure}[ht]
\textbf{Title of the first image} \vspace*{10pt} \\
\includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{tmp/first.png}
\textbf{Title of the second imate} \vspace*{10pt} \\
\includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{tmp/second.png}
\end{figure}
This resulted it to be forced on one page but the second image was to big and cut off at the bottom
Is there a way to automatically let latex handle the sizing of the images?
\vspace*{10pt} \\
is a rather strange construct adding space after the end of the line, better to use\\[10pt]