Re: [NTG-context] Equivalent of os.resultof(...) in LaTeX

2014-11-07 Thread Xan
luatex --shell-escape file
will work.

It works Thanks
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Equivalent of os.resultof(...) in LaTeX

2014-11-06 Thread Xan
 That is not a useful error description ...
 
 Herbert

More clear than this?

 Neither this:
 
  \directlua{
   require lualibs-os
   tex.sprint(os.resultof(sha256sum \jobname.tex | cut -c  -5))
  }
 
 
 Blank. Nothing displayed.
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Equivalent of os.resultof(...) in LaTeX

2014-11-06 Thread Herbert Voss
Am 06.11.2014 um 15:51 schrieb Xan:
 That is not a useful error description ...

 Herbert
 
 More clear than this?
 
  Neither this:
  
   \directlua{
require lualibs-os
tex.sprint(os.resultof(sha256sum \jobname.tex | cut -c  -5))
   }
  
  
  Blank. Nothing displayed.


 \directlua{
   require lualibs-os
   tex.sprint(os.resultof(sha256sum \jobname.tex))
 }
\bye

luatex --shell-escape file
will work.

Herbert
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Equivalent of os.resultof(...) in LaTeX

2014-11-04 Thread Herbert Voss
Am 04.11.2014 um 08:55 schrieb Xan:
 Xan dxpubl...@telefonica.net ha escrit:
 
 It does not work:

That is not a useful error description ...

Herbert



 \documentclass{article}
 \begin{document}
 \directlua{
  local handle = io.popen(sha256sum \jobname.tex | cut -c -5,r)
  if handle then
local result = handle:read(*all) or 
handle:close()
tex.print(result)
  end
 }
 \end{document}

 Neither this:

 \directlua{
  require lualibs-os
  tex.sprint(os.resultof(sha256sum \jobname.tex | cut -c  -5))
 }


 Blank. Nothing displayed.
 ___
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Equivalent of os.resultof(...) in LaTeX

2014-11-03 Thread Xan
Hi,

Just short question: what's the equivalent in latex of 
\ctxlua{context(os.resultof(sha256sum \jobname.conTeXt | cut -c  -5))}

?

Thanks in advance,
Xan
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Equivalent of os.resultof(...) in LaTeX

2014-11-03 Thread Herbert Voss
Am 03.11.2014 um 12:42 schrieb Xan:

 Just short question: what's the equivalent in latex of 
 \ctxlua{context(os.resultof(sha256sum \jobname.conTeXt | cut -c  -5))}

\documentclass{article}
\begin{document}
\directlua{
 local handle = io.popen(sha256sum \jobname.tex | cut -c -5,r)
 if handle then
   local result = handle:read(*all) or 
   handle:close()
   tex.print(result)
 end
}
\end{document}


or load l-os.lua, then the command os.resultof is available.

Herbert

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Equivalent of os.resultof(...) in LaTeX

2014-11-03 Thread Xan
On Mon, 3 Nov 2014 14:31:17 +0100
Xan dxpubl...@telefonica.net ha escrit:

 It does not work: \documentclass{article}
  \begin{document}
  \directlua{
   local handle = io.popen(sha256sum \jobname.tex | cut -c -5,r)
   if handle then
 local result = handle:read(*all) or 
 handle:close()
 tex.print(result)
   end
  }
  \end{document}
 
 Neither this:
 
  \directlua{
   require lualibs-os
   tex.sprint(os.resultof(sha256sum \jobname.tex | cut -c  -5))
  }
 
 
 Blank. Nothing displayed.
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___