deepayan / deepayan.github.io

Github page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a repository for generally useful stuff, such as slides for various R-related talks, course notes, etc.

Useful resources for making pages using jekyll:

NOTE: Linking to R Markdown files is basically impossible, because Jekyll will insist on processing anything that has a YAML header (they can be completely excluded from the site, but not left alone as-it-is). So, link explicitly to the repository links on Github.

Using math: This is a bit irritating because for some reason,

  • Github does not allow disabling of math processing in kramdown (some config options are forcefully overridden as explained in https://help.github.com/en/github/working-with-github-pages/about-github-pages-and-jekyll, and math_engine is among them)

  • Kramdown only uses $$ as math delimiter (both inline and display)

  • This is a bit silly to begin with (as the same input would not work with LaTeX), and basically just wraps the content around something like <script type="math/tex">, which works (if MathJax.js is included) as a side-effect of how MathJax 2 was implemented. This doesn't work with MathJax 3, unless the config includes a workaround script to explicitly recognize these tags.

  • A way to avoid this is to just use $ for inline and \[ for display mode math, because kramdown leaves them alone even with math_engine: mathjax, and then MathJax 3 happily renders them properly when configured to recognize $ as a delimiter.

  • Unfortunately, pandoc doesn't recognize \[ (and does not have an option to leave math code alone (default is to use HTML tags and Unicode).

In summary, to write markdown that works with both pandoc and kramdown, the only options seems to be to use $$, which is converted to script tags by kramdown, and then have them recognized by MathJax 3 using config settings.

About

Github page


Languages

Language:HTML 65.5%Language:JavaScript 18.4%Language:R 12.9%Language:CSS 2.5%Language:Makefile 0.5%Language:Shell 0.1%Language:C 0.1%Language:C++ 0.0%