How to add a continuous line at the end of every caption?
I am new to lyx. I would like to know what should i write in the LaTeX preamble of the document to add a continuous line at the end of each caption and another line to separate the foot from the text (Just like the line that appears to separate the header from the body text when you use fancy option in page style).
header-footer captions lyx rules
add a comment |
I am new to lyx. I would like to know what should i write in the LaTeX preamble of the document to add a continuous line at the end of each caption and another line to separate the foot from the text (Just like the line that appears to separate the header from the body text when you use fancy option in page style).
header-footer captions lyx rules
add a comment |
I am new to lyx. I would like to know what should i write in the LaTeX preamble of the document to add a continuous line at the end of each caption and another line to separate the foot from the text (Just like the line that appears to separate the header from the body text when you use fancy option in page style).
header-footer captions lyx rules
I am new to lyx. I would like to know what should i write in the LaTeX preamble of the document to add a continuous line at the end of each caption and another line to separate the foot from the text (Just like the line that appears to separate the header from the body text when you use fancy option in page style).
header-footer captions lyx rules
header-footer captions lyx rules
edited Feb 3 at 1:47
Werner
443k689791676
443k689791676
asked Feb 3 at 1:24
MartínMartín
111
111
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Welcome to TeX.SE! This answer is based on this answer, and both are using the caption
package.
documentclass{article}
usepackage{graphicx}
usepackage{caption}
DeclareCaptionTextFormat{myformat}{#1hrulefill}
captionsetup[figure]{textformat=myformat}
begin{document}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a caption.}
label{fig:test}
end{figure}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a very long caption. Normally one should try to avoid long
captions but this here is to illustrate that it works also if the text runs
over several lines.}
label{fig:testlong}
end{figure}
end{document}
Your code worked well, just like you showed in your images. How ever the best coding for my question is the one you cited in your answer: usepackage{caption} DeclareCaptionFormat{myformat}{#1#2#3hrulefill} captionsetup[figure]{format=myformat}
– Martín
Feb 3 at 13:43
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%2f473120%2fhow-to-add-a-continuous-line-at-the-end-of-every-caption%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
Welcome to TeX.SE! This answer is based on this answer, and both are using the caption
package.
documentclass{article}
usepackage{graphicx}
usepackage{caption}
DeclareCaptionTextFormat{myformat}{#1hrulefill}
captionsetup[figure]{textformat=myformat}
begin{document}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a caption.}
label{fig:test}
end{figure}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a very long caption. Normally one should try to avoid long
captions but this here is to illustrate that it works also if the text runs
over several lines.}
label{fig:testlong}
end{figure}
end{document}
Your code worked well, just like you showed in your images. How ever the best coding for my question is the one you cited in your answer: usepackage{caption} DeclareCaptionFormat{myformat}{#1#2#3hrulefill} captionsetup[figure]{format=myformat}
– Martín
Feb 3 at 13:43
add a comment |
Welcome to TeX.SE! This answer is based on this answer, and both are using the caption
package.
documentclass{article}
usepackage{graphicx}
usepackage{caption}
DeclareCaptionTextFormat{myformat}{#1hrulefill}
captionsetup[figure]{textformat=myformat}
begin{document}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a caption.}
label{fig:test}
end{figure}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a very long caption. Normally one should try to avoid long
captions but this here is to illustrate that it works also if the text runs
over several lines.}
label{fig:testlong}
end{figure}
end{document}
Your code worked well, just like you showed in your images. How ever the best coding for my question is the one you cited in your answer: usepackage{caption} DeclareCaptionFormat{myformat}{#1#2#3hrulefill} captionsetup[figure]{format=myformat}
– Martín
Feb 3 at 13:43
add a comment |
Welcome to TeX.SE! This answer is based on this answer, and both are using the caption
package.
documentclass{article}
usepackage{graphicx}
usepackage{caption}
DeclareCaptionTextFormat{myformat}{#1hrulefill}
captionsetup[figure]{textformat=myformat}
begin{document}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a caption.}
label{fig:test}
end{figure}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a very long caption. Normally one should try to avoid long
captions but this here is to illustrate that it works also if the text runs
over several lines.}
label{fig:testlong}
end{figure}
end{document}
Welcome to TeX.SE! This answer is based on this answer, and both are using the caption
package.
documentclass{article}
usepackage{graphicx}
usepackage{caption}
DeclareCaptionTextFormat{myformat}{#1hrulefill}
captionsetup[figure]{textformat=myformat}
begin{document}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a caption.}
label{fig:test}
end{figure}
begin{figure}[tb]
centering
includegraphics[width=textwidth]{example-image-duck}
caption{I'm a very long caption. Normally one should try to avoid long
captions but this here is to illustrate that it works also if the text runs
over several lines.}
label{fig:testlong}
end{figure}
end{document}
answered Feb 3 at 2:32
marmotmarmot
98.9k4113219
98.9k4113219
Your code worked well, just like you showed in your images. How ever the best coding for my question is the one you cited in your answer: usepackage{caption} DeclareCaptionFormat{myformat}{#1#2#3hrulefill} captionsetup[figure]{format=myformat}
– Martín
Feb 3 at 13:43
add a comment |
Your code worked well, just like you showed in your images. How ever the best coding for my question is the one you cited in your answer: usepackage{caption} DeclareCaptionFormat{myformat}{#1#2#3hrulefill} captionsetup[figure]{format=myformat}
– Martín
Feb 3 at 13:43
Your code worked well, just like you showed in your images. How ever the best coding for my question is the one you cited in your answer: usepackage{caption} DeclareCaptionFormat{myformat}{#1#2#3hrulefill} captionsetup[figure]{format=myformat}
– Martín
Feb 3 at 13:43
Your code worked well, just like you showed in your images. How ever the best coding for my question is the one you cited in your answer: usepackage{caption} DeclareCaptionFormat{myformat}{#1#2#3hrulefill} captionsetup[figure]{format=myformat}
– Martín
Feb 3 at 13:43
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%2f473120%2fhow-to-add-a-continuous-line-at-the-end-of-every-caption%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