7
votes
1answer
91 views

Arbitrary named counter, referenced

Apologies if this has been asked before, but I simply can't find it, despite voluminous searching. Some question answer bits of my question, but not the whole. The problem is this. I want a counter ...
1
vote
1answer
43 views

What's wrong with that code?

\def\totalobjects@putlabel{% \addtocounter{totalpage}{\c@page} \immediate\write\@auxout{\string \newlabel{reftotaltables}{{}{\refstepcounter{totalpage}}{\relax }{}{}}} } ...
6
votes
1answer
74 views

Cross-reference of custom environments created with environ and TikZ package

Problem: I want to create an environment named Example, and the environment has a counter (number within chapter). I want to refer to the counter for illustration just as the table, figure and ...
0
votes
0answers
31 views

General advice on how to manage references between multiple files

I need to cut my .tex files into several files, and to compile each file separately. I will need to do some work to ensure that the references and the counters work well. Before starting this work, I ...
3
votes
2answers
61 views

How can I have references to several counters in a formatted way with \ref{}?

I have two counters in my document, counterA and counterB. I would like the references \ref{} in my document to be printed as 1.a) or 2., etc. where the digit refers to counterA and the letter to ...
5
votes
2answers
75 views

Cross reference to counter in section title

I am trying to use a custom counter in Latex in order to auto number Use Cases in section titles (eg. \section{UC <counter>: use case title}). I also want a \usecaseref command to substitute a ...
3
votes
1answer
192 views

How to imitate great looking Motion Mountain ToC, including hyperlinks?

I wanted to customize my ToC to look more or less like the one in Motion Mountain physics textbook, including clickable page numbers. My decision was to use hyperref and titletocpackages. Now it seems ...
6
votes
1answer
46 views

Cross-referencing to self-made counters in Alignat environment

I am using the alignat environment for equations. Now, I want to refer to some places in this environment. I have made a counter to do so. \documentclass[a4paper]{article} \usepackage[fleqn]{amsmath} ...
1
vote
1answer
79 views

How to refer to a (La)TeX counter early in the document?

I am programmatically typesetting a long document from database contents. For reasons of efficiency, I would like to output all generated LaTeX code as early as possible. I would also like to provide ...
8
votes
2answers
129 views

Customise counters, cross references to environments

I would like to make cross references to own defined counter on environments. So far I have tried the following, \documentclass{book} \newcounter{entryc}[subsection] ...
3
votes
1answer
102 views

Number and reference paragraphs

For "law-documents" you often want to enumerate every paragraph and cite them somewhere else in your document. This enumeration shall increase through the whole document and have the possibility to ...
9
votes
1answer
172 views

Bad page break with \newenvironment, \refstepcounter and hyperref

I tried to define some environment but came across bad page breaks sometimes. The minimal working example is as follows: \documentclass[b5paper]{article} \usepackage{hyperref} % page break is correct ...
3
votes
2answers
54 views

Count items later in the document [duplicate]

The question is simple enough: How can I make the following output of my counter (\themycounter) say 6? \documentclass{article} \newcounter{mycounter} \newcommand{\myitem}{\refstepcounter{mycounter}} ...
4
votes
1answer
190 views

How to customize cross-reference numbering of custom environments?

Context: I have several environments with custom counters. As usual, I'm referencing them along to my document but I get only the corresponding counter value as reference. Example: ...
5
votes
2answers
137 views

`xr` - temporarily redefine `\label` for exporting section counter to sister document?

The goal My objective is to have continuous page (and possibly section) counters for several independent documents. The purpose is a cumulative dissertation where each paper should retain the ...
8
votes
2answers
364 views

Cross-referencing between files and equation counters

I am using package xr to cross reference between two files. Is there a way to make the equation numbers in one of the files follow the ones in the other? What I mean is, if the last equation in file ...
1
vote
1answer
174 views

Alternative numbering for theorem

