3

I want to design a titlepage for a beamer presentation (XeLaTeX, Miktex 2.9-64, Win7-64) and need to reduce the space between a rule and a graphic to 0.

My code:

\setbeamertemplate{background}
{\hspace{0.6\paperwidth}
\rule{0.1cm}{\paperheight}
\includegraphics[width=0.4\paperwidth,height=\paperheight]{mypicture}}

My result:

myresults

In the image above, the space I want gone is marked in red. What do I need to do?

6

You have spurious spaces and, moreover, the construction will be wider than \paperwidth.

\setbeamertemplate{background}
  {\hspace{0.6\paperwidth}%
   \hspace{-0.1cm}%
   \rule{0.1cm}{\paperheight}%
   \includegraphics[width=0.4\paperwidth,height=\paperheight]{mypicture}}

The % mask off the end-of-line which would count as an interword space; the negative \hspace command compensates for the rule width.

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.