enriched.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. Content-Type: text/enriched
  2. Text-Width: 70
  3. <center><x-bg-color><param>blue</param><x-color><param>white</param><bold><fixed>enriched.el:</fixed></bold></x-color></x-bg-color>
  4. <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>
  5. </center><bold><x-bg-color><param>blue</param><x-color><param>white</param>INTRODUCTION</x-color></x-bg-color></bold>
  6. <indent>Emacs has the ability to edit <italic>enriched text</italic>, which is text
  7. containing faces, colors, indentation, and other properties.
  8. This document is a quick introduction to some of the features,
  9. and is also an example file in the <italic>text/enriched </italic>format.</indent>
  10. <x-bg-color><param>blue</param><x-color><param>white</param><bold>INSTALLATION and STARTUP</bold></x-color></x-bg-color>
  11. <indent>Most of the time, you need not do anything to get these features
  12. to work. If you visit a file that has been written out in
  13. <italic>text/enriched</italic> format, it will automatically be decoded, Emacs will
  14. enter 'enriched-mode' while visiting it, and whenever you save it
  15. it will be saved in the same format it was read in.
  16. If you wish to create a new file, however, you will need to turn
  17. on enriched-mode yourself:
  18. <fixed><indent>M-x enriched-mode RET</indent></fixed>
  19. Or, if you get a <italic>text/enriched </italic>file that Emacs does not
  20. automatically recognize and decode, you can tell Emacs to decode
  21. it (which also turns on enriched-mode automatically):
  22. <fixed><indent>M-x format-decode-buffer RET text/enriched RET</indent></fixed></indent>
  23. <x-bg-color><param>blue</param><x-color><param>white</param><bold>WHAT IS ENCODED</bold></x-color></x-bg-color>
  24. <indent>Here is the current list of text-properties that are saved; they
  25. are discussed in more detail below. Most of these can be added or
  26. changed with the "Text Properties" menu, available under the
  27. "Edit" item in the menu-bar, or on C-mouse-2 (Control + the middle
  28. mouse button).
  29. <bold>Faces:</bold> <indent>default, <bold>bold</bold>, <italic>italic</italic>, <underline>underline</underline>, etc.</indent>
  30. <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>
  31. <bold>Newlines:</bold> <indent>Which ones are real ("hard") newlines, and which can be
  32. changed to fit lines into the margins.</indent>
  33. <bold>Margins:</bold> <indent>can be indented on the left or right.</indent>
  34. <bold>Justification</bold> <indent>(whether lines should be flush with the left margin,
  35. the right margin, fully justified, centered, or left alone).</indent>
  36. <bold>Excerpts:</bold><indent> <excerpt>"For quoted material."</excerpt></indent>
  37. <bold>Read-only</bold> regions.
  38. </indent>
  39. <x-bg-color><param>blue</param><x-color><param>white</param><bold>FACES and COLORS</bold></x-color></x-bg-color>
  40. <indent>You can add faces either with the menu or with <fixed>M-o.</fixed> The face is
  41. applied to the current region. If you are using
  42. 'transient-mark-mode' and the region is not active, then the face
  43. applies to whatever you type next. Any face can have colors. If
  44. this is its lone attribute, the face is put on the color submenus
  45. of the "Text Properties" menu.</indent>
  46. <x-bg-color><param>blue</param><x-color><param>white</param><bold>NEWLINES and PARAGRAPHS</bold></x-color></x-bg-color>
  47. <italic><indent>Text/enriched</indent></italic><indent> format distinguishes between <underline>hard</underline> and <underline>soft</underline> newlines.
  48. Hard newlines are used to separate paragraphs, or items in a list,
  49. or anywhere that must be a line break no matter what the margins
  50. are. Soft newlines are the ones inserted in order to fit text
  51. between the margins. The fill and auto-fill functions insert soft
  52. newlines as necessary, but hard newlines are only inserted by
  53. direct request, such as using the return key or the <fixed>C-o
  54. (open-line)</fixed> function.</indent>
  55. <x-bg-color><param>blue</param><x-color><param>white</param><bold>INDENTATION</bold></x-color></x-bg-color>
  56. <indent>The fill functions also understand margins, which can be set for
  57. any region of a document. In addition to the menu items, which
  58. increase or decrease the margins, there are two commands for
  59. setting the margins absolutely: <fixed>C-c [ (set-left-margin)</fixed> and <fixed>C-c
  60. ] (set-right-margin)</fixed>.
  61. You <indent>can change indentation at any point in a paragraph, which
  62. makes it possible to do interesting things like
  63. hanging-indents: this paragraph was indented by selecting the
  64. region from the second word to the end of the paragraph, and
  65. indenting only that part.</indent></indent>
  66. <x-bg-color><param>blue</param><x-color><param>white</param><bold>JUSTIFICATION</bold></x-color></x-bg-color>
  67. <indent><nofill>Several styles of justification are possible, the simplest being <italic>unfilled.
  68. </italic>This means that your lines will be left as you write them.
  69. This paragraph is unfilled.</nofill>
  70. <flushleft>The most common (for English) style is <italic>FlushLeft. </italic>This means
  71. lines are aligned at the left margin but left uneven at the right.</flushleft>
  72. <flushright> <italic>FlushRight</italic> makes each line flush with the right margin instead.
  73. This paragraph is FlushRight.</flushright>
  74. <flushboth><italic>FlushBoth </italic>regions, which are sometimes called "fully justified"
  75. are aligned evenly on both edges, so that the text on the page has
  76. a smooth appearance as in a book or newspaper article.
  77. Unfortunately this does not look as nice with a fixed-width font
  78. as it does in a proportionally-spaced printed document; the extra
  79. spaces that are needed on the screen can make it hard to read.</flushboth>
  80. <center>
  81. <bold>Center</bold>
  82. Finally, there is <italic>center </italic>justification. The normal
  83. center-paragraph key, M-S, can be used to turn on center
  84. justification in enriched-mode.
  85. M-j or the "Text Properties" menu also can be used to change
  86. justification.
  87. </center><flushboth>Note that justification can only change at hard newlines, because
  88. that is the unit over which filling gets done.</flushboth></indent>
  89. <x-bg-color><param>blue</param><x-color><param>white</param><bold>EXCERPTS</bold></x-color></x-bg-color>
  90. <excerpt><indent>This is an example of an excerpt. You can use them for quoted
  91. parts of other people's email messages and the like. It is just a
  92. face, which is the same as the 'italic' face by default.</indent></excerpt>
  93. <x-bg-color><param>blue</param><x-color><param>white</param><bold>THE FILE FORMAT</bold></x-color></x-bg-color>
  94. <indent>Enriched-mode documents are saved in an extended version of a
  95. format called <italic>text/enriched</italic>, which is defined as part of the MIME
  96. standard. This means that your documents are transportable (even
  97. through email) to many other systems. In the future other file
  98. formats may be supported as well.
  99. Since Emacs adds some non-standard features to the format (colors
  100. and read-only regions), not all systems will be able to recreate
  101. all of the features of your document, but they will get as close
  102. as possible.
  103. The text/enriched standard is defined in </indent>Internet<indent> RFC 1896
  104. (<<http://www.ietf.org/rfc/rfc1896.txt>).</indent></indent>
  105. <x-bg-color><param>blue</param><x-color><param>white</param><bold>CUSTOMIZATION</bold></x-color></x-bg-color><bold>
  106. </bold><indent>-<indent> The <fixed>fixed </fixed>and <excerpt>excerpt </excerpt>faces should be set to your liking.</indent>
  107. -<indent> User-preference variables: <fixed>default-justification,
  108. enriched-verbose.
  109. </fixed></indent>-<indent> You can add annotations for your own text properties by making
  110. additions to <fixed>enriched-translations</fixed>. Note that the standard
  111. requires you to name your annotation starting<italic> "x-" </italic>(as in
  112. <italic>"x-read-only"</italic>). Please report any such additions that you
  113. think might be of general interest using <fixed>M-x report-emacs-bug</fixed>.</indent>
  114. </indent>
  115. <x-bg-color><param>blue</param><x-color><param>white</param><bold>TODO LIST</bold></x-color></x-bg-color>
  116. <italic><indent>[Feel free to work on these and send us the results!]</indent></italic><indent>
  117. + Conform to updated text/enriched spec in RFC 1896.
  118. + Be smarter about fixing malformed files.
  119. + Make the indentation work more seamlessly and robustly:
  120. + Create<indent> an aggressive auto-fill function that will keep the
  121. paragraph properly filled all the time, without slowing down
  122. editing too much. Refill mode is a start at this, but needs
  123. </indent></indent> <indent>improvement.
  124. + Refill after yank. [Refill mode does that.]
  125. +<indent> Make deleting a newline also delete the indentation following
  126. it.</indent>
  127. + Never let point enter indentation??
  128. + Notice and re-fill when window changes widths (optionally).
  129. + Deal with the 'category' text-property in a smart way.
  130. + Interface w/ Gnus, VM, RMAIL. Maybe Info too? </indent>(Gnus 5.9 copes
  131. with text/enriched incoming mail.)<indent>
  132. + Support more formats: RTF, HTML...
  133. + Use modern Emacs display features.
  134. </indent>
  135. <x-bg-color><param>blue</param><x-color><param>white</param><bold>Original Author:</bold></x-color></x-bg-color>
  136. <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>
  137. Copyright (C) 1995, 1997, 2001-2017 Free Software Foundation, Inc.
  138. COPYING PERMISSIONS:
  139. This document is free software: you can redistribute it and/or modify
  140. it under the terms of the GNU General Public License as published by
  141. the Free Software Foundation, either version 3 of the License, or
  142. (at your option) any later version.
  143. This program is distributed in the hope that it will be useful,
  144. but WITHOUT ANY WARRANTY; without even the implied warranty of
  145. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  146. GNU General Public License for more details.
  147. You should have received a copy of the GNU General Public License
  148. along with this program. If not, see <<http://www.gnu.org/licenses/>.