Changes

Jump to navigation Jump to search
614 bytes added ,  13:26, 9 August 2020
m
Text replacement - "</cmd>" to "}}"
== Example ==
We will test now the function with the following example. The word list is loaded with the <{{cmd>|loadspellchecklist</cmd> }} command.
With the first argument to set the language of the text file and with the second the name of the file.
The command <{{cmd>|setupspellchecking</cmd> }} enables the spell checking function for your document.
<texcode>
\stoptext
</context>
 
== Wordcount ==
 
The spellchecker can also be used to include the word count in a document.
 
<texcode>
\setupspellchecking[state=start,method=2]
\ctxlua{languages.words.threshold=1}
 
\starttext
\input knuth
 
\ctxlua{
context.par()
local data = table.load(file.addsuffix(tex.jobname,"words"))
context(data and data.total or "nothing")
}
\stoptext
</texcode>
 
The wordcount appears in your file and a file containing 'statistics' is created
and saved with the extension .words.
 
See [http://archive.contextgarden.net/message/20120420.205210.27d80733.en.html ntg-context from 2012-04-20].
 
[[Category:Tools]]

Navigation menu