Skip to main content

Ebooks as Textbooks Part 9: Hacking your Textbook

Hacking is a term that has been used to mean a variety of different things usually concerning computers or technology somehow. And while many think about hacking as breaking into secure computer networks, it can also be referring to modifying your own software or hardware on a computer system or even furniture (such as Ikea hacks). So hacking can include building, rebuilding, modifying, and creating software, electronic hardware, modding, or anything else, either to make it better or faster or to give it added features or to make it do something it wasn't initially intended to do. Hacking your textbook is to hack and adapt your textbook for greater personal efficiency, so that you can be great work easier. 

So if you have full access to your textbook, not just for reading, but access enough that you can make changes, then it's time to start hacking your textbook. If you are using something like an open access textbook, that just makes this so much easier. Ebook file formats are actually advanced html and image files that are compressed and use a special name, instead of something like .ZIP. 

For example let look at a Kindle MOBI file or an EPUB file. The MOBI and EPUB ebook files are actually just zipped compressed files. To open the file and see what is inside you need to move that file to your computer, then change the extension, such as .EPUB to .ZIP. Now you can extract that file just like any other zipped file (if you are working with a .MOBI file you should use KindelGen software - or use Calbrie to convert the MOBI to an EPUB and unzip that). So double click on the file and unzip it. When it is uncompressed you should see an OPF file and HTML files in a folder, depending on how the ebook was created there could be a number of folders, but inside one of them you should find the OPF and the HTM files along with any other parts of the book, such as JPEG or PNG pictures. The OPF file is an XML data file that contains book information, you shouldn't need to change this file, but if you want to you can open up this file in a text editor such as Notepad or TextEdit.

Here I have downloaded the epub version of CK-12's Physical Science for Middle School, then I changed the file extension from .epub to .zip, and opened the zip file with decompression software.

To hack your etextbook what you want to find are the XHTML files with your textbook's content. When you hack them, you are actually making them better for yourself by editing the XHTML files directly.  The easiest way you can do this is to use a WYSIWYG (What You See Is What You Get) web editor. There are lots of free web editors you can use in this example I'll use KompoZer, which can be downloaded for free from  To edit your etextbook you will need to go into the folders using the editor and find the files that have and HTML or HTM extension. Browse through the files to find the chapter you want to work with.

Opening the html files of the ebook using the web editor.
Once you have found your chapter you should open in the editor. Now you can use the editor's tools to make changes to the text. Most web editors are just like word processors, so you can type in new content, copy and paste, make bold and more. Once you find the text you want to change, make the edits and then save the file.

Using the web editor to change an etextbook chapter.
So how should you hack your etextbook? Well in part that depend on you, remember you are making the textbook work better for yourself and your needs. Some suggestions that you might start with though would be to copy or move the chapter summary, have a keyword list, move the important questions, and mark up some words.

In most textbooks about 1/4 to 1/3 of the chapter is the important or new material. The rest of the textbook is repetition, context, examples, introductions or explanations. A chapter summary focuses on just that important third and drops all the rest, so the summary is the really important part. So one thing that you can do is move or copy the chapter summary, which is usually at the end of the chapter and move it to the front. This will help put everything else that follows into context as you start reading. You will already have identified the important parts so as you read it will reinforce those concepts and you should get less confused as you wont be spending as much time differentiating between the important and the supporting material. This allows you to better spend your valuable time reading by beginning with the information that matters.

 If your textbook doesn't have summaries you can still make your own by copying the chapter content and then use a summary application to create one. There are a number of online auto summary tools that you can use to create your own summaries that you can then hack into your textbook (here are a few):

Next, there are the chapter's questions. I'm not talking about problems, but instead the big questions, such as the chapter review questions. Putting the questions at the beginning of the chapter can also help you read your textbook with purpose, as you will know that the authors have identified as important so that you can see them as they occur. When you are actually reading your etextbook you might copy these questions into a note or highlight them. 

Below is a chapter from CK12 Middle School Physical Science text. In the first picture is how the chapter begins in the un-hacked version. The second picture shows how I have copied the section's summary and review questions and moved them to the beginning of the chapter. 

