News for hackers. Stuff that matters.
Re:KaTeX – Fast math typesetting library for the web by bfirsh on Sunday March 24, 2019 @07:39AM (#19475760)
We tried using KaTeX for https://www.arxiv-vanity.com but unfortunately it doesn’t support a lot of commonly used stuff. I forget what most of that was now... over/underbrace is one I recall.

In the end we used MathJax pre-rendered on the server, which is the same speed as pre-rendered KaTeX: https://github.com/mathjax/MathJax-node

We’ve also done lots of tweaking to make it support as much stuff on the arXiv as possible. Our MathJax config is a fun read: https://github.com/arxiv-vanity/engrafo/blob/master/src/conv...

Re:KaTeX – Fast math typesetting library for the web by NotOscarWilde on Sunday March 24, 2019 @10:32AM (#19476541)
I like the idea of arXiv vanity, but ... I decided to try it on my own paper from a few years back and the page just tells me that the render failed, no details given, and either click the PDF or "go back home".

I am of the opinion that scientists (the most likely users of this tool) should be treated with a bit more respect -- maybe provide technical details and/or a place where they can submit a report?

I have opened a Github Issue about the UI being too brief: https://github.com/arxiv-vanity/arxiv-vanity/issues/381 . Additionally, if there is any place I can submit a bugreport/query on my own paper failing, I would love to know.

---

As any true scientist (understand: self-absorbed), I can only recommend it once my own papers are rendering. :-)

Re:KaTeX – Fast math typesetting library for the web by bfirsh on Sunday March 24, 2019 @01:04PM (#19477396)
Ah - yes, I agree. We did have a link to show you how to set up a development environment when it broke. I’ll add that back.

What are your papers? Maybe it’s an easy fix. :)

Re:KaTeX – Fast math typesetting library for the web by est31 on Sunday March 24, 2019 @11:21AM (#19476827)
Wow, TIL about arxiv-vanity. On a first glance, it's awesome. Not saying that I particularly dislike PDF files, but it's still good to have choice. Already the ability to extract images from PDF files is incredibly valuable to me. I wasn't aware how to do it properly. Screenshots are limited at the display size and when you are zooming you don't know when upsampling algos of the PDF reader set in and PDF readers often have maximum zoom levels and if the actual resolution of the image is above that, you still won't get the full resolution. Now I can extract images at the full resolution via browser tools... I hope it's actually the full resolution, isn't it? It's kinda not what arxiv vanity was made for but still, thank you for that!
Re:KaTeX – Fast math typesetting library for the web by bfirsh on Sunday March 24, 2019 @01:17PM (#19477475)
Bitmapped images should be full size. Extracting proper vector graphics is a work in progress: https://github.com/arxiv-vanity/engrafo/issues/247

If you want to extract figures/images from PDFs, the best way to do it is to use Adobe Illustrator (or equivalent... Inkscape maybe?). That’ll let you extract full sized bitmapped graphics or arbitrary parts of the PDF as SVG vector images.

Re:KaTeX – Fast math typesetting library for the web by jraph on Sunday March 24, 2019 @06:21PM (#19479115)
With Evince, you can right click on an image -> "save image as" in a PDF.
Re:KaTeX – Fast math typesetting library for the web by williamstein on Sunday March 24, 2019 @01:28PM (#19477533)
We use KaTeX for https://cocalc.com (source here https://github.com/sagemathinc/cocalc) because it is dramatically faster than MathJax. When KaTeX fails due to an error (e.g., something missing) our code falls back to MathJax, so we still get full MathJax support when needed, but with all the benefits of KaTeX. The code that John Jeng and I wrote to do this is tangled up with the rest of cocalc's code; I hope somebody else writes a standalone library that accomplishes that same thing. It wasn't too difficult to write this, though a couple of subtle issues arose in production, which we had to sort out.
Re:KaTeX – Fast math typesetting library for the web by boazbarak on Sunday March 24, 2019 @08:29PM (#19479542)
Arxiv vanity is very nice! FWIW I believe KaTeX’s coverage is always growing. I found out it can do everything I wanted in https://introtcs.org , though there were a couple of times I had to reformulate some macros after looking at the documentation.
Re:KaTeX – Fast math typesetting library for the web by vortico on Sunday March 24, 2019 @12:51PM (#19477313)
For rendering arbitrary arxiv papers, that's understandable, but KaTeX supports enough features to be no issue for 99% of applications. Although, I've noticed that MathJax is much more "modern" and faster than it was 4 years ago. It feels almost as buttery as rendering KaTeX now.
Re:KaTeX – Fast math typesetting library for the web by bfirsh on Sunday March 24, 2019 @01:05PM (#19477401)
Also worth noting MathJax 3 is a thing, which is going to be even more modern and faster.

https://www.mathjax.org/MathJax-v3-beta.3/

Re:KaTeX – Fast math typesetting library for the web by smueller1234 on Sunday March 24, 2019 @09:09AM (#19476127)
Thank you for arxiv-vanity! An amazingly clever and amazingly useful tool!
Re:KaTeX – Fast math typesetting library for the web by bhl on Sunday March 24, 2019 @04:03PM (#19478448)
How does arxiv-vanity render LaTeX formulas without the original source? I’m wondering if it’s possible to convert some pdf class notes to html.
Re:KaTeX – Fast math typesetting library for the web by dbaupp on Sunday March 24, 2019 @04:23PM (#19478541)
It seems to download the original source files, not PDFs, as described in https://arxiv.org/help/mimetypes
Re:KaTeX – Fast math typesetting library for the web by Myrmornis on Sunday March 24, 2019 @01:16PM (#19477473)
> arXiv Vanity renders academic papers from arXiv as responsive web pages so you don’t have to squint at a PDF.

Would it be helpful / appropriate to add "when using your phone" to the end of the tagline?

Re:KaTeX – Fast math typesetting library for the web by edflsafoiewq on Monday March 25, 2019 @10:44AM (#19482820)
over/underbrace currently work in KaTeX.
Re:KaTeX – Fast math typesetting library for the web by fori1to10 on Sunday March 24, 2019 @02:10PM (#19477760)
arxiv-vanity is very nice