Initial Commit
[packages] / xemacs-packages / auctex / doc / preview-problems.texi
1 @include macros.texi
2 @ifset rawfile
3 @c documentencoding is used by makeinfo in our --no-headers output.
4 @documentencoding ISO-8859-1
5 @node Known problems,,(dir),(dir)
6 @top Known problems with preview-latex
7
8 @end ifset
9 @c -----------------------
10 @c @cindex @kbd{M-x preview-report-bug @key{RET}}
11 @c @cindex @code{preview-report-bug}
12 @c @cindex Report a bug
13 A number of issues are known concerning the interoperation with various
14 other software. Some of the known problems can be solved by moving to
15 newer versions of the problematic software or by simple patches.
16
17 @menu
18 * Font problems with Dvips::    
19 * Too small bounding boxes::    
20 * x-symbol interoperation::     
21 * Middle-clicks paste instead of toggling::  
22 @end menu
23
24 If you find something not mentioned here, please send a bug report using
25 @kbd{M-x preview-report-bug @key{RET}}, which will fill in a lot of
26 information interesting to us and send it to the
27 @email{bug-auctex@@gnu.org} list.  Please use the bug reporting commands
28 if at all possible.
29
30 @ifset rawfile
31 @node Font problems with Dvips
32 @chapter Font problems with Dvips
33 @raisesections
34 @end ifset
35 @ifclear rawfile
36 @node Font problems with Dvips
37 @section Font problems with Dvips
38 @end ifclear
39
40 Some fonts have been reported to produce wrong characters with
41 @previewlatex{}.  @previewlatex{} calls Dvips by default with the option
42 @option{-Pwww} in order to get scalable fonts for nice results.  If you
43 are using antialiasing, however, the results might be sufficiently nice
44 with bitmapped fonts, anyway.  You might try @option{-Ppdf} for another
45 stab at scalable fonts, or other printer definitions.  Use
46
47 @display
48 @kbd{M-x customize-variable @key{RET} preview-fast-dvips-command @key{RET}}
49 @end display
50 @noindent
51 and
52 @display
53 @kbd{M-x customize-variable @key{RET} preview-dvips-command @key{RET}}
54 @end display
55 @noindent
56 in order to customize this.
57
58 One particular problem is that several printer setup files (typically in
59 a file called @file{/usr/share/texmf/dvips/config/config.pdf} if you are
60 using the @option{-Ppdf} switch) contain the @option{G} option for
61 `character shifting'.  This option will result in @samp{fi} being
62 rendered as @samp{@pounds{}} (British Pounds sign) in several fonts,
63 unless your version of Dvips has a long-standing bug in its
64 implementation fixed (only very recent versions of Dvips have).
65
66 @node Too small bounding boxes
67 @section Too small bounding boxes
68 The bounding box of a preview is determined by the @LaTeX{} package
69 using the pure @TeX{} bounding boxes.  If there is material extending
70 outside of the @TeX{} box, that material will be missing from the
71 preview image.  This happens for the label-showing boxes from
72 the @code{showkeys} package.  This particular problem can be
73 circumvented by using the @code{showlabels} option of the preview
74 package.
75
76 In general, you should try to fix the problem in the @TeX{} code, like
77 avoiding drawing outside of the picture with PSTricks.
78
79 One possible remedy is to set
80 @code{preview-fast-conversion} to `Off' 
81 @ifset rawfile
82 (see the manual).
83 @end ifset
84 @ifclear rawfile
85 (@pxref{The Emacs interface}).
86 @end ifclear
87 The conversion will take more time, but will then use the bounding boxes
88 from @acronym{EPS} files generated by Dvips.
89
90 Dvips generally does not miss things, but it does not understand
91 PostScript constructs like @code{\resizebox} or @code{\rotate} commands,
92 so will generate rather wrong boxes for those.  Dvips can be helped with
93 the @code{psfixbb} package option to preview 
94 @ifset rawfile
95 (see the manual),
96 @end ifset
97 @ifclear rawfile
98 (@pxref{The LaTeX style file}),
99 @end ifclear
100 which will tag the corners of the included @TeX{} box.  This will mostly
101 be convenient for @emph{pure} PostScript stuff like that created by
102 PSTricks, which Dvips would otherwise reserve no space for.
103
104 @node x-symbol interoperation
105 @section x-symbol interoperation
106
107 Thanks to the work of Christoph Wedler, starting with version
108 @samp{4.0h/beta} of x-symbol, the line parsing of @AUCTeX{} and
109 @previewlatex{} is fully supported.  Earlier versions exhibit problems.
110 However, versions before 4.2.2 will cause a drastic slowdown of
111 @previewlatex{}'s parsing pass, so we don't recommend to use versions
112 earlier than that.
113
114 If you wonder what x-symbol is, it is a package that transforms various
115 tokens and subscripts to a more readable form while editing and offers a
116 few input methods handy especially for dealing with math. Take a look at
117 @uref{http://x-symbol.sourceforge.net}.
118
119 x-symbol versions up to 4.5.1-beta at least require an 8bit-clean @TeX{}
120 implementation (meaning that its terminal output should not use
121 @samp{^^}-started escape sequences) for cooperation with
122 @previewlatex{}.  Later versions may get along without it, like
123 @previewlatex{} does now.
124
125 If you experience problems with @file{circ.tex} in connection with both
126 x-symbol and Latin-1 characters, you may need to change your language
127 environment or, as a last resort, customize the variable
128 @code{LaTeX-command-style} by replacing the command @code{latex} with
129 @code{latex -translate-file=cp8bit}.
130
131 @node Middle-clicks paste instead of toggling
132 @section Middle-clicks paste instead of toggling
133
134 This is probably the fault of your favorite package.  @file{flyspell.el}
135 and @file{mouse-drag.el} are known to be affected in versions before
136 @w{Emacs 21.3}.  Upgrade to the most recent version.  What version of
137 XEmacs might contain the fixes is unknown.
138
139 @file{isearch.el} also shows this effect while searches are in progress,
140 but the code is such a complicated mess that no patch is in sight.
141 Better just end the search with @kbd{@key{RET}} before toggling and
142 resume with @kbd{C-s C-s} or similar afterwards.  Since previews over
143 the current match will auto-open, anyway, this should not be much of a
144 problem in practice.