Gutterpress proof

Markdown & CSS, typeset for printOpen source · by Dimm City

Add plugins and formatting extras

Plugins add new markdown to your book: highlights, callouts, footnote styles, a game's components and more. Six of them are built in; the rest come from npm or a folder. All of them are on the Extensions tab of Setup.

Turn on a formatting extra

Six extras are built in, with nothing to download. Open Setup → Extensions. Under Add an extension → Built-in extras, each extra the book does not use yet has an Add button and says what to type; click it and the extra works straight away, and appears in Your extensions above, where its row still says what to type. To take one out again, click its Remove there, and it is offered under Built-in extras again (footnotes, tables and definition lists are always on):

Extra Type
Highlight ==text==
Subscript H~2~O
Superscript 29^th^
Abbreviations *[GPS]: Global Positioning System
Callouts > [!NOTE], > [!TIP], > [!IMPORTANT], > [!WARNING], > [!CAUTION]
Math $E = mc^2$ in a line, or $$ ... $$ on lines of their own

Combine two looks

The Look tab chooses one look. To use a second built-in look together with it, open Setup → Extensions and, under Add an extension → Built-in looks, click the look's Add. It goes last in Your extensions, so where the two looks disagree, the one you added wins; move it with ↑ and ↓, or untick or Remove it, there. The Look tab then says the book combines two looks.

Find a plugin on npm

Looks and plugins other authors have published are on npm. On Setup → Extensions, under Add an extension → Find one on npm, type a word (such as footnote or emoji) and press Enter or click Search; with nothing typed, Search lists the most relevant ones. Above the results, Showing N of M says how many are listed out of the number npm reported. Each result shows the package's name and latest version (name@1.2.0), what it does, whether it is a Look or an Extra when that is known, and npm page, which opens the package's page on npmjs.com in your browser. Add downloads it, checks it, keeps a copy inside your book, and adds it to Your extensions; your book then builds from that copy, even offline. A package your book already uses says Added. If nothing matches, it says No extensions found for what you typed; if npm cannot be reached, it says so under the box and you can search again.

Book setup, Extensions tab: searching npm for plugins

Add a plugin from elsewhere

Under Add an extension → Other ways to add:

Plugins from npm, folders and the web run with full access to your computer: only add ones you trust.

Book setup, Extensions tab: your extensions, and the ways to add one

Keep plugins working and up to date

Your extensions, at the top of the Extensions tab, is everything your book uses, looks and extras included, in the order they load: one lower in the list wins where two disagree, and your own stylesheet always comes last. Each row says what it is and where it comes from, and has:

Re-check, at the top of the list, reads the list again and checks that every extension loads, at any time: after you fix a plugin's folder, for example. When nothing is wrong it says Every extension loads.

When your book has a plugin from npm, Gutterpress asks npm for newer versions each time you open the Extensions tab, and Check for updates, at the top of the list, asks again (it reads Checking npm… meanwhile). Under the list it says Every installed package is at its latest version., or why npm could not be asked. Include pre-release versions, above the list, adds alpha, beta and release-candidate versions to the Version menus and counts them as updates. It is off by default and applies to every book.

Every download from npm, an update or another version, first asks you to confirm that you trust the package. The command line's gutterpress ext does the same things. The plugins chapter covers ordering plugins and writing your own.

Next: save a PDF.