Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2011, 10:42 PM   #1
excalibra
Member
excalibra began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
word macro for editing needless paragraph marks

I am not sure whether I am posting the thread in the right forum part, as this is my first thread.

I need a macro for word 2007 to change paragraphs that doesn't have a dot,comma,question mark,exclamation mark or quote sign at the end but ended with a paragraph mark and replace them with a space to get a correct text flow. I used Stingo's macro but it changes all text&paragraph flow, I want the text format stay the same but only to change the wrong looking sentences after conversion from pdf to word.

Any help with this subject or similar macros for fixing related paragraph problems will be highly appreciated
excalibra is offline   Reply With Quote
Old 03-11-2011, 10:57 PM   #2
Hoyt Clagwell
Addict
Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.Hoyt Clagwell ought to be getting tired of karma fortunes by now.
 
Hoyt Clagwell's Avatar
 
Posts: 285
Karma: 5606697
Join Date: Mar 2011
Device: The blue one next to the fish.
Perhaps there is something in BookCreator that can help you.

http://www.mobileread.com/forums/showthread.php?t=28313
Hoyt Clagwell is offline   Reply With Quote
 
Enthusiast
Old 03-12-2011, 04:04 AM   #3
comtrjl
Connoisseur
comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.
 
Posts: 75
Karma: 204999
Join Date: Aug 2006
Location: London
Hi excalibra.

If your text has got 2 consecutive paragraph marks to indicate a new paragraph but here and there a single one where it shouldn't be, then you could do this with search and replace.
First, search for ^p^p and replace them with ###
Second, search for ^p and replace with a single space character
Third, search for ### and replace with ^p^p
All this is doing is preserving the paragraph breaks and then replacing the unwanted single returns with a space, then putting the paragraph breaks back.
Please post back if I've misunderstood.

bob
comtrjl is offline   Reply With Quote
Old 03-12-2011, 08:20 AM   #4
excalibra
Member
excalibra began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
Thanks for the answers.

Hoyt Clagwell:
I think what I need is an improved version of Bookcreator's word wrap fix selection, I can do the corrections for extra paragraphs with that word wrap fix selection but it takes too much time to do one by one and other word wrap options; Stingo's and word wrap preserve styles change the format completely.

comtrjl:
Thanks for your help, I think you misunderstood, because I couldn't find any double paragraph marks(^p^p) in the text I want to edit, actually I want to remove paragraph breaks which are not pointing paragraphs, i.e. a word not having a dot,question mark,etc. at the end but having a paragraph mark,for example the text looks like this
Quote:
If your text has got 2 consecutive paragraph marks to ^p
indicate a new paragraph but here and there a single ^p
one where it shouldn't be, ^p
then you could do this with search and replace.^p
excalibra is offline   Reply With Quote
Old 03-12-2011, 09:23 AM   #5
derangedhermit
Addict
derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.
 
Posts: 233
Karma: 1262174
Join Date: Oct 2010
Location: USA
Device: None
First cover the case where there may be a space (or two or three) between the ending punctuation and the ^p: change [space]^p to ^p globally and repeat a few times. Then change .^p to .... globally. Repeat for each mark: !>!!!!, etc.

Now change all ^p to space or newline, as you need. Now change all !!!! etc back to !^p. Scan text to proof.
derangedhermit is offline   Reply With Quote
Old 03-12-2011, 10:05 AM   #6
excalibra
Member
excalibra began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
Quote:
Originally Posted by derangedhermit View Post
First cover the case where there may be a space (or two or three) between the ending punctuation and the ^p: change [space]^p to ^p globally and repeat a few times. Then change .^p to .... globally. Repeat for each mark: !>!!!!, etc.

Now change all ^p to space or newline, as you need. Now change all !!!! etc back to !^p. Scan text to proof.
Although I couldn't understand what I did, these fixed most of the text except sentences ending with !" . Is there a macro for the same purpose?

The main problem is the text I am editing is in a different language than my office installation so I can't use grammar check in proofing tools, but as long as I reviewed the text I couldn't see any errors other than ! problem.

As you seem like an expert in wildcards, can you please write how can I remove the page numbers that had mixed with the sentences?
excalibra is offline   Reply With Quote
Old 03-12-2011, 10:35 AM   #7
derangedhermit
Addict
derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.derangedhermit ought to be getting tired of karma fortunes by now.
 
Posts: 233
Karma: 1262174
Join Date: Oct 2010
Location: USA
Device: None
Quote:
Originally Posted by excalibra View Post
Although I couldn't understand what I did, these fixed most of the text except sentences ending with !" .
changing "<p> to """" first, same as the other punctuation marks, would have fixed that too.

Quote:
Originally Posted by excalibra View Post
Is there a macro for the same purpose?

The main problem is the text I am editing is in a different language than my office installation so I can't use grammar check in proofing tools, but as long as I reviewed the text I couldn't see any errors other than ! problem.

As you seem like an expert in wildcards, can you please write how can I remove the page numbers that had mixed with the sentences?
macro: At least in LibreOffice, turn "record macro on", do your editing thing, turn record macro off and name it.

No expert, someone will post a 12 character regex that will do it all.

For the page thing, if the page numbers are like "Page x", "Page xx", "Page xxx", you can try find and replace. Turn on regex (click the box) and change " Page [0-9]" to "" (nothing, don't enter the quotes). Repeat with " Page [0-9][0-9]" and "Page [0-9][0-9][0-9]."

If you tell Word what language the document is in, or set that language as the default, both the spellchecker and grammar tools should start working.

I'm doing this from memory, I haven't used Word in a few years.
derangedhermit is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Macro: Footnotes to inline text ? Hadrien Workshop 17 10-08-2011 01:28 PM
Doc Splitter-Macro or Add-in For Word 2003 konrad Workshop 0 03-08-2011 03:43 PM
Justified word paragraph not wrapping in mobi wlloydw Conversion 0 03-05-2011 03:03 PM
Doc to REB Macro for Word kbirdz Fictionwise eBookwise 0 10-27-2010 10:30 PM
Word Formatting Macro (Stingo's Macro) Stingo Sony Reader 75 08-24-2010 05:18 AM


All times are GMT -4. The time now is 01:08 PM.


MobileRead.com is a privately owned, operated and funded community.