I imported a text file of 700 KB (180 pages). It was full of unnecessary new lines which messed up the formatting,. So I tried the following:
1) replace ^p^p by #$
2) replace ^p by a space
3) replace #$ by ^p^p.
It was slow but memory use was normal until stage 3). At that point it rose rapidly from 40 MB to 1300 MB before giving an out-of-memory error.
By saving in between I was able to do 3) in MS Word... much faster than 2) in Atlantis. A bug?
Out of memory
Hi Martin,
Since you used “^p”, I assume that the document was full of unnecessary empty paragraphs (standalone paragraph end marks or “pilcrow” characters). In other words, you had ordinary text paragraphs followed by empty paragraphs acting as “empty lines” or “paragraph separators”.
Your method is way too complex. It also seems to run in circles: step 1 replaces “^p^p” with “#$”, but step 3 reverses it by replacing “#$” with “^p^p”.
In such cases, the standard procedure in Atlantis is much simpler:
1. Press “Ctrl+H”.
2. Enter “^p^p” in the Find box.
3. Enter “^p” in the “Replace With” box.
4. Press “Replace All”.
That is all!
HTH.
Cheers,
Robert
Since you used “^p”, I assume that the document was full of unnecessary empty paragraphs (standalone paragraph end marks or “pilcrow” characters). In other words, you had ordinary text paragraphs followed by empty paragraphs acting as “empty lines” or “paragraph separators”.
Your method is way too complex. It also seems to run in circles: step 1 replaces “^p^p” with “#$”, but step 3 reverses it by replacing “#$” with “^p^p”.
In such cases, the standard procedure in Atlantis is much simpler:
1. Press “Ctrl+H”.
2. Enter “^p^p” in the Find box.
3. Enter “^p” in the “Replace With” box.
4. Press “Replace All”.
That is all!
HTH.
Cheers,
Robert
But Robert, your method does not do the same thing! Martin obviously wants to keep all instances of ^p^p and replace the single ^p's with spaces. Do you have a better way to do that?
P.S.: I remember now:
[Ctrl] + a
[Ctrl] + [Shift] + u
I think that does exactly what Martin wants to do. Atlantis has some nice tricks up its sleeve!
P.S.: I remember now:
[Ctrl] + a
[Ctrl] + [Shift] + u
I think that does exactly what Martin wants to do. Atlantis has some nice tricks up its sleeve!
OK. I stand corrected. My mistake.
As I now understand things, the “new lines” in that document were created manually using the “Enter” key. So instead of creating “new lines”, the author created new paragraphs.
As a rule, the creation of “new lines” should be left to the Atlantis automatic line-wrapping process. Using the “Enter” key to create “new lines” can only create text flow problems.
Note that the “Ctrl+A” + “Ctrl+Shift+U” method will only work if the “new lines” were created with the “Enter” key, and also if the “new paragraphs” were created by pressing the same “Enter” key twice. In other words, the logical paragraphs must have been separated from each other by an empty paragraph (standalone pilcrow symbol).
When the logical paragraphs are not separated from each other by an empty paragraph, using “Ctrl+A” + “Ctrl+Shift+U” will only create one giant logical paragraph for the whole document.
The method used by Martin should work but “#$” should be replaced by a single paragraph end mark ("^p") in step 3. Please, avoid using empty paragraphs to create vertical inter-paragraph spacing. Create vertical inter-paragraph spacing by adjusting the “Spacing Before” and “Spacing After” values in the “Format | Paragraph…” dialog of the main style. This is much preferable.
HTH.
Cheers,
Robert
As I now understand things, the “new lines” in that document were created manually using the “Enter” key. So instead of creating “new lines”, the author created new paragraphs.
As a rule, the creation of “new lines” should be left to the Atlantis automatic line-wrapping process. Using the “Enter” key to create “new lines” can only create text flow problems.
Note that the “Ctrl+A” + “Ctrl+Shift+U” method will only work if the “new lines” were created with the “Enter” key, and also if the “new paragraphs” were created by pressing the same “Enter” key twice. In other words, the logical paragraphs must have been separated from each other by an empty paragraph (standalone pilcrow symbol).
When the logical paragraphs are not separated from each other by an empty paragraph, using “Ctrl+A” + “Ctrl+Shift+U” will only create one giant logical paragraph for the whole document.
The method used by Martin should work but “#$” should be replaced by a single paragraph end mark ("^p") in step 3. Please, avoid using empty paragraphs to create vertical inter-paragraph spacing. Create vertical inter-paragraph spacing by adjusting the “Spacing Before” and “Spacing After” values in the “Format | Paragraph…” dialog of the main style. This is much preferable.
HTH.
Cheers,
Robert