Skip to content

Fix TeXcount handling for newcolumntype#1487

Open
puneetdixit200 wants to merge 1 commit into
overleaf:mainfrom
puneetdixit200:fix-texcount-newcolumntype
Open

Fix TeXcount handling for newcolumntype#1487
puneetdixit200 wants to merge 1 commit into
overleaf:mainfrom
puneetdixit200:fix-texcount-newcolumntype

Conversation

@puneetdixit200

Copy link
Copy Markdown

Description

Adds a CLSI-generated TeXcount option file for word count requests so TeXcount handles \newcolumntype declarations in the preamble without parsing their column definitions as real math/groups.

The generated option file is written into the compile directory as .overleaf-texcount-options and passed to texcount with -opt=$COMPILE_DIR/.overleaf-texcount-options.

Related issues / Pull Requests

Contributes to #1396

Verification

  • Reproduced the issue with standalone TeXcount 3.1.1: the minimal \newcolumntype{C}{>{$}c<{$}} document reported 8 TeXcount errors and 0 text words before the rule; with %preambleinclude \newcolumntype [ignore,xxx], it reported 1 text word and no errors.
  • yarn --cwd services/clsi test:unit --run test/unit/js/CompileManager.test.js
  • yarn --cwd services/clsi test:unit --run test/unit/js/CompileManager.test.js test/unit/js/CompileController.test.js
  • git diff --check

Notes: yarn --cwd services/clsi lint could not run in this checkout because eslint is not exposed on the workspace script path, and direct root ESLint invocation could not find a flat config for services/clsi. The full CLSI unit suite also has unrelated local failures for missing services/clsi/app/js/DockerRunner and an absolute /overleaf fixture path.

Contributor Agreement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant