writeHtml

fun ReportNode.Document.writeHtml(path: Path? = null, ctx: RenderContext? = null, cssPath: Path? = null, css: String? = null): File(source)

Renders this document to an HTML file and returns the written File.

CSS selection (evaluated in priority order):

  1. cssPath non-null → <link rel="stylesheet" href="..."> is emitted; no inline <style> block

  2. css non-null → the supplied string is inlined in a <style> block

  3. Both null (default) → the built-in KSL stylesheet is inlined

Parameters

path

output file path; defaults to ctx.outputDir/<sanitised-title>.html

ctx

shared render configuration (output directory, plot directory, confidence level, numeric precision, max plots per section)

cssPath

path to an external CSS file; when non-null a <link> tag is emitted and css is ignored

css

inline CSS string to embed in a <style> block; only used when cssPath is null; when both are null the built-in stylesheet is used