Rendering

Every kind of file you have, drawn as a page worth reading

Open a file and Leaftext draws it as a clean page in your theme. Markdown reads the way GitHub draws it, and data files, email, Office documents and books get pages of their own.

  • Notes: Markdown with tables, diagrams, math and footnotes.
  • Data: JSON, YAML, XML, INI and CSV as readable sections and tables.
  • Mail and documents: saved emails, Word, Excel, PowerPoint and OpenDocument files.
  • Books: EPUB and Kindle books, one chapter after another.
  • Code: any source file, colored in your theme.

Summary

FileDrawn as
MarkdownThe page GitHub would draw, with diagrams and math
XMLSections and tables; a sitemap becomes a table of addresses
JSON and YAMLHeaded sections and tables of records
HTMLThe page itself, scripts and all
EmailThe message: headers, body, pictures and attachments
Office filesThe document, sheet or slides, editable in place
EPUB and Kindle booksThe whole book, in reading order
Text, INI, CSS, CSVThe file name as a heading over its content
Source codeColored code in your theme

See every detail of rendering →

Pipeline

Each file is read on your computer and drawn by the same renderer the website uses. Nothing is fetched from the internet to draw it.

See the details →

EPUB books

An EPUB opens as the whole book on one page: the cover, its contents page, then every chapter in order. Each book takes your theme's type, not its publisher's.

Read Le Morte d'Arthur here, with its glossary →

See the details →

Kindle books

A Kindle book without copy protection opens the same way, as one document. Protected books say Leaftext cannot open them.

See the details →

Plain text files

A .txt file of release notes opened in Leaftext: the file name as the page heading, then the whole file as one block with its indented lists, its ruled headings and a box drawn in plus and minus signs all still lined up

A .txt file is drawn as its file name over its text, with your lines kept as written.

See the details →

INI files

An .ini settings file opened in Leaftext: the file name as the page heading, the keys written before the first section as an aligned label and value list, then a heading per section with its own keys under it and the two web addresses drawn as links

An .ini file shows each section as a heading, with its keys in a list beneath.

See the details →

CSS files

A stylesheet opens as colored code, with a small square beside each color it names.

See the details →

CSV files

A .csv or .tsv file opens as a table you can sort, filter, and type in.

See the details →

Source files

A Rust file opened in Leaftext: the file name as the page heading, then the whole source as one block colored in the theme, with the language named in the block corner beside a Copy button

Any source file opens as colored code in your theme, with its language named above it.

See the details →

Reading at a prompt

Read any file in a terminal with leaftext --print notes.md, drawn in the terminal's own colors.

See the details →

A book a chapter at a time

leaftext --print book.epub --contents lists a book's chapters, so you can print one at a time.

See the details →

Checking a file's diagrams

leaftext --diagrams notes.md checks every diagram in a file, and says which ones draw.

See the details →

Markdown

Leaftext draws CommonMark and GitHub-flavored Markdown, plus a few extras of its own.

Headings

Six levels, # to ######, each one a step smaller.

Text formatting

Bold, italic, struck, code and highlighted words.

Lists

Bulleted, numbered, and nested lists, drawn as you wrote them.

Blockquotes and alerts

Alerts like this one come in five kinds: note, tip, important, warning and caution.

Code

Fenced code is colored in your theme, with a button to copy it.

fn main() {
    println!("Leaftext");
}

Tables

Tables keep their alignment and scroll sideways when they are wide. On a narrow screen, each row becomes a card.

FeatureWorks
Sorting✅
Cards✅

Task lists

  • Tick a box with a click
  • Add a date, and it shows as a badge

Links open in the app, and a bare web address becomes a link by itself. A link alone on its line draws as a card, and a card to an HTML page on your disk plays that page live in the note.

See the details →

[[Note name]] links to a note by its name.

Tabs (Leaf extension)

Leaftext can draw a group of tabs in a note, written as plain headings any other reader can still follow.

See the details →

Buttons (Leaf extension)

A link can be drawn as a button, with one of the app's own marks on it.

See the details →

Badges (Leaf extension)

Done Waiting Blocked

A word in code with a color in a comment after it becomes a badge.

See the details →

Bars (Leaf extension)

A list whose items end in an amount can be drawn as bars on one scale.

See the details →

Framed figures (Leaf extension)

A titled box with a caption, for a figure or a worked example.

See the details →

Cards across the page (Leaf extension)

A row of cards, each with a title, a few words and a picture.

See the details →

Images

Pictures beside the note are drawn in place. Hover one to open it on the whole window.

See the details →

Math

Math is written between dollar signs: E = mc^2.

Mermaid diagrams

flowchart LR
    A["Write it"] --> B["See it drawn"]

Diagrams take your theme's colors. Hover one to open it big or to edit it.

See the details →

Emoji

GitHub shortcodes such as :rocket: become 🚀.

GitHub references

Issue numbers stay as you wrote them, so a list item is never mistaken for an issue.

See the details →

Footnotes

Footnotes collect at the foot of the page, and a press on one opens it over the page.

See the details →

Frontmatter

A note's tags drawn as pills in its field block and prose, with code and link words kept as written

A note's fields at the top, such as its status and tags, are drawn as a tidy card.

See the details →

Collapsible sections

Press to open

A section folded away until you need it.

Inline HTML

A safe set of HTML tags works inside a note, kept in a box of its own.

See the details →

Horizontal rules

Three dashes draw a line across the page.

Text in any language

Every script reads, including right-to-left languages.

See the details →

XML

An XML sitemap opened in Leaftext, rendered as a table of URL records with columns for URL, last modified and priority, instead of raw tags

An XML file is drawn from its structure. A sitemap becomes a table of addresses, and a feed becomes its stories.

See the details →

Any XML

An RSS feed opened in Leaftext: the channel title as the page heading, the channel fields as an aligned label and value list, then one section per item

Tag names are read as words, so lastBuildDate reads as "Last build date".

See the details →

TEI XML

A TEI field-notes document open in Leaftext: the main title as the page heading with the long title in muted text beneath it, the front matter collapsed into a disclosure, a numbered end note in the prose, and a verse stanza rendered as a quoted block

A scholarly TEI edition is drawn as an edition, with its front matter folded away.

See the details →

Data files (JSON and YAML)

A GitHub Actions workflow YAML file opened in Leaftext, rendered as headed sections per job with aligned label and value fields and a table of steps, rather than indented punctuation

A JSON or YAML file is drawn as headed sections and tables of records, not punctuation.

See the details →

HTML files

A web page runs as a browser runs it, so a page built by its own script opens finished.

See the details →

Email (.eml)

An .eml file opened in Leaftext: the subject as the page heading, From, To and Date as a field list of mailto links, the message body below with an inline image, and a list of attachments at the foot

A saved email opens as the message: its subject, who sent it, the body, pictures and attachments.

See the details →

Office and OpenDocument files

Word, Excel, PowerPoint and OpenDocument files open as the document, sheet or slides. You can type into them, and everything Leaftext never read is kept on save.

See the details →

File encodings

Files in older encodings are read correctly, and saved back the way they came.

See the details →

Next