Text formatting

Text is stored exactly as you type it. A little notation is drawn as formatting when the text is shown: bold, italic, code, maths, links, and cites of requirements, verifications and runs. A requirement's body and a verification's description can also hold headings, lists, quotes, tables, code blocks, diagrams and display maths (see Blocks in a body or a description). Each form with a formatted field has a one-line reminder under it.

Where it applies

FieldFormatting
Requirement bodyAll of it, and blocks
Requirement statementAll of it except blocks
Verification descriptionAll of it, and blocks
Mapping notesAll of it
Run record, and a run row's notesAll of it
List descriptionAll of it except cites: HW-3 stays as text
Titles and names (requirement, list, verification)Maths, code and backslash escapes only
Run notesNone. They are only ever shown in their edit box.

Bold, italic and code

You typeShown as
**shall not**shall not
*nominal*nominal
`PWR_CTRL[3]`PWR_CTRL[3]
`**not bold**`**not bold**

Maths

Text between single dollar signs is typeset as TeX, using KaTeX.

You typeShown as
$\tau = RC$τ=RC\tau = RC
$I_{max} \le 2\,\mathrm{A}$Imax≤2 AI_{max} \le 2\,\mathrm{A}
$V_{out} = V_{ref}\left(1 + \frac{R_1}{R_2}\right)$Vout=Vref(1+R1R2)V_{out} = V_{ref}\left(1 + \frac{R_1}{R_2}\right)

The app draws these with KaTeX's own fonts, so they look a little different there from this page.

A URL starting with http:// or https:// becomes a link that opens in a new tab. Punctuation at the end, such as a full stop, is left out of the link, and so is a closing bracket that has no opening bracket inside the URL:

