Skip to content

Commit 27a935b

Browse files
committed
using node_types for numfig
1 parent 2a8b628 commit 27a935b

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

sphinx_proof/__init__.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,6 @@
2525

2626
logger = logging.getLogger(__name__)
2727

28-
NUMFIG_TYPES = {
29-
"axiom": "axiom ",
30-
"theorem": "theorem ",
31-
"lemma": "lemma ",
32-
"algorithm": "algorithm ",
33-
"definition": "definition ",
34-
"remark": "remark ",
35-
"conjecture": "conjecture ",
36-
"corollary": "corollary ",
37-
"criterion": "criterion ",
38-
"example": "example ",
39-
"property": "property ",
40-
"observation": "observation ",
41-
"proposition": "proposition ",
42-
}
43-
4428

4529
def purge_proofs(app: Sphinx, env: BuildEnvironment, docname: str) -> None:
4630
if not hasattr(env, "proof_list"):
@@ -69,8 +53,8 @@ def init_numfig(app: Sphinx, config: Config) -> None:
6953
"""Initialize proof numfig format."""
7054
config["numfig"] = True
7155
numfig_format = {}
72-
for typ, val in NUMFIG_TYPES.items():
73-
numfig_format[typ] = val + "%s"
56+
for typ in NODE_TYPES.keys():
57+
numfig_format[typ] = typ + " %s"
7458
numfig_format.update(config.numfig_format)
7559
config.numfig_format = numfig_format
7660

0 commit comments

Comments
 (0)