I often use a minipage to fill up some space, for example in "beamer" presentations. This might look as follows:

    Minipage content here

I now wonder whether there is a way to automatically determine the minipage's width so that it fills all the space to the right margin.

I understand that I could do the same with tabularx, and wrap the minipage into the 'X'-column. However, I wonder whether there is a way to do that directly. It might be useful also in other cases.

1 Answer 1


The idea is to measure the width of the image and compute how much space is left. I threw in a gap of \columnsep between the two, as opposed to measuring the width of \space.

\begin{minipage}[b][.35\paperheight][t]{\dimexpr \textwidth-\wd0-\columnsep}
    Minipage content here. \hrule


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .