July 19th, 2024

Building the New Hypermedia Systems

The new edition of Hypermedia Systems was redesigned using Typst, a LaTeX replacement, improving design fidelity. Challenges in PDF generation were overcome, enhancing typesetting quality and design flexibility significantly.

Read original articleLink Icon
Building the New Hypermedia Systems

The new edition of Hypermedia Systems has been redesigned using Typst, a LaTeX replacement, to improve design fidelity. The previous version was challenging to produce in print using AsciiDoc due to limitations in PDF generation tools. Despite difficulties with Paged.js and HTML-to-PDF conversion, a usable PDF was eventually created. The transition to Typst involved converting the manuscript from AsciiDoc to DocBook XML and then to Typst, with additional adjustments required. Notably, Typst lacks features like code block callouts and indexing, which had to be implemented manually. The new edition showcases improved typesetting and design flexibility, allowing for finer control over layout elements like paragraph indentation and emphasis styling. Typst's advanced typesetting capabilities, akin to TeX, offer a superior reading experience compared to browsers. While Typst excels in print production, the lack of HTML output necessitates separate strategies for online publishing. Despite challenges and manual interventions during the migration process, the use of Typst has enhanced the overall design and typesetting quality of Hypermedia Systems.

Related

Hypermedia Systems

Hypermedia Systems

The book "Hypermedia Systems" by Carson Gross, Adam Stepinski, and Deniz Akşimşek, with a foreword by Mike Amundsen, introduces innovative web development concepts using htmx and Hyperview. It caters to web developers, individuals interested in web basics, and companies transitioning apps to mobile platforms. Available online and on Amazon.

Advanced text features and PDF

Advanced text features and PDF

The post explores complex text features in PDFs, covering Unicode, glyph representation, kerning, and font challenges. It emphasizes tools like Harfbuzz and CapyPDF for accurate text handling in PDFs.

Polytype: A Rosetta Stone for typesetting engines

Polytype: A Rosetta Stone for typesetting engines

Polytype is a project like Rosetta Code but for typesetting engines. It compares how different engines handle layout and orthographic features. Contributions are welcome via GitHub for new samples and improvements. Users can build examples locally and test the website.

PostScript and Interpress: A Comparison (1985)

PostScript and Interpress: A Comparison (1985)

Brian Reid compares PostScript and Interpress, detailing their history, development, and similarities in controlling laser printers. Both languages evolved from earlier systems, with PostScript by Adobe and Interpress by Xerox. Despite differences, they significantly advanced page description languages.

HTML5 Differences from HTML4 (2014)

HTML5 Differences from HTML4 (2014)

The W3C Working Group's "HTML5 Differences from HTML4" document outlines changes in syntax, elements, APIs, and compatibility. HTML5 introduces new elements, MathML, SVG support, and emphasizes backward compatibility for modern web development.

Link Icon 9 comments
By @recursivedoubts - 3 months
Deniz did absolutely amazing work re-laying out the entire book using typst:

https://typst.app/

And the results have been fantastic when compared with the asciidoc version we created initially. The repo is here if you want to see how he uses it:

https://github.com/bigskysoftware/hypermedia-systems-book

You can fork it and build either a pdf or epub using the just commands: `just build-pdf` and `just build-epub`. I also uploaded the epub to libgen.

We also had a pixel artist do a new cover for the paper back version:

https://pbs.twimg.com/media/GSsMjBra4AAOQZ_?format=jpg&name=...

By @egypturnash - 3 months
Traditional style and my own preference dictate that indentations separate paragraphs, so the first paragraph after a non-paragraph element (like a heading or a list) should not be indented. This is a common typographic convention, but to do it in CSS is impossible in the general case without dozens, maybe hundreds of selectors to handle every special case. In Typst, you just give paragraphs a first-line-indent, and they know when to use it.

p+p {text-indent:5em} seems pretty simple? I just did a quick test and it seemed to work when I broke up a few paragraphs with an h1, a ul, and a div. This isn't anything esoteric, it's CSS2 stuff that's been working for twenty years. Though "typst breaks lines 500% better than most browsers" is a compelling argument on its own.

By @jampekka - 3 months
Typst seems like a real contender for LaTeX. I've used and hated LaTeX for over 20 years. That the horror that is LaTeX is still the least worst typesetting system for print is really depressing.

I've been waiting for Typst to get HTML output. It's been under development for quite a while but seems to suffer from some bikeshedding [1].

Glad to see there's Pandoc support for Typst HTML (and LaTeX) export as a workaround. Gotta try it for my next paper!

By @lejalv - 3 months
You can have all that and more with TeXmacs (http://texmacs.org) and actually enjoy the writing as much as you hope for the reader to enjoy a properly typeset document instead of a fixed width font, and abstruse markup everywhere.

Typst is a better 70s answer for a 70s-level ambition, which is a fine level of ambition when you're just out of punch-card programming.

By @owenpalmer - 3 months
Typst is truly a joy to use. Intuitive syntax, instant compilation, trivial installation, and it's open source.

The only reason to learn Latex is the same reason to learn C++: Everyone else uses it

By @tomjen3 - 3 months
Sometime ago I brought Affinity publisher (I have no affiliation with them, I got it because it did not require a subscription). It is a desktop publishing application, so the intended use case is that you make the text separately and then you setup a layout and include the text.

And honestly, I think that is the better way to go. You don't have to chase down weird commands (how do you set LaTeX to use Lato as the main font again?) and you get instant feedback on how things look.

I haven't found a way to mark text up as "this is a blockquote" and then have that mapped to the correct style, and it seems to lack a few of the more esoteric font features LaTeX does support. The fact that you get instant feedback and can tweak the relevant knobs as much as you like? That means you get a much nicer layout.

If you have a Windows machine with the Office package, you get Microsoft Publisher, which I believe can import Word documents and extract the style from that.

Scribus can map styles from imported files, but last time I checked I couldn't get it to auto update the view when you changed the font.

By @kkfx - 3 months
Hem... We already have org-mode...