Acronym check follow-ups from #849: six inconsistent readings and unescaped heading text

Author: Imbad0202Created Sep 24, 2026Updated Sep 24, 2026

Context

scripts/check_acronyms.py (#849, shipped in #904 and #905) passed its last cross-model review rounds with no findings. A cleanup review after those rounds, and the security review, found the inputs below. In each, the check reads two forms of one construction differently, or prints text it should not. Every fix here changes a result, and the cleanup after review converged allowed only changes with byte-identical output, so none was made in #904.

Each example is synthetic and was re-run on main at a3f65690 with --scopes body.

Items

1. Emphasis inside a Chinese-form parenthetical

  • Input: 我們使用(*結構方程模型*,SEM)分析資料。SEM 的配適良好。
  • Now: an unconfirmed definition, so the report is partial.
  • Compare: (結構方程模型,SEM) and *結構方程模型*(SEM) are both read as definitions.
  • Effect: a coverage limit where the definition is present. Emphasis marks are removed before the parenthetical but not inside it.

2. A lead set off as its own comma item

  • Input A: We fit a model (a model, i.e., SEM). SEM fit well.
  • Now: an unconfirmed definition.
  • Compare: We fit two designs (namely SEM). SEM fit well. reads the parenthetical as a use, so SEM is reported as not defined.
  • Input B: (structural equation modeling, hereafter, SEM) as a second definition of SEM.
  • Now: the "defined again" finding's JSON expansion is structural equation modeling hereafter. With (structural equation modeling,以下簡稱,SEM) it is structural equation modeling 以下簡稱. Without the comma after the lead, it is structural equation modeling.
  • Effect: A is a missed "not defined" finding, shown as a coverage limit. B changes JSON text only; the Markdown report does not print expansions.
  • Cause: a restatement or naming lead is read only at the start of the parenthetical or of its last item. When a comma follows the lead, the lead is an item of its own.

3. "See" leads differ by language

  • Input: 我們採用隨機對照試驗(見第二節,RCT)。RCT 的結果穩定。
  • Now: a definition.
  • Compare: We used randomized controlled trials (see Section 2, RCT). The RCT results were stable. reads the parenthetical as a use, so RCT is reported as not defined.
  • Effect: the same construction gets opposite readings in the two languages. Which reading is right is a design choice: the acronym follows its expansion, but the parenthetical also holds a cross-reference.

4. A citation before the acronym

  • Input: We pooled randomized controlled trials (Smith, 2020; RCTs). The RCTs were small.
  • Now: an unconfirmed definition.
  • Compare: (RCTs; Smith, 2020), with the citation after the acronym, is a definition.
  • Effect: a coverage limit where the definition is present.

5. A letter range whose first letter is also a Roman numeral

  • Input: a paragraph that starts Table C – D show the RCT arms.
  • Now: read as a caption label, so the paragraph is skipped and RCT is not reported.
  • Compare: Table A – B show the RCT arms. and Tables C and D show the RCT arms. report RCT as not defined.
  • Effect: a missed finding. _caption_label reads a label letter that is also a Roman numeral (C, I, L, V, X) as a Roman numeral, and a Roman start takes only a Roman end at most 20 above it. D is 500, so C – D is not a range, and the dash reads as the caption separator.

6. An escaped backslash before inline math

  • Input: The value \\$RCT$ is fine.
  • Now: RCT is read as text and reported as not defined.
  • Compare: The value $RCT$ is fine. skips the math.
  • Effect: a false finding. In CommonMark \\ is a literal backslash, so the $ after it is not escaped. _INLINE_MATH rejects a $ after any backslash ((?<!\\)), while _escaped() counts the backslashes.

7. Control characters in an unread-section heading reach the report

  • Now: a heading the check lists as unread, such as ## Spanish abstract (…), is printed in the Markdown report as written. Control characters in it, such as terminal escape sequences, reach the report unchanged.
  • Effect: low. The manuscript comes from the user, and the security review rated this below its reporting bar. A fix could drop or escape control characters in echoed headings.

Not in this issue

Forms the docstring and #904 already list as limits, such as the reverse form RCT (randomized controlled trial) and Markdown the line reader does not parse.

Follow-up from #849.

Source: Imbad0202/academic-research-skills