Skip to content

The neighbours

By the end of this chapter you can choose the right reader for the document in front of you, among the four that overlap Glow.

bat: the source, dressed

This series' bat guide covers a viewer that shows a file with syntax highlighting, line numbers and a frame. For a Markdown document, bat colours the source: headings, emphasis and code stand out, but the table is still pipes and the task list still [x]. That is a feature when the source is what you are working on — editing, quoting, debugging why a document renders oddly, checking what is actually in the file. Glow and bat answer different questions: bat asks "what does this file say, character by character?", Glow asks "what does this document look like, read?" When Glow's reading surprises you — a missing footnote, a table that moved — bat (or your editor) is how you check the original, which is chapter 1's rule with the tools filled in.

mdcat: the other renderer

mdcat is the other established terminal Markdown renderer. The lab did not run it, and this guide characterises it from its public documentation only: it renders Markdown to the terminal much as Glow does, with its own emphases — including, on terminals that support the protocols, actual inline images. If images-in-terminal are the thing you need, that documented difference is where to look; everything else in this guide about readings versus documents applies to it unchanged, because that difference is about renderers in general, not about Glow in particular.

The browser: full fidelity

A web browser — or the repository's own web view on GitHub, GitLab and friends — is the heavyweight reader: real images, working footnotes, embedded HTML doing its tricks, tables laid out by a layout engine that has never heard of 80 columns. When a document was written for that medium — a project page, a report with figures — the browser is not the fallback; it is the intended reader, and Glow is the quick look. The cost is the trip: leaving the terminal, opening a window, finding the file again. Glow exists for the reads that are not worth that trip.

The Markdown guide: the language itself

Glow reads documents; it does not teach them. For writing Markdown — the syntax, the flavours, where GitHub's rendering and the standard part company — this series' Markdown for Mere Mortals guide is the companion. Several of chapter 5's differences (footnotes, line breaks) are that guide's territory seen from the reader's side.

Choosing, in one table

The job The reader
Read a README where you stand, in the terminal Glow
Check the exact source, or edit it bat, or your editor
A document where the images carry the meaning the browser (or mdcat, on a capable terminal)
Everything the file contains, footnotes included the browser
A quick look over SSH, no windows available Glow
Learning why the document is written as it is the Markdown guide, then bat

Check: take one document with a table, an image and a footnote, and read it in Glow, in bat, and in a browser. If you can say what each reader showed you that the others did not, you have this chapter — and, really, the guide.