Graphics, Figures & TablesBreak Caption in 2 pages

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
LaureTomas
Posts: 3
Joined: Fri May 24, 2024 4:52 pm

Break Caption in 2 pages

Post by LaureTomas »

Hello everyone, I'm pretty new to LaTeX and I'm facing a frustrating problem :cry:

I have a figure and a big caption for the figure, so if I use the classical \caption argument inside the figure the caption falls outside the page and it's lost.

I've been searching for ways to split the caption so it can continue in the next page. I came across with the package capt-of and its function \captionof{}. I place this function outside the figure environment and it works smoothly, the caption now continues in the next page, great!

Now my problem is that I want to format the caption using \captionsetup, and when I use \captionsetup from the package \caption the function \captionof doesn't work as previously, now the caption is not broken, it jumps completely to the next page, leaving the figure alone...


Is there any way to make it work \captionof (making the caption continue in the next page) together with \captionsetup to format the caption?

Thank you so much in advance!

EDIT:
've made public the Overleaf project (https://www.overleaf.com/project/665051 ... b6c4440fec) where I'm making different attempts to make it work, in Example1.tex I use \capt-of and it works, but in Example2.tex I load \caption and the caption jumps to the next page.
Last edited by LaureTomas on Mon May 27, 2024 9:19 am, edited 1 time in total.

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Break Caption in 2 pages

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

Instead of using the capt-of package, use the \captionof command of the caption package.

However, I strongly recommend not creating a super-heavy caption. Instead, I would make a small caption and include the vast text in the regular text.

Stefan
LaTeX.org admin
LaureTomas
Posts: 3
Joined: Fri May 24, 2024 4:52 pm

Break Caption in 2 pages

Post by LaureTomas »

.
LaureTomas
Posts: 3
Joined: Fri May 24, 2024 4:52 pm

Break Caption in 2 pages

Post by LaureTomas »

Stefan Kottwitz wrote:Hi,

welcome to the forum!

Instead of using the capt-of package, use the \captionof command of the caption package.

However, I strongly recommend not creating a super-heavy caption. Instead, I would make a small caption and include the vast text in the regular text.

Stefan
Hi Stefan

Thank you for your quick answer.

I've been trying to use the \captionof from the package \caption but it does not work the same way as the one from the package \capt-of, I don't know why.

The one from \capt-of breaks the caption between 2 pages, but the one from \caption it does not...
I've made public the Overleaf project (https://www.overleaf.com/project/665051 ... b6c4440fec) where I'm making different attempts to make it work, in Example1.tex I use \capt-of and it works, but in Example2.tex I load \caption and the caption jumps to the next page.

Any ideas why and how to use the \captionof from \caption the same way as the one from \capt-of?
Thanks again!
Post Reply