mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-11-16 21:36:56 +01:00
Merge pull request #31 from slashformotion/slashformotion/issue29
Fix choice katex/mathjax switch
This commit is contained in:
commit
7a180ddead
6 changed files with 5 additions and 20 deletions
|
@ -13,7 +13,7 @@ title = "Hugo-tufte Theme Example Site"
|
|||
math = true
|
||||
# (If math is enabled)
|
||||
## if "katex" is set to true katex will be used to render LaTex, if not MathJax will be used instead
|
||||
katex = false
|
||||
katex = true
|
||||
|
||||
[params]
|
||||
# Subtitle of the website
|
||||
|
|
1
exampleSite/static/css/hugo-tufte-override.css
Normal file
1
exampleSite/static/css/hugo-tufte-override.css
Normal file
|
@ -0,0 +1 @@
|
|||
/* Nothing here yet, (This file is waiting your customizations) */
|
|
@ -1,2 +0,0 @@
|
|||
This file is the last hugo-tufte related css file
|
||||
loaded by the theme, and so personal customization can go here.
|
|
@ -15,8 +15,6 @@
|
|||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.css">
|
||||
|
||||
<script defer src="{{ "/js/main.js" | relURL }}"></script>
|
||||
|
||||
{{ $htoptions := (dict "targetPath" "/css/hugo-tufte.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $htstyle := resources.Get "scss/hugo-tufte.scss"| resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS $htoptions }}
|
||||
<link rel="stylesheet" href="{{ $htstyle.Permalink | relURL }}">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js"></script>
|
||||
<script>
|
||||
<script defer>
|
||||
renderMathInElement(
|
||||
document.body,
|
||||
{
|
||||
|
@ -19,7 +19,7 @@
|
|||
{{ else }}
|
||||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
<script>
|
||||
<script defer>
|
||||
window.MathJax = {
|
||||
tex: {
|
||||
inlineMath: [['$', '$'], ['\\(', '\\)']]
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
renderMathInElement(
|
||||
document.body,
|
||||
{
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "\\[", right: "\\]", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false }
|
||||
],
|
||||
displayMode: true
|
||||
}
|
||||
);
|
Loading…
Reference in a new issue