2108
Comment:
|
5255
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
Design Goals: | [[http://www.beezers.org/blog/bb/2013/06/shuttleworth-flash-grant/|{{attachment:Shuttleworth-Funded-Logo.jpg|Shuttleworth Funded|width=250px}}]] |
Line 7: | Line 7: |
1. Simple for authors to use - no more complicated logically than LaTeX. | Rob Beezer, [email protected] === Design Goals: === 1. Simple for authors to use - no more complicated logically than LaTeX |
Line 10: | Line 14: |
1. A limited number of rational tags, with simple names 1. Minimal use of external shell scripts 1. XSLT 1.0 compatible: ideally the only required tool is xsltproc |
|
Line 11: | Line 18: |
Output Formats: | === Output Formats: === |
Line 13: | Line 20: |
1. HTML web pages, enhanced with MathJax, Sage Cell server, knowls | 1. HTML web pages, enhanced with !MathJax, Sage Cell server, knowls |
Line 15: | Line 22: |
1. HTML for in-browser previewing | |
Line 18: | Line 24: |
1. Maybe a !DocBook representation for conversion to other outputs | |
Line 19: | Line 26: |
Project Status: | === Project Status: === |
Line 22: | Line 29: |
* Late-June 2013: Good basic functionality for HTML, LaTeX output | |
Line 24: | Line 32: |
== Examples == | |
Line 25: | Line 34: |
== Files and Examples == | 1. A short sample article: [[http://buzzard.ups.edu/mathbook/calculus-article.html|XML Source-Author Format]] [[http://buzzard.ups.edu/mathbook/calculus-article.html|HTML Output]] [[http://buzzard.ups.edu/mathbook/calculus-article.pdf|PDF Output]] 1. A skeletal mock book: [[http://buzzard.ups.edu/mathbook/graph-theory-book.html|XML Source-Author Format]] [[http://buzzard.ups.edu/mathbook/graph-theory-book.html|HTML Output]] [[http://buzzard.ups.edu/mathbook/graph-theory-book.pdf|PDF Output]] |
Line 27: | Line 37: |
Updated: June 25, 2013 | == Commentary == High-level commentary is recorded on my [[http://www.beezers.org/blog/bb|blog]]. == Implemented Features == * Article structure with numbered sections and subsections * Book structure with numbered chapters, sections and subsections * Mathematics: normal LaTeX for PDF, !MathJax in HTML, macros in source '''only once''' * Numbered theorems and definitions (needs work, subject to changes) * Sage input/output: live Sage cells in HTML, styled in LaTeX * Bibliography + citations: as knowls in HTML version * Basic CSS for HTML version == Files and Commands, the nitty-gritty == Updated: June 29, 2013 Prerequisites: {{{xsltproc}}} is in most Linux distributions and on Mac OS as a command-line executable. Information on Windows availablity would be helpful - please write. You'll need TeX to run {{{pdflatex}}}. You can author if you also have a text editor and a browser - that is all you need. |
Line 29: | Line 57: |
(Use your browser to save these files locally, do not simply click on them) | HTML output: !MathJax does the math, Sage Cell Server does the code, knowls do the citations. Use the following command and files below to create (X)HTML output and view in your browser by opening the output file. {{{ xsltproc mathbook-html.xsl calculus-article.xml > calculus-article.html }}} |
Line 31: | Line 62: |
1. [[http://buzzard.ups.edu/mathbook/calculus-article.xml|Example XML source document]] 1. [[http://buzzard.ups.edu/mathbook/article-latex.xsl|XSL transform to LaTeX]] 1. [[http://buzzard.ups.edu/mathbook/article-html.xsl|XSL transform to XHTML]] Easiest: you should be able to preview the source file (calculus-article.xml) by opening it in a web browser with the stylesheet (article-html.xsl) in the same directory. This works on some browsers, and not on others, so experiment. I have used Firefox on Ubuntu with success. Easy: use the following command to create XHTML output and view in your browser by opening the output file, which should look like: [[[[http://buzzard.ups.edu/mathbook/calculus-article.html|XHTML Output]]. MathJax does the math, Sage Cell Server does the code. |
PDF: Same XML source file. Use a different XSLT file to process. View PDF as you please. Issue the following to produce. |
Line 40: | Line 65: |
xsltproc article-html.xsl calculus-article.xml > calculus-html.tex | xsltproc mathbook-latex.xsl calculus-article.xml > calculus-article.tex pdflatex calculus-article.tex |
Line 43: | Line 69: |
Alternate: issue the following to produce [[[[http://buzzard.ups.edu/mathbook/calculus-article.pdf|PDF Output]]. Sage cells are being ignored right now. A text version of these should be easy to implement. | More: repeat above with the mock book, {{{graph-theory-book.xml}}}, linked above. |
Line 45: | Line 71: |
{{{ 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. The XSL files can be scary - not critical for an author to understand them. You'll want the CSS to render any HTML you produce. 1. [[http://buzzard.ups.edu/mathbook/mathbook-html.xsl|XSL transform to HTML]] 1. [[http://buzzard.ups.edu/mathbook/mathbook-latex.xsl|XSL transform to LaTeX]] 1. [[http://buzzard.ups.edu/mathbook/freebsd-docbook|FreeBSD documentation CSS]] 1. [[http://buzzard.ups.edu/mathbook/mathbook.css|MathBook CSS]] == To Do (unprioritized)== * Cross-references * Table of Contents in HTML as sidebar * Index (for book structure) * Options for numbering sections, theorem-like structures (hard) * Improved CSS for HTML * Doctesting framework for Sage code (easy) * 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 * Figures * Tables == Other Projects == * [[http://tbookdtd.sourceforge.net/|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 [[http://tbookdtd.sourceforge.net/dtd/index.html|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. * [[http://www.docbook.org/|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. |
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
- 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
Examples
A short sample article: XML Source-Author Format HTML Output PDF Output
A skeletal mock book: XML Source-Author Format HTML Output PDF Output
Commentary
High-level commentary is recorded on my blog.
Implemented Features
- Article structure with numbered sections and subsections
- Book structure with numbered chapters, sections and subsections
Mathematics: normal LaTeX for PDF, MathJax in HTML, macros in source only once
- Numbered theorems and definitions (needs work, subject to changes)
- Sage input/output: live Sage cells in HTML, styled in LaTeX
- Bibliography + citations: as knowls in HTML version
- Basic CSS for HTML version
Files and Commands, the nitty-gritty
Updated: June 29, 2013
Prerequisites: xsltproc is in most Linux distributions and on Mac OS as a command-line executable. Information on Windows availablity would be helpful - please write. You'll need TeX to run pdflatex. You can author if you also have a text editor and a browser - that is all you need.
HTML output: MathJax does the math, Sage Cell Server does the code, knowls do the citations. Use the following command and files below to create (X)HTML output and view in your browser by opening the output file.
xsltproc mathbook-html.xsl calculus-article.xml > calculus-article.html
PDF: Same XML source file. Use a different XSLT file to process. View PDF as you please. Issue the following to produce.
xsltproc mathbook-latex.xsl calculus-article.xml > calculus-article.tex pdflatex calculus-article.tex
More: repeat above with the mock book, graph-theory-book.xml, linked above.
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. The XSL files can be scary - not critical for an author to understand them. You'll want the CSS to render any HTML you produce.
== To Do (unprioritized)==
- Cross-references
- Table of Contents in HTML as sidebar
- Index (for book structure)
- Options for numbering sections, theorem-like structures (hard)
- Improved CSS for HTML
- Doctesting framework for Sage code (easy)
- 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
- Figures
- Tables
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.