Problem reading figures that are not in the same .tex folderEPS figures are pixelized in the final PDF with...

Am I a Rude Number?

Predict mars robot position

Inventor that creates machine that grabs man from future

Meth dealer reference in Family Guy

Where was Karl Mordo in Infinity War?

Why can I easily sing or whistle a tune I've just heard, but not as easily reproduce it on an instrument?

How to add multiple differently colored borders around a node?

How to define a macro with multiple optional parameters?

Criticizing long fiction. How is it different from short?

Auto Insert date into Notepad

Charged enclosed by the sphere

Sometimes a banana is just a banana

What is better: yes / no radio, or simple checkbox?

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

Can chords be played on the flute?

Table enclosed in curly brackets

I am on the US no-fly list. What can I do in order to be allowed on flights which go through US airspace?

Wanted: 5.25 floppy to usb adapter

How to acknowledge an embarrassing job interview, now that I work directly with the interviewer?

Is it a fallacy if someone claims they need an explanation for every word of your argument to the point where they don't understand common terms?

If all harmonics are generated by plucking, how does a guitar string produce a pure frequency sound?

What happens if a wizard reaches level 20 but has no 3rd-level spells that they can use with the Signature Spells feature?

Dilemma of explaining to interviewer that he is the reason for declining second interview

When does coming up with an idea constitute sufficient contribution for authorship?



Problem reading figures that are not in the same .tex folder


EPS figures are pixelized in the final PDF with LyXFigures are not visible inside minipageTable caption not appearing in PNAS document classpdftex.def Error: File logo-eps-converted-to.pdf not foundEps figures are not diplaying?Figures are not nicely centered between paragraphsFigure number of three figures are sameThree figures on the same page, with captionsTwo figures on the same lineHow to put two figures in the same page?













0















I have two latex files, that are very similar. One works perfectly fine. and the other one mysteriously does not work. The only difference is that in the first one the image file is in the same folder as .tex file, and in the other one the image file is in a separate folder, but the full path is passed.



Code one:



documentclass{article}
usepackage{epsfig}
usepackage{amsmath}
usepackage{graphicx}
usepackage{epstopdf}

begin{document}
begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{test}
caption{test}
end{figure}

end{document}


Code two:



documentclass{article}
usepackage{epsfig}
usepackage{amsmath}
usepackage{graphicx}
usepackage{epstopdf}
begin{document}

begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{test}
caption{test}
end{figure}

begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{/home/amaleki/Desktop/test2}
caption{test2}
end{figure}

end{document}


Anyone has any clue what could have gone wrong here?



The log output is also not helping; it says repstopdf is executed safely.




(epstopdf) Output file:
(epstopdf) Command:
(epstopdf) includegraphics on input line 22.
runsystem(repstopdf --outfile=/home/amaleki/Desktop/test2-eps-converted-to.pdf
/home/amaleki/Desktop/test2.eps)...executed safely (allowed).
Package epstopdf Info: Result file: .
! Package pdftex.def Error: File `/home/amaleki/Desktop/test2-eps-converted-to.
pdf' not found.











share|improve this question

























  • you do not show the error that you get. tex has a security setting to disallow reading files not below the current directory but that isn't set by default, also unrelated do not use the epsfig package unless you need to emulate documents from 1990 using psfig.

    – David Carlisle
    Apr 17 '18 at 17:52











  • Thanks for the comment. That was very helpful. I added --shell-escape option and now it works. About your other comment, what other package then do you suggest when dealing with eps figures?

    – Amir
    Apr 17 '18 at 18:17











  • you do not need any other package, just delete the usepackage{epsfig} line.

    – David Carlisle
    Apr 17 '18 at 18:54
















0















I have two latex files, that are very similar. One works perfectly fine. and the other one mysteriously does not work. The only difference is that in the first one the image file is in the same folder as .tex file, and in the other one the image file is in a separate folder, but the full path is passed.



Code one:



documentclass{article}
usepackage{epsfig}
usepackage{amsmath}
usepackage{graphicx}
usepackage{epstopdf}

begin{document}
begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{test}
caption{test}
end{figure}

end{document}


Code two:



documentclass{article}
usepackage{epsfig}
usepackage{amsmath}
usepackage{graphicx}
usepackage{epstopdf}
begin{document}

begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{test}
caption{test}
end{figure}

begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{/home/amaleki/Desktop/test2}
caption{test2}
end{figure}

end{document}


Anyone has any clue what could have gone wrong here?



The log output is also not helping; it says repstopdf is executed safely.




(epstopdf) Output file:
(epstopdf) Command:
(epstopdf) includegraphics on input line 22.
runsystem(repstopdf --outfile=/home/amaleki/Desktop/test2-eps-converted-to.pdf
/home/amaleki/Desktop/test2.eps)...executed safely (allowed).
Package epstopdf Info: Result file: .
! Package pdftex.def Error: File `/home/amaleki/Desktop/test2-eps-converted-to.
pdf' not found.











