how to index subtables as in number them as 1,2,3,…? [closed]












0















documentclass{article}
usepackage{subcaption}
usepackage[demo]{graphicx}
usepackage{tabularx}

begin{document}
begin{table*}[h]
renewcommand{arraystretch}{1.2}

begin{subtable}{0.22textwidth}
centering
begin{tabular}{c}
includegraphics[width=0.5textwidth]{A.jpg}
end{tabular}
end{subtable}%
begin{subtable}{0.75textwidth}
begin{tabular}{rp{27em}}
textbf{SRC}: & caption1 \
textbf{Prototypa}: & caption2 \
textbf{MODEL2}: & caption3 \
textbf{MODEL3}: & caption4 \
textbf{MODEL4}: & caption5 \

end{tabular}
end{subtable}

caption{ Examples how the model behaves.}
end{table*}
end{document}









share|improve this question















closed as unclear what you're asking by Kurt, Zarko, marmot, JouleV, Raaja Mar 5 at 5:02


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.



















  • Welcome to TeX.se, and thanks for adding an example document. I made your example compilable. To format code on the site, select it all an click on the {} icon, or use Control-K. It's also helpful to add a bit of explanation of your problem in the question itself instead of just relying on the question title to convey your problem.

    – Alan Munn
    Mar 4 at 0:18






  • 2





    This is now quite different from your original question. But as I showed in my answer, there is really no need for subcaption here. You can do this all with a tabular. But you still haven't explained what you want the output to look like.

    – Alan Munn
    Mar 4 at 21:05
















0















documentclass{article}
usepackage{subcaption}
usepackage[demo]{graphicx}
usepackage{tabularx}

begin{document}
begin{table*}[h]
renewcommand{arraystretch}{1.2}

begin{subtable}{0.22textwidth}
centering
begin{tabular}{c}
includegraphics[width=0.5textwidth]{A.jpg}
end{tabular}
end{subtable}%
begin{subtable}{0.75textwidth}
begin{tabular}{rp{27em}}
textbf{SRC}: & caption1 \
textbf{Prototypa}: & caption2 \
textbf{MODEL2}: & caption3 \
textbf{MODEL3}: & caption4 \
textbf{MODEL4}: & caption5 \

end{tabular}
end{subtable}

caption{ Examples how the model behaves.}
end{table*}
end{document}









share|improve this question















closed as unclear what you're asking by Kurt, Zarko, marmot, JouleV, Raaja Mar 5 at 5:02


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.



















  • Welcome to TeX.se, and thanks for adding an example document. I made your example compilable. To format code on the site, select it all an click on the {} icon, or use Control-K. It's also helpful to add a bit of explanation of your problem in the question itself instead of just relying on the question title to convey your problem.

    – Alan Munn
    Mar 4 at 0:18






  • 2





    This is now quite different from your original question. But as I showed in my answer, there is really no need for subcaption here. You can do this all with a tabular. But you still haven't explained what you want the output to look like.

    – Alan Munn
    Mar 4 at 21:05














0












0








0








documentclass{article}
usepackage{subcaption}
usepackage[demo]{graphicx}
usepackage{tabularx}

begin{document}
begin{table*}[h]
renewcommand{arraystretch}{1.2}

begin{subtable}{0.22textwidth}
centering
begin{tabular}{c}
includegraphics[width=0.5textwidth]{A.jpg}
end{tabular}
end{subtable}%
begin{subtable}{0.75textwidth}
begin{tabular}{rp{27em}}
textbf{SRC}: & caption1 \
textbf{Prototypa}: & caption2 \
textbf{MODEL2}: & caption3 \
textbf{MODEL3}: & caption4 \
textbf{MODEL4}: & caption5 \

end{tabular}
end{subtable}

caption{ Examples how the model behaves.}
end{table*}
end{document}









share|improve this question
















documentclass{article}
usepackage{subcaption}
usepackage[demo]{graphicx}
usepackage{tabularx}

begin{document}
begin{table*}[h]
renewcommand{arraystretch}{1.2}

begin{subtable}{0.22textwidth}
centering
begin{tabular}{c}
includegraphics[width=0.5textwidth]{A.jpg}
end{tabular}
end{subtable}%
begin{subtable}{0.75textwidth}
begin{tabular}{rp{27em}}
textbf{SRC}: & caption1 \
textbf{Prototypa}: & caption2 \
textbf{MODEL2}: & caption3 \
textbf{MODEL3}: & caption4 \
textbf{MODEL4}: & caption5 \

