This is my code, but my picture is on the left!!! Can anyone share a better code? thanks a lot
\begin{figure}[H]
\centering
\includegraphics[width=25cm,height=25cm,keepaspectratio]{1.eps}
\caption{Aerial view}\label{fig:1}
\end{figure}
This is my code, but my picture is on the left!!! Can anyone share a better code? thanks a lot
\begin{figure}[H]
\centering
\includegraphics[width=25cm,height=25cm,keepaspectratio]{1.eps}
\caption{Aerial view}\label{fig:1}
\end{figure}
\centering will not centre anything that is wider than the page (as is the case with an image scaled to 25cm wide) all excess width will stick into the right margin (and TeX will issue overfill box warnings). The code shown will centre the image if it was scaled to a smaller width.
\makebox[0pt]{\includegraphics{..}} has width 0pt with the image centred in it, so if you centre that, the image will stick into both margins
– David Carlisle
Nov 08 '15 at 19:41
\includegraphics[width=\linewidth]{1}the image will become as wide as the text block. If it looks off-center then, it is likely because of white borders in the image file itself. – Torbjørn T. Sep 27 '14 at 08:27\includegraphics[width=\linewidth]and\includegraphics[width=\textwidth]? – Aradnix Sep 27 '14 at 09:07.epsextension then it will work with pdflatex as well as latex if you have a pdf version of the image – David Carlisle Sep 27 '14 at 09:18