share|improve this question

























  • you do not show the error that you get. tex has a security setting to disallow reading files not below the current directory but that isn't set by default, also unrelated do not use the epsfig package unless you need to emulate documents from 1990 using psfig.

    – David Carlisle
    Apr 17 '18 at 17:52











  • Thanks for the comment. That was very helpful. I added --shell-escape option and now it works. About your other comment, what other package then do you suggest when dealing with eps figures?

    – Amir
    Apr 17 '18 at 18:17











  • you do not need any other package, just delete the usepackage{epsfig} line.

    – David Carlisle
    Apr 17 '18 at 18:54














0












0








0








I have two latex files, that are very similar. One works perfectly fine. and the other one mysteriously does not work. The only difference is that in the first one the image file is in the same folder as .tex file, and in the other one the image file is in a separate folder, but the full path is passed.



Code one:



documentclass{article}
usepackage{epsfig}
usepackage{amsmath}
usepackage{graphicx}
usepackage{epstopdf}

begin{document}
begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{test}
caption{test}
end{figure}

end{document}


Code two:



documentclass{article}
usepackage{epsfig}
usepackage{amsmath}
usepackage{graphicx}
usepackage{epstopdf}
begin{document}

begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{test}
caption{test}
end{figure}

begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{/home/amaleki/Desktop/test2}
caption{test2}
end{figure}

end{document}


Anyone has any clue what could have gone wrong here?



The log output is also not helping; it says repstopdf is executed safely.




(epstopdf) Output file:
(epstopdf) Command:
(epstopdf) includegraphics on input line 22.
runsystem(repstopdf --outfile=/home/amaleki/Desktop/test2-eps-converted-to.pdf
/home/amaleki/Desktop/test2.eps)...executed safely (allowed).
Package epstopdf Info: Result file: .
! Package pdftex.def Error: File `/home/amaleki/Desktop/test2-eps-converted-to.
pdf' not found.











share|improve this question
















I have two latex files, that are very similar. One works perfectly fine. and the other one mysteriously does not work. The only difference is that in the first one the image file is in the same folder as .tex file, and in the other one the image file is in a separate folder, but the full path is passed.



Code one:



documentclass{article}
usepackage{epsfig}
usepackage{amsmath}
usepackage{graphicx}
usepackage{epstopdf}

begin{document}
begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{test}
caption{test}
end{figure}

end{document}


Code two:



documentclass{article}
usepackage{epsfig}
usepackage{amsmath}
usepackage{graphicx}
usepackage{epstopdf}
begin{document}

begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{test}
caption{test}
end{figure}

begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{/home/amaleki/Desktop/test2}
caption{test2}
end{figure}

end{document}


Anyone has any clue what could have gone wrong here?



The log output is also not helping; it says repstopdf is executed safely.




(epstopdf) Output file:
(epstopdf) Command:
(epstopdf) includegraphics on input line 22.
runsystem(repstopdf --outfile=/home/amaleki/Desktop/test2-eps-converted-to.pdf
/home/amaleki/Desktop/test2.eps)...executed safely (allowed).
Package epstopdf Info: Result file: .
! Package pdftex.def Error: File `/home/amaleki/Desktop/test2-eps-converted-to.
pdf' not found.








floats eps






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 11 hours ago









Sebastiano

10.4k42060




10.4k42060










asked Apr 17 '18 at 17:50









AmirAmir

11




11













  • you do not show the error that you get. tex has a security setting to disallow reading files not below the current directory but that isn't set by default, also unrelated do not use the epsfig package unless you need to emulate documents from 1990 using psfig.

    – David Carlisle
    Apr 17 '18 at 17:52











  • Thanks for the comment. That was very helpful. I added --shell-escape option and now it works. About your other comment, what other package then do you suggest when dealing with eps figures?

    – Amir
    Apr 17 '18 at 18:17











  • you do not need any other package, just delete the usepackage{epsfig} line.

    – David Carlisle
    Apr 17 '18 at 18:54



















  • you do not show the error that you get. tex has a security setting to disallow reading files not below the current directory but that isn't set by default, also unrelated do not use the epsfig package unless you need to emulate documents from 1990 using psfig.

    – David Carlisle
    Apr 17 '18 at 17:52











  • Thanks for the comment. That was very helpful. I added --shell-escape option and now it works. About your other comment, what other package then do you suggest when dealing with eps figures?

    – Amir
    Apr 17 '18 at 18:17











  • you do not need any other package, just delete the usepackage{epsfig} line.

    – David Carlisle
    Apr 17 '18 at 18:54

















