diff options
Diffstat (limited to 'tex/context/base/lang-wrd.mkiv')
-rw-r--r-- | tex/context/base/lang-wrd.mkiv | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tex/context/base/lang-wrd.mkiv b/tex/context/base/lang-wrd.mkiv new file mode 100644 index 000000000..e517ab5ae --- /dev/null +++ b/tex/context/base/lang-wrd.mkiv @@ -0,0 +1,47 @@ +%D \module +%D [ file=lang-wrd, +%D version=2006.XX.XX, +%D title=\CONTEXT\ Language Macros, +%D subtitle=Checking, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D Experimental. + +\writestatus{loading}{ConTeXt Language Macros / Checking} + +\registerctxluafile{lang-wrd}{1.001} + +\unprotect + +% mkiv only -- todo: internationalize command names + +% \loadspellchecklist[en][words-en.txt] +% \loadspellchecklist[us][words-en.txt] +% \loadspellchecklist[nl][words-nl.txt] +% \setupspellchecking[state=start] + +\def\loadspellchecklist + {\dodoubleempty\doloadspellchecklist} + +\def\doloadspellchecklist[#1][#2]% + {\ctxlua{languages.words.load("#1","#2")}} + +\def\setupspellchecking + {\dosingleargument\dosetupspellchecking} + +\def\setupspellchecking[#1]% todo colors + {\getparameters[\??wl][#1]% + \doifelse\@@wlstate\v!start + {\ctxlua{languages.words.enable()}} + {\ctxlua{languages.words.disable()}}} + +\setupspellchecking + [\c!state=\v!stop] + +\protect \endinput |