1

I am writing a thesis in a large .tex file in Vim. I have a .jpg and .png high quality native images, that converted to .eps result in very a low quality. Visually, it is a lower quality. Therefore, I would like to include the jpg's and png's directly.

In the preamble, I declare:

    \usepackage{graphicx} 

And I also have the graphicx.sty file in the same folder.

When I complie, I get this error:

enter image description here

Here is the link to direct download of the image, in order to check previously if a possible solution works:

https://www.mediafire.com/?71cl62619ty6c9r

My preamble is this:

\documentclass[12pt,a4paper,twoside,openany]{report}
\usepackage[left=2.5cm,top=2.5cm,right=2.5cm,bottom=2.5cm]{geometry}
\parindent 1 true cm
\usepackage{graphicx}       
\usepackage{eufrak}
\usepackage[spanish]{babel}
\usepackage[latin1]{inputenc}  
\usepackage[T1]{fontenc}
\usepackage{times}   
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{float}
\usepackage{color}
\usepackage[longnamesfirst,super]{natbib}
\setcitestyle{square}
\usepackage{fancyhdr}   %llama al paquete para definición de estilo de pagina
\pagestyle{fancy}       %Idem                                 
\renewcommand{\chaptermark}[1]{\markboth{\thechapter .\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection .\ #1}{}}
\lhead{\nouppercase}
\rhead{\nouppercase}
\fancyhead[LE]{{\sf \leftmark}}
\fancyhead[RE]{}
\fancyhead[RO]{{\sf \rightmark}}
\fancyhead[LO]{}
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[CE,CO]{} 
\renewcommand{\headrulewidth}{0.0pt}                               
\renewcommand{\baselinestretch}{1.25}
\usepackage{adjustbox}
\usepackage{enumerate}  % Para poder poner un enumerar en I.
\usepackage{courier}
\usepackage[version=3]{mhchem}
\usepackage{rotating}
\usepackage[percent]{overpic} 
\begin{document}

Here is the code that introduces the image:

\begin{figure}
\centering

\includegraphics{image.jpg}

\label{image}

\end{figure}

I would appreciate very much if someone could help me, making tests with the image provided above, using my preamble, and the code that introduces the image. (I am writing the thesis .tex file in Vim).

DavidC.
  • 845
  • 3
    You have to use pdflatex, not latex – egreg Jun 18 '14 at 20:38
  • You are probably using latex rather than pdflatex: only direct PDF inclusion enables PNG and JPG inclusion. Either change your tool or convert your graphics to EPS format. – Joseph Wright Jun 18 '14 at 20:38
  • 2
    also you should not have graphicx.sty in the same folder, it is part of the core required latex distribution so you should never need a local copy (and having a local copy woul dbe bad if the core is everupdated) – David Carlisle Jun 18 '14 at 20:39
  • @egreg Ok, this is what I am doing: I am writing it in Vim, and in order to compile, in another Ubuntu shell I write:
    bash make_latex.sh
    
    

    Here there is the script: https://www.mediafire.com/?p6ha13gt53nilpv Ok, so how could I use pdflatex ?

    – DavidC. Jun 18 '14 at 20:48
  • Change latex into pdflatex in the .sh file – egreg Jun 18 '14 at 20:50
  • @egreg Ok, I have changed the script. Now, when I make bash make_latex.sh, I have the same error as the image above, but with the .eps figures. Is there a way to compile with .eps and .jpg figures ? – DavidC. Jun 18 '14 at 20:56
  • @DavidC. See: http://tex.stackexchange.com/q/383/32374 – darthbith Jun 18 '14 at 21:04
  • @egreg I have seen http://tex.stackexchange.com/questions/383/why-cant-pdflatex-print-eps-figures

    I have tried including

    \usepackage{epstopdf} 
    
    

    after the line

    \usepackage{graphicx}

    and with pdflatex in the script. The result is still error in the compilation with the .eps figures

    – DavidC. Jun 18 '14 at 21:23
  • Did you remove file extensions from \includegraphics{} commands and add -shell-escape to your pdflatex call as discussed in the linked answer? – Paul Gessler Jun 18 '14 at 21:27
  • @Paul Gessler Yes, I have done it as it says....exactly. But when compilation, the .eps figures produce errors. Any suggestion ? – DavidC. Jun 18 '14 at 21:42
  • 2
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Martin Schröder Jun 18 '14 at 21:54
  • @ Martin Schröder When I posted my question, I said: "My preamble is this...." And there is where I copied all the information you are telling me to include. It is just above... – DavidC. Jun 18 '14 at 22:06
  • 2
    Your sample code is neither complete nor minimal nor self-contained. For example, using the well-known tiger.eps: `\documentclass{report} \usepackage{graphicx} \usepackage{epstopdf}

    \begin{document} \includegraphics[width=0.5\linewidth]{example-image-a} \includegraphics[width=0.5\linewidth]{tiger} \end{document}`. That works on my system.

    – Paul Gessler Jun 18 '14 at 22:18
  • @DavidC.: Please include the complete minimal code allowing others to reproduce your problem. – Martin Schröder Jun 19 '14 at 23:01

0 Answers0