summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkxl/cldf-int.mkxl
blob: a564afc80ad23a5f8cc99886cf764da4c984cce8 (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
26
27
28
29
30
31
32
33
34
%D \module
%D   [       file=cldf-int,
%D        version=2019.01.01,
%D          title=\CONTEXT\ Data Macros,
%D       subtitle=Integer,
%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.

\writestatus{loading}{ConTeXt Multilingual Macros / Lua}

\registerctxluafile{cldf-int}{autosuffix}

%D These are user commands so we don't add any protection against overloading
%D here.

\unprotect

\permanent\protected\def\newluatable#1{\clf_newluatable#1\atendofgrouped{\disposeluatable#1}}
\permanent\protected\def\useluatable#1{\clf_useluatable#1\atendofgrouped{\disposeluatable#1}}

\installcorenamespace{datavalue}

\permanent\protected\def\setdatavalue#1#2% #2 is a number (expression)
  {\expandafter\integerdef\csname\??datavalue#1\endcsname\numexpr#2\relax}

\permanent\def\getdatavalue#1{\begincsname\??datavalue#1\endcsname}
\permanent\def\thedatavalue#1{\the\begincsname\??datavalue#1\endcsname}

\protect \endinput