Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/verso-manual/VersoManual/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ instance : TeX.GenreTeX Manual (ReaderT ExtensionImpls IO) where
| panic! s!"Unknown block {b.name} while rendering.\n\nKnown blocks: {(← readThe ExtensionImpls).blockDescrs.toArray |>.map (·.fst) |>.qsort (·.toString < ·.toString)}"
let some impl := descr.toTeX
| TeX.logError s!"Block {b.name} doesn't support TeX"
return .empty
return \TeX{\textcolor{"red"}{s!"Missing toTeX for Block {b.name}"}}
impl goI goB id b.data content
inline go i content := do
let some id := i.id
Expand All @@ -1281,7 +1281,7 @@ instance : TeX.GenreTeX Manual (ReaderT ExtensionImpls IO) where
| panic! s!"Unknown inline {i.name} while rendering.\n\nKnown inlines: {(← readThe ExtensionImpls).inlineDescrs.toArray |>.map (·.fst) |>.qsort (·.toString < ·.toString)}"
let some impl := descr.toTeX
| TeX.logError s!"Inline {i.name} doesn't support TeX"
return .empty
return \TeX{\textcolor{"red"}{s!"Missing toTeX for Inline {i.name}"}}
impl go id i.data content


Expand Down
3 changes: 2 additions & 1 deletion src/verso/Verso/Doc/TeX.lean
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def logError [Monad m] (message : String) : TeXT g m Unit := do
def header [Monad m] (name : TeX) : TeXT g m TeX := do
let opts ← options
let some i := opts.headerLevel
| logError s!"No more header nesting available at {name.asString}"; return \TeX{\textbf{\Lean{name}}}
| logError s!"No more header nesting available at {name.asString}"
return \TeX{\textcolor{"red"}{s!"Header nesting limit reached at {name.asString}"}}
let header := opts.headerLevels[i]
pure <| .raw (s!"\\{header}" ++ "{") ++ name ++ .raw "}"

Expand Down