Currently, there is no easy way to utilise Grammarly with TeX. I encountered this problem while writing my bachelor’s thesis, but luckily, there is a way to work this around. I got several requests to document it, hence the blog post.

Several attempts integrate Grammarly into Overleaf, but they all deviate from how the platform is meant to be used and are slightly cumbersome.

If you can settle for an offline setup – which I can wholly recommend – there is a more ergonomic solution. It involves a combination of three tools:

Since VSCode is very extensible, the exact details of your workflow may differ. I can recommend the Markdown All in One extension, which eases working with Markdown files quite a bit. I use its preview to check for Markdown errors before having to deal with TeX. I’ve also had varying levels of success with the markdownlint extension to help keep my Markdown files clean.

You can stop here and already get several good use-cases – for example, the way this workflow clicked into the way I write blog posts was an unexpected but welcome bonus.

I cannot comment on the usage with LaTeX, but I have heard good things about the LaTeX Workshop extension (the numbers speak for themselves).

ConTeXt support in VSCode is finicky, but so is ConTeXt support everywhere else, so it is good enough. I use the ConTeXt Syntax extension with custom build tasks and problem matchers, but that is the subject of a future blog post.

To integrate the markdown you produced into your TeX document, you will have to dive into the documentation of the TeX markdown package, as its feature set is quite extensive. It has support for probably everything you will need, like citations, footnotes, figures, and you can also enable hybrid mode to mix in TeX syntax, such as math. Big shoutout to (our very own) Vít Novotný, as his work does most of the heavy lifting in this setup.

Although few rough edges need honing – e.g. the support for alt-text in images (used in the markdown package to display figures with annotations) triggers a Grammarly error if you use it to check curly quotation marks – but the overall functionality is highly usable.

A final thing to note is how the Grammarly editing process perfectly fits into the VSCode user experience – Ctrl+. to apply and F8/Shift+F8 to jump arround issues is such a nicer way to edit documents than the default Grammarly clicky experience.