Document Classesbeamer | Frame Redefinition

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
erotavlas
Posts: 19
Joined: Thu Aug 04, 2011 3:53 pm

beamer | Frame Redefinition

Post by erotavlas »

Hi,

I have found an example of presentation made with beamer on the web that redefines the environment for the frame. The code is

Code: Select all

\newenvironment{lslide}[1] 
{\begin{frame}
{\begin{center}#1 
\end{center}}}
{\end{frame}}
I have read the beamer documentation, but I don't understand well some fields. In particular, at what do the fields [1] and #1 mean?

Thank you

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

beamer | Frame Redefinition

Post by frabjous »

The [1] indicates that the environment takes one argument (as opposed to 2 or 3 or none), and the #1 indicates where in the code the text from that (first) argument should go.

So if you write:

Code: Select all

\begin{lslide}{Argument}
Something here
\end{lslide}
This expands to:

Code: Select all

\begin{frame}
\begin{center}Argument
\end{center}
Something here
\end{frame}
So the #1 in the environment definition is replaced by the argument.
erotavlas
Posts: 19
Joined: Thu Aug 04, 2011 3:53 pm

beamer | Frame Redefinition

Post by erotavlas »

Ok, now it more clear. Another question: if I would like to modify the margin (top, bottom, left, right) of the slide to allow more text, how can I do?
It's better to change the newenvironment of the slide or to use

Code: Select all

\setbeamersize{text margin left=0.15cm,text margin right=0.15cm}
that works only for the left and right margins.

Thank you
erotavlas
Posts: 19
Joined: Thu Aug 04, 2011 3:53 pm

Re: beamer | Frame Redefinition

Post by erotavlas »

Can somebody help me? Essentially, I would like to have more space on the slide. I need to write a lot of text.

Thank
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

beamer | Frame Redefinition

Post by localghost »

You should not place to much content in a frame or a slide of a frame, respectively. Your audience wants to listen to you. You should have the major part of their attention with your remarks. So there is not much time to read all the content of a frame. The slides will complement your talk. I suggest to read Chapter 5 of the beamer user guide for some suggestions and guidelines on the structure of a presentation. You should reconsider any of your planned redefinitions of a frame.


Thorsten
erotavlas
Posts: 19
Joined: Thu Aug 04, 2011 3:53 pm

Re: beamer | Frame Redefinition

Post by erotavlas »

Thank you for your tips, but my presentation is for an exam not for an audience. So I need to be clear on what I'm talking about.
Do you have any suggestions about the structure?

Thank
Post Reply