Title of the Book

Change me

Author Name

Contents

- Preface

- Chapter 1 The first 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

The first chapter

This is the first paragraph of the Softcover Markdown template produced with the softcover command-line interface.  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.[1]  For more information, see The Softcover Book.  To learn how to easily publish (and optionally sell) documents produced with Softcover, visit Softcover.io.

This is the second paragraph, showing how to emphasize text.[2]  You can also make text bold or emphasize a second way.  Via embedded PolyTEX, Softcover also supports colored text, such as red, cornflower blue, and arbitrary HTML colors.

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 so-called “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:

Using LATEX labels, you can also include a caption (as in Figure 1.1) or just a figure number (as in Figure 1.2).

Figure 1.1:   Some dude.

Figure 1.2

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

See The Softcover Book to learn how to make more complicated tables.

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

.

.

.

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. Pronunciations of “LaTeX” differ, but lay-tech is the one I prefer. ↑

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