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