Updates to Booki

Posted in Booki on December 31st, 2011 by adam – 2 Comments

There are a few updates to Booki that you may be interested in :

  • We had a serious problem where you could accidentally delete a book if you were deleting chapter statuses. Opppsss. This has been fixed now.
  •  “django-admin bookrename” (terminal admin command) now rewrites attachment path correctly.
  • Everyone has access to “Attachments” tab now, but only administrator can delete attachments at the moment.
  • Show human readable error message when you have more then one chapter with the same name. There is not much help with this at the moment, Booki administrator should remove or rename one of the chapters to fix any duplicates.
  • Now you can directly link to chapter editor or any other tab in editor interface. For instance: –
    http://www.booki.cc/my_book/_edit/#/edit/my_chapter/
    (links to a chapter)
    http://www.booki.cc/my_book/_edit/#/settings/ (links to the settings tab)
    http://www.booki.cc/my_booki/_edt/#/history/ (links to the history tab)
  • You can’t leave editor by accident anymore. A pop-up window will ask for confirmation. Yes…Yes…Finally!
  • Default Django slugify function does not know how to work with non ASCII characters. This was a major problem with Asian scripts, Russian and some other languages… This has been fixed now. At the moment we have dependencies that could not handle pure Unicode names, so we are just converting it to ASCII characters… For instance “Добрый день” will become “dobryi-den” and etc.
  • Booki Editor is now fully localized.
  • You can upload PDF book to Lulu.com from “Export” tab.
  • Boxes are rounded and have gradient background if you are using Chrome or Safari
  • Some other small bug fixes….

(fwded from Aco)

FLOSS Manuals and Sourcefabric combine forces

Posted in Booki on December 30th, 2011 by adam – 23 Comments

The open source not-for-profit organisations FLOSS Manuals Foundation and Sourcefabric are pleased to announce their newly forged partnership to maintain and develop the code base behind FLOSS Manuals’ successful free software documentation platform.

Said Adam Hyde of FLOSS Manuals: “We’ve been actively looking for partners to help achieve our mission. As FM goes from strength to strength, we’re happy to partner with an organisation that has the track record of Sourcefabric in order to allow our platform to grow even further.”

FLOSS Manuals’ open source platform is designed to help people produce books on free software, by themselves or working collaboratively with others. Users can create books, work on the content, and then export content in minutes as book-formatted PDFs or EPUBs.

Recent features have enabled users to keep track of the activity of everyone working on their project, chat with them in real time, and post Twitter-like status messages. All books are released under the GNU General Public License, meaning content can be reused and remixed by other books and authors, by simply cloning books or importing chapters.

“In partnering with FLOSS Manuals, we will contribute resources to developing the platform and will help apply this highly successful model to other fields,” said Sava Tatić, managing director at Sourcefabric. “Mainstream publishing, journalism and education sectors are all looking for new ways to author, edit and distribute books. FLOSS Manuals has shown it can be done successfully with a platform that is free, open source and highly collaborative.”

About Sourcefabric

The Czech-based Sourcefabric produces open source tools for media organisations including Airtime, Newscoop, and Superdesk. They have previously funded new features for the FLOSS Manuals platform and host all their software documentation on the site in English, Spanish and Russian. Since launching in April 2010, Sourcefabric has won a Knight-Batten Award and was a finalist in the Ashoka Changemakers Citizen Media Innovation Contest.

The Sourcefabric team used Floss Manuals to write the Newscoop Cookbook.

About the FLOSS Manuals Foundation

The FLOSS Manuals Foundation fosters the growing FLOSS Manuals language communities with over 3,000 registered members who have produced books on tools like Firefox and WordPress and titles such as How to Bypass Internet Censorship. Through its work on the documentation software as well as facilitating Book Sprints and Documentation Sprints, FLOSS Manuals Foundation works to support the production of Free Manuals for Free Software.

For more information, contact Camille E. Acey at Floss Manuals.

Innovative use of Booki CSS

