I got stuck on designing easy-to-use command wrappers for multipanel floats (i.e. subfigures/subtables) built around the subcaption package. The problem has to do with vertical alignment of the individual panels of the float: the 'default' behaviour I have observed is bottom-alignment, but I would like the users to be able to specify rows where the panels are verticaly centered or top-aligned. This would require raising some of the panels by an amount which is dependent on the height of the 'tallest' panel in the given row.
In the MWE below I have omitted top-aligned panels for brevity.
The panel-environment evaluates its contents and dumps them into a macro \panelcontents. Although it does nothing with this value, it does evaluate the contents' height and stores it in \currentpanelheight---I imagine the final version will have to do it anyway, to decide which panel is the tallest automatically.
The problem disappears if I specify the tallest panel's height by hand (line 89 of the MWE). It is to have LaTeX determine this value automatically for each row that poses a problem. I considered a solution where each panel exports a value to an external file, and a separate macro selects the tallest panel on a subsequent run, rather than on-the-fly. There is probably a more elegant way to do it, but I am missing a piece of the puzzle. Can anyone offer any advice?
LaTeX specific issues not fitting into one of the other forums of this category.
2 posts • Page 1 of 1
Fixed up a solution using the \VerbatimOut facility of the fancyvrb package, with export of each row to an external file and using the code twice---once to determine the size and once to print the correctly aligned row. It all happens on the same run. Had to redefine \panel for the size-determination step, and for some reason I could not simply return it to the previous version using \global\let---had to use \renewcommand again instead. Here's a top-aligned and centred example.
Who is online
Users browsing this forum: No registered users and 4 guests