Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ This is but an overview. For more details, please refer to the provided example
- Definition lists
- Horizontal dividers / thematic breaks (with provision for asterisms, dinkuses, pendants...)
- Tables (and table captions)
- Code blocks (with attributes)
- Code blocks (with attributes, and syntax highlighting when supported)
- Line blocks (with enhanced provision for poetry)
- Raw inlines and raw blocks (escaping to SILE, in SIL language or Lua scripting)
- Raw inline HTML convenience subset in Markdown
Expand Down
4 changes: 2 additions & 2 deletions examples/markdown-sile-overview.dot
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ digraph G {
}

sile [shape=doublecircle, color="#e8ccd7 ", style=filled, label="SILE"];

pandoc [shape=doublecircle, color="#d0d0d0", style=filled, label="Pandoc", fontsize=12];

ast [shape=note, label="Pandoc\nAST", color="#c0c0c0", fontsize=12];

doc -> sile [label="native path", fontsize=11]
Expand Down
33 changes: 26 additions & 7 deletions examples/markdown-sile-schema.dot
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
digraph omikhleia {
rankdir=RL;
rankdir=RL;
compound=true;
edge [
arrowhead="vee"
];

subgraph cluster_couyards {
label = "couyards.sile";

couyards [shape=component,style=filled,fillcolor=aliceblue]
}

subgraph cluster_piecharts {
label = "piecharts.sile";

piecharts [shape=component,style=filled,fillcolor=aliceblue]
}

subgraph cluster_ptable {
label = "ptable.sile";

Expand All @@ -18,9 +28,9 @@ digraph omikhleia {

embedders [shape=component,style=filled,fillcolor=aliceblue]
dot [style=filled,fillcolor=aliceblue]

embedders -> dot
}
}

subgraph cluster_textsubsuper {
label = "textsubsuper.sile";
Expand All @@ -34,18 +44,26 @@ digraph omikhleia {
smartquotes [shape=component,style=filled,fillcolor=aliceblue]

}

subgraph cluster_labelrefs {
label = "labelrefs.sile";

labelrefs [shape=component,style=filled,fillcolor=aliceblue]
}

subgraph cluster_highlighter {
label = "highlighter.sile";

highlighter [shape=component,style=filled,fillcolor=aliceblue]
}

subgraph cluster_resilient {
label = "resilient.sile";

book [shape=component,style=filled,fillcolor=aliceblue,label="resilient.book"]
poetry [shape=component,style=filled,fillcolor=aliceblue,label="resilient.poetry"]
defn [shape=component,style=filled,fillcolor=aliceblue,label="resilient.defn"]
epigraph [shape=component,style=filled,fillcolor=aliceblue,label="resilient.epigraph"]
}

subgraph cluster_markdown {
Expand All @@ -66,13 +84,14 @@ digraph omikhleia {
mrkcmd -> ptable
mrkcmd -> smartquotes
mrkcmd -> textsubsuper
mrkcmd -> poetry [style=dashed]
mrkcmd -> book [style=dashed]
mrkcmd -> highlighter
mrkcmd -> couyards [style=dashed]
mrkcmd -> piecharts [style=dashed]
}

mybook [shape = circle, label="Markdown\nfor\nSILE", fontsize="25"]
mybook -> markdown
mybook -> pandocast
mybook -> djot
mybook -> book [style=dashed, lhead=cluster_resilient]
}
10 changes: 4 additions & 6 deletions examples/sile-and-djot.dj
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,6 @@ Files in Graphviz DOT graph language (`.dot`) are supported and rendered as imag

![The *markdown.sile* ecosystem (simplified).](./markdown-sile-schema.dot){width="90%"}

This image is obtained with the following syntax.

{custom-style=CodeBlock}
:::
```
Expand Down Expand Up @@ -621,7 +619,7 @@ Here is an example illustrating the use of these attributes:

Other attributes are passed through to the underlying heading implementation, which might do something with them.[^djot-heading-level-mapping]

[^djot-heading-level-mapping]: The converter assumes it can map heading levels to SILE commands `part`, `chapter`, `section`, `subsection`, `subsubsection`.
[^djot-heading-level-mapping]: The converter assumes it can map heading levels to commands `part`, `chapter`, `section`, `subsection`, `subsubsection`.
It uses a very basic fallback if these are not found (or if the sectioning level gets past that point).
Also note that parts are supported by the *resilient* book class as a level 0 heading, and are therefore only available when header shifting is applied (see §[](#djot-configuration)).

Expand Down Expand Up @@ -931,7 +929,7 @@ In most cases, the content is rendered as verbatim text, with some exceptions de

#### Lua code blocks

Code blocks marked as being in the Lua language are rendered as verbatim text, with syntax highlighting.
Code blocks are rendered as verbatim text, with syntax highlighting when possible.
For instance, the following code block...

{custom-style=CodeBlock}
Expand Down Expand Up @@ -962,12 +960,12 @@ end
^ An example of a syntax-highlighted Lua code snippet.


This is a very naive approach to syntax-highlighting, until the converter possibly supports a more general solution.
Syntax-highlighting is applied to languages recognized by Scintillua.

#### Rendered code blocks

If the converter knows how to render the content of a code block, it does so by default.
The `render` attribute can be set to `false` to prevent this behavior, and enforce the content to be rendered as raw verbatim text.
The `render` attribute can be set to `false` to prevent this behavior, and enforce the content to be rendered as raw verbatim text (possibly with syntax highlighting).

: Mardown and Djot code blocks

Expand Down
Loading