Posted in CSS & Books on December 5th, 2011 by adam – 39 Comments

So last week we finished the Freedom Fone Book Sprint. Olaf, Laleh and Lynne were there working on design and tech implementation of design. Working together they pushed the current booki css a bit further to do some cool stuff. you can see the results here:

http://objavi.booki.cc/books/freedomfone-en-2011.12.05-10.50.21.pdf

note the use of images for section breaks.

Section 1 header for Freedom Fone book. Achieved with CSS.

This can be achieved by css like this:

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

the entire css is included below for your hackery resuse and inspiration

@font-face{
 src: url("http://www.freedomfone.org/booki/AllumiPtf-Bold.otf");
 font-family:AllumiPtf;
}
body {
 font-family: "fontin sans";
 background: #fff;
 color: #000;
 font-size:12pt;
} 

.objavi-chapter{
 color: #000;
 display:none;
} 

a {
 text-decoration:none;
 color:#000;
} 

h1 .initial{
 color: #000;
 display:none;
} 

ol#InsertNote_NoteList{
page-break-before:always;
font-size:8pt;
} 

.objavi-subsection{
 display: block;
 page-break-before: always;
} 

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

.objavi-subsection .initial {
 color: #000;
 display:none;
} 

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

h1 {
 page-break-before: always;
 font-weight:normal;
 margin-top:10px
} 

h2 {
 margin-bottom:-10pt;
 font-weight:normal;
 font-size:15pt;
} 

h3 {
 margin-bottom:-10pt;
 font-weight:normal;
 font-size:12pt;
 font-style:italic;
} 

table {
 float: none;
} 

h1.frontpage{
 page-break-after:always;
 margin-top:70%;
 font-size: 20pt;
 text-align: center;
 page-break-before: avoid;
 max-width: 700pt;
 font-weight: normal;
} 

div.copyright{
 padding: 1em;
}
/* TOC ******************************/
table {
 float: none;
} 

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

table.toc td{
 vertical-align:top
 padding-left: 0.5em;
} 

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

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

td.section {
 padding-top: 1.1em;
 font-weight: bold;
}
/* End TOC **************************/ 

p, ul, ol {
 page-break-inside: avoid;
} 

pre, code, tt {
} 

pre {
 max-width:700px;
 overflow: hidden;
} 

img {
 max-width: 500px;
 height: auto;
} 

.objavi-no-page-break {
 page-break-inside: avoid;
} 

.unseen{
 z-index: -66;
 margin-left: -1000pt;
} 

body{
 font-size:12pt;
 color:#000;
 font-family:"Fontin Sans";
 line-height:16pt;
}
sup{
 vertical-align:text-top;
 font-size:0.7em;
}
a{
 color:#000 !important;
 text-decoration:none
} 

