diff options
| author | Chong Yidong | 2011-12-04 00:17:29 +0800 |
|---|---|---|
| committer | Chong Yidong | 2011-12-04 00:17:29 +0800 |
| commit | 8863a584c26fa9583be51b544cfd4cadf60740ea (patch) | |
| tree | dc1992aa6a410d0fc37b03c64468550792b8b054 | |
| parent | 6fdebe937101d3a09a9f95f5c3470b8bf7812b5e (diff) | |
| download | emacs-8863a584c26fa9583be51b544cfd4cadf60740ea.tar.gz emacs-8863a584c26fa9583be51b544cfd4cadf60740ea.zip | |
More updates to the Text chapter of the Emacs manual, and related nodes.
Make the documentation of Enriched Mode shorter, since it's
practically unused.
* text.texi (TeX Mode): Mention AUCTeX package.
(TeX Editing): Add xref to documentation for Occur.
(LaTeX Editing): Add xref to Completion node.
(TeX Print): Fix description of tex-directory.
(Enriched Text): Renamed from Formatted Text. Make this node and
its subnodes less verbose, since text/enriched files are
practically unused.
(Enriched Mode): Renamed from Requesting Formatted Text.
(Format Colors): Node deleted.
(Enriched Faces): Renamed from Format Faces. Describe commands
for applying colors too.
(Forcing Enriched Mode): Node deleted; merged into Enriched Mode.
* frames.texi (Menu Mouse Clicks): Tweak description of C-Mouse-2.
* display.texi (Colors): New node.
* cmdargs.texi (Colors X):
* xresources.texi (GTK styles):
* custom.texi (Face Customization): Reference it.
* glossary.texi (Glossary): Remove "formatted text" and "WYSIWYG".
Link to Fill Commands for Justification entry.
| -rw-r--r-- | doc/emacs/ChangeLog | 26 | ||||
| -rw-r--r-- | doc/emacs/cmdargs.texi | 33 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 11 | ||||
| -rw-r--r-- | doc/emacs/display.texi | 80 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 46 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 5 | ||||
| -rw-r--r-- | doc/emacs/frames.texi | 13 | ||||
| -rw-r--r-- | doc/emacs/glossary.texi | 16 | ||||
| -rw-r--r-- | doc/emacs/modes.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/text.texi | 888 | ||||
| -rw-r--r-- | doc/emacs/xresources.texi | 62 |
11 files changed, 510 insertions, 672 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 5c3699a8098..d16443ccf31 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,29 @@ | |||
| 1 | 2011-12-03 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * text.texi (TeX Mode): Mention AUCTeX package. | ||
| 4 | (TeX Editing): Add xref to documentation for Occur. | ||
| 5 | (LaTeX Editing): Add xref to Completion node. | ||
| 6 | (TeX Print): Fix description of tex-directory. | ||
| 7 | (Enriched Text): Renamed from Formatted Text. Make this node and | ||
| 8 | its subnodes less verbose, since text/enriched files are | ||
| 9 | practically unused. | ||
| 10 | (Enriched Mode): Renamed from Requesting Formatted Text. | ||
| 11 | (Format Colors): Node deleted. | ||
| 12 | (Enriched Faces): Renamed from Format Faces. Describe commands | ||
| 13 | for applying colors too. | ||
| 14 | (Forcing Enriched Mode): Node deleted; merged into Enriched Mode. | ||
| 15 | |||
| 16 | * frames.texi (Menu Mouse Clicks): Tweak description of C-Mouse-2. | ||
| 17 | |||
| 18 | * display.texi (Colors): New node. | ||
| 19 | |||
| 20 | * cmdargs.texi (Colors X): | ||
| 21 | * xresources.texi (GTK styles): | ||
| 22 | * custom.texi (Face Customization): Reference it. | ||
| 23 | |||
| 24 | * glossary.texi (Glossary): Remove "formatted text" and "WYSIWYG". | ||
| 25 | Link to Fill Commands for Justification entry. | ||
| 26 | |||
| 1 | 2011-12-03 Eli Zaretskii <eliz@gnu.org> | 27 | 2011-12-03 Eli Zaretskii <eliz@gnu.org> |
| 2 | 28 | ||
| 3 | * display.texi (Auto Scrolling): More accurate description of what | 29 | * display.texi (Auto Scrolling): More accurate description of what |
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 07cca53ce4d..d9109045570 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi | |||
| @@ -69,7 +69,7 @@ arguments.) | |||
| 69 | * Environment:: Environment variables that Emacs uses. | 69 | * Environment:: Environment variables that Emacs uses. |
| 70 | * Display X:: Changing the default display and using remote login. | 70 | * Display X:: Changing the default display and using remote login. |
| 71 | * Font X:: Choosing a font for text, under X. | 71 | * Font X:: Choosing a font for text, under X. |
| 72 | * Colors:: Choosing display colors. | 72 | * Colors X:: Choosing display colors. |
| 73 | * Window Size X:: Start-up window size, under X. | 73 | * Window Size X:: Start-up window size, under X. |
| 74 | * Borders X:: Internal and external borders, under X. | 74 | * Borders X:: Internal and external borders, under X. |
| 75 | * Title X:: Specifying the initial frame's title. | 75 | * Title X:: Specifying the initial frame's title. |
| @@ -784,7 +784,7 @@ Use @var{font} as the default font. | |||
| 784 | 784 | ||
| 785 | When passing a font specification to Emacs on the command line, you | 785 | When passing a font specification to Emacs on the command line, you |
| 786 | may need to ``quote'' it, by enclosing it in quotation marks, if it | 786 | may need to ``quote'' it, by enclosing it in quotation marks, if it |
| 787 | contains characters that the shell treats specially (e.g. spaces). | 787 | contains characters that the shell treats specially (e.g.@: spaces). |
| 788 | For example: | 788 | For example: |
| 789 | 789 | ||
| 790 | @smallexample | 790 | @smallexample |
| @@ -794,27 +794,14 @@ emacs -fn "DejaVu Sans Mono-12" | |||
| 794 | @xref{Fonts}, for other ways to specify the default font and font name | 794 | @xref{Fonts}, for other ways to specify the default font and font name |
| 795 | formats. | 795 | formats. |
| 796 | 796 | ||
| 797 | @node Colors | 797 | @node Colors X |
| 798 | @appendixsec Window Color Options | 798 | @appendixsec Window Color Options |
| 799 | @cindex color of window, from command line | 799 | @cindex color of window, from command line |
| 800 | @cindex text colors, from command line | 800 | @cindex text colors, from command line |
| 801 | 801 | ||
| 802 | @findex list-colors-display | 802 | You can use the following command-line options to specify the colors |
| 803 | @cindex available colors | 803 | to use for various parts of the Emacs display. Colors may be |
| 804 | On a color display, you can specify which color to use for various | 804 | specified using either color names or RGB triplets (@pxref{Colors}). |
| 805 | parts of the Emacs display. To find out what colors are available on | ||
| 806 | your system, type @kbd{M-x list-colors-display}, or press | ||
| 807 | @kbd{C-Mouse-2} and select @samp{Display Colors} from the pop-up menu. | ||
| 808 | (A particular window system might support many more colors, but the | ||
| 809 | list displayed by @code{list-colors-display} shows their portable | ||
| 810 | subset that can be safely used on any display supported by Emacs.) | ||
| 811 | If you do not specify colors, on windowed displays the default for the | ||
| 812 | background is white and the default for all other colors is black. On a | ||
| 813 | monochrome display, the foreground is black, the background is white, | ||
| 814 | and the border is gray if the display supports that. On terminals, the | ||
| 815 | background is usually black and the foreground is white. | ||
| 816 | |||
| 817 | Here is a list of the command-line options for specifying colors: | ||
| 818 | 805 | ||
| 819 | @table @samp | 806 | @table @samp |
| 820 | @item -fg @var{color} | 807 | @item -fg @var{color} |
| @@ -822,15 +809,15 @@ background is usually black and the foreground is white. | |||
| 822 | @itemx --foreground-color=@var{color} | 809 | @itemx --foreground-color=@var{color} |
| 823 | @opindex --foreground-color | 810 | @opindex --foreground-color |
| 824 | @cindex foreground color, command-line argument | 811 | @cindex foreground color, command-line argument |
| 825 | Specify the foreground color. @var{color} should be a standard color | 812 | Specify the foreground color, overriding the color specified by the |
| 826 | name, or a numeric specification of the color's red, green, and blue | 813 | @code{default} face (@pxref{Faces}). |
| 827 | components as in @samp{#4682B4} or @samp{RGB:46/82/B4}. | ||
| 828 | @item -bg @var{color} | 814 | @item -bg @var{color} |
| 829 | @opindex -bg | 815 | @opindex -bg |
| 830 | @itemx --background-color=@var{color} | 816 | @itemx --background-color=@var{color} |
| 831 | @opindex --background-color | 817 | @opindex --background-color |
| 832 | @cindex background color, command-line argument | 818 | @cindex background color, command-line argument |
| 833 | Specify the background color. | 819 | Specify the background color, overriding the color specified by the |
| 820 | @code{default} face. | ||
| 834 | @item -bd @var{color} | 821 | @item -bd @var{color} |
| 835 | @opindex -bd | 822 | @opindex -bd |
| 836 | @itemx --border-color=@var{color} | 823 | @itemx --border-color=@var{color} |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 5b98216369d..e807aebdeee 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -430,15 +430,8 @@ means that it's disabled. You can enable or disable the attribute by | |||
| 430 | clicking that button. When the attribute is enabled, you can change | 430 | clicking that button. When the attribute is enabled, you can change |
| 431 | the attribute value in the usual ways. | 431 | the attribute value in the usual ways. |
| 432 | 432 | ||
| 433 | You can specify a color name (use @kbd{M-x list-colors-display} for | 433 | The foreground and background colors can be specified using color |
| 434 | a list of them) or a hexadecimal color specification of the form | 434 | names or RGB triplets. @xref{Colors}. |
| 435 | @samp{#@var{rr}@var{gg}@var{bb}}. (@samp{#000000} is black, | ||
| 436 | @samp{#ff0000} is red, @samp{#00ff00} is green, @samp{#0000ff} is | ||
| 437 | blue, and @samp{#ffffff} is white.) On a black-and-white display, the | ||
| 438 | colors you can use for the background are @samp{black}, @samp{white}, | ||
| 439 | @samp{gray}, @samp{gray1}, and @samp{gray3}. Emacs supports these | ||
| 440 | shades of gray by using background stipple patterns instead of a | ||
| 441 | color. | ||
| 442 | 435 | ||
| 443 | Setting, saving and resetting a face work like the same operations for | 436 | Setting, saving and resetting a face work like the same operations for |
| 444 | variables (@pxref{Changing a Variable}). | 437 | variables (@pxref{Changing a Variable}). |
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 9d928d02452..ea9bd95b8ee 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -21,6 +21,7 @@ the text is displayed. | |||
| 21 | * View Mode:: Viewing read-only buffers. | 21 | * View Mode:: Viewing read-only buffers. |
| 22 | * Follow Mode:: Follow mode lets two windows scroll as one. | 22 | * Follow Mode:: Follow mode lets two windows scroll as one. |
| 23 | * Faces:: How to change the display style using faces. | 23 | * Faces:: How to change the display style using faces. |
| 24 | * Colors:: Specifying colors for faces. | ||
| 24 | * Standard Faces:: Emacs' predefined faces. | 25 | * Standard Faces:: Emacs' predefined faces. |
| 25 | * Text Scale:: Increasing or decreasing text size in a buffer. | 26 | * Text Scale:: Increasing or decreasing text size in a buffer. |
| 26 | * Font Lock:: Minor mode for syntactic highlighting using faces. | 27 | * Font Lock:: Minor mode for syntactic highlighting using faces. |
| @@ -461,7 +462,7 @@ one large window. | |||
| 461 | To turn off Follow mode, type @kbd{M-x follow-mode} a second time. | 462 | To turn off Follow mode, type @kbd{M-x follow-mode} a second time. |
| 462 | 463 | ||
| 463 | @node Faces | 464 | @node Faces |
| 464 | @section Faces: Controlling Text Display Style | 465 | @section Text Faces |
| 465 | @cindex faces | 466 | @cindex faces |
| 466 | 467 | ||
| 467 | Emacs can display text in several different styles, called | 468 | Emacs can display text in several different styles, called |
| @@ -480,10 +481,8 @@ matching that regular expression (@pxref{Regexps}). | |||
| 480 | It's possible for a given face to look different in different | 481 | It's possible for a given face to look different in different |
| 481 | frames. For instance, some text-only terminals do not support all | 482 | frames. For instance, some text-only terminals do not support all |
| 482 | face attributes, particularly font, height, and width, and some | 483 | face attributes, particularly font, height, and width, and some |
| 483 | support a limited range of colors. The @code{list-faces-display} | 484 | support a limited range of colors. |
| 484 | command shows the appearance for the selected frame. | ||
| 485 | 485 | ||
| 486 | @cindex face colors, setting | ||
| 487 | @cindex background color | 486 | @cindex background color |
| 488 | @cindex default face | 487 | @cindex default face |
| 489 | You can customize a face to alter its appearance, and save those | 488 | You can customize a face to alter its appearance, and save those |
| @@ -498,25 +497,58 @@ background color. | |||
| 498 | You can also use X resources to specify attributes of any particular | 497 | You can also use X resources to specify attributes of any particular |
| 499 | face. @xref{Resources}. | 498 | face. @xref{Resources}. |
| 500 | 499 | ||
| 500 | Emacs can display variable-width fonts, but some Emacs commands, | ||
| 501 | particularly indentation commands, do not account for variable | ||
| 502 | character display widths. Therefore, we recommend not using | ||
| 503 | variable-width fonts for most faces, particularly those assigned by | ||
| 504 | Font Lock mode. | ||
| 505 | |||
| 506 | @node Colors | ||
| 507 | @section Colors for Faces | ||
| 508 | @cindex color name | ||
| 509 | @cindex RGB triplet | ||
| 510 | |||
| 511 | Faces can have various foreground and background colors. When you | ||
| 512 | specify a color for a face---for instance, when customizing the face | ||
| 513 | (@pxref{Face Customization})---you can use either a @dfn{color name} | ||
| 514 | or an @dfn{RGB triplet}. | ||
| 515 | |||
| 516 | @findex list-colors-display | ||
| 517 | A color name is a pre-defined name, such as @samp{dark orange} or | ||
| 518 | @samp{medium sea green}. To view a list of color names, type @kbd{M-x | ||
| 519 | list-colors-display}. If you run this command on a graphical display, | ||
| 520 | it shows the full range of color names known to Emacs (these are the | ||
| 521 | standard X11 color names, defined in X's @file{rgb.txt} file). If you | ||
| 522 | run the command on a text-only terminal, it shows only a small subset | ||
| 523 | of colors that can be safely displayed on such terminals. However, | ||
| 524 | Emacs understands X11 color names even on text-only terminals; if a | ||
| 525 | face is given a color specified by an X11 color name, it is displayed | ||
| 526 | using the closest-matching terminal color. | ||
| 527 | |||
| 528 | An RGB triplet is a string of the form @samp{#RRGGBB}. Each of the | ||
| 529 | R, G, and B components is a hexadecimal number specifying the | ||
| 530 | component's relative intensity, one to four digits long (usually two | ||
| 531 | digits are used). The components must have the same number of digits. | ||
| 532 | For hexadecimal values A to F, either upper or lower case are | ||
| 533 | acceptable. | ||
| 534 | |||
| 535 | The @kbd{M-x list-colors-display} command also shows the equivalent | ||
| 536 | RGB triplet for each named color. For instance, @samp{medium sea | ||
| 537 | green} is equivalent to @samp{#3CB371}. | ||
| 538 | |||
| 539 | @cindex face colors, setting | ||
| 501 | @findex set-face-foreground | 540 | @findex set-face-foreground |
| 502 | @findex set-face-background | 541 | @findex set-face-background |
| 503 | You can also change the foreground and background colors of a face | 542 | You can change the foreground and background colors of a face with |
| 504 | with @kbd{M-x set-face-foreground} and @kbd{M-x set-face-background}. | 543 | @kbd{M-x set-face-foreground} and @kbd{M-x set-face-background}. |
| 505 | These commands prompt in the minibuffer for a face name and a color | 544 | These commands prompt in the minibuffer for a face name and a color, |
| 506 | name, with completion, and then set that face to use the specified | 545 | with completion, and then set that face to use the specified color. |
| 507 | color (@pxref{Face Customization}, for information about color names). | ||
| 508 | They affect the face colors on all frames, but their effects do not | 546 | They affect the face colors on all frames, but their effects do not |
| 509 | persist for future Emacs sessions, unlike using the customization | 547 | persist for future Emacs sessions, unlike using the customization |
| 510 | buffer or X resources. You can also use frame parameters to set | 548 | buffer or X resources. You can also use frame parameters to set |
| 511 | foreground and background colors for a specific frame; see @ref{Frame | 549 | foreground and background colors for a specific frame; @xref{Frame |
| 512 | Parameters}. | 550 | Parameters}. |
| 513 | 551 | ||
| 514 | Emacs can display variable-width fonts, but some Emacs commands, | ||
| 515 | particularly indentation commands, do not account for variable | ||
| 516 | character display widths. Therefore, we recommend not using | ||
| 517 | variable-width fonts for most faces, particularly those assigned by | ||
| 518 | Font Lock mode. | ||
| 519 | |||
| 520 | @node Standard Faces | 552 | @node Standard Faces |
| 521 | @section Standard Faces | 553 | @section Standard Faces |
| 522 | 554 | ||
| @@ -1022,13 +1054,13 @@ trailing whitespace in the region instead. | |||
| 1022 | @cindex fringes, and unused line indication | 1054 | @cindex fringes, and unused line indication |
| 1023 | On graphical displays, Emacs can indicate unused lines at the end of | 1055 | On graphical displays, Emacs can indicate unused lines at the end of |
| 1024 | the window with a small image in the left fringe (@pxref{Fringes}). | 1056 | the window with a small image in the left fringe (@pxref{Fringes}). |
| 1025 | The image appears for window lines that do not correspond to any | 1057 | The image appears for screen lines that do not correspond to any |
| 1026 | buffer text. Blank lines at the end of the buffer then stand out | 1058 | buffer text, so blank lines at the end of the buffer stand out because |
| 1027 | because they do not have this image in the fringe. To enable this | 1059 | they lack this image. To enable this feature, set the buffer-local |
| 1028 | feature, set the buffer-local variable @code{indicate-empty-lines} to | 1060 | variable @code{indicate-empty-lines} to a non-@code{nil} value. You |
| 1029 | a non-@code{nil} value. You can enable or disable this feature for | 1061 | can enable or disable this feature for all new buffers by setting the |
| 1030 | all new buffers by setting the default value of this variable, | 1062 | default value of this variable, e.g.@: @code{(setq-default |
| 1031 | e.g.@:@code{(setq-default indicate-empty-lines t)}. | 1063 | indicate-empty-lines t)}. |
| 1032 | 1064 | ||
| 1033 | @node Selective Display | 1065 | @node Selective Display |
| 1034 | @section Selective Display | 1066 | @section Selective Display |
| @@ -1257,7 +1289,7 @@ as octal escape sequences instead of caret escape sequences. | |||
| 1257 | Some non-@acronym{ASCII} characters have the same appearance as an | 1289 | Some non-@acronym{ASCII} characters have the same appearance as an |
| 1258 | @acronym{ASCII} space or hyphen (minus) character. Such characters | 1290 | @acronym{ASCII} space or hyphen (minus) character. Such characters |
| 1259 | can cause problems if they are entered into a buffer without your | 1291 | can cause problems if they are entered into a buffer without your |
| 1260 | realization, e.g. by yanking; for instance, source code compilers | 1292 | realization, e.g.@: by yanking; for instance, source code compilers |
| 1261 | typically do not treat non-@acronym{ASCII} spaces as whitespace | 1293 | typically do not treat non-@acronym{ASCII} spaces as whitespace |
| 1262 | characters. To deal with this problem, Emacs displays such characters | 1294 | characters. To deal with this problem, Emacs displays such characters |
| 1263 | specially: it displays @code{U+00A0} (no-break space) with the | 1295 | specially: it displays @code{U+00A0} (no-break space) with the |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 2a02a0de0bb..aca3735ff03 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -113,25 +113,6 @@ Emacs Lisp Reference Manual}. | |||
| 113 | @insertcopying | 113 | @insertcopying |
| 114 | @end ifnottex | 114 | @end ifnottex |
| 115 | 115 | ||
| 116 | @ignore | ||
| 117 | These subcategories have been deleted for simplicity | ||
| 118 | and to avoid conflicts. | ||
| 119 | Completion | ||
| 120 | Backup Files | ||
| 121 | Auto-Saving: Protection Against Disasters | ||
| 122 | Tags | ||
| 123 | Text Mode | ||
| 124 | Outline Mode | ||
| 125 | @TeX{} Mode | ||
| 126 | Formatted Text | ||
| 127 | Shell Command History | ||
| 128 | |||
| 129 | The ones for Dired and Rmail have had the items turned into :: items | ||
| 130 | to avoid conflicts. | ||
| 131 | Also Running Shell Commands from Emacs | ||
| 132 | and Sending Mail and Registers and Minibuffer. | ||
| 133 | @end ignore | ||
| 134 | |||
| 135 | @menu | 116 | @menu |
| 136 | * Distrib:: How to get the latest Emacs distribution. | 117 | * Distrib:: How to get the latest Emacs distribution. |
| 137 | * Intro:: An introduction to Emacs concepts. | 118 | * Intro:: An introduction to Emacs concepts. |
| @@ -350,6 +331,7 @@ Controlling the Display | |||
| 350 | * View Mode:: Viewing read-only buffers. | 331 | * View Mode:: Viewing read-only buffers. |
| 351 | * Follow Mode:: Follow mode lets two windows scroll as one. | 332 | * Follow Mode:: Follow mode lets two windows scroll as one. |
| 352 | * Faces:: How to change the display style using faces. | 333 | * Faces:: How to change the display style using faces. |
| 334 | * Colors:: Specifying colors for faces. | ||
| 353 | * Standard Faces:: Emacs' predefined faces. | 335 | * Standard Faces:: Emacs' predefined faces. |
| 354 | * Text Scale:: Increasing or decreasing text size in a buffer. | 336 | * Text Scale:: Increasing or decreasing text size in a buffer. |
| 355 | * Font Lock:: Minor mode for syntactic highlighting using faces. | 337 | * Font Lock:: Minor mode for syntactic highlighting using faces. |
| @@ -569,8 +551,8 @@ Commands for Human Languages | |||
| 569 | * TeX Mode:: Editing input to the formatter TeX. | 551 | * TeX Mode:: Editing input to the formatter TeX. |
| 570 | * HTML Mode:: Editing HTML and SGML files. | 552 | * HTML Mode:: Editing HTML and SGML files. |
| 571 | * Nroff Mode:: Editing input to the formatter nroff. | 553 | * Nroff Mode:: Editing input to the formatter nroff. |
| 572 | * Formatted Text:: Editing formatted text directly in WYSIWYG fashion. | 554 | * Enriched Text:: Editing text ``enriched'' with fonts, colors, etc. |
| 573 | * Text Based Tables:: Editing text-based tables in WYSIWYG fashion. | 555 | * Text Based Tables:: Commands for editing text-based tables. |
| 574 | * Two-Column:: Splitting text columns into separate windows. | 556 | * Two-Column:: Splitting text columns into separate windows. |
| 575 | 557 | ||
| 576 | Filling Text | 558 | Filling Text |
| @@ -597,18 +579,16 @@ Outline Mode | |||
| 597 | * TeX Print:: Commands for printing part of a file with TeX. | 579 | * TeX Print:: Commands for printing part of a file with TeX. |
| 598 | * TeX Misc:: Customization of TeX mode, and related features. | 580 | * TeX Misc:: Customization of TeX mode, and related features. |
| 599 | 581 | ||
| 600 | Editing Formatted Text | 582 | Editing Enriched Text |
| 601 | 583 | ||
| 602 | * Requesting Formatted Text:: Entering and exiting Enriched mode. | 584 | * Enriched Mode:: Entering and exiting Enriched mode. |
| 603 | * Hard and Soft Newlines:: There are two different kinds of newlines. | 585 | * Hard and Soft Newlines:: There are two different kinds of newlines. |
| 604 | * Editing Format Info:: How to edit text properties. | 586 | * Editing Format Info:: How to edit text properties. |
| 605 | * Format Faces:: Bold, italic, underline, etc. | 587 | * Enriched Faces:: Bold, italic, underline, etc. |
| 606 | * Format Colors:: Changing the color of text. | 588 | * Enriched Indentation:: Changing the left and right margins. |
| 607 | * Format Indentation:: Changing the left and right margins. | 589 | * Enriched Justification:: Centering, setting text flush with the |
| 608 | * Format Justification:: Centering, setting text flush with the | 590 | left or right margin, etc. |
| 609 | left or right margin, etc. | 591 | * Enriched Properties:: The "special" text properties submenu. |
| 610 | * Format Properties:: The "special" text properties submenu. | ||
| 611 | * Forcing Enriched Mode:: How to force use of Enriched mode. | ||
| 612 | 592 | ||
| 613 | @c The automatic texinfo menu update inserts some duplicate items here | 593 | @c The automatic texinfo menu update inserts some duplicate items here |
| 614 | @c (faces, colors, indentation, justification, properties), because | 594 | @c (faces, colors, indentation, justification, properties), because |
| @@ -1150,7 +1130,7 @@ Command Line Arguments for Emacs Invocation | |||
| 1150 | * Environment:: Environment variables that Emacs uses. | 1130 | * Environment:: Environment variables that Emacs uses. |
| 1151 | * Display X:: Changing the default display and using remote login. | 1131 | * Display X:: Changing the default display and using remote login. |
| 1152 | * Font X:: Choosing a font for text, under X. | 1132 | * Font X:: Choosing a font for text, under X. |
| 1153 | * Colors:: Choosing display colors. | 1133 | * Colors X:: Choosing display colors. |
| 1154 | * Window Size X:: Start-up window size, under X. | 1134 | * Window Size X:: Start-up window size, under X. |
| 1155 | * Borders X:: Internal and external borders, under X. | 1135 | * Borders X:: Internal and external borders, under X. |
| 1156 | * Title X:: Specifying the initial frame's title. | 1136 | * Title X:: Specifying the initial frame's title. |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 8c41ca13225..e3da0ca44e6 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -297,8 +297,9 @@ original encoding and end-of-line convention. @xref{Coding Systems}. | |||
| 297 | If you wish to edit a file as a sequence of @acronym{ASCII} | 297 | If you wish to edit a file as a sequence of @acronym{ASCII} |
| 298 | characters with no special encoding or conversion, use the @kbd{M-x | 298 | characters with no special encoding or conversion, use the @kbd{M-x |
| 299 | find-file-literally} command. This visits a file, like @kbd{C-x C-f}, | 299 | find-file-literally} command. This visits a file, like @kbd{C-x C-f}, |
| 300 | but does not do format conversion (@pxref{Formatted Text}), character | 300 | but does not do format conversion (@pxref{Format Conversion,, Format |
| 301 | code conversion (@pxref{Coding Systems}), or automatic uncompression | 301 | Conversion, elisp, the Emacs Lisp Reference Manual}), character code |
| 302 | conversion (@pxref{Coding Systems}), or automatic uncompression | ||
| 302 | (@pxref{Compressed Files}), and does not add a final newline because | 303 | (@pxref{Compressed Files}), and does not add a final newline because |
| 303 | of @code{require-final-newline} (@pxref{Customize Save}). If you have | 304 | of @code{require-final-newline} (@pxref{Customize Save}). If you have |
| 304 | already visited the same file in the usual (non-literal) manner, this | 305 | already visited the same file in the usual (non-literal) manner, this |
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 704b53c2f36..1445d25be15 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | @chapter Frames and Graphical Displays | 6 | @chapter Frames and Graphical Displays |
| 7 | @cindex frames | 7 | @cindex frames |
| 8 | 8 | ||
| 9 | When Emacs is started on a graphical display, e.g. on the X Window | 9 | When Emacs is started on a graphical display, e.g.@: on the X Window |
| 10 | System, it occupies a graphical system-level ``window''. In this | 10 | System, it occupies a graphical system-level ``window''. In this |
| 11 | manual, we call this a @dfn{frame}, reserving the word ``window'' for | 11 | manual, we call this a @dfn{frame}, reserving the word ``window'' for |
| 12 | the part of the frame used for displaying a buffer. A frame initially | 12 | the part of the frame used for displaying a buffer. A frame initially |
| @@ -245,8 +245,8 @@ Select the text you drag across, in the form of whole lines. | |||
| 245 | 245 | ||
| 246 | @vindex mouse-highlight | 246 | @vindex mouse-highlight |
| 247 | Some Emacs buffers include @dfn{buttons}, or @dfn{hyperlinks}: | 247 | Some Emacs buffers include @dfn{buttons}, or @dfn{hyperlinks}: |
| 248 | pieces of text that perform some action (e.g. following a reference) | 248 | pieces of text that perform some action (e.g.@: following a reference) |
| 249 | when activated (e.g. by clicking on them). Usually, a button's text | 249 | when activated (e.g.@: by clicking on them). Usually, a button's text |
| 250 | is visually highlighted: it is underlined, or a box is drawn around | 250 | is visually highlighted: it is underlined, or a box is drawn around |
| 251 | it. If you move the mouse over a button, the shape of the mouse | 251 | it. If you move the mouse over a button, the shape of the mouse |
| 252 | cursor changes and the button lights up. If you change the variable | 252 | cursor changes and the button lights up. If you change the variable |
| @@ -302,8 +302,9 @@ menu smarter and more customizable. @xref{Buffer Menus}. | |||
| 302 | 302 | ||
| 303 | @item C-Mouse-2 | 303 | @item C-Mouse-2 |
| 304 | @kindex C-Mouse-2 | 304 | @kindex C-Mouse-2 |
| 305 | This menu is for specifying faces and other text properties | 305 | This menu contains entries for examining faces and other text |
| 306 | for editing formatted text. @xref{Formatted Text}. | 306 | properties, and well as for setting them (the latter is mainly useful |
| 307 | when editing enriched text; @pxref{Enriched Text}). | ||
| 307 | 308 | ||
| 308 | @item C-Mouse-3 | 309 | @item C-Mouse-3 |
| 309 | @kindex C-Mouse-3 | 310 | @kindex C-Mouse-3 |
| @@ -657,7 +658,7 @@ The entries have the following meanings: | |||
| 657 | @item maker | 658 | @item maker |
| 658 | The name of the font manufacturer. | 659 | The name of the font manufacturer. |
| 659 | @item family | 660 | @item family |
| 660 | The name of the font family (e.g. @samp{courier}). | 661 | The name of the font family (e.g.@: @samp{courier}). |
| 661 | @item weight | 662 | @item weight |
| 662 | The font weight---normally either @samp{bold}, @samp{medium} or | 663 | The font weight---normally either @samp{bold}, @samp{medium} or |
| 663 | @samp{light}. Some font names support other values. | 664 | @samp{light}. Some font names support other values. |
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index e37e80bfab8..3af75245e69 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi | |||
| @@ -509,11 +509,6 @@ character sets and which font to use to display each of them. Fontsets | |||
| 509 | make it easy to change several fonts at once by specifying the name of a | 509 | make it easy to change several fonts at once by specifying the name of a |
| 510 | fontset, rather than changing each font separately. @xref{Fontsets}. | 510 | fontset, rather than changing each font separately. @xref{Fontsets}. |
| 511 | 511 | ||
| 512 | @item Formatted Text | ||
| 513 | Formatted text is text that displays with formatting information while | ||
| 514 | you edit. Formatting information includes fonts, colors, and specified | ||
| 515 | margins. @xref{Formatted Text}. | ||
| 516 | |||
| 517 | @item Formfeed Character | 512 | @item Formfeed Character |
| 518 | See `page.' | 513 | See `page.' |
| 519 | 514 | ||
| @@ -702,9 +697,8 @@ that someone else is already editing. | |||
| 702 | See `incremental search.' | 697 | See `incremental search.' |
| 703 | 698 | ||
| 704 | @item Justification | 699 | @item Justification |
| 705 | Justification means adding extra spaces within lines of text | 700 | Justification means adding extra spaces within lines of text in order |
| 706 | in order to adjust the position of the text edges. | 701 | to adjust the position of the text edges. @xref{Fill Commands}. |
| 707 | @xref{Format Justification}. | ||
| 708 | 702 | ||
| 709 | @item Key Binding | 703 | @item Key Binding |
| 710 | See `binding.' | 704 | See `binding.' |
| @@ -1362,12 +1356,6 @@ See `abbrev.' | |||
| 1362 | Word search is searching for a sequence of words, considering the | 1356 | Word search is searching for a sequence of words, considering the |
| 1363 | punctuation between them as insignificant. @xref{Word Search}. | 1357 | punctuation between them as insignificant. @xref{Word Search}. |
| 1364 | 1358 | ||
| 1365 | @item WYSIWYG | ||
| 1366 | WYSIWYG stands for ``What you see is what you get.'' Emacs generally | ||
| 1367 | provides WYSIWYG editing for files of characters; in Enriched mode | ||
| 1368 | (@pxref{Formatted Text}), it provides WYSIWYG editing for files that | ||
| 1369 | include text formatting information. | ||
| 1370 | |||
| 1371 | @item Yanking | 1359 | @item Yanking |
| 1372 | Yanking means reinserting text previously killed (q.v.@:). It can be | 1360 | Yanking means reinserting text previously killed (q.v.@:). It can be |
| 1373 | used to undo a mistaken kill, or for copying or moving text. Some | 1361 | used to undo a mistaken kill, or for copying or moving text. Some |
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index e5be13d6ce5..4d574242c8d 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi | |||
| @@ -202,7 +202,7 @@ amount of work you can lose in case of a crash. @xref{Auto Save}. | |||
| 202 | 202 | ||
| 203 | @item | 203 | @item |
| 204 | Enriched mode enables editing and saving of formatted text. | 204 | Enriched mode enables editing and saving of formatted text. |
| 205 | @xref{Formatted Text}. | 205 | @xref{Enriched Text}. |
| 206 | 206 | ||
| 207 | @item | 207 | @item |
| 208 | Flyspell mode automatically highlights misspelled words. | 208 | Flyspell mode automatically highlights misspelled words. |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 241acbaf333..8f353961afb 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -32,10 +32,9 @@ structure. | |||
| 32 | @findex nxml-mode | 32 | @findex nxml-mode |
| 33 | Emacs has other major modes for text which contains ``embedded'' | 33 | Emacs has other major modes for text which contains ``embedded'' |
| 34 | commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and | 34 | commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and |
| 35 | SGML (@pxref{HTML Mode}); XML (@pxref{Top, nXML Mode,,nxml-mode, nXML | 35 | SGML (@pxref{HTML Mode}); XML (@pxref{Top,The nXML Mode |
| 36 | Mode}); and Groff and Nroff (@pxref{Nroff Mode}). In addition, you | 36 | Manual,,nxml-mode, nXML Mode}); and Groff and Nroff (@pxref{Nroff |
| 37 | can edit formatted text in WYSIWYG style (``what you see is what you | 37 | Mode}). |
| 38 | get''), using Enriched mode (@pxref{Formatted Text}). | ||
| 39 | 38 | ||
| 40 | @cindex ASCII art | 39 | @cindex ASCII art |
| 41 | If you need to edit pictures made out of text characters (commonly | 40 | If you need to edit pictures made out of text characters (commonly |
| @@ -48,13 +47,14 @@ for editing such pictures. | |||
| 48 | @xref{Picture Mode}. | 47 | @xref{Picture Mode}. |
| 49 | @end ifnottex | 48 | @end ifnottex |
| 50 | 49 | ||
| 51 | 50 | @ifinfo | |
| 52 | @cindex skeletons | 51 | @cindex skeletons |
| 53 | @cindex templates | 52 | @cindex templates |
| 54 | @cindex autotyping | 53 | @cindex autotyping |
| 55 | @cindex automatic typing | 54 | @cindex automatic typing |
| 56 | The ``automatic typing'' features may be useful when writing text. | 55 | The ``automatic typing'' features may be useful when writing text. |
| 57 | @inforef{Top,, autotype}. | 56 | @inforef{Top,The Autotype Manual,autotype}. |
| 57 | @end ifinfo | ||
| 58 | 58 | ||
| 59 | @menu | 59 | @menu |
| 60 | * Words:: Moving over and killing words. | 60 | * Words:: Moving over and killing words. |
| @@ -68,8 +68,8 @@ for editing such pictures. | |||
| 68 | * TeX Mode:: Editing input to the formatter TeX. | 68 | * TeX Mode:: Editing input to the formatter TeX. |
| 69 | * HTML Mode:: Editing HTML and SGML files. | 69 | * HTML Mode:: Editing HTML and SGML files. |
| 70 | * Nroff Mode:: Editing input to the formatter nroff. | 70 | * Nroff Mode:: Editing input to the formatter nroff. |
| 71 | * Formatted Text:: Editing formatted text directly in WYSIWYG fashion. | 71 | * Enriched Text:: Editing text ``enriched'' with fonts, colors, etc. |
| 72 | * Text Based Tables:: Editing text-based tables in WYSIWYG fashion. | 72 | * Text Based Tables:: Commands for editing text-based tables. |
| 73 | * Two-Column:: Splitting text columns into separate windows. | 73 | * Two-Column:: Splitting text columns into separate windows. |
| 74 | @end menu | 74 | @end menu |
| 75 | 75 | ||
| @@ -651,7 +651,8 @@ per-buffer variable; altering the variable affects only the current buffer, | |||
| 651 | but there is a default value which you can change as well. @xref{Locals}. | 651 | but there is a default value which you can change as well. @xref{Locals}. |
| 652 | 652 | ||
| 653 | The @code{indentation} text property provides another way to control | 653 | The @code{indentation} text property provides another way to control |
| 654 | the amount of indentation paragraphs receive. @xref{Format Indentation}. | 654 | the amount of indentation paragraphs receive. @xref{Enriched |
| 655 | Indentation}. | ||
| 655 | 656 | ||
| 656 | @node Adaptive Fill | 657 | @node Adaptive Fill |
| 657 | @subsection Adaptive Filling | 658 | @subsection Adaptive Filling |
| @@ -808,10 +809,10 @@ indenting the current line. @xref{Indentation}, for details. | |||
| 808 | 809 | ||
| 809 | Text mode turns off the features concerned with comments except when | 810 | Text mode turns off the features concerned with comments except when |
| 810 | you explicitly invoke them. It changes the syntax table so that | 811 | you explicitly invoke them. It changes the syntax table so that |
| 811 | single-quotes are considered part of words (e.g. @samp{don't} is | 812 | single-quotes are considered part of words (e.g.@: @samp{don't} is |
| 812 | considered one word). However, if a word starts with a single-quote, | 813 | considered one word). However, if a word starts with a single-quote, |
| 813 | it is treated as a prefix for the purposes of capitalization | 814 | it is treated as a prefix for the purposes of capitalization |
| 814 | (e.g. @kbd{M-c} converts @samp{'hello'} into @samp{'Hello'}, as | 815 | (e.g.@: @kbd{M-c} converts @samp{'hello'} into @samp{'Hello'}, as |
| 815 | expected). | 816 | expected). |
| 816 | 817 | ||
| 817 | @cindex Paragraph-Indent Text mode | 818 | @cindex Paragraph-Indent Text mode |
| @@ -1086,9 +1087,9 @@ direct and indirect, and all of their bodies. | |||
| 1086 | current heading line as well as all the bodies in its subtree; the | 1087 | current heading line as well as all the bodies in its subtree; the |
| 1087 | subheadings themselves are left visible. The command @kbd{C-c C-k} | 1088 | subheadings themselves are left visible. The command @kbd{C-c C-k} |
| 1088 | (@code{show-branches}) reveals the subheadings, if they had previously | 1089 | (@code{show-branches}) reveals the subheadings, if they had previously |
| 1089 | been hidden (e.g. by @kbd{C-c C-d}). The command @kbd{C-c C-i} | 1090 | been hidden (e.g.@: by @kbd{C-c C-d}). The command @kbd{C-c C-i} |
| 1090 | (@code{show-children}) is a weaker version of this; it reveals just | 1091 | (@code{show-children}) is a weaker version of this; it reveals just |
| 1091 | the direct subheadings, i.e. those one level down. | 1092 | the direct subheadings, i.e.@: those one level down. |
| 1092 | 1093 | ||
| 1093 | @findex hide-other | 1094 | @findex hide-other |
| 1094 | @kindex C-c C-o @r{(Outline mode)} | 1095 | @kindex C-c C-o @r{(Outline mode)} |
| @@ -1285,18 +1286,48 @@ Emacs does not guess right, you can select the correct variant of | |||
| 1285 | @TeX{} mode using the command @kbd{M-x plain-tex-mode}, @kbd{M-x | 1286 | @TeX{} mode using the command @kbd{M-x plain-tex-mode}, @kbd{M-x |
| 1286 | latex-mode}, @kbd{M-x slitex-mode}, or @kbd{doctex-mode}. | 1287 | latex-mode}, @kbd{M-x slitex-mode}, or @kbd{doctex-mode}. |
| 1287 | 1288 | ||
| 1288 | Emacs also provides Bib@TeX{} mode, a major mode for editing | 1289 | The following sections document the features of @TeX{} mode and its |
| 1289 | Bib@TeX{} files. Bib@TeX{} is a tool for storing and formatting | 1290 | variants. There are several other @TeX{}-related Emacs packages, |
| 1290 | bibliographic references, which is commonly used together with | 1291 | which are not documented in this manual: |
| 1291 | La@TeX{}. In addition, the Ref@TeX{} package provides a minor mode | 1292 | |
| 1292 | which can be used in conjunction with La@TeX{} mode to manage | 1293 | @itemize @bullet |
| 1293 | bibliographic references. @inforef{Top,, reftex}. | 1294 | @item |
| 1295 | Bib@TeX{} mode is a major mode for Bib@TeX{} files, which are commonly | ||
| 1296 | used for keeping bibliographic references for La@TeX{} documents. For | ||
| 1297 | more information, see the documentation string for the command | ||
| 1298 | @code{bibtex-mode}. | ||
| 1299 | |||
| 1300 | @item | ||
| 1301 | The Ref@TeX{} package provides a minor mode which can be used in | ||
| 1302 | conjunction with La@TeX{} mode to manage bibliographic references. | ||
| 1303 | @ifinfo | ||
| 1304 | @xref{Top,The Ref@TeX{} Manual,,reftex}. | ||
| 1305 | @end ifinfo | ||
| 1306 | @ifnotinfo | ||
| 1307 | For more information, see the Ref@TeX{} Info manual, which is | ||
| 1308 | distributed with Emacs. | ||
| 1309 | @end ifnotinfo | ||
| 1310 | |||
| 1311 | @item | ||
| 1312 | The AUC@TeX{} package provides more advanced features for editing | ||
| 1313 | @TeX{} and its related formats, including the ability to preview | ||
| 1314 | @TeX{} equations within Emacs buffers. Unlike Bib@TeX{} mode and the | ||
| 1315 | Ref@TeX{} package, AUC@TeX{} is not distributed with Emacs by default. | ||
| 1316 | It can be downloaded via the Package Menu (@pxref{Packages}); once | ||
| 1317 | installed, see | ||
| 1318 | @ifinfo | ||
| 1319 | @ref{Top,The AUC@TeX{} Manual,,auctex}. | ||
| 1320 | @end ifinfo | ||
| 1321 | @ifnotinfo | ||
| 1322 | the AUC@TeX{} manual, which is included with the package. | ||
| 1323 | @end ifnotinfo | ||
| 1324 | @end itemize | ||
| 1294 | 1325 | ||
| 1295 | @menu | 1326 | @menu |
| 1296 | * Editing: TeX Editing. Special commands for editing in TeX mode. | 1327 | * TeX Editing:: Special commands for editing in TeX mode. |
| 1297 | * LaTeX: LaTeX Editing. Additional commands for LaTeX input files. | 1328 | * LaTeX Editing:: Additional commands for LaTeX input files. |
| 1298 | * Printing: TeX Print. Commands for printing part of a file with TeX. | 1329 | * TeX Print:: Commands for printing part of a file with TeX. |
| 1299 | * Misc: TeX Misc. Customization of TeX mode, and related features. | 1330 | * TeX Misc:: Customization of TeX mode, and related features. |
| 1300 | @end menu | 1331 | @end menu |
| 1301 | 1332 | ||
| 1302 | @node TeX Editing | 1333 | @node TeX Editing |
| @@ -1321,12 +1352,10 @@ Move forward past the next unmatched close brace (@code{up-list}). | |||
| 1321 | @findex tex-insert-quote | 1352 | @findex tex-insert-quote |
| 1322 | @kindex " @r{(@TeX{} mode)} | 1353 | @kindex " @r{(@TeX{} mode)} |
| 1323 | In @TeX{}, the character @samp{"} is not normally used; instead, | 1354 | In @TeX{}, the character @samp{"} is not normally used; instead, |
| 1324 | quotations begin with @samp{``} and end with @samp{''}. For | 1355 | quotations begin with @samp{``} and end with @samp{''}. @TeX{} mode |
| 1325 | convenience, @TeX{} mode overrides the normal meaning of the key | 1356 | therefore binds the @kbd{"} key to the @code{tex-insert-quote} |
| 1326 | @kbd{"} with a command that inserts a pair of single-quotes or | 1357 | command. This inserts @samp{``} after whitespace or an open brace, |
| 1327 | backquotes (@code{tex-insert-quote}). To be precise, it inserts | 1358 | @samp{"} after a backslash, and @samp{''} after any other character. |
| 1328 | @samp{``} after whitespace or an open brace, @samp{"} after a | ||
| 1329 | backslash, and @samp{''} after any other character. | ||
| 1330 | 1359 | ||
| 1331 | As a special exception, if you type @kbd{"} when the text before | 1360 | As a special exception, if you type @kbd{"} when the text before |
| 1332 | point is either @samp{``} or @samp{''}, Emacs replaces that preceding | 1361 | point is either @samp{``} or @samp{''}, Emacs replaces that preceding |
| @@ -1334,9 +1363,6 @@ text with a single @samp{"} character. You can therefore type | |||
| 1334 | @kbd{""} to insert @samp{"}, should you ever need to do so. (You can | 1363 | @kbd{""} to insert @samp{"}, should you ever need to do so. (You can |
| 1335 | also use @kbd{C-q "} to insert this character.) | 1364 | also use @kbd{C-q "} to insert this character.) |
| 1336 | 1365 | ||
| 1337 | To disable the @kbd{"} expansion feature, eliminate that binding in | ||
| 1338 | the local map (@pxref{Key Bindings}). | ||
| 1339 | |||
| 1340 | In @TeX{} mode, @samp{$} has a special syntax code which attempts to | 1366 | In @TeX{} mode, @samp{$} has a special syntax code which attempts to |
| 1341 | understand the way @TeX{} math mode delimiters match. When you insert a | 1367 | understand the way @TeX{} math mode delimiters match. When you insert a |
| 1342 | @samp{$} that is meant to exit math mode, the position of the matching | 1368 | @samp{$} that is meant to exit math mode, the position of the matching |
| @@ -1361,13 +1387,14 @@ text that belongs inside. Afterward, use the command @kbd{C-c @}} | |||
| 1361 | @findex tex-validate-region | 1387 | @findex tex-validate-region |
| 1362 | @findex tex-terminate-paragraph | 1388 | @findex tex-terminate-paragraph |
| 1363 | @kindex C-j @r{(@TeX{} mode)} | 1389 | @kindex C-j @r{(@TeX{} mode)} |
| 1364 | There are two commands for checking the matching of braces. @kbd{C-j} | 1390 | There are two commands for checking the matching of braces. |
| 1365 | (@code{tex-terminate-paragraph}) checks the paragraph before point, and | 1391 | @kbd{C-j} (@code{tex-terminate-paragraph}) checks the paragraph before |
| 1366 | inserts two newlines to start a new paragraph. It outputs a message in | 1392 | point, and inserts two newlines to start a new paragraph. It outputs |
| 1367 | the echo area if any mismatch is found. @kbd{M-x tex-validate-region} | 1393 | a message in the echo area if any mismatch is found. @kbd{M-x |
| 1368 | checks a region, paragraph by paragraph. The errors are listed in the | 1394 | tex-validate-region} checks a region, paragraph by paragraph. The |
| 1369 | @samp{*Occur*} buffer, and you can use @kbd{C-c C-c} or @kbd{Mouse-2} in | 1395 | errors are listed in an @samp{*Occur*} buffer; you can use the usual |
| 1370 | that buffer to go to a particular mismatch. | 1396 | Occur mode commands in that buffer, such as @kbd{C-c C-c}, to visit a |
| 1397 | particular mismatch (@pxref{Other Repeating Search}). | ||
| 1371 | 1398 | ||
| 1372 | Note that Emacs commands count square brackets and parentheses in | 1399 | Note that Emacs commands count square brackets and parentheses in |
| 1373 | @TeX{} mode, not just braces. This is not strictly correct for the | 1400 | @TeX{} mode, not just braces. This is not strictly correct for the |
| @@ -1379,8 +1406,8 @@ to work with them. | |||
| 1379 | @node LaTeX Editing | 1406 | @node LaTeX Editing |
| 1380 | @subsection La@TeX{} Editing Commands | 1407 | @subsection La@TeX{} Editing Commands |
| 1381 | 1408 | ||
| 1382 | La@TeX{} mode (and its obsolete variant, Sli@TeX{} mode) provide a | 1409 | La@TeX{} mode provides a few extra features not applicable to plain |
| 1383 | few extra features not applicable to plain @TeX{}: | 1410 | @TeX{}: |
| 1384 | 1411 | ||
| 1385 | @table @kbd | 1412 | @table @kbd |
| 1386 | @item C-c C-o | 1413 | @item C-c C-o |
| @@ -1393,60 +1420,59 @@ Close the innermost La@TeX{} block not yet closed | |||
| 1393 | 1420 | ||
| 1394 | @findex tex-latex-block | 1421 | @findex tex-latex-block |
| 1395 | @kindex C-c C-o @r{(La@TeX{} mode)} | 1422 | @kindex C-c C-o @r{(La@TeX{} mode)} |
| 1396 | @vindex latex-block-names | 1423 | In La@TeX{} input, @samp{\begin} and @samp{\end} tags are used to |
| 1397 | In La@TeX{} input, @samp{\begin} and @samp{\end} commands are used to | 1424 | group blocks of text. To insert a block, type @kbd{C-c C-o} |
| 1398 | group blocks of text. To insert a @samp{\begin} and a matching | 1425 | (@code{tex-latex-block}). This prompts for a block type, and inserts |
| 1399 | @samp{\end} (on a new line following the @samp{\begin}), use @kbd{C-c | 1426 | the appropriate matching @samp{\begin} and @samp{\end} tags, leaving a |
| 1400 | C-o} (@code{tex-latex-block}). A blank line is inserted between the | 1427 | blank line between the two and moving point there. |
| 1401 | two, and point is left there. You can use completion when you enter the | ||
| 1402 | block type; to specify additional block type names beyond the standard | ||
| 1403 | list, set the variable @code{latex-block-names}. For example, here's | ||
| 1404 | how to add @samp{theorem}, @samp{corollary}, and @samp{proof}: | ||
| 1405 | 1428 | ||
| 1406 | @example | 1429 | @vindex latex-block-names |
| 1407 | (setq latex-block-names '("theorem" "corollary" "proof")) | 1430 | When entering the block type argument to @kbd{C-c C-o}, you can use |
| 1408 | @end example | 1431 | the usual completion commands (@pxref{Completion}). The default |
| 1432 | completion list contains the standard La@TeX{} block types. If you | ||
| 1433 | want additional block types for completion, customize the list | ||
| 1434 | variable @code{latex-block-names}. | ||
| 1409 | 1435 | ||
| 1410 | @findex tex-close-latex-block | 1436 | @findex tex-close-latex-block |
| 1411 | @kindex C-c C-e @r{(La@TeX{} mode)} | 1437 | @kindex C-c C-e @r{(La@TeX{} mode)} |
| 1412 | In La@TeX{} input, @samp{\begin} and @samp{\end} commands must | 1438 | In La@TeX{} input, @samp{\begin} and @samp{\end} tags must balance. |
| 1413 | balance. You can use @kbd{C-c C-e} (@code{tex-close-latex-block}) to | 1439 | You can use @kbd{C-c C-e} (@code{tex-close-latex-block}) to insert an |
| 1414 | insert automatically a matching @samp{\end} to match the last unmatched | 1440 | @samp{\end} tag which matches the last unmatched @samp{\begin}. It |
| 1415 | @samp{\begin}. It indents the @samp{\end} to match the corresponding | 1441 | also indents the @samp{\end} to match the corresponding @samp{\begin}, |
| 1416 | @samp{\begin}. It inserts a newline after @samp{\end} if point is at | 1442 | and inserts a newline after the @samp{\end} tag if point is at the |
| 1417 | the beginning of a line. | 1443 | beginning of a line. |
| 1418 | 1444 | ||
| 1419 | @node TeX Print | 1445 | @node TeX Print |
| 1420 | @subsection @TeX{} Printing Commands | 1446 | @subsection @TeX{} Printing Commands |
| 1421 | 1447 | ||
| 1422 | You can invoke @TeX{} as an inferior of Emacs on either the entire | 1448 | You can invoke @TeX{} as an subprocess of Emacs, supplying either |
| 1423 | contents of the buffer or just a region at a time. Running @TeX{} in | 1449 | the entire contents of the buffer or just part of it (e.g.@: one |
| 1424 | this way on just one chapter is a good way to see what your changes | 1450 | chapter of a larger document). |
| 1425 | look like without taking the time to format the entire file. | ||
| 1426 | 1451 | ||
| 1427 | @table @kbd | 1452 | @table @kbd |
| 1453 | @item C-c C-b | ||
| 1454 | Invoke @TeX{} on the entire current buffer (@code{tex-buffer}). | ||
| 1428 | @item C-c C-r | 1455 | @item C-c C-r |
| 1429 | Invoke @TeX{} on the current region, together with the buffer's header | 1456 | Invoke @TeX{} on the current region, together with the buffer's header |
| 1430 | (@code{tex-region}). | 1457 | (@code{tex-region}). |
| 1431 | @item C-c C-b | ||
| 1432 | Invoke @TeX{} on the entire current buffer (@code{tex-buffer}). | ||
| 1433 | @item C-c @key{TAB} | ||
| 1434 | Invoke Bib@TeX{} on the current file (@code{tex-bibtex-file}). | ||
| 1435 | @item C-c C-f | 1458 | @item C-c C-f |
| 1436 | Invoke @TeX{} on the current file (@code{tex-file}). | 1459 | Invoke @TeX{} on the current file (@code{tex-file}). |
| 1437 | @item C-c C-l | 1460 | |
| 1438 | Recenter the window showing output from the inferior @TeX{} so that | ||
| 1439 | the last line can be seen (@code{tex-recenter-output-buffer}). | ||
| 1440 | @item C-c C-k | ||
| 1441 | Kill the @TeX{} subprocess (@code{tex-kill-job}). | ||
| 1442 | @item C-c C-p | ||
| 1443 | Print the output from the last @kbd{C-c C-r}, @kbd{C-c C-b}, or @kbd{C-c | ||
| 1444 | C-f} command (@code{tex-print}). | ||
| 1445 | @item C-c C-v | 1461 | @item C-c C-v |
| 1446 | Preview the output from the last @kbd{C-c C-r}, @kbd{C-c C-b}, or @kbd{C-c | 1462 | Preview the output from the last @kbd{C-c C-r}, @kbd{C-c C-b}, or @kbd{C-c |
| 1447 | C-f} command (@code{tex-view}). | 1463 | C-f} command (@code{tex-view}). |
| 1448 | @item C-c C-q | 1464 | |
| 1449 | Show the printer queue (@code{tex-show-print-queue}). | 1465 | @item C-c C-p |
| 1466 | Print the output from the last @kbd{C-c C-b}, @kbd{C-c C-r}, or | ||
| 1467 | @kbd{C-c C-f} command (@code{tex-print}). | ||
| 1468 | |||
| 1469 | @item C-c @key{TAB} | ||
| 1470 | Invoke Bib@TeX{} on the current file (@code{tex-bibtex-file}). | ||
| 1471 | @item C-c C-l | ||
| 1472 | Recenter the window showing output from @TeX{} so that the last line | ||
| 1473 | can be seen (@code{tex-recenter-output-buffer}). | ||
| 1474 | @item C-c C-k | ||
| 1475 | Kill the @TeX{} subprocess (@code{tex-kill-job}). | ||
| 1450 | @item C-c C-c | 1476 | @item C-c C-c |
| 1451 | Invoke some other compilation command on the entire current buffer | 1477 | Invoke some other compilation command on the entire current buffer |
| 1452 | (@code{tex-compile}). | 1478 | (@code{tex-compile}). |
| @@ -1454,49 +1480,51 @@ Invoke some other compilation command on the entire current buffer | |||
| 1454 | 1480 | ||
| 1455 | @findex tex-buffer | 1481 | @findex tex-buffer |
| 1456 | @kindex C-c C-b @r{(@TeX{} mode)} | 1482 | @kindex C-c C-b @r{(@TeX{} mode)} |
| 1457 | @findex tex-print | ||
| 1458 | @kindex C-c C-p @r{(@TeX{} mode)} | ||
| 1459 | @findex tex-view | 1483 | @findex tex-view |
| 1460 | @kindex C-c C-v @r{(@TeX{} mode)} | 1484 | @kindex C-c C-v @r{(@TeX{} mode)} |
| 1461 | @findex tex-show-print-queue | 1485 | @findex tex-print |
| 1462 | @kindex C-c C-q @r{(@TeX{} mode)} | 1486 | @kindex C-c C-p @r{(@TeX{} mode)} |
| 1463 | You can pass the current buffer through an inferior @TeX{} by means of | 1487 | To pass the current buffer through @TeX{}, type @kbd{C-c C-b} |
| 1464 | @kbd{C-c C-b} (@code{tex-buffer}). The formatted output appears in a | 1488 | (@code{tex-buffer}). The formatted output goes in a temporary file, |
| 1465 | temporary file; to print it, type @kbd{C-c C-p} (@code{tex-print}). | 1489 | normally a @file{.dvi} file. Afterwards, you can type @kbd{C-c C-v} |
| 1466 | Afterward, you can use @kbd{C-c C-q} (@code{tex-show-print-queue}) to | 1490 | (@code{tex-view}) to launch an external program, such as |
| 1467 | view the progress of your output towards being printed. If your terminal | 1491 | @command{xdvi}, to view this output file. You can also type @kbd{C-c |
| 1468 | has the ability to display @TeX{} output files, you can preview the | 1492 | C-p} (@code{tex-print}) to print a hardcopy of the output file. |
| 1469 | output on the terminal with @kbd{C-c C-v} (@code{tex-view}). | ||
| 1470 | 1493 | ||
| 1471 | @cindex @env{TEXINPUTS} environment variable | 1494 | @cindex @env{TEXINPUTS} environment variable |
| 1472 | @vindex tex-directory | 1495 | @vindex tex-directory |
| 1473 | You can specify the directory to use for running @TeX{} by setting the | 1496 | By default, @kbd{C-c C-b} runs @TeX{} in the current directory. The |
| 1474 | variable @code{tex-directory}. @code{"."} is the default value. If | 1497 | output of @TeX{} also goes in this directory. To run @TeX{} in a |
| 1475 | your environment variable @env{TEXINPUTS} contains relative directory | 1498 | different directory, change the variable @code{tex-directory} to the |
| 1476 | names, or if your files contains @samp{\input} commands with relative | 1499 | desired directory name. If your environment variable @env{TEXINPUTS} |
| 1477 | file names, then @code{tex-directory} @emph{must} be @code{"."} or you | 1500 | contains relative directory names, or if your files contains |
| 1478 | will get the wrong results. Otherwise, it is safe to specify some other | 1501 | @samp{\input} commands with relative file names, then |
| 1479 | directory, such as @code{"/tmp"}. | 1502 | @code{tex-directory} @emph{must} be @code{"."} or you will get the |
| 1503 | wrong results. Otherwise, it is safe to specify some other directory, | ||
| 1504 | such as @code{"/tmp"}. | ||
| 1480 | 1505 | ||
| 1481 | @vindex tex-run-command | 1506 | @vindex tex-run-command |
| 1482 | @vindex latex-run-command | 1507 | @vindex latex-run-command |
| 1483 | @vindex slitex-run-command | ||
| 1484 | @vindex tex-dvi-print-command | ||
| 1485 | @vindex tex-dvi-view-command | 1508 | @vindex tex-dvi-view-command |
| 1486 | @vindex tex-show-queue-command | 1509 | @vindex tex-dvi-print-command |
| 1487 | If you want to specify which shell commands are used in the inferior @TeX{}, | 1510 | The buffer's @TeX{} variant determines what shell command @kbd{C-c |
| 1488 | you can do so by setting the values of the variables @code{tex-run-command}, | 1511 | C-b} actually runs. In Plain @TeX{} mode, it is specified by the |
| 1489 | @code{latex-run-command}, @code{slitex-run-command}, | 1512 | variable @code{tex-run-command}, which defaults to @code{"tex"}. In |
| 1490 | @code{tex-dvi-print-command}, @code{tex-dvi-view-command}, and | 1513 | La@TeX{} mode, it is specified by @code{latex-run-command}, which |
| 1491 | @code{tex-show-queue-command}. The default values may | 1514 | defaults to @code{"latex"}. The shell command that @kbd{C-c C-v} runs |
| 1492 | (or may not) be appropriate for your system. | 1515 | to view the @file{.dvi} output is determined by the variable |
| 1493 | 1516 | @code{tex-dvi-view-command}, regardless of the @TeX{} variant. The | |
| 1494 | Normally, the file name given to these commands comes at the end of | 1517 | shell command that @kbd{C-c C-p} runs to print the output is |
| 1495 | the command string; for example, @samp{latex @var{filename}}. In some | 1518 | determined by the variable @code{tex-dvi-print-command}. |
| 1496 | cases, however, the file name needs to be embedded in the command; an | 1519 | |
| 1497 | example is when you need to provide the file name as an argument to one | 1520 | Normally, Emacs automatically appends the output file name to the |
| 1498 | command whose output is piped to another. You can specify where to put | 1521 | shell command strings described in the preceding paragraph. For |
| 1499 | the file name with @samp{*} in the command string. For example, | 1522 | example, if @code{tex-dvi-view-command} is @code{"xdvi"}, @kbd{C-c |
| 1523 | C-v} runs @command{xdvi @var{output-file-name}}. In some cases, | ||
| 1524 | however, the file name needs to be embedded in the command, e.g.@: if | ||
| 1525 | you need to provide the file name as an argument to one command whose | ||
| 1526 | output is piped to another. You can specify where to put the file | ||
| 1527 | name with @samp{*} in the command string. For example, | ||
| 1500 | 1528 | ||
| 1501 | @example | 1529 | @example |
| 1502 | (setq tex-dvi-print-command "dvips -f * | lpr") | 1530 | (setq tex-dvi-print-command "dvips -f * | lpr") |
| @@ -1506,12 +1534,12 @@ the file name with @samp{*} in the command string. For example, | |||
| 1506 | @kindex C-c C-k @r{(@TeX{} mode)} | 1534 | @kindex C-c C-k @r{(@TeX{} mode)} |
| 1507 | @findex tex-recenter-output-buffer | 1535 | @findex tex-recenter-output-buffer |
| 1508 | @kindex C-c C-l @r{(@TeX{} mode)} | 1536 | @kindex C-c C-l @r{(@TeX{} mode)} |
| 1509 | The terminal output from @TeX{}, including any error messages, appears | 1537 | The terminal output from @TeX{}, including any error messages, |
| 1510 | in a buffer called @samp{*tex-shell*}. If @TeX{} gets an error, you can | 1538 | appears in a buffer called @samp{*tex-shell*}. If @TeX{} gets an |
| 1511 | switch to this buffer and feed it input (this works as in Shell mode; | 1539 | error, you can switch to this buffer and feed it input (this works as |
| 1512 | @pxref{Interactive Shell}). Without switching to this buffer you can | 1540 | in Shell mode; @pxref{Interactive Shell}). Without switching to this |
| 1513 | scroll it so that its last line is visible by typing @kbd{C-c | 1541 | buffer you can scroll it so that its last line is visible by typing |
| 1514 | C-l}. | 1542 | @kbd{C-c C-l}. |
| 1515 | 1543 | ||
| 1516 | Type @kbd{C-c C-k} (@code{tex-kill-job}) to kill the @TeX{} process if | 1544 | Type @kbd{C-c C-k} (@code{tex-kill-job}) to kill the @TeX{} process if |
| 1517 | you see that its output is no longer useful. Using @kbd{C-c C-b} or | 1545 | you see that its output is no longer useful. Using @kbd{C-c C-b} or |
| @@ -1519,14 +1547,14 @@ you see that its output is no longer useful. Using @kbd{C-c C-b} or | |||
| 1519 | 1547 | ||
| 1520 | @findex tex-region | 1548 | @findex tex-region |
| 1521 | @kindex C-c C-r @r{(@TeX{} mode)} | 1549 | @kindex C-c C-r @r{(@TeX{} mode)} |
| 1522 | You can also pass an arbitrary region through an inferior @TeX{} by typing | 1550 | You can also pass an arbitrary region through @TeX{} by typing |
| 1523 | @kbd{C-c C-r} (@code{tex-region}). This is tricky, however, because most files | 1551 | @kbd{C-c C-r} (@code{tex-region}). This is tricky, however, because |
| 1524 | of @TeX{} input contain commands at the beginning to set parameters and | 1552 | most files of @TeX{} input contain commands at the beginning to set |
| 1525 | define macros, without which no later part of the file will format | 1553 | parameters and define macros, without which no later part of the file |
| 1526 | correctly. To solve this problem, @kbd{C-c C-r} allows you to designate a | 1554 | will format correctly. To solve this problem, @kbd{C-c C-r} allows |
| 1527 | part of the file as containing essential commands; it is included before | 1555 | you to designate a part of the file as containing essential commands; |
| 1528 | the specified region as part of the input to @TeX{}. The designated part | 1556 | it is included before the specified region as part of the input to |
| 1529 | of the file is called the @dfn{header}. | 1557 | @TeX{}. The designated part of the file is called the @dfn{header}. |
| 1530 | 1558 | ||
| 1531 | @cindex header (@TeX{} mode) | 1559 | @cindex header (@TeX{} mode) |
| 1532 | To indicate the bounds of the header in Plain @TeX{} mode, you insert two | 1560 | To indicate the bounds of the header in Plain @TeX{} mode, you insert two |
| @@ -1624,29 +1652,6 @@ keys (@pxref{Completion}). | |||
| 1624 | The commands @kbd{M-x iso-iso2tex}, @kbd{M-x iso-tex2iso}, @kbd{M-x | 1652 | The commands @kbd{M-x iso-iso2tex}, @kbd{M-x iso-tex2iso}, @kbd{M-x |
| 1625 | iso-iso2gtex} and @kbd{M-x iso-gtex2iso} can be used to convert | 1653 | iso-iso2gtex} and @kbd{M-x iso-gtex2iso} can be used to convert |
| 1626 | between Latin-1 encoded files and @TeX{}-encoded equivalents. | 1654 | between Latin-1 encoded files and @TeX{}-encoded equivalents. |
| 1627 | @ignore | ||
| 1628 | @c Too cryptic to be useful, too cryptic for me to make it better -- rms. | ||
| 1629 | They | ||
| 1630 | are included by default in the @code{format-alist} variable, so they | ||
| 1631 | can be used with @kbd{M-x format-find-file}, for instance. | ||
| 1632 | @end ignore | ||
| 1633 | |||
| 1634 | @ignore @c Not worth documenting if it is only for Czech -- rms. | ||
| 1635 | @findex tildify-buffer | ||
| 1636 | @findex tildify-region | ||
| 1637 | @cindex ties, @TeX{}, inserting | ||
| 1638 | @cindex hard spaces, @TeX{}, inserting | ||
| 1639 | The commands @kbd{M-x tildify-buffer} and @kbd{M-x tildify-region} | ||
| 1640 | insert @samp{~} (@dfn{tie}) characters where they are conventionally | ||
| 1641 | required. This is set up for Czech---customize the group | ||
| 1642 | @samp{tildify} for other languages or for other sorts of markup. | ||
| 1643 | @end ignore | ||
| 1644 | |||
| 1645 | @cindex Ref@TeX{} package | ||
| 1646 | @cindex references, La@TeX{} | ||
| 1647 | @cindex La@TeX{} references | ||
| 1648 | For managing all kinds of references for La@TeX{}, you can use | ||
| 1649 | Ref@TeX{}. @inforef{Top,, reftex}. | ||
| 1650 | 1655 | ||
| 1651 | @node HTML Mode | 1656 | @node HTML Mode |
| 1652 | @section SGML and HTML Modes | 1657 | @section SGML and HTML Modes |
| @@ -1749,22 +1754,27 @@ used as a cheap preview (@code{sgml-tags-invisible}). | |||
| 1749 | @cindex mode, nXML | 1754 | @cindex mode, nXML |
| 1750 | @findex nxml-mode | 1755 | @findex nxml-mode |
| 1751 | @cindex XML schema | 1756 | @cindex XML schema |
| 1752 | The default mode for editing XML documents is called nXML mode | 1757 | The major mode for editing XML documents is called nXML mode. This |
| 1753 | (@code{xml-mode} or @code{nxml-mode}). This is a powerful major mode | 1758 | is a powerful major mode that can recognize many existing XML schema |
| 1754 | that can recognize many existing XML schema and use them to provide | 1759 | and use them to provide completion of XML elements via |
| 1755 | completion of XML elements via @kbd{C-@key{RET}} or @kbd{M-@key{TAB}}, | 1760 | @kbd{C-@key{RET}} or @kbd{M-@key{TAB}}, as well as ``on-the-fly'' XML |
| 1756 | as well as ``on-the-fly'' XML validation with error highlighting. It | 1761 | validation with error highlighting. To enable nXML mode in an |
| 1757 | is described in its own manual. @xref{Top, nXML Mode,,nxml-mode, nXML | 1762 | existing buffer, type @kbd{M-x nxml-mode}, or, equivalently, @kbd{M-x |
| 1758 | Mode}. | 1763 | xml-mode}. Emacs uses nXML mode for files which have the extension |
| 1764 | @file{.xml}. For XHTML files, which have the extension @file{.xhtml}, | ||
| 1765 | Emacs uses HTML mode by default; you can make it use nXML mode by | ||
| 1766 | customizing the variable @code{auto-mode-alist} (@pxref{Choosing | ||
| 1767 | Modes}). nXML mode is described in its own manual: @xref{Top, nXML | ||
| 1768 | Mode,,nxml-mode, nXML Mode}. | ||
| 1759 | 1769 | ||
| 1760 | @vindex sgml-xml-mode | 1770 | @vindex sgml-xml-mode |
| 1761 | However, you can also use SGML mode to edit XML, since XML is a | 1771 | You may choose to use the less powerful SGML mode for editing XML, |
| 1762 | strict subset of SGML. In XML, every opening tag must have an | 1772 | since XML is a strict subset of SGML. To enable SGML mode in an |
| 1763 | explicit closing tag. When the variable @code{sgml-xml-mode} is | 1773 | existing buffer, type @kbd{M-x sgml-mode}. On enabling SGML mode, |
| 1764 | non-@code{nil}, the tag insertion commands described above always | 1774 | Emacs examines the buffer to determine whether it is XML; if so, it |
| 1765 | insert explicit closing tags as well. When you visit a file in SGML | 1775 | sets the variable @code{sgml-xml-mode} to a non-@code{nil} value. |
| 1766 | mode, Emacs determines whether it is XML by examining the file | 1776 | This causes SGML mode's tag insertion commands, described above, to |
| 1767 | contents, and sets @code{sgml-xml-mode} accordingly. | 1777 | always insert explicit closing tags as well. |
| 1768 | 1778 | ||
| 1769 | @node Nroff Mode | 1779 | @node Nroff Mode |
| 1770 | @section Nroff Mode | 1780 | @section Nroff Mode |
| @@ -1815,86 +1825,84 @@ header level). | |||
| 1815 | Entering Nroff mode runs the hook @code{text-mode-hook}, followed by | 1825 | Entering Nroff mode runs the hook @code{text-mode-hook}, followed by |
| 1816 | the hook @code{nroff-mode-hook} (@pxref{Hooks}). | 1826 | the hook @code{nroff-mode-hook} (@pxref{Hooks}). |
| 1817 | 1827 | ||
| 1818 | @node Formatted Text | 1828 | @node Enriched Text |
| 1819 | @section Editing Formatted Text | 1829 | @section Enriched Text |
| 1820 | |||
| 1821 | @cindex Enriched mode | 1830 | @cindex Enriched mode |
| 1822 | @cindex mode, Enriched | 1831 | @cindex mode, Enriched |
| 1823 | @cindex formatted text | 1832 | @cindex enriched text |
| 1824 | @cindex WYSIWYG | 1833 | @cindex WYSIWYG |
| 1825 | @cindex word processing | 1834 | @cindex word processing |
| 1826 | @dfn{Enriched mode} is a minor mode for editing files that contain | 1835 | @cindex text/enriched MIME format |
| 1827 | formatted text in WYSIWYG fashion, as in a word processor. Currently, | ||
| 1828 | formatted text in Enriched mode can specify fonts, colors, underlining, | ||
| 1829 | margins, and types of filling and justification. In the future, we plan | ||
| 1830 | to implement other formatting features as well. | ||
| 1831 | 1836 | ||
| 1832 | Enriched mode is a minor mode (@pxref{Minor Modes}). It is | 1837 | Enriched mode is a minor mode for editing formatted text files in a |
| 1833 | typically used in conjunction with Text mode (@pxref{Text Mode}), but | 1838 | WYSIWYG (``what you see is what you get'') fashion. When Enriched |
| 1834 | you can also use it with other major modes such as Outline mode and | 1839 | mode is enabled, you can apply various formatting properties to the |
| 1835 | Paragraph-Indent Text mode. | 1840 | text in the buffer, such as fonts and colors; upon saving the buffer, |
| 1841 | those properties are saved together with the text, using the MIME | ||
| 1842 | @samp{text/enriched} file format. | ||
| 1836 | 1843 | ||
| 1837 | @cindex text/enriched MIME format | 1844 | Enriched mode is typically used with Text mode (@pxref{Text Mode}). |
| 1838 | Potentially, Emacs can store formatted text files in various file | 1845 | It is @emph{not} compatible with Font Lock mode, which is used by many |
| 1839 | formats. Currently, only one format is implemented: @dfn{text/enriched} | 1846 | major modes, including most programming language modes, for syntax |
| 1840 | format, which is defined by the MIME protocol. @xref{Format | 1847 | highlighting (@pxref{Font Lock}). Unlike Enriched mode, Font Lock |
| 1841 | Conversion,, Format Conversion, elisp, the Emacs Lisp Reference Manual}, | 1848 | mode assigns text properties automatically, based on the current |
| 1842 | for details of how Emacs recognizes and converts file formats. | 1849 | buffer contents; those properties are not saved to disk. |
| 1843 | 1850 | ||
| 1844 | The Emacs distribution contains a formatted text file that can serve as | 1851 | The file @file{etc/enriched.doc} in the Emacs distribution serves as |
| 1845 | an example. Its name is @file{etc/enriched.doc}. It contains samples | 1852 | an example of the features of Enriched mode. |
| 1846 | illustrating all the features described in this section. It also | ||
| 1847 | contains a list of ideas for future enhancements. | ||
| 1848 | 1853 | ||
| 1849 | @menu | 1854 | @menu |
| 1850 | * Requesting Formatted Text:: Entering and exiting Enriched mode. | 1855 | * Enriched Mode:: Entering and exiting Enriched mode. |
| 1851 | * Hard and Soft Newlines:: There are two different kinds of newlines. | 1856 | * Hard and Soft Newlines:: There are two different kinds of newlines. |
| 1852 | * Editing Format Info:: How to edit text properties. | 1857 | * Editing Format Info:: How to edit text properties. |
| 1853 | * Faces: Format Faces. Bold, italic, underline, etc. | 1858 | * Enriched Faces:: Bold, italic, underline, etc. |
| 1854 | * Color: Format Colors. Changing the color of text. | 1859 | * Enriched Indentation:: Changing the left and right margins. |
| 1855 | * Indent: Format Indentation. Changing the left and right margins. | 1860 | * Enriched Justification:: Centering, setting text flush with the |
| 1856 | * Justification: Format Justification. | 1861 | left or right margin, etc. |
| 1857 | Centering, setting text flush with the | 1862 | * Enriched Properties:: The "special" text properties submenu. |
| 1858 | left or right margin, etc. | ||
| 1859 | * Special: Format Properties. The "special" text properties submenu. | ||
| 1860 | * Forcing Enriched Mode:: How to force use of Enriched mode. | ||
| 1861 | @end menu | 1863 | @end menu |
| 1862 | 1864 | ||
| 1863 | @node Requesting Formatted Text | 1865 | @node Enriched Mode |
| 1864 | @subsection Requesting to Edit Formatted Text | 1866 | @subsection Enriched Mode |
| 1865 | 1867 | ||
| 1866 | Whenever you visit a file that Emacs saved in the text/enriched | 1868 | Enriched mode is a buffer-local minor mode (@pxref{Minor Modes}). |
| 1867 | format, Emacs automatically converts the formatting information in the | 1869 | When you visit a file that has been saved in the @samp{text/enriched} |
| 1868 | file into Emacs's own internal format (known as @dfn{text | 1870 | format, Emacs automatically enables Enriched mode, and applies the |
| 1869 | properties}), and turns on Enriched mode. | 1871 | formatting information in the file to the buffer text. When you save |
| 1872 | a buffer with Enriched mode enabled, it is saved using the | ||
| 1873 | @samp{text/enriched} format, including the formatting information. | ||
| 1870 | 1874 | ||
| 1871 | @findex enriched-mode | 1875 | @findex enriched-mode |
| 1872 | To create a new file of formatted text, first visit the nonexistent | 1876 | To create a new file of formatted text, visit the nonexistent file |
| 1873 | file, then type @kbd{M-x enriched-mode} before you start inserting text. | 1877 | and type @kbd{M-x enriched-mode}. This command actually toggles |
| 1874 | This command turns on Enriched mode. Do this before you begin inserting | 1878 | Enriched mode. With a prefix argument, it enables Enriched mode if |
| 1875 | text, to ensure that the text you insert is handled properly. | 1879 | the argument is positive, and disables Enriched mode otherwise. If |
| 1876 | 1880 | you disable Enriched mode, Emacs no longer saves the buffer using the | |
| 1877 | More generally, the command @code{enriched-mode} turns Enriched mode | 1881 | @samp{text/enriched} format; any formatting properties that have been |
| 1878 | on if it was off, and off if it was on. With a prefix argument, this | 1882 | added to the buffer remain in the buffer, but they are not saved to |
| 1879 | command turns Enriched mode on if the argument is positive, and turns | 1883 | disk. |
| 1880 | the mode off otherwise. | ||
| 1881 | |||
| 1882 | When you save a buffer while Enriched mode is enabled in it, Emacs | ||
| 1883 | automatically converts the text to text/enriched format while writing it | ||
| 1884 | into the file. When you visit the file again, Emacs will automatically | ||
| 1885 | recognize the format, reconvert the text, and turn on Enriched mode | ||
| 1886 | again. | ||
| 1887 | 1884 | ||
| 1888 | @vindex enriched-translations | 1885 | @vindex enriched-translations |
| 1889 | You can add annotations for saving additional text properties, which | 1886 | Enriched mode does not save all Emacs text properties, only those |
| 1890 | Emacs normally does not save, by adding to @code{enriched-translations}. | 1887 | specified in the variable @code{enriched-translations}. These include |
| 1891 | Note that the text/enriched standard requires any non-standard | 1888 | properties for fonts, colors, indentation, and justification. |
| 1892 | annotations to have names starting with @samp{x-}, as in | 1889 | |
| 1893 | @samp{x-read-only}. This ensures that they will not conflict with | 1890 | @findex format-decode-buffer |
| 1894 | standard annotations that may be added later. | 1891 | If you visit a file and Emacs fails to recognize that it is in the |
| 1895 | 1892 | @samp{text/enriched} format, type @kbd{M-x format-decode-buffer}. | |
| 1896 | @xref{Text Properties,,, elisp, the Emacs Lisp Reference Manual}, | 1893 | This command prompts for a file format, and re-reads the file in that |
| 1897 | for more information about text properties. | 1894 | format. Specifying the @samp{text/enriched} format automatically |
| 1895 | enables Enriched mode. | ||
| 1896 | |||
| 1897 | To view a @samp{text/enriched} file in raw form (as plain text with | ||
| 1898 | markup tags rather than formatted text), use @kbd{M-x | ||
| 1899 | find-file-literally} (@pxref{Visiting}). | ||
| 1900 | |||
| 1901 | @xref{Format Conversion,, Format Conversion, elisp, the Emacs Lisp | ||
| 1902 | Reference Manual}, for details of how Emacs recognizes and converts | ||
| 1903 | file formats like @samp{text/enriched}. @xref{Text Properties,,, | ||
| 1904 | elisp, the Emacs Lisp Reference Manual}, for more information about | ||
| 1905 | text properties. | ||
| 1898 | 1906 | ||
| 1899 | @node Hard and Soft Newlines | 1907 | @node Hard and Soft Newlines |
| 1900 | @subsection Hard and Soft Newlines | 1908 | @subsection Hard and Soft Newlines |
| @@ -1903,56 +1911,44 @@ for more information about text properties. | |||
| 1903 | @cindex newlines, hard and soft | 1911 | @cindex newlines, hard and soft |
| 1904 | 1912 | ||
| 1905 | @cindex use-hard-newlines | 1913 | @cindex use-hard-newlines |
| 1906 | In formatted text, Emacs distinguishes between two different kinds of | 1914 | In Enriched mode, Emacs distinguishes between two different kinds of |
| 1907 | newlines, @dfn{hard} newlines and @dfn{soft} newlines. (You can enable | 1915 | newlines, @dfn{hard} newlines and @dfn{soft} newlines. You can also |
| 1908 | or disable this feature separately in any buffer with the command | 1916 | enable or disable this feature in other buffers, by typing @kbd{M-x |
| 1909 | @code{use-hard-newlines}.) | 1917 | use-hard-newlines}. |
| 1910 | 1918 | ||
| 1911 | Hard newlines are used to separate paragraphs, or items in a list, or | 1919 | Hard newlines are used to separate paragraphs, or anywhere there |
| 1912 | anywhere that there should always be a line break regardless of the | 1920 | needs to be a line break regardless of how the text is filled; soft |
| 1913 | margins. The @key{RET} command (@code{newline}) and @kbd{C-o} | 1921 | newlines are used for filling. The @key{RET} (@code{newline}) and |
| 1914 | (@code{open-line}) insert hard newlines. | 1922 | @kbd{C-o} (@code{open-line}) commands insert hard newlines. The fill |
| 1915 | 1923 | commands, including Auto Fill (@pxref{Auto Fill}), insert only soft | |
| 1916 | Soft newlines are used to make text fit between the margins. All the | 1924 | newlines and delete only soft newlines, leaving hard newlines alone. |
| 1917 | fill commands, including Auto Fill, insert soft newlines---and they | 1925 | |
| 1918 | delete only soft newlines. | 1926 | Thus, when editing with Enriched mode, you should not use @key{RET} |
| 1919 | 1927 | or @kbd{C-o} to break lines in the middle of filled paragraphs. Use | |
| 1920 | Although hard and soft newlines look the same, it is important to bear | 1928 | Auto Fill mode or explicit fill commands (@pxref{Fill Commands}) |
| 1921 | the difference in mind. Do not use @key{RET} to break lines in the | 1929 | instead. Use @key{RET} or @kbd{C-o} where line breaks should always |
| 1922 | middle of filled paragraphs, or else you will get hard newlines that are | 1930 | remain, such as in tables and lists. For such lines, you may also |
| 1923 | barriers to further filling. Instead, let Auto Fill mode break lines, | 1931 | want to set the justification style to @code{unfilled} |
| 1924 | so that if the text or the margins change, Emacs can refill the lines | 1932 | (@pxref{Enriched Justification}). |
| 1925 | properly. @xref{Auto Fill}. | ||
| 1926 | |||
| 1927 | On the other hand, in tables and lists, where the lines should always | ||
| 1928 | remain as you type them, you can use @key{RET} to end lines. For these | ||
| 1929 | lines, you may also want to set the justification style to | ||
| 1930 | @code{unfilled}. @xref{Format Justification}. | ||
| 1931 | 1933 | ||
| 1932 | @node Editing Format Info | 1934 | @node Editing Format Info |
| 1933 | @subsection Editing Format Information | 1935 | @subsection Editing Format Information |
| 1934 | 1936 | ||
| 1935 | There are two ways to alter the formatting information for a formatted | 1937 | The easiest way to alter properties is with the Text Properties |
| 1936 | text file: with keyboard commands, and with the mouse. | 1938 | menu. You can get to this menu from the Edit menu in the menu bar |
| 1937 | 1939 | (@pxref{Menu Bar}), or with @kbd{C-Mouse-2} (@pxref{Menu Mouse | |
| 1938 | The easiest way to add properties to your document is with the Text | 1940 | Clicks}). Some of the commands in the Text Properties menu are listed |
| 1939 | Properties menu. You can get to this menu in two ways: from the Edit | 1941 | below (you can also invoke them with @kbd{M-x}): |
| 1940 | menu in the menu bar (use @kbd{@key{F10} e t} if you have no mouse), | ||
| 1941 | or with @kbd{C-Mouse-2} (hold the @key{CTRL} key and press the middle | ||
| 1942 | mouse button). There are also keyboard commands described in the | ||
| 1943 | following section. | ||
| 1944 | |||
| 1945 | These items in the Text Properties menu run commands directly: | ||
| 1946 | 1942 | ||
| 1947 | @table @code | 1943 | @table @code |
| 1948 | @findex facemenu-remove-face-props | 1944 | @findex facemenu-remove-face-props |
| 1949 | @item Remove Face Properties | 1945 | @item Remove Face Properties |
| 1950 | Delete from the region all face and color text properties | 1946 | Remove face properties from the region |
| 1951 | (@code{facemenu-remove-face-props}). | 1947 | (@code{facemenu-remove-face-props}). |
| 1952 | 1948 | ||
| 1953 | @findex facemenu-remove-all | 1949 | @findex facemenu-remove-all |
| 1954 | @item Remove Text Properties | 1950 | @item Remove Text Properties |
| 1955 | Delete @emph{all} text properties from the region | 1951 | Remove all text properties from the region, including face properties |
| 1956 | (@code{facemenu-remove-all}). | 1952 | (@code{facemenu-remove-all}). |
| 1957 | 1953 | ||
| 1958 | @findex describe-text-properties | 1954 | @findex describe-text-properties |
| @@ -1961,168 +1957,98 @@ Delete @emph{all} text properties from the region | |||
| 1961 | @cindex widgets at buffer position | 1957 | @cindex widgets at buffer position |
| 1962 | @cindex buttons at buffer position | 1958 | @cindex buttons at buffer position |
| 1963 | @item Describe Properties | 1959 | @item Describe Properties |
| 1964 | List all the text properties, widgets, buttons, and overlays of the | 1960 | List all text properties and other information about the character |
| 1965 | character following point (@code{describe-text-properties}). | 1961 | following point (@code{describe-text-properties}). |
| 1966 | 1962 | ||
| 1967 | @item Display Faces | 1963 | @item Display Faces |
| 1968 | Display a list of all the defined faces (@code{list-faces-display}). | 1964 | Display a list of defined faces (@code{list-faces-display}). |
| 1965 | @xref{Faces}. | ||
| 1969 | 1966 | ||
| 1970 | @item Display Colors | 1967 | @item Display Colors |
| 1971 | Display a list of all the defined colors (@code{list-colors-display}). | 1968 | Display a list of defined colors (@code{list-colors-display}). |
| 1969 | @xref{Colors}. | ||
| 1972 | @end table | 1970 | @end table |
| 1973 | 1971 | ||
| 1974 | @ifinfo | 1972 | @noindent |
| 1975 | Other items in the Text Properties menu lead to submenus: | 1973 | The other menu entries are described in the following sections. |
| 1976 | |||
| 1977 | @menu | ||
| 1978 | * Faces: Format Faces. Bold, italic, underline, etc. | ||
| 1979 | * Color: Format Colors. Changing the color of text. | ||
| 1980 | * Indent: Format Indentation. Changing the left and right margins. | ||
| 1981 | * Justification: Format Justification. | ||
| 1982 | Centering, setting text flush with the | ||
| 1983 | left or right margin, etc. | ||
| 1984 | * Special: Format Properties. The "special" text properties submenu. | ||
| 1985 | @end menu | ||
| 1986 | @end ifinfo | ||
| 1987 | @ifnotinfo | ||
| 1988 | The rest lead to submenus which are described in the following sections. | ||
| 1989 | @end ifnotinfo | ||
| 1990 | |||
| 1991 | @node Format Faces | ||
| 1992 | @subsection Faces in Formatted Text | ||
| 1993 | 1974 | ||
| 1994 | The Faces submenu under Text Properties lists various Emacs faces | 1975 | @node Enriched Faces |
| 1995 | including @code{bold}, @code{italic}, and @code{underline} | 1976 | @subsection Faces in Enriched Text |
| 1996 | (@pxref{Faces}). These menu items operate on the region if it is | ||
| 1997 | active and nonempty. Otherwise, they specify to use that face for an | ||
| 1998 | immediately following self-inserting character. There is also an item | ||
| 1999 | @samp{Other} with which you can enter a face name through the | ||
| 2000 | minibuffer (@pxref{Standard Faces}). | ||
| 2001 | 1977 | ||
| 2002 | Instead of the Faces submenu, you can use these keyboard commands: | 1978 | The following commands can be used to add or remove faces |
| 1979 | (@pxref{Faces}). Each applies to the text in the region if the mark | ||
| 1980 | is active, and to the next self-inserting character if the mark is | ||
| 1981 | inactive. With a prefix argument, each command applies to the next | ||
| 1982 | self-inserting character even if the region is active. | ||
| 2003 | 1983 | ||
| 2004 | @table @kbd | 1984 | @table @kbd |
| 2005 | @kindex M-o d @r{(Enriched mode)} | 1985 | @kindex M-o d @r{(Enriched mode)} |
| 2006 | @findex facemenu-set-default | 1986 | @findex facemenu-set-default |
| 2007 | @item M-o d | 1987 | @item M-o d |
| 2008 | Remove all @code{face} properties from the region (which includes | 1988 | Remove all @code{face} properties (@code{facemenu-set-default}). |
| 2009 | specified colors), or force the following inserted character to have no | 1989 | |
| 2010 | @code{face} property (@code{facemenu-set-default}). | ||
| 2011 | @kindex M-o b @r{(Enriched mode)} | 1990 | @kindex M-o b @r{(Enriched mode)} |
| 2012 | @findex facemenu-set-bold | 1991 | @findex facemenu-set-bold |
| 2013 | @item M-o b | 1992 | @item M-o b |
| 2014 | Add the face @code{bold} to the region or to the following inserted | 1993 | Apply the @code{bold} face (@code{facemenu-set-bold}). |
| 2015 | character (@code{facemenu-set-bold}). | 1994 | |
| 2016 | @kindex M-o i @r{(Enriched mode)} | 1995 | @kindex M-o i @r{(Enriched mode)} |
| 2017 | @findex facemenu-set-italic | 1996 | @findex facemenu-set-italic |
| 2018 | @item M-o i | 1997 | @item M-o i |
| 2019 | Add the face @code{italic} to the region or to the following inserted | 1998 | Apply the @code{italic} face (@code{facemenu-set-italic}). |
| 2020 | character (@code{facemenu-set-italic}). | 1999 | |
| 2021 | @kindex M-o l @r{(Enriched mode)} | 2000 | @kindex M-o l @r{(Enriched mode)} |
| 2022 | @findex facemenu-set-bold-italic | 2001 | @findex facemenu-set-bold-italic |
| 2023 | @item M-o l | 2002 | @item M-o l |
| 2024 | Add the face @code{bold-italic} to the region or to the following | 2003 | Apply the @code{bold-italic} face (@code{facemenu-set-bold-italic}). |
| 2025 | inserted character (@code{facemenu-set-bold-italic}). | 2004 | |
| 2026 | @kindex M-o u @r{(Enriched mode)} | 2005 | @kindex M-o u @r{(Enriched mode)} |
| 2027 | @findex facemenu-set-underline | 2006 | @findex facemenu-set-underline |
| 2028 | @item M-o u | 2007 | @item M-o u |
| 2029 | Add the face @code{underline} to the region or to the following inserted | 2008 | Apply the @code{underline} face (@code{facemenu-set-underline}). |
| 2030 | character (@code{facemenu-set-underline}). | 2009 | |
| 2031 | @kindex M-o o @r{(Enriched mode)} | 2010 | @kindex M-o o @r{(Enriched mode)} |
| 2032 | @findex facemenu-set-face | 2011 | @findex facemenu-set-face |
| 2033 | @item M-o o @var{face} @key{RET} | 2012 | @item M-o o @var{face} @key{RET} |
| 2034 | Add the face @var{face} to the region or to the following inserted | 2013 | Apply the face @var{face} (@code{facemenu-set-face}). |
| 2035 | character (@code{facemenu-set-face}). | ||
| 2036 | @end table | ||
| 2037 | 2014 | ||
| 2038 | With a prefix argument, all these commands apply to an immediately | 2015 | @findex facemenu-set-foreground |
| 2039 | following self-inserting character, disregarding the region. | 2016 | @item M-x facemenu-set-foreground |
| 2017 | Prompt for a color (@pxref{Colors}), and apply it as a foreground | ||
| 2018 | color. | ||
| 2040 | 2019 | ||
| 2041 | A self-inserting character normally inherits the @code{face} | 2020 | @findex facemenu-set-background |
| 2042 | property (and most other text properties) from the preceding character | 2021 | @item M-x facemenu-set-background |
| 2043 | in the buffer. If you use the above commands to specify face for the | 2022 | Prompt for a color, and apply it as a background color. |
| 2044 | next self-inserting character, or the next section's commands to | 2023 | @end table |
| 2045 | specify a foreground or background color for it, then it does not | ||
| 2046 | inherit the @code{face} property from the preceding character; instead | ||
| 2047 | it uses whatever you specified. It will still inherit other text | ||
| 2048 | properties, though. | ||
| 2049 | 2024 | ||
| 2050 | Strictly speaking, these commands apply only to the first following | 2025 | @noindent |
| 2051 | self-inserting character that you type. But if you insert additional | 2026 | These command are also available via the Text Properties menu. |
| 2052 | characters after it, they will inherit from the first one. So it | ||
| 2053 | appears that these commands apply to all of them. | ||
| 2054 | 2027 | ||
| 2055 | Enriched mode defines two additional faces: @code{excerpt} and | 2028 | A self-inserting character normally inherits the face properties |
| 2056 | @code{fixed}. These correspond to codes used in the text/enriched file | 2029 | (and most other text properties) from the preceding character in the |
| 2057 | format. | 2030 | buffer. If you use one of the above commands to specify the face for |
| 2058 | 2031 | the next self-inserting character, that character will not inherit the | |
| 2059 | The @code{excerpt} face is intended for quotations. This face is the | 2032 | faces properties from the preceding character, but it will still |
| 2060 | same as @code{italic} unless you customize it (@pxref{Face Customization}). | 2033 | inherit other text properties. |
| 2061 | |||
| 2062 | The @code{fixed} face means, ``Use a fixed-width font for this part | ||
| 2063 | of the text.'' Applying the @code{fixed} face to a part of the text | ||
| 2064 | will cause that part of the text to appear in a fixed-width font, even | ||
| 2065 | if the default font is variable-width. This applies to Emacs and to | ||
| 2066 | other systems that display text/enriched format. So if you | ||
| 2067 | specifically want a certain part of the text to use a fixed-width | ||
| 2068 | font, you should specify the @code{fixed} face for that part. | ||
| 2069 | |||
| 2070 | By default, the @code{fixed} face looks the same as @code{bold}. | ||
| 2071 | This is an attempt to distinguish it from @code{default}. You may | ||
| 2072 | wish to customize @code{fixed} to some other fixed-width medium font. | ||
| 2073 | @xref{Face Customization}. | ||
| 2074 | |||
| 2075 | If your terminal cannot display different faces, you will not be | ||
| 2076 | able to see them, but you can still edit documents containing faces, | ||
| 2077 | and even add faces and colors to documents. The faces you specify | ||
| 2078 | will be visible when the file is viewed on a terminal that can display | ||
| 2079 | them. | ||
| 2080 | |||
| 2081 | @node Format Colors | ||
| 2082 | @subsection Colors in Formatted Text | ||
| 2083 | |||
| 2084 | You can specify foreground and background colors for portions of the | ||
| 2085 | text. Under Text Properties, there is a submenu for specifying the | ||
| 2086 | foreground color, and a submenu for specifying the background color. | ||
| 2087 | Each one lists all the colors that you have used in Enriched mode in | ||
| 2088 | the current Emacs session. | ||
| 2089 | |||
| 2090 | If the region is active, the command applies to the text in the | ||
| 2091 | region; otherwise, it applies to any immediately following | ||
| 2092 | self-inserting input. When Transient Mark mode is off | ||
| 2093 | (@pxref{Disabled Transient Mark}), it always applies to the region | ||
| 2094 | unless a prefix argument is given, in which case it applies to the | ||
| 2095 | following input. | ||
| 2096 | |||
| 2097 | Each of the two color submenus contains one additional item: | ||
| 2098 | @samp{Other}. You can use this item to specify a color that is not | ||
| 2099 | listed in the menu; it reads the color name with the minibuffer. To | ||
| 2100 | display a list of available colors and their names, use the | ||
| 2101 | @samp{Display Colors} menu item in the Text Properties menu | ||
| 2102 | (@pxref{Editing Format Info}). | ||
| 2103 | |||
| 2104 | Any color that you specify in this way, or that is mentioned in a | ||
| 2105 | formatted text file that you read in, is added to the corresponding | ||
| 2106 | color menu for the duration of the Emacs session. | ||
| 2107 | 2034 | ||
| 2108 | @findex facemenu-set-foreground | 2035 | Enriched mode defines two additional faces: @code{excerpt} and |
| 2109 | @findex facemenu-set-background | 2036 | @code{fixed}. These correspond to codes used in the text/enriched |
| 2110 | There are no predefined key bindings for specifying colors, but you can do so | 2037 | file format. The @code{excerpt} face is intended for quotations; by |
| 2111 | with the extended commands @kbd{M-x facemenu-set-foreground} and | 2038 | default, it appears the same as @code{italic}. The @code{fixed} face |
| 2112 | @kbd{M-x facemenu-set-background}. Both of these commands read the name | 2039 | specifies fixed-width text; by default, it appears the same as |
| 2113 | of the color with the minibuffer. | 2040 | @code{bold}. |
| 2114 | 2041 | ||
| 2115 | @node Format Indentation | 2042 | @node Enriched Indentation |
| 2116 | @subsection Indentation in Formatted Text | 2043 | @subsection Indentation in Enriched Text |
| 2117 | 2044 | ||
| 2118 | When editing formatted text, you can specify different amounts of | 2045 | In Enriched mode, you can specify different amounts of indentation |
| 2119 | indentation for the right or left margin of an entire paragraph or a | 2046 | for the right or left margin of a paragraph or a part of a paragraph. |
| 2120 | part of a paragraph. The margins you specify automatically affect the | 2047 | These margins also affect fill commands such as @kbd{M-q} |
| 2121 | Emacs fill commands (@pxref{Filling}) and line-breaking commands. | 2048 | (@pxref{Filling}). |
| 2122 | 2049 | ||
| 2123 | The Indentation submenu of Text Properties provides a convenient | 2050 | The Indentation submenu of Text Properties provides four commands |
| 2124 | interface for specifying these properties. The submenu contains four | 2051 | for specifying indentation: |
| 2125 | items: | ||
| 2126 | 2052 | ||
| 2127 | @table @code | 2053 | @table @code |
| 2128 | @kindex C-x TAB @r{(Enriched mode)} | 2054 | @kindex C-x TAB @r{(Enriched mode)} |
| @@ -2143,44 +2069,20 @@ Make the text narrower by indenting 4 columns at the right margin. | |||
| 2143 | Remove 4 columns of indentation from the right margin. | 2069 | Remove 4 columns of indentation from the right margin. |
| 2144 | @end table | 2070 | @end table |
| 2145 | 2071 | ||
| 2146 | You can use these commands repeatedly to increase or decrease the | ||
| 2147 | indentation. | ||
| 2148 | |||
| 2149 | The most common way to use them is to change the indentation of an | ||
| 2150 | entire paragraph. For other uses, the effects of refilling can be | ||
| 2151 | hard to predict, except in some special cases like the one described | ||
| 2152 | next. | ||
| 2153 | |||
| 2154 | The most common other use is to format paragraphs with @dfn{hanging | ||
| 2155 | indents}, which means that the first line is indented less than | ||
| 2156 | subsequent lines. To set up a hanging indent, increase the | ||
| 2157 | indentation of the region starting after the first word of the | ||
| 2158 | paragraph and running until the end of the paragraph. | ||
| 2159 | |||
| 2160 | Indenting the first line of a paragraph is easier. Set the margin for | ||
| 2161 | the whole paragraph where you want it to be for the body of the | ||
| 2162 | paragraph, then indent the first line by inserting extra spaces or tabs. | ||
| 2163 | |||
| 2164 | @vindex standard-indent | 2072 | @vindex standard-indent |
| 2165 | The variable @code{standard-indent} specifies how many columns these | 2073 | The variable @code{standard-indent} specifies how many columns these |
| 2166 | commands should add to or subtract from the indentation. The default | 2074 | commands should add to or subtract from the indentation. The default |
| 2167 | value is 4. The overall default right margin for Enriched mode is | 2075 | value is 4. The default right margin for Enriched mode is controlled |
| 2168 | controlled by the variable @code{fill-column}, as usual. | 2076 | by the variable @code{fill-column}, as usual. |
| 2169 | 2077 | ||
| 2170 | @kindex C-c [ @r{(Enriched mode)} | 2078 | @kindex C-c [ @r{(Enriched mode)} |
| 2171 | @kindex C-c ] @r{(Enriched mode)} | 2079 | @kindex C-c ] @r{(Enriched mode)} |
| 2172 | @findex set-left-margin | 2080 | @findex set-left-margin |
| 2173 | @findex set-right-margin | 2081 | @findex set-right-margin |
| 2174 | There are also two commands for setting the left or right margin of | 2082 | You can also type @kbd{C-c [} (@code{set-left-margin}) and @kbd{C-c |
| 2175 | the region absolutely: @code{set-left-margin} and | 2083 | ]} (@code{set-right-margin}) to set the left and right margins. You |
| 2176 | @code{set-right-margin}. Enriched mode binds these commands to | 2084 | can specify the margin width with a numeric argument; otherwise these |
| 2177 | @kbd{C-c [} and @kbd{C-c ]}, respectively. You can specify the | 2085 | commands prompt for a value via the minibuffer. |
| 2178 | margin width either with a numeric argument or in the minibuffer. | ||
| 2179 | |||
| 2180 | Sometimes, as a result of editing, the filling of a paragraph becomes | ||
| 2181 | messed up---parts of the paragraph may extend past the left or right | ||
| 2182 | margins. When this happens, use @kbd{M-q} (@code{fill-paragraph}) to | ||
| 2183 | refill the paragraph. | ||
| 2184 | 2086 | ||
| 2185 | The fill prefix, if any, works in addition to the specified paragraph | 2087 | The fill prefix, if any, works in addition to the specified paragraph |
| 2186 | indentation: @kbd{C-x .} does not include the specified indentation's | 2088 | indentation: @kbd{C-x .} does not include the specified indentation's |
| @@ -2188,148 +2090,76 @@ whitespace in the new value for the fill prefix, and the fill commands | |||
| 2188 | look for the fill prefix after the indentation on each line. @xref{Fill | 2090 | look for the fill prefix after the indentation on each line. @xref{Fill |
| 2189 | Prefix}. | 2091 | Prefix}. |
| 2190 | 2092 | ||
| 2191 | @node Format Justification | 2093 | @node Enriched Justification |
| 2192 | @subsection Justification in Formatted Text | 2094 | @subsection Justification in Enriched Text |
| 2193 | |||
| 2194 | When editing formatted text, you can specify various styles of | ||
| 2195 | justification for a paragraph. The style you specify automatically | ||
| 2196 | affects the Emacs fill commands. | ||
| 2197 | 2095 | ||
| 2198 | The Justification submenu of Text Properties provides a convenient | 2096 | In Enriched mode, you can use the following commands to specify |
| 2199 | interface for specifying the style. The submenu contains five items: | 2097 | various @dfn{justification styles} for filling. These commands apply |
| 2200 | 2098 | to the paragraph containing point, or, if the region is active, to all | |
| 2201 | @table @code | 2099 | paragraphs overlapping the region. |
| 2202 | @item Left | ||
| 2203 | This is the most common style of justification (at least for English). | ||
| 2204 | Lines are aligned at the left margin but left uneven at the right. | ||
| 2205 | |||
| 2206 | @item Right | ||
| 2207 | This aligns each line with the right margin. Spaces and tabs are added | ||
| 2208 | on the left, if necessary, to make lines line up on the right. | ||
| 2209 | |||
| 2210 | @item Full | ||
| 2211 | This justifies the text, aligning both edges of each line. Justified | ||
| 2212 | text looks very nice in a printed book, where the spaces can all be | ||
| 2213 | adjusted equally, but it does not look as nice with a fixed-width font | ||
| 2214 | on the screen. Perhaps a future version of Emacs will be able to adjust | ||
| 2215 | the width of spaces in a line to achieve elegant justification. | ||
| 2216 | |||
| 2217 | @item Center | ||
| 2218 | This centers every line between the current margins. | ||
| 2219 | |||
| 2220 | @item Unfilled | ||
| 2221 | This turns off filling entirely. Each line will remain as you wrote it; | ||
| 2222 | the fill and auto-fill functions will have no effect on text which has | ||
| 2223 | this setting. You can, however, still indent the left margin. In | ||
| 2224 | unfilled regions, all newlines are treated as hard newlines (@pxref{Hard | ||
| 2225 | and Soft Newlines}) . | ||
| 2226 | @end table | ||
| 2227 | |||
| 2228 | In Enriched mode, you can also specify justification from the keyboard | ||
| 2229 | using the @kbd{M-j} prefix character: | ||
| 2230 | 2100 | ||
| 2231 | @table @kbd | 2101 | @table @kbd |
| 2232 | @kindex M-j l @r{(Enriched mode)} | 2102 | @kindex M-j l @r{(Enriched mode)} |
| 2233 | @findex set-justification-left | 2103 | @findex set-justification-left |
| 2234 | @item M-j l | 2104 | @item M-j l |
| 2235 | Make the region left-filled (@code{set-justification-left}). | 2105 | Align lines to the left margin (@code{set-justification-left}). |
| 2106 | |||
| 2236 | @kindex M-j r @r{(Enriched mode)} | 2107 | @kindex M-j r @r{(Enriched mode)} |
| 2237 | @findex set-justification-right | 2108 | @findex set-justification-right |
| 2238 | @item M-j r | 2109 | @item M-j r |
| 2239 | Make the region right-filled (@code{set-justification-right}). | 2110 | Align lines to the right margin (@code{set-justification-right}). |
| 2111 | |||
| 2240 | @kindex M-j b @r{(Enriched mode)} | 2112 | @kindex M-j b @r{(Enriched mode)} |
| 2241 | @findex set-justification-full | 2113 | @findex set-justification-full |
| 2242 | @item M-j b | 2114 | @item M-j b |
| 2243 | Make the region fully justified (@code{set-justification-full}). | 2115 | Align lines to both margins, inserting spaces in the middle of the |
| 2116 | line to achieve this (@code{set-justification-full}). | ||
| 2117 | |||
| 2244 | @kindex M-j c @r{(Enriched mode)} | 2118 | @kindex M-j c @r{(Enriched mode)} |
| 2245 | @kindex M-S @r{(Enriched mode)} | 2119 | @kindex M-S @r{(Enriched mode)} |
| 2246 | @findex set-justification-center | 2120 | @findex set-justification-center |
| 2247 | @item M-j c | 2121 | @item M-j c |
| 2248 | @itemx M-S | 2122 | @itemx M-S |
| 2249 | Make the region centered (@code{set-justification-center}). | 2123 | Center lines between the margins (@code{set-justification-center}). |
| 2124 | |||
| 2250 | @kindex M-j u @r{(Enriched mode)} | 2125 | @kindex M-j u @r{(Enriched mode)} |
| 2251 | @findex set-justification-none | 2126 | @findex set-justification-none |
| 2252 | @item M-j u | 2127 | @item M-j u |
| 2253 | Make the region unfilled (@code{set-justification-none}). | 2128 | Turn off filling entirely (@code{set-justification-none}). The fill |
| 2129 | commands do nothing on text with this setting. You can, however, | ||
| 2130 | still indent the left margin. | ||
| 2254 | @end table | 2131 | @end table |
| 2255 | 2132 | ||
| 2256 | Justification styles apply to entire paragraphs. All the | 2133 | You can also specify justification styles using the Justification |
| 2257 | justification-changing commands operate on the paragraph containing | 2134 | submenu in the Text Properties menu. |
| 2258 | point, or, if the region is active, on all paragraphs which overlap the | ||
| 2259 | region. | ||
| 2260 | 2135 | ||
| 2261 | @vindex default-justification | 2136 | @vindex default-justification |
| 2262 | The default justification style is specified by the variable | 2137 | The default justification style is specified by the per-buffer |
| 2263 | @code{default-justification}. Its value should be one of the symbols | 2138 | variable @code{default-justification}. Its value should be one of the |
| 2264 | @code{left}, @code{right}, @code{full}, @code{center}, or @code{none}. | 2139 | symbols @code{left}, @code{right}, @code{full}, @code{center}, or |
| 2265 | This is a per-buffer variable. Setting the variable directly affects | 2140 | @code{none}. |
| 2266 | only the current buffer. However, customizing it in a Custom buffer | ||
| 2267 | sets (as always) the default value for buffers that do not override it. | ||
| 2268 | @xref{Locals}, and @ref{Easy Customization}. | ||
| 2269 | |||
| 2270 | @node Format Properties | ||
| 2271 | @subsection Setting Other Text Properties | ||
| 2272 | |||
| 2273 | The Special Properties submenu of Text Properties can add or remove | ||
| 2274 | three other useful text properties: @code{read-only}, @code{invisible} | ||
| 2275 | and @code{intangible}. The @code{intangible} property disallows | ||
| 2276 | moving point within the text, the @code{invisible} text property hides | ||
| 2277 | text from display, and the @code{read-only} property disallows | ||
| 2278 | alteration of the text. | ||
| 2279 | |||
| 2280 | Each of these special properties has a menu item to add it to the | ||
| 2281 | region. The last menu item, @samp{Remove Special}, removes all of these | ||
| 2282 | special properties from the text in the region. | ||
| 2283 | |||
| 2284 | Currently, the @code{invisible} and @code{intangible} properties are | ||
| 2285 | @emph{not} saved in the text/enriched format. The @code{read-only} | ||
| 2286 | property is saved, but it is not a standard part of the text/enriched | ||
| 2287 | format, so other editors may not respect it. | ||
| 2288 | |||
| 2289 | @node Forcing Enriched Mode | ||
| 2290 | @subsection Forcing Enriched Mode | ||
| 2291 | 2141 | ||
| 2292 | Normally, Emacs knows when you are editing formatted text because it | 2142 | @node Enriched Properties |
| 2293 | recognizes the special annotations used in the file that you visited. | 2143 | @subsection Setting Other Text Properties |
| 2294 | However, sometimes you must take special actions to convert file | ||
| 2295 | contents or turn on Enriched mode: | ||
| 2296 | |||
| 2297 | @itemize @bullet | ||
| 2298 | @item | ||
| 2299 | When you visit a file that was created with some other editor, Emacs may | ||
| 2300 | not recognize the file as being in the text/enriched format. In this | ||
| 2301 | case, when you visit the file you will see the formatting commands | ||
| 2302 | rather than the formatted text. Type @kbd{M-x format-decode-buffer} to | ||
| 2303 | translate it. This also automatically turns on Enriched mode. | ||
| 2304 | 2144 | ||
| 2305 | @item | 2145 | The Special Properties submenu of Text Properties has entries for |
| 2306 | When you @emph{insert} a file into a buffer, rather than visiting it, | 2146 | adding or removing three other text properties: @code{read-only}, |
| 2307 | Emacs does the necessary conversions on the text which you insert, but | 2147 | (which disallows alteration of the text), @code{invisible} (which |
| 2308 | it does not enable Enriched mode. If you wish to do that, type @kbd{M-x | 2148 | hides text), and @code{intangible} (which disallows moving point |
| 2309 | enriched-mode}. | 2149 | within the text). The @samp{Remove Special} menu item removes all of |
| 2310 | @end itemize | 2150 | these special properties from the text in the region. |
| 2311 | 2151 | ||
| 2312 | The command @code{format-decode-buffer} translates text in various | 2152 | The @code{invisible} and @code{intangible} properties are @emph{not} |
| 2313 | formats into Emacs's internal format. It asks you to specify the format | 2153 | saved in the text/enriched format. The @code{read-only} property is |
| 2314 | to translate from; however, normally you can type just @key{RET}, which | 2154 | saved, but it is not a standard part of the text/enriched format, so |
| 2315 | tells Emacs to guess the format. | 2155 | other editors may not respect it. |
| 2316 | |||
| 2317 | @findex format-find-file | ||
| 2318 | If you wish to look at a text/enriched file in its raw form, as a | ||
| 2319 | sequence of characters rather than as formatted text, use the @kbd{M-x | ||
| 2320 | find-file-literally} command. This visits a file, like | ||
| 2321 | @code{find-file}, but does not do format conversion. It also inhibits | ||
| 2322 | character code conversion (@pxref{Coding Systems}) and automatic | ||
| 2323 | uncompression (@pxref{Compressed Files}). To disable format conversion | ||
| 2324 | but allow character code conversion and/or automatic uncompression if | ||
| 2325 | appropriate, use @code{format-find-file} with suitable arguments. | ||
| 2326 | 2156 | ||
| 2327 | @node Text Based Tables | 2157 | @node Text Based Tables |
| 2328 | @section Editing Text-based Tables | 2158 | @section Editing Text-based Tables |
| 2329 | @cindex table mode | 2159 | @cindex table mode |
| 2330 | @cindex text-based tables | 2160 | @cindex text-based tables |
| 2331 | 2161 | ||
| 2332 | Table mode provides an easy and intuitive way to create and edit WYSIWYG | 2162 | Table mode provides an easy and intuitive way to create and edit |
| 2333 | text-based tables. Here is an example of such a table: | 2163 | text-based tables. Here is an example of such a table: |
| 2334 | 2164 | ||
| 2335 | @smallexample | 2165 | @smallexample |
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index c2e65268d1b..b32b3d905e4 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi | |||
| @@ -306,14 +306,14 @@ Name to display in the title bar of the initial Emacs frame. | |||
| 306 | @item @code{toolBar} (class @code{ToolBar}) | 306 | @item @code{toolBar} (class @code{ToolBar}) |
| 307 | @cindex tool bar | 307 | @cindex tool bar |
| 308 | Number of lines to reserve for the tool bar. A zero value suppresses | 308 | Number of lines to reserve for the tool bar. A zero value suppresses |
| 309 | the tool bar. For the Emacs tool bar (i.e. not Gtk+), if the value is | 309 | the tool bar. For the Emacs tool bar (i.e.@: not Gtk+), if the value |
| 310 | non-zero and @code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's | 310 | is non-zero and @code{auto-resize-tool-bars} is non-@code{nil}, the |
| 311 | size will be changed automatically so that all tool bar items are visible. | 311 | tool bar's size will be changed automatically so that all tool bar |
| 312 | If the value of @code{auto-resize-tool-bars} is @code{grow-only}, | 312 | items are visible. If the value of @code{auto-resize-tool-bars} is |
| 313 | the tool bar expands automatically, but does not contract automatically. | 313 | @code{grow-only}, the tool bar expands automatically, but does not |
| 314 | To contract the tool bar, you must redraw the frame by entering @kbd{C-l}. | 314 | contract automatically. To contract the tool bar, you must redraw the |
| 315 | For the Gtk+ tool bar, any non-zero value means on and | 315 | frame by entering @kbd{C-l}. For the Gtk+ tool bar, any non-zero |
| 316 | @code{auto-resize-tool-bars} has no effect. | 316 | value means on and @code{auto-resize-tool-bars} has no effect. |
| 317 | 317 | ||
| 318 | @item @code{useXIM} (class @code{UseXIM}) | 318 | @item @code{useXIM} (class @code{UseXIM}) |
| 319 | @cindex XIM | 319 | @cindex XIM |
| @@ -641,17 +641,18 @@ The color for the border shadow, on the top and the left. | |||
| 641 | @node GTK resources | 641 | @node GTK resources |
| 642 | @appendixsec GTK resources | 642 | @appendixsec GTK resources |
| 643 | @iftex | 643 | @iftex |
| 644 | The most common way to customize the GTK widgets Emacs uses (menus, dialogs | 644 | The most common way to customize the GTK widgets Emacs uses (menus, |
| 645 | tool bars and scroll bars) is by choosing an appropriate theme, for example | 645 | dialogs tool bars and scroll bars) is by choosing an appropriate |
| 646 | with the GNOME theme selector. | 646 | theme, for example with the GNOME theme selector. |
| 647 | 647 | ||
| 648 | You can also do Emacs specific customization | 648 | You can also do Emacs specific customization by inserting GTK style |
| 649 | by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}, | 649 | directives in the file @file{~/.emacs.d/gtkrc}, but only if you have a |
| 650 | but only if you have a Gtk+ version earlier than 3 (i.e. 2). Some GTK | 650 | Gtk+ version earlier than 3 (i.e.@: 2). Some GTK themes ignore |
| 651 | themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything | 651 | customizations in @file{~/.emacs.d/gtkrc} so not everything works with |
| 652 | works with all themes. To customize Emacs font, background, faces, etc., use | 652 | all themes. To customize Emacs font, background, faces, etc., use the |
| 653 | the normal X resources (@pxref{Resources}). We will present some examples of | 653 | normal X resources (@pxref{Resources}). We will present some examples |
| 654 | customizations here, but for a more detailed description, see the online manual | 654 | of customizations here, but for a more detailed description, see the |
| 655 | online manual | ||
| 655 | 656 | ||
| 656 | The first example is just one line. It changes the font on all GTK widgets | 657 | The first example is just one line. It changes the font on all GTK widgets |
| 657 | to courier with size 12: | 658 | to courier with size 12: |
| @@ -1065,7 +1066,7 @@ possible states are: | |||
| 1065 | This is the default state for widgets. | 1066 | This is the default state for widgets. |
| 1066 | @item ACTIVE | 1067 | @item ACTIVE |
| 1067 | This is the state for a widget that is ready to do something. It is | 1068 | This is the state for a widget that is ready to do something. It is |
| 1068 | also for the trough of a scroll bar, i.e. @code{bg[ACTIVE] = "red"} | 1069 | also for the trough of a scroll bar, i.e.@: @code{bg[ACTIVE] = "red"} |
| 1069 | sets the scroll bar trough to red. Buttons that have been pressed but | 1070 | sets the scroll bar trough to red. Buttons that have been pressed but |
| 1070 | not released yet (``armed'') are in this state. | 1071 | not released yet (``armed'') are in this state. |
| 1071 | @item PRELIGHT | 1072 | @item PRELIGHT |
| @@ -1109,7 +1110,7 @@ You can't specify the file by its absolute file name. GTK looks for | |||
| 1109 | the pixmap file in directories specified in @code{pixmap_path}. | 1110 | the pixmap file in directories specified in @code{pixmap_path}. |
| 1110 | @code{pixmap_path} is a colon-separated list of directories within | 1111 | @code{pixmap_path} is a colon-separated list of directories within |
| 1111 | double quotes, specified at the top level in a @file{gtkrc} file | 1112 | double quotes, specified at the top level in a @file{gtkrc} file |
| 1112 | (i.e. not inside a style definition; see example above): | 1113 | (i.e.@: not inside a style definition; see example above): |
| 1113 | 1114 | ||
| 1114 | @smallexample | 1115 | @smallexample |
| 1115 | pixmap_path "/usr/share/pixmaps:/usr/include/X11/pixmaps" | 1116 | pixmap_path "/usr/share/pixmaps:/usr/include/X11/pixmaps" |
| @@ -1131,19 +1132,18 @@ Bold 12}, @samp{Courier 14}, @samp{Times 18}. See below for exact | |||
| 1131 | syntax. The names are case insensitive. | 1132 | syntax. The names are case insensitive. |
| 1132 | @end table | 1133 | @end table |
| 1133 | 1134 | ||
| 1134 | There are three ways to specify a color: by name, in hexadecimal | 1135 | There are three ways to specify a color: a color name, an RGB |
| 1135 | form, and with an RGB triplet. | 1136 | triplet, or a GTK-style RGB triplet. @xref{Colors}, for a description |
| 1137 | of color names and RGB triplets. Color names should be enclosed with | ||
| 1138 | double quotes, e.g.@: @samp{"red"}. RGB triplets should be written | ||
| 1139 | without double quotes, e.g.@: @samp{#ff0000}. GTK-style RGB triplets | ||
| 1140 | have the form | ||
| 1136 | 1141 | ||
| 1137 | @noindent | 1142 | @smallexample |
| 1138 | A color name is written within double quotes, for example @code{"red"}. | 1143 | @code{@{ @var{r}, @var{g}, @var{b} @}} |
| 1139 | 1144 | @end smallexample | |
| 1140 | @noindent | ||
| 1141 | Hexadecimal form is the same as in X: | ||
| 1142 | @code{#@var{rrrr}@var{gggg}@var{bbbb}}, where all three color specs | ||
| 1143 | must have the same number of hex digits (1, 2, 3 or 4). | ||
| 1144 | 1145 | ||
| 1145 | @noindent | 1146 | @noindent |
| 1146 | An RGB triplet looks like @code{@{ @var{r}, @var{g}, @var{b} @}}, | ||
| 1147 | where @var{r}, @var{g} and @var{b} are either integers in the range | 1147 | where @var{r}, @var{g} and @var{b} are either integers in the range |
| 1148 | 0-65535 or floats in the range 0.0-1.0. | 1148 | 0-65535 or floats in the range 0.0-1.0. |
| 1149 | 1149 | ||