Dada uma figura e uma seção, preciso que as figuras dessa seção sejam rotuladas de uma section.counter
maneira. Exemplo Primeira figura, seção 3. deveria ser Figura 3.1 Só posso usar\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}
Responder1
Você precisa do chngcntr
pacote. Reduzi o exemplo ao mínimo.
\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}