-
Notifications
You must be signed in to change notification settings - Fork 922
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "UG LaTeX: typesetting of formulae using standard syntax (#1858)…
…" (#2190)
- Loading branch information
Showing
5 changed files
with
83 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
{{ $needKaTeX := or .Params.math .Site.Params.katex.enable .Params.chem .Site.Params.chem (.Page.Store.Get "hasKaTeX") (.Page.Store.Get "hasmhchem") -}} | ||
{{ $needmhchem := or .Params.chem .Site.Params.katex.mhchem.enable (.Page.Store.Get "hasmhchem") -}} | ||
{{ $needKaTeX := or .Site.Params.katex.enable .Params.math .Params.chem -}} | ||
{{ $needmhchem := or .Site.Params.katex.mhchem.enable .Params.chem -}} | ||
{{ if ge hugo.Version "0.93.0" -}} | ||
{{ $needKaTeX = or $needKaTeX (.Page.Store.Get "hasKaTeX") (.Page.Store.Get "hasmhchem") -}} | ||
{{ $needmhchem = or $needmhchem (.Page.Store.Get "hasmhchem") -}} | ||
{{ else -}} | ||
{{ if or $needKaTeX $needmhchem -}} | ||
{{ warnf "Outdated Hugo version %s, consider upgrading to make full use of all theme features" hugo.Version }} | ||
{{ end -}} | ||
{{ end -}} | ||
|
||
{{ if .Site.Params.markmap.enable -}} | ||
<style> | ||
|
@@ -26,8 +34,27 @@ | |
<script src='{{ "js/deflate.js" | relURL }}'></script> | ||
{{ end -}} | ||
|
||
{{ if $needKaTeX -}} | ||
{{ partial "scripts/katex.html" (dict "mhchem" $needmhchem) -}} | ||
{{ if $needKaTeX -}} | ||
{{/* load stylesheet and scripts for KaTeX support */ -}} | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" | ||
integrity="sha512-6a/jH+OTfV56Vs9Mm+Kl7ZsXWJRM2+EV+JDrW7HLHaf4OU2+9eLkHKFbzpSSbfJ5b60m+7/tQAevrzu7NP7Q2g==" crossorigin="anonymous"> | ||
{{/* The loading of KaTeX is deferred to speed up page rendering */ -}} | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" | ||
integrity="sha512-FkmlbBiAj8fgfoZ8zJ+bZQCU5pdU55irXmJzFF/mXlSvBr2x/gmyLHaRu5iSpcA5Hw6CMLCCFSjB1GmgtNL2Qg==" | ||
crossorigin="anonymous"> | ||
</script> | ||
{{ if $needmhchem -}} | ||
{{/* To add support for displaying chemical equations and physical units, load the mhchem extension: */ -}} | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/mhchem.min.js" | ||
integrity="sha512-Cl4bz7Rt9ppgcBOQa4z96q3UqAzHgBzNDm66u2+lDe0ZJQu0Fgz+6jO57E+IZqzlhGzfNBY++pg7Ue+iopaLrg==" | ||
crossorigin="anonymous"> | ||
</script> | ||
{{ end -}} | ||
{{/* To automatically render math in text elements, include the auto-render extension: */ -}} | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" | ||
integrity="sha512-6bKDPShiPRjAcdeO8T6cedaVEi0pavPbzue/G/ZRiwVlurWZOSZ/vI9fr2lhk8IPXK7z51AZac+zBvZzgDJzDQ==" crossorigin="anonymous" | ||
{{ printf "onload='renderMathInElement(%s, %s);'" (( $.Page.Site.Params.katex.html_dom_element | default "document.body" ) | safeJS ) ( printf "%s" ( $.Page.Site.Params.katex.options | jsonify )) | safeHTMLAttr }}> | ||
</script> | ||
{{ end -}} | ||
|
||
{{ $jsBs := resources.Get "vendor/bootstrap/dist/js/bootstrap.bundle.js" -}} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.