How can I align the contents of a “fragile” frame in a LaTeX Beamer presentation?

So I'm new to LaTeX. I work on presentations at presentations for introductory lectures on programming, so I often use the object exampleboxin my slides. I was told that whenever I have a frame containing an example box, I need to declare it with the keyword "fragile", as in:

\begin{frame}[fragile]

I don’t know exactly what this does, but I know that my code will only compile if I use it. I also gathered from the Internet that if I want to align the content frame by frame, I add the keyword 't', as in:

\begin{frame}[t]

The combination of the two of them is that, knowing very little about LaTeX, I would consider it in an intuitive way, it does not work.

\begin{frame}[t][fragile]

Does not

\begin{frame}[fragile][t]

I guess there is a simple solution to using both of them at the same time, but it’s hard for me to find a direct answer on the Internet. Can anyone shed some light?

Thank!

+3
source share
3 answers

Even if its too late to be relevant to the original seeker:

Optional arguments are usually added using a comma as a separator, i.e. the correct shape should be

\begin{frame}[fragile,t]
+3
source

did it try with a semicolon?

this works great: \begin{frame}[fragile,t]

+2
source

, ... , [t] [fragile] . [t] , .

:

\documentclass{beamer}

:

\documentclass[t]{beamer}

If someone knows how to use two tags for a frame, as I asked, I would still be grateful for the answer.

0
source

Source: https://habr.com/ru/post/1763107/


All Articles