[Update: you can find an example of an academic citation of a Leanpub book here: https://www.cambridge.org/core/journals/journal-of-functional-programming/article/review-of-thinking-with-types-by-sandy-maguire-leanpub-2019/151CBE6431DDB2C828F77CECDDAA828B]

I'm actually not sure how different citation systems deal with things like books bought through Leanpub.

Based on a bit of research, here's one example of how it can be done:

Epp, Leonard. The Rhetoric of Obscurity. n.p.: Author, 2016.

The "n.p." means "no place", and stands in where you would normally put the publisher's place name, e.g. "London". "Author" is what I gather one should put in place of a publishing company's name, when a work is self-published (Leanpub is a platform for publishing, not a publisher).

We're familiar with the importance of getting this right by following explicit guidelines for a known reference style in a given discipline, which we would recommend you do.

To get a better answer than mine, you could try going to a university library and asking a librarian about the situation. In my experience librarians like to be asked about things like this.

PS Here are some resources I found useful. Curious how little their is about this to be found.





UPDATE 2018-01-21:

Based on examples I found in Christop Molnar's book *Interpretable Machine Learning* learning book, here are some further examples of how you might cite a Leanpub book:

Last-Name, First-Initial. (Year). Book-Title. Retrieved from Complete-URL

Here is a framework for a bibtex entry:

title = {Book-Title},
author = {Author-Full-Name},
publisher = {Complete-URL},
note = {\url{Complete-URL}},
year = {Year}

Did this answer your question?