ses-pdf 0.2.0

Professional PDF report engine for structural engineering calculations and drawing sheets — equations, tables, charts, Arch sizes, and title blocks via Typst.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::element::Equation;

pub(crate) fn generate_equation(eq: &Equation) -> String {
    let label = eq
        .label
        .as_deref()
        .map(|l| format!(" <{}>", l))
        .unwrap_or_default();

    if eq.display {
        format!("\n$ {} ${}\n", eq.math, label)
    } else {
        format!("${}${}", eq.math, label)
    }
}