1

I would like to change the placeholder tag for my figures/tables produced by the endfloat package so that it also contains a short description or keyword (for example the shortcaption).

So instead of the marker text "Figure X about here", I would like to have something like "Figure X: Study Area, about here".

My figure layout is essentially as follows:

\begin{figure*}[t!]
\centering
\includegraphics{Images/StudyArea}
\caption[Short Caption]{Long Caption}
\label{fig:StudyArea}
\end{figure*}

I managed to change the marker text using:

\renewcommand\floatplace[1]{%
\begin{center}
[\csname #1name\endcsname~\csname thepost#1\endcsname\ about here.]
\end{center}}

And I know that I can get the short caption as a reference within my text with \nameref{label}.

But is it somehow possible to include this in the placeholder for all my figures/tables?

Thanks in advance!

chsk
  • 3,667
M. N.
  • 11

1 Answers1

0

I don't think this is possible straight-forward since the endfloat package writes the code lines of the figure contents to the file without scanning them, and therefore without knowledge of the \caption arguments. (In fact it does not even know if there is a \caption inside the figure at all.)

But you could introduce a helper macro to give \floatplace a hint right before every figure, for example:

\documentclass{article}
\usepackage[demo]{graphicx}

\usepackage{endfloat}

% Command \setfloatcaption which defines \floatcaption % which could be used later on in \floatplace \newcommand\floatcaption{} \newcommand\setfloatcaption[1]{% \renewcommand\floatcaption{#1}}

% Redefinition of \floatplace which uses \floatcaption \renewcommand\floatplace[1]{% \begin{center}% [\csname #1name\endcsname~\csname thepost#1\endcsname: \floatcaption, about here.] \end{center}}

\begin{document}

\setfloatcaption{Study Area} % set \floatcaption used by \floatplace \begin{figure}[t!] \centering \includegraphics{Images/StudyArea} \caption[Short Caption]{Long Caption} \label{fig:StudyArea} \end{figure}

\end{document}

results in "[Figure 1: Study Area, about here.]".