Compatibility of subfigure with subfig package












1















Suppose, I have the grouping of images as specified below.



My problem is that I want to include this kind of image grouping in an environment that uses the subfig package and that subcaption and subfig do not go well together. My question is therefore: How do I replicate the image grouping below in a subfig environment --> e.g. How do I obtain the same result as you shown below but with the subfloat macro from subfig package?



The goal really is to have a big image in the middle, and 8 images around it.



documentclass{article}
usepackage{caption,subcaption}
usepackage[demo]{graphicx} % demo is just for the example

begin{document}
begin{figure}
centering

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

vspace{2ex}

includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad
begin{subfigure}{.4textwidth}
includegraphics[width=textwidth,height=5cm]{x}
caption{A tall figure}
end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

vspace{2ex}

includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

caption{The full caption}
end{figure}
end{document}


enter image description here










share|improve this question

























  • welcome to tex.se! do i understood you correct that you like to obtain the same result as you shown in question, with use of the subfloat macro from subfig package?

    – Zarko
    4 hours ago











  • Yes that is exactly what I want - sorry for not having been specific enough.

    – BeSeLuFri
    4 hours ago
















1















Suppose, I have the grouping of images as specified below.



My problem is that I want to include this kind of image grouping in an environment that uses the subfig package and that subcaption and subfig do not go well together. My question is therefore: How do I replicate the image grouping below in a subfig environment --> e.g. How do I obtain the same result as you shown below but with the subfloat macro from subfig package?



The goal really is to have a big image in the middle, and 8 images around it.



documentclass{article}
usepackage{caption,subcaption}
usepackage[demo]{graphicx} % demo is just for the example

begin{document}
begin{figure}
centering

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

vspace{2ex}

includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad
begin{subfigure}{.4textwidth}
includegraphics[width=textwidth,height=5cm]{x}
caption{A tall figure}
end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

vspace{2ex}

includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

caption{The full caption}
end{figure}
end{document}


enter image description here










share|improve this question

























  • welcome to tex.se! do i understood you correct that you like to obtain the same result as you shown in question, with use of the subfloat macro from subfig package?

    – Zarko
    4 hours ago











  • Yes that is exactly what I want - sorry for not having been specific enough.

    – BeSeLuFri
    4 hours ago














1












1








1








Suppose, I have the grouping of images as specified below.



My problem is that I want to include this kind of image grouping in an environment that uses the subfig package and that subcaption and subfig do not go well together. My question is therefore: How do I replicate the image grouping below in a subfig environment --> e.g. How do I obtain the same result as you shown below but with the subfloat macro from subfig package?



The goal really is to have a big image in the middle, and 8 images around it.



documentclass{article}
usepackage{caption,subcaption}
usepackage[demo]{graphicx} % demo is just for the example

begin{document}
begin{figure}
centering

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

vspace{2ex}

includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad
begin{subfigure}{.4textwidth}
includegraphics[width=textwidth,height=5cm]{x}
caption{A tall figure}
end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

vspace{2ex}

includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

caption{The full caption}
end{figure}
end{document}


enter image description here










share|improve this question
















Suppose, I have the grouping of images as specified below.



My problem is that I want to include this kind of image grouping in an environment that uses the subfig package and that subcaption and subfig do not go well together. My question is therefore: How do I replicate the image grouping below in a subfig environment --> e.g. How do I obtain the same result as you shown below but with the subfloat macro from subfig package?



The goal really is to have a big image in the middle, and 8 images around it.



documentclass{article}
usepackage{caption,subcaption}
usepackage[demo]{graphicx} % demo is just for the example

begin{document}
begin{figure}
centering

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

vspace{2ex}

includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad
begin{subfigure}{.4textwidth}
includegraphics[width=textwidth,height=5cm]{x}
caption{A tall figure}
end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

vspace{2ex}

includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}

end{subfigure}qquad
begin{subfigure}{.2textwidth}
includegraphics[width=textwidth,height=2cm]{x}
caption{A short figure}
end{subfigure}qquad

caption{The full caption}
end{figure}
end{document}


enter image description here







graphics subcaption subfig






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 4 hours ago







BeSeLuFri

















asked 4 hours ago









BeSeLuFriBeSeLuFri

84




84













  • welcome to tex.se! do i understood you correct that you like to obtain the same result as you shown in question, with use of the subfloat macro from subfig package?

    – Zarko
    4 hours ago











  • Yes that is exactly what I want - sorry for not having been specific enough.

    – BeSeLuFri
    4 hours ago



















  • welcome to tex.se! do i understood you correct that you like to obtain the same result as you shown in question, with use of the subfloat macro from subfig package?

    – Zarko
    4 hours ago











  • Yes that is exactly what I want - sorry for not having been specific enough.

    – BeSeLuFri
    4 hours ago

















