0
|
1 Content-Type: text/enriched
|
2
|
2 Text-Width: 70
|
0
|
3
|
2
|
4 <center><x-bg-color><param>blue</param><x-color><param>white</param><bold><fixed>enriched.el:</fixed></bold></x-color></x-bg-color>
|
|
5
|
|
6 <x-bg-color><param>blue</param><x-color><param>white</param><bold>WYSIWYG rich text editing for GNU Emacs</bold></x-color></x-bg-color>
|
|
7
|
|
8
|
0
|
9 </center><bold><x-bg-color><param>blue</param><x-color><param>white</param>INTRODUCTION
|
|
10
|
|
11 </x-color></x-bg-color>
|
2
|
12
|
0
|
13 </bold><indent>Emacs now has the ability to edit <italic>enriched text</italic>, which is text
|
2
|
14 containing faces, colors, indentation, and other properties.
|
|
15 This document is a quick introduction to some of the new features,
|
|
16 and is also an example file in the <italic>text/enriched </italic>format.
|
0
|
17
|
|
18
|
|
19 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>INSTALLATION and STARTUP
|
|
20
|
|
21 </bold></x-color></x-bg-color>
|
2
|
22
|
0
|
23 <indent>Most of the time, you need not do anything to get these features
|
|
24 to work. If you visit a file that has been written out in
|
|
25 <italic>text/enriched</italic> format, it will automatically be decoded, Emacs will
|
|
26 enter `enriched-mode' while visiting it, and whenever you save it
|
|
27 it will be saved in the same format it was read in.
|
2
|
28
|
0
|
29
|
|
30 If you wish to create a new file, however, you will need to turn
|
|
31 on enriched-mode yourself:
|
|
32
|
|
33
|
2
|
34 <fixed><indent>M-x enriched-mode RET</indent></fixed>
|
|
35
|
|
36
|
0
|
37 Or, if you get a <italic>text/enriched </italic>file that Emacs does not
|
|
38 automatically recognize and decode, you can tell Emacs to decode
|
|
39 it (which also turns on enriched-mode automatically):
|
|
40
|
|
41
|
2
|
42 <fixed>M-x format-decode-buffer RET text/enriched RET</fixed>
|
|
43
|
|
44
|
|
45
|
0
|
46 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold><flushleft>WHAT IS ENCODED
|
|
47
|
|
48 </flushleft></bold></x-color></x-bg-color><flushleft>
|
2
|
49
|
0
|
50 </flushleft><indent>Here is the current list of text-properties that are saved; they
|
2
|
51 are discussed in more detail below.
|
|
52 Most of these can be added or changed with the "Text Properties"
|
|
53 menu, available under the "Edit" item in the menu-bar, or on
|
|
54 C-mouse-2 (Control + the middle mouse button).
|
0
|
55
|
|
56 <bold>Faces:</bold> default, <bold>bold</bold>, <italic>italic</italic>, <underline>underline</underline>, <fixed>fixed</fixed>, etc.
|
|
57
|
|
58 <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>
|
|
59
|
|
60 <bold>Newlines:</bold> <indent>Which ones are real ("hard") newlines, and which can be
|
|
61 changed to fit lines into the ma</indent>rgins.
|
|
62
|
|
63 <bold>Margins:</bold> can be indented on the left or right.
|
|
64
|
|
65 <bold>Justification </bold><indent>(whether lines should be flush with the left margin,
|
|
66 the right margin, fully justified, centered, or left alo</indent>ne).
|
|
67
|
|
68 <bold>Excerpts: "</bold><excerpt>For quoted material."</excerpt>
|
2
|
69
|
0
|
70 <bold>Read-only</bold> regions.
|
|
71
|
|
72
|
|
73 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>FACES and COLORS
|
|
74
|
|
75 </bold></x-color></x-bg-color><bold>
|
2
|
76
|
0
|
77 </bold><indent>You can add faces either with the menu or with <fixed>M-g.</fixed> The face is
|
|
78 applied to the current region. If you are using
|
|
79 `transient-mark-mode' and the region is not active, then the face
|
|
80 applies to whatever you type next. Any face can have colors, but
|
|
81 faces have no other attributes are put on the color submenus of
|
|
82 the "Text Properties" menu.
|
|
83
|
|
84
|
|
85 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>NEWLINES and PARAGRAPHS
|
|
86
|
|
87 </bold></x-color></x-bg-color><bold>
|
2
|
88
|
0
|
89 </bold><indent><italic>Text/enriched</italic> format distinguishes between <underline>hard</underline> and <underline>soft</underline> newlines.
|
|
90 Hard newlines are used to separate paragraphs, or items in a list,
|
|
91 or anywhere that must be a line break no matter what the margins
|
|
92 are. Soft newlines are the ones inserted in order to fit text
|
|
93 between the margins. The fill and auto-fill functions insert soft
|
|
94 newlines as necessary, but hard newlines are only inserted by
|
|
95 direct request, such as using the return key or the <fixed>C-o
|
|
96 (open-line)</fixed> function.
|
|
97
|
|
98
|
|
99 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>INDENTATION
|
|
100
|
|
101 </bold></x-color></x-bg-color><bold>
|
2
|
102
|
|
103 </bold><indent><indentright>The fill functions also understand margins, which can be set
|
0
|
104 for any region of a document. In addition to the menu items,
|
|
105 which increase or decrease the margins, there are two commands
|
|
106 for setting the margins absolutely: <fixed>C-c l (set-left-margin)</fixed>
|
2
|
107 and <fixed>C-c r (set-right-margin)</fixed>.
|
|
108 <flushleft>
|
|
109
|
|
110 </flushleft></indentright><flushleft>You <indent>can change indentation at any point in a</indent></flushleft></indent> <indent><indent><flushleft>paragraph, which
|
|
111 makes it possible to do interesting things like</flushleft>
|
0
|
112 <flushleft>hanging-indents: this paragraph was indented by selecting the
|
|
113 region from the second word to the end of the paragraph, and
|
|
114 indenting only that part.<indent>
|
2
|
115
|
0
|
116 </indent></flushleft></indent></indent><flushleft>
|
2
|
117
|
0
|
118 <x-bg-color><param>blue</param><x-color><param>white</param><bold>JUSTIFICATION<indent>
|
2
|
119
|
0
|
120 </indent></bold></x-color></x-bg-color><bold><indent>
|
2
|
121
|
0
|
122 </indent></bold></flushleft><indent><nofill>Several styles of justification are possible, the simplest being <italic>unfilled.
|
|
123 </italic>This means that your lines will be left as you write them.
|
|
124 This paragraph is unfilled.
|
|
125
|
|
126 The most common (for English) style is <italic>FlushLeft. </italic>This means
|
|
127 lines are aligned at the left margin but left uneven at the
|
|
128 right.
|
|
129
|
|
130
|
2
|
131 </nofill><italic><flushright>FlushRight</flushright></italic><flushright> makes each line flush with the right margin instead.
|
0
|
132
|
|
133
|
2
|
134
|
0
|
135 </flushright><italic><flushboth>FlushBoth </flushboth></italic><flushboth>regions, which are sometimes called "fully justified"
|
|
136 are aligned evenly on both edges, so that the text on the page has
|
|
137 a smooth appearance as in a book or newspaper article.
|
|
138 Unfortunately this does not look as nice with a fixed-width font
|
|
139 as it does in a proportionally-spaced printed document; the extra
|
2
|
140 spaces that are needed on the screen can make it hard to read. <indentright><indentright><indentright><indentright>
|
0
|
141
|
2
|
142
|
|
143 </indentright></indentright></indentright></indentright></flushboth><bold><center>Center
|
0
|
144
|
2
|
145 </center></bold><center>Finally, there is <italic>center </italic>justification.
|
|
146 The normal center-paragraph key, M-S, can be used to turn on
|
|
147 center justification in enriched-mode.
|
0
|
148
|
2
|
149 M-j or the "Text Properties" menu also can be used to change
|
0
|
150 justification.
|
|
151
|
|
152
|
2
|
153
|
0
|
154 </center><flushboth>Note that justification can only change at hard newlines, because
|
|
155 that is the unit over which filling gets done.
|
|
156
|
2
|
157
|
0
|
158 </flushboth></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>EXCERPTS
|
|
159
|
|
160 </bold></x-color></x-bg-color>
|
2
|
161
|
|
162 <excerpt><indent>This is an example of an excerpt. You can use them for quoted
|
0
|
163 parts of other people's email messages and the like. It is just a
|
2
|
164 face, which is the same as the `italic' face by default.
|
|
165 </indent></excerpt>
|
|
166
|
0
|
167 <x-bg-color><param>blue</param><x-color><param>white</param><bold>THE FILE FORMAT<indent>
|
2
|
168
|
0
|
169 </indent></bold></x-color></x-bg-color><indent>
|
2
|
170
|
|
171 Enriched-mode documents are saved in an extended version of a
|
0
|
172 format called <italic>text/enriched</italic>, which is defined as part of the MIME
|
|
173 standard. This means that your documents are transportable (even
|
|
174 through email) to many</indent> <indent>other systems. In the future other file
|
|
175 formats may be supported as well.
|
|
176
|
|
177
|
|
178 Since Emacs adds some non-standard features to the format (colors
|
|
179
|
|
180 and read-only regions), not all systems will be able to recreate
|
|
181 all of the features of your document, but they will get as close
|
2
|
182 as possible.
|
0
|
183
|
|
184
|
|
185 The MIME standard is defined in internet RFC 1521; text/enriched
|
|
186 is defined in RFC 1563. Details on obtaining these documents via
|
|
187 FTP or email may be obtained by sending an email message to
|
|
188 <fixed>rfc-info@isi.edu</fixed> with the message body:
|
|
189
|
|
190 <fixed><indent>help: ways_to_get_rfcs
|
|
191
|
|
192
|
2
|
193 </indent></fixed>See also the newsgroup comp.mail.mime.
|
0
|
194
|
|
195
|
|
196 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>CUSTOMIZATION
|
|
197
|
|
198 </bold></x-color></x-bg-color><bold>
|
2
|
199
|
0
|
200 </bold><indent>-<indent> The <fixed>fixed </fixed>and <excerpt>excerpt </excerpt>faces should be set to your liking.</indent>
|
2
|
201
|
|
202 - <indent>User-preference variables: <fixed>default-justification, enriched-verbose.
|
|
203 </fixed></indent>- <indent>You can add annotations for your own text properties by making
|
|
204 additions to <fixed>enriched-annotation-alist</fixed>. Note that the
|
|
205 standard requires you to name your annotation starting<italic> "x-"
|
|
206 </italic>(as in <italic>"x-read-only"</italic>). Please send me any such additions that
|
|
207 you think might be of general interest so that I can include
|
|
208 them in the distribution.
|
0
|
209
|
|
210
|
|
211 </indent></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>TO-DO LIST
|
|
212
|
|
213 </bold></x-color></x-bg-color><bold>
|
2
|
214
|
0
|
215 </bold><indent><italic>[Feel free to work on these and send me the results!]</italic>
|
2
|
216
|
0
|
217 - Be smarter about fixing malformed files.
|
|
218
|
|
219 - Make the indentation work more seamlessly and robustly:
|
|
220
|
|
221 <indent>+ Create<indent> an aggressive auto-fill function that will keep the
|
|
222 paragraph properly filled all the time, without slowing
|
|
223 down editing too much.</indent>
|
2
|
224
|
0
|
225 + Refill after yank.
|
|
226
|
|
227 + <indent>Make deleting a newline also delete the indentation
|
|
228 following it.</indent>
|
2
|
229
|
0
|
230 + Never let point enter indentation??
|
|
231
|
|
232 </indent>- Notice and re-fill when window changes widths (optionally).
|
|
233
|
|
234 - Deal with the `category' text-property in a smart way.
|
|
235
|
|
236 - Interface w/ GNUS, VM, RMAIL. Maybe Info too?
|
|
237
|
|
238 -<indent> Support more formats: RTF, HTML...
|
|
239
|
|
240
|
|
241 </indent></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>Final Notes:
|
|
242
|
|
243 </bold></x-color></x-bg-color><bold>
|
2
|
244
|
|
245 </bold><indent>This code and documentation is under development.
|
|
246 </indent>Comments and bug reports are welcome.
|
0
|
247
|
|
248
|
|
249 <bold><x-color><param>white</param><x-bg-color><param>blue</param>Boris Goldowsky</x-bg-color></x-color><x-color><param>light blue</param> </x-color></bold><x-color><param>light blue</param><fixed><<boris@gnu.ai.mit.edu></fixed></x-color><x-color><param>blue</param>
|
2
|
250
|
|
251 </x-color><x-bg-color><param>blue</param><x-color><param>white</param> April 1995 </x-color></x-bg-color><x-color><param>blue</param>
|
|
252
|
|
253
|
|
254
|
|
255
|
0
|
256
|
2
|
257
|
|
258
|
|
259
|
|
260
|
|
261
|
|
262
|
|
263 </x-color>
|