How can I remove irrelevant strings shown when includegraphics command is used with grffile package?












0















I have read the following posts on this site:
How to avoid showing the filename when using graphicx? and Include figure from PDF file, but havent had any luck following the answers posted in the questions.



I am using includegraphics to bring in figures and the file locations for the figures are showing up with the figures when I compile the PDF.



A working example:



 documentclass[12pt]{article}

%preamble - set document settings

%package for loading images
usepackage{graphicx}

%package needed for setting graphicspath with spaces in directory name
usepackage[space]{grffile}

begin{document}

includegraphics[width=0.5linewidth]{{S:/Adv/Scallop Central/Logos/fullcolorlogo}.png}

end{document}


I have also tried the following:



includegraphics[width=0.5linewidth]{{"S:/Adv/Scallop Central/Logos/fullcolorlogo"}.png}


includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png}


but the PDF did not compile. There was a warning that the image couldn't loaded because it is not a recognized file format.



When I do get the image in the PDF it looks like:



enter image description here



Any help would be appreciated .










share|improve this question









New contributor




user41509 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Did you try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"}?

    – Sigur
    Feb 12 at 19:56











  • Why is the .png outside? I've never seen anyone do that "...." Ln the entire file name should be enough. Best if course is to never use spaces in folder or file names

    – daleif
    Feb 12 at 19:57











  • The answer below is why - it is from one of the two other answers above usepackage{graphicx} begin{document} begin{figure} includegraphics{{"../Current folder/1.This file"}.png} end{figure} end{document}

    – user41509
    Feb 12 at 20:01













  • Yes I did try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"} and got the same error message.

    – user41509
    Feb 12 at 20:05






  • 1





    with pdflatex includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png} should work (although not having spaces is better and not having the full path makes the document more portable) so includegraphics[width=0.5linewidth]{fullcolorlogo} would be best. If you are using latex+dvips then it can not include png files. This form should work just with graphicx, you don't need grffile

    – David Carlisle
    Feb 12 at 20:52


















0















I have read the following posts on this site:
How to avoid showing the filename when using graphicx? and Include figure from PDF file, but havent had any luck following the answers posted in the questions.



I am using includegraphics to bring in figures and the file locations for the figures are showing up with the figures when I compile the PDF.



A working example:



 documentclass[12pt]{article}

%preamble - set document settings

%package for loading images
usepackage{graphicx}

%package needed for setting graphicspath with spaces in directory name
usepackage[space]{grffile}

begin{document}

includegraphics[width=0.5linewidth]{{S:/Adv/Scallop Central/Logos/fullcolorlogo}.png}

end{document}


I have also tried the following:



includegraphics[width=0.5linewidth]{{"S:/Adv/Scallop Central/Logos/fullcolorlogo"}.png}


includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png}


but the PDF did not compile. There was a warning that the image couldn't loaded because it is not a recognized file format.



When I do get the image in the PDF it looks like:



enter image description here



Any help would be appreciated .










share|improve this question









New contributor




user41509 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Did you try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"}?

    – Sigur
    Feb 12 at 19:56











  • Why is the .png outside? I've never seen anyone do that "...." Ln the entire file name should be enough. Best if course is to never use spaces in folder or file names

    – daleif
    Feb 12 at 19:57











  • The answer below is why - it is from one of the two other answers above usepackage{graphicx} begin{document} begin{figure} includegraphics{{"../Current folder/1.This file"}.png} end{figure} end{document}

    – user41509
    Feb 12 at 20:01













  • Yes I did try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"} and got the same error message.

    – user41509
    Feb 12 at 20:05






  • 1





    with pdflatex includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png} should work (although not having spaces is better and not having the full path makes the document more portable) so includegraphics[width=0.5linewidth]{fullcolorlogo} would be best. If you are using latex+dvips then it can not include png files. This form should work just with graphicx, you don't need grffile

    – David Carlisle
    Feb 12 at 20:52
















0












0








0


1






I have read the following posts on this site:
How to avoid showing the filename when using graphicx? and Include figure from PDF file, but havent had any luck following the answers posted in the questions.



I am using includegraphics to bring in figures and the file locations for the figures are showing up with the figures when I compile the PDF.



A working example:



 documentclass[12pt]{article}

%preamble - set document settings

%package for loading images
usepackage{graphicx}

%package needed for setting graphicspath with spaces in directory name
usepackage[space]{grffile}

begin{document}

includegraphics[width=0.5linewidth]{{S:/Adv/Scallop Central/Logos/fullcolorlogo}.png}

end{document}


I have also tried the following:



includegraphics[width=0.5linewidth]{{"S:/Adv/Scallop Central/Logos/fullcolorlogo"}.png}


includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png}


but the PDF did not compile. There was a warning that the image couldn't loaded because it is not a recognized file format.



When I do get the image in the PDF it looks like:



