help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding references when editing LaTeX?


From: David Kastrup
Subject: Re: Hiding references when editing LaTeX?
Date: 27 Feb 2003 17:40:35 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Oliver Scholz <alkibiades@gmx.de> writes:

> David Kastrup <dak@gnu.org> writes:
> 
> > "Felix E. Klee" <felix.klee@inka.de> writes:
> [...]
> >> But font-lock-mode can't hide he "\emph{" and the corresponding "}", right?
> > Well, you could let it use an invisible font or something, but that
> > would probably be not quite convenient for editing.  Perhaps in
> > connection with auto-reveal-mode something could be fudged.
> [...]
> 
> Hmm, what would be the cleaner/easier solution: to add that feature to
> preview-latex or to the font-locking in AUCTeX?

preview-latex would need to achieve two different things here: not
display \emph at all, and add text properties to the argument.  The
interface does not currently permit a command and its arguments to be
treated differently, and it might be quite a feat to implement
something like that consistently.  OTOH, it would offer quite numerous
possibilities to mark things up in the Emacs buffer that are hard to
parse correctly otherwise.  For example, if you take the source code
of packages like verbatim.sty, it is almost impossible with all the
catcode changes and whatever going on to let Emacs correctly
determine just what is to be font locked as verbatim and what not.
Using preview-latex would make getting the correct information easy.

> [What do you mean by "invisible font"?]

Text property 'invisible would probably be sufficient.  I am not sure
if font-lock-mode can only select particular faces (in which case one
would use something like invisible-face) or arbitrary text properties.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

[Prev in Thread] Current Thread [Next in Thread]