Graphics, Figures & TablesProblem with graphics

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Problem with graphics

Post by NELLLY »

Hi
I faced problems with my laptop so I changed the computed working with. I pasted in it all the files of miktex, latex and winedit from my old computer. Also I saved the fold of my graphics on it.
The problem is when I typset the file an error message indicates that the file containg the image is not found. However in the pdf the graph appears.

Code: Select all

\documentclass [12pt]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\topmargin} {-3cm} \setlength{\headheight} {1.5cm}
\setlength{\headsep} {1cm} \setlength{\oddsidemargin} {1cm}
\setlength{\textheight} {21cm} \setlength{\textwidth} {15cm}
\renewcommand{\baselinestretch}{1.5}
%\makeatletter
%\renewcommand*\l@section{\@dottedtocline{1}{0em}{2.3em}}
%\renewcommand*\l@subsection{\@dottedtocline{2}{0em}{3.2em}}
%\makeatother
\setcounter{tocdepth}{4} \setcounter{secnumdepth}{3}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{graphicx}
%\usepackage[pdftex]{graphicx}
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\usepackage{titletoc}
%\usepackage{fancychapters}
\usepackage[Lenny]{fncychap}
\usepackage{lettrine}
\usepackage{dropping}
\usepackage{float}
\usepackage{tabularx}
\usepackage{rotating}
\usepackage{amsmath}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}

\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{} \fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\addtolength{\headheight}{0.5pt}
\renewcommand{\footrulewidth}{0pt}

\fancypagestyle{plain}{%
  \fancyhead{}
  \renewcommand{\headrulewidth}{0pt}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





\begin{document}

\makeatletter
\renewcommand{\fnum@figure}{\small\textit{\figurename~\thefigure}}
\makeatother
\title{On Adaptive control charts for attribute data}
%\maketitle%

%\titleformat{\chapter}[display]
%{\normalfont\Large\filcenter\sffamily}
%{\titlerule[1pt]%
%\vspace{1pt}%
%\titlerule
%\vspace{1pc}%
%\LARGE\MakeUppercase{\chaptertitlename} \thechapter} {1pc}
%{\titlerule
%\vspace{1pc}%
%\Huge}

\tableofcontents %\pagestyle{myheadings}
 \hyphenpenalty 10000
\listoftables
\listoffigures
%%%%%%%%%%%%%%My Lenny style%%%%%%%%
\ChNameVar{\fontsize{14}{6}\usefont{OT1}{phv}{m}{n}\selectfont\rm\bfseries}
\ChNameUpperCase
\ChNumVar{\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont}
\ChTitleVar{\itshape\Huge\bfseries\center} \ChRuleWidth{2pt} %\rm
%\filcenter
\include{chap1}


\end{document}


Last edited by NELLLY on Fri Mar 25, 2011 11:40 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Problem with graphics

Post by Stefan Kottwitz »

Hi Nellly,

we could help better if you would
  • tell us the error message
  • say if you use pdfLaTeX or LaTeX or which engine
  • tell us the image format you use
  • show code that loads image (your code above doesnt show)
Just try to provide more information please.

Stefan
LaTeX.org admin
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Problem with graphics

Post by NELLLY »

Hi Stefan,
I tried now a shorter example to see if the problem is still there.

Code: Select all

\documentclass{report}

\usepackage{graphicx}
\begin{document}
ESSAIGRAPH
\begin{figure}[H]
\begin{center}
\includegraphics [width=0.95\textwidth, angle=-90] {C:/MESIMAGES/TSS}
\vspace*{-6cm} \caption{...}\label{...}
\end{center}
\end{figure}
\end{document}
the problem is still there.
the message error is

LaTeX Error File 'C:/MESIMAGES/TSS' not found
could not locate the file with any of these extensions:.eps, .ps, .eps.gs.


My figure is saved in pdf extension. With my old computer I didn't get this error message.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: Problem with graphics

Post by Stefan Kottwitz »

Hi Nellly,

you need to compile with pdfLaTeX as you did on your other computer. Compile directly to pdf. There should be a button for it, also in WinEdt, check buttons, toolbar, menu. Don't use classic LaTeX, this would require .ps instead of .pdf. This is, what the error message means.

Stefan
LaTeX.org admin
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Re: Problem with graphics

Post by NELLLY »

Many thanks Stefan. Before I compiled the file with Latex then pdflatex. your solution works well.
Post Reply