2

I am new to LaTeX and trying to get my head around a number of things. I have a number of examples and table throughout my report that I want to be able to call thing like Example 1.3, Table 2.1, Figure 2.3 etc.

I was wondering if there was any way that these could be numerated automatically, ie would change to fit the chapter they were in.

Thanks

1 Answers1

2

enter image description here

\documentclass{report}

\newtheorem{example}{Example}[chapter]
\begin{document}
\chapter{zz}

zz zz zzzzzz

\begin{table}[ht]

\begin{tabular}{cc}
1&22\\
33&4
\end{tabular}
\caption{some numbers\label{ttt}}

\end{table}

\begin{example}\label{ee}
some stuff
\end{example}

see table \ref{ttt} and example \ref{ee}

\end{document}
David Carlisle
  • 757,742