All documentation

Numbering and references

Texifine numbers what LaTeX numbers, the way LaTeX numbers it. The numbers you see in the editor are the ones the PDF prints.

What is numbered

ElementNumbered when…
Chapter, section (H1), subsection (H2)it is not marked Plain
Sub-subsection (H3)the document has no chapter, and the heading is not marked Plain
Equationit is not marked Plain and its formula is not empty
Figureit has an image and a caption
Tableit has a caption
Theorem, lemma, proposition, corollary, definitionalways
Remark, example, proofnever
Footnotealways, in order of appearance

How chapters change the numbers

A chapter restarts the numbering of what follows it and gives it a prefix.

  • Before the first chapter — or in a document without chapters — everything is numbered 1, 2, 3…
  • Inside chapter 2, sections are 2.1, 2.2…, figures are Figure 2.1, 2.2…, equations are (2.1), (2.2)…, and theorems are 2.1, 2.2…

Each kind has its own counter: Figure 2.1 and Table 2.1 can both exist. Theorems, lemmas, propositions, corollaries and definitions share one counter: Definition 2.1, Theorem 2.2, Lemma 2.3.

Sections are numbered within their chapter (2.1) and subsections within their section (2.1.1). In a document with chapters, sub-subsections are printed as unnumbered headings — a fourth level, 2.1.1.1, would be too deep. In a document without any chapter, sections are 1, subsections 1.1 and sub-subsections 1.1.1.

Plain headings and equations

A heading or an equation marked Plain prints no number and does not count: what follows keeps counting from the last numbered one. A plain chapter does not restart the numbering of sections, figures, tables, equations or theorems, and is not listed in the table of contents.

Use it for an introduction, a conclusion or acknowledgements.

Referring to something

A cross-reference prints the number of a block and follows it if the number changes.

  1. Put the caret where the number should go — after "see Figure ", for example.
  2. Press Ctrl+Alt+R, or select text and click the cross-reference button.
  3. Choose the target in the list. You can search by kind ("lemma"), by number or by text.

The reference prints the number alone. You write the word before it — "Figure", "Theorem", "equation" — in your own language and with the article you want. For an equation, write the brackets yourself: ( reference ).

In the PDF the number is a link to its target. Links have no coloured frame, so a printed document stays clean.

Click a reference to change its target.

What can be referenced

Only what has a number: numbered chapters, sections and subsections, figures and tables with a caption, numbered equations, and theorems, lemmas, propositions, corollaries and definitions. Remarks, examples, proofs, paragraphs and code listings cannot be referenced.

A reference that shows "?"

The target was deleted, or lost its number: a figure whose caption was removed, a heading marked Plain, a lemma turned into a remark. Give the target its number back, or click the reference and choose another one. A reference never silently prints the wrong number.

Renumbering is automatic

Move a figure above another, insert a section, delete a theorem: every number and every reference updates, in the editor at once and in the PDF at the next compilation.