pol | 1 Mar 09:07 2007
Picon

web browser plug-in?


Has anybody ever tried to build a plug-in to enable web browsers to 
display lyx files? 
Lyx files would be displayed to users through konqueror, safari, firefox, 
ie-explorer toogether with a warning that, to print that file,
latex is to be installed on the local station. 
What do you think?
--
Pol

Abdelrazak Younes | 1 Mar 09:34 2007
Picon

Re: web browser plug-in?

pol wrote:
> Has anybody ever tried to build a plug-in to enable web browsers to 
> display lyx files? 
> Lyx files would be displayed to users through konqueror, safari, firefox, 
> ie-explorer toogether with a warning that, to print that file,
> latex is to be installed on the local station. 
> What do you think?

It's a good idea and I guess many of us had the same idea many times a 
year :-)

More seriously, LyX will switch to XML in 1.6. So, with proper XSL 
technology, it should be possible to display a pretty good 
representation of LyX content in xhtml format in any standard compliant 
browser. Then you wouldn't even need a plugin.

Another idea would be to implement a javascript based convertor from lyx 
to html. Shouldn't be very hard.

As for a proper LyX plugin, if it possible to implement such a beast in 
Python, lyx2lyx could probably help there.

A server side LyX-based conversion to html is also a good solution.

Abdel.

pol | 1 Sep 22:21 2008
Picon

Re: web browser plug-in?

On 2007-03-01, Abdelrazak Younes <younes.a <at> ...> wrote:

> More seriously, LyX will switch to XML in 1.6. So, with proper XSL 
> technology, it should be possible to display a pretty good 
> representation of LyX content in xhtml format in any standard compliant 
> browser. Then you wouldn't even need a plugin.

Any progress in this regard?

Thank you
--
Pol

Jean-Marc Lasgouttes | 2 Sep 09:59 2008

Re: web browser plug-in?

pol <xtekhne@...> writes:
> On 2007-03-01, Abdelrazak Younes <younes.a <at> ...> wrote:
>
>> More seriously, LyX will switch to XML in 1.6. So, with proper XSL 
>> technology, it should be possible to display a pretty good 
>> representation of LyX content in xhtml format in any standard compliant 
>> browser. Then you wouldn't even need a plugin.
>
> Any progress in this regard?

This is not going to happen in 1.6.

JMarc

Abdelrazak Younes | 1 Mar 09:44 2007
Picon

Re: web browser plug-in?

Abdelrazak Younes wrote:
> More seriously, LyX will switch to XML in 1.6. So, with proper XSL 
> technology, it should be possible to display a pretty good 
> representation of LyX content in xhtml format in any standard compliant 
> browser. Then you wouldn't even need a plugin.

This link has some info as to what is possible today for TeX math to 
MathML conversion:

http://www.w3.org/Math/Software/mathml_software_cat_converters.html

Looks difficult to do it right, maybe we should switch to MathML format 
in LyX?

Abdel.

Abdelrazak Younes | 1 Mar 09:48 2007
Picon

Re: web browser plug-in?

Abdelrazak Younes wrote:
> Abdelrazak Younes wrote:
>> More seriously, LyX will switch to XML in 1.6. So, with proper XSL 
>> technology, it should be possible to display a pretty good 
>> representation of LyX content in xhtml format in any standard 
>> compliant browser. Then you wouldn't even need a plugin.
> 
> This link has some info as to what is possible today for TeX math to 
> MathML conversion:
> 
> http://www.w3.org/Math/Software/mathml_software_cat_converters.html

Another convertor that seems promising:

http://hermes.roua.org/

Abdel.

christian.ridderstrom | 1 Mar 13:33 2007
Picon

Re: web browser plug-in?

On Thu, 1 Mar 2007, Abdelrazak Younes wrote:

> A server side LyX-based conversion to html is also a good solution.

