As of Crop an inserted image? we can crop images by using something like
\documentclass{article}
\usepackage{graphicx}
\begin{document}
% trim from left edge
\includegraphics[trim={5cm 0 0 0},clip]{myImage.pdf}
\end{document}
in order to crop away the left 5cm of our example image.
In my example it would be really neat if I could use relative crop directions instead of absolute ones (e.g. crop a way 10% from the left, 25% from the top, etc.). Is this possible? And if so: how?
Unfortunately the documentation of the graphicx package is not very verbose when it comes to the trim option (at least as far as I have found).
In case it's relevant: I am looking for an option that works with PDF files included as images.
Note that I found https://tex.stackexchange.com/a/57426/128658 that explains how the effect can be achieved by using a savebox to query the image's dimension first. I am hoping for a solution where this is automated in the background so I don't have to do this every time...
\adjincludegraphicsfromadjustbox, as suggested in the linked answer. – Werner Dec 28 '20 at 18:49