├── .editorconfig
├── .gitignore
├── LICENSE
├── README.md
├── README.zh_cn.md
├── assets
├── 741.svg
├── demo-logo.svg
├── dimension.svg
├── icons
│ ├── cart.svg
│ ├── doc.svg
│ ├── folder.svg
│ └── tools.svg
└── octagon-exclamation.svg
├── demo-ds.pdf
├── demo-ds.typ
├── demo-ds.zh.pdf
├── demo-ds.zh.typ
├── gallery
├── demo.png
└── demo.zh.png
├── tids.typ
└── tids.zh.typ
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: https://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | # Unix-style newlines with a newline ending every file
7 | [*]
8 | charset = utf-8
9 | end_of_line = crlf
10 | insert_final_newline = true
11 | indent_style = space
12 | indent_size = 4
13 |
14 | # Tab indentation (no size specified)
15 | [Makefile]
16 | indent_style = tab
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | tids.pdf
2 | tids.*.pdf
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # tids: A TI-Style Datasheet Template for Typst
2 |
3 | English | [简体中文](README.zh_cn.md)
4 |
5 | This project is an easy-to-use Typst electronic component datasheet template purposed
6 | for testing and showcasing the potential of using Typst for technical documentation writing.
7 |
8 | 
9 |
10 | **If this project is helpful to you, please consider leaving a star⭐, you know the drill.**
11 |
12 | ## Disclaimer
13 |
14 | This is an open-source project created solely for demonstration purposes, with no intention of infringing on any trademarks. The author is not affiliated with TI in any way.
15 |
16 | ## Features
17 |
18 | - **Simple and User-friendly:** Uses Typst format for easy readability and writing.
19 | - **Customizable:** Can be customized for specific component specifications.
20 | - **Fast Compilation**: It only takes one or two seconds to generate the PDF, as opposed to LaTeX, which may take several minutes or even longer.
21 |
22 | ## Getting Started
23 |
24 | 0. Install Typst if you don't have:
25 | ```powershell
26 | winget install --id Typst.Typst
27 | ```
28 | 1. Clone this repository locally:
29 | ```bash
30 | git clone https://github.com/oldrev/tids.git
31 | ```
32 | 3. Build the PDF example:
33 | ```bash
34 | typst compile demo-ds.typ
35 | ```
36 | 4. Check the generated [`demo-ds.pdf`](demo-ds.pdf) out.
37 |
38 | ## Usage
39 |
40 | 1. Copy the template file `tids.typ` to the directory of your project.
41 | 2. Import the template and call `tids()` function:
42 | ```typst
43 | #import "tids.typ": tids
44 |
45 | #show: doc => tids(ds_metadata: (
46 | title: [YourDSTitle],
47 | product: [YourProductName],
48 | product_url: "https://github.com/oldrev/tids",
49 | revision: [CurrentRevision],
50 | publish_date: [PublishedOn]
51 | ),
52 | features: [features for the title page],
53 | applications: [application information for the title page],
54 | desc: [description content for the title page],
55 | rev_list: [revision list],
56 | doc: doc
57 | )
58 | // ... The content of your document
59 | ```
60 | See [`demo-ds.typ`](demo-ds.typ) for details.
61 |
62 |
63 | ## Demo Videos:
64 |
65 | - Youtube: TODO
66 |
67 | ## Contributions
68 |
69 | Feel free to contribute and raise issues. Please see the Contribution Guidelines for more information.
70 |
71 | ## License
72 |
73 | This project is licensed under the Apache 2.0 License.
74 |
--------------------------------------------------------------------------------
/README.zh_cn.md:
--------------------------------------------------------------------------------
1 | # tids: A TI-Style Datasheet Template for Typst
2 |
3 | [English](README.md) | 简体中文
4 |
5 | 本项目是一个出于演示和评估的目的创建的 TI 风格电子元件规格书模板。
6 |
7 | 
8 |
9 | **如果你觉得本项目有用请点亮⭐小星星⭐。**
10 |
11 | ## 声明
12 |
13 | 本开源项目出于娱乐目的创建,并无意侵犯任何版权和商标。作者与 TI 并无任何关联。
14 |
15 | ## 特性
16 |
17 | - **简单易学:** 使用 Typst 易于编写和阅读,如果你会编写 Markdown,那 Typst 没太大的不同。
18 | - **可自定义:** 模板完全开源,你可以完全自定义,这里的 TI 风格只是个例子。
19 | - **编译飞快:** 一两秒即可编译输出 PDF,而不是 LaTeX 需要的几分钟甚至更久。
20 |
21 | ## 快速上手
22 |
23 | 0. 如果你还没有 Typst 就先安装:
24 | ```powershell
25 | winget install --id Typst.Typst
26 | ```
27 | 演示的模板用到了思源黑体和思源宋体,可以到 Adobe 的官方仓库下载:
28 | [https://github.com/adobe-fonts/source-han-sans] (https://github.com/adobe-fonts/source-han-sans) 并安装到操作系统中;
29 | 1. 克隆本仓库到本地
30 | ```bash
31 | git clone https://github.com/oldrev/tids.git
32 | ```
33 | 3. 构建示例 PDF 文件:
34 | ```bash
35 | typst compile demo-ds.zh.typ
36 | ```
37 | 4. 赏玩生成的 [`demo-ds.zh.pdf`](demo-ds.zh.pdf) PDF 文件。
38 |
39 | ## 使用
40 |
41 | 0. 这个项目里用的思源字体,确保你的系统里存在《思源宋体》和《思源黑体》,要用其他字体请修改 `tids.zh.typ` 里的字体名称定义部分。
42 | 1. 把模板文件 `tids.zh.typ` 复制到你的项目目录里,如果是编写英文的规格书就用 `tids.typ`。
43 | 2. 导入模板文件并调用 `tids()` 函数:
44 | ```typst
45 | #import "tids.typ": tids
46 |
47 | #show: doc => tids(ds_metadata: (
48 | title: [YourDSTitle],
49 | product: [YourProductName],
50 | product_url: "https://github.com/oldrev/tids",
51 | revision: [CurrentRevision],
52 | publish_date: [PublishedOn]
53 | ),
54 | features: [features for the title page],
55 | applications: [application information for the title page],
56 | desc: [description content for the title page],
57 | rev_list: [revision list],
58 | doc: doc
59 | )
60 | // ... The content of your document
61 | ```
62 | See [`demo-ds.zh.typ`](demo-ds.zh.typ) for details.
63 |
64 |
65 | ## 演示视频
66 |
67 | - Youtube: TODO
68 | - 哔哩哔哩: TODO
69 |
70 | ## 参与贡献
71 |
72 | 发现任何 bugs 或者有任何改进建议请不要犹豫,赶紧发 Issue 和 PR。
73 |
74 | ## 授权协议
75 |
76 | 本项目使用 Apache 2.0 协议授权.
77 |
--------------------------------------------------------------------------------
/assets/741.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/demo-logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
45 |
--------------------------------------------------------------------------------
/assets/icons/cart.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/icons/doc.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/icons/folder.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/icons/tools.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/octagon-exclamation.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/demo-ds.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oldrev/tids/74621d22df6d0c686102d587c6e3eb72f737dac4/demo-ds.pdf
--------------------------------------------------------------------------------
/demo-ds.typ:
--------------------------------------------------------------------------------
1 | #import "tids.typ": tids
2 | #import "@preview/gentle-clues:1.1.0": *
3 |
4 | #let metadata = (
5 | title: [FXC1117 Flux Capacitor],
6 | product: "FXC1117",
7 | product_url: "https://github.com/oldrev/tids",
8 | )
9 |
10 | #let features = [
11 | - Capacity: 1.21 gigawatts
12 | - Operating Voltage: 88 billion volts
13 | - Dimensions: Standard size, suitable for most electronic devices
14 | - Material: Advanced alloys and insulating materials
15 | - Frequency Response: Exceeds 1.21 kilohertz
16 | - Temperature Range: -40°C to 150°C
17 | - Stability: High stability, suitable for extreme environments
18 | ]
19 |
20 |
21 | #let applications = [
22 |
23 | The FXC1117 Flux Capacitor is an advanced electronic component widely used in the following fields:
24 |
25 | - Time travel technology
26 | - Energy conversion
27 | - Electronics enhancement
28 | - Space deformation techniques
29 | - Quantum communication
30 |
31 | #figure(
32 | rect(image("./assets/741.svg"), stroke: 0.5pt), caption: "Typical Application"
33 | )
34 | ]
35 |
36 | #let desc = [
37 | The Flux Capacitor is a revolutionary electronic technology utilizing advanced alloys and insulating materials, enabling it to operate in extreme conditions. Its high capacity and operating voltage make it an ideal choice for time travel technology and energy conversion fields.
38 |
39 | Additionally, Flux Capacitors can be applied in electronics enhancement, space deformation techniques, and quantum communication. Their stability and frequency response make them an innovative product in the future of electronic components.
40 | ]
41 |
42 | #let rev_list = (
43 | (rev: [REV2], date: [2024/12/12], body: [
44 | - #lorem(10)
45 | - #lorem(8)
46 | - #lorem(8)
47 | ]),
48 | (rev: [REV1], date: [2012/12/12], body: [
49 | - #lorem(10)
50 | - #lorem(18)
51 | - #lorem(18)
52 | - #lorem(18)
53 | ]),
54 | )
55 |
56 | #set text(lang: "en")
57 |
58 | #show: doc => tids(
59 | ds_metadata: metadata,
60 | features: features,
61 | applications: applications,
62 | desc: desc,
63 | rev_list: rev_list,
64 | doc: doc
65 | )
66 |
67 | = Specifications
68 |
69 | == Pin Configuration and Functions
70 |
71 |
72 | #lorem(30)
73 |
74 | #lorem(30)
75 |
76 | == Specifications
77 |
78 |
79 | #figure(
80 | table(
81 | columns: (1fr, auto, auto, auto, auto, auto, 1fr),
82 | align: (left,center,right,right,right,left,left,),
83 |
84 | table.header([Parameters], [Symbol], [Minimum], [Typical], [Maximum], [Unit], [Condition]),
85 |
86 | [Rated Voltage], [$V_(upright("IN"))$], [5], [—], [24], [V], [—],
87 |
88 | [Rated Current], [$I$], [100], [150], [1,000], [mA], [Using 5V Supply],
89 |
90 | [High-Level Voltage], [$V_(upright("OH"))$], [4.5], [—], [—], [V], [—],
91 |
92 | [Low-Level Voltage], [$V_(upright("OL"))$], [—], [—], [0.5], [V], [—],
93 |
94 | [Output High-Level Current], [$I_(upright("OH"))$], [—], [20], [—], [mA], [—],
95 | ),
96 | caption: "Your Awesome Table 1",
97 | )
98 |
99 | == Absolute Maximum Ratings
100 |
101 |
102 | #figure(
103 | table(
104 | columns: (auto, auto, auto, auto, auto, 1fr),
105 | align: (left,center,right,right,center,left),
106 |
107 | table.header([Parameter], [Symbol], [Minimum Value], [Maximum Value], [Unit], [Note]),
108 |
109 | [Power Supply Voltage], [$V_(upright("IN"))$], [0], [30], [V],[],
110 |
111 | [Ambient Temperature], [$T_A$], [-25], [85], [°C],[],
112 | ),
113 | caption: "Your Awesome Table 2",
114 | )
115 |
116 | #warning(title: "Warning")[
117 | Before start it you must be sure you have enough garbage.
118 | ]
119 |
120 |
121 | #pagebreak()
122 |
123 | = Detailed Description
124 |
125 |
126 | == Overview
127 |
128 | #lorem(200)
129 |
130 | #lorem(200)
131 |
132 | == Functional Block Diagram
133 |
134 | #lorem(200)
135 |
136 | #pagebreak()
137 |
138 | = Application and Implementation
139 |
140 | === Application Information
141 |
142 | #lorem(200)
143 |
144 | #page(flipped: true)[
145 |
146 |
147 | === Typical Applications
148 |
149 | #figure(
150 | rect(image("./assets/741.svg"), stroke: 0.5pt, height: 10cm), caption: "Typical Application"
151 | )
152 |
153 | #lorem(100)
154 | ]
155 |
156 | === Design Requirements
157 |
158 | #lorem(200)
159 |
160 | = Power Supply Recommendations
161 |
162 | #lorem(200)
163 |
164 | === PCB Layout
165 |
166 | #lorem(200)
167 |
168 | #pagebreak()
169 |
170 | = Device and Documentation Support
171 |
172 | === Device Support
173 |
174 | === Related Links
175 |
176 | #lorem(200)
177 |
178 | #pagebreak()
179 |
180 | = Mechanical, Packaging, and Orderable Information
181 |
182 | #figure(
183 | rect(image("assets/dimension.svg"), stroke: 0.5pt, inset: 5%), caption: "Dimensions",
184 | )
185 |
186 | #lorem(30)
187 |
188 | #lorem(30)
189 |
--------------------------------------------------------------------------------
/demo-ds.zh.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oldrev/tids/74621d22df6d0c686102d587c6e3eb72f737dac4/demo-ds.zh.pdf
--------------------------------------------------------------------------------
/demo-ds.zh.typ:
--------------------------------------------------------------------------------
1 | #import "@preview/gentle-clues:1.1.0": *
2 | #import "@preview/cetz:0.3.1": canvas
3 | #import "@preview/cetz-plot:0.1.0": plot, chart
4 | #import "tids.zh.typ": tids
5 |
6 |
7 | #let metadata = (
8 | title: [FXC1117 通量电容器],
9 | product: "FXC1117",
10 | product_url: "https://github.com/oldrev/tids",
11 | )
12 |
13 | #let features = [
14 | - 容量: 1.21 GC
15 | - 输入电压: 88 kV
16 | - 封装:提供 QFN-24 和 BGA-9999 封装
17 | - 材料:先进钽合金半导体
18 | - 频率响应超过 1.21 PHz
19 | - 温度范围: -40°C 到 65535°C
20 | - 稳定性: 高度稳定,适用于极端环境
21 | - 输出电容支持多层陶瓷电容
22 | ]
23 |
24 |
25 | #let applications = [
26 |
27 | 通量电容器是一种先进的电子元件,广泛应用于以下领域:
28 | - 时间旅行技术
29 | - 能源转换
30 | - 电子设备优化
31 | - 空间变形技术
32 | - 量子通信
33 | - 军事渗透用人形终结者
34 |
35 | #figure(
36 | rect(image("./assets/741.svg"), stroke: 0.5pt), caption: "典型应用电路", placement: bottom,
37 | )
38 | ]
39 |
40 | #let desc = [
41 | 通量电容器是一项革命性的电子技术,利用先进的合金和绝缘材料,使其能够在极端条件下运作。其高容量和高工作电压使其成为时间旅行技术和能源转换领域的理想选择。
42 |
43 | 此外,通量电容器还可以应用于电子设备优化、空间变形技术和量子通信等领域。其稳定性和频率响应使其成为未来电子元件领域中的创新产物。
44 |
45 | #figure(
46 | table(
47 | columns: (auto, auto, 1fr),
48 | align: (col, row) => (left,left,left).at(col),
49 | table.header([*零件编号*], [*封装*], [*主体尺寸(标称)*]),
50 |
51 | [FXC1117-A], [BGA-9999], [5mm × 5mm],
52 | [FXC1117-B], [QFN-24], [5mm × 5mm],
53 | ),
54 | caption: "设备信息",
55 | placement: bottom,
56 | )
57 |
58 | #figure(rect(height: 30%,
59 | canvas(length: 0.75cm, {
60 | plot.plot(size: (8, 6),
61 | x-tick-step: 1,
62 | x-ticks: ((-calc.pi, $-pi$), (0, $0$), (calc.pi, $pi$)),
63 | y-tick-step: 1,
64 | {
65 | plot.add(
66 | domain: (-calc.pi, calc.pi), x => calc.sin(x * 1rad))
67 | })
68 | })
69 | ), caption: [超级性能], placement: bottom)
70 |
71 |
72 |
73 | ]
74 |
75 | #let rev_list = (
76 | (rev: [REV2], date: [2024/12/12], body: [
77 | - #lorem(10)
78 | - #lorem(8)
79 | - #lorem(8)
80 | ]),
81 | (rev: [REV1], date: [2012/12/12], body: [
82 | - #lorem(10)
83 | - #lorem(18)
84 | - #lorem(18)
85 | - #lorem(18)
86 | ]),
87 | )
88 |
89 | #set text(lang: "zh")
90 |
91 | #show: doc => tids(
92 | ds_metadata: metadata,
93 | features: features,
94 | applications: applications,
95 | desc: desc,
96 | rev_list: rev_list,
97 | doc: doc
98 | )
99 |
100 | = 硬件规格
101 |
102 | == 接口与功能
103 | <接口与功能>
104 |
105 | #lorem(30)
106 |
107 | #lorem(30)
108 |
109 | == 电气规格
110 | <电气规格>
111 |
112 | #figure(
113 | table(
114 | columns: (auto, auto, auto, auto, auto, auto, 1fr),
115 | align: (col, row) => (left,center,right,right,right,left,left,).at(col),
116 |
117 | table.header([*参数*], [*符号*], [*最小值*], [*典型值*], [*最大值*], [*单位*], [*条件*]),
118 |
119 | [额定电压], [$V_(upright("IN"))$], [5], [—], [24], [V], [—],
120 |
121 | [额定电流], [$I$], [100], [150], [1,000], [mA], [使用 5V 供电],
122 |
123 | [控制信号高电平输出电压], [$V_(upright("OH"))$], [4.5], [—], [—], [V], [—],
124 |
125 | [控制信号低电平输出电压], [$V_(upright("OL"))$], [—], [—], [0.5], [V], [—],
126 |
127 | [控制信号输出高电平拉电流], [$I_(upright("OH"))$], [—], [20], [—], [mA], [—],
128 | ),
129 | caption: "你的超赞表格 1",
130 | )
131 |
132 | == 绝对最大额定值
133 | <绝对最大额定值>
134 | 在超过绝对最大额定值范围内的情况下使用设备可能造成设备永久损坏#footnote[当然我们都希望你把产品损坏了买新的。]。
135 |
136 | #figure(
137 | table(
138 | columns: (auto, auto, auto, auto, auto, 1fr),
139 | align: (col, row) => (left,center,right,right,center,left).at(col),
140 |
141 | table.header([*参数*], [*符号*], [*最小值*], [*最大值*], [*单位*], [*备注*]),
142 |
143 | [电源供电电压], [$V_(upright("IN"))$], [0], [30], [V],[],
144 |
145 | [环境温度], [$T_A$], [-25], [85], [°C],[],
146 | ),
147 | caption: "你的超赞表格 1",
148 | )
149 |
150 | #warning(title: "警告")[
151 | 接入电源之前请先确认电源电压正常、已良好接地且正负极接线正确,否则可能造成设备烧毁或人身伤害。
152 | ]
153 |
154 |
155 | #pagebreak()
156 |
157 | = 详细说明
158 | <详细说明>
159 |
160 | == 总览
161 |
162 | #lorem(200)
163 |
164 | #lorem(200)
165 |
166 | == 功能框图
167 |
168 | #lorem(200)
169 |
170 | #pagebreak()
171 |
172 | = 应用与实现
173 |
174 | === 应用信息
175 |
176 | #lorem(200)
177 |
178 |
179 | #page(flipped: true)[
180 |
181 | === 典型应用
182 |
183 | #figure(
184 | rect(image("./assets/741.svg"), stroke: 0.5pt, height: 10cm), caption: "典型应用"
185 | )
186 |
187 | #lorem(100)
188 |
189 | ]
190 |
191 | === 推荐外围设备
192 |
193 | #lorem(200)
194 |
195 | === PCB 布局指南
196 |
197 | #lorem(200)
198 |
199 | #pagebreak()
200 |
201 | = 设备与文档支持
202 |
203 | === 设备与技术支持
204 |
205 | === 技术支持资源
206 |
207 | #lorem(200)
208 |
209 | #pagebreak()
210 |
211 | = 机械外形、封装与订购信息
212 |
213 | #figure(
214 | rect(image("assets/dimension.svg"), stroke: 0.5pt, inset: 15pt), caption: "机械尺寸",
215 | )
216 |
217 | #lorem(30)
218 |
219 | #lorem(30)
220 |
--------------------------------------------------------------------------------
/gallery/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oldrev/tids/74621d22df6d0c686102d587c6e3eb72f737dac4/gallery/demo.png
--------------------------------------------------------------------------------
/gallery/demo.zh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oldrev/tids/74621d22df6d0c686102d587c6e3eb72f737dac4/gallery/demo.zh.png
--------------------------------------------------------------------------------
/tids.typ:
--------------------------------------------------------------------------------
1 | #import "@preview/cetz:0.3.1": canvas
2 | #import "@preview/cetz-plot:0.1.0": plot, chart
3 |
4 | #let company_info = (
5 | name: "Mingshu Semiconductors Inc.",
6 | logo: "./assets/demo-logo.svg",
7 | website_url: "https://github.com/oldrev",
8 | )
9 |
10 |
11 | #let tids(ds_metadata: (
12 | title: [YourDSTitle],
13 | product: [YourProductName],
14 | product_url: "https://github.com/oldrev/tids",
15 | revision: [CurrentRevision],
16 | publish_date: [PublishedOn]
17 | ), features: [], applications: [], desc: [], rev_list: [], doc: []) = {
18 |
19 | let fonts = (
20 | serif: ("Spectral Regular", "Times New Roman", "Noto Serif", "Liberation Serif"),
21 | sans: ("Dejavu Sans", "Arial", "Noto Sans"),
22 | mono: ("Consolas", "Noto Sans Mono"),
23 | text: ("Arial", "Dejavu Sans"),
24 | text_strong: ("Arial", "Dejavu Sans"),
25 | headings: ("Arial", "Dejavu Sans"),
26 | code: ("Consolas", "Noto Sans Mono"),
27 | )
28 |
29 | set text(font: fonts.text, size: 10.5pt)
30 | show strong: it => text(font: fonts.text_strong, it)
31 | show link: it => text(fill: rgb("#0000FF"))[#it]
32 | set page(paper: "a4")
33 |
34 | // Figure styles
35 | show figure.caption: set text(
36 | weight: "semibold",
37 | font: fonts.headings
38 | )
39 |
40 | // table styles
41 | show figure.where(
42 | kind: table
43 | ): set figure.caption(position: top)
44 |
45 | set table(
46 | stroke: 0.5pt,
47 | fill: (_, y) => if y == 0 { gray.lighten(75%) },
48 | align: (_, y) => if y == 0 { align(center) },
49 | )
50 | show table.header: strong
51 | show table.cell.where(y: 0): set text(weight: "semibold")
52 |
53 |
54 | let lastest_rev = rev_list.first()
55 |
56 | let outline_page() = {
57 | [
58 | #block(height: 40%, [
59 | #columns(2, gutter: 30pt)[
60 | = Contents
61 |
62 | #outline(title: none, depth: 3)
63 | ]
64 | ])
65 |
66 | #line(length: 100%, stroke: 1pt)
67 |
68 | = Revisions
69 |
70 |
71 |
72 | #v(1em)
73 |
74 | #block({
75 | for r in rev_list {
76 | text(font: fonts.sans, weight: "semibold", [#r.rev - #r.date])
77 | v(-0.65em)
78 | line(length: 100%, stroke: 0.3pt)
79 | v(-0.65em)
80 | block(r.body)
81 | v(-0.65em)
82 | line(length: 100%, stroke: 0.65pt)
83 | v(0.65em)
84 | }
85 | })
86 | ]
87 | }
88 |
89 | let page_footer() = {
90 | line(length: 100%, stroke: 1pt)
91 | v(-0.65em)
92 | set text(10pt, baseline: 0pt)
93 | context {
94 | if calc.odd(here().page()) {
95 | grid(
96 | columns: (5fr, 1fr),
97 | rows: (auto),
98 | gutter: 0pt,
99 | [Copyright © #link(company_info.website_url)[#company_info.name]],
100 | [
101 | #set align(right)
102 | #counter(page).display("1 / 1", both: true)
103 | ],
104 | )
105 | } else {
106 | grid(
107 | columns: (1fr, 5fr),
108 | rows: (auto),
109 | gutter: 0pt,
110 | [
111 | #set align(left)
112 | #counter(page).display("1 / 1", both: true)
113 | ],
114 | [
115 | #set align(right)
116 | Copyright © #link(company_info.website_url)[#company_info.name]],
117 | )
118 | }
119 | }
120 | }
121 |
122 | let current_chapter() = context {
123 | let elems = query(
124 | heading.where(level:2).before(loc),
125 | loc,
126 | )
127 | if elems != () {
128 | let elem = elems.last()
129 | h(1fr) + emph(counter(heading).at(loc).map(str).join(".") + h(.75em) + elem.body) + h(1fr)
130 | }
131 | }
132 |
133 | let afterwords_page() = {
134 | [
135 | = Indexing
136 |
137 | #box(height: auto, [
138 | #columns(2, gutter: 30pt)[
139 | == Figures
140 | #outline(
141 | title: none,
142 | target: figure.where(kind: image),
143 | )
144 | #colbreak()
145 |
146 | == Tables
147 | #outline(
148 | title: none,
149 | target: figure.where(kind: table),
150 | )
151 | ]
152 | ])
153 | ]
154 |
155 | }
156 |
157 | let backcover_page() = [
158 | #counter(page).update(n => n - 1)
159 | #set page(
160 | numbering: none,
161 | header: none,
162 | footer: none,
163 | )
164 | #show heading: it => it.body
165 |
166 | #v(2.5cm)
167 |
168 | #align(center)[
169 | #heading(level: 1, outlined: false)[IMPORTANT NOTICE AND DISCLAIMER]
170 | ]
171 |
172 | #lorem(30)
173 |
174 | #lorem(50)
175 |
176 | #lorem(30)
177 | ]
178 |
179 | set par(leading: 0.75em)
180 |
181 | set page(
182 | numbering: "(1 / 1)",
183 | footer-descent: 2em,
184 | header: [
185 | #set text(10pt)
186 | #context {
187 | if calc.odd(here().page()) {
188 | grid(
189 | columns: (1fr, 1fr),
190 | rows: (100%),
191 | gutter: 3pt,
192 | [
193 | #set align(left)
194 | #link(company_info.website_url)[#image(company_info.logo, height: 28pt)]
195 | ],
196 | [
197 | #set align(right)
198 | #link(ds_metadata.product_url)[#ds_metadata.product]
199 | #linebreak()
200 | #lastest_rev.rev - #lastest_rev.date
201 | ],
202 | )
203 | } else {
204 | grid(
205 | columns: (1fr, 1fr),
206 | rows: (100%),
207 | gutter: 3pt,
208 | [
209 | #set align(left)
210 | #link(ds_metadata.product_url)[#ds_metadata.product]
211 | #linebreak()
212 | #lastest_rev.rev - #lastest_rev.date
213 | ],
214 | [
215 | #set align(right)
216 | #link(company_info.website_url)[#image(company_info.logo, height: 28pt)]
217 | ],
218 | )
219 | }
220 | }
221 | #v(-0.65em)
222 | #line(length: 100%, stroke: 1pt)
223 | ],
224 | footer: page_footer(),
225 | // background: rotate(45deg,
226 | // text(80pt, fill: rgb("FFCBC4"))[
227 | // *CONFIDENTIAL*
228 | // ])
229 | )
230 |
231 | set heading(numbering: "1.")
232 |
233 | show heading: it => block([
234 | #v(0.3em)
235 | #text(weight: "bold", font: fonts.headings, [#counter(heading).display() #it.body])
236 | #v(0.8em)
237 | ])
238 |
239 | show heading.where(level: 1): it => {
240 | block([
241 | #text( weight: "bold", font: fonts.headings, [#counter(heading).display() #it.body])
242 | #v(0.3em)
243 | ])
244 | }
245 |
246 | v(-0.65em)
247 | align(center, block({
248 | set text(16pt, font: fonts.headings, weight: "medium")
249 | ds_metadata.title
250 | v(-0.5em)
251 | line(length: 100%, stroke: 1pt)
252 | v(0.3em)
253 | }))
254 |
255 | box(height: auto,
256 | columns(2, gutter: 30pt)[
257 |
258 | #show figure.where(
259 | kind: auto
260 | ): set figure.caption(position: top)
261 |
262 |
263 | = Features
264 |
265 |
266 | #features
267 |
268 | = Applications
269 |
270 |
271 | #applications
272 |
273 | #colbreak()
274 |
275 | = Description
276 |
277 |
278 | #desc
279 |
280 | #figure(rect(height: 30%,
281 | canvas(length: 0.75cm, {
282 | plot.plot(size: (8, 6),
283 | x-tick-step: 1,
284 | x-ticks: ((-calc.pi, $-pi$), (0, $0$), (calc.pi, $pi$)),
285 | y-tick-step: 1,
286 | {
287 | plot.add(
288 | domain: (-calc.pi, calc.pi), x => calc.sin(x * 1rad))
289 | })
290 | })
291 | ), caption: [Awesome Performance])
292 |
293 | ])
294 |
295 | pagebreak()
296 |
297 | outline_page()
298 |
299 | pagebreak()
300 |
301 | // document-body
302 | doc
303 |
304 | pagebreak()
305 |
306 | afterwords_page()
307 |
308 | pagebreak()
309 |
310 | backcover_page()
311 | }
312 |
--------------------------------------------------------------------------------
/tids.zh.typ:
--------------------------------------------------------------------------------
1 | #import "@preview/cetz:0.3.1": canvas
2 | #import "@preview/cetz-plot:0.1.0": plot, chart
3 |
4 | #let company_info = (
5 | name: "命数半导电股份有限公司",
6 | logo: "./assets/demo-logo.svg",
7 | website_url: "https://github.com/oldrev",
8 | )
9 |
10 | #let tids(ds_metadata: (
11 | title: [YourDSTitle],
12 | product: [YourProductName],
13 | product_url: "https://github.com/oldrev/tids",
14 | revision: [CurrentRevision],
15 | publish_date: [PublishedOn]
16 | ), features: [], applications: [], desc: [], rev_list: [], doc: []) = {
17 |
18 | let fonts = (
19 | serif: ("Source Han Serif", "Liberation Serif"),
20 | sans: ("Source Han Sans"),
21 | mono: ("Source Han Mono"),
22 | text: ("Source Han Sans", "Liberation Sans"),
23 | text_strong: ("Source Han Sans"),
24 | headings: ("Source Han Sans"),
25 | code: ("Source Han Mono"),
26 | )
27 |
28 | set text(font: fonts.text, size: 10.5pt)
29 | show strong: it => text(font: fonts.text_strong, weight: "bold", it)
30 | show link: it => text(fill: rgb("#0000FF"))[#it]
31 | set page(paper: "a4")
32 |
33 | // Figure styles
34 | show figure.caption: set text(
35 | weight: "regular",
36 | font: fonts.headings
37 | )
38 |
39 | // table styles
40 | show figure.where(
41 | kind: table
42 | ): set figure.caption(position: top)
43 |
44 | set table(
45 | stroke: 0.5pt,
46 | fill: (_, y) => if y == 0 { gray.lighten(75%) },
47 | align: (_, y) => if y == 0 { align(center) },
48 | )
49 |
50 | show table.cell.where(y: 0): set text(weight: "regular", font: fonts.headings)
51 |
52 |
53 | let lastest_rev = rev_list.first()
54 |
55 | let outline_page() = {
56 | [
57 | #block(height: 40%, [
58 | #columns(2, gutter: 30pt)[
59 | = 目录
60 |
61 | #outline(title: none, depth: 3)
62 | ]
63 | ])
64 |
65 | #line(length: 100%, stroke: 1pt)
66 |
67 | = 修订记录
68 |
69 |
70 |
71 | #v(1em)
72 |
73 | #block({
74 | for r in rev_list {
75 | text(font: fonts.text_strong, weight: "medium", [#r.rev - #r.date])
76 | v(-0.65em)
77 | line(length: 100%, stroke: 0.3pt)
78 | v(-0.65em)
79 | block(r.body)
80 | v(-0.65em)
81 | line(length: 100%, stroke: 0.65pt)
82 | v(0.65em)
83 | }
84 | })
85 | ]
86 | }
87 |
88 | let page_footer() = {
89 | line(length: 100%, stroke: 1pt)
90 | v(-0.65em)
91 | set text(10pt, baseline: 0pt)
92 | context {
93 | if calc.odd(here().page()) {
94 | grid(
95 | columns: (5fr, 1fr),
96 | rows: (auto),
97 | gutter: 0pt,
98 | [Copyright © #link(company_info.website_url)[#company_info.name]],
99 | [
100 | #set align(right)
101 | #counter(page).display("1 / 1", both: true)
102 | ],
103 | )
104 | } else {
105 | grid(
106 | columns: (1fr, 5fr),
107 | rows: (auto),
108 | gutter: 0pt,
109 | [
110 | #set align(left)
111 | #counter(page).display("1 / 1", both: true)
112 | ],
113 | [
114 | #set align(right)
115 | Copyright © #link(company_info.website_url)[#company_info.name]],
116 | )
117 | }
118 | }
119 | }
120 |
121 | let current_chapter() = locate(loc => {
122 | let elems = query(
123 | heading.where(level:2).before(loc),
124 | loc,
125 | )
126 | if elems != () {
127 | let elem = elems.last()
128 | h(1fr) + emph(counter(heading).at(loc).map(str).join(".") + h(.75em) + elem.body) + h(1fr)
129 | }
130 | })
131 |
132 | let cover_page_footer = {
133 | line(length: 100%, stroke: 1pt)
134 | v(-0.65em)
135 |
136 | grid(columns: (auto, 1fr), rows: 1, gutter: 10pt,
137 | align(top, image("assets/octagon-exclamation.svg", height: 9mm)),
138 | box([
139 | #set text(10pt, baseline: 0pt)
140 | *重要须知* 本数据手册末尾的重要通知涉及产品可用性、保修、变更、在安全关键应用中的使用、知识产权问题以及其他重要免责声明。
141 | ]),
142 | )
143 | };
144 |
145 | let cover_page_icon(icon: str, url: str, body: content) = {
146 | link(url,
147 | grid(
148 | rows: 1,
149 | columns: (auto, auto),
150 | align: horizon,
151 | column-gutter: 3pt,
152 | row-gutter: 0pt,
153 | image(icon, height: 6.5mm),
154 | align(left, {
155 | set par(leading: 1mm)
156 | set text(9pt, fill: black)
157 | body
158 | })
159 | )
160 | )
161 | }
162 |
163 | let cover_page() = page(
164 | margin: (top: 16mm, left: 1in, right: 15mm),
165 | header: none,
166 | header-ascent: 0%+0pt,
167 | footer: cover_page_footer
168 | )[
169 |
170 | #show figure.where(
171 | kind: auto
172 | ): set figure.caption(position: top)
173 |
174 | #grid(
175 | columns: 1,
176 | rows: (auto, auto, auto, auto, 1fr),
177 |
178 | align(center, grid(
179 | columns: (auto, auto, auto, auto, auto, auto),
180 | rows: (auto),
181 | gutter: 15pt,
182 | align: center,
183 |
184 | cover_page_icon(icon: "assets/icons/folder.svg", url: "https://github.com/oldrev", body: [产品#linebreak()目录]),
185 | cover_page_icon(icon: "assets/icons/cart.svg", url: "https://github.com/oldrev", body: [样品#linebreak()购买]),
186 | cover_page_icon(icon: "assets/icons/tools.svg", url: "https://github.com/oldrev", body: [工具与#linebreak()软件]),
187 | cover_page_icon(icon: "assets/icons/doc.svg", url: "https://github.com/oldrev", body: [技术#linebreak()文档]),
188 | cover_page_icon(icon: "assets/icons/doc.svg", url: "https://github.com/oldrev", body: [支持与#linebreak()社区]),
189 | cover_page_icon(icon: "assets/icons/doc.svg", url: "https://github.com/oldrev", body: [参考#linebreak()设计]),
190 | )),
191 |
192 | v(5mm),
193 |
194 | grid(
195 | row-gutter: 3pt,
196 | rows: (auto, auto),
197 | grid(
198 | columns: (1fr, 1fr),
199 | rows: (auto),
200 | gutter: 0pt,
201 | [
202 | #set align(left)
203 | #link(company_info.website_url)[#image(company_info.logo, height: 28pt)]
204 | ],
205 | [
206 | #set align(right)
207 | #link(ds_metadata.product_url)[*#ds_metadata.product*]
208 | #linebreak()
209 | #lastest_rev.rev - #lastest_rev.date
210 | ],
211 | ),
212 | line(length: 100%, stroke: 1pt + black),
213 | ),
214 |
215 | grid(
216 | columns: 1,
217 | row-gutter: 5pt,
218 | [#line(length: 100%, stroke: 1pt + black)],
219 | [
220 | #set text(18pt, font: fonts.headings, weight: "medium")
221 | #align(center, ds_metadata.title)
222 | ],
223 | [#line(length: 100%, stroke: 1pt + black)],
224 | ),
225 |
226 | box(height: auto, inset: (x: 0pt, y: 3mm),
227 | columns(2, gutter: 30pt)[
228 |
229 | = 特性
230 |
231 |
232 | #features
233 |
234 | = 用途
235 |
236 |
237 | #applications
238 |
239 | #colbreak()
240 |
241 | = 产品简介
242 | <产品简介>
243 |
244 | #desc
245 |
246 | ])
247 | )
248 | ]
249 |
250 | let backcover_page() = [
251 | #counter(page).update(n => n - 1)
252 | #set page(
253 | numbering: none,
254 | header: none,
255 | footer: none,
256 | )
257 | #show heading: it => it.body
258 |
259 | #v(2.5cm)
260 |
261 | #align(center)[
262 | #heading(level: 1, outlined: false)[重要通知和声明]
263 | ]
264 |
265 | #lorem(30)
266 |
267 | #lorem(50)
268 |
269 | #lorem(30)
270 |
271 | #v(2.5cm)
272 | #align(center)[
273 | *本文为演示排版功能,内容纯属虚构。如有雷同,纯属巧合!*
274 | ]
275 | ]
276 |
277 | let afterwords_page() = [
278 | = 文档索引
279 |
280 | #box(height: auto, [
281 | #columns(2, gutter: 30pt)[
282 | == 图表索引
283 | #outline(
284 | title: none,
285 | target: figure.where(kind: image),
286 | )
287 | #colbreak()
288 | == 表格索引
289 | #outline(
290 | title: none,
291 | target: figure.where(kind: table),
292 | )
293 | ]
294 | ])
295 | ]
296 |
297 |
298 | set par(leading: 0.75em)
299 |
300 | set page(
301 | numbering: "(1 / 1)",
302 | footer-descent: 2em,
303 | header: [
304 | #set text(10pt)
305 | #context {
306 | if calc.odd(here().page()) {
307 | grid(
308 | columns: (1fr, 1fr),
309 | rows: (100%),
310 | gutter: 3pt,
311 | [
312 | #set align(left)
313 | #link(company_info.website_url)[#image(company_info.logo, height: 28pt)]
314 | ],
315 | [
316 | #set align(right)
317 | #link(ds_metadata.product_url)[*#ds_metadata.product*]
318 | #linebreak()
319 | #lastest_rev.rev - #lastest_rev.date
320 | ],
321 | )
322 | } else {
323 | grid(
324 | columns: (1fr, 1fr),
325 | rows: (100%),
326 | gutter: 3pt,
327 | [
328 | #set align(left)
329 | #link(ds_metadata.product_url)[*#ds_metadata.product*]
330 | #linebreak()
331 | #lastest_rev.rev - #lastest_rev.date
332 | ],
333 | [
334 | #set align(right)
335 | #link(company_info.website_url)[#image(company_info.logo, height: 28pt)]
336 | ],
337 | )
338 | }
339 | }
340 | #v(-0.65em)
341 | #line(length: 100%, stroke: 1pt)
342 | ],
343 | footer: page_footer(),
344 | // background: rotate(45deg,
345 | // text(80pt, fill: rgb("FFCBC4"))[
346 | // *CONFIDENTIAL*
347 | // ])
348 | )
349 |
350 | set heading(numbering: "1.")
351 |
352 | show heading: it => block([
353 | #v(0.3em)
354 | #text(weight: "bold", font: fonts.headings, [#counter(heading).display() #it.body])
355 | #v(0.8em)
356 | ])
357 |
358 | show heading.where(level: 1): it => {
359 | block([
360 | #text( weight: "bold", font: fonts.headings, [#counter(heading).display() #it.body])
361 | #v(0.3em)
362 | ])
363 | }
364 |
365 |
366 | cover_page()
367 |
368 | pagebreak()
369 |
370 | outline_page()
371 |
372 | pagebreak()
373 | // document-body
374 | doc
375 |
376 | pagebreak()
377 |
378 | afterwords_page()
379 |
380 | pagebreak()
381 |
382 | backcover_page()
383 | }
384 |
--------------------------------------------------------------------------------