Lecture Notes Template
An example of a distill-style lecture notes that showcases the main elements.
This theme supports rendering beautiful math in inline and display modes using KaTeX engine.
You just need to surround your math expression with
$ E = mc^2 $.
If you leave it inside a paragraph, it will produce an inline expression, just like $E = mc^2$.
To use display mode, again surround your expression with
$$ and place it as a separate paragraph.
Here is an example:
Alternatively and for more complex math environments, use
<d-math block>...</d-math> tags.
Here is an example:
To add figures, use
Within the tags, define multiple rows of images using
To add captions, use
Here is an example usage of a figure that consists of a row of images with a caption:
Note that the figure uses
class="l-body-outset" which lets it take more horizontal space.
For more on this, see layouts section below.
Also, the size of the images themselves is controlled by
class="three" which corresponds to 1/3, 2/3, 3/3 of the full horizontal space, respectively.
Here is the same example, but each image is captioned separately:
Here is an example that shows how the figures of different sizes are aligned:
Citations are then used in the article body with the
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:
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.
Just wrap the text you would like to show up in a footnote in a
The number of the footnote will be automatically generated.
Syntax highlighting is provided within
An example of inline code snippets:
<d-code language="html">let x = 10;</d-code>.
For larger blocks of code, add a
The main text column is referred to as the body.
It is the assumed layout of any direct descendants of the
For images you want to display a little larger, try
All of these have an outset variant if you want to poke out from the body text a little bit. For instance:
Occasionally you’ll want to use the full browser width.
For this, use
You can also inset the element a little from the edge of the browser by using the inset variant.
The final layout is for marginalia, asides, and footnotes.
It does not interrupt the normal flow of
.l-body sized text except on mobile screen sizes.
In fact, you can write entire blocks of LaTeX using
Below is an example:
Note that you can easily interleave latex blocks with the standard markdown.
Full blocks are supported through LaTeX JS library, which is still under development and supports only limited functionality (which is still pretty cool!) and does not allow fine-grained control of the layout, fonts, etc.
Note: We do not recommend using using LaTeX JS for writing lecture notes at this stage.
Finally, you can easily get a PDF or printed version of the notes by simply hitting
⌘+P on macOS).