[NTG-context] playing with Windows drag & drop

context at vivaldi.net context at vivaldi.net
Thu Oct 8 09:56:45 CEST 2020


Hello Pablo,

On 2020-10-07 19:10, Pablo Rodriguez wrote:
> On 10/7/20 4:45 PM, context at vivaldi.net wrote:
>> Hello Pablo,
>> 
>> slight correction:
>> 
>> ---- .bat
>> call lua.exe -e "os.execute('echo context --purgeall
>> --arguments=PDFdocument=' .. ([[%1]]):gsub([[\]], '/') .. ' b.tex')"
>> ----
> 
> Many thanks for your reply, Lukas.
> 
> I found another workaround at the ConTeXt file (b.tex).
> 
>   \cldcontext{string.gsub([[\env{PDFdocument}]], "\\\\", "/")}
> 
> I don’t know why I needed to add "\\\\" instead of "\\". (otherwise, I

I guess that's as Ctx translates "\\" into "\", and you need to have 
"\\" in Lua code.

You could alse write (not tested):

   \cldcontext{string.gsub([[\env{PDFdocument}]], [[\\]], "/")}

Best,

Lukas

> kept getting "C://Users//username//Desktop//document.pdf" and similar 
> ones).
> 
> Many thanks for your help,
> 
> Pablo


More information about the ntg-context mailing list