h1, h2, h3{
 color:#666;
 margin:0;
 padding:0;
 font-weight:normal !important;
 text-decoration:none !important;
 line-height:normal;
 font-family:AllumiPtf !important;
 text-transform:uppercase; 

}
h1{
 font-size:24.3pt;
}
h1+p{
 padding-top:20pt;
 margin-top:0;
}
h2{
 font-size:14pt;
 padding-top:20pt;
}
h2+p{
 padding-top:10pt;
}
h3{
 font-size:9pt;
 padding-bottom:5pt;
}
h3+p{
 margin-top:0;
}
p+h3{
 padding-top:10pt;
}
ul{
 list-style-image:url(http://www.freedomfone.org/booki/images/bullet.png);
 list-style-position:outside;
 margin-left:-25px;
}
ol{
 margin-left:-25px;
}
li{
 padding-left:5.5mm;
}
.starred{
 padding-left:50px;
 background-image:url(http://www.freedomfone.org/booki/images/star.png);
 background-repeat:no-repeat;
 background-position:center left;
 font-weight:bold;
 min-height:40px;
}
.speechBox{
 padding:5mm;
 padding-top:0;
 background:#ebebeb  url(http://www.freedomfone.org/booki/images/boxBottom.png) no-repeat  bottom right;
 padding-bottom:60px;
 margin-bottom:-55px;
}
.breakPage{
 page-break-before:always;
}
.speechBox:before{
 background:#ebebeb  url(http://www.freedomfone.org/booki/images/boxTop.png) no-repeat top left;
 height:44px;
 content:" ";
 display:block;
 margin:-5mm;
 margin-bottom:5mm;
}
.objavi-subsection-heading{
 height:860px;
 font-size:0px;
 display:block;
}
#section-1 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/01_whatisff.png) no-repeat  center center;
}
#section-2 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/02_realworld.png) no-repeat  center center;
}
#section-3 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/03_scenarios.png) no-repeat  center center;
}
#section-4 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/04_creatingservice.png)  no-repeat center center;
}
#section-5 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/05_settingup.png) no-repeat  center center;
}
#section-6 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/06_techstuff.png) no-repeat  center center;
}
#section-7 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/07_gettinghelp.png)  no-repeat center center;
}
#section-8 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/08_troubleshooting.png)  no-repeat center center;
}
#section-9 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/09_appendices.png) no-repeat  center center;
}
#section-10 .objavi-subsection-heading{
 background:#fff  url(http://www.freedomfone.org/booki/images/10_notes.png) no-repeat  center center;
}
.page{
 font-size:15pt;
 color:#666;
 font-weight:bold; 

}

Visualising your book

Posted in Booki on October 20th, 2011 by adam – Comments Off

Booki provides an RSS feed for everybook. This means you can follow a book and see the edits made etc. Each RSS feed is linked from the info page. For example the book about OpenMRS has an info page here http://www.booki.cc/openmrs/_info/ and the RSS is linked from the bottom as so : http://www.booki.cc/feeds/rss/book/openmrs

