Full_Name: Fred Nicolls
OS: FreeBSD 3.3-STABLE
Version: xemacs-21.1.7
mule: no
severity: Aggravating
Submission from: (NULL) (196.7.0.164)
Quite often it seems to happen (at least for me) that the LaTeX mode
font-lock loses sync between math and non-math. The primary cause
appears to be when fairly complex inline math expressions are split
across line boundaries.
The following file excerpt exhibits this problem:
---
\documentclass[a4paper,10pt]{article}
\usepackage{a4wide}
\usepackage{amsmath}
\begin{document}
Basilevsky~\cite{Basilevsky83}, for example, provides such a matrix,
which is closely related to the DFT matrix. A second approach,
suggested by Johnson~\cite{Johnson94}, is to require conjugate
symmetry in the random draws of ${\bf y}$, so $y_k = (y_{2 M + 2 -
k})^*$. In that case the transformed data ${\bf z}={\bf F}^\dagger
{\bf y}$ will be real, as required.
The procedure outlined here may be extended to the generation of 2-D
random samples without any further conceptual complications. In this
case the covariance of the required data will be doubly block
Toeplitz, which can be embedded into a doubly circulant matrix in much
the same way as for the 1-D case. The 2-D DFT can be used to
efficiently diagonalise the resulting covariance, and samples
generated accordingly.
\end{document}
---
The problem can be reproduced by performing the following steps:
1. Create a file on disk (sg.tex in my case) containing the above code
snippet.
2. Load the file using "xemacs -vanilla sg.tex".
3. Enable font-locking "M-x font-lock-mode"
4. The buffer fontifies correctly. However, if anything in the second
paragraph is changed, the line switches to fontification as if in
math mode. For example, adding a space somewhere in the centre of
the third line of the second paragraph switches the entire line to
math fontification.
The problem also occurs when using Peter Galbraith's font-latex.el
package. This seems to suggest a more general font-locking bug.
The problem does not occur with GNU emacs.
--=-=-=--