-
Notifications
You must be signed in to change notification settings - Fork 133
Contributing Exercise Solutions
martin-henz edited this page Oct 12, 2019
·
4 revisions
If you want to contribute to exercise solutions, you need to know the structure of SNIPPET tags. Here are the components:
-
NAME: optional; at most one; allows otherSNIPPETs to refer to and "require" this program. Example:<NAME>my_program</NAME> -
REQUIRES: optional; multiple allowed; allows thisSNIPPETto recursively include other snippets by including their name. Example:<REQUIRES>my_other_program</REQUIRES>. All "required" programs are placed before the snippet when displayed in the Source Academy. The "required" programs are not displayed in the textbook editions. -
EXAMPLE: optional; at most one; allows thisSNIPPETto recursively include anotherSNIPPETby including its name. Example:<EXAMPLE>my_example_program</NAME>. The "example" program is placed after the snippet when displayed in the Source Academy. The "example" program is not displayed in the textbook editions. -
SCHEME: optional; here goes the Scheme version; feel free to ignore -
JAVASCRIPT: required for all practical purposes: Include the JavaScript version here.
Attributes of SNIPPET tags include:
-
HIDE = yes: (default: no) The program is not displayed in the textbook editions. -
LATEX = yes: (default: no) The program contains LaTeX formulas using $$ syntax. -
EVAL = no: (default: yes) The program is not clickable.