3669
Comment:
|
4601
|
Deletions are marked like this. | Additions are marked like this. |
Line 30: | Line 30: |
* Late-Jun 2013: Good basic functionality for HTML, LaTeX output | * Late-June 2013: Good basic functionality for HTML, LaTeX output |
Line 32: | Line 32: |
== Commentary == High-level commentary is recorded on my [[http://www.beezers.org/blog/bb|blog]]. == Implemented Features == * Article structure with numbered sections (subsections will be easy) * Numbered theorems * Sage input/output: live Sage cells in HTML, styled in LaTeX * Bibliography + citations: knowls in HTML version * Math: normal LaTeX for PDF, !MathJax in HTML, macros in source '''once''' |
|
Line 36: | Line 48: |
Updated: June 25, 2013 | Updated: June 28, 2013 |
Line 38: | Line 50: |
(Use your browser to save these files locally, do not simply click on them) | Easiest: it would be nice if you could view the source file (calculus-article.xml) by opening it in a web browser with the stylesheet (article-html.xsl) in the same directory. This did work on some browsers, and not on others. I've added enough nontrivial features now that this is not working in Firefox. Easy: Look at the [[http://buzzard.ups.edu/mathbook/calculus-article.html|XHTML Output]]. !MathJax does the math, Sage Cell Server does the code, knowls do the citations. Use the following command and files below to create XHTML output and view in your browser by opening the output file. {{{ xsltproc article-html.xsl calculus-article.xml > calculus-article.html }}} Alternate: Look at the [[http://buzzard.ups.edu/mathbook/calculus-article.pdf|PDF Output]], which comes from the same source. Issue the following to produce. {{{ xsltproc article-latex.xsl calculus-article.xml > calculus-article.tex pdflatex calculus-article.tex }}} Advanced: create a [[https://cloud.sagemath.com|Sage Cloud]] worksheet from the same source. I have this working in the lab. Posted soon. Files: Use your browser to save these files locally, do not simply click on them. If you are an author, the only file you need to understand is the first one, the XML source. |
Line 46: | Line 75: |
Easiest: it would be nice if you could view the source file (calculus-article.xml) by opening it in a web browser with the stylesheet (article-html.xsl) in the same directory. This did work on some browsers, and not on others. I've added enough nontrivial features now that this is not working. | |
Line 48: | Line 76: |
Easy: use the following command to create XHTML output and view in your browser by opening the output file. You might just want to view the [[http://buzzard.ups.edu/mathbook/calculus-article.html|XHTML Output]]. !MathJax does the math, Sage Cell Server does the code, knowls do the citations. | == To Do == |
Line 50: | Line 78: |
{{{ xsltproc article-html.xsl calculus-article.xml > calculus-article.html }}} Alternate: issue the following to produce [[http://buzzard.ups.edu/mathbook/calculus-article.pdf|PDF Output]]. Sage cells are being styled now. {{{ xsltproc article-latex.xsl calculus-article.xml > calculus-article.tex pdflatex calculus-article.tex }}} Advanced: create a [[https://cloud.sagemath.ocom|Sage Cloud]] worksheet from the same source. I have this working in the lab. Posted soon. |
* Cross-references * Index for book structure * Options for numbering sections, theorem-like structures * Improved CSS for HTML * Doctesting framework for Sage code * Sage notebook, Sage Math Cloud output formats * HTML chunking (one HTML file per section, chapter, etc) * Customization options (layers, HTML head insertions) * LaTeX spacing hints |
MathBook: An XML Application
A specification for XML tags and stylesheets to create usable output.
Rob Beezer, [email protected]
Design Goals:
- Simple for authors to use - no more complicated logically than LaTeX
- Capture the structure of writing about mathematics and Sage
- Processing into a variety of formats
- A limited number of rational tags, with simple names
- Minimal use of external shell scripts
- XSLT 1.0 compatible: ideally the only required tool is xsltproc
Output Formats:
HTML web pages, enhanced with MathJax, Sage Cell server, knowls
LaTeX input to create PDFs and print with pdflatex
- HTML for in-browser previewing
- Doctesting of Sage code examples
- E-Books, once technically feasible
Maybe a DocBook representation for conversion to other outputs
Project Status:
- Funding: Shuttleworth Foundation Flash Grant, National Science Foundation UTMOST Grant
- Late-June 2013: Good basic functionality for HTML, LaTeX output
- Mid-June 2013: initiated, not mature or stable
Commentary
High-level commentary is recorded on my blog.
Implemented Features
- Article structure with numbered sections (subsections will be easy)
- Numbered theorems
- Sage input/output: live Sage cells in HTML, styled in LaTeX
- Bibliography + citations: knowls in HTML version
Math: normal LaTeX for PDF, MathJax in HTML, macros in source once
Files and Examples
Updated: June 28, 2013
Easiest: it would be nice if you could view the source file (calculus-article.xml) by opening it in a web browser with the stylesheet (article-html.xsl) in the same directory. This did work on some browsers, and not on others. I've added enough nontrivial features now that this is not working in Firefox.
Easy: Look at the XHTML Output. MathJax does the math, Sage Cell Server does the code, knowls do the citations. Use the following command and files below to create XHTML output and view in your browser by opening the output file.
xsltproc article-html.xsl calculus-article.xml > calculus-article.html
Alternate: Look at the PDF Output, which comes from the same source. Issue the following to produce.
xsltproc article-latex.xsl calculus-article.xml > calculus-article.tex pdflatex calculus-article.tex
Advanced: create a Sage Cloud worksheet from the same source. I have this working in the lab. Posted soon.
Files: Use your browser to save these files locally, do not simply click on them. If you are an author, the only file you need to understand is the first one, the XML source.
To Do
- Cross-references
- Index for book structure
- Options for numbering sections, theorem-like structures
- Improved CSS for HTML
- Doctesting framework for Sage code
- Sage notebook, Sage Math Cloud output formats
- HTML chunking (one HTML file per section, chapter, etc)
- Customization options (layers, HTML head insertions)
- LaTeX spacing hints
Other Projects
tbook looks very much like what I am imagining. I have hacked a bit of it to work with the xsltproc processor with mixed success. Only 80 elements. But for a very short article, I have found cross-references broken and manufacturing a bibliography begins with BibTeX, so that requires some research (and shell scripts). Maybe some examples later.
DocBook is big, complicated and full of features. But the emphasis is on technical documentation and support for mathematics and academic publishing is very lacking. The extensive structure is intimidating if you just have small project.