|
| 1 | +// Informative box |
| 2 | +#let informative( |
| 3 | + content, |
| 4 | + kind: none, |
| 5 | +) = context { |
| 6 | + let pre = if kind != none { kind } else { "Informative Text" } |
| 7 | + let post = none |
| 8 | + |
| 9 | + let meas = measure(content) |
| 10 | + if meas.height > 2in { |
| 11 | + post = "End of " + pre |
| 12 | + pre = "Start of " + pre |
| 13 | + } |
| 14 | + |
| 15 | + box( |
| 16 | + strong(pre) + v(-2pt) + content + if post != none { v(-2pt) + strong(post) }, |
| 17 | + width: 100%, |
| 18 | + inset: 10pt, |
| 19 | + stroke: ( |
| 20 | + top: .5pt, |
| 21 | + bottom: .5pt, |
| 22 | + ), |
| 23 | + ) |
| 24 | +} |
| 25 | + |
| 26 | +#let conf( |
| 27 | + title: none, |
| 28 | + authors: (), |
| 29 | + abstract: [], |
| 30 | + doc, |
| 31 | +) = { |
| 32 | + // |
| 33 | + // Font settings |
| 34 | + // |
| 35 | + // Normal text |
| 36 | + set text( |
| 37 | + font: "Manuale", |
| 38 | + size: 9pt, |
| 39 | + ) |
| 40 | + // Math |
| 41 | + show math.equation: set text( |
| 42 | + font: "Inter", |
| 43 | + size: 9pt, |
| 44 | + ) |
| 45 | + // Code |
| 46 | + show raw: set text( |
| 47 | + font: "Fira Code", |
| 48 | + size: 9pt, |
| 49 | + ) |
| 50 | + // Headings |
| 51 | + set heading(numbering: "1.1") |
| 52 | + show heading: it => block()[ |
| 53 | + #let size = 16pt - it.depth * 2pt |
| 54 | + #if size < 10pt { size = 10pt } |
| 55 | + #set align(center) |
| 56 | + #set text( |
| 57 | + font: "Inter", |
| 58 | + size: size, |
| 59 | + weight: "bold", |
| 60 | + ) |
| 61 | + #it |
| 62 | + ] |
| 63 | + |
| 64 | + let horizontalrule = line(start: (25%, 0%), end: (75%, 0%)) |
| 65 | + |
| 66 | + show terms: it => { |
| 67 | + it |
| 68 | + .children |
| 69 | + .map(child => [ |
| 70 | + #strong[#child.term] |
| 71 | + #block(inset: (left: 1.5em, top: -0.4em))[#child.description] |
| 72 | + ]) |
| 73 | + .join() |
| 74 | + } |
| 75 | + |
| 76 | + set table( |
| 77 | + inset: 6pt, |
| 78 | + stroke: 1pt, |
| 79 | + ) |
| 80 | + |
| 81 | + show figure.where(kind: table): set figure.caption(position: bottom) |
| 82 | + |
| 83 | + show figure.where(kind: image): set figure.caption(position: bottom) |
| 84 | + |
| 85 | + set align(center) |
| 86 | + text(17pt, title) |
| 87 | + |
| 88 | + let count = authors.len() |
| 89 | + let ncols = calc.min(count, 3) |
| 90 | + grid( |
| 91 | + columns: (1fr,) * ncols, |
| 92 | + row-gutter: 24pt, |
| 93 | + ..authors.map(author => [ |
| 94 | + #author.name \ |
| 95 | + #author.affiliation \ |
| 96 | + #link("mailto:" + author.email) |
| 97 | + ]), |
| 98 | + ) |
| 99 | + |
| 100 | + par(justify: false)[ |
| 101 | + *Abstract* \ |
| 102 | + #abstract |
| 103 | + ] |
| 104 | + |
| 105 | + set align(left) |
| 106 | + |
| 107 | + pagebreak() |
| 108 | + |
| 109 | + heading("Disclaimers, Notices, and License Terms", level: 1) |
| 110 | + |
| 111 | + heading("Copyright Licenses", level: 2) |
| 112 | + |
| 113 | + [ |
| 114 | + Trusted Computing Group (TCG) grants to the user of the source code in this |
| 115 | + specification (the \"Source Code\") a worldwide, irrevocable, nonexclusive, |
| 116 | + royalty free, copyright license to reproduce, create derivative works, |
| 117 | + distribute, display and perform the Source Code and derivative works |
| 118 | + thereof, and to grant others the rights granted herein. |
| 119 | + |
| 120 | + The TCG grants to the user of the other parts of the specification (other |
| 121 | + than the Source Code) the rights to reproduce, distribute, display, and |
| 122 | + perform the specification solely for the purpose of developing products |
| 123 | + based on such documents. |
| 124 | + ] |
| 125 | + |
| 126 | + heading("Source Code Distribution Conditions", level: 2) |
| 127 | + |
| 128 | + [ |
| 129 | + Redistributions of Source Code must retain the above copyright licenses, |
| 130 | + this list of conditions and the following disclaimers. |
| 131 | + |
| 132 | + Redistributions in binary form must reproduce the above copyright licenses, |
| 133 | + this list of conditions and the following disclaimers in the documentation |
| 134 | + and/or other materials provided with the distribution. |
| 135 | + ] |
| 136 | + |
| 137 | + heading("Disclaimers", level: 2) |
| 138 | + |
| 139 | + [ |
| 140 | + THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF LICENSE |
| 141 | + OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH RESPECT TO |
| 142 | + PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) THAT MAY BE |
| 143 | + NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. Contact TCG |
| 144 | + Administration #link( "mailto:[email protected]") for information on |
| 145 | + specification licensing rights available through TCG membership agreements. |
| 146 | + |
| 147 | + THIS SPECIFICATION IS PROVIDED “AS IS” WITH NO EXPRESS OR IMPLIED WARRANTIES |
| 148 | + WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A |
| 149 | + PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR NONINFRINGEMENT OF |
| 150 | + INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY |
| 151 | + PROPOSAL, SPECIFICATION OR SAMPLE. |
| 152 | + |
| 153 | + Without limitation, TCG and its members and licensors disclaim all |
| 154 | + liability, including liability for infringement of any proprietary rights, |
| 155 | + relating to use of information in this specification and to the |
| 156 | + implementation of this specification, and TCG disclaims all liability for |
| 157 | + cost of procurement of substitute goods or services, lost profits, loss of |
| 158 | + use, loss of data or any incidental, consequential, direct, indirect, or |
| 159 | + special damages, whether under contract, tort, warranty or otherwise, |
| 160 | + arising in any way out of use or reliance upon this specification or any |
| 161 | + information herein. |
| 162 | + |
| 163 | + Any marks and brands contained herein are the property of their respective |
| 164 | + owners. |
| 165 | + ] |
| 166 | + |
| 167 | + pagebreak() |
| 168 | + |
| 169 | + |
| 170 | + heading("Document Style", level: 1) |
| 171 | + |
| 172 | + heading("Key Words", level: 2) |
| 173 | + |
| 174 | + [ |
| 175 | + The key words "MUST," "MUST NOT," "REQUIRED," "SHALL," "SHALL NOT," "SHOULD," |
| 176 | + "SHOULD NOT," "RECOMMENDED," "MAY," and "OPTIONAL" in this document's normative |
| 177 | + statements are to be interpreted as described in |
| 178 | + [RFC 2119: Key words for use in RFCs to Indicate Requirement Levels](https://www.ietf.org/rfc/rfc2119.txt). |
| 179 | + ] |
| 180 | + |
| 181 | + heading("Statement Type", level: 2) |
| 182 | + |
| 183 | + [ |
| 184 | + Please note an important distinction between different sections of text |
| 185 | + throughout this document. There are two distinctive kinds of text: *informative |
| 186 | + comments* and *normative statements*. Because most of the text in this |
| 187 | + specification will be of the kind *normative statements*, the authors have |
| 188 | + informally defined it as the default and, as such, have specifically called out |
| 189 | + text of the kind *informative comment*. They have done this by flagging the |
| 190 | + beginning and end of each informative comment and highlighting its text in gray. |
| 191 | + This means that unless text is specifically marked as of the kind *informative |
| 192 | + comment*, it can be considered a *normative statement*. |
| 193 | + ] |
| 194 | + |
| 195 | + informative( |
| 196 | + [Reach out to #link( "mailto:[email protected]") with any questions about this document. |
| 197 | + ], |
| 198 | + kind: "Example", |
| 199 | + ) |
| 200 | + |
| 201 | + pagebreak() |
| 202 | + |
| 203 | + doc |
| 204 | +} |
0 commit comments