About this manual

Copyright (C) 2012 Sourcefabric o.p.s

This manual was written by Adam Hyde, Aleksandar Erkalović, Trevor Parsons, Daniel James and the Booktype community, using the tools at FLOSS Manuals. Please add your comments and contributions at: http://en.flossmanuals.net/booktype/

This documentation is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this documentation; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.


The GNU General Public License is a free, copyleft license for software and other kinds of works.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.

Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

The precise terms and conditions for copying, distribution and modification follow.


0. Definitions.

“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.

To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

1. Source Code.

The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.

A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

The Corresponding Source for a work in source code form is that same work.

2. Basic Permissions.

All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

3. Protecting Users' Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.

You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

6. Conveying Non-Source Forms.

You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.

A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.

“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.

If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.

Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.

7. Additional Terms.

“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.

Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:

All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

8. Termination.

You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

11. Patents.

A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.

A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

12. No Surrender of Others' Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

13. Use with the GNU Affero General Public License.

Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

15. Disclaimer of Warranty.


16. Limitation of Liability.


17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.


Adding a Book to a Group

Once you have created or imported a book into Booktype, it will sit in the Books list on your user page. If you are a member of a Group, you may want one of your books in the Group's list of books as well.

Note that a book can only belong to one group at a time.

To add a book you have created or imported to a group:

  1. From your Dashboard, click on the link to the Group you want to add your book to in the My Groups list. 
  2. On the Group page under the Books tab you will see a drop-down list containing the titles of books that you have either imported or created.
  3. Select the book you want to add to the Group.
  4. Click ADD THIS BOOK TO GROUP. Your book now appears under the Books list on the Group page.

Removing a Book from a Group

At some point you may want to remove a book from a Group. On the Group's page under the Books tab you will see a remove link next to your book. Click on the link and your book will disappear from the list.

Adding Images

When you want to add images, start by editing the chapter you want to add images to, get your cursor in the right place and then click the import images button.

When the Insert Image window opens.


Click Browse to add an new image.

Browse tab: The Images tab lists all the images currently uploaded to your book. Click on an image name in the list and it will display a preview for you in the panel on the right. If this is the image you want to add to your chapter, click Insert.

Upload  tab: If the image you want to insert is not visible in the Images tab then it still needs to be uploaded to Booktype, it is time for the Upload tab. From here it is off to the Chose File button, which opens the regular file browsing window for your computer. Find the image you want, click on Open, and then Upload.

You can now insert the image you want into your chapter by selecting it from the list and clicking Insert.

Before You Install

For most authors it will not be necessary to have their own Booktype server, and there's every reason for them not to. Setting up their own Booktype server and backing up the data on a regular basis is a task that may distract authors from writing. If authors are going to share their work with the world, there may be good reasons to share a Booktype server as well - including the ability to take advantage of Booktype's collaborative features. Managed Booktype hosting is available from Sourcefabric, with support for creating both public and private books.

If you do not wish to collaborate on the writing task with authors outside your organization, then having your own Booktype server makes more sense. Also, if you don't have reliable access to the Internet, having your own Booktype server is a practical alternative to cloud-based services. For example, a school with laptops that can connect to each other on a network but not to the Internet may find a local Booktype server valuable.

There are three parts to a typical Booktype system, and depending on your requirements you may need to install one or more of:

By default, a Booktype installation can use a public Objavi and Espri server so there may be no need to install your own copy of Objavi or Espri to begin with.

The following chapters deal with installation on both GNU/Linux and Apple OS X servers. For writing and editing books, authors can use any computer with a modern web browser, such as Mozilla Firefox or Google Chrome. Microsoft Internet Explorer is not currently supported.

Learn by Sharing

To understand the relationship between CSS and the final result there is no substitute for trial and error. Designers must first understand how a ‘web native’ technology — CSS — applies to page based media (books). This paradigm appears simple but it requires a slight re-alignment of how book designers think about designing books, and to do this designers must try the process and persevere until they succeed. After that initial success things become easier.

Probably the best way to start is to take an existing book and look at someone else's CSS, then change it and see what happens. Generating a PDF takes anywhere from half a minute to a few minutes so this is a pretty quick method for seeing how CSS effects the layout of the book. For experimenting visit the following page:


At the bottom of this page you will find a link to the CSS used for the print version of the second edition of this book. You can see the CSS states:

/* Main CSS File: */
@import url("http://collaborative-futures.org/material/styles.css");
/* Uncomment based on the book size you export: */
/* A5 */
/* @import url("http://collaborative-futures.org/material/size/a5-hacks.css"); */
/* 5.5"x8.5" */
/* @import url("http://collaborative-futures.org/material/size/5.5x8.5-hacks.css");*/

This is CSS syntax that imports the ‘real’ CSS used which can be found here:


Copy this CSS, change it, and enter it in the CSS text field of Booktype, then try exporting the book again. Experiment with changing the CSS and see what happens.

The following are some examples you may wish to try out. 

List Example

