Equations
Instances For
Equations
- DocGen4.Output.basePath buildDir = buildDir / { toString := DocGen4.Output.basePathComponent }
Instances For
Equations
- DocGen4.Output.srcBasePath buildDir = DocGen4.Output.basePath buildDir / { toString := "src" }
Instances For
Equations
- DocGen4.Output.declarationsBasePath buildDir = buildDir / { toString := "doc-data" }
Instances For
The structure representing a processed bibitem.
- citekey : String
The cite key as in the bib file.
- tag : String
The tag generated by bib processor, e.g.
[Doe12]. Should be plain text and should not be escaped. - html : String
The HTML generated by bib processor, e.g.
John Doe. <i>Test</i>. 2012. - plaintext : String
The plain text form of
htmlfield. Should not be escaped.
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
The structure representing a backref item.
- citekey : String
The cite key as in the bib file.
- modName : Lean.Name
The name of the module.
- funName : String
The name of the function, as a string. It is empty if the backref is in modstring.
- index : Nat
The index of the backref in that module, starting from zero.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
The context used in the BaseHtmlM monad for HTML templating.
- buildDir : System.FilePath
The build directory (provided by lake).
- hierarchy : Hierarchy
The module hierarchy as a tree structure.
- depthToRoot : Nat
How far away we are from the page root, used for relative links to the root.
The name of the current module if there is one, there exist a few pages that don't have a module name.
The list of references, as an array.
Instances For
Declaration decorator function type: given a module name, declaration name, and declaration kind, returns optional extra HTML to inject into the declaration's rendering. This enables external tools to add badges, links, or other decorations to declarations.
Equations
Instances For
The default declaration decorator that produces no extra HTML.
Equations
- DocGen4.Output.defaultDeclarationDecorator x✝² x✝¹ x✝ = #[]
Instances For
The read-only context used in the HtmlM monad for HTML templating.
- result : Process.AnalyzerResult
The full analysis result from the Process module.
- sourceLinker : Lean.Name → Option Lean.DeclarationRange → String
A function to link declaration names to their source URLs, usually Github ones.
- refsMap : Std.HashMap String BibItem
The references as a map.
- declarationDecorator : DeclarationDecoratorFn
A function to decorate declarations with extra HTML (e.g., verification badges). Receives (moduleName, declarationName, declarationKind) and returns extra HTML. Defaults to producing no extra HTML.
Instances For
The writable state used in the HtmlM monad for HTML templating.
- backrefs : Array BackrefItem
The list of back references, as an array.
- errors : String
The errors occurred during the process.
Instances For
Equations
- DocGen4.Output.setCurrentName name ctx = { buildDir := ctx.buildDir, hierarchy := ctx.hierarchy, depthToRoot := ctx.depthToRoot, currentName := some name, refs := ctx.refs }
Instances For
Instances For
Instances For
Equations
Instances For
Equations
Instances For
Equations
- x.run state ctx baseCtx = ReaderT.run ((StateT.run x state).run ctx) baseCtx
Instances For
Equations
- x.run state ctx baseCtx = (ReaderT.run ((StateT.run x state).run ctx) baseCtx).run
Instances For
Add an error message to errors of current document.
Equations
- DocGen4.Output.addError err = modify fun (cfg : DocGen4.Output.SiteState) => { backrefs := cfg.backrefs, errors := cfg.errors ++ err ++ "\n" }
Instances For
Obtains the root URL as a relative one to the current depth.
Equations
Instances For
Equations
- DocGen4.Output.getRoot.go 0 = "./"
- DocGen4.Output.getRoot.go n'.succ = "../" ++ DocGen4.Output.getRoot.go n'
Instances For
Equations
- DocGen4.Output.getHierarchy = do let __do_lift ← read pure __do_lift.hierarchy
Instances For
Equations
- DocGen4.Output.getCurrentName = do let __do_lift ← read pure __do_lift.currentName
Instances For
Equations
- DocGen4.Output.getResult = do let __do_lift ← read pure __do_lift.result
Instances For
Equations
- DocGen4.Output.getSourceUrl module range = do let __do_lift ← read pure (__do_lift.sourceLinker module range)
Instances For
Equations
- DocGen4.Output.getDeclarationDecorator = do let __do_lift ← read pure __do_lift.declarationDecorator
Instances For
If a template is meant to be extended because it for example only provides the header but no real content this is the way to fill the template with content. This is untyped so HtmlM and BaseHtmlM can be mixed.
Equations
- DocGen4.Output.templateExtends base new = new >>= base
Instances For
Equations
- DocGen4.Output.templateLiftExtends base new = new >>= monadLift ∘ base
Instances For
Returns the doc-gen4 link to a module name.
If n is a locally-documented module (present in the site Hierarchy), the
result is a relative path to that module's generated HTML. Otherwise — i.e.
the module belongs to an external library that doc-gen4 did not analyze — the
result is a link to the corresponding page on the external documentation site
(see DocGen4.Output.External).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the HTML doc-gen4 link to a module name.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the path to the HTML file that contains information about a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The following section contains all the statically included files that are used in documentation generation, notably JS and CSS ones.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the doc-gen4 link to a declaration name.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the HTML doc-gen4 link to a declaration name.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns a name splitted into parts. Together with "break_within" CSS class this helps browser to break a name nicely.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the HTML doc-gen4 link to a declaration name with "break_within" set as class.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Converts RenderedCode to HTML with declaration links.
Returns (hasAnchor, html) where hasAnchor indicates if the result contains an <a> tag. This is
tracked to avoid creating nested anchors (which is invalid HTML).
For .const name tags, it first checks whether the name is a valid link target (that is, a
non-private name in name2ModIdx). If so, it links directly to that name. If not, it applies
Lean.privateToUserName? to convert internal private names to user-facing names (e.g.,
_private.Init.Prelude.0.Foo.helper → Foo.helper) and then tries:
- Auxiliary name removal (
findLinkableParent): Strip trailing components that start with_or are numeric (e.g.,Foo.bar._proof_2→Foo.bar). This handles auto-generated auxiliary names like match discriminant functions (Foo.bar.match_1→Foo.bar). - Module link: For private names where no declaration was found, extract the module name from
the private prefix and link to the module page (e.g.,
_private.Init.Prelude.0.Foo→ moduleInit.Prelude).moduleNameToLinkitself decides local-vs-external. - External fallback: Emit
<a href={externalDeclLink nameToSearch}>— the external Mathlibfindredirect resolves the owning module client-side. The user-facing name (postprivateToUserName?) is used so private internal names are not leaked into the URL. SeeDocGen4.Output.Externalfor the URL form, anddocs/dev/design/external-linking.mdfor the rationale.
Convert RenderedCode to HTML with declaration links.
Equations
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.