You can now easily create an index in a Leanpub book!

When you create a new book to write on Leanpub, you will be able to mark index entries in your manuscript, and have them produce an index at the end of the PDF version of your book.

(This doesn't work in our Upload writing mode, of course! In that writing mode, you create your ebook file using tools or apps other than Leanpub.)

Here's how you write a normal index entry in your book manuscript:

# Chapter 1: Loomings

Call me Ishmael{i: Ishmael}

By typing {i: Ishmael} after Ishmael, you are instructing Leanpub's book generators to make an index entry referring to this spot in the book.

In the Index section that will automatically be created at the end of your PDF, the example above will create an index entry that looks like this:

You can also create index entries under headings; for example, if you want index entries under the heading "Niagara", you would do this:

Were Niagara but a cataract{i: "Niagara!cataract"} of sand{i: "Niagara!*sand*"}, would you travel{i: "Niagara!**travel**"} your thousand miles to see it?

By typing Niagara! in {i: "Niagara!cataract"}, you are indicating that you want the index entry for cataract to be under the heading Niagara in the index.

Here is what the example above would look like in the index:

In that example, you have noticed that sand is in italics, and travel is in bold. That's because you can format the index entries like this for italics *sand*, as in the example sand{i: "Niagara!*sand*"}, and you can format the index entries like this for bold **travel** as in the example travel{i: "Niagara!**travel**"}.

You can do "see" and "see also" index entries. This is a bit more complicated!

Let's say you want to do a "see" and a "see also" entry under the index heading for Tennessee.

To do a "see" entry for silver, you would type silver{i: "Tennessee|see{i:'silver'}"}. Note the part at the end: |see{i:'silver'}"}

To do a "see also" entry for coat, you would type coat{i: "Tennessee|seealso{i:'coat'}"}; Note the part at the end: |seealso{i:'coat'}

The examples above will create index entries that looks like this:

Here's an example of what an index page will look like:

You can see this example if you get this free Leanpub book:

The public repository for that book is here and you can download a zip file of the repository's contents by clicking here.

One last thing! When there are enough entries, you will see that the Index pages actually have two columns.

OK, that's it!

If you have any feedback or questions about this article, please email the Leanpub team about it at!

If you have any questions or thoughts on writing and self-publishing with Leanpub, please join our global community of authors in our Authors Forum here!

Interested in creating your first Leanpub book? Here are some quick tutorials for our most popular writing modes:

Are you looking for great deals on Leanpub ebooks, ebook bundles, and courses? Sign up for our Weekly and Monthly newsletter sales here!

Subscribe to our YouTube channel here:

Please subscribe to our YouTube channel here:

You can also follow Leanpub in lots of other places!

Did this answer your question?