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.

How can I put the image more to the left page side to have more space for it?

\begin{figure}[!htb]
\centering
\includegraphics[width=0.9\textwidth]{timetable}
\caption{Zeitplan}
\label{fig:timetable}
\end{figure}

thanks for your answer

share|improve this question
    
Try \centerline{} around \includegraphics and remove \centering –  JLDiaz Feb 25 '13 at 8:26
    
If I set the width=1.5\textwidth then the image is no longer centered on the page. But I want to have it centered. –  HotPizzaBox Feb 25 '13 at 8:31
    
Did you try \centerline{\includegraphics{...}} as suggested in my previous comment? –  JLDiaz Feb 25 '13 at 8:35
add comment

2 Answers 2

up vote 2 down vote accepted

To have it automatically centered the way you intend, a possible approach is to use the makebox command:

\begin{figure}[htbp]
\begin{center}
\makebox[\textwidth][c]{\includegraphics[width=1.1\textwidth]{timetable}}
\caption{using SE saves time}
\label{fig:timetable}
\end{center}
\end{figure}
share|improve this answer
    
Thanks that did the trick, and was easy to use. –  HotPizzaBox Feb 25 '13 at 9:12
add comment

The command \xput[<horiz-fract>]{<contents>} will put the center of <contents> at the fraction of the horizontal position. You can therefore shift the center of the graphics to the position you want.

\documentclass{article}
\usepackage{graphicx}

\newcommand\xput[2][0.5]{%
    \rule{#1\linewidth}{0pt}\makebox[0pt][c]{#2}\hfill}

\begin{document}
\begin{figure}
     \xput[0.5]{\includegraphics[width=1.25\linewidth]{timetable}}
     \caption{Zeitplan}
     \label{fig:timetable}
\end{figure}
\end{document}
share|improve this answer
    
Or use \centerline and let LaTeX center the figure :-), even if it is larger than \textsize (It will protrude both margins the same amount) –  JLDiaz Feb 25 '13 at 9:08
    
@JLDiaz: You did not read my answer :-( It also gives you the option to move the centre of the figure left or right (that was part of the question). This is useful if you want to hang it out into the outer margins or if you want to center the title of a graph, etc. –  Danie Els Feb 25 '13 at 9:19
    
I did read your answer (and gave it +1), but since the OP stated (in a comment) that he wanted the figure centered, I considered worthwhile to insist in the (much ignored) centerline solution –  JLDiaz Feb 25 '13 at 10:41
    
Fantastic answer, Mr. Danie. –  Dimitris Sfounis Dec 20 '13 at 9:46
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.