Archive for July, 2011

* Formatting Tips: Print Style Paragraphs

Posted on July 29th, 2011 by John. Filed under Formatting Tips.


About Formatting Tips.

When creating an ebook using EPUB paragraphs default to looking like they do on a web page. Each paragraph is separated by a blank line and there is tab indent. It’s relatively easy to format your ebook to look like a printed book. The first paragraph of a chapter should not have an indent but all subsequent ones should. Also, there should be no blank space between paragraphs. Paragraphs are broken up visually using the indent.

All of the paragraph formatting can be achieved using CSS. The first thing we want to worry about is the indent.

p {
    text-indent: 15px;
}

The above css sets the text indent for all p tags to 15 pixels. The first line of every paragraph will have an indent with that property set.

Next we want to remove the spacing between the paragraphs. Add the following to the p style block:

    margin-top: 0px;
    margin-bottom: 0px;

Now we need to worry about the first paragraph in every chapter. What we need to do is create a class that is applied to p tags and set it to leave the indentation alone on these paragraphs. The CSS block will look like this.

p.ni {
    text-indent: 0px;
}

Any p tags in the XHTML with the “ni” class set will have the indentation removed. You will need to change the opening p tag of the first paragraph of each chapter to the following:

<p class="ni">

The best way to illustrate this concept is with an example. Download ft-print-style-paragraphs.epub. Opening the file with Sigil you will see the example chapters and the external CSS that is referenced by each XHTML file.

Tags: , , , , , , .

    Comments Off


* Formatting Tips Series

Posted on July 29th, 2011 by John. Filed under Formatting Tips.


Formatting Tips is a series of articles focused on helping format an ebook to make it visually appealing. The major focus will be on EPUB. However, these articles will not always focus on that format. I plan to touch on ebook creation in general too.

EPUB internally uses of XHTML and CSS for formatting. I recommend using Sigil for formatting your EPUB ebooks. However, I will try to keep the information in these articles focused on generic so that the techniques can be applied using any editor, even a basic text editor like Notepad.

These articles are aimed at all audiences but a basic level XHTML and CSS knowledge is assumed. Also, many of the techniques I will be presenting can be handled in a number of different ways. I am going to focus on what I’ve found works for me.

I am a bit biased and prefer free and open source solutions. Many of the tools I will be talking about I help to develop. I am a developer for both Sigil and calibre for instance.

Feel free to contact me with any comments, questions, or concerns. Please realize I am not an expert on everything. I encourage people ask questions at MobileRead which is an excellent community devoted to everything ebook related.

Tags: , .

    Comments Off


* All Sigil 0.4 Blocker Bugs Squashed!

Posted on July 27th, 2011 by John. Filed under Sigil.


Tonight I was able to fix bug 813 (see 837 for details). This is the last blocker bug for the 0.4 release. I merged a few patches there were sitting around. I’ve also fixed and issue with changes to metadata not being relayed to the GUI as the file having been changed. With these bugs fixed 0.4 is in a state that I feel is ready for release.