I am using thmtools as a front end to amsthm and I have a definition environment as follows. \declaretheorem[ style=mydefinitionstyle, name=Definition, numberwithin=chapter ]{definition} ...
4
votes
1answer
311 views

Cross-refencing a custom counter in \Alph style?

I made a 'hypothesis' custom counter in order to let LaTeX handle my hypothesis reference. My code is \newcounter{hypothese} \refstepcounter{hypothese}\label{hypo:lenght_of_words} ...
5
votes
2answers
135 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; ...
16
votes
1answer
176 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 ...
3
votes
1answer
85 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 ...
8
votes
2answers
262 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 ...
6
votes
1answer
666 views

Trouble with hyperref when resetting the counter for equations (specifically with the align environment)

I am trying to reset a counter to zero; however hyperref tries to reference previous equations. I am using: \setcounter{equation}{0} And if I have labels in say align environments: ...
3
votes
1answer
201 views

Figure refs stop working after I added a new counter

I was using the amspset document class for generating exam practice problems. I had wanted to add some referencing to the problems so I started a new counter like this (adapted from some Tex Exchange ...
4
votes
1answer
147 views

How do I determine the name of the counter associated with a theorem-like environment

(A question related to this one and leading up to this one.) Suppose I'm using ntheorem. I would like to have a command which determines the name (not the value) of the counter associated with a ...
4
votes
1answer
766 views

Easy-to-use reference-able environment for restating theorem-like environments?

This question is a development of the same issue as this one; following my own answer and later comment there, I decided it deserves a spin-off. I would like to define an environment for restating ...
13
votes
2answers
249 views

How to refer to a chapter with a word

I would like to refer to my chapters with the notation "First Chapter", "Second Chapter" etc, rather than "Chapter 1", "Chapter 2", etc. How can I do this? \documentclass{scrreprt} ...
6
votes
1answer
332 views

How can I reset sectional counters in memoir class to avoid breaking ToC cross-referencing in a complex document?

I have already asked a similar question here: Incorrect ToC/Index cross-references when resetting memoir class counters and received a satisfactory answer. Now, I wish to apply the chapter counter ...
6
votes
1answer
490 views

Incorrect ToC/Index cross-references when resetting memoir class counters

The quasi-MWE below uses the memoir class and works fine. It produces a document with the following structure: ToC Book Part1 Chapter1 Part2 Chapter2 Index Here, cross-references in the ToC and ...
2
votes
2answers
131 views

Cross-referencing to the number of a customized environment with a counter

On the internet I found a possibility to create an example environment that is helpful for linguistic research papers, because it provides all examples with numbers: \newcounter{exa} ...
2
votes
1answer
580 views

Refering to the same (alphabetically “numbered”) footnote more than once

Following my previous post concerning the change of numbering in footnote to temporally be alphabetical, I'm trying to merge this with the possibility to refer various time to the same footnote as ...
3
votes
3answers
291 views

Show “Page X of Y” only if there are multiple pages?

I'm trying to add a line in the header to be "Page X of Y", but only if there are multiple pages. My main problem is how to format the if statement. So far I have \ifx \pageref{LastPage} 1 ...
4
votes
2answers
2k views

How to get autoref working with different counters for different listing environments?

In my document I want several different custom listing environments. The solution from fraktalek works like a charm, except for one thing: \autoref doesn't work for me. I have tried the following: ...
9
votes
4answers
4k views

custom counter and cross-referencing

I created a custom counter 'rtaskno' and a command '\rtask' as following: \newcounter{rtaskno} \newcommand{\rtask}{% \stepcounter{rtaskno}% \thertaskno} I like to use them as following: ...
8
votes
3answers
1k 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} ...
7
votes
2answers
1k 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 ...
8
votes
1answer
1k 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 ...
1
vote
0answers
294 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 ...
11
votes
2answers
916 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 ...
17
votes
2answers
487 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 ...