numbering subfigures
up vote
0
down vote
favorite
I've got three figures that I place vertically on a half page.
begin{figure}
includegraphics[width=0.4textwidth]{images/fig1a.png}
includegraphics[width=0.4textwidth]{images/fig1b.png}
includegraphics[width=0.4textwidth]{images/fig1c.png}
end{figure}
I want to subnumber them and put the (a), (b) and (c) at the corners of the images. All three figures are of different resolutions and sizes. It's hard do that and get them vertically aligned in the resulted pdf. So, my question is if there is a proper tool or package to do this automatically?
Regards
Ilya
floats numbering
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
up vote
0
down vote
favorite
I've got three figures that I place vertically on a half page.
begin{figure}
includegraphics[width=0.4textwidth]{images/fig1a.png}
includegraphics[width=0.4textwidth]{images/fig1b.png}
includegraphics[width=0.4textwidth]{images/fig1c.png}
end{figure}
I want to subnumber them and put the (a), (b) and (c) at the corners of the images. All three figures are of different resolutions and sizes. It's hard do that and get them vertically aligned in the resulted pdf. So, my question is if there is a proper tool or package to do this automatically?
Regards
Ilya
floats numbering
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
3
Welcome to TeX SX! Try thesubfigureenvironment, from thesubcaptionpackage.
– Bernard
Nov 9 at 22:54
Which corner? Lower left is easiest.
– John Kormylo
Nov 10 at 4:34
Ideally upper right or left.
– Ilya Bryukhanov
Nov 10 at 6:44
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've got three figures that I place vertically on a half page.
begin{figure}
includegraphics[width=0.4textwidth]{images/fig1a.png}
includegraphics[width=0.4textwidth]{images/fig1b.png}
includegraphics[width=0.4textwidth]{images/fig1c.png}
end{figure}
I want to subnumber them and put the (a), (b) and (c) at the corners of the images. All three figures are of different resolutions and sizes. It's hard do that and get them vertically aligned in the resulted pdf. So, my question is if there is a proper tool or package to do this automatically?
Regards
Ilya
floats numbering
I've got three figures that I place vertically on a half page.
begin{figure}
includegraphics[width=0.4textwidth]{images/fig1a.png}
includegraphics[width=0.4textwidth]{images/fig1b.png}
includegraphics[width=0.4textwidth]{images/fig1c.png}
end{figure}
I want to subnumber them and put the (a), (b) and (c) at the corners of the images. All three figures are of different resolutions and sizes. It's hard do that and get them vertically aligned in the resulted pdf. So, my question is if there is a proper tool or package to do this automatically?
Regards
Ilya
floats numbering
floats numbering
asked Nov 9 at 22:45
Ilya Bryukhanov
1
1
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
3
Welcome to TeX SX! Try thesubfigureenvironment, from thesubcaptionpackage.
– Bernard
Nov 9 at 22:54
Which corner? Lower left is easiest.
– John Kormylo
Nov 10 at 4:34
Ideally upper right or left.
– Ilya Bryukhanov
Nov 10 at 6:44
add a comment |
3
Welcome to TeX SX! Try thesubfigureenvironment, from thesubcaptionpackage.
– Bernard
Nov 9 at 22:54
Which corner? Lower left is easiest.
– John Kormylo
Nov 10 at 4:34
Ideally upper right or left.
– Ilya Bryukhanov
Nov 10 at 6:44
3
3
Welcome to TeX SX! Try the
subfigure environment, from the subcaption package.– Bernard
Nov 9 at 22:54
Welcome to TeX SX! Try the
subfigure environment, from the subcaption package.– Bernard
Nov 9 at 22:54
Which corner? Lower left is easiest.
– John Kormylo
Nov 10 at 4:34
Which corner? Lower left is easiest.
– John Kormylo
Nov 10 at 4:34
Ideally upper right or left.
– Ilya Bryukhanov
Nov 10 at 6:44
Ideally upper right or left.
– Ilya Bryukhanov
Nov 10 at 6:44
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
There are a few details which can be painful to discover, since some are from the caption manual. The blank lines (par) are needed to keep them from winding up side by side.
You said different sizes. Although the MWE uses known sizes, this will work for images with unknown sizes. subcaptionbox does this automatically (thank you Alex Sommerfelt for pointing this out), but it is no big deal. All subfigures are basically minipages with captions.
documentclass{article}
usepackage[singlelinecheck=off]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
usebox0
caption{}
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}
leavevmodellap{(c)~}% left
usebox0
(c)
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

