I just saved an .eps file that it can not be uploaded to latex and it shows as in the photo , how would I resolve it ? this is the code , when I use smaller dimensions it's in the center , but with this one , I increased a little bit , and it went out of the center

\caption{Deflection and weight as functions of D11 and D12}
\includegraphics[width=15cm, height=8cm]{4-23.eps}


also this is my main file codes , that I don't know how to make a minimal , I mean , I know the link to minimal but here it's just too much and confusing


\graphicspath{ {images/} }

\setlength{\oddsidemargin} {2. cm}
\setlength{\evensidemargin} {2. cm}
\addtolength{\oddsidemargin} {-0.4 cm}
\addtolength{\evensidemargin} {-0.4 cm}

\renewcommand{\captionfont}{\normalfont \sffamily \itshape \small}



\thispagestyle{empty} \normalfont \cleardoublepage
\thispagestyle{empty}  \cleardoublepage
\thispagestyle{empty} \vspace*{.75truecm} \cleardoublepage
\thispagestyle{empty} \vspace*{.75truecm} \normalfont \cleardoublepage
\pagestyle{plain}\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}} 
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}         



% ---- Bibliography ----


\renewcommand{\chaptermark}[1]{\markboth{\appendixname\ \thechapter.\ #1}{}} 
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}         


\renewcommand\listfigurename{list of figures}\listoffigures
\renewcommand\listtablename{list of tables}\listoftables

%\phantomsection\addcontentsline{toc}{chapter}{list of symbols}\input{FrontMat/Symbols}

  • 4
    Probably 15cm is wider than \textwidth, please see Center figure that is wider than \textwidth. Please also see Why does an environment's label have to appear after the caption? because your labeling is incorrect at the moment. :-) Mar 29, 2015 at 19:20
  • 2
    Also, note that \label should go after \caption, or else any \ref that refers to the figure will be completely wrong. (As in, it will refer to the section number instead of the figure number, or something equally silly.)
    – Mark
    Mar 29, 2015 at 19:25
  • 2
    @Farzad64 please use @-username notation (as I've done here for you) to notify other commenters of your replies. It's probably also the reason your tables don't center, but it's impossible to say for sure without a minimal working example (MWE). Mar 29, 2015 at 19:36
  • 3
    @Farzad64: You should not turn the screw on such lengths as paperwidth directly. Use the excellent geometry package for this
    – user31729
    Mar 29, 2015 at 20:44
  • 3
    As SoundsOfSilence says, don't modify these directly unless you really know what you are doing and why you can't avoid it. However, if you are really printing on A4, you do not want paperwidth to be 16cm unless you are doing some complicated layout with trimming or multiple pages to one physical page. The width of A4 paper is 210mm - not 160.
    – cfr
    Mar 29, 2015 at 20:50

1 Answer 1


Here's a guess at what you might want, after minimising your example:



\usepackage[textwidth=160mm, textheight=240mm, hmarginratio=1:1, showframe]{geometry}



    \caption{Deflection and weight as functions of D11 and D12\label{fig:f419}}
    \includegraphics[width=15cm, height=8cm]{4-23.eps}



centred image

  • thank you so much, I am comparing it with my doc , is the demo in \usepackage[demo]{graphicx} , make difference also ? @cfr
    – Farzad64
    Mar 29, 2015 at 21:03
  • 1
    @Farzad64 The demo is because I don't have the image you have. Otherwise, I get an error when I try to compile. demo replaces all such images by black boxes.
    – cfr
    Mar 29, 2015 at 21:30
  • 3
    @Farzad64: I strongly suggest to read introductory books on LaTeX as well the documentation of packages which is in most cases installed too together with them.
    – user31729
    Mar 29, 2015 at 21:45
  • 2
    @cfr: I wished I could upvote your comments, but I run out of upvotes for them ... but anyway (+1) for the post itself ;-)
    – user31729
    Mar 29, 2015 at 21:55
  • @SoundsOfSilence ;). That happens to me too. I must upvote lots of comments!
    – cfr
    Mar 29, 2015 at 22:10

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.