On Jul 28, 2010, at 1:05 PM, Will Robertson wrote:

> On 2010-07-27 00:07:02 +0930, Florian Gilcher <f...@andersground.net> said:
> 
>> I really like the following feature of pdftex and others for development 
>> purposes:
>>  \input{|"darcs changes -s"} % print a detailed log of changes
>> and include that into my document as a "running log" for other reviewers.
>> Sure, it requires --shell-escape and --enable-write18, but thats just fine 
>> in my environment.
> 
> Actually I think this is a MiKTeX-only feature of pdfTeX (or it was last time 
> I checked). Is there a significant problem to doing this?:
> 
>   \immediate\write18{darcs changes -s > tmp.txt}
>   \input{tmp.txt}
> 
> Wrap it up in a macro and it's no less convenient than using the pipe, right?
> 
> Will

Actually, pdftex in both texlive 2009 and 2010 supports it. 

The difference between MiKTeX and texlive is that MiKTeX has a special CLI flag 
for it (--enable-pipes) while pdftex on texlive checks for (--shell-escape). 

A did a little digging yesterday night and it seems like about the only reason 
XeTeX does not support this is because of a preprocessor macro checking for 
pdftex in texmfmp.c and texmfmp.h (all involving open_in_or_pipe and 
open_out_or_pipe):

  http://scripts.sil.org/svn-public/xetex/TRUNK/texk/web2c/lib/texmfmp.c
  http://scripts.sil.org/svn-public/xetex/TRUNK/texk/web2c/texmfmp.h

Now, I would try my theory if i could just get XeTeX (or, more specifically, 
the bundled ICU) to build from sources on Snow Leopard...

Well: the problem with \write18: it is not quite the same (for example, i 
cannot write to a pipe [1]), it clutters the file system and I cannot read from 
any arbitrary source. Sure, thats a convenience problem, but considering that 
the functionality is there and "the other pdf generating tex" supports it, it 
would be nice if xetex had it too.

Regards,
Florian

[1] not that I know any case where that would be needed...




--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex

Reply via email to