A few weeks ago we asked for some help creating a visualisation using this source. Pierre Commenge responded and started developing a Processing visualisation of the RSS feed. Processing is a free software used a lot for creating visualisations (http://fr.flossmanuals.net/Processing/Introduction).

Pierre has a prototype available that runs in a java applet (http://emoc.org/fmviz/0.5/) below is a screen shot of the visualisation of the CiviCRM book produced in a FLOSS Manuals Book Sprint.

Visualisation of a book being made

So this look pretty cool. The live version enables you to play a timeline and see the development of the book over the period of 1 day.

This not only looks cool but it enables you to see how a book is being made. This is extremely interesting – imagine if we had all the data about how every book has been made up until now…it would tell us a lot of things about book production process and the differences between different models etc…its a very exciting idea and we hope to be able to explode this idea in the following weeks and months in our experiments. Many thanks to Pierre for getting this underway.

 

Federated Publishing

Posted in Rant on October 9th, 2011 by adam – Comments Off

Instead of talking about new book publishing models and moving incrementally within or slightly without its walls lets try something else, place ourselves in a space completely *inside* the space where content is as far as feasibly possible free (libre) – one such space for this I would like to call ‘federated publishing’.

Federated Publishing is not a ‘model’ it is in fact a network of models – enabling multiple approaches of content production, distribution and consumption. It is a space enabled by four core elements – digitally networked corpora, interoperable libre licensed content, federated open book production and ‘publishing’ platforms, and people. It is a space that enables traditional established book production techniques but fuels new approaches which are radically different – a space where books have no authors, attribution is not really anything anyone cares about, quality is high, books live – constantly updated and improved, books magically migrate across languages, high quality text books are produced in exceedingly short times measured in minutes, hours or days, books have no publisher but multiple channels and multiple contexts, content is shifted between contexts rapidly and easily, people get paid, reputations get made, economies exist.

This is not pie in the sky. This exists now. FLOSS Manuals has inadvertently found itself tinkering inside of publishing for the past 5 years. We have broken many established practices because we didn’t know any better. We have developed tools that don’t imagine a future but were built to provide sensible pathways to what we wanted to achieve. We now surface after 5 years of this, look around and realise we are simultaneously inside and outside publishing. We articulate this as ‘Federated Publishing’.

Federated Publishing is a term born from Federated Social Network jargon, which itself is born out of a need to transform proprietary network services into a modern Free Software critique. Federated Publishing is not in itself a critique, it is an active and vibrant practice – but it is born from this ideological legacy.

Publishing is trying to invent a new proprietary future. This proprietorship is to be taken in the broadest possible understanding. It is not just a question of closed copyright finding new distribution formats and economic models, it is a question of domain branding strategies within free culture and the unwillingness to make content interoperable on a technical, legal, or social cultural level.

We are tied to the need to tie ourselves to the content we produce. We enable the commit bit whenever we can by default and it is a tiring and resource consuming strategy that retards the development of culture and knowledge.

Federated Publishing is a future we are working in now at FLOSS Manuals. We actively encourage anyone to make a book, chapter, edit. We encourage anyone to fork a book, take it to their own domain, translate it, reuse it, break it, voice multiple discordant positions and concerns within the same covers, break the use of ‘I’ as a dominant identifier for a single individual author, take the book without changing a word and make your million. No problems.

We aim to generate federated interoperable corpora enabled by common sense technology and an increasing consciousness that a book is ‘ours’ to do as ‘I’, you, them, or we want. We are starting with free manuals and aim to provide an example of what is possible within and between domains.

We currently work like this. All the content is free, we use one license to increase interoperability and we discourage talk of licenses to encourage productivity, we provide all the tools we make for free and make it easy for you to take anything you want from us. Our website templates, books, community, platform… whatever you like.

In this environment books transform – they migrate across contexts, they are translated, they are kept alive, they are used the world over to help people learn about free software, they are of extremely good quality, they provide economies for those that wish to pursue the seemingly radical practices.

Sound impossible to have an economy here? Another free culture revolution without a strategy to pay the rent? Consider Marshall McLuhan’s astonishing vision :

“Instead of going out and buying a packaged book of which there have been five thousand copies printed, you will go to the telephone, describe your interests, your needs, your problems … and they at once Xerox with the help of computers from libraries all over the world, all the latest material for you personally, not as something to be put out on a bookshelf. They send you the package as a direct personal service. This is where we’re heading under electronic conditions. Products increasingly are becoming services.”

That was not a vision of the internet, it is a vision of the book. The internet does not work like that. Books can. This is the way I have paid my rent for the last two years. By making books that are an accumulation of everything that you need in a book. There is one major difference and something that Marshall Mcluhan may not have interwined into this thread – the net has brought social production networks to a scale that the person on the other end of McLuhan’s phone line is an asynchronous network of people you have never met, and is even you. You make books with others, you decide what a book is and what goes in it, others add ideas and content that either you cant produce or cant produce in time. 100% original source books are created in days. Others in minutes.

People pay for that. They pay for you to help them do that. It is the beginning of Federated Publishing services, it is the end of nothing.

WordPress Flossmanuals Book Jog

Posted in Book Sprints on August 11th, 2011 by mickfuzz – Comments Off

Invite to WordPress Book Jog

We invite you to join us on a book jog to update the WordPress manual hosted on Floss Manuals – The existing one is here – http://en.flossmanuals.net/wordpress/

What is a Book Jog? It builds on the concept of Book Sprint but downgrades the concept somewhat (sorry about that). While a book sprint normally has a real life meet up at its core and has a solid time frame of anything from 2-5 days typically, a book jog takes place over a longer time frame and may not have a real life meeting at its core.
For this manual there is no real meet up, we are all geographically disparate. We aim to complete it in 25 days from the 12th of August to the 5th September 2011

We want to build on the great documentation that already exists about WordPress to create a manual on Floss Manuals for the following reasons:

Creating a concise introduction to WordPress

Some might say that there is already too much existing documentation on WordPress, in numerous locations. This manual will be a digest of the most vital aspects of WordPress for those creating a WordPress site. We feel that there is definitely a place for specialized manuals. This manual is aimed at audiences who are;

  • new to using WordPress
  • want to improve the look of their blog and learn more about design in WordPresss
  • wish to extend WordPress to make it the basis for an online community

Using an Open and Flexible Documentation Platform

Unlike many manuals, Flossmanuals are written with a totally open, do-what-you-want-to-it license. This gives writers the freedom to improve and update the manuals as new software versions are released. Manuals are written collaboratively inviting alterations and improvements from readers and users. The most up-to date-version of the manual is available in several formats, including printed book, epub, html, and open office.

Working towards a book is a great focus for a documentation project.

Helping to fostering Independent Online Communities

We want to share our enthusiasm for WordPress as a great tool for sharing information, publishing all kinds of media and helping to build non-corporate online communities.

We believe that good training and follow up support is key to maximizing the involvement of people in on-line communities. With the ability to output the manual as a word document anyone can print various chapters off as supporting handouts. You can also direct your site users to specific chapters of the book online, where they will learn the tools, and perhaps encourage others.

Promoting the Open Web

Flossmanuals has a track record of supporting projects which embrace collaboration and the open web. We think that the web is best when it is open source and using open standards and decentralised. We believe that independently hosted websites and communities a key part of keeping the web open. The WordPress system is perfectly suited to this because it is intuitive to use, easy to install and keep updated and is free software.

For more information on these aspects see the following book – An Open Web
http://en.flossmanuals.net/an-open-web/

Supporting this manual

In the past this manuals been used and supported by the following groups and organisations, tactical tech, transmission video network, people’s voice media, aktivix and hacktionlab. They have supported the manual by contributing and some by paying for transport and documentation meetings.

You can support this version of the manual by giving your time to help us write it, check it, and promote it.

You can do this by joining us in irc – #booksprint of #flossmanuals in irc.freenode.net, saying hi, and seeing what you can do to help.

To contribute directly you can go here - http://booki.flossmanuals.net/wordpress/_edit/ – You will need to log in or create an account.

See you there!

Creating Books For The Kindle Store Using Booki

Posted in Uncategorized on June 3rd, 2011 by James Simmons – Comments Off

As of May 16th my book Make Your Own Sugar Activities! is available for purchase in the Kindle store.  You can also download the first few chapters for free.

My Author Page

Putting a book on the Kindle Store is something any Booki author should routinely do with finished books.  It is a lot less work than putting a book on Lulu and the Kindle store has a lot more visibility.  I’m not suggesting that you give up on Lulu, just that you add the Kindle store to the ways you distribute your book.

Booki already does most of what you need to make a Kindle-formatted book, and OBJAVI *could* be modified to do the rest.  Until then you’ll need to do some work by hand:

1).  Export the book as an EPUB.

2).  Run the kindlegen program (a free download for Windows, Linux, and Mac OS) on your EPUB to create something that is readable on the Kindle.  This will NOT meet Amazon’s requirements for the Kindle Store, because it lacks a Table of Contents and a cover image, but the Kindle can use it.

