Load cl within eval-when-compile.
[emacs.git] / etc / enriched.doc
blobf13962fe379c53b640ad7642a1174796e801f034
1 Content-Type: text/enriched
2 Text-Width: 70
4 <center><x-bg-color><param>blue</param><x-color><param>white</param><bold><fixed>enriched.el:</fixed></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>
9 </center><bold><x-bg-color><param>blue</param><x-color><param>white</param>INTRODUCTION
11 </x-color></x-bg-color>
13 </bold><indent>Emacs now has the ability to edit <italic>enriched text</italic>, which is text
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.
19 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>INSTALLATION and STARTUP
21 </bold></x-color></x-bg-color>
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.
28     
30 If you wish to create a new file, however, you will need to turn
31 on enriched-mode yourself:
34 <fixed><indent>M-x enriched-mode  RET</indent></fixed>
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):
42     <fixed>M-x format-decode-buffer  RET  text/enriched  RET</fixed>
44     
46 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold><flushleft>WHAT IS ENCODED
48 </flushleft></bold></x-color></x-bg-color><flushleft>
50 </flushleft><indent>Here is the current list of text-properties that are saved; they
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).
56 <bold>Faces:</bold> default, <bold>bold</bold>, <italic>italic</italic>, <underline>underline</underline>, <fixed>fixed</fixed>, etc.
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>
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.
63 <bold>Margins:</bold> can be indented on the left or right.
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).
68 <bold>Excerpts: "</bold><excerpt>For quoted material."</excerpt>
70 <bold>Read-only</bold> regions.
73 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>FACES and COLORS
75 </bold></x-color></x-bg-color><bold>
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.
85 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>NEWLINES and PARAGRAPHS
87 </bold></x-color></x-bg-color><bold>
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.
99 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>INDENTATION
101 </bold></x-color></x-bg-color><bold>
103 </bold><indent><indentright>The fill functions also understand margins, which can be set
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>
107 and <fixed>C-c r (set-right-margin)</fixed>. 
108 <flushleft>
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>
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>
116 </indent></flushleft></indent></indent><flushleft>
118 <x-bg-color><param>blue</param><x-color><param>white</param><bold>JUSTIFICATION<indent>
120 </indent></bold></x-color></x-bg-color><bold><indent>
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.
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.
131    </nofill><italic><flushright>FlushRight</flushright></italic><flushright> makes each line flush with the right margin instead.
133     
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
140 spaces that are needed on the screen can make it hard to read. <indentright><indentright><indentright><indentright>
143     </indentright></indentright></indentright></indentright></flushboth><bold><center>Center
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.
149    M-j or the "Text Properties" menu also can be used to change
150     justification.
152     
154 </center><flushboth>Note that justification can only change at hard newlines, because
155 that is the unit over which filling gets done. 
158 </flushboth></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>EXCERPTS
160 </bold></x-color></x-bg-color>
162 <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
164 face, which is the same as the `italic' face by default.
165     </indent></excerpt>
167 <x-bg-color><param>blue</param><x-color><param>white</param><bold>THE FILE FORMAT<indent>
169 </indent></bold></x-color></x-bg-color><indent>
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
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.
178 Since Emacs adds some non-standard features to the format (colors
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
182 as possible.  
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:
190 <fixed><indent>help: ways_to_get_rfcs
193 </indent></fixed>See also the newsgroup comp.mail.mime. 
196 </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>CUSTOMIZATION
198 </bold></x-color></x-bg-color><bold>
200 </bold><indent>-<indent> The <fixed>fixed </fixed>and <excerpt>excerpt </excerpt>faces should be set to your liking.</indent>
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.
211 </indent></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>TO-DO LIST
213 </bold></x-color></x-bg-color><bold>
215 </bold><indent><italic>[Feel free to work on these and send me the results!]</italic>
217 - Be smarter about fixing malformed files.
219 - Make the indentation work more seamlessly and robustly:
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>
225 + Refill after yank.
227 + <indent>Make deleting a newline also delete the indentation
228 following it.</indent>
230 + Never let point enter indentation??
232 </indent>- Notice and re-fill when window changes widths (optionally).
234 - Deal with the `category' text-property in a smart way.
236 - Interface w/ GNUS, VM, RMAIL.  Maybe Info too?
238 -<indent> Support more formats: RTF, HTML...
241 </indent></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>Final Notes:
243 </bold></x-color></x-bg-color><bold>
245 </bold><indent>This code and documentation is under development.
246     </indent>Comments and bug reports are welcome.
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>
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>
263 </x-color>