enter image description here



Any help would be appreciated .










share|improve this question









New contributor




user41509 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have read the following posts on this site:
How to avoid showing the filename when using graphicx? and Include figure from PDF file, but havent had any luck following the answers posted in the questions.



I am using includegraphics to bring in figures and the file locations for the figures are showing up with the figures when I compile the PDF.



A working example:



 documentclass[12pt]{article}

%preamble - set document settings

%package for loading images
usepackage{graphicx}

%package needed for setting graphicspath with spaces in directory name
usepackage[space]{grffile}

begin{document}

includegraphics[width=0.5linewidth]{{S:/Adv/Scallop Central/Logos/fullcolorlogo}.png}

end{document}


I have also tried the following:



includegraphics[width=0.5linewidth]{{"S:/Adv/Scallop Central/Logos/fullcolorlogo"}.png}


includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png}


but the PDF did not compile. There was a warning that the image couldn't loaded because it is not a recognized file format.



When I do get the image in the PDF it looks like:



enter image description here



Any help would be appreciated .







graphics includegraphics






share|improve this question









New contributor




user41509 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




user41509 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 1 min ago









Martin Scharrer

202k46643820




202k46643820






New contributor




user41509 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Feb 12 at 19:49









user41509user41509

1162




1162




New contributor




user41509 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





user41509 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






user41509 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Did you try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"}?

    – Sigur
    Feb 12 at 19:56











  • Why is the .png outside? I've never seen anyone do that "...." Ln the entire file name should be enough. Best if course is to never use spaces in folder or file names

    – daleif
    Feb 12 at 19:57











  • The answer below is why - it is from one of the two other answers above usepackage{graphicx} begin{document} begin{figure} includegraphics{{"../Current folder/1.This file"}.png} end{figure} end{document}

    – user41509
    Feb 12 at 20:01













  • Yes I did try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"} and got the same error message.

    – user41509
    Feb 12 at 20:05






  • 1





    with pdflatex includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png} should work (although not having spaces is better and not having the full path makes the document more portable) so includegraphics[width=0.5linewidth]{fullcolorlogo} would be best. If you are using latex+dvips then it can not include png files. This form should work just with graphicx, you don't need grffile

    – David Carlisle
    Feb 12 at 20:52





















  • Did you try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"}?

    – Sigur
    Feb 12 at 19:56











  • Why is the .png outside? I've never seen anyone do that "...." Ln the entire file name should be enough. Best if course is to never use spaces in folder or file names

    – daleif
    Feb 12 at 19:57











  • The answer below is why - it is from one of the two other answers above usepackage{graphicx} begin{document} begin{figure} includegraphics{{"../Current folder/1.This file"}.png} end{figure} end{document}

    – user41509
    Feb 12 at 20:01













  • Yes I did try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"} and got the same error message.

    – user41509
    Feb 12 at 20:05






  • 1





    with pdflatex includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png} should work (although not having spaces is better and not having the full path makes the document more portable) so includegraphics[width=0.5linewidth]{fullcolorlogo} would be best. If you are using latex+dvips then it can not include png files. This form should work just with graphicx, you don't need grffile

    – David Carlisle
    Feb 12 at 20:52



















Did you try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"}?

– Sigur
Feb 12 at 19:56





Did you try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"}?

– Sigur
Feb 12 at 19:56













Why is the .png outside? I've never seen anyone do that "...." Ln the entire file name should be enough. Best if course is to never use spaces in folder or file names

– daleif
Feb 12 at 19:57





Why is the .png outside? I've never seen anyone do that "...." Ln the entire file name should be enough. Best if course is to never use spaces in folder or file names

– daleif
Feb 12 at 19:57













The answer below is why - it is from one of the two other answers above usepackage{graphicx} begin{document} begin{figure} includegraphics{{"../Current folder/1.This file"}.png} end{figure} end{document}

– user41509
Feb 12 at 20:01







The answer below is why - it is from one of the two other answers above usepackage{graphicx} begin{document} begin{figure} includegraphics{{"../Current folder/1.This file"}.png} end{figure} end{document}

– user41509
Feb 12 at 20:01















Yes I did try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"} and got the same error message.

– user41509
Feb 12 at 20:05





Yes I did try {"S:/Adv/Scallop Central/Logos/fullcolorlogo.png"} and got the same error message.

– user41509
Feb 12 at 20:05




1




1





with pdflatex includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png} should work (although not having spaces is better and not having the full path makes the document more portable) so includegraphics[width=0.5linewidth]{fullcolorlogo} would be best. If you are using latex+dvips then it can not include png files. This form should work just with graphicx, you don't need grffile

– David Carlisle
Feb 12 at 20:52







