Date: 2014-01-16T16:15:39.719706+00:00
Publisher: Softcover
Rights: Copyright (c) 2014 Nick Merwin

Test Book

For QA love.

Nick Merwin

Contents

- Preface

- Chapter 1 A chapter

- 1.1 A section

- 1.1.1 Source code

- 1.1.2 Mathematics

- 1.2 Images and tables

- 1.2.1 Tables

- 1.3 Command-line interface

- 1.4 Miscellanea

- Chapter 2 Another chapter

- Chapter 3 Yet another chapter

Preface

This is an example of “frontmatter”, which comes before the main text of the book.

Chapter 1 A chapter

This is the first paragraph of the Softcover Markdown template. It shows how to write a document in Markdown, a lightweight markup language, augmented with the kramdown converter and some custom extensions, including support for embedded PolyTEX, a subset of the powerful LATEX typesetting system. For more information, see The Softcover Book. To learn how to easily publish (and optionally sell) documents produced with Softcover, visit Softcover.io. Softcover is currently in private beta; go to Softcover.io to get an invitation.

This is the second paragraph, showing how to emphasize text.[1] You can also make text bold or emphasize a second way.

1.1 A section

This is a section. You can refer to it using the LATEX cross-reference syntax, like so: Section 1.1.

1.1.1 Source code

This is a subsection.

You can typeset code samples and other verbatim text using four spaces of indentation:

def hello
puts "hello, world"
end

Softcover also comes with full support for syntax-highlighted source code using kramdown’s default syntax, which combines the language name with indentation:

def hello
puts "hello, world"
end

Softcover’s Markdown mode also extends kramdown to support “code fencing” from GitHub-flavored Markdown:

def hello
puts "hello, world!"
end

The last of these can be combined with PolyTEX’s codelisting environment to make code listings with linked cross-references (Listing 1.1).

Listing 1.1: Hello, world.

def hello
puts "hello, world!"
end

1.1.2 Mathematics

Softcover’s Markdown mode supports mathematical typesetting using LATEX syntax, including inline math, such as and centered math, such as

It also supports centered equations with linked cross-reference via embedded PolyTEX (Eq. (1.1)).

Softcover also supports an alternate math syntax, such as , and centered math, such as

The LATEX syntax is strongly preferred, but the alternate syntax is included for maximum compatibility with other systems.

1.2 Images and tables

This is the second section.

Softcover supports the inclusion of images, like this:

1.2.1 Tables

Softcover supports raw tables via a simple table syntax:

HTTP request | URL | Action | Purpose
GET | /users | index | page to list all users
GET | /users/1 | show | page to show user with id 1
GET | /users/new | new | page to make a new user
POST | /users | create | create a new user
GET | /users/1/edit | edit | page to edit user with id 1
PATCH | /users/1 | update | update user with id 1
DELETE | /users/1 | destroy | delete user with id 1

1.3 Command-line interface

Softcover comes with a command-line interface called softcover. To get more information, just run softcover help:

$ softcover help
Commands:
softcover build, build:all # Build all formats
softcover build:epub # Build EPUB
softcover build:html # Build HTML
softcover build:mobi # Build MOBI
softcover build:pdf # Build PDF
softcover build:preview # Build book preview in all formats
softcover config # View local config
softcover config:add key=value # Add to your local config vars
softcover epub:validate, epub:check # Validate EPUB with epubcheck
softcover help [COMMAND] # Describe available commands...
softcover login # Log into Softcover account
softcover logout # Log out of Softcover account
softcover new <name> # Generate new book directory structure.
softcover open # Open book on Softcover website (OS X)
softcover publish # Publish your book on Softcover
softcover publish:screencasts # Publish screencasts
softcover server # Run local server

You can run softcover help <command> to get additional help on a given command:

$ softcover help build
Usage:
softcover build, build:all

Options:
-q, [--quiet] # Quiet output
-s, [--silent] # Silent output

Build all formats

1.4 Miscellanea

This is the end of the template—apart from two mostly empty chapters. In fact, let’s include the last chapter in its entirety, just to see how mostly empty it is:

# Yet *another* chapter

*This chapter left intentionally blank*

Visit The Softcover Book to learn more about what Softcover can do.

1. This is a footnote. It is numbered automatically. ↑

Table of Contents

- Frontmatter

- Chapter 1