Skip to content

Additional interface for a proofreading tool #1698

@matze-dd

Description

@matze-dd

Following the discussion in Issue #1864, I'd like to propose a further vimtex compiler interface to LanguageTool. Similarly to the interface via TeXtidote, see vimtex-grammar, it extracts plain text from the LaTeX source before invoking the proofreader. A prototype of the new component is described here. Depending on the nature of the LaTeX document, it may provide better flexibility and less false positives.

Before progressing, some things would have to be clarified.

  • Apparently, message display via Vim's errorformat mechanism is restricted to a one-liner. What should be included? In the version above, it only contains LanguageTool's "Message" part, but rule ID and replacement suggestions are useful and can be easily added. This will often produce long one-line messages, and might be configured by Vim variables.
  • Is there any need and possibility for automated tests of such an integrated tool? (Perhaps, one could use LanguageTool's online service, such that only the Python module YaLafi had to be installed.)
  • I could propose a first documentation version. For check of language mistakes in the "real text", error highlighting may be considered as useful, depending on taste. Should we add some words for an interface based on ALE?
  • EDIT after reading some discussions in the Issues: Since vimtex does support numerous LaTeX macros and environments, at least the most important ones should be properly processed by the LaTeX filter. How can one organise that in a structured way? As I understand, vimtex loads declarations when it detects the inclusion of a package.
    (2nd edit:) Perhaps, one could somehow use the idea in Issue #28@YaLafi?
    (last edit for now:) The vimtex code includes the two objects b:vimtex.documentclass and b:vimtex.packages. If they are accessible when starting the "compiler", we can possibly achieve a nice integration.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions