Tuesday, April 20, 2010

Automatic text wrapping

There is one thing which all word processors do, and which is as natural for word processors to do as it is natural for rivers to flow. It is automatic text wrapping. What does this mean? "Automatic" means that you don't have to worry about it, word processors do it automatically for you. "Text wrapping" means that all newly typed text is carried over to the next paragraph line as soon as that text becomes too long to fit the screen. As a general rule, the maximal width allowed for a paragraph line is limited by the width and margins of the current page. When new text cannot be added to a line because it would exceed the boundary set for the lines of the current paragraph, word processors automatically wrap the text around. It isn't actually the case, but things then look as if line breaks had been inserted to wrap text around:

In the above picture, these virtual line breaks have been marked with red arrows. We say "virtual" because word processors do not automatically insert hard-coded line breaks in documents. "Virtual" or automatic line breaks terminating paragraph lines are dynamic: they are used only temporarily to lay the text out in the document window, or on the pages sent to the printer. When you edit a paragraph and add or remove words, word processors automatically create new automatic line breaks allowing the paragraph text to nicely reflow from one paragraph line over to the next line. Note that these ad hoc automatic line breaks are never saved to the document files. The paragraphs of saved documents only contain a continuous flow of text. But line breaks are automatically created again when you open a document.

Even though most of us do not even notice it, this is how all word processors work, including Atlantis.

Now there are cases when you might want such automatic line breaks to be saved to the document files. The most typical case is when you save a document as a plain text file. When plain text files are viewed in plain text editors, their paragraphs are either displayed as one continuous unbroken line, or wrapped around at window edge or after a set column value. But in any case the resulting layout would most likely be different from the one found in Atlantis: the line breaks would be inserted in different places.

If it is important to you to have the same line breaks in plain text editors as you get in Atlantis, you need to place actual hard-coded breaks at the end of each line in the original document in Atlantis. Here is how this can be done:

1. Open the target document in Atlantis, and select the fragment of document (one or multiple paragraphs) whose automatic line breaks you want to replace with hard-coded breaks.

2. Click the "Split paragraphs" toolbar button, or press the Ctrl+Shift+K,U hot key. Atlantis will automatically place paragraph end marks at the end of each paragraph line within the document selection. Note that paragraph end marks are visible only when the "View | Special Symbols" mode is on:

If you then save your document as a plain text file, and open it in a plain text editor like Notepad, you will get the same text wrapping (line breaks) as you had in the original source document in Atlantis:

Note that the "Split paragraphs" toolbar button is by default available through the Alternative toolbars in Atlantis. You might need to press Ctrl key twice to access this toolbar button.

Also a note regarding the Ctrl+Shift+K,U hot key. It is a so called compound hot key in Atlantis. Compound hot keys are 4-steps hot keys. You must:

1. Hold the Ctrl and Shift keys pressed,
2. Press and release the K key,
3. Press and release the U key,
4. Finally release the Ctrl and Shift keys.

You will find more information on compound hot keys in the corresponding topic of the Atlantis Word Processor Help.

No comments: