However, most of people said they are more like references than a real book. And if they really are, then I think I'd rather look up at CTAN. What I'm looking for is a book that can teach me how to program in LaTeX, for example:

Write my own package

Create animation

Create and using macro in LaTeX
....

I know there are many options around, however to pick the right one is not an easy task. Any advice or suggestion would be greatly appreciated. Thank you.

macros2e is on CTAN already, you can update the link.
– Andrey VihrovJul 26 '11 at 13:22

2

I must say (personally, I'm sorry), lshort is really not a good document. And it's only for beginners, but not suitable for any advance reference. A much better quick introduce to LaTeX is ltxprimer by Indian TUG.
– Leo LiuJul 26 '11 at 13:23

See the macros2e answer of mine for the updated CTAN and code repository links. I have to say that IMHO this document is not a starting point to learn how to define own macros.
– Martin Scharrer♦Jul 26 '11 at 14:22