aboutsummaryrefslogtreecommitdiff
path: root/data/templates/default.html5
diff options
context:
space:
mode:
authorKolen Cheung <[email protected]>2022-01-13 20:31:32 -0800
committerGitHub <[email protected]>2022-01-13 20:31:32 -0800
commited2ab2e2b0eada8e4c4728f23adf96d55eba8172 (patch)
tree182c66e8ee08dc8cb8ef25a1ce758ed921ac7d35 /data/templates/default.html5
parent0d1ba3dce33b8d5d30d7cf8febfa8ea3060b5dfd (diff)
HTML template: load header-includes before math (#7833)
MathJax expect the config comes before loading the MathJax script. This change of order allows one to config MathJax via header-includes, which loads before the MathJax script. This potentially is a breaking change. However, the only kind math supported by pandoc that is configurable seems to be katex, and according to src/Text/Pandoc/Writers/HTML.hs the way it is configured is hard-coded (katex doesn't seem to offer MathJax style config that is independent of loading katex.) So it seems it is safe to change this order without breaking others' documents. c.f. #2750
Diffstat (limited to 'data/templates/default.html5')
-rw-r--r--data/templates/default.html56
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/default.html5 b/data/templates/default.html5
index 5242f797f..dda7e8cb0 100644
--- a/data/templates/default.html5
+++ b/data/templates/default.html5
@@ -23,15 +23,15 @@ $endif$
$for(css)$
<link rel="stylesheet" href="$css$" />
$endfor$
+$for(header-includes)$
+ $header-includes$
+$endfor$
$if(math)$
$math$
$endif$
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
-$for(header-includes)$
- $header-includes$
-$endfor$
</head>
<body>
$for(include-before)$