Or a job running on the server that converts the .lyx-files to PDF/DVI on 
demand and serves those instead?  Or possibly HTML, depending on what's 
desired.

Btw, this is similar to how mathematics is shown in the wiki. LaTeX code 
is embedded in the page, and automatically converted to a GIF that's shown 
instead of the LaTeX code.

Maybe the viewer could work with DVI, showing one page a time?

/C

--

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr
Helge Hafting | 1 Mar 13:15 2007
Picon
Picon

Re: web browser plug-in? Try mozplugger

pol wrote:
> Has anybody ever tried to build a plug-in to enable web browsers to 
> display lyx files? 
> Lyx files would be displayed to users through konqueror, safari, firefox, 
> ie-explorer toogether with a warning that, to print that file,
> latex is to be installed on the local station. 
> What do you think?
>   
Well, mozplugger can display anything, so you already got it.
Stick something like this in /etc/mozpluggerrc:
### LyX
text/plain:lyx:LyX document
    repeat swallow(lyx): lyx "$file"

Now, firefox (and any other browser that works with mozplugger)
will be able to launch lyx as a plugin. You can then view and edit
the lyx file with an instance of LyX running inside firefox. :-)

Unfortunately, this only works if you use "File->Open" from the
firefox menu, or if you download from a webserver
that is nice enough to _not_ report any content-type for
the lyx file.

My webserver (apache) is stupid enough to call a lyx file "text/plain",
and of course you can't override text/plain in mozpluggerrc
because the browser believe it can handle text/plain itself
and so it stupidly displays the lyx file as a text file.

If someone has a solution to this problem (make mozplugger
go by extension only, or fix all the webservers in the world so
(Continue reading)

John McCabe-Dansted | 1 Mar 16:21 2007
Picon

Re: web browser plug-in? Try mozplugger

On 3/1/07, Helge Hafting <helge.hafting@...> wrote:
> My webserver (apache) is stupid enough to call a lyx file "text/plain",
> and of course you can't override text/plain in mozpluggerrc
> because the browser believe it can handle text/plain itself
> and so it stupidly displays the lyx file as a text file.
>
> If someone has a solution to this problem (make mozplugger
> go by extension only, or fix all the webservers in the world so
> they don't assume a lyx file is plain text) then that'd be nice.

When, you could kill two birds with one stone and ask people to compress
    (select Document->Compressed checkbox)
their lyx files before putting them on the web. This means that any
normal webserver will report the lyx file as an
application/octet-stream. E.g. try loading:
   http://www.csse.uwa.edu.au/~john/compressed.lyx
v.s. loading
   http://www.csse.uwa.edu.au/~john/Extended.lyx
in mozplugger.

--

-- 
John C. McCabe-Dansted
PhD Student
University of Western Australia

Richard Kleeman | 1 Mar 17:14 2007
Picon

Re: web browser plug-in? Try mozplugger

John McCabe-Dansted wrote:
> On 3/1/07, Helge Hafting 
> <helge.hafting@...> wrote:
>> My webserver (apache) is stupid enough to call a lyx file "text/plain",
>> and of course you can't override text/plain in mozpluggerrc
>> because the browser believe it can handle text/plain itself
>> and so it stupidly displays the lyx file as a text file.
>>
>> If someone has a solution to this problem (make mozplugger
>> go by extension only, or fix all the webservers in the world so
>> they don't assume a lyx file is plain text) then that'd be nice.
> 
> When, you could kill two birds with one stone and ask people to compress
>    (select Document->Compressed checkbox)
> their lyx files before putting them on the web. This means that any
> normal webserver will report the lyx file as an
> application/octet-stream. E.g. try loading:
>   http://www.csse.uwa.edu.au/~john/compressed.lyx
> v.s. loading
>   http://www.csse.uwa.edu.au/~john/Extended.lyx
> in mozplugger.
> 

Good idea the compressed output. Works well on my Ubuntu system.


Gmane