How to spellcheck latex files

List of all errors in all *.tex files in g2/

cat g2/*.tex | aspell -t -p .aspell.ru.pws -l ru list > xu.txt

-t is great option for .tex files to avoid spelling \section and the like

Create personal dictionary

bigmac:d askom$ vim ~/.aspell.ru.pws

Select only unique words from xu.txt

bigmac:d askom$ awk ‘a !~ $0; {a=$0}’ xu.txt > xu1.txt

Add xu1,txt to personal dictionary. It looks like:

bigmac:d askom$ head ~/.aspell.ru.pws

personal_ws-1.1 ru 173 utf-8
Байеса
ПУЗК
САКТ
маркировочные
Махаланобиса
максимизирует
БД
тренда
АК
bigmac:d askom$

Prepare script file:

bigmac:d askom$ cat spmany.sh

#!/bin/bash
for file in “$@”   # “$@” contains all the command line arguments passed to the program
do
#  aspell -t $file
aspell -t -p .aspell.ru.pws -l ru check $file
done

bigmac:d askom$

Check all tex files in a/

./spmany.sh a/*.tex

Добавить комментарий

Please log in using one of these methods to post your comment:

Логотип WordPress.com

You are commenting using your WordPress.com account. Log Out / Изменить )

Фотография Twitter

You are commenting using your Twitter account. Log Out / Изменить )

Фотография Facebook

You are commenting using your Facebook account. Log Out / Изменить )

Connecting to %s

Follow

Get every new post delivered to your Inbox.