diff --git a/quick-reference.markdown b/quick-reference.markdown index 0359b83..47ba421 100644 --- a/quick-reference.markdown +++ b/quick-reference.markdown @@ -2,7 +2,7 @@ ## Conventions -* All items, elements, and attributes are listed in alphabetical order. When there are multiple elements for the same item, there is no preference for any particular element over another, as long as the resulting markup is well-formed. +* All items and elements are listed in alphabetical order. Attributes are listed in alphabetical order with required attributes first. When there are multiple elements for the same item, there is no preference for any particular element over another, as long as the resulting markup is well-formed. * Typical EBNF-style notation applies: `[ ]` indicates optional, `|` indicates alternation, `{ }` indicates repetition, etc. * **bold** indicates a default value. @@ -55,6 +55,12 @@ | underline | `u` | | | | `underline` | | +### Number formatting (`number-formatting.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| formatted number | `number` | | + ### Font size and style (`fonts.xml`) | Item | Element(s) | Attributes | Notes @@ -103,75 +109,96 @@ | verbatim (inline) | `inline-verbatim` | | | | `verb` | | -## Miscellaneous symbols (miscellaneous-symbols.xml) +### Miscellaneous symbols (`miscellaneous-symbols.xml`) -| Item | Element(s) | Attributes | Notes -| ---- | ---------- | ---------- | ----- -| # | `hash` | | U+0023 NUMBER SIGN -| | `number-sign` | | -| | `sharp` | | -| $ | `dollar` | | U+0024 DOLLAR SIGN -| | `dollar-sign` | | -| % | `percent` | | U+0025 PERCENT SIGN -| | `percent-sign` | | -| | `percentage-sign` | | -| & | `ampersand` | | U+0026 AMPERSAND -| \ | `backslash` | | U+005C REVERSE SOLIDUS -| _ | `low-line` | | U+005F LOW LINE -| | `underscore` | | -| { | `left-brace` | | U+007B LEFT CURLY BRACKET -| | `left-curly-brace` | | -| | `left-curly-bracket` | | -| } | `right-brace` | | U+007D RIGHT CURLY BRACKET -| | `right-curly-brace` | | -| | `right-curly-bracket` | | -| ° | `degree-sign` | | U+00B0 DEGREE SIGN -| | `degrees` | | -| § | `section-sign` | | U+00A7 SECTION SIGN -| © | `copyright-sign` | | U+00A9 COPYRIGHT SIGN -| ¶ | `paragraph-sign` | | U+00B6 PILCROW SIGN -| | `pilcrow` | | -| | `pilcrow-sign` | | -| ‒ (number dash) | `figure-dash` | | U+2012 FIGURE DASH -| | `number-dash` | | -| – (en dash) | `en-dash` | | U+2013 EN DASH -| | `endash` | | -| | `n-dash` | | -| | `ndash` | | -| — (em dash) | `em-dash` | | U+2014 EM DASH -| | `emdash` | | -| | `m-dash` | | -| | `mdash` | | -| ’ | `apostrophe` | | U+2019 RIGHT SINGLE QUOTATION MARK -| | `right-single-quotation-mark` | | -| † | `dag` | | U+2020 DAGGER -| | `dagger` | | -| ‡ | `ddag` | | U+2021 DOUBLE DAGGER -| | `ddagger` | | -| | `double-dagger` | | -| … | `dots` | | U+2026 HORIZONTAL ELLIPSIS -| | `ellipsis` | | -| | `ellipsis-sign` | | -| | `etc` | | -| | `horizontal-ellipsis` | | -| ™ | `tm` | | U+2122 TRADE MARK SIGN -| | `trade-mark-sign` | | -| | `trademark` | | -| | `trademark-sign` | | -| LaTeX logo | `LaTeX` | | -| | `latex` | | +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| # | `hash` | | U+0023 NUMBER SIGN +| | `number-sign` | | +| | `sharp` | | +| $ | `dollar` | | U+0024 DOLLAR SIGN +| | `dollar-sign` | | +| % | `percent` | | U+0025 PERCENT SIGN +| | `percent-sign` | | +| | `percentage-sign` | | +| & | `ampersand` | | U+0026 AMPERSAND +| \ | `backslash` | | U+005C REVERSE SOLIDUS +| _ | `low-line` | | U+005F LOW LINE +| | `underscore` | | +| { | `left-brace` | | U+007B LEFT CURLY BRACKET +| | `left-curly-brace` | | +| | `left-curly-bracket` | | +| } | `right-brace` | | U+007D RIGHT CURLY BRACKET +| | `right-curly-brace` | | +| | `right-curly-bracket` | | +| ° | `degree-sign` | | U+00B0 DEGREE SIGN +| | `degrees` | | +| § | `section-sign` | | U+00A7 SECTION SIGN +| © | `copyright-sign` | | U+00A9 COPYRIGHT SIGN +| ¶ | `paragraph-sign` | | U+00B6 PILCROW SIGN +| | `pilcrow` | | +| | `pilcrow-sign` | | +| ‒ (number dash) | `figure-dash` | | U+2012 FIGURE DASH +| | `number-dash` | | +| – (en dash) | `en-dash` | | U+2013 EN DASH +| | `endash` | | +| | `n-dash` | | +| | `ndash` | | +| — (em dash) | `em-dash` | | U+2014 EM DASH +| | `emdash` | | +| | `m-dash` | | +| | `mdash` | | +| ’ | `apostrophe` | | U+2019 RIGHT SINGLE QUOTATION MARK +| | `right-single-quotation-mark` | | +| † | `dag` | | U+2020 DAGGER +| | `dagger` | | +| ‡ | `ddag` | | U+2021 DOUBLE DAGGER +| | `ddagger` | | +| | `double-dagger` | | +| … | `dots` | | U+2026 HORIZONTAL ELLIPSIS +| | `ellipsis` | | +| | `ellipsis-sign` | | +| | `etc` | | +| | `horizontal-ellipsis` | | +| ™ | `tm` | | U+2122 TRADE MARK SIGN +| | `trade-mark-sign` | | +| | `trademark` | | +| | `trademark-sign` | | +| LaTeX logo | `LaTeX` | | +| | `latex` | | -## Special characters (`special-characters.xml`) +### Special characters (`special-characters.xml`) | Item | Element(s) | Attributes | Notes | ---- | ---------- | ---------- | ----- +| discretionary hyphen | `hyphen` | | | forced space | `space` | | U+0020 SPACE | non-breaking space | `nbsp` | | | | `no-break-space` | | | | `non-breaking-space` | | | thin space | `thin-space` | | | | `thinspace` | | -| discretionary hyphen | `hyphen` | | + +## Document structure + +### Sections (`sectioning.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| section | `section` | `label=`*``* | +| section title | `title` | | within `
` + +### Document title (`titling.xml`) + +These all occur at the top level of the enclosing `` element. + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| document author | `author` | | +| document date | `date` | | +| assessment due date | `due-date` | | only relevant if `/document/@class = "assignment"` +| document title | `title` | | +| document sub-title | `subtitle` | | ## Bibliographies (`bibliography.xml`) @@ -371,6 +398,68 @@ | ω | `omega` | | U+03C9 GREEK SMALL LETTER OMEGA | Ω | `capital-omega` | | U+03A9 GREEK CAPITAL LETTER OMEGA +## Teaching related items + +### Otago specific elements (`otago-specific.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| paper code | `paper` | | +| paper number | `paper-number` | | within `` +| subject code | `subject-code` | | within `` + +### Questions and answers (`q-and-a.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| answer | `answer` | `[hide=`**`no`**`|yes]` | +| exercise | `exercise` | `label=`*``* | numbered exercise, in box +| question | `question` | | + +### Teaching dates (`paper-calendar-dates.xml`) + +Note that `paper-calendar-dates.xml` is generated for a particular year by `generate-calendar-dates.php`. + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| date | `TeachingPeriodDate` | `period=FY|S1|S2|SS|YY` | +| | | `week=`*``* | within period +| | | `[format=day|day-short|day-short+year|day+long-name|` | +| | | `day+short-name|day+year|`**`ISO`**`|`*``*`]` | +| | | `[offset=(+|-)`*``*`]` | e.g., “P1D”, “-P4D” +| date range | `TeachingPeriodDateRange` | `format=long|short` | +| | | `period=FY|S1|S2|SS|YY` | +| | | `week=`*``* | within period +| | | `[wrap=no|`**`yes`**`]` | + +### Teaching calendar (`paper-calendar.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| assessment | `assessment` | `[rows=`*``*`]` | **`calendar/@lectures-per-week`** +| calendar table | `calendar` | `lectures-per-week=`*``* | +| | | `number-of-weeks=`*``* | +| | | `[number-laboratories=no|`**`yes`**`]` | +| | | `[number-lectures=no|`**`yes`**`]` | +| | | `[number-tutorials=no|`**`yes`**`]` | +| footer row | `footer` | | +| header row | `header` | | +| note | `note` | `[num-columns=`*``*`]` | **all columns** +| laboratory | `laboratory` | `[number=no|yes]` | **`yes`** or **`calendar/@number-laboratories`** +| | | `[rows=`*``*`]` | **`calendar/@lectures-per-week`** +| lecture | `lecture` | `[holiday=`**`no`**`|yes]` | +| | | `[number=no|yes]` | **`yes`** or **`calendar/@number-lectures`** +| | | `[rows=`*``*`]` | **`1`** +| page break | `latex-calendar-break` | `[caption=no|`**`yes`**`]` | +| | | `[caption-text=`*``*`]` | +| reading | `reading` | `[rows=`*``*`]` | **`calendar/@lectures-per-week`** +| section | `section` | `[rows=`*``*`]` | **`calendar/@lectures-per-week`** +| table heading | `heading` | `[num-columns=`*``*`]` | **`1`** +| table footing | `footing` | `[num-columns=`*``*`]` | **`1`** +| tutorial | `tutorial` | `[number=no|yes]` | **`yes`** or **`calendar/@number-tutorials`** +| week | `week` | `[holiday=`**`no`**`|yes]` | +| | | `[rows=`*``*`]` | **`calendar/@lectures-per-week`** + ## Miscellaneous ### Document build date (`build-date.xml`) @@ -382,12 +471,36 @@ ### Conditional processing (`conditional-processing.xml`) -| Item | Element(s) | Attributes | Notes -| ---- | ---------- | ---------- | ----- -| process when format | `process-when` | `format=latex|html` | +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| process when format | `process-when` | `format=latex|html` | + +### Native code (`native-code.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| raw code | `raw-code` | `format=html|latex` | +| raw LaTeX | `raw-latex` | | +| raw HTML | `raw-html` | | + +### LaTeX specific (`latex.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| document class | `latex-documentclass` | `[options=`*``*`]` | +| | `documentclass` | | +| document options | `latex-document-options` | | +| LaTeX environment | `environment` | | +| LaTeX packages | `latex-packages` | | +| | `package` | `[options=`*``*`]` | within `` +| preamble commands | `latex-commands` | | +| | `command` | | within `` +| | `hyphenation` | | within `` ### Global elements (`global-elements.xml`) +These essentially define global “variables” within the document. + | Item | Element(s) | Attributes | Notes | ---- | ---------- | ---------- | ----- | assessment due date | `DueDate` | `[style={bold|italic|underline}]` | requires top-level `` @@ -402,6 +515,34 @@ | subject code | `SubjectCode` | | “**`INFO`**” | year paper offered | `PaperYear` | `[offset=`*``*`]` | **`0`** +### File inclusions (`inclusions.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| include document | `include-document` | `basename=`*``* | including suffix +| | | `type=html|latex|plain|xml` | HTML: **`html`** +| | | | LaTeX: **`latex`** +| | | | `xml` currently unsupported +| | | `[path=`*``*`]` | without trailiing / + +### Meta-elements (`meta-elements.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| ignore markup | `omit` | | +| to-do item | `check` | | +| | `incomplete` | | +| | `to-do` | | +| | `todo` | | +| XML comment | `comment` | | + +### Emoticons (`emoticons.xml`) + +| Item | Element(s) | Attributes | Notes +| ---- | ---------- | ---------- | ----- +| emoticon | `emoticon` | `[type=`**`happy`**`|meh|neutral|sad]` | happy = U+263A WHITE SMILING FACE +| | `smiley` | | sad = U+2639 WHITE FROWNING FACE + modules/cross-references.xml: