The Diamond Age by Neal Stephenson essentially the story of the growing up of a girl named Nell, after nanotechnology has changed the economic structure of the world. One of the wonders that has resulted from this revolution is a tome called “A Young Lady’s Illustrated Primer”. Essentially, it’s a book that teaches Nell everything she needs to know, including how to read. The copy she has was a stolen bootleg copy of what was supposed to be a one of a kind device for a Duke’s granddaughter. Part of the setup was that voice actors would do the requisite voice work, instead of using a computer generated voice to do so. Thus, Nell gained a mother that she didn’t really have before.
Naturally, it wouldn’t very exciting if all the stuff that happened to her was good. At one point she ends up having to use a sword against a group of men who were fairly intent on killing not only her, but all the rest of the westerners that were in the area.
A good portion of the story is of what her alter ego does in a story the book tells to her. This alter-ego goes from being locked up in a dark citadel, to fighting the Fairy Kings and eventually gaining control over the entire Land Beyond, as the final area is known. Now, since the book is actually a highly advanced computer, the story is more of an RPG that she’s playing at times than what you or I would read in a novel.