When an image's length is scaled to a variable length, say \textwidth, how can I determine the effective scaling factor?
\includegraphics[width=\textwidth]{image.pdf}
I would like to use it to apply the same scaling to another image:
\includegraphics[scale=\myscale]{image2.pdf}
As a workaround, it would be sufficient for me to print the effective scaling factor and manually insert it in the second command. This could be done by determining the original image's lengths as seen by pdflatex and dividing \the\textwidth by it. Is this possible? How does trimming affect this?




.logfile, so one would hope one could access the information in the program too. – Andrew Swann May 31 '16 at 06:48