diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lang-wrd.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/lang-wrd.mkiv | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/lang-wrd.mkiv b/Master/texmf-dist/tex/context/base/lang-wrd.mkiv new file mode 100644 index 00000000000..b6fc6a9d30f --- /dev/null +++ b/Master/texmf-dist/tex/context/base/lang-wrd.mkiv @@ -0,0 +1,54 @@ +%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 + +% \loadspellchecklist[en][words-en.txt] +% \loadspellchecklist[us][words-en.txt] +% \loadspellchecklist[nl][words-nl.txt] +% \setupspellchecking[state=start,method=1] +% +% \setupspellchecking[state=start,method=2] +% ... +% \typefile{\jobname.words} + +\def\loadspellchecklist + {\dodoubleempty\doloadspellchecklist} + +\def\doloadspellchecklist[#1][#2]% + {\ctxlua{languages.words.load("#1","#2")}} + +\unexpanded\def\setupspellchecking + {\dosingleargument\dosetupspellchecking} + +\unexpanded\def\setupspellchecking[#1]% todo colors + {\getparameters[\??wl][#1]% + \doifelse\@@wlstate\v!start + {\ctxlua{languages.words.enable(\@@wlmethod)}} + {\ctxlua{languages.words.disable()}}} + +\setupspellchecking + [\c!state=\v!stop, + \c!method=1] + +\appendtoks + \ctxlua{languages.words.dump_used_words("\jobname.words")}% +\to \everybye + +\protect \endinput |