diff --git a/content/multipledataset.html b/content/multipledataset.html
index 04c05016..e22ff85c 100644
--- a/content/multipledataset.html
+++ b/content/multipledataset.html
@@ -38,7 +38,7 @@ draft: false
$("input[type='number'].range").trigger("change")
adjustSticky();
$(window).resize(adjustSticky)
- const LatexInline = ['\\(', '\\)']
+
var slist = $("#SelectList")
getAllSelect().each(function () {
$("
").text($('label[for="' + $(this).attr('id') + '"]').text()).appendTo(slist)
@@ -79,7 +79,7 @@ draft: false
for (const [name, value] of excitationTypes.All) {
var txt = value.description.string
if (value.description.isLaTeX) {
- txt = LatexInline[0] + txt + LatexInline[1]
+ txt = MathJaxUtils.getMathJaxString(txt)
}
$("").text(txt).appendTo(extl)
var cbli = $("")
@@ -385,7 +385,6 @@ draft: false
}
doiCache.clear()
processingIndicator.isActive = true
- const LatexInline = ['\\(', '\\)']
window.filtData = window.dats
$('#form_dat > fieldset > div > select').each(function () {
const prop = $(this).attr("name")
@@ -518,7 +517,7 @@ draft: false
if (ex[2].description.string) {
desctex = "(" + ex[2].description.string + ")"
}
- $(" | ", { scope: "rowgroup" }).text(String.raw`${LatexInline[0]}${ex[0].toLaTeX()} \rightarrow ${ex[1].toLaTeX()} ${Vertkindtext} ${desctex} ${LatexInline[1]}`).appendTo(tr)
+ $(" | ", { scope: "rowgroup" }).text(MathJaxUtils.getMathJaxString(String.raw`${ex[0].toLaTeX()} \rightarrow ${ex[1].toLaTeX()} ${Vertkindtext} ${desctex}`)).appendTo(tr)
var entries = Array.from(exdat.entries())
for (const method of sortedMethods) {
td = $(" | ").addClass("NumberCell")
diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html
index 5935e8b0..d9c38789 100644
--- a/layouts/partials/head_custom.html
+++ b/layouts/partials/head_custom.html
@@ -3,6 +3,8 @@
+
+
diff --git a/static/js/MathJaxUtils.js b/static/js/MathJaxUtils.js
new file mode 100644
index 00000000..110f2a13
--- /dev/null
+++ b/static/js/MathJaxUtils.js
@@ -0,0 +1,11 @@
+class MathJaxUtils {
+ static get start(){
+ return '\\('
+ }
+ static get end(){
+ return '\\)'
+ }
+ static getMathJaxString(string){
+ return MathJaxUtils.start+string+MathJaxUtils.end
+ }
+}
\ No newline at end of file
diff --git a/static/js/mathjax-config.js b/static/js/mathjax-config.js
new file mode 100644
index 00000000..0e2f5e99
--- /dev/null
+++ b/static/js/mathjax-config.js
@@ -0,0 +1,5 @@
+MathJax = {
+ tex: {
+ inlineMath: [[MathJaxUtils.start, MathJaxUtils.end]]
+ },
+};
\ No newline at end of file