[NTG-context] XML inclusion

2017-04-07 Thread Meer, Hans van der
The command \xmlinclude{}{}{} includes the file specified by attribute 
IDENTIFIER of the element located by LPATH at NODE.
What I would like to do is including a bunch of .xml files where the directory 
to load from is given.

Is this a possibility or could this be a feature added to the ConTeXt 
XML-processing in a new beta?

Hans van der Meer




___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] get current fontstyle with lua

2017-04-07 Thread Hans Hagen

On 4/7/2017 11:15 AM, MF wrote:

Hello list,
I need the lua equivalent of \fontstyle, a function that returns a
string like "rm", "ss", etc.

A lua equivalent for

\doifelse{\fontstyle}{ss}{...}{...}

to write lua code like this:

local fs = get_current_font_style()
if fs == "ss" then
  ...
else
  ...
end


\startluacode
if tokens.getters.macro("fontstyle") == "ss" then
context("Foo")
else
context("Bar")
end
if tokens.getters.macro("fontstyle") == "rm" then
context("Foo")
else
context("Bar")
end
\stopluacode



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] get current fontstyle with lua

2017-04-07 Thread MF
Hello list,
I need the lua equivalent of \fontstyle, a function that returns a
string like "rm", "ss", etc.

A lua equivalent for 

\doifelse{\fontstyle}{ss}{...}{...}

to write lua code like this:

local fs = get_current_font_style()
if fs == "ss" then
  ...
else
  ...
end

Thanks,
best greetings
MF
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___