-
Notifications
You must be signed in to change notification settings - Fork 24
Style Guide
Drew Lewis edited this page Nov 13, 2024
·
7 revisions
Discussion: https://github.com/TeamBasedInquiryLearning/library/discussions/63
Follow these style suggestions while authoring all materials for the TBIL Resource Library.
- In a
<definition>
, be sure to enclose the term being defined in a<term>
tag. - Graphs should be produced with a
<sageplot>
, whenever possible. Note that this is likely to change in the future -- a new method of generating graphs is under development (but not yet ready) that will provide more accessibility benefits. - It is also best practice to write the
<sageplot>
(or other image generating code) in a separate file, and include it into the text (this will allow you to use characters like<
,>
, and&
without escaping). - To add instructor notes, use the following :
<commentary component="instructor">
<title>Instructor Note</title>
<p>Your note goes here.</p>
</commentary>
- In an
<activity>
that uses<task>
s, be sure to include the content of the<task>
in a<statement>
. This ensures that if an<answer>
is provided (for an instructor version) that it behaves properly. - In an
<answer>
, use the following format:- Write letter of answer choice if multiple choice. Write out answer if not multiple choice.
- If needed, write rationale for the distractors or facilitation notes in a new paragraph.
<answer>
<p>Letter or answer</p>
<p>Rationale</p>
</answer>
- If you want to use a table within an
<answer>
or something else that only appears in the instructor version, use a bare<tabular>
without a<table>
to prevent it from being numbered. Otherwise in the student version, the numbers will appear to jump. - You can also use a bare
<tabular>
in an activity to prevent the table from being numbered. Probably the only reason you would want it numbered is so you can reference it elsewhere.
- For numbers with four or more digits, use
{,}
to obtain comma separators without unneeded whitespace: e.g.$1{,}000$ rather than$1,000$ . - We generally prefer to use
\dfrac
rather than\frac
, except possibly when doing a complex fraction like$\frac{1}{x+\frac{1}{x}}$ , or when the fraction is in a subscript or superscript such as$7^{\frac{1}{2}}$
- Wherever possible, use syntax that parses as valid Python, to be kind to Python syntax highlighters. E.g. use
[1,2,3,4,5]
in place of[1..5]
.