그림과 섹션이 주어지면 해당 섹션의 그림에 어떤 section.counter
방식으로 레이블을 지정해야 합니다. 예 첫 번째 그림, 섹션 3. 그림 3.1이어야 합니다.\documentclass{article}
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage{caption}
\usepackage[paper=A4,pagesize]{typearea}
\usepackage[driver=pdftex, margin=2.54cm]{geometry}
%Preamble
\begin{document}
\date{}
\bibliography{Biblio}
\bibliographystyle{harvard}
\author{Aiden Strydom\\201103578}
\title{Artificial Intelligence\\Deliverable One: Agent Design}
%New page
\maketitle
\tableofcontents
\newpage
\section{Background}
\section{Section 1}
\section{Section 2}
\section{Section 3}
\begin{figure}[ht]
\centering
\resizebox{0.8\hsize}{!}{\includegraphics[angle=90,origin=c] {AeroponicsUCDportrait.pdf}}
%\caption{Figure 3.1 Aeroponics \textit{Use Cases}}
\caption[(3.1)]{A figure without list entry.}
\end{figure}
\end{document}
답변1
패키지 가 필요합니다 chngcntr
. 예제를 최소한으로 줄였습니다.
\documentclass[12pt]{article}
\usepackage[demo]{graphicx} % the demo option is just for the example
\usepackage{chngcntr}
% number figures within sections
\counterwithin{figure}{section}
\begin{document}
\author{Aiden Strydom\\201103578}
\title{Artificial Intelligence\\Deliverable One: Agent Design}
\maketitle
\tableofcontents
\newpage
\section{Section 1}
Some text
\section{Section 2}
Some text
\section{Section 3}
Some text
\begin{figure}[htp]
\centering
\includegraphics[angle=90,origin=c]{AeroponicsUCDportrait.pdf}
\caption{Aeroponics \textit{Use Cases}}
\end{figure}
\end{document}