These solutions puts the subcaption at the upper right corner.
documentclass{article}
usepackage[singlelinecheck=off,justification=raggedleft,position=top]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
caption{}
usebox0
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}% in case you want to align side by side
strutmakebox[wd0][r]{(c)}par% above
usebox0%
rlap{raisebox{dimexpr ht0-topskip}{(c)}}% right
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

You write "The subfig package does this automatically". This is true, but thesubcaptionpackage does this automatically, too, whensubcaptionboxis used instead of thesubfigureenvironment.
– Axel Sommerfeldt
Nov 10 at 21:11
@AxelSommerfeldt - Ah yes. An even better reason to stop using subfig.
– John Kormylo
Nov 11 at 14:43
add a comment |
up vote
0
down vote
I think the simplest of all methods is to use the subfigure package, that adjusts to the desired dimensions of your images, althought it has problems with tikz, so I avoid it, but it works wonderfully with imported graphics
documentclass{article}
usepackage{graphicx,subfigure}
begin{document}
begin{figure}
centering
subfigure[Subcaption a.]{includegraphics[width=.6textwidth]{example-image-a}}
subfigure[Subcaption b.]{includegraphics[width=.6textwidth]{example-image-b}}
subfigure[Subcaption c.]{includegraphics[width=.6textwidth]{example-image-c}}
caption{Caption}
end{figure}
end{document}

subfigureis obsolete package. instead of it is suggested to use thesubfigpackage.
– Zarko
3 hours ago
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
There are a few details which can be painful to discover, since some are from the caption manual. The blank lines (par) are needed to keep them from winding up side by side.
You said different sizes. Although the MWE uses known sizes, this will work for images with unknown sizes. subcaptionbox does this automatically (thank you Alex Sommerfelt for pointing this out), but it is no big deal. All subfigures are basically minipages with captions.
documentclass{article}
usepackage[singlelinecheck=off]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
usebox0
caption{}
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}
leavevmodellap{(c)~}% left
usebox0
(c)
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

These solutions puts the subcaption at the upper right corner.
documentclass{article}
usepackage[singlelinecheck=off,justification=raggedleft,position=top]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
caption{}
usebox0
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}% in case you want to align side by side
strutmakebox[wd0][r]{(c)}par% above
usebox0%
rlap{raisebox{dimexpr ht0-topskip}{(c)}}% right
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

You write "The subfig package does this automatically". This is true, but thesubcaptionpackage does this automatically, too, whensubcaptionboxis used instead of thesubfigureenvironment.
– Axel Sommerfeldt
Nov 10 at 21:11
@AxelSommerfeldt - Ah yes. An even better reason to stop using subfig.
– John Kormylo
Nov 11 at 14:43
add a comment |
up vote
0
down vote
There are a few details which can be painful to discover, since some are from the caption manual. The blank lines (par) are needed to keep them from winding up side by side.
You said different sizes. Although the MWE uses known sizes, this will work for images with unknown sizes. subcaptionbox does this automatically (thank you Alex Sommerfelt for pointing this out), but it is no big deal. All subfigures are basically minipages with captions.
documentclass{article}
usepackage[singlelinecheck=off]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
usebox0
caption{}
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}
leavevmodellap{(c)~}% left
usebox0
(c)
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

These solutions puts the subcaption at the upper right corner.
documentclass{article}
usepackage[singlelinecheck=off,justification=raggedleft,position=top]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
caption{}
usebox0
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}% in case you want to align side by side
strutmakebox[wd0][r]{(c)}par% above
usebox0%
rlap{raisebox{dimexpr ht0-topskip}{(c)}}% right
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

