lang-rep.mkiv / last modification: 2020-01-30 14:16
%D \module
%D   [       file=lang-rep,
%D        version=2013.04.28,
%D          title=\CONTEXT\ Language Macros,
%D       subtitle=Substitution,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D As I needed an example of messing with nodes for the bacho\TEX\ tutorial
%D I cooked up this. In the end I decided to stick to a simpler example and
%D just finished this off in case someone really needs it.

\writestatus{loading}{ConTeXt Language Macros / Replacements}




%D \startluacode
%D     -- todo: other nodes (prelude to more experiments with auto dropped caps)
%D     languages.replacements.add("basics", {
%D         ["aap"]   = "monkey",
%D         ["noot"]  = "nut",
%D         ["never"] = "forever",
%D         ["newer"] = "cooler",
%D         ["new"]   = "cool",
%D      -- ["special"] = "veryspe{>>>}{<<<}{=}cial",
%D     })
%D \stopluacode
%D \replaceword[more][this][that]
%D \replaceword[more][crap][support]
%D \replaceword[more][---][—]
%D \replaceword[basics][special][veryspe{>>>}{<<<}{=}cial]
%D \starttyping
%D \start \setreplacements[basics] What the heck, it's now or never, isn't it new? \par \stop
%D \start \setreplacements[more]   Do we --- {\it really} --- need this kind of crap? \par \stop
%D \start \setreplacements[basics] All kinds of special thingies! \par \stop
%D \start \setreplacements[basics] \hsize1mm special \par \stop
%D \stoptyping





\to \everyresettypesetting

\to \everyinitializeverbatim

\protect \endinput