3).  Using either the Kindle Previewer or a real Kindle look through the book for formatting errors and go back to Booki to fix them.  I found a problem with bullet points because I used Open Office to create the first few chapters of my book, then I pasted the chapters into Booki.  This caused my <li> tags to have <p> tags nested within them, a problem I would NOT have had if I had used Booki to write the chapters.  I was able to fix this in Booki by turning on HTML mode in the editor and getting rid of the <p> tags.  In the Kindle having the <p> tags in there makes the bullet appear on one line and the text appear on the following line.

Note that the docs on Amazon’s site say you can’t use <table> tags in your book.  That is wrong. The current Kindles display tables just fine.

Another thing you should do is add a section to your Introduction explaining how to get the book in various formats, including the website, Lulu, the Internet Archive, etc.  When people download the free sample of your book they will get this information.  If you’re writing a FLOSS Manual and have code samples in your book the Kindle will NOT render them well at all so you should direct your readers to the website so they can see the code properly formatted.  (Another possibility to suggest is the Kindle program running on a PC or Mac, which can take advantage of the wider screen).

The Kindle Previewer is available for Windows and Mac OS, but not Linux.  However, the Windows version runs under WINE.  It is too slow under WINE to be used to check every page for formatting errors, but it works well to verify that your cover image and Table of Contents are correct.