You write "The subfig package does this automatically". This is true, but thesubcaptionpackage does this automatically, too, whensubcaptionboxis used instead of thesubfigureenvironment.
– Axel Sommerfeldt
Nov 10 at 21:11
@AxelSommerfeldt - Ah yes. An even better reason to stop using subfig.
– John Kormylo
Nov 11 at 14:43
add a comment |
up vote
0
down vote
up vote
0
down vote
There are a few details which can be painful to discover, since some are from the caption manual. The blank lines (par) are needed to keep them from winding up side by side.
You said different sizes. Although the MWE uses known sizes, this will work for images with unknown sizes. subcaptionbox does this automatically (thank you Alex Sommerfelt for pointing this out), but it is no big deal. All subfigures are basically minipages with captions.
documentclass{article}
usepackage[singlelinecheck=off]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
usebox0
caption{}
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}
leavevmodellap{(c)~}% left
usebox0
(c)
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

These solutions puts the subcaption at the upper right corner.
documentclass{article}
usepackage[singlelinecheck=off,justification=raggedleft,position=top]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
caption{}
usebox0
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}% in case you want to align side by side
strutmakebox[wd0][r]{(c)}par% above
usebox0%
rlap{raisebox{dimexpr ht0-topskip}{(c)}}% right
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

There are a few details which can be painful to discover, since some are from the caption manual. The blank lines (par) are needed to keep them from winding up side by side.
You said different sizes. Although the MWE uses known sizes, this will work for images with unknown sizes. subcaptionbox does this automatically (thank you Alex Sommerfelt for pointing this out), but it is no big deal. All subfigures are basically minipages with captions.
documentclass{article}
usepackage[singlelinecheck=off]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
usebox0
caption{}
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}
leavevmodellap{(c)~}% left
usebox0
(c)
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

These solutions puts the subcaption at the upper right corner.
documentclass{article}
usepackage[singlelinecheck=off,justification=raggedleft,position=top]{subcaption}
usepackage{graphicx}
begin{document}
begin{figure}
centering
subcaptionbox{}{includegraphics[width=0.4textwidth]{example-image-a}}
sbox0{includegraphics[width=0.4textwidth]{example-image-b}}% measure width
begin{subfigure}{wd0}
caption{}
usebox0
end{subfigure}
sbox0{includegraphics[width=0.4textwidth]{example-image-c}}% DIY caption
begin{minipage}{wd0}% in case you want to align side by side
strutmakebox[wd0][r]{(c)}par% above
usebox0%
rlap{raisebox{dimexpr ht0-topskip}{(c)}}% right
end{minipage}
caption{There is usually one of these too.}
end{figure}
end{document}

edited Nov 11 at 15:19
answered Nov 10 at 4:53
John Kormylo
43.5k12466
43.5k12466
You write "The subfig package does this automatically". This is true, but thesubcaptionpackage does this automatically, too, whensubcaptionboxis used instead of thesubfigureenvironment.
– Axel Sommerfeldt
Nov 10 at 21:11
@AxelSommerfeldt - Ah yes. An even better reason to stop using subfig.
– John Kormylo
Nov 11 at 14:43
add a comment |
You write "The subfig package does this automatically". This is true, but thesubcaptionpackage does this automatically, too, whensubcaptionboxis used instead of thesubfigureenvironment.
– Axel Sommerfeldt
Nov 10 at 21:11
@AxelSommerfeldt - Ah yes. An even better reason to stop using subfig.
– John Kormylo
Nov 11 at 14:43
You write "The subfig package does this automatically". This is true, but the
subcaption package does this automatically, too, when subcaptionbox is used instead of the subfigure environment.– Axel Sommerfeldt
Nov 10 at 21:11
You write "The subfig package does this automatically". This is true, but the
subcaption package does this automatically, too, when subcaptionbox is used instead of the subfigure environment.– Axel Sommerfeldt
Nov 10 at 21:11
@AxelSommerfeldt - Ah yes. An even better reason to stop using subfig.
– John Kormylo
Nov 11 at 14:43
@AxelSommerfeldt - Ah yes. An even better reason to stop using subfig.
– John Kormylo
Nov 11 at 14:43
add a comment |
up vote
0
down vote
I think the simplest of all methods is to use the subfigure package, that adjusts to the desired dimensions of your images, althought it has problems with tikz, so I avoid it, but it works wonderfully with imported graphics
documentclass{article}
usepackage{graphicx,subfigure}
begin{document}
begin{figure}
centering
subfigure[Subcaption a.]{includegraphics[width=.6textwidth]{example-image-a}}
subfigure[Subcaption b.]{includegraphics[width=.6textwidth]{example-image-b}}
subfigure[Subcaption c.]{includegraphics[width=.6textwidth]{example-image-c}}
caption{Caption}
end{figure}
end{document}

