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-...
text-rendering: optimizeSpeed;
text-rendering: optimizeLegibility;
[1]: https://github.com/vincentdoerig/latex-css/blob/3d5c1e9/styl...[1]: https://github.com/hankchizljaw/modern-css-reset/blob/master...
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...
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
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.
Sadly, mobile Firefox does not support that, so HN on Android is relentlessly sans.
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 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:
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. 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.
(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.)
Mind sharing the subset of GitHub CSS that you use?
In https://dokie.li/ , HTML is key - semantic and sufficiently "flexible". CSS is secondary. That is why we can generally throw different CSS at it without touching the underlying HTML pattern. Examples:
* https://dokie.li/acm-sigproc-sp (ACM - authoring guidelines)
* https://dokie.li/lncs-splnproc (LNCS - authoring guidelines)
* https://csarven.ca/linked-research-decentralised-web
* https://csarven.ca/dokieli-rww
* https://linkedresearch.org/ldn/
* ...
You can dynamically switch the CSS view from the dokieli menu (top-right) or from your browser's native controls eg. view the ACM authoring guidelines using the LNCS CSS and vice-versa.
[1] https://www.youtube.com/watch?v=jlX_pThh7z8 (video)
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.
[1] https://texdoc.net/texmf-dist/doc/latex/booktabs/booktabs.pd...
However, I do agree with some of the other contents that the style is a little dry for a webpage.
I think it would be very useful as the "print" style for articles or blog posts, without having to pipe through pandoc: most browsers support print to pdf.
Not sure what it is, perhaps PTSD from uni but something about latex docs bring on really bad feelings...
Eg.
padding: 1rem 1.4rem;
max-width: 100%;
overflow: auto;
/* border: 1px solid hsl(210, 15%, 49%); */
border-radius: 4px;
background: hsl(210, 28%, 93%);
I think that grey was kinda neutral. But anyway, that's just my opinion. Otherwise it looks nice.If you really want serifs, why is it better than Times?
Also, has anyone ever tried doing scientific papers with a sans-serif font?
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 proofs on the Web. If you ask, you're not one of them.
- "This does not exactly like LaTeX!"
Duh. It does not. Only TeX looks like TeX.
You know what else TeX does? It takes forever to compile, and the nice-looking result is a PDF that most people will be too lazy to download.
So, we have the ArXiV. And if your website is not the ArXiV, linking to PDFs is far from ideal. Static generation is a chore.
This is a compromise.
TL;DR: great work, much needed and appreciated
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.
The biggest problem is floating figures. ACM papers have a copyright notice on the first page at the bottom of the left column. I have no clue how to do that with CSS.
I'm gonna try and build a proper webpage like a personal blog using this.
I see out-of-the-box latex looks mostly in shorter student reports - although even there, you often get more modern looking styles.
https://thomaspark.co/2015/01/pubcss-formatting-academic-pub...
https://thomaspark.co/projects/pubcss/demo/acm-sig-sample-we...
When I read something written in the style of a medium post I sub-consciously think of the material as being shallow. While reading this type of LaTeX style I would start taking it more seriously. But the texts with most serious look to me are non-formatted pages, like the ones on danluu.com or even plain text posts like this one: http://fmwww.bc.edu/RePEc/bocode/t/transint.html
By the way, this is also why I used serious words like "brain" and "assess" and avoided typos: to make my comment look trustworthy. I had to put a front warning in terms of "wet finger" to lower that a bit though. The Hacker News style and context already make it feel far too scientific already.
For texts like in your link, I automatically expect they are written in the 90s by some very clever person and when I find some that are from the 2000s or later, I think "wow, this is actually new!".
What would be your impression with such a text written in Comic Sans? I would probably be completely lost I think.