Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In the code below, the number of the second figure is 3 instead of 2. It seems that there is an incompatibility between caption and picinpar packages. Unfortunately, the picinpar documentation is not in English so I can't check it out.

\documentclass{article}
\usepackage{picinpar,lipsum} 
\usepackage[bf]{caption}
\begin{document}
\begin{figure}[!ht]
\caption{The first caption}
\end{figure}
\begin{figwindow}[1,r,%
\rule{4cm}{2cm},%
{The second caption with a wrong number!}\label{picinpar}]
\lipsum[1]

In Fig.~\ref{picinpar} ...
\end{figwindow}
\end{document}

I know that putting \addtocounter{figure}{...}‎ before and after the second figure, solves the problem, but I want to learn the right way to do this. Because this trick may be forgotten sometimes. So what is the right solution?

share|improve this question
1  
I suggest you to use wrapfig instead of picinpar –  Harish Kumar Jan 13 '13 at 22:13
    
or picins ctan.org/pkg/picinpar –  David Carlisle Jan 13 '13 at 22:14
1  
    
@DavidCarlisle What do you mean by "or picins ctan.org/pkg/picinpar"? –  Vahid Damanafshan Jan 16 '13 at 21:31
1  
I mean, if you follow that URL to the ctan catalog picinpar page it tells you that picinpar is old and to use picins instead (of course picins is getting old two these days:-) –  David Carlisle Jan 16 '13 at 21:33
add comment

1 Answer 1

Thanks for the bug report. I have opened a ticket at sourceforge:

https://sourceforge.net/p/latex-caption/tickets/3/

(See also comment of mine from Jan 14)

Unfortunately this was broken since v3.2 of the caption package.

I finally have found the time to fix it, so the counter should be correct after updating to the upcoming version of the caption package.

I will upload a new version of the caption package bundle as soon as I have fixed Ticket #6, too. Impatient ones can get the current version here:

https://sourceforge.net/p/latex-caption/code/HEAD/tree/trunk/tex/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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