I know I can use TeXShop
or any other word processing program to spell check my document, but I was wondering, if there are any spell checking scripts, which run in a shell/Terminal.
I saw that there is a program called aspell
, but it hasn't been updated for a long time. Are there any good programs/scrips out there?
Best Answer
aspell
Although
aspell
has been mentioned, I would like to give some usage examples.Basic usage
Languages
List all dictionaries:
Change language to check:
Downsides of aspell
The following is from a German document I've just written. It has 413 lines, so it is rather small.
This should have been recognized as LaTeX, but wasn't:
Before
\begin{document}
:\sisetup{locale=DE}
- "locale"\pgfmathdeclarefunction{strrepeat}{2}{%
- "strrepeat"pgfmathint{#2}\pgfmath@count\pgfmathresult
and twice later - 3x"count"\let\pgfmathresult\pgfutil@empty
- "empty"\pgfutil@loop
- "loop"\pgfutil@repeat
- "repeat"\pgfmath@smuggleone
- "smuggleone"\algtext*{EndIf}
- "EndIf", "EndWhile", "EndFunction"\usetikzlibrary{arrows, positioning, calc, shapes}
- "arrows", "positioning", "calc", "shapes"\DeclareMathOperator{\ggT}{ggT}
- "ggT" (That is valid in a German document about math)25x words in:
After
\begin{document}
:algorithm
environment\begin{tabular}{l||ccl}
- "ccl"aspell also has problems with hyphenated words (source)
Workarounds
Create a file called
my_def.tex
and put your whole preamble in it. Then add\include{my_def}
to your preamble. It should be your file in there.However, this does not solve the TikZ / table issue. But you can apply the same workaround for TikZ images. I guess it is not convenient to do so for tables.