TeX - LaTeX Asked by M. N. on November 10, 2020
I would like to change the placeholder tag for my figures/tables produced by the endfloat package so that it also contains a short descripton 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:
renewcommandfloatplace[1]{%
begin{center}
[csname #1nameendcsname~csname thepost#1endcsname 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!
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
newcommandfloatcaption{}
newcommandsetfloatcaption[1]{%
renewcommandfloatcaption{#1}}
% Redefinition of floatplace which uses floatcaption
renewcommandfloatplace[1]{%
begin{center}%
[csname #1nameendcsname~csname thepost#1endcsname: 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.]".
Answered by P.M. on November 10, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP