Re: How to convert TeX to SVG?



Philipp Stephani <LookInSig@xxxxxxxx> wrote:
JohnF <john@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
William F Hammond <hammond@xxxxxxxxxxxxxx> wrote:
JohnF <john@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
Thanks, Philipp. Tried that as both .xml and .xhtml and it
just shows a blank screen (except that I added some text which
does get displayed) in all three browsers I have. Support's
apparently not ubiquitous.

It's failing for you in Firefox?

Yup. That's Firefox version 2.0.0.14 (my, these guys are fine-grained)
as supplied out-of-the-box with Slackware Linux version 12.1.
I'm pointing it to a file containing, exactly as Philipp suggested,
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml";
xmlns:svg="http://www.w3.org/2000/svg";>
<head>
<title>XHTML plus SVG</title>
</head>
<body>
<h2>svgtester</h2>
<svg:svg width="200" height="200" version="1.1">
<svg:circle cx="100" cy="100" r="100"/>
</svg:svg>
</body>
</html>
and I tried that file named as svgtester.xml, .xhtml and .html.
Same result either way... it shows the <h2> header and nothing else.

I've uploaded this example:
http://homepages.physik.uni-muenchen.de/~Philipp.Stephani/LaTeX/SVGTest.html
and tested it with browsershots.org (well, at least I tried, but it
takes too long...). From the screenshots that are already finished I can
see that it works on Firefox 2.0.0.19 on Ubuntu 8.04 and most other browsers.

My bad. Your SVGTest.html example works fine, so I downloaded it
and diff'ed it against the one I'd cut-and-pasted from your earlier
post. Turns out the single long line
<html xmlns= ... xmlns:svg="http://www.w3.org/2000/svg";>
had become two lines
<html xmlns= ... xmlns:svg="http://www.w3.org/2000/svg
">
during the cut/paste process. But I hadn't noticed that because
in vi it just looked to me like one long line that had wrapped.
And that extra cr is apparently enough to mess things up.
Sorry about that. But, to repeat, you're right, it works.
Also works in Seamonkey 1.1.9, although konqueror as supplied
with kde 3.5.9 continues displaying a blank screen (except for
the <h2> header).
That still leaves the problem of finding a dvi-->svg conversion
that produces an output file that can be used in an <img>-type html
tag. Otherwise it won't be useful for mathtex. But now that I have
a reasonably robust model of svg syntax that works across a range
pf browsers, I'll take another crack at it as time permits.
Changing mathtex to provide an option that passes the dvi through
dvisvgm, or through any other dvi-->svg converter, is pretty easy.
The hard part is (or has been so far) telling users what <tag> they
should write to display the file produced by that dvi-->svg step.
With gif or png, it's simply <img src="mathtex.cgi?\int_a^bf(x)dx">
which always works in any browser. The only complaint has been
that it doesn't always print well, which (I assume) is because gif
and png bitmaps don't scale. An svg option should print better,
but only if there's some simple <tag> syntax that users can write
in their html pages to generate and display the file.
--
John Forkosh ( mailto: j@xxxxx where j=john and f=forkosh )
.



Relevant Pages

  • Re: one page on website wont load in internet explorer
    ... it's the link to WCA exhibitions. ... I noticed that it didn't display until I went ... into HTML mode and changed the text colour to black. ... being used by some browsers and so the background defaults to white. ...
    (microsoft.public.frontpage.client)
  • Re: Considerations for a better Import/Export Format Goals
    ... display it not only without caring if it's valid, ... that's not the problem with browsers. ... who said malware can't exist in well-formed HTML? ... No schema can guarantee that the data is not mangled. ...
    (soc.genealogy.computing)
  • Re: HTML 5 Test
    ... possible - cos I can't see a use for html if it doesn't) ... my non compliant sites have been visited and enjoyed by folk ... It's purpose is to enable websites and developers to do or display ... That doesn't exclude older browsers as the majority of new tricks will ...
    (uk.people.silversurfers)
  • Re: Image height and width
    ... In the context of HTML, the width and height attributes of any ... element types do not address inherit dimensions at all; ... browsers on most platforms, in spite of what the specification says. ... you'd be advised to offer pictures for display at ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: How to convert TeX to SVG?
    ... It's failing for you in Firefox? ... and I tried that file named as svgtester.xml, .xhtml and .html. ... From the screenshots that are already finished I can ... see that it works on Firefox 2.0.0.19 on Ubuntu 8.04 and most other browsers. ...
    (comp.text.tex)