Open Source Mathematics with MathBook XML

Thomas W. Judson

Stephen F. Austin State University

Some Background

  • Abstract Algebra: Theory and Applications (AATA) was first published by PWS in 1994.
  • There was a second printing but no second edition.
  • After PWS merged with Brooks/Cole, AATA went out of print.
  • I assumed ownership of the copyright in 1997.
  • AATA sat idle until 2008.

An Open Source Linear Algebra Textbook

  • Rob Beezer (University of Puget Sound) began A First Course in Linear Algebra (FCLA) began as an experiment about 10 years ago. FLCA was open source from Day 1.
  • Version 1.0 was released Summer 2004.
  • An online version was released Summer 2008.
  • At Rob Beezer’s urging, AATA became open source in 2008 with a full text version released in early 2009.

What is an Open Textbook?

  • Definition: A textbook is open if the copyright holder explicitly allows unlimited copying, and the distribution of modified versions.
  • AATA is licensed under Gnu Free Document License (GFDL). Another possible way to go is the Creative Commons license.
  • You have a copyright in everything you create, automatically.
  • A lifetime monopoly, plus seventy years.
  • As copyright holder, you control copies of your work.
  • An open license grants additional rights.

Open Licenses

  • Unlimited copying, forever.
  • Possibly distribute modified versions.
  • Possibly require attribution in modified versions.
  • Possibly require modified versions to have same license.
  • Example: Creative Commons (various options)
  • Example: GNU Free Documentation License
  • An open license is different than “free to download.”

Why Open Source?

  • Authors are freed from market forces.
  • Open source materials have zero or low cost.
  • Open source materials are broadly available.
  • Open source materials can support interactive versions.
  • Open source invites wide participation.
  • Open source materials are easy to maintain.

Free From Market Forces

Open textbooks allow a return to a free exchange of ideas.

  • The best book for the course that you are teaching is the one that you wrote.
  • Others may find your book useful.
  • AATA is currently #2 in Google for “abstract algebra” search and #1 for “abstract algebra textbook.”
  • AATA has 50+ adoptions.

Zero or Low Cost

  • Commercially published textbooks are expensive.
    • J. Gallian. Contemporary Abstract Algebra, 8th Edition. $193.95
    • T. Hungerford. Abstract Algebra: An Introduction, 3rd Edition. $175.95
  • The Internet makes physical manufacturing a non-issue.
  • The Internet makes distribution almost a non-issue.
  • Open licenses make digital rights restrictions unnecessary.
  • Print-on-demand makes physical copies possible at a reasonable price.

Availability

Open source can be universally available via the Internet.

Open source textbooks can be made available in a variety of formats.

  • Print, PDF, HTML, EPUB, BRF, Jupyter Notebooks
  • Paper, Desktop, Laptop, Smartphone, Tablet, Kindle

Commercial publishers have difficulty duplicating the access that open source textbooks can provide.

Weekly AATA Stats Report: 21 Sep - 27 Sep 2015

Interactive Versions

HTML enriched with Javascript widgets/applets/tools.

  • GeoGebra (geometry demonstrations)
  • JSXGraph (interactive graphs)
  • WeBWorK (homework system)
  • Skulpt (in-browser Python)
  • Sage Cells (open source Mathematica, Maple, Matlab)
  • Audio and Video players
  • MathJax (typesetting math)

Open Source Textbooks can be Collaborative

We can borrow ideas from open source software development.

  • Version control: Git, Mercurial.
  • Modular design: topics, applications, exercises.
  • We can release early and often.
  • Open source does not go out of print.
  • Continuous improvement.

Quality and Maintenance

  • Every reader is a copy-editor.
  • Students may be the best copy-editors.
  • Typos and errors can be fixed easily and quickly.

Open textbooks have the potential to be better than commercially published textbooks.

