I was fiddling around with Verso by getting it to generate a simple website. One page is generated with the following:
importVersoBlogopenVersoGenreBlog#doc(Page)"A Test Site"=>Thisisatestpage$$x^2=y^2$$
but this shows up as image.png
Single dollar signs have a similar problem. How can I get math mode to be displayed properly?
I downloaded the Verso documentation as a html bundle, and it says this about math mode: image.png
so presumably the Verso manual itself has the same problem.
<!DOCTYPE html><html><head><metacharset="UTF-8"><title>A Test Site — Verso </title><linkrel="stylesheet"href="static/style.css"><script>document.addEventListener("DOMContentLoaded",()=>{for(constmofdocument.querySelectorAll(".math.inline")){katex.render(m.textContent,m,{throwOnError:false,displayMode:false});}for(constmofdocument.querySelectorAll(".math.display")){katex.render(m.textContent,m,{throwOnError:false,displayMode:true});}});</script><linkrel="stylesheet"href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css"integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV"crossorigin="anonymous"><scriptdefer="defer"src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8"crossorigin="anonymous"></script><scriptsrc="https://cdn.jsdelivr.net/npm/marked@11.1.1/marked.min.js"integrity="sha384-zbcZAIxlvJtNE3Dp5nxLXdXtXyxwOdnILY1TDPVmKFhl4r4nSUG1r8bcFXGVa4Te"crossorigin="anonymous"></script></head><body><header><divclass="inner-wrap"><aclass="logo"href=""><imgsrc="static/logo.png"></a><navclass="top"role="navigation"><ol></ol></nav></div></header><divclass="main"role="main"><divclass="wrap"><divclass="frontpage"><h1>
A Test Site</h1><p>
This is a test page
$$x^2 = y^2$$
</p></div></div></div></body></html>
And here's the main file in which the blog is defined (it was copied from one of the Verso examples):
Header
importDoc.FrontimportVersoBlogopenVersoGenreBlogSiteSyntaxopenOutputHtmlTemplateThemeindeftheme:Theme:={Theme.defaultwithprimaryTemplate:=doletpostList:=match(←param?"posts")with|none=>Html.empty|somehtml=>{{<h2>"Posts"</h2>}}++htmlletcatList:=match(←param?(α:=Post.Categories)"categories")with|none=>Html.empty|some⟨cats⟩=>{{<divclass="category-directory"><h2>"Categories"</h2><ul>{{cats.mapfun(target,cat)=>{{<li><ahref={{target}}>{{Post.Category.namecat}}</a></li>}}}}</ul></div>}}return{{<html><head><metacharset="UTF-8"/><title>{{(←param(α:=String)"title")}}" — Verso "</title><linkrel="stylesheet"href="/static/style.css"/>{{←builtinHeader}}</head><body><header><divclass="inner-wrap"><aclass="logo"href="/"><imgsrc="/static/logo.png"/></a>{{←topNav}}</div></header><divclass="main"role="main"><divclass="wrap">{{(←param"content")}}{{postList}}{{catList}}</div></div></body></html>}}}|>.override#[]⟨doreturn{{<divclass="frontpage"><h1>{{←param"title"}}</h1>{{←param"content"}}</div>}},id⟩defmySite:Site:=siteDoc.Front/static"static"←"doc/static_files"defmain:ListString→IOUInt32:=blogMainthememySite
so it seems that adding the dollar signs does result in jsdelivr.net scripts being loaded in.
As a side question: If Verso-generated websites load in external scripts from jsdelivr.net, does this mean that if jsdelivr.net goes down, the documentation stops working? And what if someone downloads the HTML website locally and then later opens it without an internet connection?
As a side question: If Verso-generated websites load in external scripts from jsdelivr.net, does this mean that if jsdelivr.net goes down, the documentation stops working? And what if someone downloads the HTML website locally and then later opens it without an internet connection?
jsdelivr surely requests aggressive client-side caching, so there is a good chance your browser uses a previously downloaded version if you already have one.
Ohh, I guess I didn't read the syntax close enough and just assumed that latex's syntax would work. Now my code works. It still doesn't explain why the Verso manual has broken formatting, but that's not super important right now.