summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/lxml-css.mkiv
blob: 04000a6caba0de8c282775542f8c0c759faba6db (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
%D \module
%D   [       file=lxml-css,
%D        version=2010.01.28,
%D          title=\CONTEXT\ Modules,
%D       subtitle=Css Helpers,
%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.

\registerctxluafile{lxml-css}{}

\unprotect

\def\ctxmodulecss#1{\ctxlua{moduledata.css.#1}}

% No stable interface yet.

%     \edef\CellPadding{\xmlatt{#1}{cellpadding}}
%     \ifx\CellPadding\empty
%       \edef\CellPadding{.25ex}
%     \else
%       \edef\CellPadding{\cssgetsinglepadding{\xmlatt{#1}{cellpadding}}}
%     \fi
%
% \starttexdefinition cssgetsinglepadding #1
%    \ctxlua {
%      context((moduledata.css.padding(
%          "#1",
%          \number\dimexpr0.1ex,
%          \number\dimexpr0.01\hsize,
%          \number\dimexpr1ex,
%          \number\dimexpr1em
%      ))) % returns 4 values therefore ()
%    }sp
% \stoptexdefinition

% \startxmlsetups html:settings
%      \xmlsetsetup{#1}{p}{html:p}
% \stopxmlsetups
%
% \xmlmapvalue{ctx-before}     {one}      {\page BEFORE\par}
% \xmlmapvalue{ctx-after}      {two}      {\par AFTER\page}
% \xmlmapvalue{text-decoration}{underline}{U}
% \xmlmapvalue{text-decoration}{overline} {O}
%
% \startxmlsetups html:p
%     \testfeatureonce{100000}{
%         \edef\foo{\xmlcssstylevalue{#1}{ctx-before}\xmlcssstylevalue{#1}{ctx-after}}
%     }
%     \page {\tttf style="\xmlatt{#1}{style}"} : \elapsedtime\ s \page
%     \xmlvalue{ctx-before}{\xmlcssstylevalue{#1}{ctx-before}}{}
%     \xmlflush{#1}
%     (\xmlcssstylevalue{#1}{text-decoration})
%     (\xmlcssmappedstylevalue{#1}{text-decoration}{text-decoration})
%     \xmlvalue{ctx-after} {\xmlcssstylevalue{#1}{ctx-after}}{}
% \stopxmlsetups
%
% \startbuffer[temp]
% <body>
%      <p style='ctx-before: one; text-decoration: underline overline; ctx-after: two;'>foo 1</p>
%      <p>foo 2</p>
% </body>
% \stopbuffer
%
% \xmlregistersetup{html:settings}
% \xmlprocessbuffer{main}{temp}{}

\let\xmlcssstylevalue      \clf_xmlstylevalue
\let\xmlcssmappedstylevalue\clf_xmlmappedstylevalue

\protect \endinput