[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/doc/emacs text.texi
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/doc/emacs text.texi |
Date: |
Wed, 26 Nov 2008 04:13:33 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/11/26 04:13:33
Modified files:
doc/emacs : text.texi
Log message:
(Text): Simplify description of markup languages.
(TeX Mode): Simplify introduction. Mention BibTeX mode.
(TeX Editing): Note that `""' inserts one `"' character.
(HTML Mode): Note in the introduction that XML mode is an alias for
SGML mode. Mention nXML mode.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/emacs/text.texi?cvsroot=emacs&r1=1.8&r2=1.9
Patches:
Index: text.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/emacs/text.texi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- text.texi 24 Nov 2008 04:05:45 -0000 1.8
+++ text.texi 26 Nov 2008 04:13:33 -0000 1.9
@@ -26,23 +26,11 @@
@xref{Outline Mode}.
@end iftex
- For text which contains embedded commands for text formatters, Emacs
-has other major modes, each for a particular formatter. For instance,
address@hidden mode is used for editing address@hidden
address@hidden
-documents (@pxref{LaTeX,,address@hidden Mode}),
address@hidden iftex
address@hidden
-documents,
address@hidden ifnottex
-while Nroff mode is used for editing groff or nroff files.
-
- Instead of using a text formatter, you can edit formatted text in
-WYSIWYG style (``what you see is what you get''), with Enriched mode.
-Then the formatting appears on the screen in Emacs while you edit.
address@hidden
address@hidden Text}.
address@hidden iftex
+ Emacs has other major modes for text which contains ``embedded''
+commands, such as @TeX{} and address@hidden (@pxref{TeX Mode}); HTML, SGML,
+and XML (@pxref{HTML Mode}); and Groff and Nroff (@pxref{Nroff Mode}).
+In addition, you can edit formatted text in WYSIWYG style (``what you
+see is what you get''), using Enriched mode (@pxref{Formatted Text}).
@cindex ASCII art
If you need to edit pictures made out of text characters (commonly
@@ -1365,36 +1353,38 @@
@findex latex-mode
@findex slitex-mode
@findex doctex-mode
address@hidden bibtex-mode
- @TeX{} is a powerful text formatter written by Donald Knuth; it is
-also free software, like GNU Emacs. address@hidden is a simplified input
-format for @TeX{}, implemented by @TeX{} macros; it comes with @TeX{}.
address@hidden is a special form of address@hidden@address@hidden is
-obsoleted by the @samp{slides} document class and other alternative
-packages in recent address@hidden versions.} address@hidden (@file{.dtx}) is a
-special file format in which the address@hidden sources are written,
-combining sources with documentation.
-
- Emacs has a special @TeX{} mode for editing @TeX{} input files.
-It provides facilities for checking the balance of delimiters and for
-invoking @TeX{} on all or part of the file.
+ Emacs provides special major modes for editing files written in
address@hidden and its related formats. @TeX{} is a powerful text formatter
+written by Donald Knuth; like GNU Emacs, it is free software.
address@hidden is a simplified input format for @TeX{}, implemented using
address@hidden macros. address@hidden is a special file format in which the
address@hidden sources are written, combining sources with documentation.
address@hidden is an obsolete special form of address@hidden@footnote{It has
+been replaced by the @samp{slides} document class, which comes with
address@hidden
@vindex tex-default-mode
@TeX{} mode has four variants: Plain @TeX{} mode, address@hidden mode,
address@hidden mode, and address@hidden mode (these distinct major modes differ
-only slightly). They are designed for editing the four different
-formats. The command @kbd{M-x tex-mode} looks at the contents of the
-buffer to determine whether the contents appear to be either address@hidden
-input, address@hidden, or address@hidden input; if so, it selects the
-appropriate mode. If the file contents do not appear to be address@hidden,
address@hidden or address@hidden, it selects Plain @TeX{} mode. If the contents
-are insufficient to determine this, the variable
address@hidden controls which mode is used.
-
- When @kbd{M-x tex-mode} does not guess right, you can use the commands
address@hidden plain-tex-mode}, @kbd{M-x latex-mode}, @kbd{M-x slitex-mode},
-and @kbd{doctex-mode} to select explicitly the particular variants of
address@hidden mode.
address@hidden mode, and address@hidden mode. These distinct major modes differ
+only slightly, and are designed for editing the four different
+formats. Emacs selects the appropriate mode by looking at the
+contents of the buffer. (This is done by the @code{tex-mode} command,
+which is normally called automatically when you visit a @TeX{}-like
+file. @xref{Choosing Modes}.) If the contents are insufficient to
+determine this, Emacs chooses the mode specified by the variable
address@hidden; its default value is @code{latex-mode}. If
+Emacs does not guess right, you can select the correct variant of
address@hidden mode using the command @kbd{M-x plain-tex-mode}, @kbd{M-x
+latex-mode}, @kbd{M-x slitex-mode}, or @kbd{doctex-mode}.
+
+ Emacs also provides address@hidden mode, a major mode for editing
address@hidden files. address@hidden is a tool for storing and formatting
+bibliographic references, which is commonly used together with
address@hidden In addition, the address@hidden package provides a minor mode
+which can be used in conjunction with address@hidden mode to manage
+bibliographic references. @inforef{Top,, reftex}.
@menu
* Editing: TeX Editing. Special commands for editing in TeX mode.
@@ -1406,9 +1396,6 @@
@node TeX Editing
@subsection @TeX{} Editing Commands
- Here are the special commands provided in @TeX{} mode for editing the
-text of the file.
-
@table @kbd
@item "
Insert, according to context, either @samp{``} or @samp{"} or
@@ -1427,20 +1414,22 @@
@findex tex-insert-quote
@kindex " @r{(@TeX{} mode)}
- In @TeX{}, the character @samp{"} is not normally used; we use
address@hidden to start a quotation and @samp{''} to end one. To make
-editing easier under this formatting convention, @TeX{} mode overrides
-the normal meaning of the key @kbd{"} with a command that inserts a pair
-of single-quotes or backquotes (@code{tex-insert-quote}). To be
-precise, this command inserts @samp{``} after whitespace or an open
-brace, @samp{"} after a backslash, and @samp{''} after any other
-character.
-
- If you need the character @samp{"} itself in unusual contexts, use
address@hidden to insert it. Also, @kbd{"} with a numeric argument always
-inserts that number of @samp{"} characters. You can turn off the
-feature of @kbd{"} expansion by eliminating that binding in the local
-map (@pxref{Key Bindings}).
+ In @TeX{}, the character @samp{"} is not normally used; instead,
+quotations begin with @samp{``} and end with @samp{''}. For
+convenience, @TeX{} mode overrides the normal meaning of the key
address@hidden"} with a command that inserts a pair of single-quotes or
+backquotes (@code{tex-insert-quote}). To be precise, it inserts
address@hidden after whitespace or an open brace, @samp{"} after a
+backslash, and @samp{''} after any other character.
+
+ As a special exception, if you type @kbd{"} when the text before
+point is either @samp{``} or @samp{''}, Emacs replaces that preceding
+text with a single @samp{"} character. You can therefore type
address@hidden""} to insert @samp{"}, should you ever need to do so. (You can
+also use @kbd{C-q "} to insert this character.)
+
+ To disable the @kbd{"} expansion feature, eliminate that binding in
+the local map (@pxref{Key Bindings}).
In @TeX{} mode, @samp{$} has a special syntax code which attempts to
understand the way @TeX{} math mode delimiters match. When you insert a
@@ -1477,15 +1466,15 @@
Note that Emacs commands count square brackets and parentheses in
@TeX{} mode, not just braces. This is not strictly correct for the
purpose of checking @TeX{} syntax. However, parentheses and square
-brackets are likely to be used in text as matching delimiters and it is
-useful for the various motion commands and automatic match display to
-work with them.
+brackets are likely to be used in text as matching delimiters, and it
+is useful for the various motion commands and automatic match display
+to work with them.
@node LaTeX Editing
@subsection address@hidden Editing Commands
- address@hidden mode, and its variant, address@hidden mode, provide a few
extra
-features not applicable to plain @TeX{}.
+ address@hidden mode (and its obsolete variant, address@hidden mode) provide a
+few extra features not applicable to plain @TeX{}:
@table @kbd
@item C-c C-o
@@ -1755,11 +1744,28 @@
@node HTML Mode
@section SGML, XML, and HTML Modes
address@hidden SGML mode
address@hidden HTML mode
address@hidden XML mode
address@hidden mode, SGML
address@hidden mode, HTML
address@hidden mode, XML
address@hidden sgml-mode
address@hidden html-mode
address@hidden xml-mode
+
+ The major modes for SGML, XML, and HTML provide indentation support
+and commands for operating on tags. XML mode is actually identical to
+SGML mode (to be precise, @code{xml-mode} is an alias for
address@hidden), because XML is a strict subset of SGML. HTML mode
+is a slightly customized variant of SGML mode.
- The major modes for SGML and HTML include indentation support and
-commands to operate on tags. This section describes the special
-commands of these modes. (HTML mode is a slightly customized variant
-of SGML mode.)
address@hidden sgml-xml-mode
+ In XML, every opening tag must have an explicit closing tag. When
+the variable @code{sgml-xml-mode} is address@hidden, the tag insertion
+commands described below always insert explicit closing tags as well.
+When you visit a file, Emacs determines whether it is XML by examining
+the file contents, and sets @code{sgml-xml-mode} accordingly.
@table @kbd
@item C-c C-n
@@ -1845,14 +1851,17 @@
used as a cheap preview.
@end table
address@hidden sgml-xml-mode
- SGML mode and HTML mode support XML also. In XML, every opening tag
-must have an explicit closing tag. When @code{sgml-xml-mode} is
address@hidden, SGML mode and HTML mode always insert explicit
-closing tags. When you visit a file, these modes determine from the
-file contents whether it is XML or not, and set @code{sgml-xml-mode}
-accordingly, so that they do the right thing for the file in either
-case.
address@hidden nXML mode
address@hidden mode, nXML
address@hidden nxml-mode
address@hidden XML schema
+ Emacs also provides a more advanced mode mode for editing XML
+documents, called nXML mode (@code{nxml-mode}). nXML mode is aware of
+many existing XML schema, and uses them to provide completion of XML
+elements via @address@hidden or @address@hidden, as well as
+``on-the-fly'' validation of XML, with errors highlighted via Font
+Lock (@pxref{Font Lock}). It is described in its own manual.
address@hidden, nXML Mode,,nxml-mode, nXML Mode}.
@node Nroff Mode
@section Nroff Mode