Sample Books
Why Sample Books?
Leanpub lets you create a sample book, which readers can download for free to help them decide whether they want to buy the real book.
To do this, you create or edit a file called Sample.txt in the ‘manuscript’ folder for your book. Note that, like Book.txt, the Sample.txt file is just a list of files. It’s supposed to be a smaller list than what is in Book.txt, or else you’re giving your whole book away! If you don’t want a sample book, just delete the Sample.txt file.
(Please note that a new Sample Book file will be created for you to review every time you make a new preview of your book. However, the Sample Book available to customers will only be updated when you publish a new version of your book.)
Consequences for Manuscripts
One consequence of this approach to specifying a sample book is that it’s an “all or nothing” decision to include a file. If you include a file in the list in Book.txt, all the chapters and sections in that file are inserted in your book. Because of this, we recommend a couple things:
- Either use a separate text file for each chapter, or
- Never let a section span multiple text files.
These two guidelines mean that your sample book is a lot less likely to have problems. If you don’t follow them, things can still work, but you can sometimes create a situation where your book will be created fine but your sample book will not.
So, if you use the “separate text file for each chapter” approach, things will just work.