From 0ac44486af38b026ef31b0d4dbf44ca2a8b0879d Mon Sep 17 00:00:00 2001 From: Steve LLamb <38917682+SteveLLamb@users.noreply.github.com> Date: Mon, 28 Apr 2025 13:21:28 -0700 Subject: [PATCH 1/3] em dash figures and captions --- smpte.js | 90 +++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 20 deletions(-) diff --git a/smpte.js b/smpte.js index 6a89f3e..e22e697 100644 --- a/smpte.js +++ b/smpte.js @@ -195,6 +195,8 @@ function insertFrontMatter(docMetadata) { case smpte.ST_PUBTYPE: case smpte.RP_PUBTYPE: case smpte.EG_PUBTYPE: + case smpte.ER_PUBTYPE: + case smpte.RDD_PUBTYPE: if (docMetadata.pubPart !== null) actualPubNumber += `-${docMetadata.pubPart}`; if (docMetadata.pubStage === smpte.PUB_STAGE_PUB) { @@ -623,7 +625,7 @@ function insertConformance(docMetadata) { if (!(docMetadata.pubType == smpte.RP_PUBTYPE || docMetadata.pubType == smpte.ST_PUBTYPE || docMetadata.pubType == smpte.AG_PUBTYPE)) { if (sec !== null) logger_.error(`An ${docMetadata.pubType} document must not contain a conformance section`); - if (docMetadata.pubType != smpte.EG_PUBTYPE) + if (!(docMetadata.pubType == smpte.EG_PUBTYPE || docMetadata.pubType == smpte.ER_PUBTYPE)) return; } @@ -700,6 +702,14 @@ function insertConformance(docMetadata) { interoperability information.

`; + } else if (docMetadata.pubType === smpte.ER_PUBTYPE) { + + sec.innerHTML = ` +

Conformance

+

This Engineering Report is meant to provide information to the + industry. It does not impose requirements.

+ `; + } else { sec.innerHTML = `

Conformance

@@ -720,7 +730,7 @@ function insertConformance(docMetadata) { const SMPTE_FOREWORD_ID = "sec-foreword"; -const SMPTE_AG_FOREWORD_BOILERPLATE = `

Foreword

+const SMPTE_GEN_FOREWORD_BOILERPLATE = `

Foreword

The Society of Motion Picture and Television Engineers (SMPTE) is an internationally-recognized standards developing organization. Headquartered and incorporated in the United States of America, SMPTE has members in over @@ -730,26 +740,43 @@ by SMPTE’s Technology Committees. Participation in these Committees is open to all with a bona fide interest in their work. SMPTE cooperates closely with other standards-developing organizations, including ISO, IEC and ITU. SMPTE Engineering Documents are drafted in accordance with the rules given -in its Standards Operations Manual. For more information, please visit +in its Standards Operations Manual.

+ +

For more information, please visit www.smpte.org.

+` + +const SMPTE_AG_FOREWORD_BOILERPLATE = `${SMPTE_GEN_FOREWORD_BOILERPLATE}

This Standards Administrative Guideline forms an adjunct to the use and interpretation of the SMPTE Standards Operations Manual. In the event of a conflict, the Operations Manual shall prevail.

` +const SMPTE_RDD_FOREWORD_BOILERPLATE = `

Foreword

+

This document is a Registered Disclosure Document prepared by the sponsor(s) identified +below. It has been examined by the appropriate SMPTE Technology Committee and is believed to +contain adequate information to satisfy the objectives defined in the Scope, and to be +technically consistent.

+

This document is NOT a Standard, Recommended Practice or Engineering Guideline and does NOT +imply a finding or representation of the Society.

+

Every attempt has been made to ensure that the information contained in this document is +accurate. Errors in this document should be reported to the SMPTE Registered Disclosure +Document proponent(s) identified below with a copy to +eng@smpte.org.

+ +

All other inquiries in respect of this document, including inquiries as to intellectual +property requirements, should be addressed to the SMPTE Registered Disclosure Document +proponent(s) identified below.

-const SMPTE_DOC_FOREWORD_BOILERPLATE = `

Foreword

-

The Society of Motion Picture and Television Engineers (SMPTE) is an -internationally-recognized standards developing organization. Headquartered -and incorporated in the United States of America, SMPTE has members in over -80 countries on six continents. SMPTE’s Engineering Documents, including -Standards, Recommended Practices, and Engineering Guidelines, are prepared -by SMPTE’s Technology Committees. Participation in these Committees is open -to all with a bona fide interest in their work. SMPTE cooperates closely -with other standards-developing organizations, including ISO, IEC and ITU. -SMPTE Engineering Documents are drafted in accordance with the rules given -in its Standards Operations Manual.

For more information, please visit -www.smpte.org.

+{{authorProse}} + +` +const SMPTE_ER_FOREWORD_BOILERPLATE = `${SMPTE_GEN_FOREWORD_BOILERPLATE} + +{{authorProse}} +` + +const SMPTE_DOC_FOREWORD_BOILERPLATE = `${SMPTE_GEN_FOREWORD_BOILERPLATE}

At the time of publication no notice had been received by SMPTE claiming patent rights essential to the implementation of this Engineering Document. @@ -778,6 +805,22 @@ function insertForeword(docMetadata) { return; } + if (docMetadata.pubType == smpte.RDD_PUBTYPE) { + if (sec === null) + logger_.error("RDD must contain a Foreword section."); + + } + + const SMPTE_PROPONENT_ID = document.getElementById("element-proponent"); + + if (SMPTE_PROPONENT_ID === null && docMetadata.pubType === smpte.RDD_PUBTYPE) { + logger_.error("Missing required proponents."); + return; + } if (SMPTE_PROPONENT_ID !== null && docMetadata.pubType !== smpte.RDD_PUBTYPE) { + logger_.error("Proponents only allowed for RDD documents."); + return; + } + if (sec === null && docMetadata.pubType != smpte.OM_PUBTYPE) { sec = document.createElement("section"); sec.id = SMPTE_FOREWORD_ID; @@ -788,7 +831,7 @@ function insertForeword(docMetadata) { let authorProse = sec.innerHTML; - if (smpte.ENGDOC_PUBTYPES.has(docMetadata.pubType)) { + if (smpte.ENGDOC_PUBTYPES.has(docMetadata.pubType) && docMetadata.pubType != smpte.RDD_PUBTYPE) { authorProse = `

This document was prepared by Technology Committee ${docMetadata.pubTC}.

` + authorProse; } @@ -796,12 +839,19 @@ function insertForeword(docMetadata) { if (authorProse.trim().length > 0) logger_.error("AGs cannot contain author-specified Foreword prose.") sec.innerHTML = fillTemplate(SMPTE_AG_FOREWORD_BOILERPLATE, {copyrightYear: (new Date()).getFullYear()}); + } else if (docMetadata.pubType == smpte.RDD_PUBTYPE) { + sec.innerHTML = fillTemplate(SMPTE_RDD_FOREWORD_BOILERPLATE, {authorProse: authorProse, copyrightYear: (new Date()).getFullYear()}); + } else if (docMetadata.pubType == smpte.ER_PUBTYPE) { + sec.innerHTML = fillTemplate(SMPTE_ER_FOREWORD_BOILERPLATE, {authorProse: authorProse, copyrightYear: (new Date()).getFullYear()}); } else { sec.innerHTML = fillTemplate(SMPTE_DOC_FOREWORD_BOILERPLATE, {authorProse: authorProse, copyrightYear: (new Date()).getFullYear()}); } } + + + function addHeadingLinks(docMetadata) { const headings = document.querySelectorAll("h2, h3, h4, h5, h6"); @@ -908,7 +958,7 @@ function numberTables() { headingLabel.appendChild(document.createTextNode("Table ")); headingLabel.appendChild(headingNumberElement); - headingLabel.appendChild(document.createTextNode(" –⁠ ")); + headingLabel.appendChild(document.createTextNode(" — ")); caption.insertBefore(headingLabel, caption.firstChild); @@ -949,7 +999,7 @@ function numberFigures() { headingLabel.appendChild(document.createTextNode("Figure ")); headingLabel.appendChild(headingNumberElement); - headingLabel.appendChild(document.createTextNode(" –⁠ ")); + headingLabel.appendChild(document.createTextNode(" — ")); figcaption.insertBefore(headingLabel, figcaption.firstChild); @@ -1286,7 +1336,7 @@ function resolveLinks(docMetadata) { const CONFORMANCE_RE = /\s*(shall)|(should)|(may)\s/i; function checkConformanceNotation(docMetadata) { - if (docMetadata.pubType !== smpte.EG_PUBTYPE) + if (!(docMetadata.pubType == smpte.EG_PUBTYPE || docMetadata.pubType == smpte.ER_PUBTYPE)) return; for (let section of document.querySelectorAll("section:not(:has(section))")) { @@ -1299,7 +1349,7 @@ function checkConformanceNotation(docMetadata) { const r = CONFORMANCE_RE.exec(section.innerText); if (r !== null) - logger_.error(`An EG must not contain the conformance notation ${r[1]}`, section); + logger_.error(`An ${docMetadata.pubType} must not contain the conformance notation ${r[1]}`, section); }; } From a77bde70592c57707fd003fe7ceb17db87ef124b Mon Sep 17 00:00:00 2001 From: Steve LLamb <38917682+SteveLLamb@users.noreply.github.com> Date: Mon, 28 Apr 2025 13:23:10 -0700 Subject: [PATCH 2/3] roll back change --- smpte.js | 90 +++++++++++++------------------------------------------- 1 file changed, 20 insertions(+), 70 deletions(-) diff --git a/smpte.js b/smpte.js index e22e697..6a89f3e 100644 --- a/smpte.js +++ b/smpte.js @@ -195,8 +195,6 @@ function insertFrontMatter(docMetadata) { case smpte.ST_PUBTYPE: case smpte.RP_PUBTYPE: case smpte.EG_PUBTYPE: - case smpte.ER_PUBTYPE: - case smpte.RDD_PUBTYPE: if (docMetadata.pubPart !== null) actualPubNumber += `-${docMetadata.pubPart}`; if (docMetadata.pubStage === smpte.PUB_STAGE_PUB) { @@ -625,7 +623,7 @@ function insertConformance(docMetadata) { if (!(docMetadata.pubType == smpte.RP_PUBTYPE || docMetadata.pubType == smpte.ST_PUBTYPE || docMetadata.pubType == smpte.AG_PUBTYPE)) { if (sec !== null) logger_.error(`An ${docMetadata.pubType} document must not contain a conformance section`); - if (!(docMetadata.pubType == smpte.EG_PUBTYPE || docMetadata.pubType == smpte.ER_PUBTYPE)) + if (docMetadata.pubType != smpte.EG_PUBTYPE) return; } @@ -702,14 +700,6 @@ function insertConformance(docMetadata) { interoperability information.

`; - } else if (docMetadata.pubType === smpte.ER_PUBTYPE) { - - sec.innerHTML = ` -

Conformance

-

This Engineering Report is meant to provide information to the - industry. It does not impose requirements.

- `; - } else { sec.innerHTML = `

Conformance

@@ -730,7 +720,7 @@ function insertConformance(docMetadata) { const SMPTE_FOREWORD_ID = "sec-foreword"; -const SMPTE_GEN_FOREWORD_BOILERPLATE = `

Foreword

+const SMPTE_AG_FOREWORD_BOILERPLATE = `

Foreword

The Society of Motion Picture and Television Engineers (SMPTE) is an internationally-recognized standards developing organization. Headquartered and incorporated in the United States of America, SMPTE has members in over @@ -740,43 +730,26 @@ by SMPTE’s Technology Committees. Participation in these Committees is open to all with a bona fide interest in their work. SMPTE cooperates closely with other standards-developing organizations, including ISO, IEC and ITU. SMPTE Engineering Documents are drafted in accordance with the rules given -in its Standards Operations Manual.

- -

For more information, please visit +in its Standards Operations Manual. For more information, please visit www.smpte.org.

-` - -const SMPTE_AG_FOREWORD_BOILERPLATE = `${SMPTE_GEN_FOREWORD_BOILERPLATE}

This Standards Administrative Guideline forms an adjunct to the use and interpretation of the SMPTE Standards Operations Manual. In the event of a conflict, the Operations Manual shall prevail.

` -const SMPTE_RDD_FOREWORD_BOILERPLATE = `

Foreword

-

This document is a Registered Disclosure Document prepared by the sponsor(s) identified -below. It has been examined by the appropriate SMPTE Technology Committee and is believed to -contain adequate information to satisfy the objectives defined in the Scope, and to be -technically consistent.

-

This document is NOT a Standard, Recommended Practice or Engineering Guideline and does NOT -imply a finding or representation of the Society.

-

Every attempt has been made to ensure that the information contained in this document is -accurate. Errors in this document should be reported to the SMPTE Registered Disclosure -Document proponent(s) identified below with a copy to -eng@smpte.org.

- -

All other inquiries in respect of this document, including inquiries as to intellectual -property requirements, should be addressed to the SMPTE Registered Disclosure Document -proponent(s) identified below.

-{{authorProse}} - -` -const SMPTE_ER_FOREWORD_BOILERPLATE = `${SMPTE_GEN_FOREWORD_BOILERPLATE} - -{{authorProse}} -` - -const SMPTE_DOC_FOREWORD_BOILERPLATE = `${SMPTE_GEN_FOREWORD_BOILERPLATE} +const SMPTE_DOC_FOREWORD_BOILERPLATE = `

Foreword

+

The Society of Motion Picture and Television Engineers (SMPTE) is an +internationally-recognized standards developing organization. Headquartered +and incorporated in the United States of America, SMPTE has members in over +80 countries on six continents. SMPTE’s Engineering Documents, including +Standards, Recommended Practices, and Engineering Guidelines, are prepared +by SMPTE’s Technology Committees. Participation in these Committees is open +to all with a bona fide interest in their work. SMPTE cooperates closely +with other standards-developing organizations, including ISO, IEC and ITU. +SMPTE Engineering Documents are drafted in accordance with the rules given +in its Standards Operations Manual.

For more information, please visit +www.smpte.org.

At the time of publication no notice had been received by SMPTE claiming patent rights essential to the implementation of this Engineering Document. @@ -805,22 +778,6 @@ function insertForeword(docMetadata) { return; } - if (docMetadata.pubType == smpte.RDD_PUBTYPE) { - if (sec === null) - logger_.error("RDD must contain a Foreword section."); - - } - - const SMPTE_PROPONENT_ID = document.getElementById("element-proponent"); - - if (SMPTE_PROPONENT_ID === null && docMetadata.pubType === smpte.RDD_PUBTYPE) { - logger_.error("Missing required proponents."); - return; - } if (SMPTE_PROPONENT_ID !== null && docMetadata.pubType !== smpte.RDD_PUBTYPE) { - logger_.error("Proponents only allowed for RDD documents."); - return; - } - if (sec === null && docMetadata.pubType != smpte.OM_PUBTYPE) { sec = document.createElement("section"); sec.id = SMPTE_FOREWORD_ID; @@ -831,7 +788,7 @@ function insertForeword(docMetadata) { let authorProse = sec.innerHTML; - if (smpte.ENGDOC_PUBTYPES.has(docMetadata.pubType) && docMetadata.pubType != smpte.RDD_PUBTYPE) { + if (smpte.ENGDOC_PUBTYPES.has(docMetadata.pubType)) { authorProse = `

This document was prepared by Technology Committee ${docMetadata.pubTC}.

` + authorProse; } @@ -839,19 +796,12 @@ function insertForeword(docMetadata) { if (authorProse.trim().length > 0) logger_.error("AGs cannot contain author-specified Foreword prose.") sec.innerHTML = fillTemplate(SMPTE_AG_FOREWORD_BOILERPLATE, {copyrightYear: (new Date()).getFullYear()}); - } else if (docMetadata.pubType == smpte.RDD_PUBTYPE) { - sec.innerHTML = fillTemplate(SMPTE_RDD_FOREWORD_BOILERPLATE, {authorProse: authorProse, copyrightYear: (new Date()).getFullYear()}); - } else if (docMetadata.pubType == smpte.ER_PUBTYPE) { - sec.innerHTML = fillTemplate(SMPTE_ER_FOREWORD_BOILERPLATE, {authorProse: authorProse, copyrightYear: (new Date()).getFullYear()}); } else { sec.innerHTML = fillTemplate(SMPTE_DOC_FOREWORD_BOILERPLATE, {authorProse: authorProse, copyrightYear: (new Date()).getFullYear()}); } } - - - function addHeadingLinks(docMetadata) { const headings = document.querySelectorAll("h2, h3, h4, h5, h6"); @@ -958,7 +908,7 @@ function numberTables() { headingLabel.appendChild(document.createTextNode("Table ")); headingLabel.appendChild(headingNumberElement); - headingLabel.appendChild(document.createTextNode(" — ")); + headingLabel.appendChild(document.createTextNode(" –⁠ ")); caption.insertBefore(headingLabel, caption.firstChild); @@ -999,7 +949,7 @@ function numberFigures() { headingLabel.appendChild(document.createTextNode("Figure ")); headingLabel.appendChild(headingNumberElement); - headingLabel.appendChild(document.createTextNode(" — ")); + headingLabel.appendChild(document.createTextNode(" –⁠ ")); figcaption.insertBefore(headingLabel, figcaption.firstChild); @@ -1336,7 +1286,7 @@ function resolveLinks(docMetadata) { const CONFORMANCE_RE = /\s*(shall)|(should)|(may)\s/i; function checkConformanceNotation(docMetadata) { - if (!(docMetadata.pubType == smpte.EG_PUBTYPE || docMetadata.pubType == smpte.ER_PUBTYPE)) + if (docMetadata.pubType !== smpte.EG_PUBTYPE) return; for (let section of document.querySelectorAll("section:not(:has(section))")) { @@ -1349,7 +1299,7 @@ function checkConformanceNotation(docMetadata) { const r = CONFORMANCE_RE.exec(section.innerText); if (r !== null) - logger_.error(`An ${docMetadata.pubType} must not contain the conformance notation ${r[1]}`, section); + logger_.error(`An EG must not contain the conformance notation ${r[1]}`, section); }; } From 555d53ac2f684267b036fab9fb08a80653a321e6 Mon Sep 17 00:00:00 2001 From: Steve LLamb <38917682+SteveLLamb@users.noreply.github.com> Date: Mon, 28 Apr 2025 13:24:36 -0700 Subject: [PATCH 3/3] fix change --- smpte.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smpte.js b/smpte.js index 6a89f3e..7d2ac27 100644 --- a/smpte.js +++ b/smpte.js @@ -908,7 +908,7 @@ function numberTables() { headingLabel.appendChild(document.createTextNode("Table ")); headingLabel.appendChild(headingNumberElement); - headingLabel.appendChild(document.createTextNode(" –⁠ ")); + headingLabel.appendChild(document.createTextNode(" — ")); caption.insertBefore(headingLabel, caption.firstChild); @@ -949,7 +949,7 @@ function numberFigures() { headingLabel.appendChild(document.createTextNode("Figure ")); headingLabel.appendChild(headingNumberElement); - headingLabel.appendChild(document.createTextNode(" –⁠ ")); + headingLabel.appendChild(document.createTextNode(" — ")); figcaption.insertBefore(headingLabel, figcaption.firstChild);