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