Jens Jorgen Mortensen | 3 Jan 15:03 2005
Picon
Picon

Re: Re: How to add a tex-math role?

Felix Wiemann wrote:
> You don't have CVS write access, do you?  If you'd like to use CVS for
> working on the math support, please send me your SourceForge.net user
> name and I'll enable write access for you and send you links to all
> relevant documents (how to use SF.net CVS etc.).

I don't have CVS write access.  I don't know what is the best approach. 
  CVS-branch or wait for plugin support?

> Thank you.
> 
> * The MathML rendering is terrible here, but that's because I don't have
>   the necessary fonts installed on my system.  I currently don't have
>   time to learn how fonts work on X11, but I expect to get it working in
>   a week or two.

I look forward to that!  My MathML rendering is also not perfect.

> * The resulting XHTML file isn't valid, because it's using "math:*"
>   elements.  I don't know how to fix that though.

I also don't know how to fix that - there must be someone on this list 
that knows how to do it?

Jens Jørgen

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
(Continue reading)

Alan G Isaac | 5 Jan 16:13 2005
Picon

Re[2]: How to add a tex-math role?

> Felix Wiemann wrote:
>> * The resulting XHTML file isn't valid, because it's using "math:*"
>>   elements.  I don't know how to fix that though.

On Mon, 03 Jan 2005, Jens Jorgen Mortensen apparently wrote:
> I also don't know how to fix that - there must be someone on this list
> that knows how to do it?

I did not see an answer to Jens's question on this list.
Perhaps section A.2.3 (MathML as a DTD Module) of
http://www.w3.org/TR/MathML2/appendixa.html
can help?

One problem: rst2html still uses the name attribute,
which more recent DTDs (as this one) do not include.
Can it be turned off?

fwiw,
Alan Isaac

PS http://www.w3.org/TR/2002/WD-XHTMLplusMathMLplusSVG-20020809/
may also be of interest.

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Felix Wiemann | 5 Jan 17:38 2005
Picon
Picon

Re: How to add a tex-math role?

Alan G Isaac wrote:

> One problem: rst2html still uses the name attribute, which more recent
> DTDs (as this one) do not include.  Can it be turned off?

Not easily.

If anyone wants to fiddle with the code: There is a `named_tags` list in
the HTMLTranslator (in html4css1.py), which determines which tags get a
'name' attribute if they already have an 'id' attribute, and there are
some occurences of "name=" and "'name'" in html4css1.py.  That's all, I
think.  Please get a new CVS snapshot (or checkout) before starting off,
since I've just changed named_tags from a dictionary to a list.

Probably that 'name' attribute can be removed anyway, because there are
no recent browsers which do not support 'id'.  But that needs to be
tested first, and there is currently not enough time.

