login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

 Submitted by : (unknown) at: 2007-11-17T22:09:13-08:00 (10 years ago) Name : Axiom Version : default friCAS-20090114 Axiom-20050901 OpenAxiom-20091012 OpenAxiom-20110220 OpenAxiom-Release-141 Category : Axiom Aldor Interface Axiom Compiler Axiom Library Axiom Interpreter Axiom Documentation Axiom User Interface building Axiom from source lisp system MathAction Doyen CD Reduce Axiom on Windows Axiom on Linux Severity : critical serious normal minor wishlist Status : open closed rejected not reproducible fix proposed fixed somewhere duplicate need more info Optional subject :   Optional comment :

We would like to be able to edit and display Axiom pamphlet files on MathAction. Pamphlet files contain both source code and documentation. All of the files necessary to build Axiom are pamphlet files. The format is LaTeX plus some extra markup for code sections and must be preprocessed by a "noweb" filter before LaTeX.

Pamphlet files on MathAction would allow easy access to Axiom system documentation plus the ablity to collaboratively edit the Axiom source and documentation through the web. Development versions of Axiom could then be built directly from the modified pamphlet files. This should significantly shorten the time required to enhance and maintain the system.

## Revised Design: Thumbnail first page

Because of problems with display of embedded PDF files (see section below plus attached comments), it was decided to replace the embedded PDF with an PNG image of the first page (usually the title page) of the pamphlet file. This image file is considerably smaller than the full PDF file and can be displayed in all browsers regardless of whether an PDF viewer plug-in is available. But since this is only an image of the first page, we should think of this as a "thumbnail", i.e. just a reminder of what the actual document looks like.

To access the real document, the user must click on pdf or dvi. If a viewer for either pdf or dvi format is available the browser will normally launch the viewer. If not, then the browser will offer to save the file to disk.

The src link will display the actual source of the pamphlet file. This can be saved to disk (using right-click/Save As or other appropriate browser idiom) for local use with an Axiom source distribution.

The tex link displays the output of the literate program weave operation applied to the source file. This is pure LaTeX code and can be saved and subsequently processed by LaTeX if desired.

The log link displays the log file generated by LaTeX. If the document thumbnail does not appear after clicking Save you should check this file for error messages and make corrections to the pamphlet file as necessary.

The tangle button and the associated drop down box are used to access the program code contained in the literate progam document. Select a code chunk name from the drop down box and then click tangle to run the literate program tangle operation on the source file. The resulting code will be displayed in the browser and can be saved to disk and used locally if desired.

To edit pamphlet files, just click edit (located on the upper right of the page) as you would for any other page on MathAction.

## Original Design: Embedded PDF

See example page SandBox Embeded PDF

It is well known that conversion to HTML does not produce hiqh quality presentations of LaTeX content. LaTeX can be easily rendered as publication quality pdf, but the pdf format itself is not well suited as a web format. pdf is a proprietary format although viewers, browser plugins and pdf creation software is freely. The use of pdf is a compromize that is made necessary by technical limitations of current web browser software.

It is possible to embed a pdf document inside an HTML web page and to automatically generate such pages from pamphlet source files stored as a new pamphlet ZWiki PageType? on MathAction. Pamphlet files would be edited like any other wiki page and rendered as pdf embedded in HTML, as shown on the example page, when Preview or Save is clicked.

In case no pdf viewer plug-in is installed in the browser, ordinary links are provided to download the pdf file, or alternatively a dvi format file, and also the source file itself.

In addition to rendering the pamphlet content as pdf, clicking the Save button will also automatically update an associated source code archive with the modified source. This will enable developers to quickly build and test new versions of Axiom.

Please visit SandBox Embeded PDF to see an example of how a pamphlet file will look in MathAction. At present this is just a mockup built from files generated manually. In the final working system clicking edit will allow editing of the pamphlet source code. It would be very useful if you could leave a comment on this page describing how the page looks in your browser.

