74 points · by teleforce · 3y ago · 31 comments
I don't think I would have wanted XML documents as sources. I felt like Markdown was a successful step away from any XML-inspired tag formats. Most books don't have a complex hierarchy. They just have paragraphs and titles.
Due to the coding based, I am writing the book in Jupyter notebooks. But, writing the content in Jupyter is quite limiting. The main problems are the lack of automatic numbering of equations and automatic referencing.
There used to be an extension for Jupyter notebooks that does this [1] but is no longer actively maintained and doesn't work on Jupyterlab.
The interactives that are available in my html book without additional work are great (sage math, revealing solutions, embedding video solutions).
It’s a cumbersome language, sure, but it accomplishes some powerful things if you’re patient.
> PreTeXt is guided by the following principles:
> 1. PreTeXt is a markup language that captures the structure of textbooks and research papers.
> 2. PreTeXt is human-readable and human-writable.
When did XML become human readable and writable?
Something like Markdown is too spartan for all the kinds of things you need to make a technical document.
Asciidoc, on the other hand . . I've written aircrew flight checklists, component maintenance manuals, typescript developer documentation, illustrated parts catalogues, maintenance handbooks, operation guides, and a good-old-fashioned novelette in Asciidoc. Last few years with VSC. It's fast as hell. I got Asciidoc include for re-use, I got Asciidoc conditionals, VSC snippets, I got a billion other toys like textql, diagrams, wireviz.
And yeah yeah yeah, I know, it's cheating: Asciidoc is DocBook, DocBook is XML. Except Asciidoc's not XML. Asciidoc renders in Chrome/Firefox/Edge extensions, Ruby, JS, Python, and it exports to DocBook, LaTeX, PDF, HTML5, ePub, MOBI, MSO via DocToolChain or Pckr and, well, hell, bring in Pandoc if you want something else. When it comes to the Asciidoc tools, I can go from bare metal to full-up publishing environment in ten minutes. And how do I render DocBook again?
Oh, the XML pipelines. Those pipelines.
Schemas breaking XML spec[1], "XML-aware" diff/merge, whitespace[2], sneaky goddamn proprietary entities[3], namespaces, 1NF, computability[4], charset, semantic-less, hierarchy fetishism, etc etc etc blabbity blabbity blah.
I just realized this post sounds really frickin' angry, and I want to take a line here to say that I love all ya'll, but XML publishing has left some scars, and I'm sorry about that.
[1] "Leading whitespace in attributes? CHARMING"
[2] No such thing as "officially normalized" when it comes to XML whitespace, which means no lines, no tabs, no spaces.
[3] Goddamn REVBARS
[4] Ah, infinite arbitrary nesting, what a perfect fit for natural language
That doesn't make it a good human readable and writable format.
The computer is supposed to read xml, not people.
XML isn’t my first choice most days but there exist cases where it still readily flexes past other option no matter how popular.
And markdown isn't the only alternative to the ugliness of XML
Actually XML was designed as delivery not authoring language by giving up SHORTREF (= custom lightweight markup), tag inference, and other short form syntax XML inherited from SGML as its superset. There's even an attempt to bring back lightweight markup into XML ("Invisible Markup") though I personally can't see why they don't just use SGML for this which is an international (ISO) standard since 1986. 1986 or earlier is also about the point in time since when nerds invent their own plain text syntax and processing pipelines - not out of necessity mind you but clearly out of procrastination and fun when SGML (and TeX/LaTeX and run-off) has existed since.
1996