Произошла неожиданная отмена отступа при объединении с использованием caption и capt-of package

Произошла неожиданная отмена отступа при объединении с использованием caption и capt-of package

Абзацы после "captionof" не отступают должным образом. Либо закомментируйте \usepackage{caption}, либо \captionof{figure}{figure}уберите отступы обратно.

Но мне нужен пакет capt-of, а также пакет caption, чтобы переопределить "labelsep" как пробел, а не двоеточие. Есть ли альтернативный способ сделать это.

Вот пример:

\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}

решение1

На этот вопрос уже есть ответ здесь:\captionof путаница с отступом абзацано я хотел бы добавить небольшое пояснение.

Theдокументацияв пакете (стр. 18) говорится, что "... поэтому вы должны использовать оба \captionofи только внутри ящиков или сред". Поэтому помещение команды в группу, содержащую саму себя, должно быть законным способом.caption\captionof\captionof*{\captionof{figure}{figure}}

Вам это тоже не нужно, \usepackage{capt-of}так как captionпакет также предоставляет \captionof.

Связанный контент