A Grammar Checker for LyX and LaTeX. There is an online demo.
A more elaborate readme is found on the LyX-wiki
For full functionality you will also want the following software
- ChkTeX (available as debian package and via ctan)
- LanguageTool
##Installation
Clone or unzip the respository, for example:
mkdir ~/.local
cd .local
git clone https://github.com/gmatht/lyx-gc.git
Add this folder to your $PATH
variable.
For example, for bash, add to file ~/.bashrc
:
export PATH=$PATH:"~/.local/lyx-gc/"
###Note on installing Languagetool Currently, languagetool has no installer and is not included in any software repository. Suggested installation:
- Download stand-alone version from https://languagetool.org/
- Unpack in
~/.local/LanguageTool/
##Configuration Use LanguageTool as grammar checking in lyx-gc:
- Adjust in the file
lyx-gc/path/chktex.pl.JLanguageTool.pl
:- Change the LANGUAGETOOL_PATH variable to the path where
languagetool-commandline.jar
is located. - Example:
my $LANGUAGETOOL_PATH=$ENV{'HOME'}."/.local/LanguageTool-3.6/";
- Change the LANGUAGETOOL_PATH variable to the path where
##Usage
Start lyx using the lyx-gc
script, then Menu->Tools->CheckTex.
This command should be run twice when LanguageTool is used as check.
##Keyboard shortcuts
By default, the short-cut for buffer-chktex is M-e h
(e.g Alt-e
then h
).
You may wish to change this to F8
by creating a new bind-file,
say $HOME/.lyx/bind/myShortcuts.bind
and include one of the standard files, e.g.:
# include one of the basic flavours (cua or emacs)
\bind_file "cua"
# add your own bindings (overwriting the included ones)
\bind "F8" "buffer-chktex"
Then go to the preferences dialog and choose this file to be your bind-file. See KeyboardShortcuts for more information.