Reducing space between two pictures in latex












1















Belows is apart of my code and I want to reduce space between the two pictues and also want to make them larger. Please suggest me.



begin{figure}[!htbp]
% centering
includegraphics[width=0.475linewidth]{drww_pre_3.pdf}
includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}
caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
end{figure}









share|improve this question




















  • 1





    Add a % to the end of the first line containing includegraphics. Otherwise, the end-of-line will introduce a stray space character.

    – Steven B. Segletes
    Mar 26 at 18:43








  • 1





    there is only a word space between the figures, if you are seeing more space check that there is no white space in the pdfs themselves, if you use fbox{includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}} is the frame tight around the image?

    – David Carlisle
    Mar 26 at 19:27
















1















Belows is apart of my code and I want to reduce space between the two pictues and also want to make them larger. Please suggest me.



begin{figure}[!htbp]
% centering
includegraphics[width=0.475linewidth]{drww_pre_3.pdf}
includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}
caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
end{figure}









share|improve this question




















  • 1





    Add a % to the end of the first line containing includegraphics. Otherwise, the end-of-line will introduce a stray space character.

    – Steven B. Segletes
    Mar 26 at 18:43








  • 1





    there is only a word space between the figures, if you are seeing more space check that there is no white space in the pdfs themselves, if you use fbox{includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}} is the frame tight around the image?

    – David Carlisle
    Mar 26 at 19:27














1












1








1








Belows is apart of my code and I want to reduce space between the two pictues and also want to make them larger. Please suggest me.



begin{figure}[!htbp]
% centering
includegraphics[width=0.475linewidth]{drww_pre_3.pdf}
includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}
caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
end{figure}









share|improve this question
















Belows is apart of my code and I want to reduce space between the two pictues and also want to make them larger. Please suggest me.



begin{figure}[!htbp]
% centering
includegraphics[width=0.475linewidth]{drww_pre_3.pdf}
includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}
caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
end{figure}






horizontal-alignment pdftex






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 19:06









Herohtar

1306




1306










asked Mar 26 at 18:30









HiggsHiggs

425




425








  • 1





    Add a % to the end of the first line containing includegraphics. Otherwise, the end-of-line will introduce a stray space character.

    – Steven B. Segletes
    Mar 26 at 18:43








  • 1





    there is only a word space between the figures, if you are seeing more space check that there is no white space in the pdfs themselves, if you use fbox{includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}} is the frame tight around the image?

    – David Carlisle
    Mar 26 at 19:27














  • 1





    Add a % to the end of the first line containing includegraphics. Otherwise, the end-of-line will introduce a stray space character.

    – Steven B. Segletes
    Mar 26 at 18:43








  • 1





    there is only a word space between the figures, if you are seeing more space check that there is no white space in the pdfs themselves, if you use fbox{includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}} is the frame tight around the image?

    – David Carlisle
    Mar 26 at 19:27








1




1





Add a % to the end of the first line containing includegraphics. Otherwise, the end-of-line will introduce a stray space character.

– Steven B. Segletes
Mar 26 at 18:43







Add a % to the end of the first line containing includegraphics. Otherwise, the end-of-line will introduce a stray space character.

– Steven B. Segletes
Mar 26 at 18:43






1




1





there is only a word space between the figures, if you are seeing more space check that there is no white space in the pdfs themselves, if you use fbox{includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}} is the frame tight around the image?

– David Carlisle
Mar 26 at 19:27





there is only a word space between the figures, if you are seeing more space check that there is no white space in the pdfs themselves, if you use fbox{includegraphics[width=0.475linewidth]{drbb_pre_4.pdf}} is the frame tight around the image?

– David Carlisle
Mar 26 at 19:27










2 Answers
2






active

oldest

votes


















3














By adding a % to the end of a line, it will suppress the space that is otherwise introduced. NOTE: if a line ends with a bare macro, there is not extra space introduced.



This will allow a larger specification of width, without triggering a linefeed.



documentclass{article}
usepackage{graphicx}
begin{document}
WITHOUT %
begin{figure}[!htbp]
% centering
includegraphics[width=0.475linewidth]{example-image-a}
includegraphics[width=0.475linewidth]{example-image-b}
caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
end{figure}

