texact 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {texact-0.2.0 → texact-0.3.0}/.github/workflows/documentation.yml +1 -0
- {texact-0.2.0 → texact-0.3.0}/CHANGELOG.md +39 -1
- {texact-0.2.0/source/texact.egg-info → texact-0.3.0}/PKG-INFO +3 -3
- {texact-0.2.0 → texact-0.3.0}/docs/Makefile +1 -1
- {texact-0.2.0 → texact-0.3.0}/docs/_templates/versions.html +1 -1
- {texact-0.2.0 → texact-0.3.0}/docs/conf.py +1 -13
- {texact-0.2.0 → texact-0.3.0}/docs/options.rst +13 -2
- texact-0.3.0/docs/rules/abbreviation-punctuation.md +19 -0
- texact-0.3.0/docs/rules/braced-math-scripts.md +20 -0
- texact-0.3.0/docs/rules/braced-square-root.md +20 -0
- texact-0.3.0/docs/rules/capitalize-reference-type.md +18 -0
- texact-0.3.0/docs/rules/citation-before-punctuation.md +18 -0
- texact-0.3.0/docs/rules/dash-length.md +23 -0
- texact-0.3.0/docs/rules/double-comma.md +15 -0
- texact-0.3.0/docs/rules/double-period-sentence.md +19 -0
- texact-0.3.0/docs/rules/ellipsis-notation.md +18 -0
- texact-0.3.0/docs/rules/eqref-non-equation-label.md +18 -0
- texact-0.3.0/docs/rules/footnote-before-punctuation.md +18 -0
- texact-0.3.0/docs/rules/heading-order.md +16 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/index.md +43 -3
- texact-0.3.0/docs/rules/label-before-caption.md +20 -0
- texact-0.3.0/docs/rules/matching-delimiters.md +18 -0
- texact-0.3.0/docs/rules/math-symbol-commands.md +27 -0
- texact-0.3.0/docs/rules/parentheses-around-eqref.md +17 -0
- texact-0.3.0/docs/rules/prefer-eqref.md +18 -0
- texact-0.3.0/docs/rules/space-after-period.md +17 -0
- texact-0.3.0/docs/rules/space-before-citation.md +19 -0
- {texact-0.2.0 → texact-0.3.0}/pyproject.toml +2 -2
- {texact-0.2.0 → texact-0.3.0}/source/configuration.py +15 -1
- {texact-0.2.0 → texact-0.3.0}/source/reviewers/reviewer_casing.py +6 -0
- texact-0.3.0/source/reviewers/reviewer_math.py +392 -0
- texact-0.3.0/source/reviewers/reviewer_reflabel.py +434 -0
- texact-0.3.0/source/reviewers/reviewer_section.py +66 -0
- texact-0.3.0/source/reviewers/reviewer_unsure.py +536 -0
- {texact-0.2.0 → texact-0.3.0}/source/reviewers/rules.py +139 -3
- {texact-0.2.0 → texact-0.3.0/source/texact.egg-info}/PKG-INFO +3 -3
- {texact-0.2.0 → texact-0.3.0}/source/texact.egg-info/SOURCES.txt +20 -1
- {texact-0.2.0 → texact-0.3.0}/source/texact.egg-info/requires.txt +2 -2
- {texact-0.2.0 → texact-0.3.0}/source/texact.egg-info/scm_file_list.json +20 -1
- texact-0.3.0/source/texact.egg-info/scm_version.json +8 -0
- {texact-0.2.0 → texact-0.3.0}/source/texact.py +46 -7
- {texact-0.2.0 → texact-0.3.0}/test/configuration_test.py +16 -1
- texact-0.3.0/test/diagnostics_test.py +1276 -0
- texact-0.2.0/docs/rules/plus-minus-notation.md +0 -16
- texact-0.2.0/source/reviewers/reviewer_math.py +0 -211
- texact-0.2.0/source/reviewers/reviewer_reflabel.py +0 -200
- texact-0.2.0/source/reviewers/reviewer_unsure.py +0 -194
- texact-0.2.0/source/texact.egg-info/scm_version.json +0 -8
- texact-0.2.0/test/diagnostics_test.py +0 -512
- {texact-0.2.0 → texact-0.3.0}/.github/dependabot.yml +0 -0
- {texact-0.2.0 → texact-0.3.0}/.github/workflows/cli_test.yml +0 -0
- {texact-0.2.0 → texact-0.3.0}/.github/workflows/release-publish-to-pypi.yml +0 -0
- {texact-0.2.0 → texact-0.3.0}/.gitignore +0 -0
- {texact-0.2.0 → texact-0.3.0}/.pre-commit-config.yaml +0 -0
- {texact-0.2.0 → texact-0.3.0}/.pre-commit-hooks.yaml +0 -0
- {texact-0.2.0 → texact-0.3.0}/LICENSE.txt +0 -0
- {texact-0.2.0 → texact-0.3.0}/README.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/config/chktexrc +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/_static/custom.css +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/_static/texact.ico +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/_static/texact.svg +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/_static/texactlogo.svg +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/_static/try-it.css +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/_static/try-it.js +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/changelog.rst +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/development.rst +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/index.rst +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/integration.rst +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/licenses.rst +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/make.bat +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/abstract-first-line-this-work.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/biography-image-not-found.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/caption-before-graphics.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/chktex-command-not-found.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/chktex-config-not-found.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/chktex-diagnostic.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/chktex-execution-failed.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/chktex-not-installed.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/excessive-we-usage.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/ieee-math-environment.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/inconsistent-caption-period.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/incorrect-casing.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/invalid-biography-image-ratio.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/invalid-figure-position.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/label-prefix.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/math-operator-command.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/missing-figure-caption.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/missing-figure-label.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/modal-or-uncertain-word.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/scaled-figure-image.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/scaled-parentheses.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/singular-author-possessive.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/space-before-punctuation.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/space-before-reference.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/textmu-command.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/title-casing.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/undefined-label-reference.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/underscore-in-label.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/rules/unreferenced-label.md +0 -0
- {texact-0.2.0 → texact-0.3.0}/docs/try-it.rst +0 -0
- {texact-0.2.0 → texact-0.3.0}/setup.cfg +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/printer.py +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/reviewers/__init__.py +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/reviewers/reviewer.py +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/reviewers/reviewer_chktex.py +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/reviewers/reviewer_figure.py +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/reviewers/reviewer_inthis.py +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/template_check.py +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/texact.egg-info/dependency_links.txt +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/texact.egg-info/entry_points.txt +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/texact.egg-info/top_level.txt +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/texact_config/__init__.py +0 -0
- {texact-0.2.0 → texact-0.3.0}/source/texact_config/chktexrc +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/assets/bio_bad_size.png +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/assets/bio_ok.png +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/casing_test.tex +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/comment_test.tex +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/figure_test.tex +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/ieee_biography_test.tex +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/ignore_test.tex +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/inthis.tex +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/reflabel_test.tex +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/test.py +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/title_casing_test.tex +0 -0
- {texact-0.2.0 → texact-0.3.0}/test/unsure.tex +0 -0
|
@@ -16,6 +16,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
16
16
|
|
|
17
17
|
### Removed
|
|
18
18
|
|
|
19
|
+
[0.3.0] - 2026-09-28
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Check matching brackets, parentheses, and braces.
|
|
24
|
+
- Enforce citations before punctuation.
|
|
25
|
+
- Enforce LaTeX commands for ellipses in normal text and math mode.
|
|
26
|
+
- Check for sentences ending with two periods.
|
|
27
|
+
- Require spaces after periods.
|
|
28
|
+
- Warn when labels precede captions or first numbered items.
|
|
29
|
+
- Check section heading hierarchy.
|
|
30
|
+
- Add a check for dash length in ranges and compounds.
|
|
31
|
+
- Support selecting disabled rules.
|
|
32
|
+
- Support selecting rules from the command line.
|
|
33
|
+
- Check for consecutive commas.
|
|
34
|
+
- More casing checks.
|
|
35
|
+
- Optionally prefer `\eqref` for equation references.
|
|
36
|
+
- Warn about redundant parentheses around `\eqref`.
|
|
37
|
+
- Require capitalization for table, section, figure, and listing references.
|
|
38
|
+
- Optionally require a hard space before `\cite`.
|
|
39
|
+
- Check punctuation in `i.e.`, `e.g.`, and `et al.`.
|
|
40
|
+
- Opt-in warning for unbraced multi-character math scripts.
|
|
41
|
+
- Flag `\eqref` used with figure, table, or section labels.
|
|
42
|
+
- Enforce footnotes before punctuation.
|
|
43
|
+
- Warn when square-root arguments are not braced.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- Ignore `Fig.` and `Figs.` abbreviations in missing-space checks.
|
|
48
|
+
- Do not require a hard space before a parenthesized `\ref`.
|
|
49
|
+
- Detect consecutive periods before punctuation, including in `etc..,`.
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
|
|
53
|
+
- ChkTeX is now opt-in instead of running by default.
|
|
54
|
+
- MAT001 now checks for more LaTeX commands.
|
|
55
|
+
|
|
19
56
|
## [0.2.0] - 2026-09-14
|
|
20
57
|
|
|
21
58
|
### Added
|
|
@@ -59,7 +96,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
59
96
|
|
|
60
97
|
Initial release.
|
|
61
98
|
|
|
62
|
-
[unreleased]: https://github.com/Theodor-Lindberg/texact/compare/v0.
|
|
99
|
+
[unreleased]: https://github.com/Theodor-Lindberg/texact/compare/v0.3.0...HEAD
|
|
100
|
+
[0.3.0]: https://github.com/Theodor-Lindberg/texact/releases/tag/v0.3.0
|
|
63
101
|
[0.2.0]: https://github.com/Theodor-Lindberg/texact/releases/tag/v0.2.0
|
|
64
102
|
[0.1.2]: https://github.com/Theodor-Lindberg/texact/releases/tag/v0.1.2
|
|
65
103
|
[0.1.1]: https://github.com/Theodor-Lindberg/texact/releases/tag/v0.1.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: texact
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Automated article and LaTeX checks
|
|
5
5
|
Author: Theodor Lindberg
|
|
6
6
|
Requires-Python: >=3.11
|
|
@@ -9,10 +9,10 @@ License-File: LICENSE.txt
|
|
|
9
9
|
Requires-Dist: Pillow>=10
|
|
10
10
|
Requires-Dist: colorama>=0.4
|
|
11
11
|
Provides-Extra: docs
|
|
12
|
-
Requires-Dist: sphinx<
|
|
12
|
+
Requires-Dist: sphinx<8,>=7.2; extra == "docs"
|
|
13
13
|
Requires-Dist: furo>=2025; extra == "docs"
|
|
14
14
|
Requires-Dist: myst-parser>=4; extra == "docs"
|
|
15
|
-
Requires-Dist: m2r2; extra == "docs"
|
|
15
|
+
Requires-Dist: m2r2<2,>=1.1; extra == "docs"
|
|
16
16
|
Requires-Dist: docutils<=0.20; extra == "docs"
|
|
17
17
|
Requires-Dist: sphinx-multiversion==0.2.4; extra == "docs"
|
|
18
18
|
Dynamic: license-file
|
|
@@ -16,7 +16,7 @@ html:
|
|
|
16
16
|
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
17
17
|
|
|
18
18
|
multiversion:
|
|
19
|
-
@
|
|
19
|
+
@python -m sphinx_multiversion "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
|
|
20
20
|
|
|
21
21
|
.PHONY: help Makefile html multiversion
|
|
22
22
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="sidebar-version-selector">
|
|
3
3
|
<label for="sidebar-version-select">Version</label>
|
|
4
4
|
<select id="sidebar-version-select" aria-label="Documentation version" onchange="window.location.href = this.value">
|
|
5
|
-
{% for item in versions %}
|
|
5
|
+
{% for item in versions|reverse %}
|
|
6
6
|
<option value="{{ item.url|e }}"{% if item.name == current_version.name %} selected{% endif %}>{{ item.name|e }}</option>
|
|
7
7
|
{% endfor %}
|
|
8
8
|
</select>
|
|
@@ -15,7 +15,7 @@ author = "Theodor Lindberg"
|
|
|
15
15
|
# -- General configuration ---------------------------------------------------
|
|
16
16
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
17
17
|
|
|
18
|
-
extensions = ["myst_parser", "sphinx_multiversion"]
|
|
18
|
+
extensions = ["myst_parser", "sphinx_multiversion", "m2r2.mdinclude"]
|
|
19
19
|
source_suffix = {
|
|
20
20
|
".rst": "restructuredtext",
|
|
21
21
|
".md": "markdown",
|
|
@@ -68,15 +68,3 @@ html_theme_options = {
|
|
|
68
68
|
"color-brand-visited": "#d1a221",
|
|
69
69
|
},
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
def setup(app):
|
|
74
|
-
import m2r2
|
|
75
|
-
|
|
76
|
-
m2r2._IS_SPHINX = True
|
|
77
|
-
app.add_config_value("no_underscore_emphasis", False, "env")
|
|
78
|
-
app.add_config_value("m2r_parse_relative_links", False, "env")
|
|
79
|
-
app.add_config_value("m2r_anonymous_references", False, "env")
|
|
80
|
-
app.add_config_value("m2r_disable_inline_math", False, "env")
|
|
81
|
-
app.add_config_value("m2r_use_mermaid", False, "env")
|
|
82
|
-
app.add_directive("mdinclude", m2r2.MdInclude)
|
|
@@ -34,6 +34,15 @@ Use ``-q`` or ``--quiet`` to remove per-file summaries. Repeat the short
|
|
|
34
34
|
option as ``-qq`` to remove both summaries and title lines.
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
Rule selection
|
|
38
|
+
--------------
|
|
39
|
+
|
|
40
|
+
Enable a disabled rule with ``--select``. Repeat the option to select multiple
|
|
41
|
+
rules::
|
|
42
|
+
|
|
43
|
+
texact --select MAT004 --select UNS007 paper.tex
|
|
44
|
+
|
|
45
|
+
|
|
37
46
|
Configuration file
|
|
38
47
|
------------------
|
|
39
48
|
|
|
@@ -52,6 +61,7 @@ The supported structure is::
|
|
|
52
61
|
|
|
53
62
|
[lint]
|
|
54
63
|
ignore = ["FIG002", "UNS001"]
|
|
64
|
+
select = ["MAT004"]
|
|
55
65
|
casing = ["LaTeX"]
|
|
56
66
|
we_count = 7
|
|
57
67
|
|
|
@@ -64,8 +74,9 @@ The supported structure is::
|
|
|
64
74
|
chktex_path = "/usr/bin"
|
|
65
75
|
|
|
66
76
|
``lint.ignore`` accepts rule codes to suppress. ``lint.casing`` adds
|
|
67
|
-
spellings to the built-in casing list. ``lint.
|
|
68
|
-
|
|
77
|
+
spellings to the built-in casing list. ``lint.select`` enables rules that are
|
|
78
|
+
disabled by default. ``lint.we_count`` changes the maximum allowed number of
|
|
79
|
+
``we`` occurrences. ``format.html-style`` enables HTML
|
|
69
80
|
output by default. ``format.quiet`` controls non-diagnostic output: ``0``
|
|
70
81
|
prints titles and summaries, ``1`` removes summaries, and ``2`` removes both
|
|
71
82
|
titles and summaries. ``format.vscode-style`` enables VS Code-compatible
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# abbreviation-punctuation (UNS009)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that these abbreviations use the correct punctuation: `i.e.`, `e.g.`,
|
|
6
|
+
and `et al.`. A comma after `i.e.` or `e.g.` is not required by this rule.
|
|
7
|
+
|
|
8
|
+
## Why is this bad?
|
|
9
|
+
|
|
10
|
+
These are misspellings.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```latex
|
|
15
|
+
The abbreviation ie is incorrect.
|
|
16
|
+
The abbreviation i.e. is correct.
|
|
17
|
+
The authors et. al. are listed.
|
|
18
|
+
The authors et al. are listed.
|
|
19
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# braced-math-scripts (MAT009)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Warns when a multi-character subscript or superscript is not enclosed in
|
|
6
|
+
braces. This warning is disabled by default. Enable it with `--select MAT009`
|
|
7
|
+
or add `MAT009` to `lint.select` in the TeXact configuration.
|
|
8
|
+
|
|
9
|
+
## Why is this bad?
|
|
10
|
+
|
|
11
|
+
In LaTeX, an unbraced script applies only to the next token. For example,
|
|
12
|
+
`x^23` applies `2` as the superscript and leaves `3` on the baseline. Braces
|
|
13
|
+
make the intended multi-character script explicit.
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```latex
|
|
18
|
+
x^23 + y_ij
|
|
19
|
+
x^{23} + y_{ij}
|
|
20
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# braced-square-root (MAT010)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Warns when a square-root argument is not enclosed in braces, including roots
|
|
6
|
+
with an optional index.
|
|
7
|
+
|
|
8
|
+
## Why is this bad?
|
|
9
|
+
|
|
10
|
+
Braces make the extent of the radicand explicit and avoid ambiguity when the
|
|
11
|
+
expression changes.
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```latex
|
|
16
|
+
\sqrt x
|
|
17
|
+
\sqrt{x}
|
|
18
|
+
\sqrt[3]y
|
|
19
|
+
\sqrt[3]{y}
|
|
20
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# capitalize-reference-type (REF010)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that `table`, `section`, `figure`, `fig.`, `figs.`, `tables`, and
|
|
6
|
+
`listing` are capitalized when followed by `~\ref`.
|
|
7
|
+
|
|
8
|
+
## Why is this bad?
|
|
9
|
+
|
|
10
|
+
Capitalizing these reference types keeps cross-references consistent and easy
|
|
11
|
+
to identify in the text.
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```latex
|
|
16
|
+
See table~\ref{tab:results}.
|
|
17
|
+
See Table~\ref{tab:results}.
|
|
18
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# citation-before-punctuation (REF006)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that `\cite{...}` comes before sentence punctuation, including when
|
|
6
|
+
spaces or a hard space (`~`) separate the punctuation from the citation.
|
|
7
|
+
|
|
8
|
+
## Why is this bad?
|
|
9
|
+
|
|
10
|
+
Putting the citation after punctuation makes it appear detached from the text
|
|
11
|
+
it documents.
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```latex
|
|
16
|
+
This is a sentence.~\cite{reference}
|
|
17
|
+
This is a sentence\cite{reference}.
|
|
18
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# dash-length (UNS007)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks dash runs in compact words such as number ranges and compounds.
|
|
6
|
+
|
|
7
|
+
## Why is this bad?
|
|
8
|
+
|
|
9
|
+
LaTeX uses `-`, `--`, and `---` for hyphens, en dashes, and em dashes.
|
|
10
|
+
Number ranges should use `--`; between words, `--` is ambiguous and needs a
|
|
11
|
+
manual choice. Coordinate names such as `Newton--Raphson` are allowed.
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```latex
|
|
16
|
+
See pages 5-10 for the proof.
|
|
17
|
+
A well--known result.
|
|
18
|
+
The value -4 has the incorrect sign for minus.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The first line should use `5--10`. The second needs either a hyphen or an em
|
|
22
|
+
dash, depending on the intended meaning. For a negative number in text, use
|
|
23
|
+
math mode, such as `$-$ 4`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# double-period-sentence (UNS005)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks for consecutive periods in prose, excluding ellipses and relative paths.
|
|
6
|
+
|
|
7
|
+
## Why is this bad?
|
|
8
|
+
|
|
9
|
+
Two consecutive periods can accidentally leave a sentence or abbreviation with
|
|
10
|
+
incorrect punctuation.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```latex
|
|
15
|
+
This sentence ends with two periods..
|
|
16
|
+
The list includes apples, etc.., and pears.
|
|
17
|
+
\includegraphics{../assets/image.png}
|
|
18
|
+
This uses an ellipsis... correctly.
|
|
19
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ellipsis-notation (MAT007)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks for three periods used as an ellipsis in normal text or math mode.
|
|
6
|
+
|
|
7
|
+
## Why is this bad?
|
|
8
|
+
|
|
9
|
+
Use `\dots` in normal text. In math mode, use `\ldots` for baseline ellipses
|
|
10
|
+
in comma lists and `\cdots` for centered ellipses in operator chains.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```latex
|
|
15
|
+
Text \dots continues.
|
|
16
|
+
$x_1, \ldots, x_n$
|
|
17
|
+
$A_1 + \cdots + A_n$
|
|
18
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# eqref-non-equation-label (REF012)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that `\eqref` is used only with equation labels. It flags labels with
|
|
6
|
+
the `fig:`, `tab:`, or `sec:` prefixes.
|
|
7
|
+
|
|
8
|
+
## Why is this bad?
|
|
9
|
+
|
|
10
|
+
`\eqref` adds parentheses around the referenced number, which is intended for
|
|
11
|
+
equations rather than figures, tables, or sections.
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```latex
|
|
16
|
+
\eqref{fig:plot}
|
|
17
|
+
\ref{fig:plot}
|
|
18
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# footnote-before-punctuation (REF013)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that `\footnote{...}` appears before punctuation, including when the
|
|
6
|
+
command has an optional mark argument.
|
|
7
|
+
|
|
8
|
+
## Why is this bad?
|
|
9
|
+
|
|
10
|
+
Placing the footnote after sentence punctuation can make the marker look
|
|
11
|
+
detached from the text it annotates.
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```latex
|
|
16
|
+
This is a sentence\footnote{Note}.
|
|
17
|
+
This is a sentence.\footnote{Note}
|
|
18
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# heading-order (SEC001)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that section headings do not skip a level.
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```latex
|
|
10
|
+
\section{Methods}
|
|
11
|
+
\subsection{Setup}
|
|
12
|
+
\subsubsection{Details}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
A `\subsubsection` should not appear directly under a `\section`; add the
|
|
16
|
+
missing `\subsection` first.
|
|
@@ -20,15 +20,25 @@ them per their liking and, if supported, configure them.
|
|
|
20
20
|
| CAS001 | [incorrect-casing](incorrect-casing.md) | Incorrect casing. | error |
|
|
21
21
|
| CAS002 | [title-casing](title-casing.md) | Use IEEE-style title casing. | error |
|
|
22
22
|
|
|
23
|
+
## Section (`SEC`)
|
|
24
|
+
|
|
25
|
+
| Code | Name | Message | Severity |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| SEC001 | [heading-order](heading-order.md) | Do not skip section heading levels. | error |
|
|
28
|
+
|
|
23
29
|
## Math (`MAT`)
|
|
24
30
|
|
|
25
31
|
| Code | Name | Message | Severity |
|
|
26
32
|
| --- | --- | --- | --- |
|
|
27
|
-
| MAT001 | [
|
|
33
|
+
| MAT001 | [math-symbol-commands](math-symbol-commands.md) | Use LaTeX commands for plus-minus, assignment, comparison, and arrow symbols. | error |
|
|
28
34
|
| MAT002 | [math-operator-command](math-operator-command.md) | Use LaTeX commands for common math operators. | error |
|
|
29
35
|
| MAT003 | [textmu-command](textmu-command.md) | Use `\textmu` instead of `\mu`. | error |
|
|
30
36
|
| MAT004 | [scaled-parentheses](scaled-parentheses.md) | Use `\left` and `\right` for math parentheses. | error |
|
|
31
37
|
| MAT005 | [ieee-math-environment](ieee-math-environment.md) | Use `IEEEeqnarray` in IEEE papers. | error |
|
|
38
|
+
| MAT006 | [matching-delimiters](matching-delimiters.md) | Use matching brackets, parentheses, and braces. | error |
|
|
39
|
+
| MAT007 | [ellipsis-notation](ellipsis-notation.md) | Use LaTeX ellipsis commands instead of three periods. | error |
|
|
40
|
+
| MAT009 | [braced-math-scripts](braced-math-scripts.md) | Brace multi-character subscripts and superscripts. | warning |
|
|
41
|
+
| MAT010 | [braced-square-root](braced-square-root.md) | Brace square-root arguments. | warning |
|
|
32
42
|
|
|
33
43
|
## Unsure (`UNS`)
|
|
34
44
|
|
|
@@ -37,7 +47,12 @@ them per their liking and, if supported, configure them.
|
|
|
37
47
|
| UNS001 | [modal-or-uncertain-word](modal-or-uncertain-word.md) | Avoid modal or uncertain wording. | error |
|
|
38
48
|
| UNS002 | [excessive-we-usage](excessive-we-usage.md) | Reduce use of 'we' when it exceeds the configured maximum. | error |
|
|
39
49
|
| UNS003 | [singular-author-possessive](singular-author-possessive.md) | Use authors' to author's in papers. | error |
|
|
40
|
-
| UNS004 | [space-before-punctuation](space-before-punctuation.md) |
|
|
50
|
+
| UNS004 | [space-before-punctuation](space-before-punctuation.md) | Remove spaces before punctuation. | error |
|
|
51
|
+
| UNS005 | [double-period-sentence](double-period-sentence.md) | Avoid ending a sentence with two periods. | error |
|
|
52
|
+
| UNS006 | [space-after-period](space-after-period.md) | Add a space after periods. | error |
|
|
53
|
+
| UNS007 | [dash-length](dash-length.md) | Use the appropriate dash for its context. | warning |
|
|
54
|
+
| UNS008 | [double-comma](double-comma.md) | Avoid using two commas in a row. | error |
|
|
55
|
+
| UNS009 | [abbreviation-punctuation](abbreviation-punctuation.md) | Use `i.e.`, `e.g.`, and `et al.` with correct punctuation. | error |
|
|
41
56
|
|
|
42
57
|
## RefLabel (`REF`)
|
|
43
58
|
|
|
@@ -48,6 +63,14 @@ them per their liking and, if supported, configure them.
|
|
|
48
63
|
| REF003 | [unreferenced-label](unreferenced-label.md) | Unreferenced label. | error |
|
|
49
64
|
| REF004 | [label-prefix](label-prefix.md) | Use the matching prefix for the label context. | error |
|
|
50
65
|
| REF005 | [space-before-reference](space-before-reference.md) | Use a hard space (`~`) before `\ref`. | error |
|
|
66
|
+
| REF006 | [citation-before-punctuation](citation-before-punctuation.md) | Place `\cite{...}` before punctuation. | error |
|
|
67
|
+
| REF007 | [label-before-caption](label-before-caption.md) | Put labels after captions or first numbered items. | warning |
|
|
68
|
+
| REF008 | [prefer-eqref](prefer-eqref.md) | Use `\eqref{...}` for equation references instead of `\ref`. | error |
|
|
69
|
+
| REF009 | [parentheses-around-eqref](parentheses-around-eqref.md) | Remove parentheses around `\eqref`; it adds them automatically. | warning |
|
|
70
|
+
| REF010 | [capitalize-reference-type](capitalize-reference-type.md) | Capitalize the first letter of reference types before `\ref`. | error |
|
|
71
|
+
| REF011 | [space-before-citation](space-before-citation.md) | Use a hard space (`~`) before `\cite`. | error |
|
|
72
|
+
| REF012 | [eqref-non-equation-label](eqref-non-equation-label.md) | Use `\ref` instead of `\eqref` for non-equation labels. | error |
|
|
73
|
+
| REF013 | [footnote-before-punctuation](footnote-before-punctuation.md) | Place `\footnote{...}` before punctuation. | error |
|
|
51
74
|
|
|
52
75
|
## Figure (`FIG`)
|
|
53
76
|
|
|
@@ -84,20 +107,37 @@ come from ChkTeX, and they link to the shared
|
|
|
84
107
|
abstract-first-line-this-work
|
|
85
108
|
incorrect-casing
|
|
86
109
|
title-casing
|
|
87
|
-
|
|
110
|
+
heading-order
|
|
88
111
|
math-operator-command
|
|
89
112
|
textmu-command
|
|
90
113
|
scaled-parentheses
|
|
91
114
|
ieee-math-environment
|
|
115
|
+
matching-delimiters
|
|
116
|
+
math-symbol-commands
|
|
117
|
+
braced-math-scripts
|
|
118
|
+
braced-square-root
|
|
92
119
|
modal-or-uncertain-word
|
|
93
120
|
excessive-we-usage
|
|
94
121
|
singular-author-possessive
|
|
95
122
|
space-before-punctuation
|
|
123
|
+
double-period-sentence
|
|
124
|
+
space-after-period
|
|
125
|
+
dash-length
|
|
126
|
+
double-comma
|
|
127
|
+
abbreviation-punctuation
|
|
96
128
|
underscore-in-label
|
|
97
129
|
undefined-label-reference
|
|
98
130
|
unreferenced-label
|
|
99
131
|
label-prefix
|
|
100
132
|
space-before-reference
|
|
133
|
+
citation-before-punctuation
|
|
134
|
+
label-before-caption
|
|
135
|
+
prefer-eqref
|
|
136
|
+
parentheses-around-eqref
|
|
137
|
+
capitalize-reference-type
|
|
138
|
+
space-before-citation
|
|
139
|
+
eqref-non-equation-label
|
|
140
|
+
footnote-before-punctuation
|
|
101
141
|
invalid-figure-position
|
|
102
142
|
scaled-figure-image
|
|
103
143
|
missing-figure-label
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# label-before-caption (REF007)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Warns when a label appears before the caption or first numbered list item it
|
|
6
|
+
should refer to.
|
|
7
|
+
|
|
8
|
+
## Why is this bad?
|
|
9
|
+
|
|
10
|
+
LaTeX may save the previous counter value, so a reference can show the wrong
|
|
11
|
+
number. Put the label after the caption or item.
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```latex
|
|
16
|
+
\begin{figure}
|
|
17
|
+
\label{fig:plot}
|
|
18
|
+
\caption{A plot.}
|
|
19
|
+
\end{figure}
|
|
20
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# matching-delimiters (MAT006)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that square brackets, parentheses, and braces are opened and closed in
|
|
6
|
+
matching pairs throughout the LaTeX document.
|
|
7
|
+
|
|
8
|
+
## Why is this bad?
|
|
9
|
+
|
|
10
|
+
Mismatched or unclosed delimiters can break LaTeX parsing or change the
|
|
11
|
+
structure of the document and its mathematical expressions.
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```latex
|
|
16
|
+
[x + (y)]
|
|
17
|
+
[x + (y]
|
|
18
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# math-symbol-commands (MAT001)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks for `+-` and `-+` notation, and plain-text assignment, comparison, and
|
|
6
|
+
arrow symbols in mathematical expressions that have corresponding LaTeX
|
|
7
|
+
commands.
|
|
8
|
+
|
|
9
|
+
## Why is this bad?
|
|
10
|
+
|
|
11
|
+
LaTeX commands produce consistent mathematical symbols and avoid ambiguous
|
|
12
|
+
sequences of text characters.
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
| Instead of | Use |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| `+-` or `-+` | `\pm` |
|
|
19
|
+
| `::=` | `\Coloneqq` |
|
|
20
|
+
| `:=` | `\coloneqq` |
|
|
21
|
+
| `>=` | `\geq` |
|
|
22
|
+
| `<=` | `\leq` |
|
|
23
|
+
| `<<` | `\ll` |
|
|
24
|
+
| `>>` | `\gg` |
|
|
25
|
+
| `->` | `\rightarrow` |
|
|
26
|
+
| `<-` | `\leftarrow` |
|
|
27
|
+
| `<=>` | `\Leftrightarrow` |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# parentheses-around-eqref (REF009)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Warns when ordinary parentheses are placed around an `\eqref` command.
|
|
6
|
+
|
|
7
|
+
## Why is this bad?
|
|
8
|
+
|
|
9
|
+
The `\eqref` command adds parentheses around the equation number automatically.
|
|
10
|
+
Wrapping the command in another pair produces redundant parentheses.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```latex
|
|
15
|
+
(\eqref{eq:energy})
|
|
16
|
+
\eqref{eq:energy}
|
|
17
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# prefer-eqref (REF008)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that equation labels are referenced with `\eqref` instead of `\ref`.
|
|
6
|
+
This rule is disabled by default. Enable it with `--select REF008` or add
|
|
7
|
+
`REF008` to `lint.select` in the TeXact configuration.
|
|
8
|
+
|
|
9
|
+
## Why is this bad?
|
|
10
|
+
|
|
11
|
+
The `\ref` command sometimes does not always resolve correctly for equations.
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```latex
|
|
16
|
+
See (\ref{eq:energy}).
|
|
17
|
+
See \eqref{eq:energy}.
|
|
18
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# space-after-period (UNS006)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that periods are followed by a space when they continue into another
|
|
6
|
+
sentence.
|
|
7
|
+
|
|
8
|
+
## Why is this bad?
|
|
9
|
+
|
|
10
|
+
A space after a period makes sentence boundaries clear.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```latex
|
|
15
|
+
This sentence is missing a space.Next sentence.
|
|
16
|
+
This sentence has a space. Next sentence.
|
|
17
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# space-before-citation (REF011)
|
|
2
|
+
|
|
3
|
+
## What it does
|
|
4
|
+
|
|
5
|
+
Checks that a hard space (`~`) precedes each `\cite` command. This rule is
|
|
6
|
+
disabled by default. Enable it with `--select REF011` or add `REF011` to
|
|
7
|
+
`lint.select` in the TeXact configuration.
|
|
8
|
+
|
|
9
|
+
## Why is this bad?
|
|
10
|
+
|
|
11
|
+
A hard space keeps the citation attached to the preceding word and prevents a
|
|
12
|
+
line break before the citation.
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```latex
|
|
17
|
+
See \cite{source}.
|
|
18
|
+
See~\cite{source}.
|
|
19
|
+
```
|