Graphics, Figures & TablesHorizontal line between figure's label and caption

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
m0squito
Posts: 5
Joined: Thu Jan 14, 2010 9:52 pm

Horizontal line between figure's label and caption

Post by m0squito »

My goal is to be able to draw a horizontal line between a Figure's label and a caption, e.g:

~~~~~~~~~~
| FIGURE
| 2.3
~~~~~~~~~~

Figure 2.3
-----------------------------------------------------------(the line)-------
Caption for Figure 2.3 appears here - right below a horizontal line. The line is as wide as a page and separates the caption from the label 'Figure 2.3'.


I've been trying to use caption package, but I didn't see any option for that. I've searched a lot of forums with no result. Can anyone help me?

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: Horizontal line between figure's label and caption

Post by sommerfee »

Take a look at \DeclareCaptionFormat offered by the caption package.
m0squito
Posts: 5
Joined: Thu Jan 14, 2010 9:52 pm

Re: Horizontal line between figure's label and caption

Post by m0squito »

Thank you so much, that did the trick!
Post Reply