Docs for the latest release, v0.2.0.
Tiza GitHub

Reference

Change commands

Use these commands to change or delete an annotation. Each command except :clear takes the id of an annotation, for example a1. The status bar shows the id when you add an annotation. The annotation list (L) also shows it.

Each image on this page is a frame of a tiza render export. The code is examples/ownership.rs. The first command of each frame adds the annotation that the second command changes. A deleted annotation draws nothing, so :step ID N, :del and :clear have no frame.

:label

Changes the label of an annotation.

:label ID TEXT

For example, change the label of the highlight a1:

The span &t on line 7 has the label read only.

examples/ownership.rs, lines 6 to 8

:hl 7:&t shared borrow
:label a1 read only

Open lines 6 to 8 of examples/ownership.rs: tiza examples/ownership.rs:6-8 --no-save. Then type the commands.

Notes on :label

  • :label also changes the text of a note and the title of a callout.
  • A spotlight has no label. :label does not change it.

:color

Changes the color of an annotation.

:color ID COLOR

COLOR is a color name, #rrggbb or auto. auto gives the default color back. The color names are in Color names.

The span &t on line 7 and its label shared borrow are green.

examples/ownership.rs, lines 6 to 8

:hl 7:&t shared borrow
:color a1 green

Open lines 6 to 8 of examples/ownership.rs: tiza examples/ownership.rs:6-8 --no-save. Then type the commands.

Notes on :color

  • :color ID without a color sets auto.

:set

Changes one or more properties of an annotation.

:set ID KEY=VALUE…

For example, make an arrow thick and give it a bar head:

A thick arrow goes from t on line 6 to &t on line 7, and ends with a bar.

examples/ownership.rs, lines 6 to 8

:arrow 6:t/2 7:&t borrow
:set a1 stroke=thick end=bar

Open lines 6 to 8 of examples/ownership.rs: tiza examples/ownership.rs:6-8 --no-save. Then type the commands.

:set takes these properties:

PropertyAnnotations
label, color and stepAll the annotations. label is the text of a note and the title of a callout.
textA callout: its paragraph. All the other annotations: the same as label.
titleThe same as label.
stroke, route, heads, start and endArrows.
border, corners and fillBoxes and callouts.
emphasisHighlights and marks.
effectAll the annotations. Experimental: draw, fade or none. See Enter effects.

The values are the same as in Annotation commands. The fields are in Annotations.

Notes on :set

  • label also has the name title. On all the annotations except a callout, it also has the name text.
  • On a highlight, emphasis also has the name style.
  • effect=none removes the enter effect. effect=draw needs a stroke: a box, a callout, an arrow, or a highlight or a mark with the emphasis underline, brackets or strike.
  • Tiza also checks the stroke when you change the emphasis of an annotation with draw: emphasis=fill gives an error. Set effect=fade or effect=none first.

:step ID N

Moves an annotation to step N.

:step ID N

For example, :step a3 2 moves a3 to step 2.

  • N is a step from 1 to the step after the last step.
  • :step N without an id goes to a step. See :step.

:del

Deletes one or more annotations.

:del ID…

For example, :del a2 a5 deletes a2 and a5.

  • :del deletes the ids in order. It stops at the first id that does not exist. It keeps the deletes before that id.
  • :del records one undo step for each id. For example, after :del a1 a2, one u brings back only a2. Press u again to bring back a1.

:clear

Deletes the annotations of all the steps, or of one step.

:clear
:clear N
:clear .
  • :clear deletes all the annotations.
  • :clear N deletes the annotations of step N.
  • :clear . deletes the annotations of the step on screen.
  • u undoes :clear.