Implementation of the new pamphlet PageType? in Axiom is estimated to require only about two or three days of programming and testing. This is much less effort then would have been required to complete the original approach described below.

## Previous Work

The initial approach for pamphlet support in MathAction turned out to be much more complicated than expected and work on this was delayed and subsquently abandoned.

The approach was to use Norman Ramsey's Latex to HTML [l2h]? noweave filter. This filter together with noweave, is able to produce HTML files directly from noweb (pamphlet) files. [l2h]? is written in Icon - so over the last couple of days I had to learn yet another language. Icon is quite tidy and fast and apparently well suited language for this sort of complex conversion. I have modified and extended [l2h]? so that inline and display math environments as well as the axiom, aldor and reduce pseudo-environments are passed straight through the conversion. Now that I understand Icon and thanks to Norman's literate programming style, I have also added some missing things needed my first set of test files.

The output of the modified l2h can then be given directly to LatexWiki (or MathAction) as an HTML+LaTeX file. When it is fully integrated into MathAction, the pamphlet file itself will be stored and converted transparently using noweave with the modified l2h filter when clicking Save.

I think that the idea is quite good, especially, since it seems to be easy to implement.

One (probably minor) problem is that I won't be able to use that feature at home, since downloading the pdf files takes just too long.

My version of Konqueror (3.1.4, very old, I know) doesn't display the pdf embedded, but outside Konqueror (using Kghostview). Maybe I'd need to configure something...

I think that the solution is great for a start, but in the long run I'd be happier with a solution � la axiomui.

Still, it's great that there is support after all!

Thanks,

Martin

initial implementation of pamphlet support --Bill Page, Wed, 05 Oct 2005 21:34:57 -0500 reply
Status: planned => testing

Working example of pamphlet support on MathAction --Bill Page, Wed, 05 Oct 2005 21:38:09 -0500 reply
See http://wiki.axiom-developer.org/SandBoxPamphlet for a real working example of an Axiom pamphlet file which renders as PDF and DVI.

## Additional work is still required for:

1. source code archive check-in
2. pre-rendering of {axiom}, {spad}, {aldor} and {reduce} psuedo environments

Math on the web --unknown, Fri, 07 Oct 2005 12:45:27 -0500 reply
This is impossible for me to view.

Acroread on linux has serious stability issues and consistently crashes my browser or forcibly grabs my mouse and won't let go. All open-source pdf viewers (xpdf, gpdf, etc) have inferior font rendering and often cannot anti-alias the fonts.

The net result is that any user has to jump through a ton of hoops just to look at these pamphlet pages, and in the end, they're bypassing the chosen medium (the web) altogether!

While the rendering quality of the latexwiki-image or mathml is currently inferior, I don't think jumping through all these hoops is worth the small increase in rendering quality. Instead, I think we should use the technologies built into the browser already (images/mathml) and push the browser developers to improve their rendering quality.

For instance, the mozilla people have just checked in a patch which improves printing of transparent png's. Previously they printed black-on-black and were unreadable. Another recently checked-in patch properly aligns equations that are generated by latex2html.

Undoubtedly, we will encounter many bugs in the rendering of mathml. But, I think pushing forward with "math on the web" is a desirable goal, and sidestepping the problem by embedding pdf will hurt rather than help the whole situation. It seems to me the natural migration route is send images for old browsers, mathml for new browsers, and report bugs against the browsers when this falls down.

I know current pamphlets are a latex format, but the subset of latex actually used is quite small. There are two ways to go here...1) write a zwiki "pagetype" which renders the subset, or 2) call latex2html or tth (or some other tool) on the backend to render as html with embedded images or mathml.

Unfortunately I am quite busy and won't be able to work on this any time soon. :(

Just my 2 cents.

-- Bob

Is it possible to get a handle to a "canvass" in a browser? If so it would be possible to do both graphics and a dvi mechanism.

Tim

