\begin{wrapfigure}{l}{4cm}
\begin{center}
\includegraphics[width=3cm]{graphic.pdf}
\caption[Caption for the list of figures]{}
\label{fig:figureX}
\end{center}
\end{wrapfigure}
但是现在我得到“ Figure xy:”作为我的身影的标题。如果标题为空,如何删除“:” ?我用renewcommand找到了一些解决方案,但这改变了整个文档的标题样式。我只想在标题为空的情况下删除冒号。在任何其他情况下,最好有“ Figure xy:My Caption”。
只需加载caption
软件包即可解决此问题。它使冒号成为适当的“分隔符”,即,仅当有分隔符时才会出现。
\documentclass{article}
\usepackage{wrapfig}
\usepackage[demo]{graphicx}
\usepackage{caption}
\begin{document}
\begin{wrapfigure}{l}{4cm}
\begin{center}
\includegraphics[width=3cm]{graphic.pdf}
\caption[Caption for the list of figures]{}
\label{fig:figureX}
\end{center}
\end{wrapfigure}
\begin{wrapfigure}{l}{4cm}
\begin{center}
\includegraphics[width=3cm]{graphic.pdf}
\caption[Caption for the list of figures]{With capt