I'm currently trying to define a list of icons/images which will take the size of the line height and be vertically aligned to the lines. This list is basically a list to explain what are these icons about. The example below is what I want to achieve, and is taken from the Apple iOS documentation website.
I grabbed the images from there, but these are a bit larger than the actual line height. Specifying and including the images as it without resizing them should thus produce a rendered version with each image a bit greater than expected. What is weird is that this isn't what I got as rendered version: some images appear way greater than others. I know each image differs lightly in size from the others (e.g.: 26x30, 30x30, 36x32, etc.) but AFAIK this couldn't be reason and explain that issue.
I thought that reducing the size of each image (and keep their ratio) using the size of the line would be enough, like described here. Unfortunately, since this is not possible to determine the height of the line we are currently in as it depends on a bunch of factors: space between lines and font size, etc.
I then decided I should just scale each image using a value that could suit the rendered version using trial and error, but this value isn't automatically computed and as soon I change the size of the text, I need to recompute the value manually. Not really efficient. I got a some better result, but I've still the problem some images appear really smaller than others.
To solve the centering problem I thought to the command \vcenter
but I've some issues with it: it requires me to be in math mode and the rest of the line appears outside the page borders.
The ugly code I've for now:
\begin{itemize}
\item $\vcenter{\includegraphics[scale=0.5]{fig_xcode_inspector_file}} Some text$
\item $\vcenter{\includegraphics[scale=0.5]{fig_xcode_inspector_quick_help}} yet some text$
\item $\vcenter{\includegraphics[scale=0.5]{fig_xcode_inspector_identity}} some text$
\item $\vcenter{\includegraphics[scale=0.5]{fig_xcode_inspector_attributes}} some text$
\item $\vcenter{\includegraphics[scale=0.5]{fig_xcode_inspector_size}} some text $
\item $\vcenter{\includegraphics[scale=0.5]{fig_xcode_inspector_connections}} some text $
\end{itemize}
Any help helping me to solve this issue is welcome.
scale
? do you know they have the same size to begin with? Again I think theadjustbox
package can help a lot.adjustbox
more in details, and even if I have the valuesmaxheight
, I still need to compute the height value manually :-/height=1em
?