I am somewhat intrigued by question Something like \enumerate, but with custom numbers at each \item, which mentions a book where each question is numbered by its page number and the question number.
That question is about manual numbering of list items, but how would one go about making each equation be automatically numbered by its page number + a sequential number for each page. For instance, the first equation on page 50 would be numbered 50-1 and the second 50-2, while the first equation on the following page would be numbered 51-1.
Also, how can one extend this to cover floating material too, i.e., figures and tables. I’d prefer a numbering where each type of material (equation, figure, table) has a separate counter, so the first equation, the first figure and the first table on page 50 would all be numbered 50-1. (One would of course disambiguate between them by referring to ‘Equation 50-1’, ‘Figure 50-1’ and ‘Table 50-1’.)
For anyone wanting to have a go at this problem, here’s a simple example document you can use:
\documentclass{article} \usepackage{lipsum} \begin{document} \def\bodytext{ \begin{equation} 2 + 2 = 4 \end{equation} \begin{equation} e^{\pi i} = -1 \end{equation} \begin{figure}[htbp] First figure. \caption{Figure caption one.} \end{figure} \begin{figure}[htbp] Second figure. \caption{Figure caption two.} \end{figure} \begin{table}[htbp] First table. \caption{Table caption one.} \end{table} } \bodytext \lipsum \bodytext \lipsum \bodytext \end{document} By the way, I’m not sure ‘50-1’ is the best formatting to use. Other alternatives I can think of are (50-1), 50.1, 50(1) and 50a, and I actually think I prefer the last one. Any comments on this? (If so, please post them as comments, not answers.)
