summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/context/luatex/luatex-gadgets.tex
blob: 0faba7f97665926b25321e5d3a0822e317016c99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
%D \module
%D   [       file=luatex-gadgets,
%D        version=2015.05.12,
%D          title=\LUATEX\ Support Macros,
%D       subtitle=Useful stuff from articles,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]

\directlua{dofile(resolvers.findfile('luatex-gadgets.lua'))}

% optional removal of marked content
%
% before\marksomething{gone}{\em HERE}\unsomething{gone}after
% before\marksomething{kept}{\em HERE}\unsomething{gone}after
% \marksomething{gone}{\em HERE}\unsomething{gone}last
% \marksomething{kept}{\em HERE}\unsomething{gone}last

\def\setmarksignal  #1{\directlua{gadgets.marking.setsignal(\number#1)}}
\def\marksomething#1#2{{\directlua{gadgets.marking.mark("#1")}{#2}}}
\def\unsomething    #1{\directlua{gadgets.marking.remove("#1")}}

\newattribute\gadgetmarkattribute \setmarksignal\gadgetmarkattribute

\endinput