Content AND Presentation

(Note to English-speaking readers: the links entitled Komentarze na tej stronie lead to comment pages.)

2017-04-24 Many variants of a Beamer presentation – part III

Some time ago I wrote about making both a presentation and lecture notes out of a single source in Beamer. I’m still using the setup shown there, but recently I encountered an unexpected problem.

Consider this:

\documentclass{article}
\usepackage{beamerarticle}

\begin{document}
\begin{frame}
  \frametitle{A frame with a theorem}
  \begin{theorem}
    A~cool theorem.
  \end{theorem}
\end{frame}

\begin{frame}<presentation>
  \frametitle{A~presentation-only frame with a theorem}
  \begin{theorem}
    Another theorem, visible only on a~presentation.
  \end{theorem}  
\end{frame}

\begin{frame}
  \frametitle{Another frame with a theorem}
  \begin{theorem}
    The final theorem.
  \end{theorem}
\end{frame}

\end{document}

If you compile this, you’ll spot the problem immediately: while the second theorem is not present in the pdf, its number is taken up, and we have Theorem 3 right after Theorem 1.

(In case of the beamer document class, everything works just fine – try it if you want.)

It does make sense. Imagine a Beamer theme which actually does typeset theorem numbers. You would like then your theorem labels in the presentation and in the lecture notes to match. Usually, this is not the case, though, and I don’t really care for theorem numbers in the slides. So, here’s my simple solution. (While at that, I also turn the frametitles off in the lecture notes. If you want to do that automatically for all slides, see here.)

\documentclass{article}
\usepackage{beamerarticle}

\theoremstyle{plain}
\newtheorem*{theorem*}{Theorem}

\begin{document}
\begin{frame}
  \frametitle<presentation>{A frame with a theorem}
  \begin{theorem}
    A~cool theorem.
  \end{theorem}
\end{frame}

\begin{frame}<presentation>
  \frametitle{A~presentation-only frame with a theorem}
  \begin{theorem*}
    Another theorem, visible only on a~presentation.
  \end{theorem*}  
\end{frame}

\begin{frame}
  \frametitle<presentation>{Another frame with a theorem}
  \begin{theorem}
    The final theorem.
  \end{theorem}
\end{frame}

\end{document}

CategoryEnglish, CategoryBlog, CategoryTeX, CategoryLaTeX, CategoryBeamer

Comments on this page

2017-04-16 Easter‼

The Lord has risen from the grave today! While it sounds unbelievable, it’s actually believable; it is in fact the thing most worth believing.

I wish to all my Catholic readers the joy coming from Our Lord’s Resurrection; the joy which will last much longer than our life on this earth. To all the rest I wish that you may find that joy. I hope to see all of you in Heaven one day!

As usual, I am going to offer a decade of Rosary for all people reading this.

Hallelujah!

CategoryEnglish, CategoryBlog, CategoryFaith

Comments on this page

2017-04-09 Quickly loading and finding your elisp files

This is a rather obvious hint – at least with hindsight – but someone might find it useful. If you’re like me, you may have a bunch of short elisp files with various small utilities you have written yourself in the past few years. For some reason, you may not want to load them at startup (maybe you want your Emacs to start as fast as posibble, maybe you don’t want to pollute the namespace with things that are only occasionally useful…). Then, you might want to say

(add-to-list 'load-path "~/path/to/your/utilities/directory")

in your init.el, and be able to quickly load them using load-library (using autocompletion). Maybe you even want to be able to find them fast – then, you can use find-library.

Also, if you don’t care about the finding stuff, only the loading, you may leverage another mechanism present in Emacs since very old times: autoloading. This is completely another story, though, and I encourage you to read the relevant portions of the manual some day.

CategoryEnglish, CategoryBlog, CategoryEmacs

Comments on this page

More...

(Więcej means More in Polish; click it to see older entries.)

CategoryEnglish, CategoryBlog