Are books generated randomly or are they found in set places?
Solution 1:
Books are always bound to certain potential locations. Some are bound to random dungeon locations so whether you will find some of them is random because it is determined by whether those randomly available locations are generated for you. Also, how many books are present to be picked up in a particular area is also random so if there are more books available for an area than the game generates places to pick them up, it is likely that you may not find all of them. I had to visit Old Tristram/Road 3 or 4 times to get all the books there (picking up 1 or 2 at a time).
Certain sets of books are bound to the same location and groupings of them are always found in a set order (I, II, III, etc.) so the books to do with Old Tristram (Cain's Old Journal, Gillian's Diary, Despina's Journal, Lost Journal, Old DIary) can all be found in Old Tristram or on Old Tristram road and you will always find Gillian's Diary Part 1 before you find Part 2.
Certain book parts will only be available during certain acts (Leah's Journal, Deckard Cain's Journal). The only suggestion I have for this until a complete list is posted for the affected book parts is to check back during each quest in the main story.
If you're missing books for a location after exploring the entire area, the only way to find them is to generate a new map instance for the area (Exit to character select and the Resume) after which you will have to re-explore the area. The trick is figuring out which location holds the book that you are missing.
Solution 2:
They aren't randomly generated. Each set of books can be found in a certain location.
Some of these books will always be found at the same location, but at different times in the quest (e.g. Leah's journals), and some of them can be found in different places within the same location (e.g. Leorics journal in the cathedral).
With the latter, you will usually find parts of them on some special interactive object, e.g. in Act 1 in the cathedral on you will find them on glowing book-stands.
However, with those kinds of books, the order in which you visit the various interactive objects (for example, the book-stands) usually doesn't matter. So you could go to a book-stand in the cathedral level 2 and pick up the first part of a journal, then go up to level 1 and pick up the second part at another book stand.
I'm also fairly certain that some of them are missable. I'm usually very thorough when exploring areas, yet I have found maybe half of all books in Act 1. It's possible that these books only occur within random dungeons, and since those dungeons are not always there, you can miss them.