WITH %
begin{figure}[!htbp]
% centering
includegraphics[width=0.5linewidth]{example-image-a}%
includegraphics[width=0.5linewidth]{example-image-b}
caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
end{figure}
end{document}


enter image description here






share|improve this answer































    1














    To remove the space between your figures, add a % to the end of the first line of includegraphics. Why this is necessary is explained in detail here.



    To make your figures larger, simply change the width to 0.5linewidth, which is the maximum before the second figure "jumps" to a new line.



    begin{figure}[!htbp]
    % centering
    includegraphics[width=0.5linewidth]{drww_pre_3.pdf}%
    includegraphics[width=0.5linewidth]{drbb_pre_4.pdf}
    caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
    end{figure}





    share|improve this answer
























    • For me space is not changing. I copied and past in the my code.

      – Higgs
      Mar 26 at 19:10











    • This I used and felt no change. documentclass[oneside]{book} usepackage[demo]{graphicx} WITHOUT % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure} WITH % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf}% includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure}

      – Higgs
      Mar 26 at 19:27














    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%2f481572%2freducing-space-between-two-pictures-in-latex%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    By adding a % to the end of a line, it will suppress the space that is otherwise introduced. NOTE: if a line ends with a bare macro, there is not extra space introduced.



    This will allow a larger specification of width, without triggering a linefeed.



    documentclass{article}
    usepackage{graphicx}
    begin{document}
    WITHOUT %
    begin{figure}[!htbp]
    % centering
    includegraphics[width=0.475linewidth]{example-image-a}
    includegraphics[width=0.475linewidth]{example-image-b}
    caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
    end{figure}

    WITH %
    begin{figure}[!htbp]
    % centering
    includegraphics[width=0.5linewidth]{example-image-a}%
    includegraphics[width=0.5linewidth]{example-image-b}
    caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
    end{figure}
    end{document}


    enter image description here






    share|improve this answer




























      3














      By adding a % to the end of a line, it will suppress the space that is otherwise introduced. NOTE: if a line ends with a bare macro, there is not extra space introduced.



      This will allow a larger specification of width, without triggering a linefeed.



      documentclass{article}
      usepackage{graphicx}
      begin{document}
      WITHOUT %
      begin{figure}[!htbp]
      % centering
      includegraphics[width=0.475linewidth]{example-image-a}
      includegraphics[width=0.475linewidth]{example-image-b}
      caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
      end{figure}

      WITH %
      begin{figure}[!htbp]
      % centering
      includegraphics[width=0.5linewidth]{example-image-a}%
      includegraphics[width=0.5linewidth]{example-image-b}
      caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
      end{figure}
      end{document}


      enter image description here






      share|improve this answer


























        3












        3








        3







        By adding a % to the end of a line, it will suppress the space that is otherwise introduced. NOTE: if a line ends with a bare macro, there is not extra space introduced.



        This will allow a larger specification of width, without triggering a linefeed.



        documentclass{article}
        usepackage{graphicx}
        begin{document}
        WITHOUT %
        begin{figure}[!htbp]
        % centering
        includegraphics[width=0.475linewidth]{example-image-a}
        includegraphics[width=0.475linewidth]{example-image-b}
        caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
        end{figure}

        WITH %
        begin{figure}[!htbp]
        % centering
        includegraphics[width=0.5linewidth]{example-image-a}%
        includegraphics[width=0.5linewidth]{example-image-b}
        caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
        end{figure}
        end{document}


        enter image description here






        share|improve this answer













        By adding a % to the end of a line, it will suppress the space that is otherwise introduced. NOTE: if a line ends with a bare macro, there is not extra space introduced.



        This will allow a larger specification of width, without triggering a linefeed.



        documentclass{article}
        usepackage{graphicx}
        begin{document}
        WITHOUT %
        begin{figure}[!htbp]
        % centering
        includegraphics[width=0.475linewidth]{example-image-a}
        includegraphics[width=0.475linewidth]{example-image-b}
        caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
        end{figure}

        WITH %
        begin{figure}[!htbp]
        % centering
        includegraphics[width=0.5linewidth]{example-image-a}%
        includegraphics[width=0.5linewidth]{example-image-b}
        caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
        end{figure}
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 26 at 18:45









        Steven B. SegletesSteven B. Segletes

        161k9205416




        161k9205416























            1














            To remove the space between your figures, add a % to the end of the first line of includegraphics. Why this is necessary is explained in detail here.



            To make your figures larger, simply change the width to 0.5linewidth, which is the maximum before the second figure "jumps" to a new line.



            begin{figure}[!htbp]
            % centering
            includegraphics[width=0.5linewidth]{drww_pre_3.pdf}%
            includegraphics[width=0.5linewidth]{drbb_pre_4.pdf}
            caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
            end{figure}





            share|improve this answer
























            • For me space is not changing. I copied and past in the my code.

              – Higgs
              Mar 26 at 19:10











            • This I used and felt no change. documentclass[oneside]{book} usepackage[demo]{graphicx} WITHOUT % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure} WITH % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf}% includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure}

              – Higgs
              Mar 26 at 19:27


















            1














            To remove the space between your figures, add a % to the end of the first line of includegraphics. Why this is necessary is explained in detail here.



            To make your figures larger, simply change the width to 0.5linewidth, which is the maximum before the second figure "jumps" to a new line.



            begin{figure}[!htbp]
            % centering
            includegraphics[width=0.5linewidth]{drww_pre_3.pdf}%
            includegraphics[width=0.5linewidth]{drbb_pre_4.pdf}
            caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
            end{figure}





            share|improve this answer
























            • For me space is not changing. I copied and past in the my code.

              – Higgs
              Mar 26 at 19:10











            • This I used and felt no change. documentclass[oneside]{book} usepackage[demo]{graphicx} WITHOUT % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure} WITH % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf}% includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure}

              – Higgs
              Mar 26 at 19:27
















            1












            1








            1







            To remove the space between your figures, add a % to the end of the first line of includegraphics. Why this is necessary is explained in detail here.



            To make your figures larger, simply change the width to 0.5linewidth, which is the maximum before the second figure "jumps" to a new line.



            begin{figure}[!htbp]
            % centering
            includegraphics[width=0.5linewidth]{drww_pre_3.pdf}%
            includegraphics[width=0.5linewidth]{drbb_pre_4.pdf}
            caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
            end{figure}





            share|improve this answer













            To remove the space between your figures, add a % to the end of the first line of includegraphics. Why this is necessary is explained in detail here.



            To make your figures larger, simply change the width to 0.5linewidth, which is the maximum before the second figure "jumps" to a new line.



            begin{figure}[!htbp]
            % centering
            includegraphics[width=0.5linewidth]{drww_pre_3.pdf}%
            includegraphics[width=0.5linewidth]{drbb_pre_4.pdf}
            caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
            end{figure}






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 26 at 18:47









            Superuser27Superuser27

            90316




            90316













            • For me space is not changing. I copied and past in the my code.

              – Higgs
              Mar 26 at 19:10











            • This I used and felt no change. documentclass[oneside]{book} usepackage[demo]{graphicx} WITHOUT % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure} WITH % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf}% includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure}

              – Higgs
              Mar 26 at 19:27





















            • For me space is not changing. I copied and past in the my code.

              – Higgs
              Mar 26 at 19:10











            • This I used and felt no change. documentclass[oneside]{book} usepackage[demo]{graphicx} WITHOUT % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure} WITH % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf}% includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure}

              – Higgs
              Mar 26 at 19:27



















            For me space is not changing. I copied and past in the my code.

            – Higgs
            Mar 26 at 19:10





            For me space is not changing. I copied and past in the my code.

            – Higgs
            Mar 26 at 19:10













            This I used and felt no change. documentclass[oneside]{book} usepackage[demo]{graphicx} WITHOUT % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure} WITH % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf}% includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure}

            – Higgs
            Mar 26 at 19:27







            This I used and felt no change. documentclass[oneside]{book} usepackage[demo]{graphicx} WITHOUT % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure} WITH % begin{figure}[!htbp] includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf}% includegraphics[width=0.475linewidth]{ptbb_pre_1.pdf} caption{The signal has been scaled by a factor of } end{figure}

            – Higgs
            Mar 26 at 19:27




















            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%2f481572%2freducing-space-between-two-pictures-in-latex%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?