Re: How to convert TeX to SVG?
- From: JohnF <john@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 9 Dec 2009 23:47:54 +0000 (UTC)
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 )
.
- Follow-Ups:
- Re: How to convert TeX to SVG?
- From: Martin
- Re: How to convert TeX to SVG?
- References:
- How to convert TeX to SVG?
- From: Sean
- Re: How to convert TeX to SVG?
- From: Robin Fairbairns
- Re: How to convert TeX to SVG?
- From: JohnF
- Re: How to convert TeX to SVG?
- From: Philipp Stephani
- Re: How to convert TeX to SVG?
- From: JohnF
- Re: How to convert TeX to SVG?
- From: William F Hammond
- Re: How to convert TeX to SVG?
- From: JohnF
- Re: How to convert TeX to SVG?
- From: Philipp Stephani
- How to convert TeX to SVG?
- Prev by Date: Re: How to convert TeX to SVG?
- Next by Date: Re: Appending text to labels
- Previous by thread: Re: How to convert TeX to SVG?
- Next by thread: Re: How to convert TeX to SVG?
- Index(es):
Relevant Pages
|