LaTeX->PSGML

R

Randy Yates

Dear comp.text.xml,

Have you seen the web site called "Connexions" (http://cnx.org)? The
folks there have come up with a wonderful method using something
called PSGML of allowing authors to write one document such that this
document can be "rendered" to either HTML (for the web) or PDF (for
printing/more "nice" typesetting). The technique can also render math
equations using MathML.

I would like to base my web site design on something very similar, but
I instead want the main source document to be a LaTeX document.

I know there are things like LaTeX2HTML out there, but it seems that
this "XML"-centric method of doing things gives better results (e.g.,
MathML output, and in general, true HTML without any "images" to
represent text).

Therefore, does anyone know of a LaTeX->PSGML converter, or of some
technique that could be used to do this type of thing, or something
similar?

I also could use some pointers on how to render the PSGML into PDF and
HTML.

Any ideas/comments/suggestions welcome.
--
% Randy Yates % "Bird, on the wing,
%% Fuquay-Varina, NC % goes floating by
%%% 919-577-9882 % but there's a teardrop in his eye..."
%%%% <[email protected]> % 'One Summer Dream', *Face The Music*, ELO
http://home.earthlink.net/~yatescr
 
D

David Carlisle

Randy said:
Dear comp.text.xml,

Have you seen the web site called "Connexions" (http://cnx.org)? The
folks there have come up with a wonderful method using something
called PSGML of allowing authors to write one document such that this
document can be "rendered" to either HTML (for the web) or PDF (for
printing/more "nice" typesetting). The technique can also render math
equations using MathML.

I would like to base my web site design on something very similar, but
I instead want the main source document to be a LaTeX document.

I know there are things like LaTeX2HTML out there, but it seems that
this "XML"-centric method of doing things gives better results (e.g.,
MathML output, and in general, true HTML without any "images" to
represent text).

Therefore, does anyone know of a LaTeX->PSGML converter, or of some
technique that could be used to do this type of thing, or something
similar?

I also could use some pointers on how to render the PSGML into PDF and
HTML.

Any ideas/comments/suggestions welcome.

psgml isn't a language it's an emacs mode for editing sgml and xml
files. So what you need is a latex to xml convertor: there are several
of these, eg tex4ht. In practice how well a latex to xml convertor works
(whichever system you use) depends greatly on how well structured the
latex is.
 
J

Joe Kesselman

The more standard approach would be to start with an XML-based source
representation such as Docbook, and put it through XSLT stylesheets to
produce either HTML/XHTML (for the web) or XSL-FO (which can then be run
through an FO processor to render as PDFs).
 
R

Randy Yates

David Carlisle said:
psgml isn't a language it's an emacs mode for editing sgml and xml
files.

Hi David,

Ahh, ok thanks for clearing that up. I also see now that connexions
uses cnxml - presumably their dialect of xml.
So what you need is a latex to xml convertor: there are several
of these, eg tex4ht. In practice how well a latex to xml convertor
works (whichever system you use) depends greatly on how well
structured the latex is.

Can you please provide the names of these latex->xml converters (other
than tex4ht)? I need mathml output, and I'm still not clear on whether
or not tex4ht can generate that.
--
% Randy Yates % "Though you ride on the wheels of tomorrow,
%% Fuquay-Varina, NC % you still wander the fields of your
%%% 919-577-9882 % sorrow."
%%%% <[email protected]> % '21st Century Man', *Time*, ELO
http://home.earthlink.net/~yatescr
 
R

Randy Yates

Joe Kesselman said:
The more standard approach would be to start with an XML-based source
representation such as Docbook, and put it through XSLT stylesheets to
produce either HTML/XHTML (for the web) or XSL-FO (which can then be
run through an FO processor to render as PDFs).

Hey Joe (where you going with that gun in your hand?),

The problem with this approach is that it would require rewriting
a significant number of LaTeX documents in XML. I'd like to "retarget"
some of my existing LaTeX documents to HTML (or XHTML?) and be done
with it. And it seems like this should be a problem that's already
been solved.
--
% Randy Yates % "And all that I can do
%% Fuquay-Varina, NC % is say I'm sorry,
%%% 919-577-9882 % that's the way it goes..."
%%%% <[email protected]> % Getting To The Point', *Balance of Power*, ELO
http://home.earthlink.net/~yatescr
 
J

Joe Kesselman

Randy said:
The problem with this approach is that it would require rewriting
a significant number of LaTeX documents in XML. I'd like to "retarget"
some of my existing LaTeX documents to HTML (or XHTML?) and be done
with it. And it seems like this should be a problem that's already
been solved.

Well, if you can get your paws on an LaTeX parser, plugging it into a
stage which outputs the data model in an XML form should be simple. (Or
you may be able to write a LaTeX processing style which does that.) Then
plug that into stylesheets which take it the rest of the way.
 
D

David Carlisle

Randy said:
Can you please provide the names of these latex->xml converters (other
than tex4ht)? I need mathml output, and I'm still not clear on whether
or not tex4ht can generate that.
--

tex4ht can generate mathml, there's also latexml
http://dlmf.nist.gov/LaTeXML/
and several others. It's hard to keep up to date with all the systems
but google is your friend....

David
 
P

Peter Flynn

Randy said:
Dear comp.text.xml,

Have you seen the web site called "Connexions" (http://cnx.org)? The
folks there have come up with a wonderful method using something
called PSGML of allowing authors to write one document such that this
document can be "rendered" to either HTML (for the web) or PDF (for
printing/more "nice" typesetting). The technique can also render math
equations using MathML.

I would like to base my web site design on something very similar, but
I instead want the main source document to be a LaTeX document.

You might also want to look at HeVeA
(http://pauillac.inria.fr/~maranget/hevea/index.html)

///Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top