1

This question already has an answer here:

The paragraphs after "captionof" do not indent properly. Either comment out \usepackage{caption} or \captionof{figure}{figure} take the indentations back.

But I need the capt-of package and also caption package to redefine "labelsep" to be space other than colon. Is there an alternative way to do so.

Here is an example:

\documentclass{article}

\usepackage{capt-of}
\usepackage{caption}

\begin{document}
before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption 

\captionof{figure}{figure}

after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption 

after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption 
\end{document}

marked as duplicate by Andrew, Maarten Dhondt, egreg, David Carlisle, Werner Nov 17 '16 at 7:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

This question already has an answer here: \captionof messes with paragraph indent but I'd like to add a bit of explanation.

The documentation of \captionof in caption package (page 18) says that " ... so you should use both \captionof and \captionof* only inside boxes or environments." So putting the command in a group of itself like {\captionof{figure}{figure}} should be a legit way.

Also you do not need to \usepackage{capt-of} as caption package also provides \captionof.

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