1

LaTeX, being a markup language, is very hard to grammar-check. I found one program, that do this exactly Textidote. Problem is, this is a standalone program and, for example, this latex code:

\documentclass[a4paper]{article}
\begin{document}
How is you?
I is fine.
I am fine.
\end{document}

shows error:

 java -jar ~/bin/textidote.jar --check en_UK --output singleline i.tex 
TeXtidote v0.8.1 - A linter for LaTeX documents and others
(C) 2018-2019 Sylvain Hallé - All rights reserved

Found 2 warning(s)
Total analysis time: 3 second(s)

i.tex(L7C5-L7C7): The pronoun is must be used with are>.. Suggestions: [are] (4) "How is you?"
i.tex(L8C3-L8C5): Did you mean am>?. Suggestions: [am] (14) "I is fine."

My question is, is there some way that I convert this output to a quickfix list (with press n to go to next error)?

1

The standard way to do this is to set 'makeprg' and 'errorformat' to appropriate values, and then do :make. Output is loaded into the quickfix list, which you navigate with the usual commands.

Further, putting these settings in a compiler plugin allows faster use: if you create ~/.vim/compiler/textidote.vim with the right contents, you can do

compiler textidote
make

A solid-looking compiler script has been posted in the comments.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.