Live data from Hacker News

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

latex.now.sh

61–70 of 113 posts

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

#61
post #48

This is great! Putting anything mathematics-related on the Web and making it look half-decent is such a chore. Thank you for making it easier! MathJax and KaTeX are a great thing, but there's a contrast between formulas and the rest of the document unless you use something like this. The comments here as of now fall into two groups: - "Who needs it and why?" People who want to present or discuss mathematics and proof…

> You know what else TeX does? It takes forever to compile

What are you compiling, and what are your expected and actual times? It's certainly fast enough for me, although I mostly compile article-length documents.

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

#62
post #27

Earlier quoted context omitted.

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…

That's actually pretty cool. Do you have an automated setup to do that, or is it manual for every "post"?

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

#63
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 hate the lack of composability of LaTeX code. What works in one environment may just break in another.

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

#64

Earlier quoted context omitted.

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…

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…

I had no idea one could link directly to PDF pages. Thanks for the tip!

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

#66
post #64

Earlier quoted context omitted.

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…

I had no idea one could link directly to PDF pages. Thanks for the tip!

Chrome & other browsers have had PDF reading capabilities for a long, long time. I actually can't remember a time when you couldn't view a PDF inside Chrome/Firefox.

You might also be interested to know that Google indexes PDFs. For example: https://www.google.com/search?q=graph+theory+pdf

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

#67
post #64

Earlier quoted context omitted.

I had no idea one could link directly to PDF pages. Thanks for the tip!

Chrome & other browsers have had PDF reading capabilities for a long, long time. I actually can't remember a time when you couldn't view a PDF inside Chrome/Firefox. You might also be interested to know that Google indexes PDFs. For example: https://www.google.com/search?q=graph+theory+pdf

I think they were referring to the #page=5 part of the URL.

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

#68
post #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…

Given the emphasis on typesetting I’m surprised LaTeX.css opted for rendering speed [1] over kerning [2]

  text-rendering: optimizeSpeed;

  text-rendering: optimizeLegibility;
[1]: https://github.com/vincentdoerig/latex-css/blob/3d5c1e9/styl...

[2]: https://practicaltypography.com/kerning.html

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

#69
post #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…

Given the emphasis on typesetting I’m surprised LaTeX.css opted for rendering speed [1] over kerning [2] text-rendering: optimizeSpeed; text-rendering: optimizeLegibility; [1]: https://github.com/vincentdoerig/latex-css/blob/3d5c1e9/styl... [2]: https://practicaltypography.com/kerning.html

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.

[1]: https://github.com/hankchizljaw/modern-css-reset/blob/master...

Post reply on HN