root [mathaction@axiom-developer.org]? wrote:
Is it possible to get a handle to a "canvass" in a browser? If so it would be possible to do both graphics and a dvi mechanism.

Yes, SVG has this capability.

Actually, in answer to my canvas question: http://developer.mozilla.org/en/docs/Canvas_tutorial

shows that it possible to use a tag and draw into it.

Tim

root [mathaction@axiom-developer.org]? wrote:
shows that it possible to use a tag and draw into it.

Coooooolllll....

http://mozilla.doslash.org/stuff/canvas/shell.html

The net result is that any user has to jump through a ton of hoops just to look at these pamphlet pages, and in the end, they're bypassing the chosen medium (the web) altogether!

That's odd. It worked "right out of the box" for me using Konquorer on Fedora Core 3. Even the embed PDF looks nice with properly aliased fonts. I didn't have to touch a thing. It doesn't seem like "bypassing the web" to me, although using a proprietary format like PDF is admittedly not very compatible with the open source philosphy.

Increasing rendering quality is not the objective of pamphlet support. The goal is to provide a source format that is identical to the noweb file format used by the Axiom distribution. It should be possible to edit Axiom pamphlet files through the web and have the result displayable in a format that allows the quality to be checked and the changes in code re-compile. This pages can then be directly included in the Axiom source archive.

Being able to view pamphlet files online is an "extra" feature that may work better on some configurations than others. That is why I provided a link to the dvi. To bad there doesn't seem to be an "embedded dvi viewer"...

I know current pamphlets are a latex format, but the subset of latex actually used is quite small. There are two ways to go here...1) write a zwiki "pagetype" which renders the subset,

Pamphlet files are latex plus noweb markup with embedded code. I tried rendering just a subset of latex (see previous work) but that ate a lot of time and failed.

or 2) call latex2html or tth (or some other tool) on the backend to render as html with embedded images or mathml.

Maybe, but integration with Zwiki/LatexWiki is a pain.

Unfortunately I am quite busy and won't be able to work on this any time soon. :(

Just my 2 cents.

And there-in lies all of our problems. :)

... "canvass" in a browser? If so it would be possible to do both graphics and a dvi mechanism.

Neat stuff! I think especially interesting for AxiomUI ... but does it really do dvi?

dvi plugin from several places. this page appears to claim that techexplorer can do it:

http://www.damtp.cam.ac.uk/user/kp229/ndvi

Tim

--- Bill Page wrote:
That's odd. It worked "right out of the box" for me using Konquorer on Fedora Core 3. Even the embed PDF looks nice with properly aliased fonts. I didn't have to touch a thing. It doesn't seem like "bypassing the web" to me, although using a proprietary format like PDF is admittedly not very compatible with the open source philosphy.

I must be misunderstanding something - AFAIK pdf isn't proprietary. It's fully documented, and there is no restriction on creating either viewers or generaters for it. In what sense it is more or less proprietary than postscript or dvi or mathml?

Now the open source viewers might not quite be up to the Acrobat Reader standard in rendering quality, but to the best of my knowledge that isn't because pdf is proprietary. (BTY, I recommend the recent releases of kpdf - it is getting quite good.)

Cheers, CY

__________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com

If anyone can get ndvi to work with FireFox? then I will get very excited.

