Why is the following minimal example not working?
I.e., what do I need to do, in order to define the float placement specifier of a figure within a macro? (I know that I should use \newcommand
, but in the "full" example the error is part of an involved "superfigure" command. \newcommand
is not working too btw.)
\documentclass{scrreprt}
\usepackage{blindtext}
\def\PosNotWorking{h}
\def\FramboxNotWorking{5cm}
\def\CaptionWorking{Caption is working.}
\begin{document}
\Blindtext[1]
\begin{figure}[\PosNotWorking]
\centering
\framebox[5cm]{My special figure. (Pos: \PosNotWorking)}
\caption{\CaptionWorking}
\end{figure}
\Blindtext[1]
\end{document}
If I compile this, the figure is at the top (default behaviour). If I enter \figure[h]
instead of \figure[\PosNotWorking]
, the figure is of course between the two paragraphs.