2x2 grid images with space of equal width with Tikz












2















Relating to this question on tex stackexchange, I would like to implement the below code in tikz.



I am particularly keen to have each white space equally wide. By writing white spaces I mean the margins, the distance of the images to the page border (left or right, top or bottom) as well as the spaces between the images all with the same width.



Is this even possible if the aspect ratio of the images vary ("not too much")?



This is my MWE without tikz:



documentclass{article}
usepackage[margin=0cm, top=0cm, bottom=0cm, outer=0cm, inner=0cm, landscape, a4paper]{geometry}
pagestyle{empty}

usepackage{graphicx}
usepackage{subfig}
begin{document}

begin{figure}
captionsetup[subfigure]{labelformat=empty}
captionsetup{labelformat=empty}
centeringhfill
subfloat{includegraphics[height=7cm]{example-image-a}label{figure1}}hspace{1cm}
subfloat{includegraphics[height=7cm]{example-image-b}label{figure2}}hfillnull\
hfill
subfloat{includegraphics[height=7cm]{example-image-c}label{figure3}}hspace{1cm}
subfloat{includegraphics[height=7cm]{example-image}label{figure4}}hfillnull
end{figure}

end{document}









share|improve this question



























    2















    Relating to this question on tex stackexchange, I would like to implement the below code in tikz.



    I am particularly keen to have each white space equally wide. By writing white spaces I mean the margins, the distance of the images to the page border (left or right, top or bottom) as well as the spaces between the images all with the same width.



    Is this even possible if the aspect ratio of the images vary ("not too much")?



    This is my MWE without tikz:



    documentclass{article}
    usepackage[margin=0cm, top=0cm, bottom=0cm, outer=0cm, inner=0cm, landscape, a4paper]{geometry}
    pagestyle{empty}

    usepackage{graphicx}
    usepackage{subfig}
    begin{document}

    begin{figure}
    captionsetup[subfigure]{labelformat=empty}
    captionsetup{labelformat=empty}
    centeringhfill
    subfloat{includegraphics[height=7cm]{example-image-a}label{figure1}}hspace{1cm}
    subfloat{includegraphics[height=7cm]{example-image-b}label{figure2}}hfillnull\
    hfill
    subfloat{includegraphics[height=7cm]{example-image-c}label{figure3}}hspace{1cm}
    subfloat{includegraphics[height=7cm]{example-image}label{figure4}}hfillnull
    end{figure}

    end{document}









    share|improve this question

























      2












      2








      2








      Relating to this question on tex stackexchange, I would like to implement the below code in tikz.



      I am particularly keen to have each white space equally wide. By writing white spaces I mean the margins, the distance of the images to the page border (left or right, top or bottom) as well as the spaces between the images all with the same width.



      Is this even possible if the aspect ratio of the images vary ("not too much")?



      This is my MWE without tikz:



      documentclass{article}
      usepackage[margin=0cm, top=0cm, bottom=0cm, outer=0cm, inner=0cm, landscape, a4paper]{geometry}
      pagestyle{empty}

      usepackage{graphicx}
      usepackage{subfig}
      begin{document}

      begin{figure}
      captionsetup[subfigure]{labelformat=empty}
      captionsetup{labelformat=empty}
      centeringhfill
      subfloat{includegraphics[height=7cm]{example-image-a}label{figure1}}hspace{1cm}
      subfloat{includegraphics[height=7cm]{example-image-b}label{figure2}}hfillnull\
      hfill
      subfloat{includegraphics[height=7cm]{example-image-c}label{figure3}}hspace{1cm}
      subfloat{includegraphics[height=7cm]{example-image}label{figure4}}hfillnull
      end{figure}

      end{document}









      share|improve this question














      Relating to this question on tex stackexchange, I would like to implement the below code in tikz.



      I am particularly keen to have each white space equally wide. By writing white spaces I mean the margins, the distance of the images to the page border (left or right, top or bottom) as well as the spaces between the images all with the same width.



      Is this even possible if the aspect ratio of the images vary ("not too much")?



      This is my MWE without tikz:



      documentclass{article}
      usepackage[margin=0cm, top=0cm, bottom=0cm, outer=0cm, inner=0cm, landscape, a4paper]{geometry}
      pagestyle{empty}

      usepackage{graphicx}
      usepackage{subfig}
      begin{document}

      begin{figure}
      captionsetup[subfigure]{labelformat=empty}
      captionsetup{labelformat=empty}
      centeringhfill
      subfloat{includegraphics[height=7cm]{example-image-a}label{figure1}}hspace{1cm}
      subfloat{includegraphics[height=7cm]{example-image-b}label{figure2}}hfillnull\
      hfill
      subfloat{includegraphics[height=7cm]{example-image-c}label{figure3}}hspace{1cm}
      subfloat{includegraphics[height=7cm]{example-image}label{figure4}}hfillnull
      end{figure}

      end{document}






      tikz-pgf graphics xetex






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 8 at 12:25









      Til HundTil Hund

      544215




      544215






















          1 Answer
          1






          active

          oldest

          votes


















          4














          Have fun ;) Life is easier with positioning.



          documentclass{standalone}
          usepackage{tikz}
          usepackage{graphicx}
          usetikzlibrary{positioning}
          begin{document}
          begin{tikzpicture}
          node at (0,0) (a) {includegraphics[height=6cm]{example-image-a}};
          node[below = 5cm of a.south west,anchor= west] (b) {includegraphics[height=7cm]{example-image-b}};
          node[right = 2cm of a, anchor = west] (c) {includegraphics[height=7cm]{example-image-c}};
          node[below = 5cm of c.south east,anchor= east] (d) {includegraphics[height=6cm]{example-image}};
          end{tikzpicture}
          end{document}


          you will get:



          enter image description here






          share|improve this answer



















          • 1





            @Til Hund Advantage TikZ ;) Have fun Tikzing!.

            – Raaja
            Feb 8 at 12:43











          • Awesome, Raaja!

            – Til Hund
            Feb 8 at 12:49






          • 1





            @Til Hund Welcome!

            – Raaja
            Feb 8 at 12:49











          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%2f473910%2f2x2-grid-images-with-space-of-equal-width-with-tikz%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









          4














          Have fun ;) Life is easier with positioning.



          documentclass{standalone}
          usepackage{tikz}
          usepackage{graphicx}
          usetikzlibrary{positioning}
          begin{document}
          begin{tikzpicture}
          node at (0,0) (a) {includegraphics[height=6cm]{example-image-a}};
          node[below = 5cm of a.south west,anchor= west] (b) {includegraphics[height=7cm]{example-image-b}};
          node[right = 2cm of a, anchor = west] (c) {includegraphics[height=7cm]{example-image-c}};
          node[below = 5cm of c.south east,anchor= east] (d) {includegraphics[height=6cm]{example-image}};
          end{tikzpicture}
          end{document}


          you will get:



          enter image description here






          share|improve this answer



















          • 1





            @Til Hund Advantage TikZ ;) Have fun Tikzing!.

            – Raaja
            Feb 8 at 12:43











          • Awesome, Raaja!

            – Til Hund
            Feb 8 at 12:49






          • 1





            @Til Hund Welcome!

            – Raaja
            Feb 8 at 12:49
















          4














          Have fun ;) Life is easier with positioning.



          documentclass{standalone}
          usepackage{tikz}
          usepackage{graphicx}
          usetikzlibrary{positioning}
          begin{document}
          begin{tikzpicture}
          node at (0,0) (a) {includegraphics[height=6cm]{example-image-a}};
          node[below = 5cm of a.south west,anchor= west] (b) {includegraphics[height=7cm]{example-image-b}};
          node[right = 2cm of a, anchor = west] (c) {includegraphics[height=7cm]{example-image-c}};
          node[below = 5cm of c.south east,anchor= east] (d) {includegraphics[height=6cm]{example-image}};
          end{tikzpicture}
          end{document}


          you will get:



          enter image description here






          share|improve this answer



















          • 1





            @Til Hund Advantage TikZ ;) Have fun Tikzing!.

            – Raaja
            Feb 8 at 12:43











          • Awesome, Raaja!

            – Til Hund
            Feb 8 at 12:49






          • 1





            @Til Hund Welcome!

            – Raaja
            Feb 8 at 12:49














          4












          4








          4







          Have fun ;) Life is easier with positioning.



          documentclass{standalone}
          usepackage{tikz}
          usepackage{graphicx}
          usetikzlibrary{positioning}
          begin{document}
          begin{tikzpicture}
          node at (0,0) (a) {includegraphics[height=6cm]{example-image-a}};
          node[below = 5cm of a.south west,anchor= west] (b) {includegraphics[height=7cm]{example-image-b}};
          node[right = 2cm of a, anchor = west] (c) {includegraphics[height=7cm]{example-image-c}};
          node[below = 5cm of c.south east,anchor= east] (d) {includegraphics[height=6cm]{example-image}};
          end{tikzpicture}
          end{document}


          you will get:



          enter image description here






          share|improve this answer













          Have fun ;) Life is easier with positioning.



          documentclass{standalone}
          usepackage{tikz}
          usepackage{graphicx}
          usetikzlibrary{positioning}
          begin{document}
          begin{tikzpicture}
          node at (0,0) (a) {includegraphics[height=6cm]{example-image-a}};
          node[below = 5cm of a.south west,anchor= west] (b) {includegraphics[height=7cm]{example-image-b}};
          node[right = 2cm of a, anchor = west] (c) {includegraphics[height=7cm]{example-image-c}};
          node[below = 5cm of c.south east,anchor= east] (d) {includegraphics[height=6cm]{example-image}};
          end{tikzpicture}
          end{document}


          you will get:



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 8 at 12:42









          RaajaRaaja

          3,87621038




          3,87621038








          • 1





            @Til Hund Advantage TikZ ;) Have fun Tikzing!.

            – Raaja
            Feb 8 at 12:43











          • Awesome, Raaja!

            – Til Hund
            Feb 8 at 12:49






          • 1





            @Til Hund Welcome!

            – Raaja
            Feb 8 at 12:49














          • 1





            @Til Hund Advantage TikZ ;) Have fun Tikzing!.

            – Raaja
            Feb 8 at 12:43











          • Awesome, Raaja!

            – Til Hund
            Feb 8 at 12:49






          • 1





            @Til Hund Welcome!

            – Raaja
            Feb 8 at 12:49








          1




          1





          @Til Hund Advantage TikZ ;) Have fun Tikzing!.

          – Raaja
          Feb 8 at 12:43





          @Til Hund Advantage TikZ ;) Have fun Tikzing!.

          – Raaja
          Feb 8 at 12:43













          Awesome, Raaja!

          – Til Hund
          Feb 8 at 12:49





          Awesome, Raaja!

          – Til Hund
          Feb 8 at 12:49




          1




          1





          @Til Hund Welcome!

          – Raaja
          Feb 8 at 12:49





          @Til Hund Welcome!

          – Raaja
          Feb 8 at 12:49


















          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%2f473910%2f2x2-grid-images-with-space-of-equal-width-with-tikz%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

          How to send String Array data to Server using php in android

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

          Is anime1.com a legal site for watching anime?