Saturday, 24 August 2013

Figure going too much into right in xelatex, not in latex

Figure going too much into right in xelatex, not in latex

My problem is somewhat similar to another question on this site . I tried
the answer given there but it didn't solve my problem.
The problem is that my figure goes too much into right, even though I have
used \centering command. This problem only comes on compiling with XeLaTex
and not with Latex; I don't know why. The MWE will illustrate this. Here
is code:
\documentclass[14pt,a4paper]{extbook}
\usepackage{float}
\usepackage{graphicx}
\usepackage[top=2.7cm, bottom=2.7cm, left=2.2cm, right=2.2cm]{geometry}
\begin{document}
\date{}
123456789123456789123456789123456789123456789
\begin{figure*}[htbp]
\centering
\includegraphics [scale=0.5] {MWE.eps}
\caption{Using centering}
\end{figure*}
123456789123456789123456789123456789123456789
\begin{figure*}[htbp]
\centering
\vbox{\vspace{1.8em}\includegraphics [scale=0.5] {MWE.eps}}
\caption{Using centering and vbox and vspace\{1.8em\}}
\end{figure*}
123456789123456789123456789123456789123456789
\begin{figure*}[htbp]
\centering
\hbox{\hspace{-0.4em}\includegraphics [scale=0.5] {MWE.eps}}
\caption{Using centering and hbox and hspace\{-4em\}}
\end{figure*}
\end{document}
Here is the output using XeLatex (on windows)
Here is the output using Latex (on linux)

No comments:

Post a Comment