Keywords or important vocabulary is also good to have at the start of a chapter. If your textbooks puts the words at the end, then just copy that list and put it at the start of the chapter. Reading the keyword or vocabulary list is a quick way to introduce or review a chapter. If you already know what all those words are, then you most likely will know a lot of that chapter before you start, and if you don't know the words then there is lots to learn. Think of having the vocabulary first as a way to check your background knowledge and begin thinking about what you are about to read. Also later when you are studying when you go back to the chapter starts using your interactive Table of Contents you will have your summary, big questions, and vocabulary all together for studying  Then instead of re-reading the whole chapter, you read the key word list and see if you remember all the concepts clearly, then the chapter summary, and then see if you can answer all the important questions. If you cant then go back into the chapter contents to review the parts that you need. 

You can also make changes to the textbook's text. So if your textbook doesn't bold the new vocabulary words, then once you have moved the word list to the front, search for those words and change them: make them different - bold them, highlight them, underline them, or put a * (star) in front of the word. That way as you read the chapter later the emphasized word will remind you to focus on that word and what it means to the content of that chapter. You can even use the Find and Replace to change all the occurrences of a vocabulary word in a chapter. To do this you will need to change the the Source view to see the html code. Then in the Edit menu select the option for Find and Replace. In the first box type in the vocabulary word, in the second box you type in that same word, but add some html code. For example lets say for this chapter that we wanted to italics all the times that the vocabulary word "inertia" occurs. To do this we need to add the html code to start typing in italics before the word, and the stop typing in italics after the word. The html code to start in italics is <i> and to stop is </i>. To make the word bold, change the i to b (<b>word</b>). When you have changed the word, switch back to the Normal view to see if it looks ok. 

Once you have made all the changes that you want, save the file again. Now we will need to turn all these folders and files back into an ebook file. Using your file manager select all the book files and have the system compress them into a single ZIP file. Then change the name so that it make sense and change the extension back to the ebook file that you started with, such as .EPUB. If you need to change the ebook format to a different format, then you should use a tool like Calibre to convert the ebook files.

Kindle files are just a bit different to unpack them you should use something like KindleGen ( or MobiUnpack. Then once you have hacked your textbook html files, you can use KindleGen on the content.opf file to recreate your adapted MOBI ebook.  Be aware though that KindleGen is a command line tool that will take these files and bundle them back into a MOBI ebook file and is not as simple as selecting the files and choosing compress and then changing the extension.  


Popular posts from this blog

Ebooks as Textbooks - Part 2 - Highlighting

Highlighting can be a very effective tool in reading and learning no matter the kind of text being read: from novels to textbooks.

Most textbooks or other forms of information text will usually used text features along with graphics to help organize information presented in the text.  These elements are done to help focus attention on important or key concepts and provide additional information. The text organization itself can include structural elements such as heading, subheading, index, glossary, paragraph spacing, bulleted or numbered lists, sidebars or side boxes, italics, underlines or bold for words or even sections. Graphic content can include the use of symbols, colors, illustrations, pictures, diagrams, charts, and graphs.
The act of highlighting is less time consuming and much easier than note-taking (to be discussed in an upcoming posting). To be effective in highlighting it should be a kind of metacognitive approach of sifting or filtering to identify the important content…

Ebooks as Textbooks Part 6 - Taking Note

The process of taking notes, makes reading that much more of an active process and will aid in comprehension and retention. The addition of your own personal notes are usually easier to understand and remember than textbook material. As a student reads the textbook, he or she may not remember all of that they read when they have finished - this is especially true of very dense texts. But, if a student reads the information and also writes down notes about what he or she is reading at the same time, then that extra step reinforces that information and improves retention. So one of the best ways to retain information you are reading it is to take notes while you are actually reading it, for print books these notes were usually written in the margins of the text and so were called margin notes. 

The taking of margin notes is a strategy that focuses your attention on important information from the textbook, novels, or articles that you are reading. Because it involves tagging key words or …

Google Maps

An exciting time today, as I was riding my bike to work, I saw the Google Maps Car driving by. You may be wondering what the Google Maps car has to do with ebooks, but often books have maps and Google Books has lots of books with Google Maps developed from extracting the locations from the text. This kind of mapping got me so excited that myself and Jerome Burg wrote a book on using digital mapping with books. But the car reminded me that these maps are out there just waiting for you to start using them. For example if you go to Google Books, and you are reading Vern's Around the World in 80 Days, look in the About this Book section, and then scroll down to see if the book has a Places mentioned in this book... component.

In one class I copied the map from Google Books and then we put it on the wall, so that as we read the book, we tracked where we were in the story on the wall map. One warning though, for some reason the books with maps in Google Books seems to randomly change fr…