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 have a figure in a .pdf file that I'd like to shift to the left a little bit in how it appears in the slide. How may I do this?

\frame
 { 
 \frametitle{Slide Title}
  \vspace{-0.75cm} 
   \begin{center}
   \includegraphics[width = 12.25cm]{PicTitle.pdf}
   \end{center}
 } 
share|improve this question
    
I'd note that there are technical reasons to prefer \begin{frame} ... \end{frame} over \frame{...} (nothing directly to do with the question in hand, but a general beamer comment). –  Joseph Wright Feb 12 '12 at 21:49

2 Answers 2

up vote 8 down vote accepted

You could try putting some space to the right of the figure.

\begin{center}
\includegraphics[width = 12.25cm]{PicTitle.pdf} \hspace*{4cm}
\end{center}

Just change the '4cm' as appropriate to get the effect you need.

share|improve this answer
    
Ian's answer helped tremendously, but didn't quite hit the nail on the coffin. See the following difference in the hspace. \frame { \frametitle{Slide Title} \begin{center} \hspace*{-0.35cm}\includegraphics[width = 12.75cm]{Pic.pdf} \end{center} } –  J G Feb 12 '12 at 22:05

Here are a number of ways of positioning elements horizontally within a frame:

enter image description here

\documentclass{beamer}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\newcommand{\theimage}{\includegraphics[width=15mm]{tiger}}% Shorthand
\begin{document}
\begin{frame}
  \hspace*{\fill}\theimage\hspace*{\fill}

  \hspace*{\fill}\hspace*{\fill}\theimage\hspace*{\fill}

  \hspace*{4cm}\theimage

  \hspace*{\fill}\theimage\hspace*{4cm}
\end{frame}
\end{document}

From top to bottom the displacement represents:

  1. Horizontally centred - similar to

    \centerline{\theimage}
    

    or

    \begin{center}
      \theimage
    \end{center}
    
  2. Horizontally positioned at with a ratio of 2:1 whitespace on either side (stemming from two \fills on the left and one on the right of \theimage). Other combinations will, of course, imply other ratios;

  3. Shifted a fixed length (4cm in the example) from the left margin;
  4. Shifted a fixed length (4cm in the example) from the right margin.

The use of \fill allows for something that has infinite stretch, while the starred version of \hspace is sometimes preferred when setting space from the text block boundaries inward.

In a similar way, adding a length <len> on one side within a centred image (say, left), pushes it away from that side (to the right) by half that distance (or .5<len>), as in @IanThompson's answer.

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.