I am currently writing my thesis and have to use a template which uses the kvoptions package. My problem is, that I use a figure (consisting of two subfigures), which is automatically placed at the end of the chapter, followed by the other figures I use later on. I tried to force LaTex to place it on the following page using [p]. Unfortunately this does not work because it is somehow interpreted as key-value-whatever.

\begin{figure}[caption={Figure}, label={fig:h2}]
{   \includegraphics[width=1\textwidth]{figures/subfigure1.jpg}}

{   \includegraphics[width=1\textwidth]{figures/subfigure2.jpg}}
        \caption{Another subfigure}\label{fig:h2b}

This is the code for the figure. I know the caption and label passing is not like commonly in LaTex, buuut this is the way it is used in my template. However, changing this to the standard way and insert a positioning command like [h] or [p] results in the following exception:

! Package xkeyval Error: `p' undefined in families `figure'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
l.14 \begin{figure}[p]

Does someone know a way how to use the package I am forced to use and nevertheless be able to customly place figures (and tables as well I guess, cuz this works they work the same way as figures)?

Many thanks in advance!


I searched the template's code and found this section that redefines figure:



        % Control caching
        \tikzset{external/export next=\figure@cache}%
        % Raise a warning if a figure is not cached
        % \ifthenelse{\equal{\figure@cache}{false}}{%
        %     \ClassWarning{isthesis}{Figure \figure@cachename is not cached.}%
        % }%
        % Set cache name
        % Without dedicated TOC caption
        % With dedicated TOC caption

So I changed my figure:

\begin{figure}[caption={Figure}, label={fig:h2}, placement={exact}]

But this does not change anything in the outcome. In the pdf the figure is still at the end of the capter.

This is the class used by the template: https://pastebin.com/J4Vq5GpT

And this is the actual .tex file: https://pastebin.com/4VwvUDYv

The tex file uses the class as documentclass and the does all the template stuff and finally loads the content file(s).

  • if you show no code how are we to guess how figure has been redefined? Probably the class defines a key such as position=htp Jan 7 at 0:53
  • 2
    this is unrelated to kvoption package whch is about using key=value in \usepackage and \documentclass Jan 7 at 0:56
  • @DavidCarlisle thanks, I searched for an redefinition and added my findings to the question.
    – longroad
    Jan 7 at 11:45
  • 1
    you should really always provide a proper example not just fragments, so people can test answers . Does the class you are using have no documentation??? The code suggests p is not available but you could change it, change \newcommand{\figure@internal@placement}{ht}% to \newcommand{\figure@internal@placement}{htp}% to restore the default position to htp Jan 7 at 11:48
  • This worked, thank you!
    – longroad
    Jan 7 at 12:09

1 Answer 1


The code suggests p is not available but you could change it, change




to restore the default position to htp

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .