[Top][All Lists]

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

Re: enriched-mode and switching major modes.

From: Oliver Scholz
Subject: Re: enriched-mode and switching major modes.
Date: Mon, 20 Sep 2004 21:35:40 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (windows-nt)

Oliver Scholz <address@hidden> writes:

> <blush/> I have to admit that I have never thought of the `category'
> property, instead I have always experimented with implementing its
> functionality myself.  Thanks for the reminder.  This might indeed be
> useful.

I think we need a way for merging categories, if those are supposed to
be used.

In RTF we have:

(section stylesheets: specifying both character and paragraph
formatting properties)

paragraph stylesheets: specifying both character and paragraph
formatting properties

character stylesheets: specifying only character formatting

explicit setting of propeties, bother character and paragraph

These four need to be merged in that order.  I'd like to use the
`category' text property for both character and paragraph formatting,
but I don't know how.

I used to solve that problem in my past prototypes by maintaining two
text properties, one for character and one for paragraph properties.
These text properties would hold a vector each with all necessary
formatting properties, including a reference to a stylesheet, if any.
A fontification function in `jit-lock' would then resolve the
formatting information accordingly and create an anonymous face.  This
works.  But finding a way to use the `category' text property would be

Here is a make-up example for the issue in XHTML:

<?xml version="1.0" encoding="us-ascii" ?>
    <title>Lirum larum</title>
    <style type="text/css">
       h2 { text-decoration: underline }
             font-style: italic;
             color: blue;
        span.special { font-size: 12pt; }
       <!-- Think of span.charstyle as the character formatting
           stylesheet in RTF and of span.special as explicit
           overwriting of a character formatting property. -->
    <h2>The headline plus <span class="charstyle">character formatting
    stylesheet plus
      <span class="special">explicitely added

Oliver Scholz               Jour des Récompenses de l'Année 212 de la Révolution
Ostendstr. 61               Liberté, Egalité, Fraternité!
60314 Frankfurt a. M.       

reply via email to

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