On 8/27/2015 10:57 PM, Hans Hagen wrote:
On 8/25/2015 5:05 PM, mass...@fastwebnet.it wrote:
Hello list,
I'm working on HTML typesetting with ConTeXt.
I wrote a custom expression to test whether an element has a class:
function xml.functions.classes(classAttr)
local classes = {}
if classAt
On 8/25/2015 5:05 PM, mass...@fastwebnet.it wrote:
Hello list,
I'm working on HTML typesetting with ConTeXt.
I wrote a custom expression to test whether an element has a class:
function xml.functions.classes(classAttr)
local classes = {}
if classAttr then
for c in string.gmatch(classA
A working example to clarify my request:
\startluacode
-- splits the attribute class using spaces as classes' separator
-- returns an array of strings
function xml.functions.classes(classAttr)
local classes = {}
if classAttr then
for c in string.gmatch(classAttr, "%S+") do
Hello list,
I'm working on HTML typesetting with ConTeXt.
I wrote a custom expression to test whether an element has a class:
function xml.functions.classes(classAttr)
local classes = {}
if classAttr then
for c in string.gmatch(classAttr, "%S+") do
if (string.len(c) > 0) then classes