On Wed, 16 Feb 2005 14:43:04 -0500, David Teague
<[EMAIL PROTECTED]> wrote:

> David Welton wrote:
> 
> > [ need to remove empty paragraphs from portions of code and text]
> 
> Daniel suggested
> 
> Try the macro from:
> http://www.oooforum.org/forum/viewtopic.phtml?t=6429&highlight=
> It works great for cleaning up imported ascii text.

Looks good if a bit complex.... I just whacked out a Tcl script (the
book is about Tcl after all:-) that does more or less the same thing.

> This will munge code if you select it and apply this. I hope that is
> why Daniel suggested  the macro.
> 
> My solution does not automatically recognize code segments. If
> you have code intersperced with text, you select the text and apply.
> With this, you do the task in pieces,

> To setup:
> In the Tools menu, click Auto-Correct, there click the Options tab,
> in the (what do you call it? dialog) you have several check boxes.
> Toward the bottom find and check "remove blank paragraphs."
> 
> To do the job:
> Then select the just the text you from which you want to remove
> blank paragraphs, the go to the Format menu, click auto-format,
> and click apply.

Doesn't seem to work quite right...so I went with the script.
 
I have one more problem now, though.  I want to transform paragraphs
into 'returns' (what you get when you do shift-enter.  I'm not having
a lot of success finding and replacing, though.  The $ regexp finds
the end of a paragraph just find, but I don't know what to replace it
with. \n just puts in another paragraph.  \r doesn't do anything. 
That dialog box doesn't let you input shift-return.  Hints
appreciated.

Thanks,
-- 
David N. Welton
 - http://www.dedasys.com/davidw/

Apache, Linux, Tcl Consulting
 - http://www.dedasys.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to