Right then, I had a 35 page Word document* which had many paragraphs each separated by four lines of white space (the equivalent of 'enter' having been pressed four times). One line suffices so I sought to find out how to quickly Find / Replace (Ctrl+H) the three extra linespaces with nothing (or I could have replaced four linespaces with one linespace).
@dianthusmed had the answer to my question
Word: document has 3 or 4 linespaces between paras - quick way of making it one line? Tried / failed Ctrl+H and variants of ^p / ^13
— Jo Brodie (@JoBrodie) May 24, 2012
@JoBrodie If they're line breaks rather than paragraph marks, you need ^l in the replace box, not ^pIt works: ^l^l^l is the string to select three linespaces. The ^ is called a caret.
— Dianthus Medical (@dianthusmed) May 24, 2012
1. Press Ctrl+H to bring up the Find and Replace menu
2. Type ^l (SHIFT 6 on full-size keyboard and the letter L) three times into the 'Find what' dialogue box, leave the 'Replace with' box blank
3. Click the Find Next button to make sure it's selecting correctly and then Replace to replace - once you're satisfied that all is well click the 'Replace All' and smile as your 35-page document trims itself to 23 pages.
Thanks also to @zeno001 who offered suggestions too and this is also a useful read "Special characters you can use with Find and Replace in Word"
*Technically it's a LaTeX document that I'm viewing in Word. Ironically I can't compile the 'tex doc into a pretty thing to read because there are other files (bibliographies) embedded into the doc that it needs to run and I don't have access to them. So this was my workaround, but I like saving paper when printing.
While deleting all occurrences of three line break characters would work well on a consistently formatted document it will miss any 2 consecutive line breaks. Worse still, when only 3 breaks occur it will delete them all causing two lines to be concatenated.
ReplyDeleteA more general solution, for less well behaved documents, would be to replace 2 breaks with 1 and then repeat until no more replacements occur.
This also works with any other repeated character that needs reducing to singular occurrences. I regularly use this to remove excess spaces from text that has been justified using them. You might also want to replace tab characters with spaces first before reducing their number.
Ooh, good point! Ta :)
ReplyDeleteI just used this again to make a note of all the tweets sent by and to @chi_med (work account). There are sufficiently few that it's worth copying and pasting them, first into notepad to get rid of all the pictures and formatting - I'd not recommend pasting them straight into Word as there's a lot of other stuff that comes with each tweet - and then paste the 'lite' version into Word. At that point there are massive paragraph breaks (in blocks of eight, so I replaced ^p^p^p^p^p^p^p^p with ^p (that's [Shift+6] and the letter p, on a PC keyboard, shift6 is the caret symbol) and that worked to reduce 55 pages to 39, after which it got a bit more manual.
ReplyDeleteI also managed to get rid of blocks of three paragraph breaks which had an extra character in. Using ^p^s^p^p didn't work (where ^s = space) but I found you can use ^? for 'any character' so ^p^?^p^p worked.
ReplyDeleteI knew where to put the ^? because I clicked on that backwards P icon on Word which shows you all the spaces/linebreaks / parabreaks - it's called a pilcrow ¶ (written with Alt+0182 using the numeric keypad).
Now down at 13 pages :)