1

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

\includegraphics[totalheight=.35\paperheight]{figure}        
\begin{minipage}[b][.35\paperheight][t]{.55\linewidth}
    Minipage content here
\end{minipage}        

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

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.

\documentclass{beamer}
\begin{document}
\begin{frame}
\sbox0{\includegraphics[totalheight=.35\paperheight]{example-image}}%
\usebox0\hfill    
\begin{minipage}[b][.35\paperheight][t]{\dimexpr \textwidth-\wd0-\columnsep}
    Minipage content here. \hrule
\end{minipage} 
\end{frame}
\end{document}

demo

You must log in to answer this question.

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