Reducing width of image captions without messing up subcaptions
The captions in my document are as wide as the text itself and this can lead to parts where the caption seems to continue when in reality it's the document's text. So I wanted to reduce the width of the captions to about 80% of the linewidth or so, to make it clear what is a caption and what isn't.
I already have a command captionsetup{format=plain,indention=0pt,justification=justified} in my preamble so I tried adding width=0.8textwidth to that but it changes the width also for the subcaptions which will then overlap:

I also tried width=0.8linewidth but I get the same result.
Here's my example code, I would appreciate any help!
documentclass{scrreprt}
usepackage{subfig}
usepackage{graphicx}
captionsetup{format=plain,indention=0pt,justification=justified,width=0.8textwidth}
begin{document}
begin{figure}[h]
vspace{-0.6cm}
centering
subfloat[this is a short caption]{%
includegraphics[width=0.45textwidth]{example-image-a}}
quad
subfloat[this is a longer caption that goes on and on and on until at some point it finally stops.]{%
includegraphics[width=0.45textwidth]{example-image-b}}
caption{Foo}
end{figure}
begin{figure}[h]
centering
includegraphics[width=0.6textwidth]{example-image-c}
caption{Now this image need a really long caption to get across what I'm trying to say, so I'll have to figure out what to write here to fill some lines of text. I could have just included texttt{lipsum} or some other package but at this point I've waisted enough time to go back and change that.}
end{figure}
This is some text not belonging to the caption and it should be clearly distinguishable
end{document}

captions subcaption width
add a comment |
The captions in my document are as wide as the text itself and this can lead to parts where the caption seems to continue when in reality it's the document's text. So I wanted to reduce the width of the captions to about 80% of the linewidth or so, to make it clear what is a caption and what isn't.
I already have a command captionsetup{format=plain,indention=0pt,justification=justified} in my preamble so I tried adding width=0.8textwidth to that but it changes the width also for the subcaptions which will then overlap:

I also tried width=0.8linewidth but I get the same result.
Here's my example code, I would appreciate any help!
documentclass{scrreprt}
usepackage{subfig}
usepackage{graphicx}
captionsetup{format=plain,indention=0pt,justification=justified,width=0.8textwidth}
begin{document}
begin{figure}[h]
vspace{-0.6cm}
centering
subfloat[this is a short caption]{%
includegraphics[width=0.45textwidth]{example-image-a}}
quad
subfloat[this is a longer caption that goes on and on and on until at some point it finally stops.]{%
includegraphics[width=0.45textwidth]{example-image-b}}
caption{Foo}
end{figure}
begin{figure}[h]
centering
includegraphics[width=0.6textwidth]{example-image-c}
caption{Now this image need a really long caption to get across what I'm trying to say, so I'll have to figure out what to write here to fill some lines of text. I could have just included texttt{lipsum} or some other package but at this point I've waisted enough time to go back and change that.}
end{figure}
This is some text not belonging to the caption and it should be clearly distinguishable
end{document}

captions subcaption width
add a comment |
The captions in my document are as wide as the text itself and this can lead to parts where the caption seems to continue when in reality it's the document's text. So I wanted to reduce the width of the captions to about 80% of the linewidth or so, to make it clear what is a caption and what isn't.
I already have a command captionsetup{format=plain,indention=0pt,justification=justified} in my preamble so I tried adding width=0.8textwidth to that but it changes the width also for the subcaptions which will then overlap:

I also tried width=0.8linewidth but I get the same result.
Here's my example code, I would appreciate any help!
documentclass{scrreprt}
usepackage{subfig}
usepackage{graphicx}
captionsetup{format=plain,indention=0pt,justification=justified,width=0.8textwidth}
begin{document}
begin{figure}[h]
vspace{-0.6cm}
centering
subfloat[this is a short caption]{%
includegraphics[width=0.45textwidth]{example-image-a}}
quad
subfloat[this is a longer caption that goes on and on and on until at some point it finally stops.]{%
includegraphics[width=0.45textwidth]{example-image-b}}
caption{Foo}
end{figure}
begin{figure}[h]
centering
includegraphics[width=0.6textwidth]{example-image-c}
caption{Now this image need a really long caption to get across what I'm trying to say, so I'll have to figure out what to write here to fill some lines of text. I could have just included texttt{lipsum} or some other package but at this point I've waisted enough time to go back and change that.}
end{figure}
This is some text not belonging to the caption and it should be clearly distinguishable
end{document}

captions subcaption width
The captions in my document are as wide as the text itself and this can lead to parts where the caption seems to continue when in reality it's the document's text. So I wanted to reduce the width of the captions to about 80% of the linewidth or so, to make it clear what is a caption and what isn't.
I already have a command captionsetup{format=plain,indention=0pt,justification=justified} in my preamble so I tried adding width=0.8textwidth to that but it changes the width also for the subcaptions which will then overlap:

I also tried width=0.8linewidth but I get the same result.
Here's my example code, I would appreciate any help!
documentclass{scrreprt}
usepackage{subfig}
usepackage{graphicx}
captionsetup{format=plain,indention=0pt,justification=justified,width=0.8textwidth}
begin{document}
begin{figure}[h]
vspace{-0.6cm}
centering
subfloat[this is a short caption]{%
includegraphics[width=0.45textwidth]{example-image-a}}
quad
subfloat[this is a longer caption that goes on and on and on until at some point it finally stops.]{%
includegraphics[width=0.45textwidth]{example-image-b}}
caption{Foo}
end{figure}
begin{figure}[h]
centering
includegraphics[width=0.6textwidth]{example-image-c}
caption{Now this image need a really long caption to get across what I'm trying to say, so I'll have to figure out what to write here to fill some lines of text. I could have just included texttt{lipsum} or some other package but at this point I've waisted enough time to go back and change that.}
end{figure}
This is some text not belonging to the caption and it should be clearly distinguishable
end{document}

captions subcaption width
captions subcaption width
asked 3 mins ago
Superuser27Superuser27
71516
71516
add a comment |
add a comment |
0
active
oldest
votes
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%2f480881%2freducing-width-of-image-captions-without-messing-up-subcaptions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f480881%2freducing-width-of-image-captions-without-messing-up-subcaptions%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