Table of Content

basically copy/paste not works for PDF ebook, lost all indentation, you need to re-format by hand.

Here is solution:
1) convert PDF to txt file
http://www.sejda.com is free online service for this.
2) all source code looks good but there are extra white space in head of each line, assumes you have 3 spaces, here is short script to remove it:

$ cat trim
cat $1  |awk '{sub(/^   /,"");print}'
$ trim test.c