I'd like to be able to set some major features in the YAML header: margins, line numbering, spacing, font family and size. Note that the last three aren't document-level features but in common use hold across the document. They should be able to set by modifying the main style.
Similarly, it would be great to extract this information from the document and then insert it into the YAML header (possibly as a tracked change). This can be challenging as these aren't always set where you want them. We can extract margins and line numbering from the body-level section characteristics. For font/spacing features, most people don't set styles, but just select all the document text and make changes, resulting in lots of small style changes. To get these, we'll have to guess by calculating the dominant style, as a fraction of paragraphs/text runs in the document.
I'd like to be able to set some major features in the YAML header: margins, line numbering, spacing, font family and size. Note that the last three aren't document-level features but in common use hold across the document. They should be able to set by modifying the main style.
Similarly, it would be great to extract this information from the document and then insert it into the YAML header (possibly as a tracked change). This can be challenging as these aren't always set where you want them. We can extract margins and line numbering from the body-level section characteristics. For font/spacing features, most people don't set styles, but just select all the document text and make changes, resulting in lots of small style changes. To get these, we'll have to guess by calculating the dominant style, as a fraction of paragraphs/text runs in the document.