On 10/7/20 4:45 PM, context@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 kept getting "C://Users//username//Desktop//document.pdf" and similar ones). Many thanks for your help, Pablo
On 2020-10-07 16:23, context@vivaldi.net wrote:
Hello Pablo,
sometimes I do something hacky like the following in similar situations (not tested now):
---- .bat call lua.exe -e "os.execute('echo context --purgeall --arguments=PDFdocument=' .. ([[%1]]):gsub([[\]], '/') .. ' b.tex')" ----
Best regards,
Lukas
On 2020-10-06 16:18, Pablo Rodriguez wrote:
Dear list,
I have a minimal sample file:
\starttext \insertpages[\env{PDFdocument}] \stoptext
I invoke it in Windows, using the following batch file:
@echo off REM ~ context --purgeall --arguments="PDFdocument=%1" b.tex
I’m afraid it only works if the batch file and the PDF document are on the same directory.
I guess this is related to "\" in Windows paths. Is there a way to make it work with the sample above?
Many thanks for your help,
Pablo -- http://www.ousia.tk