Sadly, css/html hyphenation is still pretty awful. And AFAIK on mobile kerning is pretty far off too. So to me it feels more like a latex parody than homage, unfortunately.
Additionally, it took a long time for Chrome to even implement: https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens https://www.chromestatus.com/feature/5642121184804864 Sadly, even with auto, there's way too much ragged right in html, or too irregular word spacing. Even with tricks like inserting soft hyphens. A list apart long held up the pretty much gold standard, but it's still not as good as plain latex (not sure about plain tex, as I've never had occasion to use it). See also: https://alistapart.com/article/the-look-that-says-book/ Unfortunately it appears the current ala styling is worse than it used to be (probably due to a move to use modern css, which is understandable - but only highlights the problem).
The problem is that CSS uses greedy line breaks. In theory, this should improve once browsers implement CSS Text Module Level 4, specifically the `pretty` value for the `text-wrap` property [1][2]. Until then, we're stuck with poor-quality typesetting, or JavaScript solutions [3].
It’s not that CSS does that, but that browsers (all of them) do that. CSS has no opinion on the matter until text-wrap, where `text-wrap: stable` would dictate the current behaviour.
As an example showing that browsers have long been open to doing things better, this bug was opened against Firefox nine years ago, to implement Knuth-Plass: https://bugzilla.mozilla.org/show_bug.cgi?id=630181 (it hasn’t gone anywhere, of course, because it’s hard; but it shows willingness).
This had me wondering about whether it was possible to use pre-calculated line breaks to implement improved text justification in current browsers. I was able to come up with a demo [1][2] that does so, although it falls back to default line breaks in Safari due to lack of support for `text-align-last`.
Ho-hum :) I'm slightly torn between admiration and horror:
> The key is to wrap all the potential line breaks (inserted via ::after pseudo-elements) and hyphens in elements that are hidden by default with display: none;. Media queries are then used to selectively show the line breaks specific to a given column width. Doesn't look like you compared with simply inserting soft hyphens - last I looked, that made columns bearable in browsers, although still not as good as proper line breaking.
Thank you for this comment. I honestly didn't give it much thought at all when I copied it from the CSS reset [1] I used. I'll change it to `optimizeLegibility` asap.
I hated the look of LaTeX documents when I first started university, especially the font. I don't know what happened, but I eventually fell in love Computer Modern. Something about it just looks great. Maybe it's just Stockholm Syndrome.
I think a lot of people go through a life cycle of Computer Modern. I originally was indifferent, but once I learned LaTeX I used it since it was the default and it signaled to people that I knew LaTeX. Now I prefer Utopia/Fourier instead. Computer Modern seems to "thin", in my opinion, but I still use it on occasion. Some colleagues of mine really love it, though.
I can see why some people like it since it's the default font for a lot of technical documents and seeing it often signifies a certain level of "quality". The documents generally look better than Word documents, for example. Moreover, if an author took the time to learn LaTeX, it is easy to assume that they know what they are talking about. This is a form of "honor by association" (opposite of guilt by association fallacy). Relevant XKCD: https://xkcd.com/1301/
The problem is that it's much too thin and therefore hard to read on computer screens. I'm sure it looks great on paper printed with the old Xerox laser printers that were around when it was made, but in its current form it's just way too thin to be read on a screen.
The heavier version looks better, but this involves messing with Metafont, which generates bitmaps. (And sadly his sample PDF links have died.)
I don't know of a way to heavier outline fonts. I believe the commonly used versions aren't in fact derived smoothly from Metafont, but either fitted to the bitmaps, or drawn by hand over them. That would have been a good time to correct this sad mistake.
I strongly agree on the “too thin” point. On screen I find it an awful font, almost as bad as half the 300-weight sans-serifs too many people love to use on their websites. Computer Modern does look better printed, especially on less-accurate printers that thicken what they print.
Related: the serif font Equity comes in two grades to compensate for such types of printers (though both grades are thicker than Computer Modern), and discusses the rationale for this feature: https://mbtype.com/pdf/equity-type-specimen.pdf#page=5
My recollection is that Computer Modern didn't look very good on old laser printers, as their resolution just wasn't high enough to handle the detail of the glyphs. It was crafted for digital phototypesetting systems with a resolution of 1200dpi or more, and 300dpi laser printers couldn't do it justice.
It depended on the laser printer. It's funny that the poster mentioned Xerox laser printers in particular because cm looked especially bad on them: There were two competing approaches to laserprinting. One was write black where a laser was used to add charge to the parts of the drum that should be black. The other (used by Xerox and perhaps others) was write white where the whole drum was charged and the laser was used to remove charge from the parts that should be white. In either case, the pixel was a little bigger than the actual 1/300in x 1/300in square that was to be drawn so it resulted in CM coming out even more spindly on write white laser printers. Neenie Billawalla came up with a modification to the MF source code for CM to allow for increasing the darkness of the fonts as well as some other fine-tuning. (https://tug.org/TUGboat/tb08-1/tb17billawala.pdf)
As I recall, there were occasional other issues with running MF on the CM sources at low resolutions and it was often necessary to just tell MF to continue at the error prompt to generate the font (when Tom Rokicki's dvips incorporated auto-running MF to generate missing PK files for specific resolutions, I think it ran it with a default setting of ignoring errors). Those 1980s Xerox laser printers were real beasts. The 87xx/97xx series printers were prone to rolling over (crashing) on TeX print jobs since downloading fonts to the printer was not fully supported. The first dvi driver for the Xerox printers actually required pre-installing font sets on the printer and only certain combinations of fonts could appear in a single document. I don't think the 27xx series printers were ever capable of handling TeX output.
Same, except instead of falling in love with Computer Modern, I went "oh hey, XeLaTeX lets me use fonts in a sane way" and started typesetting with modern OpenType fonts instead. So I'd argue there's at least a good chunk of Stockholm syndrome there.
Very true -- interesting when the barrier to using the tool signifies a certain level of professionalism and investment in wanting the paper to look and read right.
However, there is a part of the curve where random failed grad student and retired professors become conspiracy cranks and email you half-baked theories about the shape of the universe, typeset in Latex -- and those get through the filter unfortunately.
I disliked Computer Modern enough that after experimenting with various free fonts, I actually purchased Michael Spivak's MathTime Professional 2 Complete fonts, and then I use a nice Times-like font.
Michael Spivak absolutely loathes CM. I remember trying to make the case for at least a few characters of the design to him poolside during one of the 80s TUG conferences and he wasn't having it.
1. No automatic numbering (and no automatic table of contents generation). 2. Latex will indent the first line of each paragraph (except the first one in a run). This is the reason why it gets away with very little padding between paragraphs. Having written my share of Latex, I have always wondered why people are focusing on math and formulas. That is the least of what Latex brings to the table. Most documents have no need for formulas but are massively underserved in the "proper typesetting" department. I remember hacking a Latex CSS many years ago when CSS was only half as powerful as it is now. I had to use some Javascript for the table of contents generation though. Personally, I find the Computer Modern font the least attractive thing about TeX. I always substitute either Times Roman if the size of the resulting PDF is important, or Linux Libertine or so if not.
Times Roman was designed for narrow newspaper columns. If you're not writing/printing in narrow newspaper columns, there are many other choices out there.
One bit of irony: LaTeX.css can't display math without... JS.
(However, there is a solution if you're using Pandoc! Compile via texmath and then https://github.com/mathjax/MathJax-node can create a static HTML+CSS+fonts page, which aside from looking the same, runs far faster than loading Mathjax. This is what I do on gwern.net. It's very nice. texmath doesn't support all of LaTeX, of course, but if you need a block or a diagram, there's lots of Pandoc plugins to call a TeX install of some sort and generate an SVG or PNG.)
Comments (111) 32 threads
Additionally, it took a long time for Chrome to even implement:
https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens
https://www.chromestatus.com/feature/5642121184804864
Sadly, even with auto, there's way too much ragged right in html, or too irregular word spacing. Even with tricks like inserting soft hyphens.
A list apart long held up the pretty much gold standard, but it's still not as good as plain latex (not sure about plain tex, as I've never had occasion to use it).
See also:
https://alistapart.com/article/the-look-that-says-book/
Unfortunately it appears the current ala styling is worse than it used to be (probably due to a move to use modern css, which is understandable - but only highlights the problem).
[1] https://www.w3.org/TR/css-text-4/#text-wrap [2] https://github.com/w3c/csswg-drafts/issues/672 [3] https://github.com/robertknight/tex-linebreak
As an example showing that browsers have long been open to doing things better, this bug was opened against Firefox nine years ago, to implement Knuth-Plass: https://bugzilla.mozilla.org/show_bug.cgi?id=630181 (it hasn’t gone anywhere, of course, because it’s hard; but it shows willingness).
[1] https://mpetroff.net/files/pre-calculated-line-breaks-demo/ [2] https://mpetroff.net/2020/05/pre-calculated-line-breaks-for-...
> The key is to wrap all the potential line breaks (inserted via ::after pseudo-elements) and hyphens in elements that are hidden by default with display: none;. Media queries are then used to selectively show the line breaks specific to a given column width.
Doesn't look like you compared with simply inserting soft hyphens - last I looked, that made columns bearable in browsers, although still not as good as proper line breaking.
Continue this thread — 2 replies
[2]: https://practicaltypography.com/kerning.html
[1]: https://github.com/hankchizljaw/modern-css-reset/blob/master...
I can see why some people like it since it's the default font for a lot of technical documents and seeing it often signifies a certain level of "quality". The documents generally look better than Word documents, for example. Moreover, if an author took the time to learn LaTeX, it is easy to assume that they know what they are talking about. This is a form of "honor by association" (opposite of guilt by association fallacy).
Relevant XKCD:
https://xkcd.com/1301/
Continue this thread — 4 replies
Someone on a German forum made a wider version of it which (imo) looks much better [1].
[1] https://www.typografie.info/3/topic/22238-ist-die-computer-m... Translated: https://translate.google.com/translate?sl=de&tl=en&u=https%3...
I don't know of a way to heavier outline fonts. I believe the commonly used versions aren't in fact derived smoothly from Metafont, but either fitted to the bitmaps, or drawn by hand over them. That would have been a good time to correct this sad mistake.
Related: the serif font Equity comes in two grades to compensate for such types of printers (though both grades are thicker than Computer Modern), and discusses the rationale for this feature: https://mbtype.com/pdf/equity-type-specimen.pdf#page=5
Continue this thread — 5 replies
As I recall, there were occasional other issues with running MF on the CM sources at low resolutions and it was often necessary to just tell MF to continue at the error prompt to generate the font (when Tom Rokicki's dvips incorporated auto-running MF to generate missing PK files for specific resolutions, I think it ran it with a default setting of ignoring errors).
Those 1980s Xerox laser printers were real beasts. The 87xx/97xx series printers were prone to rolling over (crashing) on TeX print jobs since downloading fonts to the printer was not fully supported. The first dvi driver for the Xerox printers actually required pre-installing font sets on the printer and only certain combinations of fonts could appear in a single document. I don't think the 27xx series printers were ever capable of handling TeX output.
Sadly, mobile Firefox does not support that, so HN on Android is relentlessly sans.
browser.display.use_document_fonts = 0
font.name.serif.x-western = Linux Libertine
font.name.sans-serif.x-western = Linux Libertine
Continue this thread — 1 reply
However, there is a part of the curve where random failed grad student and retired professors become conspiracy cranks and email you half-baked theories about the shape of the universe, typeset in Latex -- and those get through the filter unfortunately.
https://pctex.com/mtpro2.html
Continue this thread — 1 more reply
1. No automatic numbering (and no automatic table of contents generation).
2. Latex will indent the first line of each paragraph (except the first one in a run). This is the reason why it gets away with very little padding between paragraphs.
Having written my share of Latex, I have always wondered why people are focusing on math and formulas. That is the least of what Latex brings to the table. Most documents have no need for formulas but are massively underserved in the "proper typesetting" department.
I remember hacking a Latex CSS many years ago when CSS was only half as powerful as it is now. I had to use some Javascript for the table of contents generation though.
Personally, I find the Computer Modern font the least attractive thing about TeX. I always substitute either Times Roman if the size of the resulting PDF is important, or Linux Libertine or so if not.
How about a nice Janson?
(However, there is a solution if you're using Pandoc! Compile via texmath and then https://github.com/mathjax/MathJax-node can create a static HTML+CSS+fonts page, which aside from looking the same, runs far faster than loading Mathjax. This is what I do on gwern.net. It's very nice. texmath doesn't support all of LaTeX, of course, but if you need a block or a diagram, there's lots of Pandoc plugins to call a TeX install of some sort and generate an SVG or PNG.)
All comments shown.
Couldn't load more comments. Check your connection and try again.