开发者

How can I top-align the content of a "fragile" frame in a LaTeX Beamer presentation?

开发者 https://www.devze.com 2023-01-14 03:24 出处:网络
So I am a total novice with LaTeX. I\'m working on beamer presentations for introductory programming lectures, so I frequently use the examplebox object in my slides. I was told that whenever I have a

So I am a total novice with LaTeX. I'm working on beamer presentations for introductory programming lectures, so I frequently use the examplebox object in my slides. I was told that whenever I have a frame that contains an examplebox, I need to declare it with the keyword 'fragile,' as in:

\begin{frame}[fragile]

I don't know precisely what this does, but I know my code will only compile if I use it. I have also gathered from the internet that if I want to top-align co开发者_开发技巧ntent on a frame, I add the 't' keyword, as in:

\begin{frame}[t]

Combining the two of these in what I, knowing very little about LaTeX, would consider to be the intuitive way, does not work.

\begin{frame}[t][fragile]

Nor does

\begin{frame}[fragile][t]

I'm guessing there is an easy solution to using both of these at the same time, but I'm having trouble finding a straight answer on the web. Can anyone shed some light?

Thanks!


Even if its too late to be of relevance to the original asker:

Optional arguments are usually stacked up using a comma as delimiter, i.e. the correct form should be

\begin{frame}[fragile,t]


did you try it with a semicolon?

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


For anyone who happens to come across this same problem... I didn't find a direct answer to how to put both the [t] and [fragile] tags on a frame. However, I did find a way to apply the [t] tag to the entire document, which is actually a better solution to the problem in my case.

To do this, replace the first line of the document:

\documentclass{beamer}

With this:

\documentclass[t]{beamer}

If anyone does know how to use two tags on a frame like I was asking though, I would still appreciate an answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消