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.

I'm trying to create a business card in LaTeX. Accordingly, I want to use textpos to absolutely position the various elements.

For some reason, textpos is just not showing anything. What I want is for it to show things, where I put them. Any suggestions for how to fix this?

Before anyone asks, yes, the \includegraphics command works just fine outside of the textpos block. There is no difference in textpos behaviour whether or not I have the M -- that is just to sanity check that the margins are as expected (i.e. none)

I'm using MikTeX on Windows.

My LaTeX is below.

\documentclass{beamer}

\usepackage{fontspec}
\usepackage[absolute,showboxes,verbose]{textpos}
\usepackage{geometry}
\geometry{paperwidth=90mm, paperheight=45mm, layoutwidth=90mm, layoutheight=45mm, left=0mm, top=0mm, right=0mm, bottom=0mm}

\usetheme{}
\setbeamertemplate{navigation symbols}{} 

\begin{document}
%\fontspec[Ligatures=Rare,Contextuals=Swash,Contextuals=Alternate,StylisticSet=1,Style=TitlingCaps,Style=Alternate,Style=Swash,Contextuals=Swash]{Breathe Pro}\fontsize{12pt}{12pt}\selectfont
\fontspec{Palatino Linotype}\fontsize{12pt}{12pt}\selectfont
M

\begin{textblock*}{49mm}(10mm,10mm)\includegraphics[width=49mm]{tustinlogo01.png}\end{textblock*}

\end{document}
share|improve this question
    
Have a look on this business card question which has some examples, e.g. using TikZ. –  Martin Scharrer May 11 '11 at 16:26
    
Since this isn't really a question about the beamer class would you mind removing the beamer tag? –  Matthew Leingang May 11 '11 at 17:15
    
Well, it turns out that beamer is kind of the problem. –  Marcin May 11 '11 at 17:22
    
@Martin: Thanks, will do. –  Marcin May 11 '11 at 17:22
add comment

2 Answers

up vote 5 down vote accepted

Apparently textpos does not play well with beamer (see page 8 of the textpos documentation). Given what you are doing, it seems unlikely that the particular document class matters: with something like article, this seems to work as expected.

share|improve this answer
    
I guess this is the better option in the circumstances. Interestingly, the layout changed when I switched to article. –  Marcin May 11 '11 at 15:59
    
@Marcin: The main function of a class is to set the layout. You might also try the Koma Script version of article: scrartcl, which might be closer to the beamer style. –  Martin Scharrer May 11 '11 at 17:26
    
I note that textpos gives unexpected results if using \pagebreak. \newpage is needed instead. –  Marcin May 11 '11 at 21:06
add comment

You need to use the overlay option for textpos:

\documentclass{beamer}

\usepackage{fontspec}
\usepackage[absolute,showboxes,verbose,overlay]{textpos}
\usepackage{geometry}
\geometry{paperwidth=90mm, paperheight=45mm, layoutwidth=90mm, layoutheight=45mm, left=0mm, top=0mm, right=0mm, bottom=0mm}

\usetheme{}
\setbeamertemplate{navigation symbols}{} 

\begin{document}
%\fontspec[Ligatures=Rare,Contextuals=Swash,Contextuals=Alternate,StylisticSet=1,Style=TitlingCaps,Style=Alternate,Style=Swash,Contextuals=Swash]{Breathe Pro}\fontsize{12pt}{12pt}\selectfont
\fontspec{Palatino Linotype}\fontsize{12pt}{12pt}\selectfont
M

\begin{textblock*}{49mm}(10mm,10mm)\includegraphics[width=49mm]{tustinlogo01.png}\end{textblock*}

\end{document}

See the beamer manual (p. 20):

beamer automatically installs a white background behind everything, unless you install a different background template. Because of this, you must use the overlay option when using textpos, so that it will place boxes in front of everything. Alternatively, you can install an empty background template, but this may result in an incorrect display in certain situtations with older versions of the Acrobat Reader.

share|improve this answer
    
Thanks, this works. HOWEVER, I would love to know why this is the case. –  Marcin May 11 '11 at 15:56
1  
@Marcin See my edited answer –  Thorsten May 11 '11 at 15:57
add comment

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.