Something wrong with \DeclareCaptionFormat
I have a problem with this code. The word end
go to the next line.
\documentclass{article}
\usepackage{caption}
\DeclareCaptionFormat{myformat}{#1 and #2 and #3 end}
\captionsetup{format=myformat}
\begin{document}
\begin{figure}
\centering
\rule{3cm}{1cm}
\caption{Foo image}
\end{figure}
\end{document}
Edited by touhami