4).  Create a cover image and upload it to your book.  The cover image does not have to be linked to any page of your book, it just needs to be uploaded.  You can use the “Insert Picture” button in the editor, upload the image, then cancel out.  The image itself can start out as a white rectangle with a 5 pixel grey border.  I used a 600 x 800 canvas, but Amazon recommends something a bit larger.  You can easily create a usable cover image in The GIMP.  I put an orange rectangle with rounded corners at the bottom of the image which contains the same text that we put on the back covers of printed FLOSS Manuals.  I also put my name on the cover image as the author.  The printed book does not have that.  Amazon wants books to have authors.  You can have multiple contributors, including photographers, translators, etc. They will all be listed on the Kindle Store page.

5).  Re-export your book as an EPUB.

6).  Create a directory and unzip your EPUB into it.

7).  Make a copy of the XHTML file for your first chapter named something like ch000_table_of_contents.xhtml and use an HTML editor to make a Table of Contents out of it.  The free Seamonkey web browser from Mozilla has a perfectly adequate HTML editor that you can use for this.  Each chapter in the TOC must have a relative link to the chapter XHTML file that contains it.

8).  Use the same HTML editor to edit your Introduction chapter and put a centered <h1> entry with the title of your book at the top of the chapter.  Underneath it put a centered paragraph with “by Author Name”.  I chose to put this text in italics.

9).  Using a text editor edit the content.opf file.  You’ll need to fix the top of the file to be like this:

<metadata>
<dc:publisher>FLOSS Manuals http://flossmanuals.net</dc:publisher>
<dc:rights scheme=”License”>GPLv2+</dc:rights>

<dc:language>en</dc:language>
<dc:title>Make Your Own Sugar Activities!</dc:title>
<dc:creator>James D. Simmons</dc:creator>
<dc:date>2010-11-28</dc:date>
<dc:date scheme=”start”>2010.12.09-07.20</dc:date>
<dc:date scheme=”last-modified”>2011.05.13-00.00</dc:date>
<dc:date scheme=”published”>2011.05.13-18.25</dc:date>
<dc:identifier
id=”primary_id”>http://en.flossmanuals.net/epub/ActivitiesGuideSugar</dc:identifier>
<dc:identifier scheme=”booki.cc”>
http://booki.flossmanuals.net/make-your-own-sugar-activities</dc:identifier>
<meta name=”cover” content=”att000_MYOSA_Cover” />
</metadata>
<guide>
<reference type=”toc” title=”Table Of Contents” href=”ch000_table_of_contents.xhtml” />
</guide> 

Note that I have changed the creator to be myself and I’ve added entries pointing to the cover image and my new TOC page.  The TOC page will need its own <item> like this:

<item href=”ch000_table_of_contents.xhtml” media-type=”application/xhtml+xml” id=”ch000_table_of_contents”/>

The cover image should already have an <item> you can point to.

10).  Now you can zip up all these files and then change the suffix of the zip file to .epub.  kindlegen insists that you use a .epub suffix for the file.  .zip will not be recognized as an EPUB file by kindlegen.

11).  Run kindlegen against your new EPUB and you should have an Amazon-compliant MOBI file ready for the Kindle store.  (The file will be larger than your original EPUB because it generates images for several different kinds of Kindle outputs.  The MOBI that the customer gets will be sized like your EPUB, more or less).  Use Kindle Previewer or a real Kindle to check it out.  Also, pay attention to any messages coming from the kindlegen utility.  If you didn’t set up the cover image or the TOC correctly kindlegen should tell you.

