캡션 안에 itemize 환경을 사용하고 싶지만 들여쓰기가 본문과 같습니다. 캡션에 목록을 들여쓰고 싶습니다.
\documentclass{scrbook}
\usepackage{caption}
\begin{document}
foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo
\begin{itemize}
\item bar
\end{itemize}
\begin{figure}
\captionsetup{singlelinecheck=off}
\caption[foo bar]{foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
\begin{itemize}
\item this listing belongs to the caption
\item but looks as if it was part of the body
\end{itemize}}
\end{figure}
\end{document}
답변1
그러한 설정은 표준이라기보다는 배제일 가능성이 높습니다. 따라서 \textbullet
적절한 itemize
간격을 사용하여 항목을 수동으로 설정하십시오.
\documentclass{scrbook}
\usepackage{caption}
\begin{document}
foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo
\begin{itemize}
\item bar
\end{itemize}
\begin{figure}
\captionsetup{singlelinecheck=off}
\caption[foo bar]{foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
\textbullet \hspace{\labelsep}this listing belongs to the caption
\textbullet \hspace{\labelsep}but looks as if it was part of the body
}
\end{figure}
\end{document}
환경 에서 콘텐츠를 설정할 수도 있습니다 tabularx
.
\documentclass{scrbook}
\usepackage{caption,tabularx}
\begin{document}
foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo
\begin{itemize}
\item bar
\end{itemize}
\begin{figure}
\captionsetup{singlelinecheck=off}
\caption[foo bar]{foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
\medskip
\noindent
\begin{tabularx}{\linewidth}{@{\phantom{\figurename~\thefigure:~}} l @{\hspace{\labelsep}} X @{}}
\textbullet & this listing belongs to the caption \\
\textbullet & but looks as if it was part of the body
\end{tabularx}}
\end{figure}
\end{document}