aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-10-31 22:01:15 +0000
committerChong Yidong2008-10-31 22:01:15 +0000
commit3388237a7c5a3aba9b1ff7d0f933e51691f89e43 (patch)
tree9ba55e6de3542e89b31ebcde1fa5c4ee22ecac02
parentccac97df942328c923699546c7c3ec5249d519a9 (diff)
downloademacs-3388237a7c5a3aba9b1ff7d0f933e51691f89e43.tar.gz
emacs-3388237a7c5a3aba9b1ff7d0f933e51691f89e43.zip
(Document View): Renamed from Document Files, moved here from
files.texi.
-rw-r--r--doc/emacs/misc.texi155
1 files changed, 154 insertions, 1 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 0bfaa11c3c5..c650207a7ae 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -20,7 +20,160 @@ amusements.
20@raisesections 20@raisesections
21@end ifnottex 21@end ifnottex
22 22
23@node Gnus, Shell, Calendar/Diary, Top 23@node Document View, Gnus, Calendar/Diary, Top
24
25@section Document Viewing
26@cindex mode, pdf, ps, dvi
27@cindex DocView mode
28@cindex mode, DocView
29@cindex document files
30@findex doc-view-mode
31
32DocView mode is a document viewer for Emacs (@code{doc-view-mode}).
33It's capable of displaying PDF, PS and DVI files inside an Emacs buffer
34and provides some convenience features like slicing, zooming and
35searching inside the document.
36
37@vindex doc-view-cache-directory
38This is done by using @command{gs} (GhostScript) to convert the document
39to a set of PNG images which are then displayed. In order to omit
40double conversions of documents those images are cached in
41@code{doc-view-cache-directory}.
42
43@findex doc-view-minor-mode
44@findex doc-view-toggle-display
45By default Emacs opens all pdf and dvi files using DocView mode. You'll
46be greeted with a welcome screen and as soon as the first page's
47conversion finished, it'll be displayed. PostScript files are opened
48with @code{ps-mode} by default, but additionally
49@code{doc-view-minor-mode} is enabled, which adds the binding @kbd{C-c
50C-c} (@code{doc-view-toggle-display}) and toggles between the editing
51mode (@code{ps-mode} in case of PS files, @code{fundamental-mode} in
52case of PDF or DVI files) and DocView mode.
53
54@findex doc-view-enlarge
55@findex doc-view-shrink
56You can enlarge or shrink the document with @kbd{+}
57(@code{doc-view-enlarge}) and @kbd{-} (@code{doc-view-shrink}).
58
59The DocView buffer can be buried with @kbd{q} and killed with @kbd{k}.
60
61@menu
62* Navigation:: Navigation inside DocView buffers.
63* Searching:: Searching inside documents.
64* Slicing:: Specifing which part of pages should be displayed.
65* Conversion:: Influencing and triggering converison.
66@end menu
67
68@node Navigation
69@subsection Navigation
70
71Inside DocView mode you can scroll the current page using the usual
72Emacs movement keys, that is the arrow keys or @kbd{C-p}, @kbd{C-n},
73@kbd{C-b} and @kbd{C-f}.
74
75@findex doc-view-next-page
76@findex doc-view-previous-page
77To go to the next page use @kbd{n}, @kbd{@key{next}} or @kbd{C-x ]}
78(@code{doc-view-next-page}), to go to the previous page use @kbd{p},
79@kbd{@key{prior}} or @kbd{C-x [} (@code{doc-view-previous-page}).
80
81@findex doc-view-scroll-up-or-next-page
82@findex doc-view-scroll-down-or-previous-page
83While reading a document it's convenient to scroll the current page and
84switch to the next one if it's already scrolled to the bottom. This
85functionality is bound to @kbd{@key{SPC}}
86(@code{doc-view-scroll-up-or-next-page}). @kbd{@key{DEL}} will do the
87same in the other direction
88(@code{doc-view-scroll-down-or-previous-page}).
89
90@findex doc-view-first-page
91@findex doc-view-last-page
92To go to the first page use @kbd{M-<} (@code{doc-view-first-page}), to
93go to the last one use @kbd{M->} (@code{doc-view-last-page}).
94
95@findex doc-view-goto-page
96To jump to a page by its number use @kbd{M-g M-g} or @kbd{M-g g}
97(@code{doc-view-goto-page}).
98
99@node Searching
100@subsection Searching
101
102It's possible to search for a regular expression (@pxref{Regexps})
103inside documents. In order to do that, the document file will be
104converted to text and the search will be performed in the text file.
105The interface to searching is inspired by @code{isearch}
106(@pxref{Incremental Search}).
107
108@findex doc-view-search
109@findex doc-view-search-backward
110To initiate a search use @kbd{C-s} (@code{doc-view-search}) or @kbd{C-r}
111(@code{doc-view-search-backward}). You'll be queried for a regular
112expression and after hitting @kbd{@key{RET}} the number of matches will
113be echoed. Navigation between the matches is done by pressing @kbd{C-s}
114and @kbd{C-r} again.
115
116@findex doc-view-show-tooltip
117Since there's no possibility to show the match inside the image itself,
118a tooltip will be shown at the mouse position which lists all matching
119lines of the current page. You can force the tooltip to be shown with
120@kbd{C-t} (@code{doc-view-show-tooltip}).
121
122To initiate a new search call @code{doc-view-search} with a prefix
123argument, i.e. @kbd{C-u C-s} or @kbd{C-u C-r} for a backward search.
124
125@node Slicing
126@subsection Slicing
127
128Quite often documents have huge margins for printing. These are
129annoying when reading the document on a computer, because they use up
130screen space and thus can force inconvenient scrolling.
131
132@findex doc-view-set-slice
133@findex doc-view-set-slice-using-mouse
134To prevent you from that DocView lets you select the slice of the pages
135you're interested in. To do that hit @kbd{s s}
136(@code{doc-view-set-slice}) to enter the top left pixel position and the
137slice's width and height. A more convenient method is provided by
138@kbd{s m} (@code{doc-view-set-slice-using-mouse}), where you use the
139mouse to select the slice.
140
141@findex doc-view-reset-slice
142To reset the selected slice use @kbd{s r} (@code{doc-view-reset-slice}).
143
144@node Conversion
145@subsection Conversion
146
147As said before DocView mode will automatically convert the document
148files when visiting them unless @code{doc-view-cache-directory} already
149contains the converted PNG images. In that case it'll use the cached
150files.
151
152@findex doc-view-clear-cache
153You can clean up the cache directory with @code{M-x
154doc-view-clear-cache}.
155
156If a document has changed, it'll be converted anew when visiting it.
157DocView recognizes documents by the md5 sum of their contents.
158
159@findex doc-view-kill-proc
160@findex doc-view-kill-proc-and-buffer
161To force a reconversion of the currently viewed document hit @kbd{r} or
162@kbd{g} (@code{revert-buffer}). Killing the converter process
163associated with the current buffer can be done with @kbd{K}
164(@code{doc-view-kill-proc}). The key @kbd{k} will do the same and
165additionally kill the DocView buffer
166(@code{doc-view-kill-proc-and-buffer}).
167
168The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
169(@code{doc-view-shrink}) will also reconvert the current document using
170another resolution. The current page will be converted first.
171
172@vindex doc-view-resolution
173The default resolution for conversion can be customized via the variable
174@code{doc-view-resolution}.
175
176@node Gnus, Shell, Document View, Top
24@section Gnus 177@section Gnus
25@cindex Gnus 178@cindex Gnus
26@cindex reading netnews 179@cindex reading netnews