caption

The caption command is accepted and does nothing, because it only sets the caption of a picture James never draws.

Syntax

caption cap <text>
caption on
caption off

cap introduces the caption text, which is the rest of the line, comment markers included. on and off take no text.

What it does

James reads the command and discards it. The command sets the caption of a graphics window, and James has no window. It does not touch the mesh or the mesh file; use title for text the file stores.

When James applies it

When it is read, and then nothing happens. It is legal in any phase: Control, Part or Merge.

Rules James adds

  • Every command that only controls the picture is a silent no-op, with no diagnostic, so a recorded session that holds such commands still runs to the end.
  • After caption cap, the text is raw: $, # and c in it are not comments. After caption on or caption off, a trailing comment is a comment.

Diagnostics

  • E0217: the word after caption is not cap, on or off.

Example

The script tests/corpus/127-caption-cap-raw-text-protected/input.tg, which make test runs:

caption cap A rod c with $ signs
caption on $ trailing comment

The $ signs inside the cap text survive, which the prep dump shows as caption cap A rod c with $ signs. The trailing comment after caption on is dropped, so the dump shows caption on alone.

See also

  • title: the text James stores in the file.
  • interrupt: another accepted command that does nothing.
  • Writing a script: comments and the raw-text commands.

James 0.3.1.

This site uses Just the Docs, a documentation theme for Jekyll.