1

I updated recently my packages. Since this update, I have an error when I try to use the environment figwindow from the package picinpar with the package hvfloat.

I get the following error message:

! Undefined control sequence.
\caption@wincaption ...caption@ContinuedFloattrue 
                                                  \fi \edef \@tempa {\expand...
l.16         },{figwindow in a text}\label{fig}]

? 

Here is a MWE:

\documentclass{book}

\usepackage[utf8]{inputenc}     
\usepackage[T1]{fontenc}    
\usepackage{lipsum} 

\usepackage{graphicx}       
\usepackage{picinpar}       
\usepackage{hvfloat}


\begin{document}

    \begin{figwindow}[1,c,{ 
            \includegraphics[width=4.0cm,draft]{example-image.png}
        },{figwindow in a text}\label{fig}]
        \lipsum[1]
    \end{figwindow}

\end{document}

Is it a solvable problem or should I wait a new update ?

  • I changed to example-image and added the full error message so it shows which command is undefined. – David Carlisle Oct 6 '18 at 18:18
  • I can confirm it works in texlive 2017 and not in texlive 2018 (it's caption.sty that changed) – David Carlisle Oct 6 '18 at 18:21
0

Fix:

I will fix this tomorrow and upload a new version of the caption package bundle to CTAN next week-end.

Work-around:

\documentclass{book}

\usepackage[utf8]{inputenc}     
\usepackage[T1]{fontenc}    
\usepackage{lipsum} 

\usepackage{graphicx}       
\usepackage{picinpar}       
\usepackage{hvfloat}

\makeatletter
\providecommand\caption@ContinuedFloattrue{\caption@setflag1}
\makeatother

\begin{document}

    \begin{figwindow}[1,c,{ 
            \includegraphics[width=4.0cm,draft]{example-image.png}
        },{figwindow in a text}\label{fig}]
        \lipsum[1]
    \end{figwindow}

\end{document}

P.S.: https://gitlab.com/axelsommerfeldt/caption/issues/38

  • Cool! I gain reputation on SX by fixing bugs I have introduced myself. Maybe I should produce more bugs, making my reputation skyrocketing. Reminds me of dilbert.com/strip/1995-11-13 and dilbert.com/strip/1995-11-14 . – Axel Sommerfeldt Oct 6 '18 at 19:35
  • Is there any other way to gain rep? :-) – David Carlisle Oct 6 '18 at 20:19
  • I just uploaded a new version 2018-10-06 of the caption package bundle to CTAN, so it should be available on CTAN and for TeXlive and MikTeX (and hopefully other TeX distributions as well) soon. – Axel Sommerfeldt Oct 8 '18 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.