I (Marck) am posting this on behalf of Alexander V. Kiselev
<[EMAIL PROTECTED]> who has unfortunately been unable to get any
mail posted to the list since the server problems earlier this week,
although he is still receiving list traffic. Those of you familiar
with his contributions to date will understand how frustrated he must
feel :-(.
---
Hello all.
Let's clarify things a bit. Here goes explanation of the author of
another Delphi-based ASCII editor (WinEdt), Alex Simonic.
Maybe it will help both the RIT labs programmers and the
audience here to understand, what can be done with auto-
formatting. Of course, considering e-mail application like TB,
necessary changes are to be made, but the overall concept
proved to be almost excellent (this is based on my own
experience with the program named above and on the opinion
expressed on the WinEdt mailing list). Okay, he we go:-))
*
WinEdt supports line wrapping and paragraph wrapping. Line
wrapping is enabled or disabled through the appropriate option
in the Document Settings Dialog. Line wrapping applies only if
your caret is over the right margin (as specified in
Preferences| Editor Dialog) and you are positioned at the end
of line. In such a case WinEdt goes back to the first space and
simulates a line break. A more interesting concept is
Paragraph wrapping, which is particularly useful when you are
making additions/ changes to the sentence in the middle of a
paragraph. However, the ASCII "concept" of a paragraph is not
very well defined: lines are the basic components of ASCII
files.
WinEdt implements a wrapping strategy that is particularly
suitable for writing TeX documents. Paragraphs are normally
separated by empty lines. Lines that contain a Comment (as
specified and enabled in Settings| Miscellaneous Dialog) are
not formatted and also serve as paragraph separators.
Furthermore, in the Settings Dialog you can specify so called
"paragraph breaks" and "exceptions." If a line starts with any of
the strings specified as paragraph breaks then such a line is
considered a paragraph break unless it also matches a string
specified as an exception to the rule.
This allows two strategies for setting up paragraph breaks: you
can either list all the strings that should serve as paragraph
breaks. For example, the default settings specify:
\begin
\end
[the rest of the list skipped...]
Alternatively, some users might prefer disabling the formatting
of all lines starting with "\" and then simply enter the exceptions
such as "\cite"... After some dynamic adjustments this
approach will yield the required result as well - you can enter
the exceptions as you encounter them during your work.
In Document Settings Dialog you can also specify whether or
not indented lines should be subject to formatting.
If you don't like the Wrapping feature you can disable it (eg. by
clicking the appropriate Status Line Panel). You can still
manually format a paragraph through the "Edit| Format| Format
Paragraph" Command (by default it is associated with the
(shortcut) Insert Key). This is more emacs-like behaviour...
Auto wrapping is always disabled when you are in a Block
Selection mode. If you select a portion of text and then call
Format Paragraph command you can also specify the left and
right margins for this paragraph by simply making the
appropriate (left/right) block selection. Try it!
WinEdt also supports "Soft" file format. This is the format used
by many word processors and unconventional editors, in which
paragraphs are separated by line terminators while lines are
dynamically wrapped. If you open a file in "Soft" Mode WinEdt
will display it properly. However, this "Soft" Mode is not
WinEdt's native mode (WinEdt is primarily an ASCII editor)
and the performance might not be as good as for ASCII files.
Please note that while you might find wrapping in "Soft" mode
more intuitive (especially if your experience is with WYSIWYG
word processors) such files might no longer be transferable as
ASCII files.
*
Okay, my apologies for this rather long explanation... Please
consider this. This is what I call "well-thought" implementation:-)
IMHO, of course.
P.S. There exists a technical explanation of the implementation
described above, too. It might be of some help to The Bat!
programmers. If they (or anybody else) needs it, I can post it
off-the-list, too. Or else everybody interested can just download
WinEdt from www.winedt.com and see, how it works. I'm using
it all the time (instead of Word, too) and am entirely satisfied
with its functionality. BTW, I have no connection to the WinEdt
project other then admiring user
SY, Alex
--
Alexander V. Kiselev, St.Petersburg, Russia
---
Thought for the day:
Walk through doors, don't crawl through Windows.