[NTG-context] slashes in paths (Lua code)

2017-05-31 Thread Akira Kakuto
Directories are a problem here. I mean, \shatwo{Desktop/i-context.pdf} cannot work in Windows. Here both of your example and an example by Hans worked fine on Windows. Note that \shatwo{Desktop/i-context.pdf} works only if the current directory is your %USERPROFILE%. Best, Akira

[NTG-context] Fw: APA Bibliographic refs. | Hyphenated first names | Lower case first letter of Title

2017-05-31 Thread Richard Mahoney | Indica et Buddhica
Dear Readers, Following up on this post ... I've recently updated to `ConTeXt ver: 2017.05.28 19:30 MKIV beta' and have found that the APA code base seems to have changed a little. Previously (BibTeX ---> ConTeXt output): Hans-Georg Gadamer and H.-G. Gadamer ---> H. -G. Gadamer but now

Re: [NTG-context] slashes in paths (Lua code)

2017-05-31 Thread Hans Hagen
On 5/31/2017 8:51 PM, Pablo Rodriguez wrote: Dear list, I need to add checksums to files I attach to PDF documents. Following the suggestion from https://stackoverflow.com/a/326715, I wrote: \starttext \startluacode function document.capture(cmd, raw) local f =

[NTG-context] slashes in paths (Lua code)

2017-05-31 Thread Pablo Rodriguez
Dear list, I need to add checksums to files I attach to PDF documents. Following the suggestion from https://stackoverflow.com/a/326715, I wrote: \starttext \startluacode function document.capture(cmd, raw) local f = assert(io.popen(cmd, 'r')) local s =

Re: [NTG-context] Modes in Lua

2017-05-31 Thread Hans Hagen
On 5/31/2017 4:51 PM, Pablo Rodriguez wrote: On 05/31/2017 11:03 AM, MF wrote: if tex.modes['specialmode'] then context('I’m special.') end Best greetings, Massi Hi, this should be easy: How can I access ConTeXt’s modes in Lua? Is it any different with language modes (*en)? This

Re: [NTG-context] Modes in Lua

2017-05-31 Thread Pablo Rodriguez
On 05/31/2017 04:51 PM, Pablo Rodriguez wrote: > [...] > This is the way to detect system modes, but I don’t know how to do it > for \mainlanguage (**en). It was simple (not even using tex.systemmodes): \mainlanguage[es] \starttext \en\startlua if tex.modes['*en'] then

Re: [NTG-context] Modes in Lua

2017-05-31 Thread Pablo Rodriguez
On 05/31/2017 11:03 AM, MF wrote: > if tex.modes['specialmode'] then > context('I’m special.') > end > > Best greetings, > Massi > >> Hi, this should be easy: >> >> How can I access ConTeXt’s modes in Lua? Is it any different with >> language modes (*en)? This is the way to detect system

Re: [NTG-context] Modes in Lua

2017-05-31 Thread MF
if tex.modes['specialmode'] then context('I’m special.') end   Best greetings, Massi > Hi, this should be easy: > > How can I access ConTeXt’s modes in Lua? Is it any different with > language modes (*en)? > > e.g. > > \startluacode > > if context.modes['specialmode'] then >

[NTG-context] Modes in Lua

2017-05-31 Thread Henning Hraban Ramm
Hi, this should be easy: How can I access ConTeXt’s modes in Lua? Is it any different with language modes (*en)? e.g. \startluacode if context.modes['specialmode'] then context('I’m special.') end \stopluacode Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG