Which entities of the YAML input are actually being validated? #14439
-
YAML validation when and where?I'm just wondering which parts of the YAML project configuration are currently being validated (there are some open issues for YAML validation: #11560, #11033, ... ). The background to the question is quite simple: According to Quarto docs book output, it is valid to use "scrbook" or "scrreport" for "documentclass" when generating PDFs . Komascript, however, knows more definitions (see Pandoc documentation. The real background is of course the fact that PDF generation fails in that case. But is this an issue? (In my opinion it is.) For example, using "scrartcl" at this point (which is a valid template), the generation of the PDF will simply result in an Tex error, but Quarto does not point out anywhere that the value might be invalid. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I think the key distinction here is schema validation vs semantic render validation. In the current schema, There are two relevant validation paths:
After that, many format values are passed through to Pandoc/LaTeX. |
Beta Was this translation helpful? Give feedback.
I think the key distinction here is schema validation vs semantic render validation.
In the current schema,
documentclassis a PDF-tagged field, but its schema is stillstring. The listed classes (scrartcl,scrbook,scrreprt,scrlttr2,article,book,report,memoir) are completions, not an enum. So YAML validation can validate that the field is a string and appears in a place where PDF options are allowed, but it will not reject another string as an unsupported LaTeX class.There are two relevant validation paths:
getFrontMatterSchema()unless that YAML setsvalidate-yaml: false_quarto.ymlproject config is read againstgetProjectConfigSchema(),…