Skip to content

Commit

Permalink
docs: Markdown manual overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and Didier Willis committed Feb 28, 2024
1 parent aafc4ff commit e3318d2
Show file tree
Hide file tree
Showing 4 changed files with 1,189 additions and 375 deletions.
2 changes: 1 addition & 1 deletion examples/extra-styles.dj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% Quick and dirty definition of new custom styles
% using some "resilient" styling feature.
%
\define[command=customframe]{\center{\roughbox[bordercolor=#59b24c,
\define[command=customframe]{\center{\roughbox[bordercolor=#66a0b3,
fillcolor=220,padding=15pt, enlarge=true]{\parbox[width=90%lw, minimize=true]{\process}}}}
\define[command=customblockframe]{\center{\framebox[bordercolor=#66a0b3,
shadow=true,
Expand Down
16 changes: 8 additions & 8 deletions examples/sile-and-djot.dj
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,14 @@ Yet, it might be useful for proper names, etc.
{#djot-image}
### Images

![This man is still Gutenberg.](./gutenberg.jpg){#djot-gutenberg width="3cm"}
![This man is Gutenberg.](./gutenberg.jpg){#djot-gutenberg width="3cm"}

This is obtained with the following syntax:

{custom-style=CodeBlock}
:::
```
![This man is still Gutenberg.](./gutenberg.jpg){width="3cm"}
![This man is Gutenberg.](./gutenberg.jpg){width="3cm"}
```
:::

Expand Down Expand Up @@ -439,7 +439,8 @@ Thus, the above example was obtained from the following input:
{custom-style=CodeBlock}
:::
```
The section on "[](#djot-tables){.title}", that is [](#djot-tables){.section},
The section on "[](#djot-tables){.title}",
that is [] (#djot-tables){.section},
is on page [](#djot-tables){.page}.
```
:::
Expand Down Expand Up @@ -562,7 +563,7 @@ A single newline is treated as a space.
### Headings

A heading starts with a sequence of one or more `#` characters, followed by whitespace.
The number of # characters defines the heading level.
The number of `#` characters defines the heading level.
The heading text following that sequence is parsed as inline content.

For example, this very section is a level three heading.
Expand Down Expand Up @@ -845,7 +846,7 @@ A bullet list item that begins with `[ ]`, `[X]`, or `[x]` followed by a space i
- [x] Checked item

{#djot-footnotes}
### Footnotes
### Footnote references

Footnotes work.[^djot-fnt]
Moreover, Djot allows attaching attributes to the footnote reference.
Expand Down Expand Up @@ -952,7 +953,7 @@ The `render` attribute can be set to `false` to prevent this behavior, and enfor
: Mardown and Djot code blocks

Code blocks marked as being in Markdown or Djot are interpreted.
For Markdown, attributes are passed to the converter, allowing to possibly use different compatibility options (for Markdown especially, see §[](#configuration)).
For Markdown, attributes are passed to the converter, allowing to possibly use different compatibility options (for Markdown especially, see §[](#markdown-configuration)).
This feature allows switching between those languages, would there be something one does not support yet.

At the time of writing, for instance, Djot does not support "line blocks".
Expand Down Expand Up @@ -1393,8 +1394,7 @@ Therefore, we recommend that you call template files containing conditional cont
{#djot-configuration}
## Configuration

The calling context (a wrapper document in SIL syntax, a resilient "master document", etc.)
can pass additional options to tune the behavior of the converter.
The calling context (a wrapper document in SIL syntax, a resilient "master document", etc.) can pass additional options to tune the behavior of the converter.

As state above (§[](#djot-metadata-symbols) "[](#djot-metadata-symbols){.title}"), any option starting with `meta:` is passed to the converter (with this prefix removed), and is then available as a symbol.

Expand Down
11 changes: 11 additions & 0 deletions examples/sile-and-markdown-manual-styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ FramedPara:
before:
skip: "medskip"

Difference:
style:
font:
family: "Libertinus Sans"
size: "0.95em"
paragraph:
after:
skip: "smallskip"
before:
skip: "smallskip"

blockquote:
origin: "resilient.book"
style:
Expand Down
Loading

0 comments on commit e3318d2

Please sign in to comment.