Skip to content

Commit

Permalink
Minor fixes of the dark mode + automatic equation numbering (alshediv…
Browse files Browse the repository at this point in the history
…at#160)

* Add an option for showing selected publications

* Improve publication styles

* Update README.md

* Clearfix

* Fix minor issues with dark mode

* Add automatic equation numbering (alshedivat#158)

* Fix a typo
  • Loading branch information
alshedivat authored and siantonelli committed Oct 26, 2024
1 parent 4e4e1dc commit 0557bf9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 0 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ og_image: favicon.svg # The site-wide (default for all links) Open Graph preview
# Open Graph
# -----------------------------------------------------------------------------
# Display links to the page with a preview object on social media.
# To achieve this, change serve_og_meta to true and then provide the URL of the
# preview image as the value of og_image.
serve_og_meta: false # Include Open Graph meta tags in the HTML head
og_image: # The site-wide (default for all links) Open Graph preview image

Expand Down
12 changes: 11 additions & 1 deletion _posts/2015-10-20-math.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ This theme supports rendering beautiful math in inline and display modes using [
To use display mode, again surround your expression with `$$` and place it as a separate paragraph. Here is an example:

$$
\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)
\sum_{k=1}^\infty |\langle x, e_k \rangle|^2 \leq \|x\|^2
$$

You can also use `\begin{equation}...\end{equation}` instead of `$$` for display mode math.
MathJax will automatically number equations:

\begin{equation}
\label{eq:caushy-shwarz}
\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)
\end{equation}

and by adding `\label{...}` inside the equation environment, we can now refer to the equation using `\eqref`.

Note that MathJax 3 is [a major re-write of MathJax](https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html){:target="\_blank"} that brought a significant improvement to the loading and rendering speed, which is now [on par with KaTeX](http://www.intmath.com/cg5/katex-mathjax-comparison.php){:target="\_blank"}.

0 comments on commit 0557bf9

Please sign in to comment.