See the regulator datasheet (https://example.com/datasheets/tps62133.pdf).

Cites

A cite of a requirement, verification or run that exists becomes a link to it, drawn with its current status:

You typeShown as
Derived from HW-3.Derived from HW-3.
Checked by VERIF-PWR.Checked by VERIF-PWR.
Failed in VERIF-PWR:RUN-3.Failed in VERIF-PWR:RUN-3.
See the FW list.See the FW list.
Per ISO-9001.Per ISO-9001.

Backslash escapes

You typeShown as
\*not italic\**not italic*
Unlike \HW-3, thisUnlike HW-3, this
C:\tempC:\temp

A backslash before punctuation shows that character as typed. Before a cite or URL, the backslash is hidden and the cite or URL is not linked. Any other backslash is shown.

Blocks in a body or a description

A requirement's body and a verification's description are read as a series of blocks. A block starts at the beginning of a line, and indentation before it is allowed. Everything above still works inside paragraphs, headings, list items, quotes and table cells. A line ending inside a paragraph is shown as a line break, and a blank line starts a new paragraph.

You typeShown as
# Limits to ###### LimitsA heading, one level for each #
- 3.3 V rail or * 3.3 V railA bulleted list item
1. Enable the regulatorA numbered list item. The list counts from the first number.
> Per the supplier's note.A quote
--- or *** on its own lineA horizontal rule
[datasheet](https://example.com/tps.pdf)A link labelled datasheet
![pinout](https://example.com/pins.png)For now, a link to the image labelled pinout

Code blocks

Three backticks on their own line start a code block, and three more end it. A word after the opening backticks names the language, shown in the block's corner. Nothing inside is formatted, and nothing inside is a cite.

Blocks in these languages are coloured. Comments, keywords, strings and numbers each get a colour. The stored text is exactly what was typed, and copying the block copies that.

LanguageNames after the backticks
C and C++c h cpp c++ cc cxx hpp
Pythonpython py
Rustrust rs
Shellsh bash shell
Verilog and SystemVerilogv sv verilog systemverilog
VHDLvhdl
JSON, SQL, YAMLjson sql yaml yml

Any other language is shown in one colour. A mermaid or plantuml block is drawn as a diagram (below), and a wavedrom block is kept for later and shown as code for now.

```c
/* Enable the 3V3 rail. */
if (state == 1) {
    log("rail");
}
```

Inline code, the tree's tooltip and the editor's Markdown view are never coloured.

A line such as +------+------+ starts a block that is shown exactly as typed, up to the next blank line. These lines are kept for tables with merged cells.

Diagrams

A code block with the language mermaid is drawn as a Mermaid diagram. The block's text is the diagram's source, and the source is what is saved: the drawing is made again each time it is shown.

```mermaid
stateDiagram-v2
  [*] --> Idle
  Idle --> Charging: plug in
  Charging --> Fault: over temperature
  Fault --> Idle: reset
```
A state diagram: a start mark, then Idle, Charging and Fault. Plug in goes from Idle to Charging, over temperature from Charging to Fault, and reset from Fault back to Idle.
The same source, drawn. The app uses its own font and greys, and scrolls a wider diagram sideways in its box.

PlantUML diagrams

A code block with the language plantuml is drawn as a PlantUML diagram. PlantUML has timing, state, sequence and component diagrams, among others, which suit hardware and firmware. It runs on BreezeBlock's own server, which reaches nothing outside it. As for Mermaid, the source is what is saved.

```plantuml
@startuml
clock "SCLK" as clk with period 1
binary "CS" as cs
concise "MOSI" as mosi
@0
cs is high
mosi is idle
@1
cs is low
mosi is "0xA5"
@5
cs is high
mosi is idle
@enduml
```
A timing diagram: SCLK clocks throughout, CS is high, goes low at 1 and high again at 5, and MOSI carries 0xA5 while CS is low.
The same source, drawn.

In the tree's tooltip a diagram is one line, such as Mermaid diagram or PlantUML diagram.

Display maths

A line holding only $$ starts an expression shown on its own lines, and the next such line ends it. A code block with the language math does the same.

$$
V_{out} = V_{ref}\left(1 + \frac{R_1}{R_2}\right)
$$

Tables

A table is a header row, a row of dashes under it, and then its rows. | separates the cells.

| Rail | Min  | Max  | Notes              |
|:-----|-----:|-----:|--------------------|
| 3V3  | 3.20 | 3.40 | At 2 A, see HW-2   |
| 1V8  | 1.71 | 1.89 | Ripple $< 20$ mV   |

A table is as wide as its text needs, and a long cell wraps. A table wider than its column scrolls sideways in its own box. From the keyboard, Tab to it and use the arrow keys.

A requirement has one status, however much its body holds. If its body is a table of twenty limits and one limit fails, the requirement fails, and the status does not say which limit. Record which rows passed and which failed in the run row's notes, or make each limit a child requirement so that each has a status of its own.

In the tree

Hovering a row's body mark shows the first ten lines of the body that are not blank, with every block at one size and headings in bold. A table shows one line per row, cut off at the tooltip's edge, and its row of dashes is not counted. When there is more, the last line says how many lines were left out.

Cited in

When a requirement, verification or run is cited in written text, its page lists where under Cited in, with a count. A requirement's pane shows it after Verified by; a verification's page shows it at the end; a run's page shows it below the rows. When nothing cites it, the section is not shown.

Each place that cites it is one block, headed by that requirement, verification or run. Under the heading, each field that cites it is labelled the way the app labels it elsewhere, with the words around each mention:

HW-1Power supply

Statement: …from a 12 V input, with inrush current limited as in HW-4

Mapping to VERIF-PWR: …with the electronic load at 2 A, after the HW-4 soft-start has finished…

The heading opens that page. The cited field is briefly highlighted when it opens, and scrolled into view if needed. When the cite is in a mapping's notes or a run row's notes, the link's address names that row (ending #map-VERIF-PWR or #row-HW-4), so a copy of it, a reload, or Back and Forward open the page at the same row. The first 10 places are shown; Show all, with the total, shows the rest.

What counts

Only text in its current form counts. These are the places a cite is collected from:

TextShown as
A requirement's statement and bodyStatement, Body
The latest committed version of a verification's descriptionDescription
An open mapping's notesMapping to VERIF-PWR, or Mapping to HW-3
A run's recordRecord
A run row's notesRow HW-4