diff options
author | Marius <mariausol@gmail.com> | 2011-10-03 00:00:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-10-03 00:00:13 +0300 |
commit | e1bf359128771691941392be0be499985e249370 (patch) | |
tree | b6e255106a42aa8ce5ff003c1ea0fe8e1bf99d17 /tex/context/base/supp-box.mkiv | |
parent | fa1a41c0c31f9b1911326480959d436fb4d7ef78 (diff) | |
download | context-e1bf359128771691941392be0be499985e249370.tar.gz |
beta 2011.10.02 22:44
Diffstat (limited to 'tex/context/base/supp-box.mkiv')
-rw-r--r-- | tex/context/base/supp-box.mkiv | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tex/context/base/supp-box.mkiv b/tex/context/base/supp-box.mkiv index ff15d29f9..caded9e1f 100644 --- a/tex/context/base/supp-box.mkiv +++ b/tex/context/base/supp-box.mkiv @@ -2501,3 +2501,48 @@ \ruledvbox to \strutheight{\hbox{\strut gans}} \ruledvbox to \strutheight{\vss\hbox{gans}} \egroup + +% to be considered + +% \startluacode +% +% local spacer = lpeg.patterns.spacer +% +% function commands.withwords(command,str) +% if str then +% command = command or "ruledhbox" +% local done = false +% local function apply(s) +% if done then +% context.space() +% done = true +% else +% context.dontleavehmode() +% end +% context[command](s) +% end +% lpeg.match(lpeg.splitter(spacer,apply),str) +% end +% +% end +% +% \stopluacode +% +% \unprotect +% +% \unexpanded\def\withwordsinstring#1#2% command str +% {\ctxcommand{withwords(\!!bs#1\!!es,\!!bs#2\!!es)}} +% +% \unexpanded\def\withwordsinfile#1#2% command name +% {\ctxcommand{withwords(\!!bs#1\!!es,io.loaddata(resolvers.findfile("#2")))}} +% +% \protect +% +% \starttext +% +% \defineframed[colored][foregroundcolor=red,foregroundstyle=\bfc\underbar,location=low] +% +% \withwordsinstring{colored}{bla bla} +% \withwordsinfile{colored}{ward.tex} +% +% \stoptext |