[HN Gopher] Accessible open textbooks in math-heavy disciplines
       ___________________________________________________________________
        
       Accessible open textbooks in math-heavy disciplines
        
       Author : volemo
       Score  : 124 points
       Date   : 2025-03-29 16:38 UTC (6 hours ago)
        
 (HTM) web link (richardzach.org)
 (TXT) w3m dump (richardzach.org)
        
       | nextos wrote:
       | Richard Zach et al. logic textbooks are a work of art:
       | https://slc.openlogicproject.org.
       | 
       | Aside, I'd be happy to pay for great classic math textbooks in a
       | well typeset edition.
       | 
       |  _Finite Dimensional Vector Spaces_ is one such example. The text
       | is fantastic, but everything is too cramped and hard to read
       | compared to a modern book from the 1970s onward.
       | 
       | A newer edition typeset in LaTeX would be great.
        
         | TimorousBestie wrote:
         | By my estimation, it'll hit the public domain in 2053. Not
         | _that_ long of a wait, and in any case math typesetting should
         | be much improved by then.
        
           | nextos wrote:
           | 2053 is pretty far. I wish Dover, who hold publication
           | rights, improved typesetting of this and a few other classic
           | textbooks.
           | 
           | It's probably not hard to use an LLM to do the bulk of the
           | conversion to TeX work cheaply, and then some human input to
           | polish the final document and fix errors.
        
             | graymatters wrote:
             | 2053 is too far away indeed.
             | 
             | "It's probably not hard..." - how many such wishful
             | thinking statements were uttered by humanity.
        
               | nextos wrote:
               | Have you tried image to LaTeX translation? It works
               | fairly well already for text plus equations.
               | 
               | I've done this for a 30-page manuscript with no sources,
               | and I was able to recreate the entire document with
               | minimal manual intervention to get a correct PDF.
               | 
               | This is not programming, it's OCR and translation to a
               | very simple markup language. It's a very easy mechanical
               | task.
        
       | whyho wrote:
       | Typst( https://typst.app/) Is good Latex alternative which should
       | be mentioned here. Their roadmap also features html as a target.
        
         | zellyn wrote:
         | HTML is available as a preview feature now
        
         | AugustinWinther wrote:
         | Switched from LaTeX to Typst two years ago and have never
         | looked back. Looking forward to their HTML export feature.
         | 
         | Looks like you can already play with it (though it's still
         | "very incomplete") https://typst.app/docs/reference/html/
        
           | japanuspus wrote:
           | A friendly person on the internet already put up the typst-
           | to-mathml part of this [0]. I have been considering the
           | ultimate yak-shave of building a static site generator around
           | this...
           | 
           | [0]: https://github.com/wcshds/typst-math-to-mathml-converter
        
         | teleforce wrote:
         | Another is TeXmacs [1].
         | 
         | "Despite its name, TeXmacs is not a front-end to TeX or
         | LaTeX.[mHowever, TeXmacs documents can be converted to either
         | TeX or LaTeX. LaTeX also can be imported (to some extent), and
         | both import from and export to HTML, Scheme, Verbatim, and XML
         | is provided; the HTML export is stylable with CSS (since
         | version 1.99.14). There is a converter for MathML as well, and
         | TeXmacs can output PDF and PostScript for printing."
         | 
         | [2] GNU TeXmacs:
         | 
         | https://en.wikipedia.org/wiki/GNU_TeXmacs
        
           | IshKebab wrote:
           | Yeah they really need to rebrand.
        
         | TimorousBestie wrote:
         | If only it weren't subscription model. At least I can still
         | install LaTeX without a credit card.
        
       | pjmlp wrote:
       | It is only kind of true, PDF does everything that HTML does, with
       | print quality, naturally one needs Adobe proper for the full
       | feature set, as most readers only implement the standard
       | partially, for various reasons.
        
         | xworld21 wrote:
         | The accessibility and reflowability of HTML content, not to
         | mention the ability to customize color schemes, fonts, line
         | spacing, and similar are not possible with PDF, even using
         | Adobe software. Even using the latest PDF 2.0 standard, you are
         | ultimately expected to convert it to HTML if you need all that
         | flexibility (such as via https://ngpdf.com/).
        
           | pjmlp wrote:
           | I feel we are splitting airs here, and there is the whole
           | FOSS versus Adobe thingie,
           | 
           | https://helpx.adobe.com/acrobat/using/reading-pdfs-reflow-
           | ac...
        
       | kepano wrote:
       | Another LaTeX to MathML option that I have had a good experience
       | with is temml -- it works in the browser or server side with
       | Node.js. https://temml.org/
        
       | lutusp wrote:
       | At my age I find this issue annoyingly predictable -- it suggests
       | replacing LaTeX with something more modern and/or flexible. But
       | that was the original idea behind LaTeX -- to replace what
       | preceded it, create a portable comunication medium for
       | mathematical expressions.
       | 
       | Not to discourage experimentation, but I would like to see some
       | behavoral reserve and healthy skepticism before adding another
       | layer to the mathematical expression enterprise. There's also
       | this issue to consider: https://xkcd.com/927/ .
        
         | xworld21 wrote:
         | I agree, and the article talks about working with LaTeX and
         | converting directly to HTML. This is more about replacing the
         | final PDF with HTML.
        
         | eviks wrote:
         | But you're discouraging experimentation with nothing else but a
         | reference to a silly comic
        
       | oh_my_goodness wrote:
       | Uh ... where is it written that LaTeX can only provide pdf
       | output?
       | 
       | Turn that around. Thought experiment. Say we work like pigdogs
       | for 5 years and we completely replace all of Latex _except_ the
       | part that produces pdf. What value have we provided to users at
       | that point?
        
         | xworld21 wrote:
         | The article talks about converting LaTeX to HTML, which is
         | feasible today, if only buggy and fragile. This is the textbook
         | the author talks about, which is written in LaTeX (but compiled
         | with LaTeXML instead of pdflatex):
         | https://forallx.openlogicproject.org/html/
        
       | troymc wrote:
       | My current favorite option is Quarto [1]. It's basically a
       | friendly wrapper around Pandoc [2], letting you write in Markdown
       | (+ lots of Quarto-specific extensions) and render to LaTeX,
       | Typst, multi-page HTML, EPUB, docx, and more.
       | 
       | [1] https://quarto.org/
       | 
       | [2] https://pandoc.org/
        
         | scottyeager wrote:
         | It's mentioned in the article.
        
       | miki123211 wrote:
       | > Switch the language on foreign terms and names so that screen
       | readers can pronounce them in the right voice.
       | 
       | Screen reader user here. Don't actually do this, this is bad
       | advice.
       | 
       | Just like a lecturer won't suddenly switch to a German accent
       | when saying words like "schadenfreude" or names like "Friedrich
       | Nietzsche", neither should a screen reader. Having your voice
       | constantly change under you for no apparent reason is distracting
       | more than anything else.
       | 
       | What you _should_ do this for are longer pieces of text in a
       | foreign language, like a multi-paragraph piece of text to analyze
       | in a foreign language textbook.
        
         | TrayKnots wrote:
         | Yea, I hate that. Words are pronounced differently in foreign
         | languages. Do we say Moscow or Moskwa? Do we say ka-tana or ka-
         | ta-na? If Freud is not spoken with the typical Gemran
         | diphthong, then suddenly someone comes along and corrects you.
         | I do speak German, I know how Freud is pronounced and I will
         | pronounce it as it should be pronounced when speaking German,
         | but when speaking English, it is Frood for me.
         | 
         | So, I am with you. We shouldn't learn the pronunciation of 200
         | different languages. If Kirchhoff's laws sound like Captain
         | Kirk, who the fuck cares. Different languages pronounce stuff
         | differently.
        
           | currymj wrote:
           | i agree with you in spirit (I pronounce Paris as Paris).
           | 
           | however I have never heard of someone pronouncing Freud as
           | Frood, outside of "Bill & Ted's Excellent Adventure".
           | 
           | https://www.youtube.com/watch?v=Sobc2WhL16c
        
             | TrayKnots wrote:
             | Fair enough. Video doesn't play, but I believe you. I don't
             | know where I heard froodian slip and frood, but I checked a
             | few places where they pronounce it and all agree with you.
             | Bet I will find more example as soon as enough time has
             | passed so it would be weird to post it here. Damn you,
             | Murphy.
        
             | gus_massa wrote:
             | [Hi from Argentina!] For 'Euler", I keep switching randomly
             | betwen
             | 
             | Eh-oo-leh-r that is how it should be read if it were an
             | Spanish word.
             | 
             | Oh-ee-leh-r that is the proper German pronunciation
        
               | aurizon wrote:
               | And here I felt he added lubrication to machinery = Oiler
               | and my friend Eugene who's mother called him Oygen does
               | the same. Being from the UK, came to Canada in 1948, I
               | spoke colloquial English in school, but correct London
               | Cockney slang at home to family - on phone calls to
               | friends, if I responded to family mid dialog, my friends
               | would always ask who was that when my slang was over
               | heard.
        
           | thaumasiotes wrote:
           | > I do speak German, I know how Freud is pronounced and I
           | will pronounce it as it should be pronounced when speaking
           | German, but when speaking English, it is Frood for me.
           | 
           | That... isn't the normal English pronunciation. The English
           | pronunciation would rhyme with "joyed", if "joy" were a verb.
           | 
           | /'sIg.m@nd froId/
           | 
           | There are some other big names where the same vowel sequence
           | isn't recognized: Euler (usually pronounced with /oI/) and
           | von Neumann (not so much).
           | 
           | Euler suffers from _beginning_ with the  "eu", which makes it
           | look more Greek.
        
         | xworld21 wrote:
         | > Just like a lecturer won't suddenly switch to a German accent
         | when saying words like "schadenfreude" or names like "Friedrich
         | Nietzsche"
         | 
         | Is there a middle ground? Whenever I check my content with a
         | screen reader, uncommon foreign names are often mispronounced
         | in ways that are sometimes almost irrecognisable. Even my name
         | comes out wrong, although it would be understandable
         | (typically, the stress ends up on the wrong syllable).
        
         | mwcampbell wrote:
         | A lecturer who is fluently multilingual might indeed smoothly
         | switch accents when pronouncing foreign words. But it's still
         | the same voice, and (if they're well practiced at it) they
         | don't have to pause in mid-sentence to switch languages, as
         | text-to-speech systems usually do. And eSpeak can switch
         | languages while still being the same voice, since it's a rule-
         | based, parametric synthesizer. But, at least with NVDA, a mid-
         | sentence HTML span with a different lang attribute still causes
         | a (short) break in the intonation on either side. That's too
         | bad, because a multilingual parametric synthesizer like eSpeak
         | could be like the ultimate polyglot speaker, impressing us all
         | with how smoothly it switches languages.
        
       | westurner wrote:
       | "BookML: automated LaTeX to bookdown-style HTML and SCORM,
       | powered by LaTeXML" https://vlmantova.github.io/bookml/
       | 
       | LaTeXML: https://en.wikipedia.org/wiki/LaTeXML :
       | 
       | LaTeXML emits XML from a parsing of LaTex with Perl.
       | 
       | SCORM is a standard for educational content in ZIP packages which
       | is supported by Moodle, ILIAS, Sakai, Canvas, and a number of
       | other LMS Learning Management Systems.
       | 
       | SCORM:
       | https://en.wikipedia.org/wiki/Sharable_Content_Object_Refere...
       | 
       | xAPI (aka Experience API, aka TinCan API) is a successor spec to
       | SCORM for event messages to LRS Learning Record Stores. Like
       | SCORM, xAPI was granted by ADL.
       | 
       | re: xAPI, schema.org/Action, and JSON-LD:
       | https://github.com/RusticiSoftware/TinCanSchema/issues/7
       | 
       | schema.org/Action describes potential actions:
       | https://schema.org/docs/actions.html
       | 
       | For example, from the Schema.org "Potential Actions" doc:
       | https://schema.org/docs/actions.html :                  {
       | "@context": "https://schema.org",         "@type": "Movie",
       | "name": "Footloose",         "potentialAction": {
       | "@type": "WatchAction"         }       }
       | 
       | That could be a syllabus.
       | 
       | ActionTypes include: BuyAction, AssessAction > ReviewAction,
       | 
       | Schema.org > "Full schema hierarchy" > [Open hierarchy] > Action
       | and rdfs:subClassOf subclasses thereof:
       | https://schema.org/docs/full.html
       | 
       | What Linked Data should [math textbook] publishing software
       | include when generating HTML for the web?
       | 
       | https://schema.org/CreativeWork > Book, Audiobook, Article >
       | ScholarlyArticle, Guide, HowTo, Blog, MathSolver
       | 
       | The schema.org Thing > CreativeWork LearningResource RDFS class
       | has the :assesses, :competencyRequired, :educationalLevel,
       | :educationalAlignment, and :teaches RDFS properties;
       | https://schema.org/LearningResource
       | 
       | You can add bibliographic metadata and curricular Linked Data to
       | [OER LearningResource] HTML with schema.org classes and
       | properties as JSON-LD, RDFa, or Microdata.
       | 
       | The schema.org/about property has a domain which includes
       | CreativeWork and a range which includes Thing, so a :CreativeWork
       | is :about a :Thing which could be a subclass of :CreativeWork.
       | 
       | .
       | 
       | I work with MathJax and LaTeX in notebooks a bit, and have
       | generated LaTeX and then PDF with Sphinx and texlive like the
       | ReadTheDocs docker container which already has the multiple
       | necessary GB of LaTeX installed to render a README.rst as PDF
       | without pandoc:
       | 
       | The Jupyter Book docs now describe how that works.
       | 
       | Jupyter Book docs > Customize LaTeX via Sphinx:
       | https://jupyterbook.org/en/stable/advanced/pdf.html#customiz...
       | 
       | How to build the docs with the readthedocs docker image onesself:
       | https://github.com/jupyter-book/jupyter-book/issues/991
       | 
       | ReadTheDocs > Dev > Design > Build Images > Time required to
       | install languages at build time [with different package managers
       | with varying performance]
       | https://docs.readthedocs.com/dev/latest/design/build-images....
       | 
       | The jupyter-docker-stacks, binderhub, and condaforge/miniforge3
       | images build with micromamba now IIRC.
       | 
       | condaforge/miniforge3:
       | https://hub.docker.com/r/condaforge/miniforge3
       | 
       | Recently, I've gotten into .devcontainers/devcontainers.json;
       | which allows use of one's own Dockerfile or a preexisting docker
       | image and installs LSP and vscode on top, and then runs the
       | onCreateCommand, postStartCommand
       | 
       | A number of tools support devcontainer.json:
       | https://containers.dev/supporting
       | 
       | Devcontainers could be useful for open textbooks in math-heavy
       | disciplines; so that others can work within, rebuild, and upgrade
       | the same container env used to build the textbook.
       | 
       | Re: MathJax, LaTeX, and notebooks:
       | 
       | To left-align a LaTeX expression in a (Jupyter,Colab,VScode,)
       | notebook wrap the expression with single dollar signs. To center-
       | align a LaTeX expression in a notebook, wrap it with double
       | dollar signs:                 $ \alpha_{\beta_1} $       $$
       | \alpha_{\beta_2} $$
       | 
       | Textbooks, though? Interactive is what they want.
       | 
       | How can we make textbooks interactive?
       | 
       | It used to be that textbooks were to be copied down from; copy by
       | hand from the textbook.
       | 
       | To engage and entertain this generation.
       | 
       | ManimCE, scriptable 3d simulators with test assertions, Thebelab,
       | 
       | Jupyter Book docs > "Launch into interactive computing
       | interfaces" > BinderHub ( https://mybinder.org ), JupyterHub,
       | Colab, Deepnote:
       | https://jupyterbook.org/en/stable/interactive/launchbuttons....
       | 
       | JupyterLite-xeus builds a jupyterlite static site from an
       | environment.yml; such that e.g. the xeus-python kernel and other
       | packages are compiled to WebAssembly (WASM) so that you can run
       | Jupyter notebooks in a browser without a server:
       | 
       | repo2jupyterlite works like repo2docker, which powers BinderHub,
       | which generates a container with a current version of Jupyter
       | installed after building the container according to one or more
       | software dependency requirement specification files in /.binder
       | or the root of the repo.
       | 
       | repo2jupyter: https://github.com/jupyterlite/repo2jupyterlite
       | 
       | jupyterlite-xeus: https://jupyterlite-
       | xeus.readthedocs.io/en/latest/
        
       | somethingsome wrote:
       | I think the neatest feature would be: the mathematician states
       | the theorem in English (edit: with math symbols as needed), then
       | he states the proof in English.
       | 
       | A post-Processor transform the proof into lean (with any official
       | lib loaded). It is automatically verified. If something is
       | missing, the post processor ask to write in English the missing
       | parts. Iterate like this.
       | 
       | The lean proof is hidden in the final document, and can be
       | displayed if needed. Or even, we get an English version that can
       | be easily retransformed into lean at will.
       | 
       | Bonus point: we can query the document to give more details on
       | part of the proof and it outputs (expanded) lean formatted as
       | nice English.
       | 
       | Note: there is no need to have all the math self contained in the
       | document, he can say to assume some theorem true to do his proof.
       | And this would be reflected in English.
        
         | volemo wrote:
         | I can't speak for true mathematicians, but as a (mostly
         | theoretical) physicist I would hate to write my maths in plain
         | English. Notation is used precisely because it's easier, more
         | efficient (to write and to read) to use it instead of prose. If
         | you'd like an example, I suggest reading texts on solving
         | quadratic equations that predate modern algebraic notation.
        
           | somethingsome wrote:
           | Sorry I meant English with maths inside, not to avoid all
           | symbols! (A classical style proof that you find in any
           | current paper) Edited.
        
       | nicf wrote:
       | For the articles on my website, I have a pretty janky workflow
       | where I write a LaTeX document that I compile both to a PDF and
       | (using Pandoc) to HTML, which I render with KaTeX. I've been in
       | the market for a while for something that's less fragile but
       | which can still produce both a PDF and visually appealing HTML
       | output starting from a LaTeX source, and it seems like some of
       | the ideas listed here might be what I want! Thanks for the link.
       | (That said, if anyone has a particular recommendation, I'd love
       | to hear it!)
        
         | ohgr wrote:
         | I'm lazy. I just extract the abstract from the tex source and
         | put a link to the PDF. That is however quite different and not
         | public in my case.
         | 
         | Turns out from a technical documentation consumer perspective
         | it's easier to save a PDF than feck around with web pages and
         | try and save them.
        
       | nprateem wrote:
       | Why do maths textbooks never explain how to read the equations?
       | I've tried reading a few and before you know it there'll be some
       | matrix stuff in, integrations or whatever and no explanation of
       | how to read them in normal English like a maths teacher does.
       | 
       | They all seem to assume you're still at school rather than it
       | being decades since you last had to read them. Even using Greek
       | symbols - WRITE THEM OUT. Jeez, it's so elitist.
        
       ___________________________________________________________________
       (page generated 2025-03-29 23:00 UTC)