Markdown viewer
| Document kind | markdown |
| Drawn from | a file — it can also be previewed in the file manager |
| Formats that open here | Markdown (.md) |
| Refuses to draw below | 180px wide |
What it draws
A markdown file as a document rather than as its source: headings as headings, tables as tables, lists as lists. A protocol, a README shipped beside a dataset, or a report exported from this application reads as the document it is.
Long documents get an outline column listing their headings, which is the one navigation affordance a multi-page protocol needs.
What opens in it
Files with a markdown extension. A plain .txt opens in the text viewer instead, even if it happens
to contain markdown syntax — the extension is the declaration, and guessing would mean a text file
full of hashes silently became a document with headings.
An exported notebook entry is a markdown file and opens here like any other.
What this computes
Nothing about the science — this canvas renders the document you gave it, and the rendered view is the file's content and nothing else. It computes only what is needed to navigate and describe a document, and every one of those is a property of the text rather than a claim about your data:
- The heading outline, which becomes the outline column on a long document — the one navigation affordance a multi-page protocol needs.
- Structural counts used to describe the file before you open it: headings and their levels, lines and characters, links, images, list items, task items, table rows, code blocks and which languages those code blocks declare, and whether the file carries front matter.
- An estimated reading time, from the length.
No value here is derived from your experiment, and no number in a rendered table is recomputed — a table in a markdown file is displayed exactly as written.
Reading it
The rendered view is the file's content and nothing else. Two properties are worth knowing.
Markup inside a file never becomes markup in the page. The document is built as structured
content rather than by injecting the file's text into the page, so a .md from an untrusted source
cannot execute anything or restyle the application around it. This is a structural property, not a
list of blocked patterns.
Cross-reference sigils are not active here. In the lab notebook, @, ! and & mark clickable
references to constructs, actions and bench artefacts. An ordinary markdown file gets none of that,
deliberately: in a README, a string like @example is far more likely to be an address or a handle
than a reference to one of your constructs, and drawing it as a chip that navigates nowhere would be
worse than drawing it as text.
The outline is built from the same reading that draws the document, including its awareness of
fenced code blocks — so a # inside a code fence is code, not a heading, in both the document and
the outline. The outline can never list a heading the document does not show.
Controls
Rendered / Source switches between the document and its raw text. Source is not a fallback for a file that failed to render: reading the markup is a normal thing to want, particularly when you are about to edit the file elsewhere.
The outline appears when the document has enough headings to need it and can be dismissed. In the narrow file-manager preview the outline is not offered, because the outline and the text cannot both have enough room — that is what the minimum width protects.
Where it appears
As a stage tab, and in the file manager's preview aside. The same document is drawn in both; the preview is read-only and has no outline.
Performance and limits
The whole file is read and drawn, so a very large document is drawn in full rather than paged.
What is not supported is worth stating: no diagrams are rendered from code fences, no HTML embedded in the markdown is executed, and no remote images are fetched. An image reference to a file inside your project resolves; one pointing at a web address does not load, which keeps opening a document from being a network request you did not ask for.
Screenshots
No frame is committed for this canvas yet. What one would show: a project's README or a notebook note, with its outline beside it.
The absence is stated rather than left as a blank heading: a picture that does not exist yet is worth knowing about, and a placeholder would be worse than either.
Related
The lab notebook, which writes markdown and reads it with cross-references active; the text viewer, where anything not recognised as a document ends up.