A distill-style blog post

an example of a distill-style blog post and main elements

Equations

This theme supports rendering beautiful math in inline and display modes using MathJax 3 engine. You just need to surround your math expression with $$, like $$ E = mc^2 $$. If you leave it inside a paragraph, it will produce an inline expression, just like E=mc2.

In fact, you can also use a single dollar sign $ to create inline formulas, such as $ E = mc^2 $, which will render as E=mc2. This approach provides the same effect during TeX-based compilation, but visually it appears slightly less bold compared to double-dollar signs $$, making it blend more naturally with surrounding text.

To use display mode, again surround your expression with $$ and place it as a separate paragraph. Here is an example:

(k=1nakbk)2(k=1nak2)(k=1nbk2)

Note that MathJax 3 is a major re-write of MathJax that brought a significant improvement to the loading and rendering speed, which is now on par with KaTeX.


Citations

Citations are then used in the article body with the <d-cite> tag. The key attribute is a reference to the id provided in the bibliography. The key attribute can take multiple ids, separated by commas.

The citation is presented inline like this: (a number that displays more information on hover). If you have an appendix, a bibliography is automatically created and populated in it.

Distill chose a numerical inline citation style to improve readability of citation dense articles and because many of the benefits of longer citations are obviated by displaying more information on hover. However, we consider it good style to mention author last names if you discuss something at length and it fits into the flow well — the authors are human and it’s nice for them to have the community associate them with their work.


Footnotes

Just wrap the text you would like to show up in a footnote in a <d-footnote> tag. The number of the footnote will be automatically generated.This will become a hoverable footnote.


Image

You can add images.

A simple, elegant caption looks good between image rows, after each row, or doesn't have to be there at all.

Images can be made zoomable. Simply add data-zoomable to <img> tags that you want to make zoomable.

The rest of the images in this post are all zoomable, arranged into different mini-galleries.

Code Blocks

Syntax highlighting is provided within <d-code> tags. An example of inline code snippets: <d-code language="html">let x = 10;</d-code>. For larger blocks of code, add a block attribute:

var x = 25; function(x) { return x * x; }

Note: <d-code> blocks do not look good in the dark mode. You can instead use the standard Jekyll syntax highlight with the highlight liquid tag.

var x = 25;
function(x) {
return x \* x;
}

You can also write standard Markdown code blocks in triple ticks with a language tag, for instance:

def foo(x):
  return x

Footnotes

  1. This will become a hoverable footnote.[↩]

References

  1. DRAW: A recurrent neural network for image generation[PDF]
    Gregor, K., Danihelka, I., Graves, A., Rezende, D.J. and Wierstra, D., 2015. arXiv preprint, arXiv:1502.04623.