fix: rendering in typst
This commit is contained in:
@@ -69,6 +69,7 @@ use crate::Layout;
|
||||
use crate::assessment::{AssessmentFile, Form};
|
||||
use crate::catalog::Catalog;
|
||||
use crate::error::{Error, Result};
|
||||
use crate::markup;
|
||||
|
||||
/// What to render.
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -195,6 +196,17 @@ pub fn render(catalog: &Catalog, record: &AssessmentFile, opts: &Options) -> Res
|
||||
}
|
||||
|
||||
let mut warnings = payload::check(&payload, &opts.config);
|
||||
for (slot, body) in &bodies {
|
||||
if markup::needs_chem_import(&template.source, body) {
|
||||
warnings.push(format!(
|
||||
"the `{}` slot carries a chemical formula, but the template {} does not import \
|
||||
whalogen, so Typst will stop at `unknown variable: ce`; add `{}`",
|
||||
slot.as_str(),
|
||||
template.origin,
|
||||
markup::CHEM_IMPORT
|
||||
));
|
||||
}
|
||||
}
|
||||
if template.is_inert() {
|
||||
warnings.push(format!(
|
||||
"the template {} declares no coursebank markers, so no questions were injected; add \
|
||||
|
||||
Reference in New Issue
Block a user