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