How to set a defined horizontal padding between includegraphics images












2














How can I set a fixed horizontal padding between my images?
I'm using (in my master file):



usepackage[export]{adjustbox}



With this in my included file:



newcommand{vastehoogte}[1]{includegraphics[height=1textheight,keepaspectratio]{#1}}



to insert images this way:



begin{adjustbox}{max width=1textwidth}

vastehoogte{1.JPG}
vastehoogte{2.JPG}
vastehoogte{3.JPG}
vastehoogte{4.JPG}
vastehoogte{7.JPG}
vastehoogte{8.JPG}

end{adjustbox}

par}


However I cannot seem to get a few mm's of padding between the images with vspace or something else. Can someone help me?










share|improve this question
























  • Did you try some horizontal space? Like thinspace or quad ?
    – Thruston
    Oct 12 '18 at 22:12










  • Yes, I tried quad in multiple places/formattings (I have to admit, I'm very very new to Latex) and it worked. But when I zoomed in on my PDF, I noticed there was this quad in text on the PDF (at 100% zoom it just looked like a small line).
    – Dimi Mett
    Oct 12 '18 at 22:23






  • 2




    whatever you could see would not be from quad as that just makes a space. Your question would be a lot clearer if you had shown what you had done rather than say you added some unspecified commands in unspecified places which didn't work. You appear to be wanting horizontal space but you said you tried vspace which is for vertical space? Also it is not clear what is the intent of the outer adjustbox. Try to use example-image as the inage (as that is generally available for this sort of test) and make an example that is not spaced as you expect, then someone can fix it.
    – David Carlisle
    Oct 12 '18 at 23:27
















2














How can I set a fixed horizontal padding between my images?
I'm using (in my master file):



usepackage[export]{adjustbox}



With this in my included file:



newcommand{vastehoogte}[1]{includegraphics[height=1textheight,keepaspectratio]{#1}}



to insert images this way:



begin{adjustbox}{max width=1textwidth}

vastehoogte{1.JPG}
vastehoogte{2.JPG}
vastehoogte{3.JPG}
vastehoogte{4.JPG}
vastehoogte{7.JPG}
vastehoogte{8.JPG}

end{adjustbox}

par}


However I cannot seem to get a few mm's of padding between the images with vspace or something else. Can someone help me?










share|improve this question
























  • Did you try some horizontal space? Like thinspace or quad ?
    – Thruston
    Oct 12 '18 at 22:12










  • Yes, I tried quad in multiple places/formattings (I have to admit, I'm very very new to Latex) and it worked. But when I zoomed in on my PDF, I noticed there was this quad in text on the PDF (at 100% zoom it just looked like a small line).
    – Dimi Mett
    Oct 12 '18 at 22:23






  • 2




    whatever you could see would not be from quad as that just makes a space. Your question would be a lot clearer if you had shown what you had done rather than say you added some unspecified commands in unspecified places which didn't work. You appear to be wanting horizontal space but you said you tried vspace which is for vertical space? Also it is not clear what is the intent of the outer adjustbox. Try to use example-image as the inage (as that is generally available for this sort of test) and make an example that is not spaced as you expect, then someone can fix it.
    – David Carlisle
    Oct 12 '18 at 23:27














2












2








2







How can I set a fixed horizontal padding between my images?
I'm using (in my master file):



usepackage[export]{adjustbox}



With this in my included file:



newcommand{vastehoogte}[1]{includegraphics[height=1textheight,keepaspectratio]{#1}}



to insert images this way:



begin{adjustbox}{max width=1textwidth}

vastehoogte{1.JPG}
vastehoogte{2.JPG}
vastehoogte{3.JPG}
vastehoogte{4.JPG}
vastehoogte{7.JPG}
vastehoogte{8.JPG}

end{adjustbox}

par}


However I cannot seem to get a few mm's of padding between the images with vspace or something else. Can someone help me?










share|improve this question















How can I set a fixed horizontal padding between my images?
I'm using (in my master file):



usepackage[export]{adjustbox}



With this in my included file:



newcommand{vastehoogte}[1]{includegraphics[height=1textheight,keepaspectratio]{#1}}



to insert images this way:



begin{adjustbox}{max width=1textwidth}

vastehoogte{1.JPG}
vastehoogte{2.JPG}
vastehoogte{3.JPG}
vastehoogte{4.JPG}
vastehoogte{7.JPG}
vastehoogte{8.JPG}

end{adjustbox}

par}


However I cannot seem to get a few mm's of padding between the images with vspace or something else. Can someone help me?







spacing graphics horizontal-alignment horizontal






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 29 '18 at 12:47









Martin Scharrer

199k45632815




199k45632815










asked Oct 12 '18 at 22:10









Dimi Mett

112




112












  • Did you try some horizontal space? Like thinspace or quad ?
    – Thruston
    Oct 12 '18 at 22:12










  • Yes, I tried quad in multiple places/formattings (I have to admit, I'm very very new to Latex) and it worked. But when I zoomed in on my PDF, I noticed there was this quad in text on the PDF (at 100% zoom it just looked like a small line).
    – Dimi Mett
    Oct 12 '18 at 22:23






  • 2




    whatever you could see would not be from quad as that just makes a space. Your question would be a lot clearer if you had shown what you had done rather than say you added some unspecified commands in unspecified places which didn't work. You appear to be wanting horizontal space but you said you tried vspace which is for vertical space? Also it is not clear what is the intent of the outer adjustbox. Try to use example-image as the inage (as that is generally available for this sort of test) and make an example that is not spaced as you expect, then someone can fix it.
    – David Carlisle
    Oct 12 '18 at 23:27


















  • Did you try some horizontal space? Like thinspace or quad ?
    – Thruston
    Oct 12 '18 at 22:12










  • Yes, I tried quad in multiple places/formattings (I have to admit, I'm very very new to Latex) and it worked. But when I zoomed in on my PDF, I noticed there was this quad in text on the PDF (at 100% zoom it just looked like a small line).
    – Dimi Mett
    Oct 12 '18 at 22:23






  • 2




    whatever you could see would not be from quad as that just makes a space. Your question would be a lot clearer if you had shown what you had done rather than say you added some unspecified commands in unspecified places which didn't work. You appear to be wanting horizontal space but you said you tried vspace which is for vertical space? Also it is not clear what is the intent of the outer adjustbox. Try to use example-image as the inage (as that is generally available for this sort of test) and make an example that is not spaced as you expect, then someone can fix it.
    – David Carlisle
    Oct 12 '18 at 23:27
















Did you try some horizontal space? Like thinspace or quad ?
– Thruston
Oct 12 '18 at 22:12




Did you try some horizontal space? Like thinspace or quad ?
– Thruston
Oct 12 '18 at 22:12












Yes, I tried quad in multiple places/formattings (I have to admit, I'm very very new to Latex) and it worked. But when I zoomed in on my PDF, I noticed there was this quad in text on the PDF (at 100% zoom it just looked like a small line).
– Dimi Mett
Oct 12 '18 at 22:23




Yes, I tried quad in multiple places/formattings (I have to admit, I'm very very new to Latex) and it worked. But when I zoomed in on my PDF, I noticed there was this quad in text on the PDF (at 100% zoom it just looked like a small line).
– Dimi Mett
Oct 12 '18 at 22:23




2




2




whatever you could see would not be from quad as that just makes a space. Your question would be a lot clearer if you had shown what you had done rather than say you added some unspecified commands in unspecified places which didn't work. You appear to be wanting horizontal space but you said you tried vspace which is for vertical space? Also it is not clear what is the intent of the outer adjustbox. Try to use example-image as the inage (as that is generally available for this sort of test) and make an example that is not spaced as you expect, then someone can fix it.
– David Carlisle
Oct 12 '18 at 23:27




whatever you could see would not be from quad as that just makes a space. Your question would be a lot clearer if you had shown what you had done rather than say you added some unspecified commands in unspecified places which didn't work. You appear to be wanting horizontal space but you said you tried vspace which is for vertical space? Also it is not clear what is the intent of the outer adjustbox. Try to use example-image as the inage (as that is generally available for this sort of test) and make an example that is not spaced as you expect, then someone can fix it.
– David Carlisle
Oct 12 '18 at 23:27










1 Answer
1






active

oldest

votes


















0














You can add horizontal padding between the images by using hspace{<value>} between them, not vspace!



Also instead of usepackage[export]{adjustbox} and includegraphics simply skip the export option and use adjustimage directly.



documentclass{article}

usepackage{adjustbox}
usepackage{mwe}% for the example text and images only

newcommandvastehoogte[1]{%
adjustimage{height=textheight}{#1}%
}
begin{document}
blindtext

begin{adjustbox}{max width=textwidth}
vastehoogte{example-image-a}hspace{10mm}%
vastehoogte{example-image-b}hspace{10mm}%
vastehoogte{example-image-c}hspace{10mm}%
vastehoogte{example-image-plain}hspace{10mm}%
vastehoogte{example-image-empty}hspace{10mm}%
vastehoogte{example-image}%
end{adjustbox}
par

blindtext

end{document}


enter image description here





As adjustbox gives you also additional features you could use these as well of course, e.g. the margin=<left> <bottom> <right> <top> key to add the spacing.



documentclass{article}

usepackage{adjustbox}
usepackage{blindtext}

newcommandvastehoogte[2][5mm 0mm 5mm 0mm]{%
adjustimage{height=textheight,margin={#1}}{#2}%
}
begin{document}
blindtext

begin{adjustbox}{max width=1textwidth}
vastehoogte[0mm 0mm 5mm 0mm]{example-image}
vastehoogte{example-image}
vastehoogte{example-image}
vastehoogte{example-image}
vastehoogte{example-image}
vastehoogte[5mm 0mm 0mm 0mm]{example-image}
end{adjustbox}
par

blindtext
end{document}


enter image description here






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%2f454983%2fhow-to-set-a-defined-horizontal-padding-between-includegraphics-images%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









    0














    You can add horizontal padding between the images by using hspace{<value>} between them, not vspace!



    Also instead of usepackage[export]{adjustbox} and includegraphics simply skip the export option and use adjustimage directly.



    documentclass{article}

    usepackage{adjustbox}
    usepackage{mwe}% for the example text and images only

    newcommandvastehoogte[1]{%
    adjustimage{height=textheight}{#1}%
    }
    begin{document}
    blindtext

    begin{adjustbox}{max width=textwidth}
    vastehoogte{example-image-a}hspace{10mm}%
    vastehoogte{example-image-b}hspace{10mm}%
    vastehoogte{example-image-c}hspace{10mm}%
    vastehoogte{example-image-plain}hspace{10mm}%
    vastehoogte{example-image-empty}hspace{10mm}%
    vastehoogte{example-image}%
    end{adjustbox}
    par

    blindtext

    end{document}


    enter image description here





    As adjustbox gives you also additional features you could use these as well of course, e.g. the margin=<left> <bottom> <right> <top> key to add the spacing.



    documentclass{article}

    usepackage{adjustbox}
    usepackage{blindtext}

    newcommandvastehoogte[2][5mm 0mm 5mm 0mm]{%
    adjustimage{height=textheight,margin={#1}}{#2}%
    }
    begin{document}
    blindtext

    begin{adjustbox}{max width=1textwidth}
    vastehoogte[0mm 0mm 5mm 0mm]{example-image}
    vastehoogte{example-image}
    vastehoogte{example-image}
    vastehoogte{example-image}
    vastehoogte{example-image}
    vastehoogte[5mm 0mm 0mm 0mm]{example-image}
    end{adjustbox}
    par

    blindtext
    end{document}


    enter image description here






    share|improve this answer


























      0














      You can add horizontal padding between the images by using hspace{<value>} between them, not vspace!



      Also instead of usepackage[export]{adjustbox} and includegraphics simply skip the export option and use adjustimage directly.



      documentclass{article}

      usepackage{adjustbox}
      usepackage{mwe}% for the example text and images only

      newcommandvastehoogte[1]{%
      adjustimage{height=textheight}{#1}%
      }
      begin{document}
      blindtext

      begin{adjustbox}{max width=textwidth}
      vastehoogte{example-image-a}hspace{10mm}%
      vastehoogte{example-image-b}hspace{10mm}%
      vastehoogte{example-image-c}hspace{10mm}%
      vastehoogte{example-image-plain}hspace{10mm}%
      vastehoogte{example-image-empty}hspace{10mm}%
      vastehoogte{example-image}%
      end{adjustbox}
      par

      blindtext

      end{document}


      enter image description here





      As adjustbox gives you also additional features you could use these as well of course, e.g. the margin=<left> <bottom> <right> <top> key to add the spacing.



      documentclass{article}

      usepackage{adjustbox}
      usepackage{blindtext}

      newcommandvastehoogte[2][5mm 0mm 5mm 0mm]{%
      adjustimage{height=textheight,margin={#1}}{#2}%
      }
      begin{document}
      blindtext

      begin{adjustbox}{max width=1textwidth}
      vastehoogte[0mm 0mm 5mm 0mm]{example-image}
      vastehoogte{example-image}
      vastehoogte{example-image}
      vastehoogte{example-image}
      vastehoogte{example-image}
      vastehoogte[5mm 0mm 0mm 0mm]{example-image}
      end{adjustbox}
      par

      blindtext
      end{document}


      enter image description here






      share|improve this answer
























        0












        0








        0






        You can add horizontal padding between the images by using hspace{<value>} between them, not vspace!



        Also instead of usepackage[export]{adjustbox} and includegraphics simply skip the export option and use adjustimage directly.



        documentclass{article}

        usepackage{adjustbox}
        usepackage{mwe}% for the example text and images only

        newcommandvastehoogte[1]{%
        adjustimage{height=textheight}{#1}%
        }
        begin{document}
        blindtext

        begin{adjustbox}{max width=textwidth}
        vastehoogte{example-image-a}hspace{10mm}%
        vastehoogte{example-image-b}hspace{10mm}%
        vastehoogte{example-image-c}hspace{10mm}%
        vastehoogte{example-image-plain}hspace{10mm}%
        vastehoogte{example-image-empty}hspace{10mm}%
        vastehoogte{example-image}%
        end{adjustbox}
        par

        blindtext

        end{document}


        enter image description here





        As adjustbox gives you also additional features you could use these as well of course, e.g. the margin=<left> <bottom> <right> <top> key to add the spacing.



        documentclass{article}

        usepackage{adjustbox}
        usepackage{blindtext}

        newcommandvastehoogte[2][5mm 0mm 5mm 0mm]{%
        adjustimage{height=textheight,margin={#1}}{#2}%
        }
        begin{document}
        blindtext

        begin{adjustbox}{max width=1textwidth}
        vastehoogte[0mm 0mm 5mm 0mm]{example-image}
        vastehoogte{example-image}
        vastehoogte{example-image}
        vastehoogte{example-image}
        vastehoogte{example-image}
        vastehoogte[5mm 0mm 0mm 0mm]{example-image}
        end{adjustbox}
        par

        blindtext
        end{document}


        enter image description here






        share|improve this answer












        You can add horizontal padding between the images by using hspace{<value>} between them, not vspace!



        Also instead of usepackage[export]{adjustbox} and includegraphics simply skip the export option and use adjustimage directly.



        documentclass{article}

        usepackage{adjustbox}
        usepackage{mwe}% for the example text and images only

        newcommandvastehoogte[1]{%
        adjustimage{height=textheight}{#1}%
        }
        begin{document}
        blindtext

        begin{adjustbox}{max width=textwidth}
        vastehoogte{example-image-a}hspace{10mm}%
        vastehoogte{example-image-b}hspace{10mm}%
        vastehoogte{example-image-c}hspace{10mm}%
        vastehoogte{example-image-plain}hspace{10mm}%
        vastehoogte{example-image-empty}hspace{10mm}%
        vastehoogte{example-image}%
        end{adjustbox}
        par

        blindtext

        end{document}


        enter image description here





        As adjustbox gives you also additional features you could use these as well of course, e.g. the margin=<left> <bottom> <right> <top> key to add the spacing.



        documentclass{article}

        usepackage{adjustbox}
        usepackage{blindtext}

        newcommandvastehoogte[2][5mm 0mm 5mm 0mm]{%
        adjustimage{height=textheight,margin={#1}}{#2}%
        }
        begin{document}
        blindtext

        begin{adjustbox}{max width=1textwidth}
        vastehoogte[0mm 0mm 5mm 0mm]{example-image}
        vastehoogte{example-image}
        vastehoogte{example-image}
        vastehoogte{example-image}
        vastehoogte{example-image}
        vastehoogte[5mm 0mm 0mm 0mm]{example-image}
        end{adjustbox}
        par

        blindtext
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 29 '18 at 13:19









        Martin Scharrer

        199k45632815




        199k45632815






























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f454983%2fhow-to-set-a-defined-horizontal-padding-between-includegraphics-images%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

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?