GeneralColumns on a beamer slide

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
gozzi84
Posts: 15
Joined: Tue Nov 25, 2008 3:25 pm

Columns on a beamer slide

Post by gozzi84 »

I'm using LateX beamer for the slides of my dissertation.

I want two colums in one of my slides, in which in one I have a picture and in the other a block with a formula...

\begin{multicols}{2}{

\[ \mathnormal{
caplet(t)=\beta(t)\mathbb{E}_{t}^{\mathbb{Q}}\biggl[\frac{\tau(L(T,T+\tau)-K)^{+}}{\beta(T+\tau)}\biggl] }
\]
where $\mathnormal{L(T,T+\tau)}$ are MC simulated.

\begin{figure}
\centering
\includegraphics[width=0.40\textwidth]{C:/Users/Pictures/Test2.png}
\label{fig:Test2}
\end{figure}

}

\end{multicols}

If I write before my formula

\begin{block}{}

formula

\end{block}

the result is a block with width the entire slide and not only a half slide as I wanted....

Any ideas?


Thanks a lot!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Columns on a beamer slide

Post by gmedina »

Hi,

according to your code, you are using the multicol package with beamer. That's not necessary. To split a frame into columns, use the columns environment provided by beamer. Please refer to the beamer user guide (12.7 Splitting a Frame into Multiple Columns pp. 118 ff.)
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Columns on a beamer slide

Post by localghost »

The figure environment is not necessary here because the image is not to float. If you need a caption with a label, use the caption package which provides the \captionof command.


Best regards
Thorsten¹
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Columns on a beamer slide

Post by gmedina »

localghost wrote:The figure environment is not necessary here because the image is not to float. If you need a caption with a label, use the caption package which provides the \captionof command.
Yes, but, in presentation mode, beamer takes care of placing the figure where the environment starts and ignores any placement specification. The standard figure and table environments can be useful if the article mode is going to be used as well.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
gozzi84
Posts: 15
Joined: Tue Nov 25, 2008 3:25 pm

Re: Columns on a beamer slide

Post by gozzi84 »

Given we want two columns in a slides where:

- in the first I need a formula in a block

-in the second a table

For the table I had o problmes, but if I use the block environment the result is a block with width the entire slide and not only the colums as I wanted... any indeas?


Thanks
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Columns on a beamer slide

Post by gmedina »

Hi gozzi84,

the following code does what you expect with no problems (at least on my system). I attach the resulting pdf.

Code: Select all

\documentclass{beamer}

\begin{document}

\begin{frame}
  \begin{columns}
    \begin{column}{.5\linewidth}
      \begin{block}{Some equation}
         \begin{align*}
           a &= b\\
             &= d\\
             &= f
         \end{align*}
      \end{block}
    \end{column}
    \begin{column}{.5\linewidth}
      \begin{tabular}{cc}\hline
        some text & some text \\\hline
      \end{tabular}
    \end{column}
  \end{columns}
\end{frame}

\end{document}
In order to detect what could be wrong, we need a minimal working example showing your problem.
Attachments
test.pdf
(15.17 KiB) Downloaded 2438 times
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply