diff options
| author | Tassilo Horn | 2008-10-31 09:31:43 +0000 |
|---|---|---|
| committer | Tassilo Horn | 2008-10-31 09:31:43 +0000 |
| commit | ef08237485cbb2b3667f3b43722cda7cb407ad33 (patch) | |
| tree | 9fc11ea8ac4abc4724364399b457b4fe04292be5 | |
| parent | 6587210282f884018277a9d9b64c14ce3e5cc6ea (diff) | |
| download | emacs-ef08237485cbb2b3667f3b43722cda7cb407ad33.tar.gz emacs-ef08237485cbb2b3667f3b43722cda7cb407ad33.zip | |
(Files): Add a section about document
files (doc-view-mode).
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 155 |
2 files changed, 160 insertions, 0 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 3f195935e9c..fc27115bb24 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-10-31 Tassilo Horn <tassilo@member.fsf.org> | ||
| 2 | |||
| 3 | * files.texi (Files): Add a section about document | ||
| 4 | files (doc-view-mode). | ||
| 5 | |||
| 1 | 2008-10-31 Chong Yidong <cyd@stupidchicken.com> | 6 | 2008-10-31 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * building.texi (Compilation Mode): Document | 8 | * building.texi (Compilation Mode): Document |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index d6024cc3d8f..b9cad4054ce 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -37,6 +37,7 @@ on file directories. | |||
| 37 | * Misc File Ops:: Other things you can do on files. | 37 | * Misc File Ops:: Other things you can do on files. |
| 38 | * Compressed Files:: Accessing compressed files. | 38 | * Compressed Files:: Accessing compressed files. |
| 39 | * File Archives:: Operating on tar, zip, jar etc. archive files. | 39 | * File Archives:: Operating on tar, zip, jar etc. archive files. |
| 40 | * Document Files:: Viewing PDF, PS and DVI files. | ||
| 40 | * Remote Files:: Accessing files on other sites. | 41 | * Remote Files:: Accessing files on other sites. |
| 41 | * Quoted File Names:: Quoting special characters in file names. | 42 | * Quoted File Names:: Quoting special characters in file names. |
| 42 | * File Name Cache:: Completion against a list of files you often use. | 43 | * File Name Cache:: Completion against a list of files you often use. |
| @@ -2988,6 +2989,160 @@ can be set in the @samp{Archive} Customize group. However, you don't | |||
| 2988 | need these programs to look at the archive table of contents, only to | 2989 | need these programs to look at the archive table of contents, only to |
| 2989 | extract or manipulate the subfiles in the archive. | 2990 | extract or manipulate the subfiles in the archive. |
| 2990 | 2991 | ||
| 2992 | |||
| 2993 | @node Document Files | ||
| 2994 | @section Document Files | ||
| 2995 | @cindex mode, pdf, ps, dvi | ||
| 2996 | @cindex DocView mode | ||
| 2997 | @cindex mode, DocView | ||
| 2998 | @cindex document files | ||
| 2999 | @findex doc-view-mode | ||
| 3000 | |||
| 3001 | DocView mode is a document viewer for Emacs (@code{doc-view-mode}). | ||
| 3002 | It's capable of displaying PDF, PS and DVI files inside an Emacs buffer | ||
| 3003 | and provides some convenience features like slicing, zooming and | ||
| 3004 | searching inside the document. | ||
| 3005 | |||
| 3006 | @vindex doc-view-cache-directory | ||
| 3007 | This is done by using @command{gs} (GhostScript) to convert the document | ||
| 3008 | to a set of PNG images which are then displayed. In order to omit | ||
| 3009 | double conversions of documents those images are cached in | ||
| 3010 | @code{doc-view-cache-directory}. | ||
| 3011 | |||
| 3012 | @findex doc-view-minor-mode | ||
| 3013 | @findex doc-view-toggle-display | ||
| 3014 | By default Emacs opens all pdf and dvi files using DocView mode. You'll | ||
| 3015 | be greeted with a welcome screen and as soon as the first page's | ||
| 3016 | conversion finished, it'll be displayed. PostScript files are opened | ||
| 3017 | with @code{ps-mode} by default, but additionally | ||
| 3018 | @code{doc-view-minor-mode} is enabled, which adds the binding @kbd{C-c | ||
| 3019 | C-c} (@code{doc-view-toggle-display}) and toggles between the editing | ||
| 3020 | mode (@code{ps-mode} in case of PS files, @code{fundamental-mode} in | ||
| 3021 | case of PDF or DVI files) and DocView mode. | ||
| 3022 | |||
| 3023 | @findex doc-view-enlarge | ||
| 3024 | @findex doc-view-shrink | ||
| 3025 | You can enlarge or shrink the document with @kbd{+} | ||
| 3026 | (@code{doc-view-enlarge}) and @kbd{-} (@code{doc-view-shrink}). | ||
| 3027 | |||
| 3028 | The DocView buffer can be buried with @kbd{q} and killed with @kbd{k}. | ||
| 3029 | |||
| 3030 | @menu | ||
| 3031 | * Navigation:: Navigation inside DocView buffers. | ||
| 3032 | * Searching:: Searching inside documents. | ||
| 3033 | * Slicing:: Specifing which part of pages should be displayed. | ||
| 3034 | * Conversion:: Influencing and triggering converison. | ||
| 3035 | @end menu | ||
| 3036 | |||
| 3037 | @node Navigation | ||
| 3038 | @subsection Navigation | ||
| 3039 | |||
| 3040 | Inside DocView mode you can scroll the current page using the usual | ||
| 3041 | Emacs movement keys, that is the arrow keys or @kbd{C-p}, @kbd{C-n}, | ||
| 3042 | @kbd{C-b} and @kbd{C-f}. | ||
| 3043 | |||
| 3044 | @findex doc-view-next-page | ||
| 3045 | @findex doc-view-previous-page | ||
| 3046 | To go to the next page use @kbd{n}, @kbd{@key{next}} or @kbd{C-x ]} | ||
| 3047 | (@code{doc-view-next-page}), to go to the previous page use @kbd{p}, | ||
| 3048 | @kbd{@key{prior}} or @kbd{C-x [} (@code{doc-view-previous-page}). | ||
| 3049 | |||
| 3050 | @findex doc-view-scroll-up-or-next-page | ||
| 3051 | @findex doc-view-scroll-down-or-previous-page | ||
| 3052 | While reading a document it's convenient to scroll the current page and | ||
| 3053 | switch to the next one if it's already scrolled to the bottom. This | ||
| 3054 | functionality is bound to @kbd{@key{SPC}} | ||
| 3055 | (@code{doc-view-scroll-up-or-next-page}). @kbd{@key{DEL}} will do the | ||
| 3056 | same in the other direction | ||
| 3057 | (@code{doc-view-scroll-down-or-previous-page}). | ||
| 3058 | |||
| 3059 | @findex doc-view-first-page | ||
| 3060 | @findex doc-view-last-page | ||
| 3061 | To go to the first page use @kbd{M-<} (@code{doc-view-first-page}), to | ||
| 3062 | go to the last one use @kbd{M->} (@code{doc-view-last-page}). | ||
| 3063 | |||
| 3064 | @findex doc-view-goto-page | ||
| 3065 | To jump to a page by its number use @kbd{M-g M-g} or @kbd{M-g g} | ||
| 3066 | (@code{doc-view-goto-page}). | ||
| 3067 | |||
| 3068 | @node Searching | ||
| 3069 | @subsection Searching | ||
| 3070 | |||
| 3071 | It's possible to search for a regular expression (@pxref{Regexps}) | ||
| 3072 | inside documents. In order to do that, the document file will be | ||
| 3073 | converted to text and the search will be performed in the text file. | ||
| 3074 | The interface to searching is inspired by @code{isearch} | ||
| 3075 | (@pxref{Incremental Search}). | ||
| 3076 | |||
| 3077 | @findex doc-view-search | ||
| 3078 | @findex doc-view-search-backward | ||
| 3079 | To initiate a search use @kbd{C-s} (@code{doc-view-search}) or @kbd{C-r} | ||
| 3080 | (@code{doc-view-search-backward}). You'll be queried for a regular | ||
| 3081 | expression and after hitting @kbd{@key{RET}} the number of matches will | ||
| 3082 | be echoed. Navigation between the matches is done by pressing @kbd{C-s} | ||
| 3083 | and @kbd{C-r} again. | ||
| 3084 | |||
| 3085 | @findex doc-view-show-tooltip | ||
| 3086 | Since there's no possibility to show the match inside the image itself, | ||
| 3087 | a tooltip will be shown at the mouse position which lists all matching | ||
| 3088 | lines of the current page. You can force the tooltip to be shown with | ||
| 3089 | @kbd{C-t} (@code{doc-view-show-tooltip}). | ||
| 3090 | |||
| 3091 | To initiate a new search call @code{doc-view-search} with a prefix | ||
| 3092 | argument, i.e. @kbd{C-u C-s} or @kbd{C-u C-r} for a backward search. | ||
| 3093 | |||
| 3094 | @node Slicing | ||
| 3095 | @subsection Slicing | ||
| 3096 | |||
| 3097 | Quite often documents have huge margins for printing. These are | ||
| 3098 | annoying when reading the document on a computer, because they use up | ||
| 3099 | screen space and thus can force inconvenient scrolling. | ||
| 3100 | |||
| 3101 | @findex doc-view-set-slice | ||
| 3102 | @findex doc-view-set-slice-using-mouse | ||
| 3103 | To prevent you from that DocView lets you select the slice of the pages | ||
| 3104 | you're interested in. To do that hit @kbd{s s} | ||
| 3105 | (@code{doc-view-set-slice}) to enter the top left pixel position and the | ||
| 3106 | slice's width and height. A more convenient method is provided by | ||
| 3107 | @kbd{s m} (@code{doc-view-set-slice-using-mouse}), where you use the | ||
| 3108 | mouse to select the slice. | ||
| 3109 | |||
| 3110 | @findex doc-view-reset-slice | ||
| 3111 | To reset the selected slice use @kbd{s r} (@code{doc-view-reset-slice}). | ||
| 3112 | |||
| 3113 | @node Conversion | ||
| 3114 | @subsection Conversion | ||
| 3115 | |||
| 3116 | As said before DocView mode will automatically convert the document | ||
| 3117 | files when visiting them unless @code{doc-view-cache-directory} already | ||
| 3118 | contains the converted PNG images. In that case it'll use the cached | ||
| 3119 | files. | ||
| 3120 | |||
| 3121 | @findex doc-view-clear-cache | ||
| 3122 | You can clean up the cache directory with @code{M-x | ||
| 3123 | doc-view-clear-cache}. | ||
| 3124 | |||
| 3125 | If a document has changed, it'll be converted anew when visiting it. | ||
| 3126 | DocView recognizes documents by the md5 sum of their contents. | ||
| 3127 | |||
| 3128 | @findex doc-view-kill-proc | ||
| 3129 | @findex doc-view-kill-proc-and-buffer | ||
| 3130 | To force a reconversion of the currently viewed document hit @kbd{r} or | ||
| 3131 | @kbd{g} (@code{revert-buffer}). Killing the converter process | ||
| 3132 | associated with the current buffer can be done with @kbd{K} | ||
| 3133 | (@code{doc-view-kill-proc}). The key @kbd{k} will do the same and | ||
| 3134 | additionally kill the DocView buffer | ||
| 3135 | (@code{doc-view-kill-proc-and-buffer}). | ||
| 3136 | |||
| 3137 | The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-} | ||
| 3138 | (@code{doc-view-shrink}) will also reconvert the current document using | ||
| 3139 | another resolution. The current page will be converted first. | ||
| 3140 | |||
| 3141 | @vindex doc-view-resolution | ||
| 3142 | The default resolution for conversion can be customized via the variable | ||
| 3143 | @code{doc-view-resolution}. | ||
| 3144 | |||
| 3145 | |||
| 2991 | @node Remote Files | 3146 | @node Remote Files |
| 2992 | @section Remote Files | 3147 | @section Remote Files |
| 2993 | 3148 | ||