
\listofFigures는 \subfig와 작동하지 않는 것 같습니다. 오류는 발생하지 않지만 메시지와 함께 컴파일이 중지됩니다 ...amsfonts/umsb.fd
. 어떻게 고치나요?
\documentclass[12pt,twoside]{report}
\usepackage{graphicx,subfig}
\begin{document}
\listoffigures
\begin{figure}
\centering
\subfloat[sample A]{\includegraphics[width=0.48\textwidth]{./figure/a.png}}
\subfloat[sample B]{\includegraphics[width=0.48\textwidth]{./figure/n.png}}\\
\caption{Sample.}
\label{fig:sample}
\end{figure}
\end{document}
답변1
일반적으로 그림 목록에는 하위 캡션이 포함되지 않습니다.
\documentclass[12pt,twoside]{report}
\usepackage{graphicx,subfig}
\begin{document}
\setcounter{lofdepth}{2}% include subcaptions
\listoffigures
\begin{figure}
\centering
\subfloat[sample A]{\includegraphics[width=0.48\textwidth]{example-image-a}}\hfil
\subfloat[sample B]{\includegraphics[width=0.48\textwidth]{example-image-b}}% automatic \par from \caption
\caption{Sample.}
\label{fig:sample}
\end{figure}
\end{document}
답변2
이미 답변을 얻으셨겠지만 {subfig}는 현재로서는 최선의 방법이 아닙니다. {subcaption}으로 바꾸는 것이 좋습니다. 제가 항상 사용하는 예를 들면 다음과 같습니다.
\documentclass{scrreprt}%
\RequirePackage{graphicx}%
\RequirePackage[hypcap=true]{caption}%
\RequirePackage[list=true,hypcap=true]{subcaption}% list=true ... print in List of Figures
\RequirePackage{hyperref}%
\captionsetup{hypcap=true}% -- hyperref
\captionsetup{rule=false}% reset make@caption to KOMA-Script,%
\captionsetup[subtable]{labelformat=simple,labelsep=period,listformat=simple}%
\captionsetup[subfigure]{labelformat=simple,labelsep=period,listformat=simple}%
\captionsetup{format=plain}%
\makeatletter%
\renewcommand\p@subfigure{\thefigure.}%
\renewcommand\p@subtable{\thetable.}%
\makeatother%
\begin{document}%
\chapter{Sample}%
\label{chap:Sample}%
\section{Sample section}%
\label{sec:Sample:Sample section}%
\begin{figure}[h]%
\captionsetup{justification=centering}% raggedright, justified, ...
\subcaptionbox{sample A\label{subfig:Sample:sample A}}{\includegraphics[width=0.48\textwidth]{example-image-a}}%
\hfill%
\subcaptionbox{sample B\label{subfig:Sample:sample B}}{\includegraphics[width=0.48\textwidth]{example-image-b}}%
\caption{Sample}%
\label{fig:Sample}%
\end{figure}%
\listoffigures%
\end{document}
이는 다음과 같은 결과를 제공합니다(scrreprt-class로 대체하지 않으려면 보고서 클래스와 함께 사용할 수 있습니다.).