diff options
| author | Chong Yidong | 2008-10-31 22:01:15 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-10-31 22:01:15 +0000 |
| commit | 3388237a7c5a3aba9b1ff7d0f933e51691f89e43 (patch) | |
| tree | 9ba55e6de3542e89b31ebcde1fa5c4ee22ecac02 | |
| parent | ccac97df942328c923699546c7c3ec5249d519a9 (diff) | |
| download | emacs-3388237a7c5a3aba9b1ff7d0f933e51691f89e43.tar.gz emacs-3388237a7c5a3aba9b1ff7d0f933e51691f89e43.zip | |
(Document View): Renamed from Document Files, moved here from
files.texi.
| -rw-r--r-- | doc/emacs/misc.texi | 155 |
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 | |||
| 32 | DocView mode is a document viewer for Emacs (@code{doc-view-mode}). | ||
| 33 | It's capable of displaying PDF, PS and DVI files inside an Emacs buffer | ||
| 34 | and provides some convenience features like slicing, zooming and | ||
| 35 | searching inside the document. | ||
| 36 | |||
| 37 | @vindex doc-view-cache-directory | ||
| 38 | This is done by using @command{gs} (GhostScript) to convert the document | ||
| 39 | to a set of PNG images which are then displayed. In order to omit | ||
| 40 | double 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 | ||
| 45 | By default Emacs opens all pdf and dvi files using DocView mode. You'll | ||
| 46 | be greeted with a welcome screen and as soon as the first page's | ||
| 47 | conversion finished, it'll be displayed. PostScript files are opened | ||
| 48 | with @code{ps-mode} by default, but additionally | ||
| 49 | @code{doc-view-minor-mode} is enabled, which adds the binding @kbd{C-c | ||
| 50 | C-c} (@code{doc-view-toggle-display}) and toggles between the editing | ||
| 51 | mode (@code{ps-mode} in case of PS files, @code{fundamental-mode} in | ||
| 52 | case of PDF or DVI files) and DocView mode. | ||
| 53 | |||
| 54 | @findex doc-view-enlarge | ||
| 55 | @findex doc-view-shrink | ||
| 56 | You can enlarge or shrink the document with @kbd{+} | ||
| 57 | (@code{doc-view-enlarge}) and @kbd{-} (@code{doc-view-shrink}). | ||
| 58 | |||
| 59 | The 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 | |||
| 71 | Inside DocView mode you can scroll the current page using the usual | ||
| 72 | Emacs 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 | ||
| 77 | To 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 | ||
| 83 | While reading a document it's convenient to scroll the current page and | ||
| 84 | switch to the next one if it's already scrolled to the bottom. This | ||
| 85 | functionality is bound to @kbd{@key{SPC}} | ||
| 86 | (@code{doc-view-scroll-up-or-next-page}). @kbd{@key{DEL}} will do the | ||
| 87 | same 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 | ||
| 92 | To go to the first page use @kbd{M-<} (@code{doc-view-first-page}), to | ||
| 93 | go to the last one use @kbd{M->} (@code{doc-view-last-page}). | ||
| 94 | |||
| 95 | @findex doc-view-goto-page | ||
| 96 | To 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 | |||
| 102 | It's possible to search for a regular expression (@pxref{Regexps}) | ||
| 103 | inside documents. In order to do that, the document file will be | ||
| 104 | converted to text and the search will be performed in the text file. | ||
| 105 | The interface to searching is inspired by @code{isearch} | ||
| 106 | (@pxref{Incremental Search}). | ||
| 107 | |||
| 108 | @findex doc-view-search | ||
| 109 | @findex doc-view-search-backward | ||
| 110 | To 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 | ||
| 112 | expression and after hitting @kbd{@key{RET}} the number of matches will | ||
| 113 | be echoed. Navigation between the matches is done by pressing @kbd{C-s} | ||
| 114 | and @kbd{C-r} again. | ||
| 115 | |||
| 116 | @findex doc-view-show-tooltip | ||
| 117 | Since there's no possibility to show the match inside the image itself, | ||
| 118 | a tooltip will be shown at the mouse position which lists all matching | ||
| 119 | lines of the current page. You can force the tooltip to be shown with | ||
| 120 | @kbd{C-t} (@code{doc-view-show-tooltip}). | ||
| 121 | |||
| 122 | To initiate a new search call @code{doc-view-search} with a prefix | ||
| 123 | argument, 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 | |||
| 128 | Quite often documents have huge margins for printing. These are | ||
| 129 | annoying when reading the document on a computer, because they use up | ||
| 130 | screen space and thus can force inconvenient scrolling. | ||
| 131 | |||
| 132 | @findex doc-view-set-slice | ||
| 133 | @findex doc-view-set-slice-using-mouse | ||
| 134 | To prevent you from that DocView lets you select the slice of the pages | ||
| 135 | you'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 | ||
| 137 | slice'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 | ||
| 139 | mouse to select the slice. | ||
| 140 | |||
| 141 | @findex doc-view-reset-slice | ||
| 142 | To reset the selected slice use @kbd{s r} (@code{doc-view-reset-slice}). | ||
| 143 | |||
| 144 | @node Conversion | ||
| 145 | @subsection Conversion | ||
| 146 | |||
| 147 | As said before DocView mode will automatically convert the document | ||
| 148 | files when visiting them unless @code{doc-view-cache-directory} already | ||
| 149 | contains the converted PNG images. In that case it'll use the cached | ||
| 150 | files. | ||
| 151 | |||
| 152 | @findex doc-view-clear-cache | ||
| 153 | You can clean up the cache directory with @code{M-x | ||
| 154 | doc-view-clear-cache}. | ||
| 155 | |||
| 156 | If a document has changed, it'll be converted anew when visiting it. | ||
| 157 | DocView recognizes documents by the md5 sum of their contents. | ||
| 158 | |||
| 159 | @findex doc-view-kill-proc | ||
| 160 | @findex doc-view-kill-proc-and-buffer | ||
| 161 | To force a reconversion of the currently viewed document hit @kbd{r} or | ||
| 162 | @kbd{g} (@code{revert-buffer}). Killing the converter process | ||
| 163 | associated 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 | ||
| 165 | additionally kill the DocView buffer | ||
| 166 | (@code{doc-view-kill-proc-and-buffer}). | ||
| 167 | |||
| 168 | The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-} | ||
| 169 | (@code{doc-view-shrink}) will also reconvert the current document using | ||
| 170 | another resolution. The current page will be converted first. | ||
| 171 | |||
| 172 | @vindex doc-view-resolution | ||
| 173 | The 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 |