36c90af395efb0985f7f840005cb1ff9640d9d16 lrnassar Mon Jan 20 09:19:13 2025 -0800 Additional tweaks to the new docs page, more details in the ticket. Refs #30335 diff --git docs/staticPage.lua docs/staticPage.lua index f236cb7..11003e4 100644 --- docs/staticPage.lua +++ docs/staticPage.lua @@ -105,36 +105,48 @@ local buffer = {} local function add(s) table.insert(buffer, s) end -- ucsc changes start -- debugging of meta info: -- print("vars") -- tprint(variables) -- print("meta") -- tprint(metadata) if metadata["title"] then + add("") + add("") + add("") + add("") + add("") + add("") + add("") + add("") add("

" .. metadata["title"] .. "

") else add("

No title defined in document, first line must be % mytitle

") end - add("

Contents

") for i, h in ipairs(headers) do idStr = simplifyId(h) add("
" .. h .. "
") end -- ucsc change end add(body) if #notes > 0 then add('
    ') for _,note in pairs(notes) do add(note) end add('
') end return table.concat(buffer,'\n') .. '\n' @@ -207,33 +219,30 @@ src = escape(src, true) tit = escape(tit, true) s = escape(s, true) end return "" .. s .. "" end function Image(s, src, tit, attr) return "" end -function RawInline(s) - return "" .. escape(s) .. "" -end function Code(s, attr) return "" .. escape(s) .. "" end function InlineMath(s) return "\\(" .. escape(s) .. "\\)" end function DisplayMath(s) return "\\[" .. escape(s) .. "\\]" end function SingleQuoted(s) return "‘" .. s .. "’" @@ -400,30 +409,34 @@ add('') end local class = "even" for _, row in pairs(rows) do class = (class == "even" and "odd") or "even" add('') for i,c in pairs(row) do add('' .. c .. '') end add('') end add('" .. escape(s) .. "" +end + function RawBlock(format, str) if format == "html" then return str else return '' end end function Div(s, attr) return "\n" .. s .. "" end -- The following code will produce runtime warnings when you haven't defined -- all of the functions you need for the custom writer, so it's useful -- to include when you're working on a writer.