welcome to tex.se! do i understood you correct that you like to obtain the same result as you shown in question, with use of the subfloat macro from subfig package?

– Zarko
4 hours ago





welcome to tex.se! do i understood you correct that you like to obtain the same result as you shown in question, with use of the subfloat macro from subfig package?

– Zarko
4 hours ago













Yes that is exactly what I want - sorry for not having been specific enough.

– BeSeLuFri
4 hours ago





Yes that is exactly what I want - sorry for not having been specific enough.

– BeSeLuFri
4 hours ago










1 Answer
1






active

oldest

votes


















0














see, if the following solution can help you.



documentclass{article}
usepackage{caption}
usepackage[demo, % demo is just for the example
export]{adjustbox}
usepackage{subfig}
usepackage{multirow, tabularx}

begin{document}
begin{figure}
setkeys{Gin}{width=linewidth, keepaspectratio}

begin{tabularx}{linewidth}{@{} *{4}{X} @{}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
subfloat[A short image]{includegraphics[valign=t]{x}}
& multicolumn{2}{>{hsize=dimexpr2hsize+2tabcolsep}X}{
multirow[t]{2}{=}{subfloat[A tall image]{includegraphics[height=78mm,valign=t]{x}}}
}
& subfloat[A short image]{includegraphics[valign=t]{x}} \
subfloat[A short image]{includegraphics[valign=t]{x}}
& & & subfloat[A short image]{includegraphics[valign=t]{x}} \
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
end{tabularx}
caption{The full caption}
end{figure}
end{document}


enter image description here






share|improve this answer
























  • yes! it absolutely does. Thank you very much. I have just a small add-on question: see below

    – BeSeLuFri
    2 hours ago













  • I would like to know why the formatting turns out to be slightly different in my environment - see: i.stack.imgur.com/Pscrs.png

    – BeSeLuFri
    2 hours ago













  • with my code? if you not change anything the only reason which cross my mind is that your latex installation has older packages than mine (i test code with recent miktex suite, upgraded yesterday).

    – Zarko
    2 hours ago











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%2f481768%2fcompatibility-of-subfigure-with-subfig-package%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














see, if the following solution can help you.



documentclass{article}
usepackage{caption}
usepackage[demo, % demo is just for the example
export]{adjustbox}
usepackage{subfig}
usepackage{multirow, tabularx}

begin{document}
begin{figure}
setkeys{Gin}{width=linewidth, keepaspectratio}

begin{tabularx}{linewidth}{@{} *{4}{X} @{}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
subfloat[A short image]{includegraphics[valign=t]{x}}
& multicolumn{2}{>{hsize=dimexpr2hsize+2tabcolsep}X}{
multirow[t]{2}{=}{subfloat[A tall image]{includegraphics[height=78mm,valign=t]{x}}}
}
& subfloat[A short image]{includegraphics[valign=t]{x}} \
subfloat[A short image]{includegraphics[valign=t]{x}}
& & & subfloat[A short image]{includegraphics[valign=t]{x}} \
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
end{tabularx}
caption{The full caption}
end{figure}
end{document}


enter image description here






share|improve this answer
























  • yes! it absolutely does. Thank you very much. I have just a small add-on question: see below

    – BeSeLuFri
    2 hours ago













  • I would like to know why the formatting turns out to be slightly different in my environment - see: i.stack.imgur.com/Pscrs.png

    – BeSeLuFri
    2 hours ago













  • with my code? if you not change anything the only reason which cross my mind is that your latex installation has older packages than mine (i test code with recent miktex suite, upgraded yesterday).

    – Zarko
    2 hours ago
















0














see, if the following solution can help you.



documentclass{article}
usepackage{caption}
usepackage[demo, % demo is just for the example
export]{adjustbox}
usepackage{subfig}
usepackage{multirow, tabularx}

begin{document}
begin{figure}
setkeys{Gin}{width=linewidth, keepaspectratio}

begin{tabularx}{linewidth}{@{} *{4}{X} @{}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
subfloat[A short image]{includegraphics[valign=t]{x}}
& multicolumn{2}{>{hsize=dimexpr2hsize+2tabcolsep}X}{
multirow[t]{2}{=}{subfloat[A tall image]{includegraphics[height=78mm,valign=t]{x}}}
}
& subfloat[A short image]{includegraphics[valign=t]{x}} \
subfloat[A short image]{includegraphics[valign=t]{x}}
& & & subfloat[A short image]{includegraphics[valign=t]{x}} \
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
end{tabularx}
caption{The full caption}
end{figure}
end{document}


enter image description here






share|improve this answer
























  • yes! it absolutely does. Thank you very much. I have just a small add-on question: see below

    – BeSeLuFri
    2 hours ago













  • I would like to know why the formatting turns out to be slightly different in my environment - see: i.stack.imgur.com/Pscrs.png

    – BeSeLuFri
    2 hours ago













  • with my code? if you not change anything the only reason which cross my mind is that your latex installation has older packages than mine (i test code with recent miktex suite, upgraded yesterday).

    – Zarko
    2 hours ago














0












0








0







see, if the following solution can help you.



documentclass{article}
usepackage{caption}
usepackage[demo, % demo is just for the example
export]{adjustbox}
usepackage{subfig}
usepackage{multirow, tabularx}

begin{document}
begin{figure}
setkeys{Gin}{width=linewidth, keepaspectratio}

begin{tabularx}{linewidth}{@{} *{4}{X} @{}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
subfloat[A short image]{includegraphics[valign=t]{x}}
& multicolumn{2}{>{hsize=dimexpr2hsize+2tabcolsep}X}{
multirow[t]{2}{=}{subfloat[A tall image]{includegraphics[height=78mm,valign=t]{x}}}
}
& subfloat[A short image]{includegraphics[valign=t]{x}} \
subfloat[A short image]{includegraphics[valign=t]{x}}
& & & subfloat[A short image]{includegraphics[valign=t]{x}} \
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
end{tabularx}
caption{The full caption}
end{figure}
end{document}


enter image description here






share|improve this answer













see, if the following solution can help you.



documentclass{article}
usepackage{caption}
usepackage[demo, % demo is just for the example
export]{adjustbox}
usepackage{subfig}
usepackage{multirow, tabularx}

begin{document}
begin{figure}
setkeys{Gin}{width=linewidth, keepaspectratio}

begin{tabularx}{linewidth}{@{} *{4}{X} @{}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
subfloat[A short image]{includegraphics[valign=t]{x}}
& multicolumn{2}{>{hsize=dimexpr2hsize+2tabcolsep}X}{
multirow[t]{2}{=}{subfloat[A tall image]{includegraphics[height=78mm,valign=t]{x}}}
}
& subfloat[A short image]{includegraphics[valign=t]{x}} \
subfloat[A short image]{includegraphics[valign=t]{x}}
& & & subfloat[A short image]{includegraphics[valign=t]{x}} \
& subfloat[A short image]{includegraphics[valign=t]{x}}
& subfloat[A short image]{includegraphics[valign=t]{x}}
& \
end{tabularx}
caption{The full caption}
end{figure}
end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









ZarkoZarko

128k868167




128k868167













  • yes! it absolutely does. Thank you very much. I have just a small add-on question: see below

    – BeSeLuFri
    2 hours ago













  • I would like to know why the formatting turns out to be slightly different in my environment - see: i.stack.imgur.com/Pscrs.png

    – BeSeLuFri
    2 hours ago













  • with my code? if you not change anything the only reason which cross my mind is that your latex installation has older packages than mine (i test code with recent miktex suite, upgraded yesterday).

    – Zarko
    2 hours ago



















  • yes! it absolutely does. Thank you very much. I have just a small add-on question: see below

    – BeSeLuFri
    2 hours ago













  • I would like to know why the formatting turns out to be slightly different in my environment - see: i.stack.imgur.com/Pscrs.png

    – BeSeLuFri
    2 hours ago













  • with my code? if you not change anything the only reason which cross my mind is that your latex installation has older packages than mine (i test code with recent miktex suite, upgraded yesterday).

    – Zarko
    2 hours ago

















yes! it absolutely does. Thank you very much. I have just a small add-on question: see below

– BeSeLuFri
2 hours ago







yes! it absolutely does. Thank you very much. I have just a small add-on question: see below

– BeSeLuFri
2 hours ago















I would like to know why the formatting turns out to be slightly different in my environment - see: i.stack.imgur.com/Pscrs.png

– BeSeLuFri
2 hours ago







I would like to know why the formatting turns out to be slightly different in my environment - see: i.stack.imgur.com/Pscrs.png

– BeSeLuFri
2 hours ago















with my code? if you not change anything the only reason which cross my mind is that your latex installation has older packages than mine (i test code with recent miktex suite, upgraded yesterday).

– Zarko
2 hours ago





with my code? if you not change anything the only reason which cross my mind is that your latex installation has older packages than mine (i test code with recent miktex suite, upgraded yesterday).

– Zarko
2 hours ago


















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%2f481768%2fcompatibility-of-subfigure-with-subfig-package%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

Lallio

Unable to find Lightning Node

Futebolista