Using CSS to make the Markdown to HTML output mimics the Markdown to LaTeX output.
See demo in https://ickc.github.io/markdown-latex-css/.
The followings are put in _sass/
:
amsthm
: See ickc/pandoc-amsthmlist
: Replicated the different type of styles in different levels of a nested list in LaTeX.1heading
and toc
:table
: Adapted from MultiMarkdown Composer 3 with slight modification.system-fonts
: a tiny font css setting the main font as "Gill Sans" and code font as "Consolas", with multiple fallback including Chinese fonts.system-fonts-lmodern
: Expect "Latin Modern Roman" and "Latin Modern Mono" exists in system fonts. Otherwise, see Fonts (Latin Modern).mmdc
: make it looks closer to MultiMarkdown Composer 3's output CSS with minor modification.A combined css including the related one in the next section is in css/.
A font.css
is given in fonts/fonts.css which loads web fonts rather than system fonts.
It loads the Latin Modern Roman as the main fonts and Latin Modern Mono as the code font. The font is chosen to make it looks as close to the LaTeX's as possible. A couple of fallback fonts as well as some Chinese system fonts are added for compatibility.
They are not included in the combined css mentioned above, since it is huge. If you need to load it, load it after the combined css.
/css-marked2/
are extracted from Marked2. The license of each individual CSS are in the files itself./css-marked2-preview/
contains previews of some of the cssThere's 2 JS setup in /js/
as well:
setup-mathjax-cdn.html
: setup MathJaxload-mathjax-cdn.html
: load MathJax itself. It should be included after the setup-mathjax-cdn
._list.scss
supports different styles in different levels (up to 6 levels) of a nested list.
_list.scss
provides the same styling as the LaTeX output. 2 more styling is given in level 5 & 6, but are unrelated to LaTeX's styling.