2

I am trying using textblock with beamer. The problem is that I am not able to make the text appear.

\documentclass[10pt,handout]{beamer}
\setbeamertemplate{frametitle}[default][center]
\addtobeamertemplate{frametitle}{\vskip4.5ex}{} 
\usepackage[english,italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[absolute,showboxes]{textpos}
\setlength{\TPHorizModule}{10mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{0mm}{0mm} 
\usepackage{lmodern}

\title{Title}
\author{Name}
\date{}

\begin{document}

\begin{frame}
 \maketitle
\end{frame}

\begin{frame}
  \frametitle{\textbf{Title}}
\begin{textblock}{200}(0,0)
Text TextTextText Text Text Text Text Text Text Text Text Text Text Text Text 
\end{textblock}
\end{frame}
\end{document}

Edit: I would like to add a box at the top-right corner to all slides, even to the front page. I tried

\addtobeamertemplate{frametitle}{}{%
\begin{textblock}{10mm}(5,5)
\parbox{10cm}{\centering
\tiny \textbf{DE} Department}
\end{textblock}}

but I receive an error: Missing number, treated as zero.

  • You need to pass the overlay option to textpos. See the answer to tex.stackexchange.com/q/229845/24974 – erik Jan 29 '16 at 17:57
  • Thank you, now it works. But I am not able to place a box to the headline (I edited the original message). – Marco Jan 29 '16 at 18:37
  • \begin{textblock}{10}(5,5) But why do you combine it with \addtobeamertemplate{frametitle}? If you want it on every slide this will not work. The title page for example usually does not have a frame title. – Benjamin Jan 29 '16 at 19:13
  • I know that what I am asking is not usual, but in my case I would like to have a box "Department of Engineering" at the top-right corner of all slides. – Marco Jan 29 '16 at 19:26
  • If that is the only customization you want to do you could use eso-pic (\usepackage{eco-pic}\AddToShipoutPictureFG{\put(280,260){\fbox{\tiny Department of Engineering}}}). But that still doesn't feel right to me to place elements like this on the slides. It is probably better and easier to properly redefine the frametitle and title page beamer templates. – Benjamin Jan 29 '16 at 19:40
1

Placing your text in the logo-layer is probably saver, as it will be shown on all slides, including the title page and frames without frametitle.

\documentclass[10pt,handout]{beamer}
\setbeamertemplate{frametitle}[default][center]
\addtobeamertemplate{frametitle}{\vskip4.5ex}{} 
\usepackage[english,italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[absolute,showboxes]{textpos}
\setlength{\TPHorizModule}{10mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{0mm}{0mm} 
\usepackage{lmodern}

\title{Title}
\author{Name}
\date{}

\logo{%
    \vspace*{.9\paperheight}%
    \hfill \textbf{DE} Department%
}

\begin{document}

\begin{frame}
 \maketitle
\end{frame}

\begin{frame}
 test
\end{frame}

\end{document}

enter image description here

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.