pcb-schematic-template
¶
The pcb-schematic-template
statement defines the appearance of a schematic page.
Outline¶
pcb-schematic-template (arg1:Type1, ...) :
name = <String>
description = <String>
width = <Int>
height = <Int>
author-table = <AuthorTable>
name
- This name is used in the Board UI as a more user friendly name.
* description
- This string provides more meta-data for the template.
* width
- The width of the author block. A positive integer. Defaults to 108 if not provided.
* height
- The height of the author block. A positive integer. Defaults to 32 if not provided.
* author-table
- An arbitrary table that populates the author block. See jitx/schematic-table for more details.
Usage¶
Below is an example of a non-trivial table in the schematic's author block. Tables are defined HTML-style: A table is a tuple of rows, and a row is a tuple of cells. A cell can either contain a string literal or another table.
Rows have an optional height parameter. This value is a double, and is
interpreted as a percentage of the overall table height. That is,
height = 0.7
means that the row will be 70% of the overall block height.
If a height parameter is not provided, the available space will be evenly
divided between all rows.
Cells work the same way, but with a width
parameter instead of height
.
There are three special string literals. Each one is dynamically substituted
for information from the schematic UI:
* >TITLE
: Sheet title
* >SHEET
: Sheet index
* >NUMSHEETS
: Total number of sheets
Below is an example of constructing an AuthorTable
.
See jitx/schematic-table for more details.
pcb-schematic-template my-schematic :
width = 108 ; This is the default width value and could be omitted with no change
height = 32; This is the default width value and could be omitted with no change
author-table = AuthorTable(
[
AuthorRow([
DataCell(
; This is a special placeholder string; it will be substituted with the sheet title
">TITLE"
; This row will be 70% the width of the entire table
width = 0.7
),
TableCell(AuthorTable([
AuthorRow([DataCell("JITX Inc.")]),
; These are also special placeholder strings
; ">SHEET" references the page number
; ">NUMSHEETS" references the total number of pages
AuthorRow([DataCell("sheet >SHEET/>NUMSHEETS")],
; This row will be 30% the height of the containing table
height = 0.3)]
))]
)
AuthorRow([
DataCell("October 23, 2024")]
; This row will be 20% the height of the containing table
height = 0.2
)
]
)
The table definition above renders the following in the schematic UI: