{counters} is about macro writing involving counters. For general questions about numbering document elements, use {numbering}.

learn more… | top users | synonyms

3
votes
1answer
4k views

Setting \setcounter{tocdepth} for an individual chapter

Hiya, Is it possible to set the \setcounter{tocdepth}{..} for one chapter only? The default depth is fine for the entire document, except for the last chapter- I only want the chapter title to appear ...
11
votes
1answer
204 views

How can I do something after the next pagebreak?

I'm writing a document where I say something like "if you look at Figure 1 on the next page, then you will see that blah blah blah". So what I want to do is have latex skip a number when numbering ...
11
votes
2answers
982 views

How to set a marker/counter/label to an arbitrary piece of text?

Is it possible to attach a marker to just a place in text, not to section, sub-section, etc.? This is what I'm trying to achieve: \begin{document} Alex (see~\ref{alex}) is a boy, Jessica ...
10
votes
2answers
2k views

Listings: different counters for different listing environments

How do I create two lstlisting environments that each have its own counter? If I use for example \lstnewenvironment{algorithm}[2]{ \renewcommand\lstlistingname{Algorithm} \lstset{ ... } } ...
5
votes
1answer
170 views

How to output the final value of some counter, like number of figures or tables in the middle of the document?

I need to put some formal statistics on the document itself somewhere in the middle, like "This document contains XXX figures and YYY tables (and may be even ZZZ formulas and PPP theorems)". Is there ...
18
votes
3answers
2k views

footnote counter, would like to restart from '1' each page

I would like the footnote counter to automatically restart from '1' for each page of my document.
12
votes
1answer
928 views

Infinite-depth list

I want to create a command set that allows me to do something like \nestedlist{ \listitem An item \sublist{ \listitem A sub item \listitem Another sub item } } and get An item 1.1 A ...
17
votes
2answers
507 views

Automatically numbering constants

I would like to somehow use LaTeX to automatically number constants. Some background As a mathematician, in my daily work there are a lot of throw-away constants which are not extremely important ...