1

This question is somewhat related to How to check if figures are on the same page of call out/text? but for another purpose and its answer is irrelevant here (though probably the solution to my answer is deeply buried in the code of varioref), hence the current new question.

Is there a way to change the style of a float (e.g. with a caption text in bold face) depending on whether it is on the same page of call out or not?

Here is a skeleton of what I'm after:

\documentclass{article}
\usepackage{graphicx}
\usepackage{mwe}

\NewDocumentCommand{\IfOnTheSamePage}{ m m }{% (Maybe in bold face...) }

\begin{document} \begin{figure} \centering \includegraphics{example-image} \caption{% \IfOnTheSamePage{}{\bfseries}% Caption% } \end{figure} \end{document}

Denis Bitouzé
  • 9,652
  • 4
  • 27
  • 85

0 Answers0