Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there an option that I can use within \begin{frame}... \end{frame} so that the enclosed text always appears at same location on different beamer slides?

Ideally, I want something like this:

\begin{frame}{slide title}
some-option{\bf mytext} 
.....
\end{frame}

What I want is that no matter what "mytext" is, and no matter what the stuff following it is "....", "mytext" is always placed at same location: just below the title, at the right corner.

I tried using \hspace{..}\vspace{..}{\bf mytext}, but I need to change the space values in every single slide manually. And even then, the placement looks only approximately same on slides (visually).

share|improve this question
    
have you looked at the textpos package with absolute (option) positioning? –  prettygully Mar 31 '11 at 22:07
2  
See also Absolute positioning in beamer and LaTeX and the answer to Insert graphic at precise place on a page where 5 ways are described. –  Stefan Kottwitz Mar 31 '11 at 22:10
    
As already pointed out, textpos is the way to go here. Note, however, that textpos does not go well together with pgfpages, which is used internally by beamer for stuff like [notes on second screen]; some also use it to produce 4up handouts. The problem is that textpos and pgfpages interact on the shipout level -- the textpos-placed material ends up on every pgfpage! –  Daniel Apr 1 '11 at 7:21
    
Just for sake of completeness: An often mentioned alternative to textpos that does not work is to employ tikz`s absolute positioning (via the (current page) node and the [overlay] option). With beamer frames I never got it working, it seems that the size of (current page) is somehow calculated on the fly by beamer and changes with the content. –  Daniel Apr 1 '11 at 7:28

2 Answers 2

As already said, tikz can help you to do the job:

\documentclass{beamer}

\usepackage{tikz}

\addtobeamertemplate{frametitle}{}{\tikz[overlay, remember picture] \node at (current page.north east) [left,yshift=-0.15\textheight] {\bf text};}

\begin{document}
\begin{frame}{title 1}
\end{frame}
\begin{frame}{title 2}
\end{frame}
\end{document}
share|improve this answer
    
Hi! Welcome to TeX-SX. I put your code into a code block to make it easier to read. –  Loop Space Apr 1 '11 at 12:14
    
was trying to do it myself! thanks –  capitalaslash Apr 1 '11 at 12:17

With the help of the textpos package you can define a command that puts its argument at an absolute position; an example:

\documentclass{beamer}
\usepackage[absolute,overlay]{textpos}
\usepackage{everypage}

\newcommand\MyText[1]{%
  \begin{textblock*}{5cm}(.7\textwidth,1cm)%
    #1
  \end{textblock*}
}
\begin{document}

\begin{frame}{First frame}
\MyText{\bfseries Text for the first frame}
Some test text
\end{frame}

\begin{frame}{Second frame}
\MyText{\itshape Text for the second frame}
Some test text
\end{frame}

\end{document}

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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