summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-06 21:58:15 +0000
committerKarl Berry <karl@freefriends.org>2021-03-06 21:58:15 +0000
commit974640d66e61e81cb197ad96fdff7b08343e4c5a (patch)
tree2e1f75f32f312b7f24ba82b4590ae230bcd6f399 /Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl
parentb4fa72e61230aca75f7f6fbf988821f71edfb6b2 (diff)
context
git-svn-id: svn://tug.org/texlive/trunk@58167 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl')
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl69
1 files changed, 69 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl
new file mode 100644
index 00000000000..ba1cfc5710d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl
@@ -0,0 +1,69 @@
+%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 ADE \& \CONTEXT\ Development Team}]
+%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}{}
+
+\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}
+%
+% beware, maybe some day we will honour grouping
+%
+% 1: spell checking
+% 2: word counting
+% 3: language coloring
+
+\installcorenamespace{spell}
+
+\installdirectcommandhandler \??spell {spellchecking}
+
+\appendtoks
+ \ifcstok{\directspellcheckingparameter\c!state}\v!start
+ \clf_enablespellchecking
+ method {\directspellcheckingparameter\c!method}%
+ list {\directspellcheckingparameter\c!list}%
+ \relax
+ \else
+ \clf_disablespellchecking
+ \fi
+\to \everysetupspellchecking
+
+\permanent\tolerant\protected\def\loadspellchecklist[#1]#*[#2]% can be public implementor
+ {\clf_loadspellchecklist{#1}{#2}}
+
+\setupspellchecking
+ [\c!state=\v!stop,
+ \c!method=1,
+ \c!list=]
+
+\definecolor[word:yes] [g=.75]
+\definecolor[word:no] [r=.75]
+
+%definecolor[word:unset] [s=.75]
+\definecolor[word:en] [b=.75]
+\definecolor[word:de] [r=.75]
+\definecolor[word:nl] [g=.75]
+\definecolor[word:unknown][r=.75,g=.75]
+
+\protect \endinput