Skip to content

Commit

Permalink
Integration of snippet for emacs in Readme (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
acorbe committed Aug 22, 2021
1 parent 7a955d6 commit a779f79
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,28 @@ for the changes to take effect.

Users of Visual Studio Code can integrate TeXtidote by calling it with the `--output singleline` and `--no-color` options and parse its results. Moreover, user [cphyc](https://github.com/cphyc) also wrote a nice [build task](https://github.com/sylvainhalle/textidote/issues/125#issue-603278987).

### Emacs integration

Emacs users can benefit from TeXtidote through [flycheck](https://www.flycheck.org/en/latest/).
A dedicated `flycheck-checker` can be defined as in the following `init.el/.emacs` snippet (by user [soli](https://github.com/soli)).

```emacs-lisp
(flycheck-define-checker tex-textidote
"A LaTeX grammar/spelling checker using textidote.
See https://github.com/sylvainhalle/textidote"
:modes (latex-mode plain-tex-mode)
:command ("java" "-jar" (eval (expand-file-name "~/PATH/TO/textidote.jar")) "--read-all"
"--check" (eval (if ispell-current-dictionary (substring ispell-current-dictionary 0 2) "en"))
"--no-color" source-inplace)
:error-patterns (
(warning line-start "* L" line "C" column "-" (one-or-more alphanumeric) " "
(message (one-or-more (not (any "]"))) "]")))
(add-to-list 'flycheck-checkers 'tex-textidote)
```

## Rules checked by TeXtidote

Here is a list of the rules that are checked on your LaTeX file by TeXtidote.
Expand Down

0 comments on commit a779f79

Please sign in to comment.