Live data from Hacker News

Show HN: LaTeX.css – Make your website look like a LaTeX document

latex.now.sh

31–40 of 113 posts

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#31
post #6

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.

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. 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…

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.

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#32

Earlier quoted context omitted.

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 def…

I loved Computer Modern till I read your post. Now I wanna move to Fourier for good - thanks for that!

Maybe have a look at XeLaTeX (the unicode-by-default LaTeX), which lets you just use any modern font you have installed, using normal syntax.

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#33

This is neat! One small thing I noticed is that in the Binomial theorem, “k=0” is hidden by sigma, unless I zoom in a little. If I zoom back out afterwards, it’s fine until I start scrolling again. I don’t know anywhere near enough css to guess what’s going on.

That part's actually not the .css stylesheet, but MathJax's conversion result. I run a website with over 150 formulae, at which point client-side MathJax becomes impossible (unless you're okay with a page taking 2 minutes to fully load due to formula-by-formula conversion) so I actually use _real_ LaTeX (XeLaTeX, technically) to convert maths to .svg files and include those instead.

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#34
post #27

Why do some of the equations show up as rendered by MathJax, but others still read `$\mathbb{R}$`?

Honestly, I really don't know. MathJax has been very janky for some reason. I have tried using KaTeX ( https://katex.org ) but couldn't get it to work properly and some equations just looked "off".

I had to give up on both: they seem great until your page needs more than 10 formulae and it starts to take quite a lot of seconds for your page to finish loading for folks. Instead I switched to preprocessing my pages to extract latexy blocks, literally run them through latex and pdf2svg to turn them into clean SVG image and replace the on-page latex code with presized elements: now your content doesn't jump around while loading (because the browser already knows how much space the image will take up), everyone sees the same thing (no browser quirks around MathML etc) and because it's SVG, positioning and scaling is trivial.

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#35
post #2

What so it just styles your site to look like a dry academic paper? What use case does this have? I imagine someone out there really needs this and the target audience is small.

Ever seen any science prof's course subject pages, with those fantastic ascii formulae, 1992 nav buttons, and grey background with "color:blue" links? Not everything needs this, but some things need this kind of almost trivial improvement to their presentation.

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#36
post #7

Earlier quoted context omitted.

there are plenty of people that appreciate "dry academic papers" - they're called academics. there are also plenty of blogs written by academic types that aim for minimalism.

Yeah but it's very edge-casey and not everyone's an academic so the target audience must be very small. Otherwise why write the CSS for it. If I wanted to write a CSS library I would be aiming for a large audience (but that's just me; always trying to have maximum impact)

Unless your audience pays you, where's the ROI? And without an ROI, what's the point in going for maximum impact? That's just wasting time and effort that can be spent on other things: apply a stylesheet, and move on to the things that actually pay off.

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#37

Earlier quoted context omitted.

I loved Computer Modern till I read your post. Now I wanna move to Fourier for good - thanks for that!

Maybe have a look at XeLaTeX (the unicode-by-default LaTeX), which lets you just use any modern font you have installed, using normal syntax.

Does the arxiv accept xetex yet? That's one constraint which kept me away.

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#38

Earlier quoted context omitted.

Maybe have a look at XeLaTeX (the unicode-by-default LaTeX), which lets you just use any modern font you have installed, using normal syntax.

Does the arxiv accept xetex yet? That's one constraint which kept me away.

If it doesn't, someone needs to raise a stink. It's been in TeX Live for over a decade now, there is no excuse for not supporting it.

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#39
post #6

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 it's because the font is correlated with higher-than-average quality for random docs one finds on the web.

Re: Show HN: LaTeX.css – Make your website look like a LaTeX document

#40
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).

Post reply on HN