Which remembers me of the Docutils-internal id/name mess.  Needs to be
refactored and documented (by David, probably).  I currently don't
really understand what's the difference, except that "id" is unique.
And the design seems to be quite some pain, given that we still didn't
manage to fix the mislocated-targets bug (at
<http://docutils.sourceforge.net/BUGS.html#mislocated-targets>).

--

-- 
When replying to my email address, please ensure
that the mail header contains 'Felix Wiemann'.

http://www.ososo.de/
(Continue reading)

David Goodger | 13 Jan 07:36 2005

Re: Re: How to add a tex-math role?

[Felix Wiemann]
 >> One problem: rst2html still uses the name attribute, which more
 >> recent DTDs (as this one) do not include.  Can it be turned off?

A setting/option could be added to the HTML writer to turn off "name"
attributes.

[Alan G Isaac]
 > Probably that 'name' attribute can be removed anyway, because there
 > are no recent browsers which do not support 'id'.  But that needs to
 > be tested first, and there is currently not enough time.

As long as Netscape 4 is still in use, we can't drop the 'name'
attribute.  The last time this discussion came up, Netscape 4 was
still in use.

 > Which remembers me of the Docutils-internal id/name mess.

<ahem> Excuse me?  I didn't realize there was a mess at all.  The
system works quite well IMO.

 > Needs to be refactored and documented (by David, probably).  I
 > currently don't really understand what's the difference, except that
 > "id" is unique.

Docutils names are the human interface to IDs.  Both names and IDs
must be unique; otherwise an error results.  IDs are simply a
tranformation of names to something that software can handle.  A
chapter whose title is "Ruminations On Names & Nomenclature" gets a
name of "ruminations on names & nomenclature" (normalized form of the
(Continue reading)

Felix Wiemann | 13 Jan 16:24 2005
Picon
Picon

Re: How to add a tex-math role?

David Goodger wrote:

> A setting/option could be added to the HTML writer to turn off "name"
> attributes.

Too much bloat, IMO.

> As long as Netscape 4 is still in use, we can't drop the 'name'
> attribute.

We can.  Very few people are using it today, and current wisdom in
newsgroups seems to be "they can be glad if they see anything."  I mean,
who cares if NN4 users can use the table of contents or have to navigate
manually?  And after all, the changes we do *now* propagate very slowly
to users actually viewing the HTML pages.

I wouldn't mind waiting another year or two 'til we remove the
attribute, but only as long as it doesn't cause extra complications in
the code.

>> Which remembers me of the Docutils-internal id/name mess.
>
> <ahem> Excuse me?  I didn't realize there was a mess at all.

I found it quite difficult to understand; and I assumed it was really a
mess because I misread the to-do list entry about names and IDs.  Sorry.

> Docutils names are the human interface to IDs.

Now this makes things somewhat clearer.  Added to Element docstring; if
(Continue reading)

David Goodger | 15 Jan 22:59 2005

Re: Re: How to add a tex-math role?

 > David Goodger wrote:
 >> A setting/option could be added to the HTML writer to turn off
 >> "name" attributes.

[Felix Wiemann]
 > Too much bloat, IMO.

Very minor, and localizable.  The "bloat" argument doesn't sway me.

 >> As long as Netscape 4 is still in use, we can't drop the 'name'
 >> attribute.
 >
 > We can.  Very few people are using it today, and current wisdom in
 > newsgroups seems to be "they can be glad if they see anything."  I
 > mean, who cares if NN4 users can use the table of contents or have
 > to navigate manually?  And after all, the changes we do *now*
 > propagate very slowly to users actually viewing the HTML pages.
 >
 > I wouldn't mind waiting another year or two 'til we remove the
 > attribute, but only as long as it doesn't cause extra complications
 > in the code.

I really don't care much either way.
-0

 >>> And the design seems to be quite some pain, given that we still
 >>> didn't manage to fix the mislocated-targets bug (at
 >>> <http://docutils.sourceforge.net/BUGS.html#mislocated-targets>).
 >>
 >> That bug is completely unrelated to the handling of names & IDs.
(Continue reading)

Felix Wiemann | 16 Jan 19:22 2005
Picon
Picon

Re: How to add a tex-math role?

David Goodger wrote:

> Felix Wiemann wrote:
>
>> David Goodger wrote:
>>
>>> A setting/option could be added to the HTML writer to turn off
>>> "name" attributes.
>>
>> Too much bloat, IMO.
>
> Very minor, and localizable.

It's not really minor:

Implementation, testing, documentation, dealing with bug reports,
additional effort for removing it later, more documentation to read for
users.

The costs outweigh the benefits, IMO.

>>>> And the design seems to be quite some pain, given that we still
>>>> didn't manage to fix the mislocated-targets bug (at
>>>> <http://docutils.sourceforge.net/BUGS.html#mislocated-targets>).
>>>
>>> That bug is completely unrelated to the handling of names & IDs.
>>
>> It's not.  We need multiple IDs and names per node to fix that,
>> don't we?
>
(Continue reading)

Alan G Isaac | 13 Jan 17:46 2005
Picon

Re[2]: Re: How to add a tex-math role?

On Thu, 13 Jan 2005, David Goodger apparently wrote:
> As long as Netscape 4 is still in use, we can't drop the 'name'
> attribute.  The last time this discussion came up, Netscape 4 was
> still in use.

At this point it seems that there is a serious cost to
retaining compatability with ancient browsers, since
important DTDs (e.g., XHTML+MathML) do not include the
name element.  (Of course it could be added to the
internal subset, I suppose, as a transition measure.)

Is there really adequate benefit?  NN4 usage seems
practically nil (e.g.,
http://www.w3schools.com/browsers/browsers_stats.asp)

fwiw,
Alan Isaac

PS It seems that some of Felix's comments were attributed
to me ... 

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
David Goodger | 15 Jan 22:56 2005

Re: Re: How to add a tex-math role?

[Alan G Isaac]
 > At this point it seems that there is a serious cost to
 > retaining compatability with ancient browsers, since
 > important DTDs (e.g., XHTML+MathML) do not include the
 > name element.

Is that really a "serious cost"?  How exactly does it adversely impact
anyone?

 > (Of course it could be added to the
 > internal subset, I suppose, as a transition measure.)

That seems like a friendly, inclusive change.  Assuming that browsers
won't barf when they see internal DTD subsets, that is.

 > Is there really adequate benefit?  NN4 usage seems
 > practically nil (e.g.,
 > http://www.w3schools.com/browsers/browsers_stats.asp)

"Practically nil" != nil.  There's benefit to anyone who does have to
use NN4.

I vote -0 on this: go ahead and rip out the "name" attributes, but be
prepared to put them back if we receive any complaints.

 > PS It seems that some of Felix's comments were attributed
 > to me ...

Yes, sorry, I mixed up the attributions.

(Continue reading)

Alan G Isaac | 17 Jan 00:33 2005
Picon

Re[2]: Re: How to add a tex-math role?

> [Alan G Isaac]
>  > (Of course it could be added to the
>  > internal subset, I suppose, as a transition measure.)

On Sat, 15 Jan 2005, David Goodger apparently wrote:
> That seems like a friendly, inclusive change.  Assuming that browsers
> won't barf when they see internal DTD subsets, that is.

Quick single test of internal subset handling with
identical file (valid XHTML) under different names
(-> served as different filetypes).

FireFox 1.0
        test.xhtml      fine
        test.htm        barf
        text.xml        fine
IE 6
        test.xhtml      barf
        test.htm        barf
        text.xml        barf
Opera 7.5
        test.xhtml      fine
        test.htm        almost fine (ignores internal subset,
                        won't use xml stylesheet declaration)
        text.xml        fine

Doesn't look promising.

Alan Isaac

(Continue reading)

Jens Jorgen Mortensen | 10 Jan 11:10 2005
Picon
Picon

Re: Re[2]: How to add a tex-math role?

Alan G Isaac wrote:
>>Felix Wiemann wrote:
>>
>>>* The resulting XHTML file isn't valid, because it's using "math:*"
>>>  elements.  I don't know how to fix that though.
> 
> 
> On Mon, 03 Jan 2005, Jens Jorgen Mortensen apparently wrote:
> 
>>I also don't know how to fix that - there must be someone on this list
>>that knows how to do it?
> 
> 
> I did not see an answer to Jens's question on this list.
> Perhaps section A.2.3 (MathML as a DTD Module) of
> http://www.w3.org/TR/MathML2/appendixa.html
> can help?

Yes, with this DTD:

<!DOCTYPE html PUBLIC
     "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
     "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">

it validates, except for this error (that you also mentioned):

Line 16, column 12: there is no attribute "name"

<h1><a name="testing-mathml">Testing MathML</a></h1>
            ^
(Continue reading)

Alan G Isaac | 10 Jan 15:12 2005
Picon

Re[2]: Re[2]: How to add a tex-math role?

On Mon, 10 Jan 2005, Jens Jorgen Mortensen apparently wrote:
> <!DOCTYPE html PUBLIC
>      "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
>      "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
> it validates, except for this error (that you also mentioned):

I have the impression that reST will be discarding the name
attribute, partly due to lack of compatability with recent
W3C DTDs.  So I vote that you can safely ignore this one error
for the math component.

Alan

PS Including SVG support seems desirable, but the
XHTML 1.1 plus MathML 2.0
DTD also validates (except for the name attribute).

PPS When you are ready, I'll make a math entity translation
like the Greek letters translation I sent you.  

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Jens Jorgen Mortensen | 11 Jan 11:51 2005
Picon
Picon

Re: Re[2]: How to add a tex-math role?

Alan G Isaac wrote:
> On Mon, 10 Jan 2005, Jens Jorgen Mortensen apparently wrote:
> 
>><!DOCTYPE html PUBLIC
>>     "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
>>     "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
>>it validates, except for this error (that you also mentioned):
> 
> 
> 
> I have the impression that reST will be discarding the name
> attribute, partly due to lack of compatability with recent
> W3C DTDs.  So I vote that you can safely ignore this one error
> for the math component.

Good!

> PPS When you are ready, I'll make a math entity translation
> like the Greek letters translation I sent you.  

I'm ready!  But I don't know exactly what you mean?  Do you mean 
translation of \leftarrow, \pm, \leq, and all that stuff to unicode? 
That is most welcome!

Jens Jørgen

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
(Continue reading)


Gmane