feature/document quality - #22
Merged
Merged
Conversation
JheisonMB
commented
Aug 13, 2026
Collaborator
- feat(linter): add Severity enum and --deny-warnings flag
- feat(compiler): surface tectonic warnings on successful builds
- feat(texparse): add context-aware LaTeX tokenizer
- feat(stats): add word count per section with human and JSON output
- feat(linter): detect silent-divergence glyphs in prose
- feat(outline): add section tree command with --json output
- feat(linter): detect packages that break or do nothing under Tectonic/XeTeX
- feat(linter): warn about unused .bib entries never cited
- feat(build): add reproducible builds via SOURCE_DATE_EPOCH
- feat(raster): add PDF rasterization via hayro and preview command
- feat(watch): add --preview flag for live PNG preview
- feat(pdf): add PDF text extraction and fidelity check
- feat(pdf): verify font embedding and validate PDF metadata dates
- feat(linter): add spell checker with on-demand dictionaries
- feat(doctor): add texforge doctor to diagnose the managed environment
- fix(version-check): build the real release asset name in the download URL
- fix(pdf-check): normalize source tokens before fidelity comparison
- fix(texparse): resolve macro-wrapped section titles to plain text
- fix(linter): distinguish missing download tool from failed transfer
- chore: bump version to 0.8.0
- fix(linter): skip spell-check when resolved language dictionary is missing instead of silently checking against wrong language
- fix(pdf-pages): skip unmatchable section titles instead of blocking all later sections
- fix(outline): unescape escaped specials in resolved titles
- fix(linter): read raw_title in check_section_title to avoid false escaped-special errors
- fix(pdf): attribute pages to the first heading that opens them, not the last
- fix(linter): document babel declaration wins over config default in spell-check language resolution
- feat(linter): add Hunspell backend via spellbook for Spanish spell-check
- fix(spell): strip empty groups before word-splitting to prevent ligature fragments
- feat(spell): add texforge spell CLI for managing personal dictionary with global scope
- feat(spell): invert default scope to global personal dictionary
- feat(updater): replace running binary on self-update, refuse cargo installs
- docs: Add homepage link to crates.io and README
- docs: Document spell-check, PDF inspection, and analysis commands
- docs: fix the website link text, which named a host that does not exist
- docs: Document language precedence, self-update, and spell-check integration
- docs: the update prompt only appears on texforge init
- feat(diagrams): embed diagrams as vector PDF instead of rasterising to PNG
- feat(diagrams): add style attribute with editorial, mono, technical presets
- docs(examples): showcase diagram style presets in capabilities demo
- fix(diagrams): brace option values so commas inside captions are preserved
- fix(pdf-pages): strip numbering prefix to match numbered headings against TOC
- refactor(diagrams): rename mono preset to monochrome
- docs(examples): rebuild the capabilities PDF to match its source
- fix(pdf-pages): handle both TOC entry shapes and advance carry on non-opening pages
- fix(pdf-pages): report the first matched heading on a page, never the last or a stale carry-forward
- refactor(diagrams): retune the editorial preset to texforge's own page palette
- refactor(diagrams): reserve the accent for edges and draw shapes in ink
- docs(examples): demo diagram style presets with a richer sequence diagram
- chore(demo): re-record the demo against the current build
Introduce Error/Warning severity levels on LintFinding so texforge check fails only on real errors. All existing rules emit Error, preserving current behavior. - Add Severity enum and severity field to LintFinding - Rename LintError → LintFinding (no aliases left behind) - check exits non-zero on Error only; --deny-warnings promotes warnings - Console output grouped by severity (errors first) with counts - Tests for severity tagging and clean-project behavior
Single-pass tokenizer that produces Vec<Token> with Text, Command, Section, BeginMath/EndMath, BeginVerbatim/EndVerbatim, Comment, and BeginDocument/EndDocument variants. Handles all spec'd constructs: inline/display math ($, 196658, \[, \(), math environments), verbatim environments, comments (respecting \%), \url/\href, prose vs non-prose command arguments, sectioning commands, and preamble detection. Extracts collect_tex_files, strip_comment, extract_commands, and resolve_tex_path from linter into src/texutil.rs for shared reuse. 33 tests covering every named construct plus nested cases and malformed-input safety.
Add --reproducible flag and project.toml build.reproducible key that set SOURCE_DATE_EPOCH for the Tectonic invocation so identical source plus an identical Tectonic version yields an identical PDF. Without an explicit value a fixed default epoch (1700000000) is used; an explicit epoch can pin a release-specific timestamp. The CLI flag wins over project.toml. New files: src/compiler/mod.rs, src/commands/build.rs, src/domain/project.rs, src/cli/mod.rs, docs/building.md, docs/cli-reference.md, docs/configuration.md.
… URL The URL printed on an available update was texforge-<version>-<arch>, while the release workflow publishes texforge-v<version>-<target-triple>.tar.gz — missing the v, the full triple and the extension, so the link 404s. Same defect canopy had in its auto-update path, found the same day. Added a test that pins the asset name to the workflow's shape, since the two live in different repositories and nothing else would catch the drift.
Strip empty groups ({}) from source words so ligature workarounds
like workf{}lows match the rendered workflows in the PDF. Exclude
tabular column specs from the significant-word stream by consuming
them at the tokenizer level. Metadata checks are unchanged.
…ssing instead of silently checking against wrong language Resolves language from babel/polyglossia declarations, never falls back to a different language's dictionary, and emits clear skip/using messages so the spell-check basis is always visible.
…ll later sections
…aped-special errors
…he last page_breaks now reports the section that opens each page (first heading with only whitespace before it) instead of the last heading found on it. section_title_in_page uses whole-line matching so titles mentioned only inside prose no longer false-positive.
…pell-check language resolution
The configured default language silently overrode a document's own
\usepackage[spanish]{babel} declaration, causing 214 false 'Unknown
word' warnings on correctly-spelled Spanish prose checked against the
English dictionary.
resolve_language now scans the preamble first (highest priority:
babel/polyglossia declaration, then user config default, then english).
When the two disagree, lint_files emits a Severity::Warning naming both
languages and stating which one won, at the line of the \usepackage
that overrode the default.
Also removes the spanish/es entries from remote_for_language since the
source URL returns 404. With those entries gone, a Spanish document
resolves correctly, the existing skip path fires with a clear message,
and zero false Unknown word findings are produced.
…with global scope
TE14: (and list/remove) now write to ~/.texforge/spell-words by default. selects the project whitelist. remains accepted as a redundant explicit default. The two flags are mutually exclusive via clap conflicts_with.
…stalls Implements download_and_install to fetch the release tarball, extract the binary, and atomically replace std::env::current_exe() (rename with copy fallback for cross-filesystem). Refuses to touch binaries installed via cargo install, printing the correct cargo command instead. Tests cover cargo root precedence, canonicalization failure handling, archive extraction, permission preservation, and temp-file cleanup.
The link read 'Visit texforge.univerlab.org' while pointing at univerlab.org/texforge. texforge.univerlab.org has no DNS record, so anyone typing what the link said would get nothing. It also promised full documentation, guides and examples; that page is the project page. Command-level documentation is in docs/, which the line now says.
…gration - Fix configuration.md to clarify language config is a fallback; document declarations win - Add 'Updating texforge' section to installation.md with guidance for cargo vs script installs - Update index.md to include spell-check in smart linting capabilities - Add one-sentence note in quickstart.md about spell-check detection
The new Updating section said a newer version prompts you 'during normal command execution'. check_for_updates() is called from exactly one place — commands/init.rs:31, inside init's execute() — so a reader building documents every day would never see it and would assume they were on the latest version.
…o PNG SVG→PDF conversion via svg2pdf keeps diagram art vector in the typeset document so labels stay sharp at any zoom. Falls back to PNG with a warning when conversion fails (e.g. deep nesting), preserving a successful build.
… last or a stale carry-forward
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.