{counters} is about macro writing involving counters. For general questions about numbering document elements, use {numbering}.
3
votes
1answer
98 views
Poorly formatted newlistof with memoir
I am having trouble adding a newlistof to a memoir file. My example follows the memoir answer example very closely, but I get an ugly "List of Comments" -- spacing across the page and returns are ...
6
votes
2answers
110 views
Defining shared counters for theorem environments *after* environments are defined
I am trying to use the same numbering for theorems, propositions, definitions, etc. This is normally easily be solved by using amsmath and defining these environments and using the same counter:
...
20
votes
3answers
348 views
@tempdima, reserved@a, @tempcnta, what else?
I'm aware that some "temporary" LaTeX dimensions etc. exist. I would, however, like to know all of them.
I know \reserved@a (macro), \@tempdima (dimension) and \@tempcnta (counter).
5
votes
2answers
92 views
How to reference the most recently used multiply-defined label
I want to be able to do something like the following:
\incmycounter{abc} %% counter value initialized to 0; associated with label 'abc'
\incmycounter{def} %% counter value initialized to 0; ...
5
votes
2answers
209 views
Splitting examples in gb4e
I would like to split examples in the \usepackage{gb4e} to get explanatory remarks as close to the explained item as possible. Usually, my typeset examples are looking like this:
(1) blabla
(2) a. ...
6
votes
1answer
120 views
Standalone document with chapter
When compiling large documents (with chapters) it is often useful to put different parts in separate files. I do this with the standalone-documentclass for all my tikzpictures. That way I can compile ...
41
votes
3answers
1k views
How to suppress page 13?
A lot of buildings have no 13th floor, some planes have no 13th row etc.
How do I set up a document that automatically suppresses page 13, figure 13, chapter 13 and so on, say, by jumping the ...
6
votes
1answer
228 views
Start theorem counter from specific number
I have defined a new theorem and I would like it to start from a specific number(let's say 3). At first I thought of using \addtocounter{\theexe}{3}(where exe is the new theorem) but I get an error ...
10
votes
3answers
139 views
\expandafter and counters not playing nicely
My google-fu has finally failed me...
I'm trying to write a package that will allow you say \addauthor{name, email} several times and have the title page properly formatted. Here is a minimal example ...
14
votes
2answers
300 views
square root of number in counter
I would like to get the square root of a number which I have stored into a counter. I have been using the calc package for summation and multiplication operations, but I cannot find anything like
...
4
votes
4answers
403 views
Beamer: uncovering itemize so the first slide shows no items at all
How can I achieve in beamer that the first slide of each frame is void (that is, only displays the frametitle)?
Suppose I have the following frame:
\frame{\frametitle{Title}
\begin{itemize}
...
9
votes
4answers
199 views
Dividing dimensions to get a count
Is there a way to divide two dimens and get a count? For example, if I have a box that doesn't fit on a single page, and I want to know the number of pages I'd need for the box (i.e., \heightofbox / ...
2
votes
2answers
137 views
Customized 'list of…'
I am using the covington package to manage my examples. I would now like to create my list of examples, right after my list of figures and tables. Is there any way to do it?
example of an example:
...
4
votes
2answers
391 views
How to create new counter of equation
How to create a new counter of equation.
The new equation is matriz and use other sequence number.
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\begin{document}
...
1
vote
1answer
129 views
Define new section
I have this document in the article documentclass. Everything is divided into sections and subsections. Now I'd like to have an example in my chapter two, that is also divided into sections. So I have ...
13
votes
3answers
209 views
Using counters within \index{…}
When trying to use a counter value within \index an odd behavior occurs.
It seem as if the value would be evaluated at the end of the document, when the counter has already been changed.
Therefore all ...
16
votes
1answer
168 views
Greatest hits? Can I find the most \ref'd part of my document?
I now have a 200 page document and have used \ref and \label very frequently.
I was wondering if it is possible to use LaTeX to create a table at the start of the document with the "top ten" most ...
0
votes
0answers
142 views
beamer Boadilla ToC, total slide count [closed]
I have a strange problem.
I have a very simple presentation in beamer using the Boadilla theme.
The slide/total slides feature is nice; however, the total slide counter is not working (always shows ...
2
votes
1answer
92 views
Automatically increasing date in table cell
I'd like to have an automatic date in a table. Automatic date means I'd like to specify a start date which is shown in the first row of the table and every additional row shows appropriate next day.
...
6
votes
1answer
78 views
count the newlines in title
I am trying to automatically adjust the title page to get a pleasing result independent of the title size. This means that I have to count the number of line breaks in an argument.
My MWE (not very ...
0
votes
1answer
62 views
Creating and using commands/counters which name depends on other counter
I would like to know how can I use a counter for defining other new counters.
Something like this:
\newcounter{foo}
\stepcounter{foo}
%% Perhaps more increments, this depends of the user.
%% And ...
2
votes
2answers
441 views
Customize \section
I have a document, where I want typical code: "Problem # n" to be printed in every section. I made this code, which is working. How can I get rid of \setcounter{secnumdepth}{1} and ...
12
votes
1answer
109 views
Custom “counter” as page number substitute
I'm trying to typeset a book, covering a world trip. Instead of standard page numbers, I want each page to correspond with a digit representing driven kilometers. Of course I can't manually set that ...
2
votes
0answers
177 views
Lyx incorrect figure numbering [closed]
Just a quick question. I am currently working on writing my thesis. I have many figures and I want the numbering to be something like 4.1 or 5.3. Where the first number is my section number and the ...
1
vote
0answers
38 views
Counter too large if number of alphabet chapters is more that 26 [duplicate]
Possible Duplicate:
Error: Counter too large! with \alph{cntr} and cntr>26
I need Alphabetic numeration of my chapters.
But if they are more than 26 LaTeX gives an error message.
How I ...
4
votes
1answer
143 views
How can I have Beamer number slides in a frame title?
More or less what it says on the tin: I want something like:
\frame{\somecounterforpagenumbers : My Title}
I assume there is a built in counter that I can reference here, but I'm not sure what it ...
0
votes
1answer
532 views
How can I set the table counter?
I've got my little examples env with
\newlist{examples}{enumerate}{1}
\setlist[examples]{label=(\arabic*), ref=\arabic*, resume}
How do I use the same counter for the ...
9
votes
1answer
368 views
What is the purpose of putting \newenvironment, \newcounter in a document class?
In exam.cls, I saw the following codes which I don't understand how do they function in the document class (exam):
\newcounter{question}
\newcounter{partno}
\newcounter{subpart}
...
3
votes
1answer
56 views
How to reference a point in a document with a counter and descriptive text?
This is a follow-up question to the previous questions:
How to label a word inside a paragraph?
How to refer back to a point in the document with custom counters?
The code below
...
4
votes
3answers
171 views
Reset the counter back to one in every chapter
I have the following code to get a beautiful concept boxes with optional header for every new concept discussed.
The code changes the concept number using the counter but I also need to reset it to 1 ...
8
votes
2answers
160 views
How to refer back to a point in the document with custom counters?
The easiest way to explain what I would like to have is to show the desired output
and I would like to get this by writing something like:
\begin{document}
Draw point B \STEP{drawb}. Connect A and ...
4
votes
1answer
134 views
Use float counter in a section title
I defined a new float environment for examples
\usepackage{float
\newfloat{example}{htp}{example}
\floatname{example}{Example}
that I the use throughout the document
\begin{example}
...
...
2
votes
1answer
124 views
How to create counters that display and increment dates in ConTeXt?
I need to create a document that has section titles named "October 1, 2012", "October 2, 2012", etc., like this:
\section{October 1, 2012}
This is text for the first day.
\section{October 2, ...
21
votes
4answers
369 views
Count and use the number of items in advance
When writing LaTeX code, I often successively make changes like adding or removing items. I'd like to have TeX count and update the number of items in the list automatically, as in
There are ...
12
votes
1answer
168 views
Counters and their “partners”
A counter created via \newcounter{<counter>} is stored internally as \c@<counter>, just like a reference made using \label{<label>} is stored internally using \r@<label>. ...
3
votes
1answer
71 views
Automatically count of glossary entries
I want to count all glossary entries of a document globally and automatically. Can I expand the macro \glossaryentry to do that and in such a way that I don't introduce a newly defined macro? I have ...
3
votes
2answers
103 views
How to create counters with index?
I need to create counters with names like mycounter1, mycounter2,... Basically this should be a counter-valued data array. The code like
\newcounter{index}
\newcounter{\csname ...
1
vote
0answers
92 views
Resetting a macro counter to 0 [closed]
I have a macro that is disabled after one use. The worksheet works fine until I need to clean the entire sheet and reuse it the next week. How do I reset the macro counter to zero so that I can use ...
6
votes
1answer
141 views
Savebox equivalent of \csname?
I would like to define a command which would increment a counter, and create a new savebox whose name is generated from the counter value. Something like:
\documentclass{article}
...
7
votes
1answer
363 views
Citing many long URLs (shortening and numbering)
In my thesis I have to quote a lot from a single weblog. The URLs are mostly of this structure:
blogname.providername.com/stories/123456
...
4
votes
1answer
151 views
How to set the number of the first citation?
I am using BibTeX and natbib for my citations. In the bibliography the first entry usually starts with [1]. Now I would like to shift all the numbers in the bibliography and text by a certain offset, ...
1
vote
1answer
93 views
Counter linked to section and subsection [duplicate]
Possible Duplicate:
Resetting theorem counters: \sections and (missing) \subsections
I create a new counter as follow :
\newcounter{question}[section]
Thus at each new section ...
4
votes
1answer
138 views
Unique counter for all foot, side and end notes
When used together, as in the MWE, the text might be plagued of identical numbered marks, that is rather confusing.
I want to have marks in this MWE ordered from 1 to 9 instead of three ...
3
votes
1answer
102 views
Counter not working as expected in pgfplot
Using pgfplot (for the first time), I try to create a chart with horizontal bars, sort of. See the figure.
I know how to do it, but because the code is quite verbose and I have lots of data I've ...
4
votes
1answer
135 views
How can I consecutively number only some pages of a document?
The following code typesets a 12 page document; text only appears on every other page and there's an empty page between two text pages:
\documentclass{article}
\usepackage{atbegshi}
...
2
votes
2answers
374 views
Problems with theorem/definition/statement numbering
I have theorems, definitions, statements, that look like as follows
\section{1}
\subsection{1}
Theorem 1.1.1 ....
Statement 1.1.2 ....
Definition 1.1.3....
\subsection{2}
Theorem 1.2.1 ....
...
9
votes
3answers
877 views
Count number of references using biblatex
I am creating an annotated bibliography. Is there a way of obtaining a count of the number of references in a bibliography meeting certain criteria and inserting that into a document?
For example ...
4
votes
2answers
372 views
Resetting counter
I have created two counters
\newcounter{problem}[section]
\newcounter{solution}[problem]
As expected, problem resets every time section increases.
However, solution does not reset when problem ...
6
votes
1answer
73 views
Beamer: suffix equivalent frametitles with a counter or index?
I wonder how to suffix equivalent frametitles with a counter or index. So for example, when I would have two slides with the same \frametitle (e.g. "Marvelous title"), it should result in
Marvelous ...
3
votes
1answer
132 views
Counters for use in array/tabular cells
The following practical example
\documentclass{article}
\usepackage{array}% http://ctan.org/pkg/array
\newcounter{tabcol}\newcounter{tabrow}
\newcolumntype{C}{>{\stepcounter{tabcol}}c}
...