{counters} is about macro writing involving counters. For general questions about numbering document elements, use {numbering}.
12
votes
2answers
678 views
Using counters or macros
Should I use counters or macros to store numerical data? Is there a limitation on a number of counters that can be used at the same time or other considerations?
I would also like to perform simple ...
0
votes
0answers
485 views
Counter too large [closed]
I get the error Counter too large while citing something using \footfullcite{}with biblatex.
I tried googling a bit and i found some website saying this is because there are only 9 superscript ...
5
votes
2answers
244 views
How to decorate a LaTeX command
I've been trying to change the numbering behavior of subsection to use a global counter. I first did:
\newcounter{maincount}
\renewcommand{\thesubsection}{\stepcounter{maincount}\arabic{maincount}}
...
3
votes
2answers
450 views
LuaLaTeX and counters
I'm trying to use values from expanded macros within a direct lua block, but I can't figure out how to get a value from any macro that has braces in it.
\directlua { tex.print(\value{footnote}} }
...
0
votes
1answer
381 views
3
votes
1answer
605 views
Custom numbering of listings
I have a number of listings in my document, numbered 1, 2, 3 and so on.
I need a table with three listings (say, three different variants of the same algorithm), that will be numbered as 2a, 2b, 2c. ...
5
votes
2answers
2k views
How to increase counter for \subsection
How can I make the first subsection under a section start on "d"? I currently have the following code to get a,b,c,d...:
\renewcommand{\thesubsection}{\alph{subsection}}
and I tried this to make it ...
25
votes
2answers
607 views
Can I count the number of times each reference is cited?
I am writing a paper, and I would like to be able to find out automatically how many times each reference is cited. This could either be appended to the references in a printed version, or outputted ...
7
votes
3answers
789 views
How to reference part of a theorem?
I have a corollary with a number of parts whose parts need to be referenced individually later on, so something like:
\begin{cor}\label{cor}
\begin{enumerate}
\item Part one \label{partone}
...
2
votes
1answer
3k views
pdfTeX warning: destination with same identifier has been already used, duplicate ignored (weird behavior)
Here is a minimal example:
\documentclass{amsart}
\usepackage{amsthm}
\usepackage[pdftex]{hyperref}
\newtheoremstyle{myexercise}{\baselineskip}{\baselineskip}{}{}{\bfseries}{.}{ ...
17
votes
2answers
659 views
Check if an entry is cited multiple times
I am trying to find out whether it is currently possible to have a test in Biblatex that tests at the very first time an entry is cited whether the same entry will be cited more than once in the ...
5
votes
2answers
907 views
TikZ counter and logical comparison
Does TikZ have counter that is similar to for loop in c language and logical comparison? e.g.,
\foreach \x in {0mm,11.200000mm,...,33.600000mm}
{
counter++; <== is this possible in tikz
...
5
votes
2answers
1k views
Access the chapter/section number and the chapter/section label through variables
Often I find myself in the situation that I'd like to design how chapters and sections look. I know there are packages that help to design such things, but non of them seems to give me the option to ...
4
votes
2answers
595 views
Using one counter for different floats?
I'm using two different floats, and I'd like to use the same counter for both. The standard LaTeX format for a new float is:
\newfloat{type}{placement}{ext}[outer counter]
I tried using this by ...
6
votes
3answers
426 views
Changing the section number to a fraction
In between two sections that really ought to be numbered 23 and 24,
I want to add another section, which I would like to call 23.5.
The code \setcounter{section}{23.5} \section{...}, however, results ...
5
votes
1answer
291 views
Change colour depending on counter
I have some text that I want to change colour depending on the current state of a counter. But I can't get this file to compile. (This is obviously simplified, since the texcolour command is actually ...
7
votes
3answers
335 views
Making register declarations local, Undefining a register (count, toks, etc.)
Is it possible to make \newcount, \newtoks, etc. respect grouping, so that, e.g., \newcount\temp\temp=2{\newcount\temp\temp=1}\showthe\temp gives 2 (instead of 0)?
Relatedly, is it possible to ...
5
votes
1answer
737 views
Beamer overlay and counter
I have a counter that I want to use for the beamer \onslide command.
Using
\newcounter{coun}
%....
%
\onslide<\coun ->{ ....}
doesn't work. What is the correct way to do this?
6
votes
2answers
763 views
Building labels out of counters
There is a simple version to my question, and a complex version. First, the simple version: I want to generate label names by combining a constant string with a counter's value, something like what is ...
7
votes
1answer
736 views
Refer to customized `enumerate` counter
Background
I'm typesetting a list of conditions for a certain mathematical object. There are three conditions. Later on I wish to provide an equivalent condition for the third. Therefore, it would be ...
15
votes
2answers
1k views
Wrong (hyper-)references after resetting chapter counter
The following MWE produces a PDF whose TOC has two entries: “Foo” and “Bar” with correct page numbers. So far, so good. However, upon clicking on the link to “Bar”, I am taken to the page for “Foo” ...
3
votes
2answers
400 views
Unexpected tikz/counter behaviour
What I've been trying to do, futilely, is to use the foreach[counter=\xi] x in {1,2,3} statement in tikz/pgf with LaTeX. This fails, every time. Whatever. So I moved on to trying to use a counter, ...
4
votes
1answer
342 views
Booleans fail in tabular environment
I've got a workaround for this problem, but maybe someone knows a cleaner way to fix it. I'm using the standard packages in TexLive 2009.
Here's the code that doesn't work:
\documentclass{article}
...
12
votes
3answers
521 views
Setting Initial Page number on command-line
I would like to typeset a LaTeX file and set the initial page number from the command line (as I need to often change it to merge with different documents). I thought that the following would work, ...
-1
votes
1answer
447 views
restating a theorem using theomac.sty
I am trying to restate a theorem environment using theomac.sty which floats around, following a suggestion I received here:
how do I refer back to counters?
The package I downloaded loads well, but ...
0
votes
0answers
285 views
how do I refer back to counters? [duplicate]
Possible Duplicate:
How do I repeat a theorem number?
I want to set up a simple macro that would do the following:
It would be very similar to \label{XX}, (say, \relabel{XX}) only instead ...
3
votes
1answer
3k 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
184 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 ...
6
votes
1answer
593 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 ...
8
votes
2answers
1k 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{ ... }
} ...
4
votes
1answer
131 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 ...
15
votes
3answers
1k 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.
11
votes
1answer
764 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 ...
16
votes
2answers
361 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 ...