Advanced examples of notation

MathJax

You can enable MathJax by setting latex: true on a page or globally in the _config.yml. Some examples:

Euler’s formula relates the complex exponential function to the trigonometric functions.

eiθ=cos(θ)+isin(θ)e^{i\theta}=\cos(\theta)+i\sin(\theta)

The Euler-Lagrange differential equation is the fundamental equation of calculus of variations.

ddt(Lq˙)=Lq\frac{\mathrm{d}}{\mathrm{d}t} \left ( \frac{\partial L}{\partial \dot{q}} \right ) = \frac{\partial L}{\partial q}

The Schrödinger equation describes how the quantum state of a quantum system changes with time.

itΨ(r,t)=[22μ2+V(r,t)]Ψ(r,t)i\hbar\frac{\partial}{\partial t} \Psi(\mathbf{r},t) = \left [ \frac{-\hbar^2}{2\mu}\nabla^2 + V(\mathbf{r},t)\right ] \Psi(\mathbf{r},t)

Code

Embed code by putting {% highlight language %} {% endhighlight %} blocks around it.

static void asyncEnabled(Dict* args, void* vAdmin, String* txid, struct Allocator* requestAlloc)
{
    struct Admin* admin = Identity_check((struct Admin*) vAdmin);
    int64_t enabled = admin->asyncEnabled;
    Dict d = Dict_CONST(String_CONST("asyncEnabled"), Int_OBJ(enabled), NULL);
    Admin_sendMessage(&d, txid, admin);
}

Gists (WARNING: this method is not currently javascript free)

With the jekyll-gist plugin, which is preinstalled on Github Pages, you can embed gists simply by using the gist command:

<script src="https://gist.github.com/5555251.js?file=gist.md"></script>

Images

Upload an image to the assets folder and embed it with ![title](/assets/name.jpg)). Keep in mind that the path needs to be adjusted if Jekyll is run inside a subfolder.

The .large wrapper can be used to increase the width of an image or iframe.

Flower

Flower by Tj Holowaychuk

Swiss Alps

Swiss Alps by René Reichelt

Embedded content

You can also embed a lot of stuff, for example from YouTube, using the embed.html include.

<div class="large">
<div style="position: relative; margin: 1.5em 0; padding-bottom: 56.25%;">
  <iframe style="position: absolute;" src="https://www.youtube.com/embed/_C0A5zX-iqM" 
  	allow="autoplay; encrypted-media"
  	width="100%"
  	height="100%"
  	frameborder="1"
  	allowfullscreen>
  </iframe>
</div>

</div>