## Leanned how to make e-books

Sir assigned a task to design an ebook, so that one can enjoy reading
it on different-different devices. Learning about that I found ebook
uses the .epub extension.

I fetched to find out the technique such that LaTeX can convert .tex
to .epub. I found lot of techniques and S/W too. And also in
particular mobile version uses .mob extension.

I found to better ways of doing this:

• To convert .tex-> .xml -> .html -> .epub
• Using a software called Callibri which is a ebook reader, ebook generator, pdf
generator, pdf-xml generator.

I chose the second way. Reading the documentation and watching out the
videos so as to use it. :)

## Patch Accepted

I searched a lot about how to deploy OGV and it was done. :) I
prepared a Readme.md file with proper installation instructions and
coding standards. But I was confused to send it as a PR, a patch or
simply the file. Had a talk with Sean and he told to send a PR.

I sent the PR and informed Sean. He replied notifying that he has
reviewed it and has forwarded mail to Inder and Harman so that they
check and all lies in their hands. Within 12 hours the PR was accepted
by Inder. Patch accepted :D

Now the next thing, that I need to contribute is by finding the
bugs/issues and reporting them.

## Bug In OGV

As per Sean’s instruction headed forward so that I can contribute and
submit a patch. So as to deploy I found that so as to install OGV, one
of the requisite is to install Meteor. To install Inder’s version of
Meteor that 0.x, there was need to install Meteroid too. But the
latest version of Meteor that is 1.0 didn’t had a requirement to
install Meteroid.

Discussed the same on Mailing list, which was reported as a bug. Inder
has now updated it too 1.0. And I started with the documentation.

## Book task over

After the flip task, I marked down the chapters such that on click of
the chapter/topic in index, it shifts to the same. Thing that was left
undone was zoom-effect, but I guess that is not needed at this stage.
We needed a book, chapters such that user click on the particular
chapter, responds to the same.

I too had a discussion on BRL-CAD’s mailing list and Sean so that I
contribute in the respective organization. I discussed regarding OGV,
but didn’t find any documentation or the installation steps. Had a
talk with Sean, and was told to try to deploy on my machine and
prepare the file with installation instructions and all prerequisites
as it can be submitted as a patch.

Proceeding with that.

## Protect my work

After completing the book’s flip task, it was deployed on
experimental. But while doing so, I faced a problem regarding
.htaccess and .htpasswd. The solution was provided by Vigas but that
didn’t work out and even Sukhdeep too faced the same. Tried to find
the some solution and I spent most of the my time on searching it.

But unfortunately, couldn’t get it. As an alternative, I used a
Javascript code that have a username and password, and after that one
can go to the first-page. And also, after the three attempts user will
be blocked. But the javascript code is readable by the user, so I
encrypted such that if one tries to copy/paste it will become
difficult to decrypt.

After finding a solution to .htaccess and .htpwd, I will implement by that.

## Hectic or learning Sunday?

Yesterday, I showed my book flip task to everyone. Right now it was on stage-1 i.e I just set layout of it, user able to flip pages of book. But I was lagging with so many crucial features like zoom effect, flip book with keyboard keys, linking with each chapter and many more. As sir need it asap so instead of leaning what’s going inside example code I decided to took some part of example which just flip-book with mouse click. After reviewing by sir I found he was expecting much better than what I made :-/. Everything goes Topsy-turvy. After leaning sir’s review I woke up, without doing bath and else I jumped to my laptop and start modifying it according to sir’s expectations. By late evening I was able to complete my task with all such properties which I failed to add in previous one but still zoom effect missing :P. In this task I learned new thing to give original book effect I made first and last page hard like in book first and last page is hard rest soft.
Finally I updated my work waiting for review from everyone :). Next, I recognized that sir assigned me task that I have to made any one chapter of that book with my own style i.e I force LaTeX to place stuff where I want. After working till early morning I’m able to complete my task.
Hush! now I’m confused what name should I assign to my this Sunday. Hectic or learning Sunday. Hmm! confused :D. It’s 5:00 AM finally get a chance to take good nap!.

## Moving toward stage-2

The task given by Sir regarding the flipping of the book pages was done and updated bitbucket with my code. But still the implementation is pending as I was using predefined template that had a limit of adding 112 pages. So I embedded bit of the required code.

During conversion of images I used 200 as density which reduced file size to 180 or 200 kb. But as a user, when deployed on server one would like flip and saw all the pictures as our server is bit slow and would take little time for loading the pics. So thinking to reduce the size little more.

## Flip Book Task

The OCR book task was delayed as I had to urgently go home due to some reason.
After reaching, I started with some examples that were provided. But the examples were too vast such that they included lot of javascript, made it bit complicated.
I even searched and tried too understand it. It even included lot of mathematical calculations to add the new pages :(.

Another problem that I faced was to add a pdf in it, it accepted only the png and jpg format. So, I converted the pdf into using the following command

 $convert display -200 <pdf file> <jpg file> Now, instead of using that code I m building my own logic to allow the flipping and making it fully responsive. Also, the pictures have started getting added, done with the addition of 50 pictures. Will be updating the things. I posted a mail by generating the two pdfs, one where LaTeX does the things by itself another where I decided to set the content. In short for images and table in one pdf [htbp] tag on and for another it should be off. I took to much time to create these two pdf as it’s all about mathematics so somewhere I need to use$\$ sign to print results and in another I have to remove that signs which is time consuming process. Meantime I faced hell lot of error which is abvious, noticing very small small things sometimes become difficult.
After compelition of pdf’s I found that somewhere pdf with [htbp] off also lag as stuff inside pdf is distorted at some places but no that much as it was in pdf generated by LaTeX. Today sir checked my work after long discussion he pointed out still I’m not making good use of LaTeX power. Still I need to learn more. He suggested me some tags in LaTeX like orphan, flush etc. which I’m going to use in next pdf which is my next task.
Hope for the best :D

## Macro part done

Doing with the pdfs. I needed to simplify with things too. The code
was too messed up. Decided to have table macro such that it detects
that 1 row has 4 arguments and then shifts to the next line.

Too many confusions how to create a macro. I started with the creating
a macro for list items i.e \begin{itemize} \end{itemize} now starting with “\bi” and
ending “\ei” helps me to itemize the things. But the table marcro gave
me little problems. Communicated and shared my code on IRC and I just
defining and declaring the wrong number of arguments. Corrected and the
things worked out :).

After doing 3-4 discussion on IRC finally table macro start working.
Now I just need to write “\ with 4 arguments> // inside \btt and \ett .”

Enjoying and Learning :)