Numerous changes
Added:
• number formatting
• sections & titling
• teaching related items
• native code
• LaTeX specific elements
• file inclusions
• meta-elements
• emoticons
1 parent c037528 commit 68c0446d422511cce997e4d006db4eedefe0167a
Nigel Stanger authored on 3 Mar 2019
Showing 1 changed file
View
398
quick-reference.markdown
# XML authoring framework quick reference
 
## 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.
 
## Basic formatting
| strong emphasis | `strong` | |
| term | `term` | |
| 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
| | `verbatim-block` | |
| verbatim (inline) | `inline-verbatim` | |
| | `verb` | |
 
## 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` | |
 
## Special characters (`special-characters.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` | |
 
### 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=`*`<string>`* |
| section title | `title` | | within `<section>`
 
### Document title (`titling.xml`)
 
These all occur at the top level of the enclosing `<document>` 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`)
 
| Item | Element(s) | Attributes | Notes
| Ψ | `capital-psi` | | U+03A8 GREEK CAPITAL LETTER PSI
| ω | `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 `<paper>`
| subject code | `subject-code` | | within `<paper>`
 
### Questions and answers (`q-and-a.xml`)
 
| Item | Element(s) | Attributes | Notes
| ---- | ---------- | ---------- | -----
| answer | `answer` | `[hide=`**`no`**`|yes]` |
| exercise | `exercise` | `label=`*`<string>`* | 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=`*`<integer>`* | within period
| | | `[format=day|day-short|day-short+year|day+long-name|` |
| | | `day+short-name|day+year|`**`ISO`**`|`*`<XML date picture>`*`]` |
| | | `[offset=(+|-)`*`<XSLT duration>`*`]` | e.g., P1D”, “-P4D
| date range | `TeachingPeriodDateRange` | `format=long|short` |
| | | `period=FY|S1|S2|SS|YY` |
| | | `week=`*`<integer>`* | within period
| | | `[wrap=no|`**`yes`**`]` |
 
### Teaching calendar (`paper-calendar.xml`)
 
| Item | Element(s) | Attributes | Notes
| ---- | ---------- | ---------- | -----
| assessment | `assessment` | `[rows=`*`<integer>`*`]` | **`calendar/@lectures-per-week`**
| calendar table | `calendar` | `lectures-per-week=`*`<integer>`* |
| | | `number-of-weeks=`*`<integer>`* |
| | | `[number-laboratories=no|`**`yes`**`]` |
| | | `[number-lectures=no|`**`yes`**`]` |
| | | `[number-tutorials=no|`**`yes`**`]` |
| footer row | `footer` | |
| header row | `header` | |
| note | `note` | `[num-columns=`*`<integer>`*`]` | **all columns**
| laboratory | `laboratory` | `[number=no|yes]` | **`yes`** or **`calendar/@number-laboratories`**
| | | `[rows=`*`<integer>`*`]` | **`calendar/@lectures-per-week`**
| lecture | `lecture` | `[holiday=`**`no`**`|yes]` |
| | | `[number=no|yes]` | **`yes`** or **`calendar/@number-lectures`**
| | | `[rows=`*`<integer>`*`]` | **`1`**
| page break | `latex-calendar-break` | `[caption=no|`**`yes`**`]` |
| | | `[caption-text=`*`<string>`*`]` |
| reading | `reading` | `[rows=`*`<integer>`*`]` | **`calendar/@lectures-per-week`**
| section | `section` | `[rows=`*`<integer>`*`]` | **`calendar/@lectures-per-week`**
| table heading | `heading` | `[num-columns=`*`<integer>`*`]` | **`1`**
| table footing | `footing` | `[num-columns=`*`<integer>`*`]` | **`1`**
| tutorial | `tutorial` | `[number=no|yes]` | **`yes`** or **`calendar/@number-tutorials`**
| week | `week` | `[holiday=`**`no`**`|yes]` |
| | | `[rows=`*`<integer>`*`]` | **`calendar/@lectures-per-week`**
 
## Miscellaneous
 
### Document build date (`build-date.xml`)
 
| | | `[style=footer|`**`inline`**`]` |
 
### 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=`*`<options>`*`]` |
| | `documentclass` | |
| document options | `latex-document-options` | |
| LaTeX environment | `environment` | |
| LaTeX packages | `latex-packages` | |
| | `package` | `[options=`*`<options>`*`]` | within `<latex-packages>`
| preamble commands | `latex-commands` | |
| | `command` | | within `<latex-commands>`
| | `hyphenation` | | within `<latex-commands>`
 
### 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 `<due-date>`
| period paper offered | `PaperPeriod` | | e.g., Second Semester
| subject code | `SubjectCode` | | “**`INFO`**”
| year paper offered | `PaperYear` | `[offset=`*`<integer>`*`]` | **`0`**
 