Digital Textbooks

  • Some digital textbooks are simply PDF files. Maybe the PDF will include hyperlinks.
  • Many publishers now offer their text in a digital format in addition to the hardbound version. Since publishers must protect their product, commercially published digital textbooks often require special apps, can be slow to load, and must be password protected.
  • Compare this to AATA.

UTMOST

UTMOST: Undergraduate Teaching of Mathematics with Open Software and Textbooks (2010–2014) NSF Undergraduate Education Grant (DUE-1022574).

  • William Stein (UW): Sage, SageMathCloud.
  • Jason Grout + Students (Drake University): Sage Cell.
  • David Farmer (AIM): Knowls, FCLA CSS
  • Kiran Kedlaya (UC-San Diego)
  • Rob Beezer: Converted FCLA to Sage Notebooks via tex4ht, MathBook XML
  • Tom Judson (Stephen F. Austin University): Abstract Algebra textbook

MathBook XML

  • Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format which is both human-readable and machine-readable.
  • MathBook XML (MBX) is a set of XML tags and is structured in a manner very similar to \(\mathrm{\LaTeX}\).
  • MBX is processed by XSLT (Extensible Stylesheet Language Transformations) into the target format.
  • AATA is now written in MathBook XML.

Multiple Formats from a Single Source

MBX is the brainchild of Rob Beezer, who received a Shuttleworth Foundation Flash Grant in May 2013.

  • Frees an author from presentation and technical details
  • Write once, read anywhere
  • Multiple output formats from one source
  • Designed to be easy for authors
  • \(\mathrm{\LaTeX}\) syntax for math (and math only)
  • NOT “data exchange” XML

Simple MathBook XML Example

<book>
	<title>Abstract Algebra: Theory and Applications</title>
	<chapter>
		<title>Galois Theory</title>
		<section>
			<title>Field Automorphisms</title>
			<p>Our first task is to establish a link ...</p>
		</section>
	</chapter>
</book>

What about the Math?

<proposition xml:id=“proposition-roots-permute">
	<statement>
		<p>Let <m>E</m> be a field extension of <m>F</m> and <m>f(x)</m> be a 
		polynomial in <m>F[x]</m>. Then any automorphism in <m>G(E/F)</m> 
		defines a permutation of the roots of <m>f(x)</m> that lie in <m>E</m>.</p>
	</statement>
	<proof>
		<p>Let 
			<me>f(x) = a_0 + a_1 x + a_2 x^2 + \cdots + a_n x^n</me> ...
	</proof>
</proposition>

Adding a Live Sage Cell is Easy

<sage>
  		<input>integrate(x*cos(x),x)</input>
</sage>

This will return a live Sage cell that will integrate

\[\int x \cos x \, dx\]
when executed.

Existing \(\mathrm{\LaTeX}\) Documents?

The Current State of Affairs for AATA

  • Print, hardcover, ~$25 for AATA Lon Mitchell of Orthogonal Publishing.
  • Available as a Sage worksheet on SageMathCloud, online, PDF. It is also possible to create ePub, iBook, Sage Notebook, and Jupyter versions (experimental).
  • The updated instructor’s solution manual is a work in progress.
  • I am writing an open source ordinary differential equations textbook in MathBook XML.

What We are Doing Now

  • Continued development XML tools to be able quickly publish in different formats.
  • Rob Beezer and David Farmer are developing a collaborative authoring tool (CAT).
  • Rob Beezer and Alex Jordan are integrating WeBWorK into MBX: spot.pcc.edu/~ajordan/ww-mbx/html/
  • AIM Editorial Board. Stop by the AIM booth at JMM in Seattle.
  • Integration with Sage and SageMathCloud. Stop by the Sage both at JMM in Seattle.

Resources

Thanks for Listening

Thomas W. Judson, Associate Professor
Department of Mathematics and Statistics
Stephen F. Austin State University
P.O. Box 13040-3040 SFA Station
Nacogdoches, TX  75962
EMAIL: judsontw@sfasu.edu

One last cool example: mathbook.pugetsound.edu/beta/music/section-interesting.html