I don't think you should use e.g; you should write it out in full.
Here's an example of the use of an example:
"The composer conveys Huck's point of view in for example, 'I felt good and all washed clean of sin.' "
You can also replace "in for example" with "such as in" and "as in".
Hope that helps.