How to horizontally align beamer columns with surrounding text

If you (like me) assumed that placing two columns width 50% of textwidth next to each other would align with preceding or following text on a beamer slide, then you are mistaken (like me).

Fortunately, a discussion on Bug #262: Provide more usable columns environment showed a viable solution in form of the optional argument onlytextwidth.

However, in order to use it successfully, one must then take care of spacing oneself. Here is my result of some experimentation:


Here is the corresponding document source code:



\begin{frame}{Testing columns spacing}{How to achieve 
correctly spaced columns with beamer}
\emph{The documentation doesn't tell you anything about 
the alignment of the columns or the space in between them.
In particular, the side effect of totalwidth (which 
changes the columns to be left aligned within the 
textarea of the slide rather than center aligned on the 
This slide shows the successfull result to align the 
margins of these two columns with the surrounding text to 
exactly \lstinline{\\textwidth}.
What to do?

Do your own math and specify column widths with spacing. 
These columns have equal width of 
{Issue \#262}: Provide more usable columns environment}

Leave a Reply

Your email address will not be published. Required fields are marked *