Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#197 closed enhancement (fixed)

improve export/import capabilities of the SAGE notebook

Reported by: was Owned by: boothby
Priority: major Milestone: sage-2.8.5.1
Component: notebook Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

  • Improve the SAGE notebook
    • Implement wiki typesetting for the notebook.
    • Change notebook disk format to plain text (no pickling -- mainly for security reasons).
    • Export functionality. One should be able to export a single worksheet, or a collection of worksheets to any of the following three formats: latex, html, pdf, text.
      • NOTES:
        • NOTE: for each, we should allow a single worksheet, complete notebooks, and any subset of worksheets to be exported.
        • Hopefully Tom Boothby and Alex C can help.
      • PLAN:
        1. Design and implement a wiki formatting system (this means basically just getting a function wiki2html from moinmoin.)
        2. Design a logical interface:
          • INPUT: list of worksheet names
          • OUTPUT: * for latex/html: a link to a tarball or zip archive
            • for pdf/text -- link to a single file.
            • the archive contains both the latex and html and the complete notebook directory, so it can be opened by anybody later.
            • the plain text option gives everything as a single plain text file -- no tarball.
        3. Design interface that can be used from notebook.
          • A command --, e.g.,
                          %export latex    # -- exports current worksheet in latex
                          %export html graphs plots   # exports two worksheets to html
                          %export text *   # the entire notebook
                          %export html plot*  # all worksheets begining with plot.
            
          • The ordering of the worksheets is determined by the order they are given on the line.
          • This has to be a special %blah command, not a normal Python command, since it has to be run in the notebook process, not in the worksheet's Python sub-process (as that could be running in a chroot jail or on another machine).
          • The above interface could likely be easily made to work entirely through a GUI later, and will be easy to document. So it's the right first step.
        4. Implement interface above:
          • The command %export will be mostly implemented in worksheet.py
          • The hard part is testing, and generating actual latex/html/text which will require adding methods to cell.py, worksheet.py and notebook.py.
      • POSSIBLE PROBLEMS:
        • The interface designed above is bad for some unforseen reason.
        • It will be too difficult to implement in a clean way.
        • Latex output -- some generating output might not actually latex correctly, which could be frusting. Providing a script to build the latex output (using pdflatex, say, and with nostopmode) would help a lot.
        • Should also provide pdf output, which is autogenerated by the server (Added.)
        • What about customization of the "style", e.g., css, layout of index into worksheets, etc.?
        • Should generated latex be hyper-indexed? Issues with cross-referencing of worksheets.
        • Eventually the documents produced this way should have the possibility of looking truly professional, which means that one should be able to include macro files, etc. It should really provide a totally new way of writing papers. Along these lines, the "Edit" mode for the notebook should support including latex instead of html. The latex would be "previewed" by the notebook using jsmath. But when exporting it would stay as latex that would get pdflatex'd.

Change History (3)

comment:1 Changed 12 years ago by mabshoff

  • Milestone set to sage-3

comment:2 Changed 12 years ago by was

  • Resolution set to fixed
  • Status changed from new to closed

Much of this is implemented, or is brainstorming that should be totally re-evaluated before being implemented.

comment:3 Changed 12 years ago by was

  • Milestone changed from sage-feature to sage-2.8.5.1
Note: See TracTickets for help on using tickets.