you do not show the error that you get. tex has a security setting to disallow reading files not below the current directory but that isn't set by default, also unrelated do not use the epsfig package unless you need to emulate documents from 1990 using psfig.

– David Carlisle
Apr 17 '18 at 17:52





you do not show the error that you get. tex has a security setting to disallow reading files not below the current directory but that isn't set by default, also unrelated do not use the epsfig package unless you need to emulate documents from 1990 using psfig.

– David Carlisle
Apr 17 '18 at 17:52













Thanks for the comment. That was very helpful. I added --shell-escape option and now it works. About your other comment, what other package then do you suggest when dealing with eps figures?

– Amir
Apr 17 '18 at 18:17





Thanks for the comment. That was very helpful. I added --shell-escape option and now it works. About your other comment, what other package then do you suggest when dealing with eps figures?

– Amir
Apr 17 '18 at 18:17













you do not need any other package, just delete the usepackage{epsfig} line.

– David Carlisle
Apr 17 '18 at 18:54





you do not need any other package, just delete the usepackage{epsfig} line.

– David Carlisle
Apr 17 '18 at 18:54










1 Answer
1






active

oldest

votes


















1














It seams the eps-to-pdf converter is a bit messed up when parents directories are used, as it cannot find where to save the converted pdf. Deleting the usepackage{epsfig} won't help here, but you can specify to the epstopdf package the eps figure location when importing the module :



usepackage[outdir=./]{epstopdf}


Now putting a figure in the parent directory works. You can also specify an absolute path as outdir.



But for what it's worth, there is no problem if your figures are in a subdirectory rather than a parent directory :



begin{figure}
includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{fig/test}
caption{test2}
end{figure}


I hope this helped !






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f427061%2fproblem-reading-figures-that-are-not-in-the-same-tex-folder%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    It seams the eps-to-pdf converter is a bit messed up when parents directories are used, as it cannot find where to save the converted pdf. Deleting the usepackage{epsfig} won't help here, but you can specify to the epstopdf package the eps figure location when importing the module :



    usepackage[outdir=./]{epstopdf}


    Now putting a figure in the parent directory works. You can also specify an absolute path as outdir.



    But for what it's worth, there is no problem if your figures are in a subdirectory rather than a parent directory :



    begin{figure}
    includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{fig/test}
    caption{test2}
    end{figure}


    I hope this helped !






    share|improve this answer






























      1














      It seams the eps-to-pdf converter is a bit messed up when parents directories are used, as it cannot find where to save the converted pdf. Deleting the usepackage{epsfig} won't help here, but you can specify to the epstopdf package the eps figure location when importing the module :



      usepackage[outdir=./]{epstopdf}


      Now putting a figure in the parent directory works. You can also specify an absolute path as outdir.



      But for what it's worth, there is no problem if your figures are in a subdirectory rather than a parent directory :



      begin{figure}
      includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{fig/test}
      caption{test2}
      end{figure}


      I hope this helped !






      share|improve this answer




























        1












        1








        1







        It seams the eps-to-pdf converter is a bit messed up when parents directories are used, as it cannot find where to save the converted pdf. Deleting the usepackage{epsfig} won't help here, but you can specify to the epstopdf package the eps figure location when importing the module :



        usepackage[outdir=./]{epstopdf}


        Now putting a figure in the parent directory works. You can also specify an absolute path as outdir.



        But for what it's worth, there is no problem if your figures are in a subdirectory rather than a parent directory :



        begin{figure}
        includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{fig/test}
        caption{test2}
        end{figure}


        I hope this helped !






        share|improve this answer















        It seams the eps-to-pdf converter is a bit messed up when parents directories are used, as it cannot find where to save the converted pdf. Deleting the usepackage{epsfig} won't help here, but you can specify to the epstopdf package the eps figure location when importing the module :



        usepackage[outdir=./]{epstopdf}


        Now putting a figure in the parent directory works. You can also specify an absolute path as outdir.



        But for what it's worth, there is no problem if your figures are in a subdirectory rather than a parent directory :



        begin{figure}
        includegraphics[trim=0cm 0cm 0cm 0cm, clip=true, totalheight=0.2textheight]{fig/test}
        caption{test2}
        end{figure}


        I hope this helped !







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 17 '18 at 23:17

























        answered Apr 17 '18 at 19:24









        jeannejjeannej

        1208




        1208






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f427061%2fproblem-reading-figures-that-are-not-in-the-same-tex-folder%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

            Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...

            Castillo d'Acher Características Menú de navegación