Skip to content
Alessandro Morandi edited this page Mar 29, 2013 · 2 revisions

Basic FAQ

This is a list of basic Frequently Asked Questions for Baker. If you cannot find your question, try with the Advanced FAQ.

How do I get started?

Download the Baker E-Book Framework from http://bakerframework.com/.

A good idea is to immediately download the Baker HPub example book as well, “A Study in Scarlet,” by Arthur Conan Doyle. You can also download Laker, another book example available at http://www.lakercompendium.com/.

What is Laker?

Laker is a nicely formatted book that you can use instead of the formatting used in Baker. It also has example code for slideshows, YouTube videos and other things. You can find an entire section on how to use Laker here: http://www.lakercompendium.com/how-to-use/

Ok, I've downloaded all that, now what am I looking at?

If you open up the Baker folder, you'll notice lots of files with names like IndexViewController.h and main.m. Those are the files that Xcode uses, which you can mostly ignore. The important files you need to know are Baker.xcodeproj which is the file you open with Xcode, and a folder called books.

What is the books folder? Why is it so important?

When you're using Baker in Standalone mode, the book folder is where your book or magazine files go, so it's where you'll be doing almost all your work. Make SURE you keep everything inside the books folder, or else you'll find Baker will stop working.

HELP! My books folder is empty! What do I do?

The books folder is empty because you haven't created any book yet. If you want to see what a sample book looks like, download the example from the Baker website.

Also, note that if you're using Baker in Newsstand mode, your books folder will always be empty (you can even delete it if you want).

How do I get the example book to work?

All you need to do is to put the book folder from the example inside the empty books folder in Baker. The example book doesn't include the XCode files, in case you’re wondering.

Does Laker work the same way?

Yes, just copy the folder from Laker inside Baker's books folder.

What is that other stuff in the Laker folder?

Those are Photoshop templates to help you design. You can ignore them for now if you're just looking to see what Laker looks like.

How does the book folder work?

Think of the book folder as a mini website. This is because Baker is based on HTML5. The chapters of the book (and your future book too) are individual web pages. You can see them in the book folder, named Part1-01.html, Part1-02.html and so on. You also have a book cover, a book index, and a tail (the last page).

Can I change the way a book folder is structured?

The folder is structured in such a way that Baker knows where everything is. You don't need to follow the same structure, but if you're new to this, it might be helpful to. That way things won't break in other parts of Baker. In the example, all book chapters and pages sit in the main book folder. All images go inside the images folder, all JavaScript goes in the js folder, and so on. You get the picture.

So how do I build my own book?

You can use an HTML editor such as Adobe Dreamweaver to create your own files. You can also use one of the many free HTML editors around, or you can code by hand, if you know how. You can also export your book from MS Word or another editor to HTML, but this is probably not such a good idea. You can also just edit the files from the sample book.

Just remember to edit ALL the files with your own info so you don't get embarrassed when you publish your own book with a Baker chapter by accident.

I see both a Book Index.html file AND an index.html file. What is the difference?

The Book Index.html file is a normal page in the book, which happens to contain the table of contents, as seen on the second page of the example. The index.html file contains the navigation bar that pops up when you double tap.

Ok, I've created my own book. Do my files have to have specific names?

No. You can use whatever name you see fit, as long as you reference them correctly in book.json.

How does Baker know what order to put my pages/chapters in?

Baker uses a file called book.json to organize everything into the right order. You can find an example in the sample book.

Is book.json important? Does it do more than organize?

Yes, this file is very important. You can change numerous settings inside book.json that affect how your book displays and the order in which chapters appear. You can also set the author, title, orientations and other settings. In fact, you MUST change these settings before you publish your book. See the HPub Specification and the Book.json Baker extension parameters.

If I use the book.json file from the example book in my book, do I need to change anything?

Yes, you need to replace ALL the Baker information with your own. See the above links.

I want to add some cool Baker specific parameters to my book like page rendering or a custom start page; how do I do it? I can't find them in the example!

Not all the Baker parameters are used in the example. You have to add the ones you want and the delete the ones you don't use.

To add a Baker specific parameter to your book.json file you can either write it from scratch or copy the formatting of one the parameters that is used in the example and replace the name of the parameter with the one you want to use. For example, if you wanted to add a page rendering parameter to the example you would open up the book.json file, place your cursor just before "-baker-page-numbers-color": "#000000", and press enter. Then type or paste in

"-baker-rendering": "three-cards",

That's it. Note that all lines except the last one should have a comma at the end.

The book.json documentation says the URL parameter is required. What does it do? Do I need to get rid of the Baker URL that's in there?

Yes. The URL parameter identifies your book uniquely. It can also provide a path to your website for someone to download the book if you want it to. So you need to replace the one in the example with your own. It must be unique.

So can I just pick any URL? Does it need to lead anywhere?

Yes, you can pick any URL. No, you don't need to place a file on your website or do anything. It doesn't actually need to lead anywhere.

But I should pick a useful, unique URL, right?

Yes, you should pick a useful URL. Try to fit as much information in is as possible, for example book://publisher.org/author/book-name/edition.hpub. That way, all your info is actually hidden in the URL. Your URL must also be unique. So if you're publishing TWO books, they should have different URLs!

How do I change the orientation of my book? I want it to only be landscape, or only portrait.

You can change it in book.json using the orientation parameter. If you look at the example book, you can see where it is defined. Just change the current option to the one you want by replacing the second word inside the quotes. The available options are:

  • "orientation": "both",
  • "orientation": "portrait",
  • "orientation": "landscape",

How do I format my book? How do I [insert formatting question here]?

Most of the formatting in the example book can be changed by fiddling with the CSS files inside the CSS folder inside the book folder. Or you can create your own CSS. If you're unsure how to do something, take a look at the CSS files that are there and guess. Also take a look at Laker, which has some fancy formatting already included.

I want to take the example files that came with Baker and just "change" them to make my book. Can I do that?

Sure, that's why it's there. But please add a link to Baker inside your app. Baker can only continue as long as it's known and supported by the community. If you used any part of Laker, a link is REQUIRED.

Can I use a custom font in Laker?

Check out the Laker website for how to use custom fonts in Laker.

Something doesn't work! Help!

In this situation, try reading our Problems and debugging page. It should help you through. :)

Clone this wiki locally