ol { font-style:italic; font-family:Georgia, Times, serif; font-size:24px; color:grey; }
ol li p { padding:8px; font-style:normal; color:black; border-left: 1px solid #999; }
ol li p em { display:block; }

Definition List Example

dl {
    overflow: hidden;
    padding: 0;
dl dt {
    clear: both;
    float: left;
    padding-right: 10px;
    width: 160px;
dl dd {
    margin-left: 170px;
    padding-left: 20px;

dl dt {
    padding-bottom: 5px;
    padding-top: 5px;
    position: relative;
    text-transform: uppercase;
dl dd {
    border-color: #DDDDDD;
    border-style: solid;
    border-width: 0 0 0 1px;
    padding-bottom: 5px;
    padding-top: 5px;
dl dt:before {
    border-top: 1px solid #DDDDDD;
    content: "";
    position: absolute;
    right: -15px;
    top: 0;
    width: 30px;
dl dt:after {
    background: none repeat scroll 0 0 #FFFFFF;
    border: 1px solid #DDDDDD;
    border-radius: 6px 6px 6px 6px;
    content: "";
    height: 5px;
    position: absolute;
    right: -3px;
    top: -3px;
    width: 5px;
dl dt:first-child:before, dl.definition dt:first-child:after {
    display: none;

Table Examples

First example:

        font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
        font-size: 12px;
        margin: 45px;
        width: 480px;
        text-align: left;
        border-collapse: collapse;
table th
        font-size: 13px;
        font-weight: normal;
        padding: 8px;
        background: #b9c9fe;
        border-top: 4px solid #aabcfe;
        border-bottom: 1px solid #fff;
        color: #039;
table td
        padding: 8px;
        background: #e8edff;
        border-bottom: 1px solid #fff;
        color: #669;
        border-top: 1px solid transparent;
table tr:hover td
        background: #d0dafd;
        color: #339;

Second example:

        font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
        font-size: 12px;
        background: #fff;
        margin: 45px;
        width: 480px;
        border-collapse: collapse;
        text-align: left;
table th
        font-size: 14px;
        font-weight: normal;
        color: #039;
        padding: 10px 8px;
        border-bottom: 2px solid #6678b1;
table td
        color: #669;
        padding: 9px 8px 0px 8px;
table tbody tr:hover td
        color: #009;

Image Example 

 IMG {  -webkit-border-radius: 5px; border-radius: 5px; } 

Heading Examples

     font-size: 36px;
     border-top: 1px solid #333333;
     border-bottom: 1px solid #333333;
     line-height: 1em;
     font-family: 'Times New Roman';

or try this:

        font-variant: small-caps;
        text-transform: none;
        font-weight: 100;
        margin-bottom: 0;

Paragraph Examples

Example 1:

p {
font-size: 1em;
line-height: 1.25em;
margin: 0;
text-align: left;
p + p {
text-indent: 2.5em;
p:first-letter {
font-size: 3.5em;
line-height: 1em;
font-weight: 400;
float: left;
margin: 0 0.107em 0 0;
p:first-line {
font-weight: 800;
p + p:first-letter {
font-size: 1em;
line-height: 1.25em;
float: none;
margin: 0;

 Example 2:

p {
font-size: 1em;
line-height: 1.25em;
margin: 0.625em 0;
text-align: justify;
p:first-letter {
font-size: 3.5em;
line-height: 1em;
p + p:first-letter {
font-size: 1em;
line-height: 1.25em;

There are other examples to be found online, probably the most comprehensive resource is blog.booki.cc. When it comes to your turn to create CSS for your own books I strongly recommend you share the CSS online so others can learn from you. 

Command Line

This is some brief information on how to use the command line admin tools for Booktype. Using these tools you can export and import books and change the URLS and titles of books.

You can do a lot of damage with this, so be careful.


  django-admin.py help brokenlinks
  django-admin.py help bookimport
  django-admin.py help bookexport
  django-admin.py help bookrename


brokenlinks - check links inside of book(s).
   django-admin.py brokenlinks command-line my-book
   django-admin.py brokenlinks --no-remote command_line
   django-admin.py brokenlinks --ignore-url http://www.wikipedia.org/ command_line


bookexport - exports book into booki-zip file. this is not real export, and it does not export historic data.
   django-admin.py bookexport command-line
   django-admin.py bookexport --output my-export.zip --book-version 2.2 command-line


bookimport - imports new book from booki-zip file. you can import it
under new name also.
   django-admin.py bookimport book.zip
   django-admin.py bookimport --owner aerkalov book.zip
   django-admin.py bookimport --new-book-title "New title for Command
line" book.zip
   django-admin.py bookimport --new-book-title "New title for Command
line" --new-book-url commandline book.zip


bookrename - renames existing book.
   django-admin.py bookrename --new-book-title "New title" command-line
   django-admin.py bookrename --new-book-title "New title" --new-book-url commandline command-line
   django-admin.py bookrename --owner aerkalov command-line


  1.  there is env.sh script in the root. you should read that with "./env.sh" before doing any work from the command line, and especially if trying to run any django management command. you should set it up (it sets pythonpath, path and some other things). when running django app, all this things are loaded trough wsgi script, but when using command line you should load it manually (or put it in your profile, and have it loaded every time. but this is not very smart). this is also place where you setup your DJANGO_SETTINGS_MODULE environment variable.
  2. never run anything as root, or god forbid as your user account (or have things installed in your personal /home directory). if booktype is installed to be run as www-data user through apache, then everything must be run as that user. if you use root account, it will work, but it will also screw file permissions on your log files, on your attachment files and etc. also, running things with super user privilege is not very smart. if you go to booktype directory and you see more then one user in "ls -l" result list, you are doing it wrong.
  3. 3. django-admin.py and manage.py is result of not having defined DJANGO_SETTINGS_MODULE variable (and not having django/bin in your path). if you know what you are doing and what manage.py file you are running, it is ok to use it, but it is much smarter to be 100% sure with DJANGO_SETTINGS_MODULE  and django-admin.py. if you have more then 2 installations on the same machine, DJANGO_SETTINGS_MODULE is sane way to work with them. and etc..etc...etc...


When collaborating on a book, communication is a vital part of the process, whether working in a book sprint, taking your time on more long-term book generation, working locally in the same physical space or remotely online. These situations have different requirements and harmonising these into one system is where the Booktype team have done a lot of real world research. Booktype includes tools such as real time edit notifications to see who is editing what at this moment, a real time chat (web / IRC gateway), system level notifications, chapter status markers, messaging tools, book progress indicators, work flow tools, and live user status listings.

Real time edit notifications

When you have clicked on an edit link for a chapter and someone else enters the book's Edit page, your user name replaces the EDIT link in the Table of contents. This notification happens in real time; if you are looking at the overview screen when someone else clicks the edit link for one of its chapters, you will see the edit button change to their user name.


It is possible to message other people in Booktype using the messaging services.


Messaging works like any short message service (Status.net or Twitter). To message someone enter @ followed by their username. To message a group use ! followed by the group name. Tags (#) are also supported. It is also possible to follow people, groups and tags.

Messaging in Booktype is not designed to be 'just' for fun (although that is important!) but it is integrated into a collaborative workflow. From the editor is is possible to highlight text and click on the messaging button and that text is copied into the message. That means you can send messages with text snippets or images to others for proof reading or checking, translation etc.

Additionally when messaging is used this way an additional 'context URL' is added which is included in the message. Clicking on this URL directs the recipient to the chapter from which the content was sent. 

Real time chat

Upon entering a book's Editing page you will see a chat box for that book. The Chat is visible for the duration of the time you are editing the book, regardless of which chapter you are working on. Anyone else editing the book also has the chat box and you are able to communicate with them by typing directly into the text field under the the chat box. This feature is very useful for communication with remote participants in Book Sprints as well as any situation where contributors to a book are working on it simultaneously.

Other information is also communicated through the Chat box. When a contributor enters the book editing screen a JOINED marker is displayed along with their name in the Chat box. So anyone already editing a book can see that someone else has joined them in editing mode and they can start communicating.

Live Contributor Listing

Below the chat box is a Currently editing panel which lists all people currently working on the book. 

System level notification

System Level Notifications are generated when the following actions are performed:

Booktype generates and displays the messages in two ways: using the Chat Box and using the History Tab in the Editing Page.

Chat Box

When one of the above actions is performed the Chat box displays an INFO marker and brief description outlining what has taken place. This notification is extremely useful where several participants are collaborating on a book simultaneously. Each participant is kept up to date of others' progress and can instantly reply to any notifications using the Chat Box.

History Tab

The History tab sits next to the Images and Files tab in the book editing page. Clicking the History tab loads up a list of all the edits that have been made to the book. Every time one of the above actions is performed, a new item is added to the History tab.

The History Tab is divided into 3 columns: action, user and time. The action column lists the type of action that has taken place and if necessary it includes extra detail regarding the action. For example if the action recorded is create or save then the detail will list the name of the chapter that was created or saved. The user column lists the Booktype user who has performed the action and the date and time of the action is recorded in the time column.

To see more detail a user is able to click on the underlined chapter name in the action column which loads a history page for that particular chapter.

If an edit to a chapter has been very minor, for example a spelling correction, the author has the option to prevent a history record from being generated when the chapter is saved. This is carried out using the Minor change, don't notify tick box at the bottom of the Chapter Editing panel. Placing a tick in the box will prevent a history record from being generated when the chapter is saved.

An author also has the ability to add comments to the history record using three text boxes below the Minor change, don't notify tick box. The top box is a general comment box, followed by an Author text box, where the Author has the option of entering their name. The final text box is an Author comment box where the author is able to make another note. Comments entered into any of these text boxes will be added to a history record when the chapter is saved.

Chapter History

The history tab not only lets you see the changes that have happened to the book but it also allows you to view the changes that have happened to individual chapters. Clicking on a chapter's name in the action column takes you to a chapter history display. Here you will see a list of all the edits made to a chapter from its first creation down to the most recent revision. The Chapter History lists the revision numbers with the most recent revision at the top, it also includes the user who edited each revision, the time and date the revision was saved and also any comments made by the author in the general comment box mentioned above.

Using the compare column on the left you can review the differences between any two revisions. Simply select the left radio button for one chapter and the right radio button for the other chapter you want to compare, then click on the Compare revisions button to see the differences between the two chapters.

The records in the history tab can be very useful for working on a book over a long period of time, when contributing authors are often not logged into Booktype at the same time. It can display what edits other authors have contributed since the last time a participant logged on and help them to decide which areas to work on. This is especially true if the author has added comments detailing what they did and what further work they feel is needed in order to complete the chapter they have contributed to.

Chapter status markers

In the Chapters tab of the book editing page, on the right hand side of each chapter bar there is a status marker for the chapter.

This can be manually altered depending on what stage the chapter is up to. Clicking on the marker reveals a drop-down list. Click on the list and select the status required for the chapter. The chapter's marker is changed to the new status.

When working on a book that has been created from scratch, the default marker is new. For a book that has been imported from another source, the default status for a chapter is imported, even for new chapters that have been created from scratch after the import.

Book Notes

A book's notes are where contributors can discuss and add comments about the book as a whole. Anything can be added to a book's notes including a suggested structure or outline for a book, which areas need urgent attention, and even suggestions for a book's direction. Book Notes are accessed through the Notes tab on the book editing page. Once there, you have a free text field to add as much or as little as you want. When you have added your notes, click Save the notes at the bottom of the Notes tab to save your changes, an INFO notification will be displayed in the Chat box saying that the notes have been saved.

Control Centre

If your Booktype account has administrator privileges, you will see an extra link to 'Control Center' next to your user name in the top-right corner of your browser window.

Clicking this link will bring you into the Booktype Control Center, in a section called the Admin Control Center. This section provides you with an overview of the resources and current activity on your installation of Booktype. Displayed here are the total number of books, groups and users on the system; the amount of disk space being used by the Booktype database and by the files it is organizing; the users who are currently online working on their books; and a timeline of recent activity.


You can get back to this overview any time by clicking on the Admin Control Center link in the black navigation bar at the top of the page.

The other links available in the navigation bar are People, Books, and Settings.

There's also a Site link, which takes you out of the Control Center and into a normal user's view of your Booktype installation.


Any Booktype user can view the other users who are registered on the site, but a user with access to the Control Center can click on the People link to make various changes to other users' accounts.

Selecting a username from the list in People will bring you to a summary of information about that user's account on your Booktype site, including the user's books, groups and activity. There are two additional buttons: Edit Info and Change Password. The facility for changing the user's password is self-explanatory. Edit Info brings you to a screen where you can change key details of the user's account: Username, Full Name, Email, and User Description. You can also upload a new profile picture for the user.


Clicking on the Add New Person link in People brings to a screen where you can add a new user. This will be the only way of adding new users if you opt not to allow unregistered visitors to create an account for themselves (see Privacy setting below).




In the Settings section, you can make a number of important changes to your Booktype installation.



The Site sub-section contains three links: Description, Appearance, and Frontpage.

In the Description page, you can set or change your site's title, tagline, and favicon (the small icon that appears next to your site's address in a web browser).



The Appearance screen allows you to make custom changes to the CSS used in your Booktype site.


The Frontpage page lets you change the welcome message which is seen by users and visitors when they arrive at your Booktype site, and control whether or not a timeline of recent activity is displayed.


Publish Options

The Publish options sub-section contains two links: Allowed publishing options, and Default settings.

Allowed publishing options

Here you can control which publishing channels and output formats your users will be able to publish their books to. These options are described in the Publishing chapter of this book.


Default Settings

Here you can customize the CSS used by Booktype when outputting books to the various publishing channels and formats it supports: Print PDF, E-Book, Lulu, Screen PDF, and OpenDocument Format.



The General sub-section contains three links: Licenses, Default Book Settings, and Privacy.


When a user creates a book, they can choose from a number of copyright licenses under which the book will be published, including 'All rights reserved' if you wish to allow that. Please note that if you wish to enable authors to upload content to your Booktype installation which is not under a free culture or other open license, you will need to have copyright agreements in place with the relevant rights holders.

In this page, you can list the books which are being published under each license. It is also possible to add a new license by filling in its abbreviation and name. (Best to pick an existing license, though - we wouldn't want to add to the already confusing proliferation of free and open content licenses!)

Default Book Settings

Two settings are available when you follow the Default Book Settings link, in a screen entitled Book Create.

The Default Visibility setting defines whether or not a newly created book can be seen by other users. If ticked, this also means that by default new books will be editable by any user.

The Default License drop-down menu enables you to set which copyright license new books will be placed under. If you choose the null option at the top of the list then no license will be automatically set.

Users can change both of these settings for themselves at any time by following the Edit This Book link, clicking the Settings tab and choosing from the options available in the relevant drop-down menus.



The Privacy section contains three options.

The Anyone can register checkbox sets whether or not an unregistered visitor to your Booktype site can make an account for themselves. If you opt not to allow this, you can make accounts for users by clicking the Add New Person link in the People section, as described above.

The other two checkboxes control who can create and import books. Leave them unchecked if you would like your users to be able to create and import books themselves.


Copyright notices get attached in a class called 'copyright' e.g:

<div class="copyright">
<b>Published :</b> 2012-06-05 <br />
<b>License :</b> GPL <br />

You can add extra information to this by the use of the CSS psuedo class 'after', e.g:

.copyright:after {
        font-style: italic;
        content: "First Published 1964";




Creating a Book

All books are created from your Dashboard using the Book Wizard.


  1. Click on CREATE NEW BOOK
  2. The Book Wizard will open asking for the title of the book. This is the only required information. You can step through the wizard adding the rest of the information or you can simply click 'Create' now.
  3. Once you press Create you will be redirected to the book's Info page.
  4. You can always access your books from your Dashboard. Your books are listed under the My Books tab (on your Dashboard) as well as in the list of My Books.

Note: Booktype will not let you create two books with the same name.

Creating a Group

Groups are intended to bring people together to collaborate on books that share a common theme or interest. Click on Groups in the menu to see a list of existing groups and their descriptions.

If the group you want to join isn't there, you can start a group of your very own (see the chapter "Joining a Group" if you wish to join an existing group).

  1. Go to your Dashboard. Once the page loads you will see the CREATE NEW GROUP button. Click on this.
  2. A dialog box will appear. In the Group name box, type in a name for your group and then type in a brief description in the Description box.

  3. Finally, click on the Create button at the bottom of the dialog. Your new group will be added to the list on your My Groups page and it will appear in the list of Groups visible to everyone. Click on its name or the GO button to take you to the group page.

Creating an Account

After arriving at the Booktype server, you will need to sign in or create a user account before starting on your book. Account creation is simple:


  1. Under Create account add your desired User name, Password, and Full name, then your Email. Your full name is required as it is used for copyright attribution on any works you create or contribute to.
  2. Click the Create account button.
  3. Booktype will generate the account and redirect you to your Dashboard.

Creating Chapters

Once a new book is created click on the edit button next to the title of the new book on your Dashboard to open the book's editing page. You can also access an edit button from the book info page.


You will see the book open on the Chapters tab. This page is divided into two areas, the top area is the Table of contents and the bottom area is called Hold chapters. Any chapter residing in Hold Chapters will not be included when you publish your book.

Creating a Chapter

  1. In the Chapters tab on the editing page click on NEW CHAPTER at the top or bottom of the Table of contents.
  2. The New chapter window opens. Enter the Title of your new chapter and click Create chapter.

Adding CSS

So, all outputs are controlled by CSS. That is because we use the Webkit browsing engine to render our PDF, with a few bells and whistles. Rule based design is something people have to get used to for contained page design, so I thoroughly recommend you experiment lots with this side of the production. We have not explored this enough as the potential far outreaches our resources.

There are two parts to the CSS. The first is the usual styling of elements that you are probably familiar with from web design. Since we use Webkit (which is the browsing engine behind Safari and Chrome) just about any CSS you can apply to a webpage can be applied to elements in a book and in the same way.

To apply H1 use syntax like:

h1 { font-weight:bold;}

You can additionally use webfonts with @font-face but these will not be rendered in a paper book because PDF requires the fonts to be embedded. So the fonts must be stored on the server.

All CSS can be entered into the Wizard in the Publish tab for any edit page (_edit), for any book. Each book has its own settings per user, per book, per format. So anything you try will not effect other users settings. The wizard can be opened by clicking on "Settings" and then you will see some options. Choose 'Settings' next to 'book' to format book formatted PDF with CSS. The most interesting screen for custom CSS is the last one - click on 'advanced - style sheets'.

You will see two boxes.


Enter the CSS into the first box and make sure you select "Override ALL previous settings with custom CSS". Then try adding CSS, submitting the Wizard and click "Publish this book" to see the results.

Editing a Chapter

Once you have created chapters, content needs to be added to them (text and images). This is probably how you will be spending most of your time in Booktype; writing material, reviewing, editing and updating chapters, as well as inserting and organising images.

Accessing the Chapter Editor

  1. First you need to be in the Editing page for the book you are working on.
  2. Make sure the Table of contents is visible by clicking on the Chapters Tab.
  3. Then click on the EDIT link next to the chapter you want to edit.
  4. The Chapter editor opens showing the Chapter Title and any content that has already been added.
  5. Type away!

Saving your Work

As with every other software application you need to save your work regularly to avoid losing those hours worth of effort due to your laptop battery going flat or some similar incident.

Booktype has three buttons concerning saving your work which are located at the top of the Chapter editor. They are Save, Save and continue editing and Cancel.

Save : clicking on Save will not only save your changes to the chapter, but will also close the Chapter Editor and return you to the book's Table of Contents.

Save and continue editing : This button saves your changes but leaves the editor open for you to continue making changes to the chapter. This is the button to use regularly to ensure you don't lose the changes you have made to the chapter.

Cancel : This button is only used if you decide that you don't want to keep the changes that you have made to the chapter.


Booktype can publish to several channels and output formats. If you do not see the one you want listed then Booktype can be extended to include it, since it is Open Source software.


Let's look at the current formats and channels available :

Book: Used for the creation of printed books, the book (PDF) file can be uploaded to a print on demand service or even sent to a local printer for printing of a standard bound book. It can also be used for printing a single copy of a book from a domestic printer.

Ebook: a ebook (or e-book) is an electronic book. Booktype can generate many different types of e-books for reading on devices like the Kindle, Nook, Sony Reader and iPad.

Lulu.com: Booktype integrates with Lulu.com so that you can publish direct to this print on demand service.

Screen PDF: This type of output is a PDF formatted to be read on screen. It can be linked from a webpage, uploaded to various PDF reading sites, or downloaded for reading.

Open Document Text (.odt): This output is a 'text document' and can be opened and edited in LibreOffice and other word processors.

Publishing a Book

Once a book is ready from the Book page, click on the Publish tab. 

If you are happy with just the standard Booktype look and feel for your book do the following:

  1. Choose the output type from the list
  2. Click the Publish this book button

Booktype will create the favoured book type, and when finished will display a link to the book.

Booktype enables an incredible amount of power to customise each output format. For more information read the advanced sections of this manual.


Footers can be styled with the following code, for example (also found in the Booktype only CSS Panel):

 #right-footer {
  text-align: right;

#left-footer {
  text-align: left;

It is possible to use other variables, as described in the wkhtmltopdf manual.

Formless Content

There is a lot of interesting stuff happening to the page right now. The page is changing in so many ways – time based media is making its way into book pages, reactive content, scrollable space, and a multitude of differing display devices make designing pages pretty hard work these days. How to design for so many possibilities? How to understand so many possibilities?

Craig Mod of flipboard makes a very compelling argument for two forms of page: formless and definite content, in an article he wrote for Book: A Futurists Manifesto - the first book to be produced by PressBooks. Craig's argument in a nutshell and in his own words is:

the key difference between Formless and Definite Content is the interaction between the content and the page. Formless Content doesn’t see the page or its boundaries; Definite Content is not only aware of the page, but embraces it. It edits, shifts, and resizes itself to fit the page [...] Put very simply, Formless Content is unaware of the container. Definite Content embraces the container as a canvas.

Craig argues that most book content we know is formless – the text can reflow into other containers without affecting the meaning.  Its a really well argued position and one that is in tension to the current design methodologies of book designers today. Book designers are taught to design contained space – books are a very definite context in which they work. Desktop Publishing Applications are built to meet this methodology. Pixel perfect manipulation within a strictly contained space. If the designed digital article does not exactly match the printed artefact then something went wrong. A lot of energy has gone into this process.

Formless design principles are uneasy to consider for traditional book designers – how can you design for a page that does not yet know its container? It is literally like asking a book designer to design a book without telling them the page dimensions.

As it happens web designers have been thinking about page design too. For a long time now web designers have made pages that embraces differing containers – they have been working, at least in part, with formless content.

What is missing however are good tools for taking the web designers aptitude for working with formless content to enable them to produce books. A good tool set for designing formless books should not work with a constrained page dimensions. It is tempting, for example, to think of working with a design environment with constrained page-like artefacts - think of Google Docs as an example. Could something like Google Docs with its digital, scrollable, yet fixed page size be a good starting point for some kind of design tool? Place layout and typographical controls on top of Google Docs and do we have the next book design environment?

I don’t think so, because it is exactly the kind of idea that is blinded by the media of the past and cannot accept that things have changed. We must design tools that enable book design for formless content. What those tools look like is a very interesting question and one which Aleksandar Erkalović (Booktype lead developer) and I have been working on with students (Hannes Bernard and Aiwen Yin) from the Sandberg Institute in Amsterdam.

Our argument is that the design of formless content is really a partially constrained environment since elements within the page have some kind of relationship to each other. This is an argument web designers are familiar with when using design tools like position:relative – a rule which sets a relative position relationships between objects. Relationships can be constrained or shaped by rules which will be at least partially preserved when displayed in different contexts. The meaning is preserved by the relationship between the elements more than by their relationship to the constraints of a page.

This is the reasoning behind Cascading Style Sheets – the design language of the web. It is rule based design and even partly conditional. It is possible to express conditions in CSS even though it is not done that often. A CSS rule such as :

h2+p {page-break-inside:avoid;}

is a conditional CSS rule which will apply the style only when a paragraph follows heading 2 (h2) element.

Web designers know this kind of thinking but book designers are going to have to let go of pixel perfect design and enjoy thinking and designing this way. It seems like a simple idea but it takes a lot to overcome legacy. The legacy is so strong that designers are pretending the issue does not exist. There are tools now appearing and sold as design environments for iPad books. They give near 1:1 page relationship between design environment and the final result. However we all know what happens to digital hardware – it changes. What is true now will not be true five years from now so the idea that an ebook is a contained space is very appealing to traditional book designers but it will be a short lived myth. iPads might keep the same form for five years, they might not, but they certainly will not keep it over the next five to ten years. Better to learn how to design in the new way than be fooled into thinking you can bring all the old methods to a new medium and get away with it for long.

Booktype works with formless content and design using CSS. We are working on a visual design environment to assist this process but for now CSS is added through the Settings in the Publish tab. Almost any CSS that you make yourself or find on the net can be applied to the books.

Front Page

The style of the front page text (which just displays the title of the book) can be altered with the following CSS (found in Booktype ONLY CSS panel):

  font-size: 20pt;
  text-align: center;
  page-break-before: avoid;
  font-weight: normal;

You can add additional text such as a byline with the following:

content:"by Joe Smog";


Importing a Book

Books can be imported from several sources, Archive.org, Booktype and epub files. In this chapter we go through each of these scenarios.

To import a book visit your Dashboard and click on the My Books tab. Click on the Import Book button.

A pop-up box will appear with import options:


Choose the desired import type and enter the appropriate ID or URL as described. 

Note: When importing text into Booktype from it's respective locations and formats it is important to note that the document structure may not be a part of the source file. This would leave the entire text in a single chapter which will need to be broken up into its individual chapters and Sections once in Booktype.


The Internet Archive (http://www.archive.org) is a non-profit digital library storing digitised collections of websites, music, moving images, software and books. With its stated mission of "universal access to all knowledge.", its purposes include offering permanent access for researchers, historians, scholars, people with disabilities, and the general public to historical collections that exist in digital format.

On your My Books tab click on Import Book and select Import Archive.org book from the drop-down list, enter the Archive.org ID and press Import. The Archive id can be found in the Identifier field under the Selected metadata section at the bottom of the text's page on Archive.org.

Once the process has finished the imported book will be added to the list of books on your My Books page and Dashboard.


ePub, short for Electronic Publication is an open standard e-book format, that has the ability to optimise the text display for whichever device is viewing the book. ePub documents can be read by several different devices, including the Kindle, iPhone, iPad and any computer with ePub reading Software installed. Booki has the ability to import any document in ePub format.

NOTE: although ePub is an open format, not all books available in ePub format have open licences. Therefore, care needs to be taken when choosing to import an ePub document to ensure that it contains a permissive copyright.

To import an ePub document, first you need to get the url for the ePub book, then copy it's location. Then on your My Books tab click on Import Book select Import epub from the drop-down list. Paste the ePub URL into the enter epub URL text box and click on Import.

Once the process has finished the imported book will be added to the list of books on your My Books and Dashboard.

Import Booktype Book

It is possible to import books from other Booktype installations. Using this process you can also clone or copy entire books from the same Booktype installation - the process is the same. First you need to get the URL for the book, then copy it's location. Then on your My Books tab click on Import Book select Copy or import Booktype book from the drop-down list. Paste the URL into the text box and click Import.

Once the process has finished the imported book will be added to the list of books on your My Books and Dashboard.

Installation on GNU/Linux

Depending on how recent your GNU/Linux distribution is, you might need to install some of Booktype's newer Python dependencies using easy_install (http://pypi.python.org/pypi/setuptools) or pip (http://pypi.python.org/pypi/pip). This is because some GNU/Linux distributions do not have new enough packages to satisfy Booktype's requirements.

First, install the development packages and Redis server (http://redis.io/). On Debian or Ubuntu, you can do this in a terminal with the apt-get command:

sudo apt-get install git-core python-dev python-pip libjpeg-dev libxml2-dev libxslt-dev redis-server

Next, install the remaining dependencies. The following package installs have been tested on Ubuntu Lucid 10.04. Other distributions may have new enough versions of the packages available via apt-get.

Django, minimum version 1.2 (http://www.djangoproject.com/)

sudo easy_install django

SimpleJSON (http://pypi.python.org/pypi/simplejson/)

sudo easy_install simplejson

South (http://south.aeracode.org/)

sudo easy_install South

lxml (http://codespeak.net/lxml/)

sudo easy_install lxml

Unidecode (http://pypi.python.org/pypi/Unidecode)

sudo pip install unidecode

Installing from the git repository

The git repository is an online collaboration server which contains the most up-to-date version of Booktype available.

1. Create a directory for the Booktype installation such as /var/www/mybooktype and make sure it is owned by the www-data user:

sudo mkdir /var/www/mybooktype/
sudo chown www-data:www-data /var/www/mybooktype/

Distributions other than Debian/Ubuntu may have the web server running under another username, such as httpd.

2. Download a copy of Booktype from the git repository to the /usr/local/src/ directory:

cd /usr/local/src/
sudo git clone https://github.com/sourcefabric/Booktype.git

3. Change to the Booktype/scripts directory like so:

cd Booktype/scripts  

4. Switch to the www-data user for the remaining steps:

sudo su www-data

5. Create the Booktype instance:

./createbooki --check-versions --database postgresql /var/www/mybooktype/

The server will respond:

+ Trying to import Django.   [OK]
+ Trying to import booki.   [OK]
+ Trying to import lxml.   [OK]
+ Trying to import Python Imaging Library (PIL).   [OK]
+ Trying to import Redis module.   [OK]
+ Trying to import South module.   [OK]
+ Trying to import Unidecode module.   [OK]

Project directory does exist [/var/www/mybooktype]. Directory might be already created by administrator and you just need to populate it with booki project files...
 * If that is the case, type 'yes'.
 * If you are not sure, type 'no'.
Proceed anyway [yes/no] ? : yes

After entering yes and pressing the Enter key, the installation should continue:

+ Creating data directory.   [OK]
+ Creating logs directory.   [OK]
+ Creating static directory.   [OK]
+ Creating templates directory.   [OK]
+ Creating lib directory.   [OK]
+ Creating locale directory.   [OK]
+ Creating data/books directory.   [OK]
+ Creating data/profile_images directory.   [OK]
+ Creating data/cover_images directory.   [OK]
+ Creating booki.env file.   [OK]
+ Creating __init__.py file.   [OK]
+ Creating settings.py file.   [OK]
+ Creating booki.wsgi file.   [OK]
+ Creating wsgi.apache file.   [OK]
+ Creating gunicorn.nginx file.   [OK]
+ Creating factcgi.nginx file.   [OK]

Check [/var/www/mybooktype] directory for config files:
   booki.env      -  Environment variables
   booki.wsgi     -  WSGI file for Apache
   wsgi.apache    -  Apache config file
   gunicorn.nginx -  Nginx config file
   fastcgi.nginx  -  Nginx config file
   settings.py    -  Booki settings file

   templates/     -  Local Booki template files
   locale/        -  Local directory with translations
   static/        -  Local web files
   lib/           -  Local python libraries
   data/          -  Place for attachments

For further instructions read INSTALL file.

6. Change to the installation directory:

cd /var/www/mybooktype/

5. Edit the settings.py file:

nano settings.py  

There are several sections of this file which need to be edited to suit your installation. First, set the name and email address of the system administrator:

    # ('Your Name', 'your_email@example.com'),

Enter the name and domain name of your Booktype server:


BOOKI_NAME = 'My Booktype site'
THIS_BOOKI_SERVER = 'booktype.example.com'

Enter email and outgoing mail server details:

REPORT_EMAIL_USER = 'booktype@example.com'

EMAIL_HOST = 'localhost'

The database connection parameters should be similar to the following example:

DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2',
                         'NAME': 'booktype-db',
                         'USER': 'booktype-user',
                         'PASSWORD': 'booktype-password',
                         'HOST': 'localhost',
                         'PORT': ''

where booktype-password is the password that you set for the booktype-user when you created the booktype-db database in PostgreSQL.

If you have more than one application using the local Redis server, you may need to change the value of REDIS_DB to a number other than zero:

REDIS_HOST = 'localhost'

Finally, set the local time zone and the appropriate language code for your installation:



TIME_ZONE = 'Europe/London'


Press Ctrl+O to save the file and Ctrl+X to quit the nano editor.

6. Load the environment variables:

. ./booki.env

7. Initialize the database:

django-admin.py syncdb --noinput

The server should respond:

Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table south_migrationhistory
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.admin
 > django.contrib.messages
 > south
 > booki.reader
 > booki.portal

Not synced (use migrations):
 - booki.editor
 - booki.account
 - booki.messaging
 - booktypecontrol
(use ./manage.py migrate to migrate these)

8. As suggested by the output above, migrate the remaining parts of the database:

django-admin.py migrate

The server should respond:

Running migrations for editor:
 - Migrating forwards to 0007_auto__add_unique_publishwizzard_book_user_wizz_type.
 > editor:0001_initial
 > editor:0002_auto__add_field_book_hidden
 > editor:0003_attributionexclude
 > editor:0004_book_permission
 > editor:0005_auto__add_field_book_cover__add_field_book_description
 > editor:0006_auto__add_publishwizzard
 > editor:0007_auto__add_unique_publishwizzard_book_user_wizz_type
 - Loading initial data for editor.
Installed 0 object(s) from 0 fixture(s)
Running migrations for account:
 - Migrating forwards to 0001_initial.
 > account:0001_initial
 - Loading initial data for account.
Installed 0 object(s) from 0 fixture(s)
Running migrations for messaging:
 - Migrating forwards to 0003_auto__add_endpointconfig__add_field_endpoint_config.
 > messaging:0001_initial
 > messaging:0002_auto__add_field_post_snippet__add_field_post_context_url
 > messaging:0003_auto__add_endpointconfig__add_field_endpoint_config
 - Loading initial data for messaging.
Installed 0 object(s) from 0 fixture(s)
Running migrations for booktypecontrol:
 - Migrating forwards to 0002_static_user_css.
 > booktypecontrol:0001_initial
 > booktypecontrol:0002_static_user_css
 - Loading initial data for booktypecontrol.
Installed 0 object(s) from 0 fixture(s)

9. Create a superuser account for the Booktype administrator:

django-admin.py createsuperuser

Enter the required information as prompted:

Username (leave blank to use 'www-data'): admin
E-mail address: your_email@example.com
Password (again):
Superuser created successfully.

10. Add common documentation licenses to the new instance of Booktype:

django-admin.py loaddata documentation_licenses

11. Start a test instance of Booktype on a port of your server which is not in use, such as 8005:

django-admin.py runserver

12. Leaving the terminal running, open your web browser on the specified port at the localhost IP address of, for example

Alternatively, if you are running Booktype on a virtual machine such as VirtualBox, then you should use the IP address of the virtual GNU/Linux server. You can use bridged mode in VirtualBox network setup to obtain a real address on the local network for the virtual machine.

If all is well, you should see the Booktype Sign in page in your browser. You can sign in using the superuser account details that you created in the installation step above.

Once you are confident that Booktype is installed correctly, you can press Ctrl+C in the terminal to shut down the test instance. Then return to your normal user prompt in the terminal with the command:


so that you are no longer entering commands as the www-data user.

Apache configuration

The standard Apache web server can be used to serve your Booktype instance to other authors and project collaborators, either on the public Internet or local networks. To use Booktype with Apache, you need to install the module for WSGI (Web Server Gateway Interface). Read the Django documentation at
http://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/ for more details.

1. Install the Apache web server (the Prefork MPM version is recommended) and the WSGI module:

sudo apt-get install apache2-mpm-prefork libapache2-mod-wsgi

2. Copy the wsgi.apache file generated during Booktype installation to the Apache configuration directory for virtual hosts:

sudo cp /var/www/mybooktype/wsgi.apache /etc/apache2/sites-available/booktype

3. Edit the configuration file for your system:

sudo nano /etc/apache2/sites-available/booktype

You should change at least the values for ServerName, ServerAdmin and SetEnv HTTP_HOST to match the domain name configured for the server.

<VirtualHost *:80>

     ServerName booktype.example.com
     ServerAdmin admin@example.com
     SetEnv HTTP_HOST "booktype.example.com"

Press Ctrl+O to save the file and Ctrl+X to quit the nano editor.

4. Enable the Booktype virtual host, with the command:

sudo a2ensite booktype

5. Restart the Apache webserver with the command:

sudo invoke-rc.d apache2 restart

You should now be able to browse your Booktype instance at the URL defined in the VirtualHost configuration, such as http://booktype.example.com/ in the example above.

Subdirectory installation

It is possible to serve a Booktype instance under a URL such as http://www.example.com/booktype/ or similar. You would have to set the THIS_BOOKI_SERVER value in your project settings.py file, and adjust your Apache configuration file to point to that subdirectory.

Multi-site installation

You can have more than one Booktype instance on your server. To do this, create multiple Booktype projects under different filesystem paths such as /var/www/mybooktype2, /var/www/mybooktype3 and so on. Then copy the Apache2 configuration from each Booktype project to the Apache configuration directory /etc/apache2/sites-available/ under different names, editing the ServerName and SetEnv HTTP_HOST values for each file. You will need to ensure that the new domain names you have chosen are appropriately configured in DNS. Finally, enable each site with the a2ensite command and restart the Apache server.

Installation on OS X

Before installing Booktype on an OS X server, you need to create a suitable environment. You can use the command line tools easy_install to obtain the necessary Python dependencies and Homebrew to install Redis. The page at http://mxcl.github.com/homebrew/ provides instructions for a first time install of Homebrew.

To use Redis you need to install Command Line Tools for Xcode which can be found at the Apple developer web pages (https://developer.apple.com/downloads - you'll need an Apple ID before you are allowed to download), and xcode which can be downloaded using the OS X app store.

After the successful installation of Homebrew, open a terminal and enter the command:

brew install redis

Then install the Python dependencies, with the commands:

easy_install django
easy_install lxml
easy_install pil
easy_install simplejson
easy_install south
easy_install unidecode

Optionally, you can install these Python packages in a virtualenv (Python virtual environment).

Now it's time to install Booktype. To download Booktype from the source code repository you'll need git from http://git-scm.com/download/mac or the native GitHub application from https://central.github.com/mac/latest

Once git is installed, you can download Booktype with:

git clone https://github.com/sourcefabric/Booktype.git

Open another terminal, and enter the command:


to run Redis.

Back in the original terminal, where you downloaded Booktype with git, change to the scripts directory and create a Booktype instance called 'mybooki' with the command:

./createbooki --database sqlite $HOME/mybooki

Change to the target directory and edit the settings.py file to suit your installation. In this example we are using a python virtualenv and an sqlite3 database:

        'default': {
                'USER': '',
                'PASSWORD' : ''

Then edit TEMPLATE_LOADERS to read:


Load the environment variables, with the command:

. ./booki.env

Then populate the database with data:

django-admin.py syncdb --noinput
django-admin.py migrate
django-admin.py createsuperuser
django-admin.py loaddata documentation_licenses

If you get an unknown locale: UTF-8 error try the command:

export LC_ALL=en_US.UTF-8; export LANG=en_US.UTF-8

before running the above commands again. Finally, run a test server with:

django-admin.py runserver

Then open http://localhost:8000/ in your web browser to see the test server.

Joining a Group

After joining Booktype you may want to jump right in and create your own book, or you might wish to find and work with others on a book. For this reason, Booktype has groups to bring people together to create books that share a common theme or interest.

To Join a Group

  1. Click on Groups in the menu
  2. Find the group you want to join in and click on it
  3. On the Group page click on the JOIN THIS GROUP button
  4. You are added to the group and will see your name appear under the Members tab. 

Removing yourself from a Group

At some point you may want to remove yourself from a group. 

  1. Go to your Dashboard and click on the link to the Group.
  2. On the Group page click on REMOVE ME FROM THIS GROUP. You will be removed from the group and your name will disappear from the Members list.

Localizing the Interface

The Booktype interface can be localized using the standard GNU gettext method. Using GitHub for this task means you don't have to tackle the whole of a localization yourself; just as much as you can manage.

First, you should check if a localization is already under way for your locale of choice. The best way to do this is to take a look at the GitHub repository for Booktype at https://github.com/sourcefabric/Booktype/tree/devel. You can also ask in the Booktype development forum at http://forum.sourcefabric.org/categories/booktype-development, where you might find community members who can help you with the translation.

GNU gettext means using a .po file for each language or dialect, a specially formatted plain text file with groups of three or more lines, like this example from Booktype's Russian localization:

#: account/templates/account/create_group.html:9
msgid "There is already a group with this name."
msgstr "Группа с таким названием уже существует."

The first of these three lines starts with the hash symbol, and references where this string of text is found in the source code by its file name and line number. If this string is found more than once in the source code, you will see other reference lines here. The second line contains the msgid, which is the original version of the string. The third line contains the msgstr, which is the translation of that string for the localization that this particular .po file relates to.

If you use the cross-platform program Poedit http://www.poedit.net/ to edit the .po file, this formatting of the text is hidden by an easy-to-use GUI. Poedit can be installed on most GNU/Linux distributions using the standard software installer. Versions of Poedit for Mac and Windows are available for free download from the project's homepage.

Before manually translating strings in poedit from scratch, you should take a look at the online translation services available which can fill in many of the msgstr's for you, such as Google's Translation Toolkit http://translate.google.com/toolkit/ which supports gettext .po files. You can then use poedit to fine-tune the localization and fix any formatting errors produced by the automatic translation.

If you don't already have a GitHub account, you can sign up at https://github.com/signup/free. Once you have a GitHub account, you can fork a copy (https://help.github.com/articles/fork-a-repo) of the Booktype project. Work for the next major version of the software is done in the devel branch of each project, so that's the branch to checkout after you have made the initial git clone.

In the locale code de_DE, de represents the German language and the suffix _DE indicates the dialect spoken in the country of Germany. Some languages have a wide variety of dialect localizations, which can be differentiated with a suffix in this way. You should update the header information in the .po file, which includes the language code and a country code, using one of the existing .po files as a guide.

Booktype has two components to translate: lib/booki and lib/booktypecontrol. After forking the Booktype git repository, make sure you're in the devel branch:

git branch
* devel

Create new locale directories (e.g. locale/de_DE/LC_MESSAGES/ for German as spoken in Germany) for each component:

mkdir -p lib/booki/locale/de_DE/LC_MESSAGES/
mkdir -p lib/booktypecontrol/locale/de_DE/LC_MESSAGES/

Then in each component directory, run the makemessages command, e.g: for German:

cd lib/booki
django-admin.py makemessages -l de_DE
cd ../../lib/booktypecontrol
django-admin.py makemessages -l de_DE

and update the header information in the django.po file which will be created in the appropriate directory. Or use one of the existing .po files as a template and copy it manually into the appropriate directory, if you do not have a Django development environment set up.

After using an online translation tool to get started, if necessary, you can load the .po file into poedit and complete your translation. Enter the localization team's contact information and language into poedit's Edit -> Preferences and Catalog -> Settings dialogs, which will be added to the .po file. When you save a .po file in poedit, the corresponding binary .mo file will be compiled automatically.

Finally, git add, git commit and git push these new .mo and .po files to your GitHub fork of the project, and send a git pull request (https://help.github.com/articles/using-pull-requests) to the Booktype developers. The localization can then be added to a forthcoming Booktype release.

If you don't want to work with git, that's no problem - download a copy of the .po file you would like to localize, run it through Google Translate and check it with poedit, and email your contribution to the Booktype team as an attachment - it will be very welcome! However, learning to use git is a good idea, because it means you can work directly on the source code, share the localization work with the Booktype community, and avoid duplicated effort.

My Dashboard

Your Dashboard helps you to manage your books and groups, edit a number of settings to customise your appearance on the Booktype server, and communicate with others.

The My Books tab lists the books you have created. Click the HIDE FROM OTHERS button to make the book listed on that row private.

To view your settings, click the Settings tab. Here you can edit your email and full name if either of those were typed incorrectly, or if they change in the future.

Below your full name is a text box where you can type in a description About yourself, and at the bottom of the page you can Browse... your computer for a Profile image to upload for Booktype to use. There is also a field for the Notification filter.

Once you have made the changes you want, click the Save changes button.

Roles and permissions

After you create a login account by following the steps in the chapter Creating an account, you will be able to create and edit your own books. Since Booktype is a collaborative environment, there needs to be control over access to shared books. There are a number of roles that Booktype users can have, which enable different levels of permissions.

Most of these roles and permissions are managed from the Settings tab of a book's edit interface - see the chapter Settings for more information.


All users logged in to Booktype can edit books that others have created if those books have been set as editable by 'anyone'. This is the most open level of access, and is suitable for environments in which all users are trusted.


You can be made an editor of a book you have not created yourself, if a 'Book admin' gives you this role for a specific book. This offers more control over write access to the book, without enabling editors to have total control over the contributors to the project.   

Book admin

You will automatically become the 'Book admin' of any books that you create. Book admins can add collaborators by assigning 'Book admin' and 'Editor' roles to other people. This distinction between book admins and editors enables a more finely controlled level of access.

Super user

When Booktype is installed on a server, a 'super user' account is created. This account is for the person or people who manage that Booktype installation, and gives write access to all books on that Booktype installation, as well as the ability to perform tasks such as reset passwords, rename files and remove books. This is the highest level of control available and should be restricted to trusted and responsible persons only.


Books in Booktype are separated into sections and chapters. A section is a collection of chapters. Sections have a page in the book formatted PDF which lists the chapters in that section. It is possible to hide these section pages and change the look and feel of them with CSS.

This can be done on a specific or universal level. To change the look and feel universally you need to change the following elements in the Booktype Only CSS field:

  display: block;
  page-break-before: always;
/* page-break-after: always;*/
  text-transform: uppercase;
  font-size: 20pt;

body .objavi-subsection:first-child{
  page-break-before: avoid;

.objavi-subsection .initial {
  font-size: 1em;
  color: #000;

.objavi-subsection-heading {
  font-size: 20pt;
  text-align: center;
  line-height: 300px;
  font-weight: normal;

If you wish to change each section individually you need to target each section with specific CSS. For example the following:

#section-1 .objavi-subsection-heading{
 background:#fff url(http://www.freedomfone.org/booki/images/01_whatisff.png) no-repeat  center center;

will give the first section page an image. You will also need to hide the text in this case, so apply this:

.objavi-subsection .initial {
 color: #000;

You have to be a little careful to make sure that each section gets the right image if you try this approach, but since it doesn't take long to change the code and test then it's easy to fix if you get it wrong.

Setting Up The Database

Before you can install Booktype, you will need a database to be available. PostgreSQL is the recommended database management system. The following instructions were tested on Ubuntu Lucid 10.04, using sudo for root access to the server.

1. Open a terminal, then enter the following command to install PostgreSQL and the Python adaptor for it:

sudo apt-get install postgresql python-psycopg2

2. Create the PostgreSQL user booktype-user with the command:

sudo -u postgres createuser -SDRP booktype-user

Enter the password you wish to set in the database, as prompted. You will need to re-enter it for confirmation.

3. Create a database named booktype-db, setting booktype-user as the owner with the -O option. The encoding should be the international UTF-8 character set, as indicated with the -E option.

sudo -u postgres createdb -E utf8 -O booktype-user booktype-db

4. Allow connections to the database booktype-db for booktype-user by editing the PostgreSQL configuration file. The exact file name depends on the PostgreSQL version that you are using. For example, if the version was 8.4, the command to edit the file on Ubuntu would be:

sudo nano /etc/postgresql/8.4/main/pg_hba.conf  

At the end of the file is a section like this:


Add an extra line at the end of the section like so:

local   booktype-db booktype-user                     md5

Save the file with the keyboard shortcut Ctrl+O, and then quit nano with Ctrl+X.

5. Finally, restart PostgreSQL with the command:

sudo invoke-rc.d postgresql-8.4 restart

You are now ready to install Booktype. See the following chapters for details.


From the Settings tab in the edit interface, you can manage the settings of your book. 


Select the language that your book is written in from the dropdown menu. If your language is not there, you can add it using the Set new language button. [Note - does this work?] 


Choose the license that you wish your book to be published under, from the dropdown menu or click Set new license to add a license that isn't already there. If you are not familiar with the different options, click Read full text of the license and it will open in a pop-up window.

You can also manage copyright attribution for your book; this will open a pop-up window showing all of the contributors to your book, and if you want to exclude someone from attribution you can move their name to the "excluded" list.


Click the button Manage roles to open a pop-up window where you can add collaborators and assign different roles to them.

To add a new contributor (note: the new contributor must first create a Booktype account):

  1. From the dropdown menu, select the role you wish to give the new contributor.
  2. In the input field under "New user:", begin typing the username you wish to add, then select that user from the dropdown menu that appears.
  3. Click Add

Chapter status

Edit or add the statuses that are available for assigning to chapters.

To change the status of a chapter, go to the Chapter tab then click on the status link at the right-hand end of each chapter's bar.

Permissions and visibility

From the dropdown menu, select who you want to be able to edit the book, then click Set permissions

Some tricks

They are many tricks to working with CSS, and some tricks specific to books.

The best thing to know is that you can actually test all of the tricks out on a local machine with a browser and see the results. If you publish a book with Booktype, you will get a link to the rendered PDF which looks something like this:


This gives you some interesting information that you may not yet know about! Copy and paste the URL of your book, cut off everything after "objavi.booki.cc" and replace it with /tmp/ e.g:


You will see a list of directories with books.  Search for your book (use ctrl-f and search for the last part of the URL without the suffix, e.g. search for awebpageisabook-en-2012.03.25-05.56.42). You will fond a directory which you can open and you will see contents like this:


If you download the body.html file and the static directory you will be able to change the CSS files and see the results in your browser. Body.html contains all the information for your book including sections but not the Table of Contents (this is added later). When you edit the CSS and get the version you want, you can copy and paste this into your Booktype Advanced CSS window.

What if My CSS Doesn't show up?

Sometimes you apply a CSS rule and you do not see any change. There are two tricks for dealing with this. First use the CSS '!important' rule. This is an override rule which can be applied to any CSS rule and will force that rule to take precedence. Take for example the following:

        font-family:Georgia,serif ! important;

 This will override any conflicting rules for h1. 

The other trick to checking CSS for your book design is to open the body.html file as described above, change the CSS as needed and then install a dynamic CSS console like Firebug. This software is installed in your browser and it enables you to inspect and change CSS rules dynamically.

Conditional Rules

It is not very well known, but CSS has some conditional rules. You can use the '+' symbol to combine elements and apply rules only when these two elements appear together. For example, you can do this:

h2+p {font-style:italic;} 

This will give the first paragraph after any h2 heading an italic style.  

Psuedo Elements 

There are many elements that can be targeted in some special ways - like the first letter in a paragraph, for example. These are known as 'psuedo elements' in CSS jargon. For example, you could target the first letter of all paragraphs like this:

p:first-letter {
font-size: 3.5em;
line-height: 1em;
font-weight: 400;
float: left;
margin: 0 0.107em 0 0;

That effectively creates a 'drop cap' effect for paragraphs. If you wanted this to only be applied to the first paragraph of every page, you could use a conditional statement like the following:

h2+p:first-letter {
font-size: 3.5em;
line-height: 1em;
font-weight: 400;
float: left;
margin: 0 0.107em 0 0;

Pseudo elements exist for many interesting cases including lang, first line, after and others. For a full list of psuedo elements check the web page: http://www.w3schools.com/Css/css_pseudo_elements.asp 


The important thing to know is that Booktype uses Webkit to make PDF. That means any CSS tricks that Chrome or Safari can do, Booktype can do. 

Table of Contents Style

You can also change the style of the Table of Contents at the front of the book. To do this you must open the Advanced CSS panel and look at the Booktype CSS field:


Here you can find a lot of CSS that defines some advanced items including the Table of Contents. If you scroll down this window you will find the ToC CSS:

 /* TOC ******************************/
table {
  float: none;

table.toc {
  font-size: 1.1em;
  width: 95%;

table.toc td{
  padding-left: 0.5em;

td.chapter {
  padding: 0 0.5em;
  text-align: right;

table.toc td.pagenumber {
  text-align: right;

td.section {
  padding-top: 1.1em;
  font-weight: bold;
/* End TOC **************************/
You can change any element here and it will have an effect on the look and feel of the Table of Contents.

The Edit Interface

Once you have created your book, click on the EDIT button to enter the edit interface and begin work on the content. 

On the right-hand side of the screen, there is a chat box and beneath it a list of the people currently editing this book. You can chat with each other while you edit. The chat window will also display notifications when someone joins, saves or creates a chapter, or does other actions.

Across the top of the screen are a series of tabs which enable different functions in the book editing process. These tabs are explained briefly below, and two of them - Settings and Publish - have their own chapters which give more detail. 


Click on the Chapters tab to see a list of all of the chapters in your book. From here, you can create or import a new chapter, edit an existing chapter, and create a new section. You can also arrange the order of your sections and chapters by dragging and dropping the bars.

Images and Files

From this tab, you can see a list of all the images you have uploaded to add to your book. You can also upload images here before placing them in a chapter, and you can delete unwanted images.


To follow the history of edits and revisions to your book, click on the History tab. You can see who has made what changes on what date, and compare revisions.


The Versions tab allows you to create major or minor versions of your book. Other users will not be able to edit previous versions once you create a new version.


The Notes tab provides a shared note area for all collaborators to write and read notes about the book production. Remember to click the Save the notes button when you have edited this, otherwise your changes will not be saved.


From the Settings tab, book admins can manage the settings specific to this book. Please see the chapter Settings for further information. 


When you have finished writing your book, go to the Publish tab and select the settings you require for different publishing outputs. Please see the chapter Publishing for further information.

The Table of Contents

Once several chapters have been created and developed, it is time to organise and order your Table of Contents.

Adding Sections to your Table of Contents

To add sections to a book:
  1. On the editing page click NEW SECTION at the top or bottom of the Table of contents.
  2. The New section window opens. Enter the title of your new section and click Create section.
  3. The new section is created and placed at the bottom of the Table of Contents.

Organising the Table of Contents

Inside a book's Chapters tab, the page is divided into two areas; the top area is the Table of contents and the bottom area is called Hold chapters. Any chapter residing in Hold chapters will not be included when you publish your book.

Re-ordering Sections and Chapters

If your sections need to be re-ordered, click and hold on the Section or Chapter you wish to move, then drag it up or down to its rightful place. To remove a section or chapter, drag it down into the Hold chapters area. Sections dragged to the Hold Area are deleted, but Chapters are not deleted.

Editing Chapter Titles

Once a chapter or section has been created, you may not always like the title, or you might be re-organising the entire book and therefore chapters and sections need to be re-named for the new structure:

  1. Open your book's Edit page and make sure the Chapters tab is selected.
  2. Double-Click on the chapter or section name that you want to change. A text field opens allowing you to change your title.
  3. Make any changes you desire and then click on the SAVE button to the right of the text field. CANCEL will of course cancel any changes made and return you to the previous title.

To change a Section title you must delete it by dragging it to the Hold Area and add another Section with the correct name.

Theming the Interface

As a web application, the appearance of Booktype can be themed in the same way that you might adjust the appearance of a dynamic web site, by editing templates and changing static files. Because a single Booktype server can host multiple instances, each instance can have its own unique theme. The following examples assume that the Booktype software has been downloaded to the /usr/local/src/ directory on the server, and a Booktype instance has been installed in the /var/www/mybooktype/ directory.

Default templates are found in the directories for the components of Booktype that they relate to. For example, the default templates for the front page that readers see when they arrive at a Booktype server are found in the templates/portal/ directory: 


Under this portal directory there are a number of templates such as the frontpage.html file which determines the default appearance of the front page of each Booktype instance, as its name would suggest. This file can be copied to the custom templates directory of a specific instance, which in the example of an instance installed in /var/www/mybooktype/ would be:


Default static files, such as CSS and image files, are found in a separate directory from templates:


The equivalent static files directory for a customized instance in /var/www/mybooktype/ would be:


The different names of these directories mean that templates can make use of both default and customized static files, as required.

Modifying the front page

In the server's console, you could copy the frontpage.html file and open it for editing with nano using the commands:

cd /usr/local/src/Booktype/lib/booki/portal/templates/portal/
sudo cp frontpage.html /var/www/mybooktype/templates/portal/
cd /var/www/mybooktype/templates/portal/
sudo nano frontpage.html

In the <head> element of that file, you can see the title of the page:

{% block header %}

Using the nano editor, these lines can be changed to read:

{% block header %}
<title>FLOSS Manuals - Free Manuals for Free Software</title>

You can save the file by pressing Ctrl+O and exit the nano editor by pressing Ctrl+X on your keyboard.

Text within quotes following the word trans is a translatable string. For example, in the <body> element of the file you might see the string:

<h2>{% trans "Welcome to Booktype" %}</h2>

This can be changed to read:

<h2>{% trans "Welcome to FLOSS Manuals" %}</h2>

Additional HTML text can be added to the file as required, such as:

<p>This is the edit universe for FLOSS Manuals. You can join and create your own manuals on any free software.</p>

After saving the template file, refresh your web browser to see the change in the template.

Editing CSS styles

To customize page styles, copy one of the default CSS files, such as booki.css, to the static/css/ directory of the Booktype instance, and open it in nano:

cd /usr/local/src/Booktype/lib/booki/site_static/css/
sudo cp booki.css /var/www/mybooktype/static/css/
cd /var/www/mybooktype/static/css/
sudo nano booki.css

You can then replace the default background colour with an image, by changing the first line of the body element:

body {
      font-family:Arial, Helvetica, sans-serif;
      color: #444444;

to the filename of a suitable background image:

body {
      background-image: url('../images/background.png');
      font-family:Arial, Helvetica, sans-serif;
      color: #444444;

and placing the background.png image in the /var/www/mybooktype/static/images/ directory. You may have to create this directory if it does not already exist, with the command:

sudo mkdir -p /var/www/mybooktype/static/images/ 

The background of the part of the front page which is above the user menu is controlled by the .topbar element:

.topbar {

Further customized images, such as site logos, can also be placed in this directory. The name of the logo file is contained within the .logo element:

.logo a {
         background: url('../images/logo.png') no-repeat transparent;
         height: 40px;
         margin: 0;
         width: 160px;

Finally, you may need to adjust the first part of the base.html template to point to your customized CSS file. Start by copying the default file into the customized instance and opening the new file for editing:

cd  /usr/local/src/Booktype/lib/booki/portal/templates/
sudo cp base.html /var/www/mybooktype/templates/
sudo nano /var/www/mybooktype/templates/base.html

Then change the path for the booki.css file from the default site_static/css/ directory to the static/css/ directory which serves the custom files for each Booktype instance.

{% load i18n messaging_tags booki_tags %}
 <link type="text/css" href="{{ request.META.SCRIPT_NAME }}/static/css/booki.css" rel="Stylesheet" >

Saving the file and refreshing the page will enable you to see the new styles and graphics.

Creating new template files

Booktype uses a component called reader to present books on the web. The default templates for this component are in the /usr/local/src/Booktype/lib/booki/reader/templates/ directory and customized templates for it would be be copied into the /var/www/mybooktype/templates/reader/ directory.

In the following example, a custom template is created so that the table of contents is always visible while we scroll the page.


The page header is fixed at the top, with the name of the book or the chapter we are currently reading.


First, a new base template new_base.html is copied into the /var/www/mybooktype/templates/ directory. This template includes the jQuery library, and creates place holders for future content. In turn, templates for the customized reader application will include the new_base.html template.

{% load i18n messaging_tags booki_tags %}
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

   {% booki_site_favicon %}
   {% booki_site_metadata %}

   {% block header %}
   {% endblock %}

 {% block content %}
 {% endblock %}


Then the template file /var/www/mybooktype/templates/reader/book_chapter.html includes an additional JavaScript library and CSS file. It displays the table of contents and the content of the chapter.

The chapter content is inserted with {% booki_format content %} and the table of contents is inside the variable chapters. A for loop is used to construct an unordered list with chapter titles, which is then styled with CSS.

{% extends "new_base.html" %}
{% load i18n booki_tags %}

{% block header %}
  <title>{% blocktrans with book.title as booktitle %}/book: {{ booktitle }}{% endblocktrans %}</title>
  <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/static/js/jquery.fixed.js"></script>

  <script type="text/javascript" charset="utf-8">
    $(function() {


  <link rel="stylesheet" href="{{ request.META.SCRIPT_NAME }}/static/css/html.css" type="text/css">
{% endblock %}

{% block content %}

 <div id="navigator">
    <div id="navigator-inner">
      <div id="nav-bar-wrap">
        <div id="mask"></div>
        <div id="nav-bar">
             <h1>{{ book.title }}</h1> / <h2> {{content.title }}</h2>
      <div id="toc-holder">
        <div id="toc-list">
            {% for chap in chapters %}{% ifnotequal chap.url_title  None%}<li><a href="{% url book_chapter  book.url_title chap.url_title %}">{{ chap.name }}</a></li>{% else %}<li><b>{{ chap.name }}</b></li>{% endifnotequal %}{% endfor %}

  <div id="top">
    <div id="header">
      <h1>{{ book.title }}</h1>

  <div id="middle">
    <div id="container">
      {% booki_format content %}

{% endblock %}

The files used in the example above are available to download from https://www.sourcefabric.org/attachment/74/example.zip

Before beginning your theming project, it is recommended that you read the Django template documentation at: https://docs.djangoproject.com/en/1.4/topics/templates/

Where To Get Support

Sourcefabric offers full commercial support for Booktype. Additional support is provided to the Booktype user and developer community.

Forum and mailing list: You can visit the Booktype online support forum, and sign up for the mailing list, at http://forum.sourcefabric.org/categories/booktype-support

This forum is mirrored by the mailing list, so posts on the forum appear on the mailing list and vice versa. You can therefore also post a message there by emailing: booktype-support@lists.sourcefabric.org.

To subscribe to forum updates via mail, please register or login to the forum by clicking the appropriate link. Then click the 'Subscribe' button at the top of each forum page.

IRC channel: Chat with other Booktype users and developers in the #booktype channel on http://freenode.net

Bug reporting: Booktype needs your input to improve. If you think you've found a bug, please visit http://dev.sourcefabric.org and sign in, using the same login and password that you registered for the Booktype forum. Create a bug report by selecting Create Issue, then Booktype, and then Bug. That way, the Booktype team can keep track of your problem and notify you when it has been fixed. You can also suggest improvements and new features for Booktype on that site.

Contact: Finally, when all other avenues have been exhausted, email us directly at contact@sourcefabric.org and we'll try to help!