# 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](http://kramdown.rubyforge.org/) converter and some custom extensions. (The other available input format is *PolyTeX*, a subset of the *LaTeX* typesetting language optimized for ebooks. PolyTeX has a more complicated syntax but is more powerful.) For more information, see [*The Softcover Manual*](http://manual.softcover.io/) (**link not live yet**). To learn how to easily publish (and optionally sell) documents produced with Softcover, visit [Softcover.io](http://softcover.io/). Softcover is currently in private beta; go to [Softcover.io](http://softcover.io/) to get an invitation. This is the *second* paragraph, showing how to emphasize text.[^sample-footnote] You can also make text **bold** or _emphasize a second way_. ## A section This is a section. ### Source code This is a subsection. You can typeset code samples and other verbatim text using four space 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: {lang="ruby"} def hello puts "hello, world" end Softcover's Markdown mode also extends kramdown to support "code fencing" from GitHub-flavored Markdown: ```ruby def hello puts "hello, world!" end ``` ### Mathematics Softcover's Markdown mode supports limited mathematical typesetting, including inline math, such as {$$}\phi^2 - \phi - 1 = 0{/$$}, and centered math, such as {$$} \phi = \frac{1+\sqrt{5}}{2}. {/$$} ## Images and tables This is the second section. Softcover supports the inclusion of images, like this: ![Some dude.](images/2011_michael_hartl.png) ### 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` | ## Command-line interface Softcover comes with a command-line interface called `softcover`. To get more information, just run `softcover help`: ```console $ 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 # Generate new book directory structure. softcover open # Open book on Softcover website (OS X only) softcover publish # Publish your book on Softcover softcover publish:screencasts # Publish screencasts softcover server # Run local server ``` For additional help on a given command, run `softcover help `: ```console $ softcover help build Usage: softcover build, build:all Options: -q, [--quiet] # Quiet output -s, [--silent] # Silent output Build all formats ``` ## 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: <<(chapters/yet_another_chapter.md, lang: text) Visit to learn more about what Softcover can do. [^sample-footnote]: This is a footnote. It is numbered automatically. [^pronunciation]: Pronunciations of "LaTeX" differ, but *lay*-tech is the one I prefer.