aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Goldowsky1994-10-24 14:19:37 +0000
committerBoris Goldowsky1994-10-24 14:19:37 +0000
commit591d257e04b9bdf20b594e9282dd0171691eedda (patch)
tree17d21523cf213bfb233af290899d867b3cfd1ae1
parent2db6c9ecda59dc0cdd3a1fda6618c100c6b15ff2 (diff)
downloademacs-591d257e04b9bdf20b594e9282dd0171691eedda.tar.gz
emacs-591d257e04b9bdf20b594e9282dd0171691eedda.zip
Initial revision
-rw-r--r--etc/enriched.doc331
1 files changed, 331 insertions, 0 deletions
diff --git a/etc/enriched.doc b/etc/enriched.doc
new file mode 100644
index 00000000000..afd1df88436
--- /dev/null
+++ b/etc/enriched.doc
@@ -0,0 +1,331 @@
1<param>-*-enriched-*-width:86
2</param><center><bold><x-bg-color><param>gray</param><x-color><param>blue</param>Enriched:
3
4A WYSIWYG enriched-text editing environment for GNU Emacs
5
6
7</x-color></x-bg-color></bold></center><bold>INTRODUCTION
8
9
10</bold><indent>This package, along with the <bold>facemenu</bold> package, is the beginning of a WYSIWYG
11("what you see is what you get") Emacs mode for editing <italic>enriched text: </italic>text with
12different faces, colors, etc. Facemenu allows you to add faces (such as
13<bold>boldface</bold>, <italic>italics</italic>, and <underline>underlining</underline>) your documents, while <bold>enriched</bold> allows you to
14save the documents with those "text properties" included. The format in which
15they are saved is called <italic>text/enriched</italic>, and is defined as part of the MIME
16standard, so that your documents are transportable (even through email) to many
17other systems.
18
19
20Not all systems will be able to recreate all of the features of your document,
21but they will get as close as possible. For systems that do not understand it at
22all, the text of the document should still be legible; the reader can simply
23ignore the annotations specifying face changes and the like.
24
25
26</indent><bold>INSTALLATION and STARTUP </bold>
27
28
29<indent>The <fixed>enriched.el</fixed> file should be installed somewhere that emacs will find it (ie,
30one of the directories on emacs's <fixed>load-path </fixed>variable), and byte-compiled for
31speed.
32
33
34The documentation below assumes that you have my <fixed>facemenu.el</fixed> (which is included
35in recent versions of emacs). You may also find it useful to have Jim Thompson's
36<fixed>ps-print.el</fixed>, which will allow you to print out buffers including their faces
37(unfortunately it is not currently able to deal with merged faces; hopefully it
38will be revised soon.) These two files should also be installed into your lisp
39directory and byte-compiled.
40
41
42Put the following code into your .emacs file to automatically load enriched when
43needed:
44
45
46<indent><fixed>(autoload 'enriched-mode "enriched" nil t)</fixed></indent>
47
48
49<bold>Enriched </bold>puts an identifying header into files it writes, which allows it to
50recognize any emacs-generated <italic>text/enriched</italic> file and put itself into the proper
51mode. If you get a file from some other source, however, such as through the
52mail, you may have to enter enriched-mode manually:
53
54
55<indent><fixed>M-x enriched-mode</fixed></indent>
56
57
58You may be asked a couple of questions at this point:
59
60
61<italic>Does the buffer need to be translated now?</italic> If the buffer contains <italic>text/enriched
62</italic>data which needs to be translated into a readable document with fonts and such,
63then answer "yes". If you are putting a new document into text/enriched format
64for the first time, then say "no".
65
66
67<italic>Reformat for current display width?</italic> If emacs knows that the document was created
68with the same display width that is currently in effect, it will trust the line
69breaks that are in the file, which saves some time. If it was saved at a
70different width, or emacs doesn't know what width it was saved at, then it may
71ask whether it should reformat. Actually it does not ask by default; it just
72goes ahead and fills. But if you want it to ask, you can set the variable
73<fixed>enriched-fill-after-visiting</fixed> to <fixed>'ask</fixed>.
74
75
76In the future, other modes such as mail and news may recognize messages that are
77enriched text, and automatically call on <bold>enriched</bold> to display them for you.
78
79
80</indent><bold>WHAT IS ENCODED</bold>
81
82
83<indent>Aside from the text itself, various properties are saved. More will eventually
84be added, so that you will be able to save and read just about anything that can
85be displayed in an emacs frame. Following is the list of properties that are
86currently understood; each is covered in more detail below.
87
88
89<bold>Faces:</bold> default, <bold>bold</bold>, <italic>italic</italic>, <underline>underline</underline>, <fixed>fixed</fixed>, etc.
90
91<bold>Colors:</bold> <x-color><param>red</param><x-bg-color><param>DarkSlateGray</param>any</x-bg-color></x-color><x-bg-color><param>DarkSlateGray</param><x-color><param>orange</param>thing</x-color> <x-color><param>yellow</param>your</x-color><x-color><param>green</param> screen</x-color><x-color><param>blue</param> </x-color><x-color><param>light blue</param>can</x-color><x-color><param>violet</param> display... </x-color></x-bg-color>
92
93<bold>Newlines:</bold> <indent>Which ones are real ("hard") newlines, and which can be changed to fit
94lines into the ma</indent>rgins.
95
96<bold>Margins:</bold> can be indented on the left or right.
97
98<bold>Justification </bold><indent>(whether lines should be flush with the left margin, the right
99margin, fully justified, centered, or left alo</indent>ne).
100
101<bold>Excerpts: "</bold><excerpt>For quoted material." </excerpt>
102
103<bold>Read-only</bold> regions.
104
105
106</indent><bold>FACES
107
108
109</bold><indent>The easiest way to add a face to a region is to use the <bold>facemenu </bold>package. This
110defines a menu obtained by clicking the right mouse button while holding the
111control key. For example, to make a word boldface, you could select the word by
112double-clicking on it, then hold C-mouse-3 and select <italic>Bold</italic> from the <italic>Face
113</italic></indent>sub-menu<indent>. Selecting a face from the menu when the region is not active will apply
114that face to whatever you type next.
115
116
117</indent><bold>NEWLINES and PARAGRAPHS
118
119
120</bold><indent><italic>Text/enriched</italic> format distinguishes between <underline>hard</underline> newlines and <underline>soft </underline>newlines. Hard
121newlines are used to separate paragraphs, or items in a list, or anywhere that
122must be a line break no matter what the margins are. Soft newlines are the ones
123inserted in order to fit text between the margins. Auto-fill-mode and
124enriched-mode's fill functions insert soft newlines as necessary, but hard
125newlines are only inserted by direct request, such as using the return key or the
126<fixed>C-o (open-line)</fixed> function.
127
128
129</indent><bold>INDENTATION
130
131
132</bold><indent>Indentation of regions of the document can be flexibly controlled. The face menu
133contains an <italic>Indent</italic> item, which indents the region by the width of 4 characters
134and an <italic>UnIndent </italic>item which removes 4 character-widths of indentation. All of the
135text paragraphs in this file are singly indented relative to the headings, for
136example. In addition, you can indent and unindent the <italic>right </italic>margin though use of
137the <italic>IndentRight</italic> and <italic>UnindentRight </italic>menu items. The indentation commands can be
138used repeatedly to get further levels of indentation. There are also shortcut
139commands to set the left and right margins directly.
140
141The basic editing commands in enriched-mode have been modified as necessary to
142maintain proper indentation, but if it gets messed up, you can use <fixed>C-q</fixed> to
143reformat the current paragraph. This may be necessary, for example, after
144yanking or pasting text into the buffer. Eventually all commands should respect
145indentation. <flushleft><indentright><indentright><indentright><indentright>
146
147
148</indentright>Not <indent>only whole paragraphs can be indented, but in fact any region.
149This makes it possible to have hanging-indents on paragraphs like
150this one: it was accomplished by selecting the region starting
151after the first word of the paragraph and going to the end of the
152paragraph, and indenting that. </indent></indentright></indentright></indentright><indent>Also notice that this paragraph had been
153indented on the right until the beginning of this sentence, when it resumed
154normal w</indent>i</flushleft></indent><flushleft>dth.
155
156
157<bold>JUSTIFICATION<indent>
158
159
160</indent></bold></flushleft><indent><nofill>Several styles of justification are possible, the simplest being <italic>unfilled.
161</italic>This means that your lines will be left as you write them.
162This paragraph, for instance, is unfilled.
163It was written with one sentence on a line.
164<bold>Enriched </bold>will not change that, no matter what size display it is shown on.
165There is no hard/soft newline distinction in unfilled text.
166
167The most common (for English) style is <italic>FlushLeft. </italic>This means
168lines are aligned at the left margin but left uneven at the
169right.
170
171</nofill><italic><flushright>FlushRight</flushright></italic><flushright>, as you may have guessed, makes each line flush with the right margin,
172but not necessarily the left.
173
174This is usually, but by no means necessarily, used for headings.
175
176This paragraph is FlushRight.
177
178
179</flushright><italic><flushboth>FlushBoth </flushboth></italic><flushboth>regions, which are sometimes called "fully justified" (or, confusingly,
180"right justified") are aligned evenly on both edges, so that the text on the page
181has a smooth appearance as in a book or newspaper article. Unfortunately this
182does not look as nice with a fixed-width font as it does in a
183proportionally-spaced printed document; the extra spaces that are needed on the
184screen can make it hard to read. <indentright><indentright><indentright><indentright>
185
186
187<indent><indent><indent><indent>The narrower the column, the uglier <italic>FlushBoth
188</italic>text will be. If you think <italic>flushboth </italic>paragraphs
189look pretty, though, you can set
190<fixed>enriched-default-justification </fixed>to <fixed>'both </fixed>to
191justify everything that is not otherwise
192specified.
193
194
195</indent></indent></indent></indent></indentright></indentright></indentright></indentright></flushboth><bold><center>Center
196
197</center></bold><center>You can probably guess what <italic>center </italic>justification is for.
198
199The normal center-paragraph key, M-S, can be used to turn on center justification
200in enriched-mode. M-j also brings up a justification menu.
201
202
203</center><flushboth>Note that justification can only be changed for complete paragraphs (ie, a
204justified region must start and end at hard newlines). The menu items in the
205"Justification" menu will all operate on the current paragraph, or, if the region
206is active, on all paragraphs which are inside or overlapping the region.
207
208
209</flushboth></indent><bold>EXCERPTS</bold>
210
211
212<excerpt><indent>This is an example of an excerpt. You can use them for quoted parts of other
213people's email messages and the like. Currently it just displays as italics
214(unless some <bold>other</bold> style is in effect), but this can be changed (see
215<underline>Customization</underline> below). </indent></excerpt>
216
217
218<bold>DEBUGGING</bold>
219
220
221<indent>The function <fixed>enriched-show-codes</fixed> can be helpful in figuring out what is going if
222things don't seem to be working. The function can highlight (with a blue or gray
223background) various items of interest. </indent>Type <fixed>C<indent>-c C-s</indent></fixed><indent>, then what should be
224highlighted:
225
226
227<indent><bold>indent:<indent> </indent></bold><indent>Highlight the indentation at the beginning of each line. </indent>
228
229<bold>margin: </bold>Highlight regions that are indented.
230
231<bold>newline: </bold>Highlight hard newlines.
232
233<bold>none: </bold>Turn off all highlighting. <bold><excerpt>
234
235
236</excerpt></bold></indent></indent><bold>CUSTOMIZATION
237
238
239</bold><indent>-<indent> Set the default faces to things you like. The faces named <fixed>fixed </fixed>and <excerpt>excerpt,
240</excerpt>especially, can be set to your liking. </indent>
241
242- <indent>User-preference variables: <fixed>enriched-default-right-margin,
243enriched-default-justification, enriched-verbose,
244enriched-auto-save-interval</fixed><bold>, </bold>and <fixed>enriched-fill-after-visiting </fixed>(mentioned
245above)<bold>. </bold>See their documentation for det</indent>ails.
246
247- <indent>You can add annotations for your own text properties by making additions to
248<fixed>enriched-annotation-alist</fixed>. Note that the standard requires you to name your
249annotation starting<italic> "x-" </italic>(as in <italic>"x-read-only"</italic>). Please send me any such
250additions that you think might be of general interest so that I can include
251them in the distribution.
252
253</indent>- <indent>My eventual hope is that people will use the basic code in this file to
254implement more of the various file formats that are in common use, so that
255emacs will understand them all and be able to edit them with a common
256interface. If you are interested in taking on the project of implementing a
257format, let me know. The code attempts to be as general as possible; a lot
258of different formats can be defined just by setting up the lists of
259properties to save and how to represent them in the file.
260
261
262</indent></indent><bold>TO-DO LIST
263
264
265</bold><indent><italic>[Feel free to work on these and send me the results!] </italic>
266
267- Be more tolerant of malformed files.
268
269- Make the indentation work more seamlessly and robustly:
270
271<indent>+ Create<indent> an aggressive auto-fill function that will keep the paragraph
272properly filled all the time, without slowing down editing too much. </indent>
273
274+ Refill after yank.
275
276+ <indent>Make deleting a newline also delete the indentation following it. </indent>
277
278+ Never let point enter indentation??
279
280+<indent> Optional never-let-things-get-unfilled (ok for fast terminals). </indent>
281
282</indent>- Do the right thing for insert-file.
283
284- Notice and re-fill when window changes widths (optionally). - Nicer formatting
285for excerpts.
286
287- Interface w/ GNUS, VM, RMAIL.
288
289- For documentation, make INFO aware of text/enriched format.
290
291-<indent> Have another set of alists for reading and writing RTF, etc (this will take
292work not only on the alists, of course, but also on the code for interpreting
293them).
294
295
296
297</indent></indent><bold>Final Notes:
298
299
300</bold><indent>The MIME standard is defined in internet RFC 1521; text/enriched is defined in
301RFC 1563. Details on obtaining these documents via FTP or email may be obtained
302by sending an email message to <fixed>rfc-info@isi.edu</fixed> with the message body:
303
304<indent> <fixed>help: ways_to_get_rfcs </fixed> </indent>
305
306
307This code and documentation is under development. The most current version
308should always be available from:
309
310<indent><fixed>/anonymous@cs.rochester.edu:pub/boris/enriched.shar</fixed>
311
312</indent>It is helpful to make sure you have the newest version before reporting a bug.
313
314</indent>Please send any and all comments to:
315
316
317<bold><x-color><param>blue</param>Boris Goldowsky </x-color></bold><fixed><<boris@cs.rochester.edu></fixed><x-color><param>blue</param>
318
319October 1994
320
321
322
323
324
325
326
327
328
329
330
331</x-color>