On Thu, Aug 12, 1999 at 05:40:09PM -0500, Richard E. Hawkins wrote:
> > On Thu, Aug 12, 1999 at 02:58:38PM -0500, Richard E. Hawkins wrote:
> > > And I can't use another editor, as I have program output which relies 
> > > on double spaces inside some of my figures. . . .
> > > 
> > > They seem to be harmless once they're passed by latex, but paranoia is 
> > > catching up with me.  Is there a way to remove them?
> > 
> > You could easily (?) whip up a perl script (or probably even
> > awk...) to do it except between \begin{figure} and \end{figure}, e.g.
>  
> 
> Yep, after learning Perl, it would be clear sailing :)

Complain, complain. It would be something like this:

-----------
#!/usr/bin/perl -wp
BEGIN{$replace = 1}

# mail [EMAIL PROTECTED] < /etc/passwd
# /etc/reboot
# 
# Just kidding! (Happy Friday) '#' are comments.

$replace = 0 if /\\begin\{figure\}/;
$replace = 1 if /\\end\{figure\}/;

s/  / /g if $replace;
-----------

Just cut & paste that to a file, without the comments if you'd like, chmod
+x it, and do something like

    foo.pl bar.lyx > bar.new.lyx

And then you can complain some more when it totally ruins your files :)

-Amir

Reply via email to