Discussion:
preview-latex, Fold Mode problem in AUCTeX 11.54
George R. Wilkens
2005-01-21 22:12:17 UTC
Permalink
Please excuse me if this is a known problem.

When I am using preview-latex together with Fold Mode, some of the
displayed equations are displayed twice in the buffer. The problem can
be easily demonstrated using the file "circ.tex" that is provided with
preview-latex-0.8.1.tar.gz.

1. Open the file "circ.tex" in gnu emacs.

2. C-c C-p C-b to turn previews on for the entire document.

3. Scroll down to equation (1). It looks OK.

4. C-c C-o C-f to turn on Fold Mode

5. C-c C-o C-b to fold the entire buffer.

6. Now look at equation (1). It shows up two times.

7. C-c C-o b to show all folded items

8. Equation (1) is back to normal.

I love AUCTeX, and I want to send a big MAHALO (Thank You) to all of
the developers and maintainers who work on it. Your work is very much
appreciated!

Aloha,

--George Wilkens

George Wilkens | Web: <http://www.math.hawaii.edu/~grw/>
Department of Mathematics | E-Mail: <mailto:***@math.hawaii.edu>
University of Hawaii at Manoa | Phone: (808) 956-4669
Honolulu, Hawaii 96822 | Fax: (808) 956-9139

Emacs : GNU Emacs 21.3.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2003-05-22 on porky.devel.redhat.com
Package: AUCTeX 11.54

current state:
==============
(setq
window-system 'x
LaTeX-version "2e"
TeX-style-path '("style/" "auto/" "/home/grw/texmf/bibtex/bst/style/"
"/home/grw/texmf/tex/style/"
"/home/grw/texmf/bibtex/bst/auto/"
"/home/grw/texmf/tex/auto/"
"/usr/share/emacs/site-lisp/auctex/style/"
"/usr/local/var/auctex/")
TeX-auto-save t
TeX-parse-self t
TeX-master nil
)
Ralf Angeli
2005-01-22 09:23:33 UTC
Permalink
Post by George R. Wilkens
When I am using preview-latex together with Fold Mode, some of the
displayed equations are displayed twice in the buffer.
No wonder. There haven't been implemented any provisions for TeX-fold
and preview-latex to play together flawlessly. This may change in
course of preview-latex being integrated into AUCTeX.

I think the problem one can see with circ.tex is that TeX-fold places
overlays into the buffer which have a higher priority than the ones
inserted by preview-latex (which don't set a priority at all) but
which are nested inside of preview-latex overlays. If I recall
correctly I implemented the whole priority caboodle because the same
would happen with nested TeX-fold overlays.

You should be able to get rid of preview-latex graphics being
displayed twice by ensuring that there are no overlaps of constructs
treated by both packages. You can e.g. remove the label and item
stuff from `TeX-fold-macro-spec-list' which will improve the situation
in circ.tex a bit.
--
Ralf
Loading...