Skip to content

Commit d054514

Browse files
committed
fix #12
1 parent b302b95 commit d054514

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This is an all-in-one pandoc filter for converting your LaTeX files to any forma
1212
- [Customization](#customization)
1313
- [General](#general)
1414
- [Numbering System](#numbering-system)
15+
- [Numbering Offset](#numbering-offset)
1516
- [Formatting System](#formatting-system)
1617
- [Prefix-based System](#prefix-based-system)
1718
- [Custom Formatting System (f-string formatting)](#custom-formatting-system-f-string-formatting)
@@ -105,6 +106,12 @@ Default values of most of the items are `arabic`. Exceptions are:
105106
- Default value of `subfigure-numstyle` is `latin`.
106107
- Default value of `appendix-numstyle-1` is `Latin`.
107108

109+
## Numbering Offset
110+
You can add an offset to any type of numbering so that the numbering starts from a specific number instead of 1.
111+
- `{item_type}-offset`: The offset of the numbering of figures, tables, equations, subfigures. For example `figure-offset` represents the offset of the numbering of figures.
112+
- `{item-type}-offset-{i}`: The offset of the i-th level of the numbering of sections or appendices. For example, `section-offset-1` represents the offset of the first level of the numbering of sections.
113+
- `theorem-{theorem_name}-offset`: The offset of the theorem numbering. Default is `0`. For example, if you have `\newtheorem{thm}{Theorem}`, when you set the metadata `theorem-thm-offset` to `1`, the first theorem will be numbered as "Theorem 2" instead of "Theorem 1".
114+
108115
## Formatting System
109116

110117
We support a very flexible formatting system for the numbering and references. There are two different formatting systems for the numbering and references. You can use them together. The two systems are:
@@ -302,12 +309,14 @@ In the following example, we custom the following **silly** items *only for the
302309
- For sections:
303310
- at the beginning of sections, use Chinese numbers "第一章" for the first level sections and English numbers "Section 1.1" for the second level sections.
304311
- when referred to, use, in turn, "Chapter 1", "第1.1节" etc.
312+
- add an offset of 5 to the second level sections, such that the first second level section will be numbered as "Section 1.6".
305313
- For tables:
306314
- at the beginning of captions, use styles like `Table 1-1-1`
307315
- when referred to, use styles like `table 1 (in Section 1.1)`
308316
- For figures:
309317
- at the beginning of captions, use styles like `Figure 1.1:1`
310318
- when referred to, use styles like `as shown in Fig. 1.1.1,`
319+
- add an offset of 3 to the figures, such that the first figure will be numbered as `Figure 1.1:4`.
311320
- For equations, suppress the parentheses and use the format `1.1.1`
312321
- For subfigures:
313322
- use greek letters for symbols
@@ -339,6 +348,8 @@ pandoc -o output.docx -F pandoc-tex-numbering --metadata-file test.yaml test.tex
339348
number-reset-level: 2
340349
theorem-names: "thm,lem"
341350
appendix-names: "Appendix"
351+
section-offset-2: 5
352+
figure-offset: 3
342353

343354
# Prefix Settings
344355
figure-prefix: Fig

0 commit comments

Comments
 (0)