Top
Best
New

Posted by volemo 3/29/2025

Accessible open textbooks in math-heavy disciplines(richardzach.org)
235 points | 75 commentspage 2
oh_my_goodness 3/29/2025|
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 3/29/2025|
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/
oh_my_goodness 3/29/2025||
It does. But why can't LaTex produce png or something? Why does it have to be either pdf or pretty much abandon the idea of typesetting? Or am I misunderstanding?
raegis 3/30/2025|||
By the way, LaTeX and TeX existed long before PDFs were ubiquitous. A common workflow in the 1990s and prior was

TeX/LaTeX -> DVI -> PostScript -> printer

And DVI stands for "device independent", so the idea was you can take a DVI and convert it to any format. PDFs just eventually became the dominate format.

oh_my_goodness 3/30/2025||
Yeah, I remember.
goosedragons 3/30/2025|||
You can. Compile to DVI then use dvipng. There's not much reason to do it anymore. PDFs take up less space, you can copy the text, do hyperlinks.
xworld21 3/30/2025|||
> Compile to DVI then use dvipng

or dvisvgm, which will produce scalable images. However, images are even worse than PDF in terms of accessibility, which is what the article is talking about.

oh_my_goodness 3/30/2025|||
So what's so bad about pdfs?
xworld21 3/30/2025|||
Even after properly tagging your PDF and using Acrobat Reader to reflow the text, you cannot achieve this level of flexibility: https://forallx.openlogicproject.org/html/

Note how Richard's book adapts to any screen size, can change fonts and color schemes, system settings such as 'high contrast' will affect the rendering of the page, and you could even use browser extensions to restyle the page to e.g. use a more dyslexic friendly font of your choice.

This kind of functionality is not afforded by Adobe Reader. Even the official Adobe's example of reflowing that was posted in another thread is quite bad: https://helpx.adobe.com/uk/acrobat/using/reading-pdfs-reflow... The reflowed PDF is just stacking all text and removing all non-text visual cues. For example, pairs of name/role are separated by whitespace in the PDF, but after reflowing they are undisguishable from each other (who would be the senior VP, Sunny or Daniel?). In HTML, reflowing would preserve semantically relevant whitespace out of the box.

CJefferson 3/30/2025|||
Some people like text which they can reformat easily (increase font size, change to different screens dimensions).

What is generally bad about the PDFs that Latex produces (and is a problem with latex, not a problem with PDF) is that they are very inaccessible, they don't work with screen readers.

The reason it's so hard to make latex output HTML (although people are working on it) is that latex is actually a programming language, which is executed to decide where things go on in the PDF.

Make latex output HTML is a bit like trying to take (say) a game engine like Unity, and change it's rendering engine to output HTML instead of graphics -- in the worst case it's basically impossible, as the game just generates commands like "draw triangle here", without context or semantics.

throwaway81523 3/30/2025||
I feel like there are enough free and semi-free textbooks to study just about anything I want. The limiting factor is my not so plentiful brainpower to actually learn new math stuff. There's no way I can possibly run out of textbooks.
westurner 3/29/2025||
"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/

wosined 3/30/2025||
> The obligatory TeXmacs mention.
curtisszmania 3/30/2025||
[dead]
pjmlp 3/29/2025|
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 3/29/2025||
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 3/29/2025||
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...

xworld21 3/30/2025||
I posted this in another thread

> Even the official Adobe's example of reflowing you posted before is quite bad:

> https://helpx.adobe.com/uk/acrobat/using/reading-pdfs-reflow...

> The reflowed PDF is just stacking all text and removing all non-text visual cues. For example, pairs of name/role are separated by whitespace in the PDF, but after reflowing they are undisguishable from each other (who would be the senior VP, Sunny or Daniel?). In HTML, reflowing would preserve semantically relevant whitespace out of the box.

Finnucane 3/30/2025||
Getting PDF up to WCAG standards is a painful and arduous task.