the calibre viewer

Today we explore the many features of calibres ebook viewer. calibre’s ebook viewer allows you to view ebooks in all of the 22 input formats that calibre supports conversion from. These include CBZ, CBR, CBC, CHM, EPUB, FB2, HTML, HTMLZ, LIT, LRF, MOBI, ODT, PDF, PRC, PDB, PML, RB, RTF, SNB, TCR, TXT, TXTZ, and no, I did not make that up 😉 They are all existing ebook formats.

However by default only files in EPUB, FB2, HTML, LIT, LRF, MOBI, PDB, PRC nad RB formats are opened in the calibre internal viewer. This is because for the remaining formats, usually a better result is obtained by viewing in an external viewer; like acroread or okular for PDF. For these other formats calibre will automatically open the files in an external viewer unless you ask it to open in the internal viewer. To choose which formats you would like to view using calibre’s internal viewer go to Preferences -> Behavior -> and select the formats you want in the right column.

The buttons
The top left corner of the viewer gives you a location as a decimal number. This does not change when you change the viewer window size or the font size. So you can always use that number to refer back to a particular part of the book. The buttons in the ebook viewer have been labelled in the figure below. We will go through the functionality of each.

Back and forward buttons: These buttons will only be functional if your ebook has links in it that take you to other parts of the ebook or if you click on an entry in the table of contents (discussed next). Once you click on a link you can use the back button to take to the place you were before you clicked the link. These buttons are similar to back and forward buttons on a browser.

Table of Contents (TOC): Clicking this button opens up a TOC as shown in the figure below. You can navigate through the chapters of the book by clicking on the entries of the TOC. The figure shows that when the entry “ABSENT TREATMENT” is clicked in the TOC the viewer takes you to that chapter. Clicking on the TOC button again will make the TOC disappear.

Previous and Next page: These buttons should be used to navigate pages. Not the back and forward buttons which become activated only when a link is clicked or the TOC is used.

Bookmark: When this button is clicked a window opens that allows you to choose a helpful name for the bookmark so you can refer to it easily later.

Reference mode:
 When this button is clicked and the mouse is hovered over any text, a unique number referring to the paragraph to which the text belongs is displayed. This number is independent of viewer window size or font size and can be used to refer to the paragraph.

Preferences: Clicking on this button opens a new window with three tabs. The first tab is “General” and here you can choose the default font you would like in each font family as well as the font family. You can also choose some window and mouse settings to suit your convenience.
The next tab is “Keyboard Shortcuts”. The calibre has a default set of shortcuts for taking you to different sections of the ebook or for scrolling. For example by default the viewer uses the “J” or “Down arrow” key to scroll down the document, however if you dont like this choice you can double click on it. Initially “Default” is selected, but you can select “Custom” and it will let you choose upto 2 keyboard shortcuts.

The third tab is “User Style Sheet”. Here you can customize the background colour, indentation, relative font sizes of section titles or chapter names etc. To do this you have to create a custom style sheet (CSS).  Here is an example:

body {color:black !important;background-color:rgb(228,200,200) !important;text-align:justify !important;text-indent:3em !important;}h1, h2, h3, h4, h5, h6{color:red !important;text-align:center !important;font-style:italic !important;font-weight:bold !important;}
The first line sets the text color to black. On the second line is a command for the background color in RGB. The particular values chosen here generate the pink background in the following figure. The third line ensures the text ends at the same position on the right end of the viewer (compare figure below with figure above). The fourth line specifies the indentation at the beginning of each paragraph. The lower set of commands sets the text style for headings (hi, h2 … , h6) to have color red, aligned center, in italics and bold. So even if you don’t know how to create a CSS all on your own just copy an example CSS and tweak the values to get the colors alignment and indentation you want. Notice the “!important” in every line of the CSS. That is required to override the style already specified in the epub book. To see the effect of each of these elements of the style sheet compare the figure below which uses the above CSS with the one above (no CSS). The TOC was removed in the figure below by just clicking on the TOC button.

CSS allows you to make many other powerful stylistic changes. For help with writing CSS or for some more examples visit the CSS thread on calibre’s library management forum on mobileread.

Metadata: Clicking on this button displays the metadata of the book on the viewer screen. See figure below

Hope you found this useful. Please feel free to comment. See you in about a week.

Leave a Reply

%d bloggers like this: