O cancelamento inesperado do recuo ocorreu ao combinar o uso de legenda e pacote capt-of

O cancelamento inesperado do recuo ocorreu ao combinar o uso de legenda e pacote capt-of

Os parágrafos após "captionof" não são recuados corretamente. Comente \usepackage{caption}ou \captionof{figure}{figure}retire os recuos.

Mas preciso do pacote capt-of e também do pacote caption para redefinir "labelsep" como um espaço diferente de dois pontos. Existe uma maneira alternativa de fazer isso.

Aqui está um exemplo:

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

Responder1

Essa pergunta já tem resposta aqui:\captionof mexe com recuo de parágrafomas gostaria de acrescentar um pouco de explicação.

Odocumentaçãoda \captionofembalagem caption(página 18) diz que "... então você deve usar ambos \captionofe \captionof*somente dentro de caixas ou ambientes." Portanto, colocar o comando em um grupo próprio {\captionof{figure}{figure}}deveria ser uma maneira legítima.

Além disso, você não precisa, \usepackage{capt-of}pois captiono pacote também fornece \captionof.

informação relacionada