subfigureis obsolete package. instead of it is suggested to use thesubfigpackage.
– Zarko
3 hours ago
add a comment |
up vote
0
down vote
I think the simplest of all methods is to use the subfigure package, that adjusts to the desired dimensions of your images, althought it has problems with tikz, so I avoid it, but it works wonderfully with imported graphics
documentclass{article}
usepackage{graphicx,subfigure}
begin{document}
begin{figure}
centering
subfigure[Subcaption a.]{includegraphics[width=.6textwidth]{example-image-a}}
subfigure[Subcaption b.]{includegraphics[width=.6textwidth]{example-image-b}}
subfigure[Subcaption c.]{includegraphics[width=.6textwidth]{example-image-c}}
caption{Caption}
end{figure}
end{document}

subfigureis obsolete package. instead of it is suggested to use thesubfigpackage.
– Zarko
3 hours ago
add a comment |
up vote
0
down vote
up vote
0
down vote
I think the simplest of all methods is to use the subfigure package, that adjusts to the desired dimensions of your images, althought it has problems with tikz, so I avoid it, but it works wonderfully with imported graphics
documentclass{article}
usepackage{graphicx,subfigure}
begin{document}
begin{figure}
centering
subfigure[Subcaption a.]{includegraphics[width=.6textwidth]{example-image-a}}
subfigure[Subcaption b.]{includegraphics[width=.6textwidth]{example-image-b}}
subfigure[Subcaption c.]{includegraphics[width=.6textwidth]{example-image-c}}
caption{Caption}
end{figure}
end{document}

I think the simplest of all methods is to use the subfigure package, that adjusts to the desired dimensions of your images, althought it has problems with tikz, so I avoid it, but it works wonderfully with imported graphics
documentclass{article}
usepackage{graphicx,subfigure}
begin{document}
begin{figure}
centering
subfigure[Subcaption a.]{includegraphics[width=.6textwidth]{example-image-a}}
subfigure[Subcaption b.]{includegraphics[width=.6textwidth]{example-image-b}}
subfigure[Subcaption c.]{includegraphics[width=.6textwidth]{example-image-c}}
caption{Caption}
end{figure}
end{document}

answered Nov 11 at 21:08
José Ignacio Cuevas Barrientos
211
211
subfigureis obsolete package. instead of it is suggested to use thesubfigpackage.
– Zarko
3 hours ago
add a comment |
subfigureis obsolete package. instead of it is suggested to use thesubfigpackage.
– Zarko
3 hours ago
subfigure is obsolete package. instead of it is suggested to use the subfig package.– Zarko
3 hours ago
subfigure is obsolete package. instead of it is suggested to use the subfig package.– Zarko
3 hours ago
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f459226%2fnumbering-subfigures%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
3
Welcome to TeX SX! Try the
subfigureenvironment, from thesubcaptionpackage.– Bernard
Nov 9 at 22:54
Which corner? Lower left is easiest.
– John Kormylo
Nov 10 at 4:34
Ideally upper right or left.
– Ilya Bryukhanov
Nov 10 at 6:44