I would like to redefine Beamer's frame environment to provide different templates as part of a theme. However, I'm having some trouble accessing Beamer's variable from inside that code.


\begin{tikzpicture}[remember picture,overlay]%
  {\node[draw,anchor=west,text width=.6\textwidth] at (1,0) {\insertframetitle};}%


  \frametitle{My Title}


This produces no text inside of the text box. example.pdf

However, if I replace "\insertframetitle" with some fixed text, it works. enter image description here

Why is the variable not available in my environment?


I think this command is only available from inside a beamer template. In any case, redefining the frame environment is a bad idea. Instead, try changing the style using beamer template commands (you may need to adjust the spacing):

  \begin{tikzpicture}[remember picture,overlay]%
  {\node[draw,anchor=west,text width=.6\textwidth] at (1,0) {\normalsize \insertframetitle};}%

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.