you can undo right past them. Making lines visible or invisible is simply
not recorded by the undo mechanism.
+ Many of these commands act on the ``current'' heading line. If
+point is on a heading line, that is the current heading line; if point
+is on a body line, the current heading line is the nearest preceding
+header line.
+
@table @kbd
-@item C-c C-t
-Make all body lines in the buffer invisible (@code{hide-body}).
-@item C-c C-a
-Make all lines in the buffer visible (@code{show-all}).
+@item C-c C-c
+Make the current heading line's body invisible (@code{hide-entry}).
+@item C-c C-e
+Make the current heading line's body visible (@code{show-entry}).
@item C-c C-d
-Make everything under this heading invisible, not including this
+Make everything under the current heading invisible, not including the
heading itself (@code{hide-subtree}).
@item C-c C-s
-Make everything under this heading visible, including body,
+Make everything under the current heading visible, including body,
subheadings, and their bodies (@code{show-subtree}).
@item C-c C-l
-Make the body of this heading line, and of all its subheadings,
+Make the body of the current heading line, and of all its subheadings,
invisible (@code{hide-leaves}).
@item C-c C-k
-Make all subheadings of this heading line, at all levels, visible
-(@code{show-branches}).
+Make all subheadings of the current heading line, at all levels,
+visible (@code{show-branches}).
@item C-c C-i
-Make immediate subheadings (one level down) of this heading line
-visible (@code{show-children}).
-@item C-c C-c
-Make this heading line's body invisible (@code{hide-entry}).
-@item C-c C-e
-Make this heading line's body visible (@code{show-entry}).
+Make immediate subheadings (one level down) of the current heading
+line visible (@code{show-children}).
+@item C-c C-t
+Make all body lines in the buffer invisible (@code{hide-body}).
+@item C-c C-a
+Make all lines in the buffer visible (@code{show-all}).
@item C-c C-q
Hide everything except the top @var{n} levels of heading lines
(@code{hide-sublevels}).
@kindex C-c C-c @r{(Outline mode)}
@kindex C-c C-e @r{(Outline mode)}
Two commands that are exact opposites are @kbd{C-c C-c}
-(@code{hide-entry}) and @kbd{C-c C-e} (@code{show-entry}). They are
-used with point on a heading line, and apply only to the body lines of
-that heading. Subheadings and their bodies are not affected.
+(@code{hide-entry}) and @kbd{C-c C-e} (@code{show-entry}). They apply
+to the body lines directly following the current heading line.
+Subheadings and their bodies are not affected.
@findex hide-subtree
@findex show-subtree
@kindex C-c C-s @r{(Outline mode)}
@kindex C-c C-d @r{(Outline mode)}
@cindex subtree (Outline mode)
- Two more powerful opposites are @kbd{C-c C-d} (@code{hide-subtree}) and
-@kbd{C-c C-s} (@code{show-subtree}). Both expect to be used when point is
-on a heading line, and both apply to all the lines of that heading's
-@dfn{subtree}: its body, all its subheadings, both direct and indirect, and
-all of their bodies. In other words, the subtree contains everything
-following this heading line, up to and not including the next heading of
-the same or higher rank.@refill
+ Two more powerful opposites are @kbd{C-c C-d} (@code{hide-subtree})
+and @kbd{C-c C-s} (@code{show-subtree}). Both apply to the current
+heading line's @dfn{subtree}: its body, all its subheadings, both
+direct and indirect, and all of their bodies. In other words, the
+subtree contains everything following the current heading line, up to
+and not including the next heading of the same or higher rank.@refill
@findex hide-leaves
@findex show-branches
@kindex C-c C-a @r{(Outline mode)}
Two commands have a blanket effect on the whole file. @kbd{C-c C-t}
(@code{hide-body}) makes all body lines invisible, so that you see just
-the outline structure. @kbd{C-c C-a} (@code{show-all}) makes all lines
-visible. These commands can be thought of as a pair of opposites even
-though @kbd{C-c C-a} applies to more than just body lines.
+the outline structure (as a special exception, it will not hide lines
+at the top of the file, preceding the first header line, even though
+these are technically body lines). @kbd{C-c C-a} (@code{show-all})
+makes all lines visible. These commands can be thought of as a pair
+of opposites even though @kbd{C-c C-a} applies to more than just body
+lines.
@findex hide-sublevels
@kindex C-c C-q @r{(Outline mode)}
@cindex @TeX{} mode
@cindex La@TeX{} mode
@cindex Sli@TeX{} mode
+@cindex Doc@TeX{} mode
@cindex mode, @TeX{}
@cindex mode, La@TeX{}
@cindex mode, Sli@TeX{}
+@cindex mode, Doc@TeX{}
@findex tex-mode
@findex plain-tex-mode
@findex latex-mode
@findex slitex-mode
+@findex doctex-mode
@TeX{} is a powerful text formatter written by Donald Knuth; it is also
free, like GNU Emacs. La@TeX{} is a simplified input format for @TeX{},
implemented by @TeX{} macros; it comes with @TeX{}. Sli@TeX{} is a special
form of La@TeX{}.@footnote{Sli@TeX{} is obsoleted by the @samp{slides}
-document class in recent La@TeX{} versions.}
+document class in recent La@TeX{} versions.} Doc@TeX{} (@file{.dtx})
+is a special file format in which the La@TeX{} 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.
@vindex tex-default-mode
- @TeX{} mode has three variants, Plain @TeX{} mode, La@TeX{} mode, and
-Sli@TeX{} mode (these three distinct major modes differ only slightly).
-They are designed for editing the three 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 La@TeX{} input or Sli@TeX{}
-input; if so, it selects the appropriate mode. If the file contents do
-not appear to be La@TeX{} or Sli@TeX{}, it selects Plain @TeX{} mode.
-If the contents are insufficient to determine this, the variable
+ @TeX{} mode has four variants: Plain @TeX{} mode, La@TeX{} mode,
+Sli@TeX{} mode, and Doc@TeX{} 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 La@TeX{}
+input, Sli@TeX{}, or Doc@TeX{} input; if so, it selects the
+appropriate mode. If the file contents do not appear to be La@TeX{},
+Sli@TeX{} or Doc@TeX{}, it selects Plain @TeX{} mode. If the contents
+are insufficient to determine this, the variable
@code{tex-default-mode} controls which mode is used.
When @kbd{M-x tex-mode} does not guess right, you can use the commands
-@kbd{M-x plain-tex-mode}, @kbd{M-x latex-mode}, and @kbd{M-x
-slitex-mode} to select explicitly the particular variants of @TeX{}
-mode.
+@kbd{M-x plain-tex-mode}, @kbd{M-x latex-mode}, @kbd{M-x slitex-mode},
+and @kbd{doctex-mode} to select explicitly the particular variants of
+@TeX{} mode.
@menu
* Editing: TeX Editing. Special commands for editing in TeX mode.