This version of the site is now archived. See the next iteration at v4.chriskrycho.com.
Topic: “Javascript”

LaTeX & MathJax Demo

I recently discovered MathJax, a JavaScript library that implements LaTeX equation display. It’s brilliant; we’re now using it in our documentation (it’s bundled with Doxygen) and I plan to make heavy use of it in the future wherever it makes sense. Some samples of its capabilities:

Einstein’s famous equation:

Something a little more complicated (one of the equations implemented in the code I’ve been working on for the last few months):

And now, something more complicated yet (defining the elements in the equation above):

I highly recommend MathJax. I’m currently running it via the MathJax-LaTeX WordPress plugin, which allows you to embed it with handy [​latex]...[​/latex] shortcode syntax.

PSA: Android browser and soft hyphens

The default Android browser does not love soft hyphens (Unicode: U+00AD, HTML: ­ or ­). This means, for anyone using the good old PHP Typography tool or its WordPress plugin equivalent, wp-typography, that you’re in trouble if you have mobile viewership at all. While it’s nice to have a sensible hyphenization algorithm at play – the sort that can prevent widows – it’s a bad idea to be running anything that doesn’t support mobile these days. Read on, intrepid explorer →

Introducing: Typekitify!

Occasionally, I’ll be reading a website and just wish I could use another, better font. I can, of course… I can go look up the element on the page that I want to change, use the developer tools to dynamically alter the page, and go back to my reading. This is a pain in the neck, though, and sometimes I want to use fonts that I don’t necessarily have on my computer – like “Athelas,” the font that Readability uses to display its body text, and which they get using Typekit. Read on, intrepid explorer →

Point of minor hilarity: wherever I type “cookie” for web dev, I want to spell it with an extra e, because that’s how you spell Wookiee.