Sign up for Kindle Direct Publishing, upload your book and your cover image, price the book at US .99, and in 24 hours or so the money should start rolling in.  Soon you’ll be eating lunch with the Algonquin Round Table and living a life that Richard Castle might envy.

Getting to Know Booki – Tutorial #17: …CSS Part II

Posted in Booki, CSS & Books, Tutorials on June 3rd, 2011 by johncurwood – Comments Off

Two lessons ago, we looked at applying styles to paragraphs, this lesson we will look at changing how these styles appear when we export our books. And of course we will be using CSS to do it all.

To keep things simple, we will focus on the Normal <p> element and the heading <h1> to <h6> elements. Each of these elements associated with our paragraph styles has the same properties that can be adjusted using CSS. There are a lot of properties an element can have, but in this tutorial we will look at two text properties, text-align and color.

CSS Recap

First a recap – a CSS declaration starts with a selector (this is the element whose properties we want to adjust), and is followed by a declaration (a list of one more properties followed by a value that we want to set the property to). To make changes to the CSS of a book, go to the book’s Export tab, click on Show advanced options and then set CSS mode to Custom. Changes are made in the Custom CSS text panel.

To set the text-align property for an element use the following notation:

h1 { text-align:center; }

As you can see at the beginning of the rule we set the element we want to adjust (h1). The declaration used to adjust the style of our element is enclosed in braces ( { } ). The property we want to change, text-align is separated from the value we want to change it to, center by a colon (:). Finally the declaration finished with a semi-colon (;).

Every declaration ends in a semi-colon and all declarations are enclosed between the two braces. In the above example the entire rule is placed on one line, to aid human readibilit of CSS sheets, especially when there is more than one declaration, a rule is often split over several lines as follows:

p {
text-align:center;
color:red;
}

Basic Text Properties

text-align
As it’s name implies, text-align adjusts the alignment of the element. There are 4 basic values for this property: left, center, right, justify. these all apply the same settings as we covered in Tutorial #15: Paragraph Formatting.

color
This property sets the colour of the text for an element, the values used can take many forms: For common colours you can use their names, e.g. blue, red, green, black. For a complete list of predefined colour names visit http://www.w3schools.com/css/css_colornames.asp; For more comeplex colours you can use Hexidecimal, RGB or HSL colour notations. Hexadecimal defines a colour value using: #RRGGBB, where RR, GG, BB are values between 00 and FF representing levels of the three primary colours. RGB defines a colour using: rgb(red, green, blue), the parameters red, green, blue are specified by a number from 0 – 255 or a percentage from 0%100% and represent levels of the three primary colours present in the text colour. HSL defines a colour using: hsl(hue, saturation, lightness), hue is a value between 0 and 360 (o or 360 give red, 120 gives green and 240 is blue); saturation is a value from 0%100% and represents the level of the colour defined with hue (0% gives grey while 100% gives the colour’s full intensity); lightness is also a percentage from 0%100% and defines the amount of light in the colour (0% gives black, 100% gives white and 50% gives the full colour defined with hue and saturation).

The following rules all give the same colour to h1:

h1{color:green;}