end{tabular}
end{subtable}

caption{ Examples how the model behaves.}
end{table*}
end{document}






tables captions subcaption white-space






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 4 at 21:04









Alan Munn

162k28432708




162k28432708










asked Mar 3 at 23:41









bluesblues

244




244




closed as unclear what you're asking by Kurt, Zarko, marmot, JouleV, Raaja Mar 5 at 5:02


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as unclear what you're asking by Kurt, Zarko, marmot, JouleV, Raaja Mar 5 at 5:02


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • Welcome to TeX.se, and thanks for adding an example document. I made your example compilable. To format code on the site, select it all an click on the {} icon, or use Control-K. It's also helpful to add a bit of explanation of your problem in the question itself instead of just relying on the question title to convey your problem.

    – Alan Munn
    Mar 4 at 0:18






  • 2





    This is now quite different from your original question. But as I showed in my answer, there is really no need for subcaption here. You can do this all with a tabular. But you still haven't explained what you want the output to look like.

    – Alan Munn
    Mar 4 at 21:05



















  • Welcome to TeX.se, and thanks for adding an example document. I made your example compilable. To format code on the site, select it all an click on the {} icon, or use Control-K. It's also helpful to add a bit of explanation of your problem in the question itself instead of just relying on the question title to convey your problem.

    – Alan Munn
    Mar 4 at 0:18






  • 2





    This is now quite different from your original question. But as I showed in my answer, there is really no need for subcaption here. You can do this all with a tabular. But you still haven't explained what you want the output to look like.

    – Alan Munn
    Mar 4 at 21:05

















Welcome to TeX.se, and thanks for adding an example document. I made your example compilable. To format code on the site, select it all an click on the {} icon, or use Control-K. It's also helpful to add a bit of explanation of your problem in the question itself instead of just relying on the question title to convey your problem.

– Alan Munn
Mar 4 at 0:18





Welcome to TeX.se, and thanks for adding an example document. I made your example compilable. To format code on the site, select it all an click on the {} icon, or use Control-K. It's also helpful to add a bit of explanation of your problem in the question itself instead of just relying on the question title to convey your problem.

– Alan Munn
Mar 4 at 0:18




2




2





This is now quite different from your original question. But as I showed in my answer, there is really no need for subcaption here. You can do this all with a tabular. But you still haven't explained what you want the output to look like.

– Alan Munn
Mar 4 at 21:05





This is now quite different from your original question. But as I showed in my answer, there is really no need for subcaption here. You can do this all with a tabular. But you still haven't explained what you want the output to look like.

– Alan Munn
Mar 4 at 21:05










1 Answer
1






active

oldest

votes


















1














I don't think you need to use the subcaption package at all for what you want to do. Instead, just put everything into a tabular. I've used the technique described in this answer to centre the images and the labels vertically. I've made a counter to number the rows automatically. You'll need to reset the counter using setcounter{imgcnt}{0} before each table that you want to have counted. This can be made more automatic by hooking into the tabular environment, but not if you have tabulars inside other tabulars as you have here. I've also simplified these tables from your examples, because it was unclear what you were trying to do with them.



documentclass{article}
usepackage[demo]{graphicx}
usepackage{linguex}
usepackage{array}
usepackage{etoolbox}
newcounter{imgcnt}
renewcommand{theimgcnt}{arabic{imgcnt})}
newcommand{tcount}{stepcounter{imgcnt}theimgcnt}

