Op zondag 11 november 2001 02:02, schreef Will Fischer:
> perl -pe 'if (/\\begin_inset Info/../\\end_inset/ ){ s/inset Info/float
> margin/; s/end_inset/end_float/;}' FILE > NEWFILE
>
> (mind the wrap --- that should all be one line)
>
> Warning -- I haven't tried this -- but it SHOULD work.

BINGO! Well..., almost. After a little tweaking I got:

perl -pe 'if (/\\begin_inset Info/../\\end_inset/ ){ s/inset Info/float 
margin\n\\layout Standard\n/;s/end_inset/end_float/;}' thesis.lyx > qwer.lyx

(still: mind the wrap)

This worked. Well..., almost. As it turned out I had several notes within a 
chapter or section definition. And LaTeX was not too happy about that.

So, I will now go to sleep happy, and will move all notes within a chapter or 
section to the next line within LyX tomorrow. :-) After that the great 
one-liner above will do the job for me.

As for the perl script posted by Kayvan: I have not tried it, but it looks to 
me it does something like the one-liner above.

Thanks all!

Egbert (who still thinks this should be incorporated within LyX :-) )

Reply via email to