When building a presentation using beamer...

The following two commands seem to do the same thing, is there an advantage of one over the other? What is best practice?

Option 1


Option 2

  • Welcome to TeX-SE! I strongly prefer option 2 because I have seen to many things going wrong with option 1. Things like the following are IMHO less cryptic: \documentclass{beamer} \begin{document} \begin{frame} \frametitle{[hello]} \end{frame} \end{document} – user121799 Jun 7 at 18:16
  • I saw some question that was entirely triggered by the shorter syntax yielding some unexpected result, but I cannot find it any more. :-( Another example that suggests to use \frametitle: \documentclass{beamer} \begin{document} \begin{frame} \frametitle<1>{[hello]} \frametitle<2>{[hello world]} \end{frame} \end{document} – user121799 Jun 7 at 18:50

I made this answer a community Wiki, hoping others will add more examples. My opinion is

use `\frametitle

Why? The beamer manual says about the frame environment

enter image description here

So you see that it is a very "rich" environment in the sense that you have tons of option. That is, even though you can pass the title to the \begin{frame} command, you need to take a lot of care not to screw up things. Also most of the examples in the manual use \frametitle. An explicit example of something that is easier to handle with the \frametitle command is

 \frametitle<2>{[hello world]} 

Another conceivable advantage of explicit \frametitles is that you can search for titles more easily in your document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.