SIL Font Documentation Markdown Test

This document gives examples of how to use markdown for font documentation, for both in-project docs (html, pdf) and product site page source (md). Although these three target doc types each support some unique capabilities (e.g. product site accordions) this doc focuses on markdown that works for all three types.

Paragraphs, text formatting, line breaking

This paragraph gives examples of formatting that uses special enclosing characters: italic, bold, inline code.

Here is a second paragraph. If you want to
break a line in a specific place the clearest way is to use <br>.

Headings

Note that H1 is not used for font documentation pages.

H2

The H2 is the most common heading type used.

H3

H4

H5
H6

Tables

Unicode block Font support
C0 Controls and Basic Latin U+0020..U+007E
C1 Controls and Latin-1 Supplement U+00A0..U+00FF

Lists

Ordered List

  1. First item
  2. Second item
  3. Third item

Unordered List

Nested List

Blockquotes

Here is a block quote. Note that you can use Markdown syntax within a blockquote.

Code blocks

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <title>Example HTML5 Document</title>
    </head>
    <body>
      <p>Test</p>
    </body>
    </html>

External links always specify the full URL (Keyman, SIL Language Technology). Relative links should point to the relevant markdown file (This project’s About page).

Links to external .md files are a bit odd and require changing the extension in the source to .rawmd rather than .md. This prevents the extension changing to .html.

Links can be specified inline, with the full link in the text, or using named references (This project’s About page).

Footnotes

Here is an example of a footnote1 that will appear at the very bottom2 of the page. Footnotes will automatically be numbered sequentially when rendered.

Images

Images should be specified in markdown syntax with the local path used as the link. The class is required and needs to be defined in {}, usually {.fullsize}. Then the actual path to the image in the product site image library needs to be placed in a comment using a special syntax. If you want a caption it needs to be placed in a separate html figcaption element. Example:

Charis SIL Sample - Precomposed Latin Diacritics
This is the caption

Web fonts

To display text in the html and pdf versions using generated fonts a few things need to be in place:

In order for text marked up in the same way to display properly on the product sites a few additional things need to be set up:

Example: Charis SIL regular, italic, bold, and bold italic.

Font features

Activating font features requires setting feature values. It is possible to set the font-feature-settings using special css classes, but it may be better to set the feature setting in the <span>. This reduces the number of [font] shortcode defintions that need to be added to each page. Examples:

Feature Default Activated
Small caps (scmp) abcde abcde
Eng alternate 1 (cv43) Ŋ Ŋ
Eng alternate 2 (cv43) Ŋ Ŋ
Eng alternate 3 (cv43) Ŋ Ŋ
Serbian italic alternates (language-specific) б г д п т б г д п т

Horizontal rule

Paragraph before rule.


Paragraph after rule.

Formatting using special html entities

H2O

Xn + Yn = Zn

Press Ctrl+Shift+C to copy.

Text can be highlighted, though that can be very distracting.


  1. Here is an example of how the footnote text is indicated. This example reference is in the text.↩︎

  2. Footnote references can also be text but will still get numbered correctly. The references can be placed at the bottom of the markdown page.↩︎