2x2 grid images with space of equal width with Tikz
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
add a comment |
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
add a comment |
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
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
tikz-pgf graphics xetex
asked Feb 8 at 12:25
Til HundTil Hund
544215
544215
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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:

1
@Til Hund AdvantageTikZ;) Have funTikzing!.
– 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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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:

1
@Til Hund AdvantageTikZ;) Have funTikzing!.
– 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
add a comment |
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:

1
@Til Hund AdvantageTikZ;) Have funTikzing!.
– 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
add a comment |
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:

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:

answered Feb 8 at 12:42
RaajaRaaja
3,87621038
3,87621038
1
@Til Hund AdvantageTikZ;) Have funTikzing!.
– 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
add a comment |
1
@Til Hund AdvantageTikZ;) Have funTikzing!.
– 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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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