Abdelrazak Younes wrote:
> Burak Arslan wrote:
>> hi,
>> i used to use makefiles for compiling tex files into pdf. before invoking 
>> pdflatex et al, those makefiles incorporated various information from its 
>> context like current svn revision number, user who invokes the operation 
>> etc. i did this by writing the output of the command (e.g. whoami > user) 
>> to a file, then \input'ting it where necessary.
>> is there any way to duplicate this behaviour using lyx?
>> if not, you may find below a bunch of ideas to accomplish this:
>> 1) add a "run make" button, for us hacker-folk :)
>> 2) add a "svn revision" field in the insert menu. ( i'm sorry if it's 
>> already in the 1.6.x series which reportedly has svn support. )
>> 3) add a "custom field" feature, that'll let me run some shell commands, 
>> and embed the output into the latex file. they're to be run everytime the 
>> pdf/ps/etc. are generated.
>>   3.1) embedding such custom fields in lyx files would certainly be 
>> awesome, but it sounds like a security nightmare.
>
> You might be able to use the external inset for this purpose. I believe 
> this should be working in 1.4 and 1.5 too. Look at lib/external_templates 
> for a number of examples.

i think it would be very easy to just reproduce the way external material for
date is currently done. just use your own script which will runs svn log
and outputs info you need. note that maybe cache have to be disabled
i remember some bug that our cache managment stores output of 'date' script...

you can put such template/script into our wiki, but i dont think this can
be part of default lyx install because of security reasons as you noted.
for the very same reason we havent included gnuplot support for which we already
have template and code...

pavel

Reply via email to