Yes, "techexplorer can do it" (and a lot more too!) but unfortunately techexplorer went proprietary :( and that's where it sits ... Techexplorer used to be part of the commercial distribution of Axiom on windows. I wish that we could have kept it as part of the open source version of Axiom!!

real demonstration of pamphlet files --Bill Page, Fri, 07 Oct 2005 14:29:50 -0500 reply
In can anyone hasn't notice the new link on the FrontPage you can see some real examples of Axiom pamphlet files here:

http://wiki.axiom-developer.org/axiom--test--1

unknown wrote:
Changes http://wiki.axiom-developer.org/210PamphletSupportOnMathAction/diff -- This is impossible for me to view.

Acroread on linux has serious stability issues and consistently crashes my browser or forcibly grabs my mouse and won't let go. All open-source pdf viewers (xpdf, gpdf, etc) have inferior font rendering and often cannot anti-alias the fonts.

I've had a few problems with Acroread 7 on Linux but for the most part they only happen when viewing a PDF off the web with Firefox. If you download the file to your hard drive and open it, it should work fine. Be sure you have the latest Acroread and Firefox. What distro are you running?
While the rendering quality of the latexwiki-image or mathml is currently inferior, I don't think jumping through all these hoops is worth the small increase in rendering quality. Instead, I think we should use the technologies built into the browser already (images/mathml) and push the browser developers to improve their rendering quality.

Yes, I agree. Have you tried Amaya? They're trying to be the "reference browser", and I know they want to fix any rendering issues. I'm on their mailing list.
Undoubtedly, we will encounter many bugs in the rendering of mathml. But, I think pushing forward with "math on the web" is a desirable goal, and sidestepping the problem by embedding pdf will hurt rather than help the whole situation. It seems to me the natural migration route is send images for old browsers, mathml for new browsers, and report bugs against the browsers when this falls down.

Yes, I agree. Start with Amaya; they're likely to be more responsive than Firefox/Mozilla.

#210 Pamphlet support on MathAction [#210 Pamphlet support on MathAction] Math on the web --michel.lavaud, Fri, 07 Oct 2005 21:37:02 -0500 reply
On 7 Oct 2005 at 14:15, C Y wrote:
I must be misunderstanding something - AFAIK pdf isn't proprietary. It's fully documented, and there is no restriction on creating either viewers or generaters for it. In what sense it is more or less proprietary than postscript or dvi or mathml?

The pdf format is proprietary and fully documented - as is the Word format. And what Microsoft did, Adobe can do it : that is, he can decide some day to change the pdf format in a way incompatible with previous versions (as MS did for Word - to enhance performances, or increase his income or whatever reason), users cannot do anything against that. And if the modifications are not strictly upward compatible with preceding ones, some formulas included in scientific articles could become inexact, without the author being aware of it, and without the reader being able to notice it :for texts, the reader can easily detect and correct errors while reading, but this is impossible for formulas, in general.This could be as catastrophic for science as the burning of Alexandria's library.

Unfortunately, many scientists are not aware of this problem with pdf. Even among TeX developers, many promote replacing dvi by pdf. Pdf is acceptable for short-life documents, but not (IMHO) for scientific documents : only exactness certified over very long periods of time ought to be taken into consideration for science. It does not seem reasonable to rely on proprietary formats such as Word or pdf and cross one's fingers, hoping they won't do something wrong. Because some day, they will :-(

The most critical community against pdf lately were not scientists but lawyers, because of Enron and other affairs, that generated "tons" of electronic documents, and they fear that these documents could become unreadable in the long term. The problem of defining an A-pdf format (Archival-pdf) was resurrected on this occasion. For scientists, I think it would be important that everybody realize the problem, before our libraries of pdf documents "burn". The dvi format is completely safe because it is frozen and very simple, and is very well suited because it has been devised for science.

Best wishes,

Michel.Lavaud@univ-orleans.fr http://www.univ-orleans.fr/EXT/ASTEX ftp://ftp.univ-orleans.fr/pub/tex/PC/AsTeX liste de discussion: astex@univ-orleans.fr Abonnement � la liste: envoyer un message de contenu "sub astex Nom Prenom Etablissement" � sympa@univ-orleans.fr

Actually, I continue to maintain the position that documents should be available in SOURCE form, not pdf, not dvi, etc. Only source allows you the ability to use the information in any way.

Tim

pamphlets work as planned on MathAction --Bill Page, Wed, 21 Jun 2006 06:16:30 -0500 reply
Status: testing => closed

 Subject:   Be Bold !! ( 14 subscribers )