Live data from Hacker News

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

latex.now.sh

71–80 of 113 posts

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

#71
post #69

Earlier quoted context omitted.

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

Awesome. I like the project and the classless approach. Will PR if I stumble across anything else.

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

#72

It is a bit dishonest to call it "css" when most of the heavy lifting (the math) is done by javascript.

Agreed, the CSS is basically just importing the Latin Modern font and doing some spacing and font-size specifications. Not wanting to be mean, but there's nothing special about it. The credit should go to MathJax [1] which is rendering the math.

[1]: https://www.mathjax.org

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

#73

So then if you use a html2pdf tool you can generate a pdf people will think was done with LaTeX! Here I wasted all that time learning LaTeX to impress people.

I write solely in markdown and use pandoc with other tools to generate the best file-type for the audience. Business folks get .doc or .pdf. For technical folks it varies on the situation: anything from the raw markdown, to LaTeX styled pdf, to HTML pages with various css applied (I often use github's).

> to HTML pages with various css applied (I often use github's).

Mind sharing the subset of GitHub CSS that you use?

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

#74
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 don't care for Computer Modern serif, but I have a soft spot for Computer Modern Sans Serif [1].

It's the default font in Beamer, and I find when I make it the default font for non-serious publications, it looks really clean and modern. I especially like its rounded edges -- makes it look Web 2.0ish.

[1] https://tug.org/FontCatalogue/computermodernsansserif/

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

#75
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

Use "filetype:pdf" in the search to get PDF files only, not mentions of them.

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

#77
I always liked the standard appearance of monospaced type in LaTeX, but not the regular proportional serif text. It's a kneejerk reaction, but thinking about why, I notice that one not so subjective issue is that parts of the letters are just too thin for a relatively low resolution screen, presumably because they were designed for laser printing...

If you really want serifs, why is it better than Times?

Also, has anyone ever tried doing scientific papers with a sans-serif font?

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

#78
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…

If you use next.js with eg. katex this will happen by default.

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

#79
post #67

Earlier quoted context omitted.

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.

Yes, that's exactly what I meant.

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

#80

Earlier quoted context omitted.

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"?

I could trivially automate it so that it runs as part of CI/CD, but that's honestly more work than just running `npm run build` ever time I write a new chapter.
Post reply on HN