Skip to content

SNIPPET

martin-henz edited this page Apr 22, 2020 · 17 revisions

Attributes of SNIPPET include:

  • EVAL: default: "yes", if "no": no link to a runnable program is generated.
  • LATEX: default: "no", if "yes": the body contains LaTeX
  • HIDE: default: "no", if "yes": do not include this snippet in any output
  • HIDE_EXPECTED_PDF: default: "no", if "yes": do not add the EXPECTED tag in the PDF in italics after the text of the SNIPPET

Tags within SNIPPET include:

  • REQUIRE: the name of another SNIPPET, which is recursively included in the runnable program.
  • NAME: a string that identifies the SNIPPET for REQUIRE
  • EXPECTED: If a SNIPPET s has an EXAMPLE tag, and the EXAMPLE tag has an EXPECTED tag, the content of the EXPECTED tag is appended in comment for the generated file for s in js_programs; the comment has the shape: // result: <EXPECTED> where <EXPECTED> is the string in the EXPECTED tag. If a SNIPPET has an EXPECTED tag, the content is added in the PDF in italics after the text of the SNIPPET, unless HIDE_EXPECTED_PDF="yes"
  • EXAMPLE: the name of another SNIPPET, which is included after all REQUIREd SNIPPETs; note that the REQUIREd SNIPPETs of the EXAMPLE snippet are ignored
  • JAVASCRIPT: the JavaScript source for display; for running, REQUIRE snippets are recursively added
  • JAVASCRIPT_RUN: the JavaScript source for running. Overrides JAVASCRIPT if present. REQUIRE snippets are recursively added
Clone this wiki locally