aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/files.texi155
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 @@
12008-10-31 Tassilo Horn <tassilo@member.fsf.org>
2
3 * files.texi (Files): Add a section about document
4 files (doc-view-mode).
5
12008-10-31 Chong Yidong <cyd@stupidchicken.com> 62008-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
2988need these programs to look at the archive table of contents, only to 2989need these programs to look at the archive table of contents, only to
2989extract or manipulate the subfiles in the archive. 2990extract 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
3001DocView mode is a document viewer for Emacs (@code{doc-view-mode}).
3002It's capable of displaying PDF, PS and DVI files inside an Emacs buffer
3003and provides some convenience features like slicing, zooming and
3004searching inside the document.
3005
3006@vindex doc-view-cache-directory
3007This is done by using @command{gs} (GhostScript) to convert the document
3008to a set of PNG images which are then displayed. In order to omit
3009double 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
3014By default Emacs opens all pdf and dvi files using DocView mode. You'll
3015be greeted with a welcome screen and as soon as the first page's
3016conversion finished, it'll be displayed. PostScript files are opened
3017with @code{ps-mode} by default, but additionally
3018@code{doc-view-minor-mode} is enabled, which adds the binding @kbd{C-c
3019C-c} (@code{doc-view-toggle-display}) and toggles between the editing
3020mode (@code{ps-mode} in case of PS files, @code{fundamental-mode} in
3021case of PDF or DVI files) and DocView mode.
3022
3023@findex doc-view-enlarge
3024@findex doc-view-shrink
3025You can enlarge or shrink the document with @kbd{+}
3026(@code{doc-view-enlarge}) and @kbd{-} (@code{doc-view-shrink}).
3027
3028The 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
3040Inside DocView mode you can scroll the current page using the usual
3041Emacs 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
3046To 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
3052While reading a document it's convenient to scroll the current page and
3053switch to the next one if it's already scrolled to the bottom. This
3054functionality is bound to @kbd{@key{SPC}}
3055(@code{doc-view-scroll-up-or-next-page}). @kbd{@key{DEL}} will do the
3056same 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
3061To go to the first page use @kbd{M-<} (@code{doc-view-first-page}), to
3062go to the last one use @kbd{M->} (@code{doc-view-last-page}).
3063
3064@findex doc-view-goto-page
3065To 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
3071It's possible to search for a regular expression (@pxref{Regexps})
3072inside documents. In order to do that, the document file will be
3073converted to text and the search will be performed in the text file.
3074The interface to searching is inspired by @code{isearch}
3075(@pxref{Incremental Search}).
3076
3077@findex doc-view-search
3078@findex doc-view-search-backward
3079To 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
3081expression and after hitting @kbd{@key{RET}} the number of matches will
3082be echoed. Navigation between the matches is done by pressing @kbd{C-s}
3083and @kbd{C-r} again.
3084
3085@findex doc-view-show-tooltip
3086Since there's no possibility to show the match inside the image itself,
3087a tooltip will be shown at the mouse position which lists all matching
3088lines of the current page. You can force the tooltip to be shown with
3089@kbd{C-t} (@code{doc-view-show-tooltip}).
3090
3091To initiate a new search call @code{doc-view-search} with a prefix
3092argument, 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
3097Quite often documents have huge margins for printing. These are
3098annoying when reading the document on a computer, because they use up
3099screen space and thus can force inconvenient scrolling.
3100
3101@findex doc-view-set-slice
3102@findex doc-view-set-slice-using-mouse
3103To prevent you from that DocView lets you select the slice of the pages
3104you'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
3106slice'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
3108mouse to select the slice.
3109
3110@findex doc-view-reset-slice
3111To reset the selected slice use @kbd{s r} (@code{doc-view-reset-slice}).
3112
3113@node Conversion
3114@subsection Conversion
3115
3116As said before DocView mode will automatically convert the document
3117files when visiting them unless @code{doc-view-cache-directory} already
3118contains the converted PNG images. In that case it'll use the cached
3119files.
3120
3121@findex doc-view-clear-cache
3122You can clean up the cache directory with @code{M-x
3123doc-view-clear-cache}.
3124
3125If a document has changed, it'll be converted anew when visiting it.
3126DocView recognizes documents by the md5 sum of their contents.
3127
3128@findex doc-view-kill-proc
3129@findex doc-view-kill-proc-and-buffer
3130To force a reconversion of the currently viewed document hit @kbd{r} or
3131@kbd{g} (@code{revert-buffer}). Killing the converter process
3132associated 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
3134additionally kill the DocView buffer
3135(@code{doc-view-kill-proc-and-buffer}).
3136
3137The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
3138(@code{doc-view-shrink}) will also reconvert the current document using
3139another resolution. The current page will be converted first.
3140
3141@vindex doc-view-resolution
3142The 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