HenriquesLab / HenriquesLab/rxiv-maker
eature request: automatically continue long figure legends on the next page
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40
- Forks
- 6
- Avg merge
- 7m
- Merged PRs (30d)
- 6
Description
In biology papers, multi-panel figures often have long legends because they need to describe experimental conditions, image acquisition, quantification, sample sizes, statistics, and scale bars. When the image and full legend do not fit on one page, authors may need to reduce the figure size substantially, which can make panels and labels hard to read.
At present, I use raw LaTeX injection to manually continue the legend on the next page. This works, but it is time-consuming and fragile: the author has to decide where to split the legend, manually create a continued float, and ensure that the caption formatting and figure numbering remain correct.
Here is a simplified version of the current workaround.

{#fig:cell-migration width="0.70" tex_position="p"} **Cell migration is regulated by matrix organisation.**
(**A**) Overview of the experimental workflow.
(**B**) Representative microscopy images of cells cultured on aligned and non-aligned matrices. Scale bar: 50 µm.
(**C**) Quantification of migration speed across matrix conditions. Data are shown as boxplots; each point represents one cell from three independent experiments.
(**D**) Quantification of directional persistence and cell-shape measurements during migration.
{{tex:
\begin{figure*}[t!]
\ContinuedFloat
\captionsetup{
width=0.95\textwidth,
singlelinecheck=false,
justification=justified
}
\caption[]{\textbf{(Continued from previous page.)}
\textbf{(E--H)} Time-lapse imaging and analysis of protrusion dynamics, focal-adhesion turnover, and cell-shape changes.
\textbf{(E)} Representative time-lapse images of cells migrating through a model tissue barrier. Scale bar: 10 µm.
\textbf{(F)} Quantification of migration modes across experimental conditions.
\textbf{(G)} Analysis of protrusion lifetimes and changes in cell area during migration.
\textbf{(H)} Summary model of the proposed mechanism. Source data and analysis code are available in the associated repository.
}
\end{figure*}
}}
This approach also has a few practical limitations:
- The author has to manually choose where the caption should split.
- The continuation has to be written in LaTeX rather than Markdown.
- Blank lines inside
\caption{}can cause compilation errors. - It is easy to introduce formatting differences between the first and continued portions of the legend.
It would be very helpful if rxiv-maker could automatically detect when a figure and its legend do not fit on the same page, then continue the remaining legend on the next page while retaining the same figure number and cross-reference.
Ideally, the rendered output would:
- Keep the figure at a readable size.
- Place the part of the legend that fits below the figure.
- Move the remaining legend text to the following page automatically.
- Retain the original figure number, caption style, and cross-reference target.
- Optionally add a small “Continued from previous page” label.
- Make this the default behaviour for overflowing legends, with an option to disable it if needed.
This would be especially valuable for multi-panel biology figures and would remove the need for fragile manual LaTeX workarounds.
Thank you for considering this feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files, tests, or entry points. First locate the figure and caption rendering path and any PDF layout tests, then define completion as automatic legend continuation with preserved numbering, caption style, and cross-references, plus an option to disable it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, markdown, python
- Domain
- build-system, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100