I have little experience with building releasable, binary packages for OS X and Windows. So It will be a few days (maybe weeks) before they’re out. There is a strong possibility I need to buy a copy of Windows and that will take a few days to get. Also, I need to actually setup a Windows build environment. I’m going to try building using an old netbook I have (it’s the only computer I can use that has a copy Windows for building packages.

I don’t want to do this release piece by piece so I’m going to wait to release all packages (OS X and source) together. Also, I plan to put out an RC 2 before 0.4 final. The RC 2 will be exactly the same as 0.4 final as far as the code is concerned. RC 2 is to make sure I package Sigil properly. It won’t do any good to put out 0.4 that can only be run if you have all of the development libraries Sigil uses installed independently of Sigil.

Tags: , .

    Comments Off


* Taking Over Sigil

Posted on July 24th, 2011 by John. Filed under Sigil.


The other day it was announced I am now the maintainer of the Sigil. Back in June Strahinja announced that he was looking for someone to take over the project. I highly respect the work Strahinja has done with Sigil and this is a project I don’t want to see die. I myself use Sigil one occasion and when dealing with e-books I often find myself recommending its use.

After seeing the announcement by Strahinja that it was time to move on I contacted him about taking over in his stead. He agreed and has now given me control over the project. From this point on I will be handling releases, bug wrangling and everything else that goes into managing an open source project. I don’t plan to remove Strahinja’s access to the code repository. If he asks I will but Sigil started as his baby and if he wants to start working on it again I fully trust him and I would have no problem with this.

The good news is Sigil is not going to die tor stagnate. I am fully committed to continuing the project and bettering the application. That said things are different now than when Strahinja was here. Strahinja was pretty much a one man show when it came to fixing bugs and implementing new features in Sigil. He had a lot of time he was able to spend working on it. I unfortunately do not have nearly that amount of free time to work on Sigil. I have a day job unrelated to programming, publishing, or books in general. I can only work on Sigil in my spare time (mainly after work and weekends). I also work on other projects too which will be sharing my free time with Sigil development. I cannot match the pace of development Sigil users have come to expect so unless others step up to help me with coding development will slow considerably.

My plans for Sigil are as follows. Short term I want to get 0.4 released. Currently it’s sitting at RC 1 and there are only a few small bugs I would like to fix for it. I have been spending the past few days becoming familiar with Sigil’s build system. Once 0.4 is out I will need to spend some time getting to know the ins and outs of the code itself. From there I will move onto working toward the 0.5 release. Right now I’m going to commit to a hyperlink editor and spell check support for 0.5. I will need to look over the existing bugs and see what else would be a good fit for 0.5. At some point when the EPUB 3 specification is finished I will work on bringing Sigil up to speed with it. That will take place in what ever release number Sigil is at at that time.

I’m not going to give any release target dates for either 0.4 or 0.5. Each Sigil release will take the form of when it’s ready it will ship. One big difference between me and Strahinja is undoubtedly how we handle version numbers. I only use this system, major.minor.revision. With major numbers 0 is for feature incomplete and an unstable API. Going from 0 to 1 simply means that I feel the application is mature, stable and has a set API. Going from 1 to any other number means it’s a massive change in some way (features, functionality, UI, API…). Minor numbers are for new features. Revisions changes mean there are no new features only bug fixes. Up until 1.0 is released the majority of releases you will see will be minor release numbers. Such as 0.4 followed by 0.5 instead of 0.3.0 followed by 0.3.1 and so forth.

Aside from Sigil development there is also the Sigil development blog. I plan to use it to communicate Sigil announcements. I do want to point out that I do keep a personal blog which I also use. I will be posting all Sigil announcements on my blog as well as on the Sigil blog. However, I plan to keep posts on the Sigil blog to only Sigil content. If you want to keep up with everything I’m working on including Sigil then read my blog. If you want to keep up with only Sigil then read the Sigil blog.

As always feel free to contact me with any questions or concerns. I am always available to help if I can. MobileRead, email or blog comments are all ways to get in touch with me. However, I do ask that support type questions be directed to the appropriate section of MobileRead as I’m not an expert on all aspects of e-books. There are a lot of smart people there who can help too and often you’ll get an answer faster than asking me directly.

Tags: , , .



* Calibre Week in Review

Posted on July 2nd, 2011 by John. Filed under calibre.


This week saw some more work on Get Books. Once change is not user visible but makes it easier for new stores to be added. The other change is user visible and was suggested by a user.

I’ve added a base class for OPDS OpenSearch based stores. It will use the OpenSearch url and retrieve all results. It then puts them into a SearchResult object for use with Get Books. individual stores will need to do some massaging of the results because I’ve found that the results are often inconsistent from store to store. However, this class does the bulk of the work as far as searching and retrieving results goes.

The other change is the ability for results to be directly downloaded within the Get Books search result dialog. Often stores with OPDS access will have direct download links as part of an entry. Now stores can collect these links and pass it along to the search dialog. When present the search dialog will show a green down arrow signifying that the item can be downloaded. Clicking the item will show a dialog asking which format (usually there are many) to download. If you don’t want to download you can right click and choose the option to go to the result in the store itself. This change is to make it even easier for people to get books into calibre. Only a few stores support this due to the nature of the stores themselves but I hope to see more in the future..

Tags: , , , .

    Comments Off