Delete all paragraph symbols within a paragraph but not at the end of it

Everything related to our flagship word processor.
Post Reply
CrisRich58
Posts: 4
Joined: 2019-09-13 07:57:24

Delete all paragraph symbols within a paragraph but not at the end of it

Post by CrisRich58 » 2019-09-13 08:26:12

Hello, when I import files from ocr'd documents they usually come with a paragraph mark after each line (possibly to keep the original looks of the document). I would like to delete all the paragraph marks after the lines within a paragraph, but not the one at the end of the paragraph. Is there a way to do this with Nisus Writer Pro? Maybe with a macro?

I already use the "Remove Line Breaks" menu command but for this I have to first manually mark all the lines in each paragraph before applying it. That's a lot of manual work.

Very often the imported texts have two paragraph marks one after the other at the end of each paragraph (end of paragraph and the next line empty of text). This would be a way to tell a macro the difference between end of line and end of paragraph. But, how to code this?

adryan
Posts: 301
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Delete all paragraph symbols within a paragraph but not at the end of it

Post by adryan » 2019-09-13 21:16:05

G'day, CrisRich58 et al

I created a NWP document with the characteristics you describe, selected all the relevant text (lines) as one slab, then applied the Remove Line Breaks command. It worked fine for me.

For reference, see P. 659 of the Nisus Writer Pro User Guide.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Mojave 10.14.6
Nisus Writer user since 1996

adryan
Posts: 301
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Delete all paragraph symbols within a paragraph but not at the end of it

Post by adryan » 2019-09-13 21:37:37

G'day, CrisRich58 et al

Reading between the lines, as it were, I wonder whether you were selecting your lines without selecting the unwanted paragraph returns at the ends of them, before invoking the Remove Line Breaks command. Selecting everything as one continuous slab of text should feed the command something it can sink its teeth into.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Mojave 10.14.6
Nisus Writer user since 1996

CrisRich58
Posts: 4
Joined: 2019-09-13 07:57:24

Re: Delete all paragraph symbols within a paragraph but not at the end of it

Post by CrisRich58 » 2019-09-14 08:03:58

Hello Adrian, thank you for your reply.

I checked it out again and saw that you are right. What perhaps confused me first is that the command deletes one of the two paragraph marks at the end of the paragraph and so the additional line between them vanishes and the whole text is compressed. I saw that better only after I had switched on "Show Invisibles". Without that it looks like all paragraph marks have been deleted if one doesn't look carefully.

I was using the macro "Make Paragraphs" from TextSoap 8 through "Services" and this macro leaves the two paragraph marks at the end. So, visually this seemed to be working correctly and the Scrivener command was not.

Anyway, thanks again. It helped me find out how the command works. Now I will adapt to that :)

Best regards,
Cristiano

Post Reply