h1{color:#00FF00;}

h1{color:rgb(0,255,0;}

h1{color:rgb(0%,100%,0%;}

h1{color:hsl(120,100%,50%;}

Have a Go!

Right, the first thing is to have the chapters in your test/play book contain a chapter heading (heading 1), some headings formatted to heading 2 and some headings formatted to heading 3. You will also want to have some paragraph text formatted to Normal (See Tutorial #15 to adjust paragraph styles).

Once that is ready click on the Export tab, show the advanced options and set the CSS mode to Custom. Under Custom CSS, scroll down to the bottom, create a new row and enter declarations for h1, h2, h3 and p using the layout shown at the top of the tutorial. Set values for the text-align and color properties for each element. With the color properties try using a different declaration method for each element as I have done in the following:

h1 {
text-align:right;
color:blue;
}

h2 {
text-align:center;
color:#FF00F0
}

h3 {
text-align:left;
color:rgb(255,50,0);
}

p {
text-align:justify;
color:hsl(180,100%,30%);
}

When you’ve finished, click Publish, Objavi will generate the pdf of your book. Once it has finished, click the download link at the bottom of the page, and open the pdf.

Browse through the document, and notice the new changes, also notice what hasn’t been changed. For instance, the Table of Contents text and Section headings all remain black, with their original alignment. If you have a large well filled out testing book, you will also notice that numbered and bulleted lists are still black. The two lists belong to the ol (ordered list – or numbered) and ul (un-ordered list – or bulleted) elements, which need their own set of declarations, to change the color property.

If you want all text in your book to be a certain color, you don’t have to go through, listing each element and declaring the color property, CSS has provided the body element, which for Booki, means everything in the chapter, use the body element to make global changes to your book design. If you want all text in your chapters to be blue, except for the h1 headings which will be green, you can set everything to blue using the body element, then set the h1 color to green. The h1 declaration will override the body declaration, setting the h1 text to green and all other text to blue.

If you have any questions or need any help using Booki go to http://support.booki.cc and post your question to our Q&A forum.

You can also join the Booki discussion by signing up at http://lists.booki.cc/listinfo.cgi/booki-booki.cc

Have fun and happy writing.

John Curwood

Booki User Guide maintainer.

Cups vs LPR

Posted in PDF on May 18th, 2011 by adam – Comments Off

I don’t know if anyone else has this problem, but when I try to print large files using CUPS (I have Ubuntu installed) then it seems it sometimes dies with an out-of-memory error on the printer. When I try and print the same thing with the lpr command directly with a command like:

lpr  -o landscape -o sides=two-sided-short-edge -o number-up=1   /
  hbic_a5.pdf_combined.pdf

Then it prints fine. Seems odd to me since I understood printers are meant to manage the printing process ‘one page at a time’ and hence I can’t see why CUPS should die like this and LPR works ok.

Process vs Content Templates in Book Sprints

Posted in Book Sprints on May 11th, 2011 by adam – Comments Off

I have been working with a group of very interesting people over the last 3 days producing a book that can be used for generating campaigns about Internet Literacy. We generated texts on a large and varied range of topics. More on all this later. One very interesting issue that has been more clearly illustrated for me in this process is the necessity to understand the role of templates when generating content. When I talk of templates here I mean pre-configured templates that are meant to illustrate what the final product of a chapter or ‘content unit’ should look like.

I have always avoided using templates because I think it shuts down a lot of creative discourse about what the content could be and it kills those amazing surprises that can leap out of working in a freer manner. Perhaps even more importantly, templates can confuse people – sprint participants need to first just create what they know or are energised by – forcing output immediately into templates is not helpful to this process. However I can see there is a role for templates not as structure for the final content but as tools that can help the process of generating content.

In this particular sprint we generated a very lightweight template before the sprint. This is something I really dislike doing for the reasons stated above but the fear was (and I think it is justified in this instance but I would want to be careful before advocating its usefulness in other contexts) that we would float too far in conceptual territory without any boundaries. We wanted very much to glue the creative discourse and thinking at the sprint to defined actionable units (campagins). So for this purpose after discussion with one of the initiators of the sprint we generated a very light weight template that provoked only 7 points. Really just the ‘who, what, why’ material that campaigns need to address. This was then used as a process template – a template acting as a foundation for the sprinters to define the context of their content – not a template that would become the structure for the final content.

It worked very well – enabling the participants to let their creative energies flow while providing a backdrop or context within which the content needed to rest. The ‘process templates’ also allowed those who think conceptually to ‘build up’ so to speak, and those that thought in more concrete terms could also define their content. It provided a common scaffold for sprinters to build in the direction that most interests/energises them.

So while it does not change my mind regarding content templates I think I have discovered a place for very lightweight process templates that can give some kind of framework for the participants to work with, refine, define, and fill.