ravenous_typst/balance_report.typ

95 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Standalone balance-analysis PDF target.
#import "/setup/theme/themes.typ" as themes
#import "/setup/analysis/class_cost_report.typ": render-class-cost-report
#import "/setup/analysis/origin_report.typ": render-origin-report
#import "/setup/analysis/alteration_report.typ": alteration-report
#import "/setup/analysis/craft_report.typ": render-craft-report
#import "/setup/analysis/report_config.typ": chapter-family-enabled
#let report-theme = themes.make-theme(theme-name: "steingrund")
#let report-theme-var = themes.make-theme-variable(theme-name: "steingrund")
#let report-numbering(..numbers) = {
let patterns = ("1", "1", "1", "I", "a")
numbers.pos().enumerate().map(pair => {
let index = pair.at(0)
let number = pair.at(1)
numbering(patterns.at(index, default: "1"), number)
}).join([.]) + [.]
}
#let configure-report(document) = {
set page(
paper: "a4",
margin: (x: 1.8cm, y: 1.7cm),
numbering: "1",
)
set text(
font: report-theme-var("font"),
size: 9.5pt,
lang: "fr",
fill: report-theme.ink,
)
set par(justify: true, leading: 0.7em, spacing: 0.75em)
set heading(numbering: report-numbering)
let heading-label(it) = if it.numbering == none { [] } else {
counter(heading).display(it.numbering)
}
show heading.where(level: 1): it => block(above: 1.4em, below: 0.8em)[
#text(size: 20pt, weight: "bold", fill: report-theme.heading)[#heading-label(it) #h(0.45em) #it.body]
]
show heading.where(level: 2): it => block(above: 1em, below: 0.5em)[
#text(size: 13pt, weight: "bold", fill: report-theme.heading-accent)[#heading-label(it) #h(0.4em) #it.body]
]
show heading.where(level: 3): it => block(above: 0.8em, below: 0.35em)[
#text(size: 10.5pt, weight: "bold", fill: report-theme.heading-subtle)[#heading-label(it) #h(0.35em) #it.body]
]
show strong: set text(fill: report-theme.emphasis)
show link: set text(fill: report-theme.link)
document
}
#show: configure-report
#set document(
title: "Ravenous — Rapport d’équilibrage",
author: "Dandaedre",
)
#page(numbering: none)[
#align(center + horizon)[
#text(size: 34pt, weight: "bold", fill: report-theme.heading)[
RAPPORT D’ÉQUILIBRAGE
]
#v(0.8em)
#text(size: 14pt, tracking: 0.08em, fill: report-theme.heading-accent)[
ANALYSE DU SYSTÈME
]
#v(1.8em)
#text(size: 10pt, fill: report-theme.muted-ink)[
Écoles de combat, coûts, origines et capacités
]
]
]
#pagebreak()
#outline(title: "Sommaire")
#pagebreak()
#if chapter-family-enabled("classes") { render-class-cost-report() }
#if chapter-family-enabled("origins") { render-origin-report() }
#if chapter-family-enabled("alterations") { alteration-report() }
#if chapter-family-enabled("craft") { render-craft-report() }