% Technique for centring image from https://tex.stackexchange.com/a/69747/2693
newcommand{tabincgr}[2]{ensuremath{vcenter{hbox{includegraphics[#1]{#2}}}}}


begin{document}
begin{table*}
renewcommand{arraystretch}{1.2}
begin{tabular}{m{.05linewidth}p{.2linewidth}p{.75linewidth}}
tcount &
tabincgr[width=0.75linewidth]{a.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.5linewidth]{b.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2 \
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.75linewidth]{c.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3 \
line 4
end{tabular}
end{tabular}
caption{ Examples how the model behaves.}label{tab:results:examples}
end{table*}
end{document}


output of code






share|improve this answer


























  • thanks so much for your help. i was looking for something that's in the same line as the image and not at the bottom.

    – blues
    Mar 4 at 0:27






  • 1





    @blues Then my comment is even more pertinent: how could anyone tell from your question what output you want? I suspect you don't need to use subcaption at all then. Do you just need a number? Please edit your question to explain how you want the output to look.

    – Alan Munn
    Mar 4 at 1:13













  • so i was able to fix that but the problem is there's unwanted white space between the image and the caption column. how to get rid of that?

    – blues
    Mar 4 at 19:49






  • 1





    @blues I must say you're really not helping here much. You've edited your question but the code is no longer compilable, and you still haven't explained what you actually want. I don't think you should be using subcaption at all for what you want. The spacing between the number and the image in my solution is determined by the m{.05} column specification. You can make that m{1em}@{} to make it smaller and remove the intercolumn space.

    – Alan Munn
    Mar 4 at 19:55













  • thanks so much for your solution first of all. I was trying to check if it was possible to remove the whitespace between the image and captions in the code posted.

    – blues
    Mar 4 at 20:05


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I don't think you need to use the subcaption package at all for what you want to do. Instead, just put everything into a tabular. I've used the technique described in this answer to centre the images and the labels vertically. I've made a counter to number the rows automatically. You'll need to reset the counter using setcounter{imgcnt}{0} before each table that you want to have counted. This can be made more automatic by hooking into the tabular environment, but not if you have tabulars inside other tabulars as you have here. I've also simplified these tables from your examples, because it was unclear what you were trying to do with them.



documentclass{article}
usepackage[demo]{graphicx}
usepackage{linguex}
usepackage{array}
usepackage{etoolbox}
newcounter{imgcnt}
renewcommand{theimgcnt}{arabic{imgcnt})}
newcommand{tcount}{stepcounter{imgcnt}theimgcnt}

% Technique for centring image from https://tex.stackexchange.com/a/69747/2693
newcommand{tabincgr}[2]{ensuremath{vcenter{hbox{includegraphics[#1]{#2}}}}}


begin{document}
begin{table*}
renewcommand{arraystretch}{1.2}
begin{tabular}{m{.05linewidth}p{.2linewidth}p{.75linewidth}}
tcount &
tabincgr[width=0.75linewidth]{a.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.5linewidth]{b.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2 \
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.75linewidth]{c.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3 \
line 4
end{tabular}
end{tabular}
caption{ Examples how the model behaves.}label{tab:results:examples}
end{table*}
end{document}


output of code






share|improve this answer


























  • thanks so much for your help. i was looking for something that's in the same line as the image and not at the bottom.

    – blues
    Mar 4 at 0:27






  • 1





    @blues Then my comment is even more pertinent: how could anyone tell from your question what output you want? I suspect you don't need to use subcaption at all then. Do you just need a number? Please edit your question to explain how you want the output to look.

    – Alan Munn
    Mar 4 at 1:13













  • so i was able to fix that but the problem is there's unwanted white space between the image and the caption column. how to get rid of that?

    – blues
    Mar 4 at 19:49






  • 1





    @blues I must say you're really not helping here much. You've edited your question but the code is no longer compilable, and you still haven't explained what you actually want. I don't think you should be using subcaption at all for what you want. The spacing between the number and the image in my solution is determined by the m{.05} column specification. You can make that m{1em}@{} to make it smaller and remove the intercolumn space.

    – Alan Munn
    Mar 4 at 19:55













  • thanks so much for your solution first of all. I was trying to check if it was possible to remove the whitespace between the image and captions in the code posted.

    – blues
    Mar 4 at 20:05
















1














I don't think you need to use the subcaption package at all for what you want to do. Instead, just put everything into a tabular. I've used the technique described in this answer to centre the images and the labels vertically. I've made a counter to number the rows automatically. You'll need to reset the counter using setcounter{imgcnt}{0} before each table that you want to have counted. This can be made more automatic by hooking into the tabular environment, but not if you have tabulars inside other tabulars as you have here. I've also simplified these tables from your examples, because it was unclear what you were trying to do with them.



documentclass{article}
usepackage[demo]{graphicx}
usepackage{linguex}
usepackage{array}
usepackage{etoolbox}
newcounter{imgcnt}
renewcommand{theimgcnt}{arabic{imgcnt})}
newcommand{tcount}{stepcounter{imgcnt}theimgcnt}

% Technique for centring image from https://tex.stackexchange.com/a/69747/2693
newcommand{tabincgr}[2]{ensuremath{vcenter{hbox{includegraphics[#1]{#2}}}}}


begin{document}
begin{table*}
renewcommand{arraystretch}{1.2}
begin{tabular}{m{.05linewidth}p{.2linewidth}p{.75linewidth}}
tcount &
tabincgr[width=0.75linewidth]{a.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.5linewidth]{b.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2 \
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.75linewidth]{c.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3 \
line 4
end{tabular}
end{tabular}
caption{ Examples how the model behaves.}label{tab:results:examples}
end{table*}
end{document}


output of code






share|improve this answer


























  • thanks so much for your help. i was looking for something that's in the same line as the image and not at the bottom.

    – blues
    Mar 4 at 0:27






  • 1





    @blues Then my comment is even more pertinent: how could anyone tell from your question what output you want? I suspect you don't need to use subcaption at all then. Do you just need a number? Please edit your question to explain how you want the output to look.

    – Alan Munn
    Mar 4 at 1:13













  • so i was able to fix that but the problem is there's unwanted white space between the image and the caption column. how to get rid of that?

    – blues
    Mar 4 at 19:49






  • 1





    @blues I must say you're really not helping here much. You've edited your question but the code is no longer compilable, and you still haven't explained what you actually want. I don't think you should be using subcaption at all for what you want. The spacing between the number and the image in my solution is determined by the m{.05} column specification. You can make that m{1em}@{} to make it smaller and remove the intercolumn space.

    – Alan Munn
    Mar 4 at 19:55













  • thanks so much for your solution first of all. I was trying to check if it was possible to remove the whitespace between the image and captions in the code posted.

    – blues
    Mar 4 at 20:05














1












1








1







I don't think you need to use the subcaption package at all for what you want to do. Instead, just put everything into a tabular. I've used the technique described in this answer to centre the images and the labels vertically. I've made a counter to number the rows automatically. You'll need to reset the counter using setcounter{imgcnt}{0} before each table that you want to have counted. This can be made more automatic by hooking into the tabular environment, but not if you have tabulars inside other tabulars as you have here. I've also simplified these tables from your examples, because it was unclear what you were trying to do with them.



documentclass{article}
usepackage[demo]{graphicx}
usepackage{linguex}
usepackage{array}
usepackage{etoolbox}
newcounter{imgcnt}
renewcommand{theimgcnt}{arabic{imgcnt})}
newcommand{tcount}{stepcounter{imgcnt}theimgcnt}

% Technique for centring image from https://tex.stackexchange.com/a/69747/2693
newcommand{tabincgr}[2]{ensuremath{vcenter{hbox{includegraphics[#1]{#2}}}}}


begin{document}
begin{table*}
renewcommand{arraystretch}{1.2}
begin{tabular}{m{.05linewidth}p{.2linewidth}p{.75linewidth}}
tcount &
tabincgr[width=0.75linewidth]{a.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.5linewidth]{b.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2 \
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.75linewidth]{c.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3 \
line 4
end{tabular}
end{tabular}
caption{ Examples how the model behaves.}label{tab:results:examples}
end{table*}
end{document}


output of code






share|improve this answer















I don't think you need to use the subcaption package at all for what you want to do. Instead, just put everything into a tabular. I've used the technique described in this answer to centre the images and the labels vertically. I've made a counter to number the rows automatically. You'll need to reset the counter using setcounter{imgcnt}{0} before each table that you want to have counted. This can be made more automatic by hooking into the tabular environment, but not if you have tabulars inside other tabulars as you have here. I've also simplified these tables from your examples, because it was unclear what you were trying to do with them.



documentclass{article}
usepackage[demo]{graphicx}
usepackage{linguex}
usepackage{array}
usepackage{etoolbox}
newcounter{imgcnt}
renewcommand{theimgcnt}{arabic{imgcnt})}
newcommand{tcount}{stepcounter{imgcnt}theimgcnt}

% Technique for centring image from https://tex.stackexchange.com/a/69747/2693
newcommand{tabincgr}[2]{ensuremath{vcenter{hbox{includegraphics[#1]{#2}}}}}


begin{document}
begin{table*}
renewcommand{arraystretch}{1.2}
begin{tabular}{m{.05linewidth}p{.2linewidth}p{.75linewidth}}
tcount &
tabincgr[width=0.75linewidth]{a.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.5linewidth]{b.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2 \
line 3\
line 4
end{tabular}
\
\
tcount &
tabincgr[width=0.75linewidth]{c.jpg}
&
begin{tabular}{rp{27em}}
line 1\
line 2\
line 3 \
line 4
end{tabular}
end{tabular}
caption{ Examples how the model behaves.}label{tab:results:examples}
end{table*}
end{document}


output of code







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 4 at 2:47

























answered Mar 4 at 0:13









Alan MunnAlan Munn

162k28432708




162k28432708













  • thanks so much for your help. i was looking for something that's in the same line as the image and not at the bottom.

    – blues
    Mar 4 at 0:27






  • 1





    @blues Then my comment is even more pertinent: how could anyone tell from your question what output you want? I suspect you don't need to use subcaption at all then. Do you just need a number? Please edit your question to explain how you want the output to look.

    – Alan Munn
    Mar 4 at 1:13













  • so i was able to fix that but the problem is there's unwanted white space between the image and the caption column. how to get rid of that?

    – blues
    Mar 4 at 19:49






  • 1





    @blues I must say you're really not helping here much. You've edited your question but the code is no longer compilable, and you still haven't explained what you actually want. I don't think you should be using subcaption at all for what you want. The spacing between the number and the image in my solution is determined by the m{.05} column specification. You can make that m{1em}@{} to make it smaller and remove the intercolumn space.

    – Alan Munn
    Mar 4 at 19:55













  • thanks so much for your solution first of all. I was trying to check if it was possible to remove the whitespace between the image and captions in the code posted.

    – blues
    Mar 4 at 20:05



















  • thanks so much for your help. i was looking for something that's in the same line as the image and not at the bottom.

    – blues
    Mar 4 at 0:27






  • 1





    @blues Then my comment is even more pertinent: how could anyone tell from your question what output you want? I suspect you don't need to use subcaption at all then. Do you just need a number? Please edit your question to explain how you want the output to look.

    – Alan Munn
    Mar 4 at 1:13













  • so i was able to fix that but the problem is there's unwanted white space between the image and the caption column. how to get rid of that?

    – blues
    Mar 4 at 19:49






  • 1





    @blues I must say you're really not helping here much. You've edited your question but the code is no longer compilable, and you still haven't explained what you actually want. I don't think you should be using subcaption at all for what you want. The spacing between the number and the image in my solution is determined by the m{.05} column specification. You can make that m{1em}@{} to make it smaller and remove the intercolumn space.

    – Alan Munn
    Mar 4 at 19:55













  • thanks so much for your solution first of all. I was trying to check if it was possible to remove the whitespace between the image and captions in the code posted.

    – blues
    Mar 4 at 20:05

















thanks so much for your help. i was looking for something that's in the same line as the image and not at the bottom.

– blues
Mar 4 at 0:27





thanks so much for your help. i was looking for something that's in the same line as the image and not at the bottom.

– blues
Mar 4 at 0:27




1




1





@blues Then my comment is even more pertinent: how could anyone tell from your question what output you want? I suspect you don't need to use subcaption at all then. Do you just need a number? Please edit your question to explain how you want the output to look.

– Alan Munn
Mar 4 at 1:13







@blues Then my comment is even more pertinent: how could anyone tell from your question what output you want? I suspect you don't need to use subcaption at all then. Do you just need a number? Please edit your question to explain how you want the output to look.

– Alan Munn
Mar 4 at 1:13















so i was able to fix that but the problem is there's unwanted white space between the image and the caption column. how to get rid of that?

– blues
Mar 4 at 19:49





so i was able to fix that but the problem is there's unwanted white space between the image and the caption column. how to get rid of that?

– blues
Mar 4 at 19:49




1




1





@blues I must say you're really not helping here much. You've edited your question but the code is no longer compilable, and you still haven't explained what you actually want. I don't think you should be using subcaption at all for what you want. The spacing between the number and the image in my solution is determined by the m{.05} column specification. You can make that m{1em}@{} to make it smaller and remove the intercolumn space.

– Alan Munn
Mar 4 at 19:55







@blues I must say you're really not helping here much. You've edited your question but the code is no longer compilable, and you still haven't explained what you actually want. I don't think you should be using subcaption at all for what you want. The spacing between the number and the image in my solution is determined by the m{.05} column specification. You can make that m{1em}@{} to make it smaller and remove the intercolumn space.

– Alan Munn
Mar 4 at 19:55















thanks so much for your solution first of all. I was trying to check if it was possible to remove the whitespace between the image and captions in the code posted.

– blues
Mar 4 at 20:05





thanks so much for your solution first of all. I was trying to check if it was possible to remove the whitespace between the image and captions in the code posted.

– blues
Mar 4 at 20:05



Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents