It sort of depends on the system you're working on.
I'm using GNU/Linux and here aspell
does a good job. For instance, to check test.tex
in Danish, I would do like this from the terminal:
aspell -c -t test.tex -d da
The option -c
tells aspell
to check the file, -t
puts it in TeX mode, and -d
gives the base name of the main dictionary to use.
On Ubuntu/Debian, this can be installed using:
sudo aptitude install aspell
Aspell is also available as a Windows executable. It can but run from the command line or from any good text-editor (i.e. one that supports macros to run external programs).
aspell
Although aspell
has been mentioned, I would like to give some usage examples.
Basic usage
aspell --mode=tex -c sample-file.tex
Languages
List all dictionaries:
aspell dump dicts
Change language to check:
aspell --lang=de --mode=tex -c sample-file.tex
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:
\tikzset{
Stern Brocot at/.style={at/.pgfmath={
strcat("([rotate around=180:(!", strrepeat("#1",\SBLevel),")] !",
strrepeat("#1",\SBLevel-1),"2)")}},
Stern Brocot at*/.style n args={3}{
at/.pgfmath={strcat("(!",strrepeat("#1",#2),"-| SB@#3)")},
append after command/.expanded={\ifnum#2<\SBLevel(\noexpand\tikzlastnode)
edge[densely dotted] (SB@#3@\the\numexpr\SBLLoop+1\relax)\fi}}}
After \begin{document}
:
- Almost everything within TikZ
- Much in
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.
Best Answer
You can set your preferences by going to Tools/options/spelling and then you'll find some checkboxes and select the ones you want to ignore.
The menu looks like this:
For more information on these options and others, please visit the TeXnic Center's options documentation
However, please bear in mind that ---as stated in the documentation---, the argument of the command is always spell-checked, and not the command itself.
Furthermore, if you wish to include this feature for specific commands (such as
\label
and\ref
) in future TeXnicCenter versions, please add your recommendation in the TeXnicCenter Feature Request PageNevertheless, there is kind of a workaround: as you can see in the picture attached, you can ignore things with numbers and/or uppercase... so you can always use numbers and/or uppercase for the arguments of
\label
and\ref
and\cite
.