### File inclusions (`inclusions.xml`)
 
| Item | Element(s) | Attributes | Notes
| ---- | ---------- | ---------- | -----
| include document | `include-document` | `basename=`*`<filename>`* | including suffix
| | | `type=html|latex|plain|xml` | HTML: **`html`**
| | | | LaTeX: **`latex`**
| | | | `xml` currently unsupported
| | | `[path=`*`<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: <template name="reference" match="reference[@label]">
modules/cross-references.xml: <template name="broken-reference" match="reference[not( @label )]">
modules/cross-references.xml: <template name="section-reference" match="section" mode="reference">
modules/cross-references.xml: <template name="figure-reference" match="figure" mode="reference">
modules/cross-references.xml: <template name="item-page-reference" match="section|figure|table" mode="page-reference">
modules/cross-references.xml: <template name="page" match="page[@label]">
modules/cross-references.xml: <template name="broken-page" match="page[not( @label )]">
modules/cross-references.xml: <template name="direct-page-reference" match="page[@label]" mode="reference">
modules/emoticons.xml: <template name="emoticon" match="emoticon|smiley">
modules/floaters.xml: <template name="figure" match="figure">
modules/floaters.xml: <template name="table" match="table">
modules/floaters.xml: <template name="multipart-table" match="table[count(part) gt 0]">
modules/floaters.xml: <template name="figure-caption" match="figure/caption">
modules/hyperlinks.xml: <template name="url" match="url|uri|email|e-mail|email-address|e-mail-address">
modules/images.xml: <template name="latex-image" match="image" mode="latex">
modules/images.xml: <template name="normal-image" match="image[count(provide-large-version) = 0]">
modules/images.xml: <template name="zoomable-image" match="image[count(provide-large-version) != 0]">
modules/inclusions.xml: <template name="include-document" match="include-document">
modules/inclusions.xml: <template name="include-xml" match="include-document[@type='xml']">
modules/latex.xml: <template name="environment" match="environment" />
modules/latex.xml: <template name="latex-package" match="latex-packages/package">
modules/latex.xml: <template name="latex-command" match="latex-commands/command">
modules/latex.xml: <template name="latex-hyphenation" match="latex-commands/hyphenation">
modules/latex.xml: <template name="latex-documentclass" match="latex-documentclass|documentclass">
modules/latex.xml: <template name="latex-document-options" match="latex-document-options">
modules/latex.xml: <template name="tabular-column-separator">
modules/lists.xml: <template name="itemised-list" match="itemised-list|itemize|unordered-list|bulleted-list|bullet-list|bullet-points|UL|ul">
modules/lists.xml: <template name="enumerated-list" match="enumerated-list|enumerate|ordered-list|numbered-list|question-list|OL|ol">
modules/lists.xml: <template name="definition-list" match="definition-list|description-list|DL|dl">
modules/lists.xml: <template name="list-item" match="item" mode="normal">
modules/lists.xml: <template name="keyword" match="item/keyword|item/term|item/topic|item/DT|item/dt">
modules/lists.xml: <template name="definition" match="item/definition|item/description|item/discourse|item/DD|item/dd">
modules/menus.xml: <template name="menu-separator" match="menu-separator|menusep|menu/separator">
modules/menus.xml: <template name="menu-item" match="menu/item">
modules/meta-elements.xml: <template name="omit" match="omit" />
modules/meta-elements.xml: <template name="comment" match="comment">
modules/meta-elements.xml: <template name="todo" match="todo|to-do|incomplete|check">
modules/multi-column.xml: <template name="multi-column" match="multi-column">
modules/multi-column.xml: <template name="multi-column-column" match="multi-column/column">
modules/native-code.xml: <template name="raw-latex" match="raw-code[@format = 'latex']|raw-latex">
modules/native-code.xml: <template name="raw-html" match="raw-code[@format = 'html']|raw-html">
modules/number-formatting.xml: <template name="number" match="number">
modules/obsolete.xml: <template name="generate-obsolete-error">
modules/obsolete.xml: <template name="latex-input" match="latex-input">
modules/obsolete.xml: <template name="metadata" match="metadata">
modules/obsolete.xml: <template match="figure/id|table/id|figure/label|table/label">
modules/obsolete.xml: <template match="image/latex-scaling">
modules/obsolete.xml: <template match="image/basename|image/format">
modules/otago-specific.xml: <template name="paper" match="paper">
modules/otago-specific.xml: <template name="subject-code" match="paper/subject-code">
modules/otago-specific.xml: <template name="paper-number" match="paper/paper-number">
modules/paper-calendar-dates.xml: <template name="TeachingPeriodDate" match="TeachingPeriodDate">
modules/paper-calendar-dates.xml: <template name="TeachingPeriodDateRange" match="TeachingPeriodDateRange">
modules/paper-calendar-dates.xml: <template name="format-teaching-date">
modules/paper-calendar-dates.xml: <template name="format-teaching-date-range">
modules/paper-calendar.xml: <template match="calendar">
modules/paper-calendar.xml: <template name="generate-calendar-content">
modules/paper-calendar.xml: <template match="header|footer">
modules/paper-calendar.xml: <template match="heading|footing">
modules/paper-calendar.xml: <template match="note">
modules/paper-calendar.xml: <template match="week">
modules/paper-calendar.xml: <template match="week[@holiday]">
modules/paper-calendar.xml: <template match="lecture[node() and not( @holiday )]">
modules/paper-calendar.xml: <template match="lecture[@holiday]">
modules/paper-calendar.xml: <template match="lecture[not( node() )]">
modules/paper-calendar.xml: <template match="laboratory[node()]">
modules/paper-calendar.xml: <template match="tutorial[node()]">
modules/paper-calendar.xml: <template match="laboratory[not( node() )]|tutorial[not( node() )]">
modules/paper-calendar.xml: <template match="calendar//section[node()]|reading[node()]">
modules/paper-calendar.xml: <template match="assessment[node()]">
modules/paper-calendar.xml: <template match="calendar//section[not( node() )]|reading[not( node() )]|assessment[not( node() )]">
modules/paper-calendar.xml: <template name="generate-number-cell">
modules/paper-calendar.xml: <template name="generate-content-cell">
modules/paper-calendar.xml: <template name="generate-empty-cell">
modules/q-and-a.xml: <template name="question" match="question">
modules/q-and-a.xml: <template name="answer" match="answer">
modules/q-and-a.xml: <template name="hidden-answer" match="answer[@hide='yes']" />
modules/q-and-a.xml: <template name="exercise" match="exercise">
modules/quotations.xml: <template name="single-quote" match="quote[@single='yes']|q[@single='yes']">
modules/quotations.xml: <template name="double-quote" match="quote|qq">
modules/quotations.xml: <template name="nested-double-quote" match="quote//quote">
modules/quotations.xml: <template name="nested-single-quote" match="quote[@single='yes']//quote" priority="2">
modules/relational-algebra.xml: <template name="rename-operator" match="rename|rename-operator|relational-rename">
modules/relational-algebra.xml: <template name="restrict-operator" match="restrict|restrict-operator|relational-restrict">
modules/relational-algebra.xml: <template name="join-operator" match="join-operator|join|natural-join|inner-join|bowtie|relational-join">
modules/relational-algebra.xml: <template name="outer-join-operator" match="outer-join-operator|outer-join|relational-outer-join">
modules/sectioning.xml: <template name="section" match="section">
modules/sectioning.xml: <template name="generate-subs">
modules/sectioning.xml: <template name="section-title" match="section/title">
modules/tabular.xml: <template name="tabular" match="tabular">
modules/tabular.xml: <template name="aligned-tabular-column" match="tabular-columns/column[@align]">
modules/tabular.xml: <template name="unaligned-tabular-column" match="tabular-columns/column[not(@align)]">
modules/tabular.xml: <template name="tabular-header" match="tabular-header">
modules/tabular.xml: <template name="row-rule-partial" match="row-rule[@columns]">
modules/tabular.xml: <template name="multirow-cell" match="cell" mode="latex-multi-row">
modules/tabular.xml: <template name="multicolumn-cell" match="cell" mode="latex-multi-column">
modules/tabular.xml: <template match="cell">
modules/titling.xml: <template name="preamble-title" match="document/title" mode="preamble">
modules/titling.xml: <template name="preamble-subtitle" match="document/subtitle" mode="preamble" />
modules/titling.xml: <template name="preamble-author" match="document/author" mode="preamble">
modules/titling.xml: <template name="preamble-date" match="document/date" mode="preamble">
modules/titling.xml: <template name="preamble-due-date" match="document/due-date" mode="preamble">
modules/titling.xml: <template name="document-title-title" match="document/title" mode="title">
modules/titling.xml: <template name="document-subtitle-title" match="document/subtitle" mode="title">
modules/titling.xml: <template name="document-subtitle-unmoded" match="document/subtitle" />
modules/titling.xml: <template name="document-author" match="document/author">
modules/titling.xml: <template name="document-date" match="document/date" />
modules/titling.xml: <template name="document-due-date-title" match="document/due-date" mode="title">
modules/titling.xml: <template name="document-due-date-inline" match="document/due-date" mode="inline">
modules/titling.xml: <template name="document-due-date-unmoded" match="document/due-date" />
modules/titling.xml: <template name="document-title-unmoded" match="document/title" />
modules/titling.xml: <template name="chapter-title" match="document/title" mode="chapter">