with pdflatex includegraphics[width=0.5linewidth]{"S:/Adv/Scallop Central/Logos/fullcolorlogo".png} should work (although not having spaces is better and not having the full path makes the document more portable) so includegraphics[width=0.5linewidth]{fullcolorlogo} would be best. If you are using latex+dvips then it can not include png files. This form should work just with graphicx, you don't need grffile

– David Carlisle
Feb 12 at 20:52












1 Answer
1






active

oldest

votes


















1














Did you tried with no " and {} like below?



includegraphics[width=0.5linewidth]{S:/Adv/Scallop Central/Logos/fullcolorlogo.png}



I have tried with below code and it worked, but it does not worked when quotation marks are included.




UPDATE



I got similar result as above answer with XeLaTeX. The filename disappeared when I compiled with pdfLaTeX.




documentclass{article}

usepackage{graphicx}
usepackage[space]{grffile}

title{test}
author{tester}

begin{document}
maketitle

test

includegraphics[width=0.5textwidth]{/Users/j/Desktop/Screen Shot 2019-01-30 at 11.40.38.png}

end{document}


enter image description here






share|improve this answer










New contributor




z0nam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    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
    });


    }
    });






    user41509 is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f474571%2fhow-can-i-remove-irrelevant-strings-shown-when-includegraphics-command-is-used%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














    Did you tried with no " and {} like below?



    includegraphics[width=0.5linewidth]{S:/Adv/Scallop Central/Logos/fullcolorlogo.png}



    I have tried with below code and it worked, but it does not worked when quotation marks are included.




    UPDATE



    I got similar result as above answer with XeLaTeX. The filename disappeared when I compiled with pdfLaTeX.




    documentclass{article}

    usepackage{graphicx}
    usepackage[space]{grffile}

    title{test}
    author{tester}

    begin{document}
    maketitle

    test

    includegraphics[width=0.5textwidth]{/Users/j/Desktop/Screen Shot 2019-01-30 at 11.40.38.png}

    end{document}


    enter image description here






    share|improve this answer










    New contributor




    z0nam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      1














      Did you tried with no " and {} like below?



      includegraphics[width=0.5linewidth]{S:/Adv/Scallop Central/Logos/fullcolorlogo.png}



      I have tried with below code and it worked, but it does not worked when quotation marks are included.




      UPDATE



      I got similar result as above answer with XeLaTeX. The filename disappeared when I compiled with pdfLaTeX.




      documentclass{article}

      usepackage{graphicx}
      usepackage[space]{grffile}

      title{test}
      author{tester}

      begin{document}
      maketitle

      test

      includegraphics[width=0.5textwidth]{/Users/j/Desktop/Screen Shot 2019-01-30 at 11.40.38.png}

      end{document}


      enter image description here






      share|improve this answer










      New contributor




      z0nam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        1












        1








        1







        Did you tried with no " and {} like below?



        includegraphics[width=0.5linewidth]{S:/Adv/Scallop Central/Logos/fullcolorlogo.png}



        I have tried with below code and it worked, but it does not worked when quotation marks are included.




        UPDATE



        I got similar result as above answer with XeLaTeX. The filename disappeared when I compiled with pdfLaTeX.




        documentclass{article}

        usepackage{graphicx}
        usepackage[space]{grffile}

        title{test}
        author{tester}

        begin{document}
        maketitle

        test

        includegraphics[width=0.5textwidth]{/Users/j/Desktop/Screen Shot 2019-01-30 at 11.40.38.png}

        end{document}


        enter image description here






        share|improve this answer










        New contributor




        z0nam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        Did you tried with no " and {} like below?



        includegraphics[width=0.5linewidth]{S:/Adv/Scallop Central/Logos/fullcolorlogo.png}



        I have tried with below code and it worked, but it does not worked when quotation marks are included.




        UPDATE



        I got similar result as above answer with XeLaTeX. The filename disappeared when I compiled with pdfLaTeX.




        documentclass{article}

        usepackage{graphicx}
        usepackage[space]{grffile}

        title{test}
        author{tester}

        begin{document}
        maketitle

        test

        includegraphics[width=0.5textwidth]{/Users/j/Desktop/Screen Shot 2019-01-30 at 11.40.38.png}

        end{document}


        enter image description here







        share|improve this answer










        New contributor




        z0nam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer








        edited yesterday





















        New contributor




        z0nam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Feb 13 at 8:14









        z0namz0nam

        134




        134




        New contributor




        z0nam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        z0nam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        z0nam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






















            user41509 is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            user41509 is a new contributor. Be nice, and check out our Code of Conduct.













            user41509 is a new contributor. Be nice, and check out our Code of Conduct.












            user41509 is a new contributor. Be nice, and check out our Code of Conduct.
















            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%2f474571%2fhow-can-i-remove-irrelevant-strings-shown-when-includegraphics-command-is-used%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

            サソリ

            広島県道265号伴広島線

            Setup Asymptote in Texstudio