To make a zippered pencil case, cut fabric into four equal-sized pieces. Layer one piece of fabric right-side up under the zipper and one piece of fabric right-side down on top of the zipper. Pin the layers together, and sew them in place. Repeat using the other two pieces of fabric on the opposite side of the zipper. Open the fabric so the liner fabric is together on one side, and sew around the outside edge of the fabric.
Leave a 2-inch opening on the final edge of the lining fabric. Use this opening to turn the pencil case right-side out. After turning the pencil case right-side out, sew the gap closed. To avoid sewing over the zipper pull, sew halfway across the layered zipper and fabric.
At the halfway point, move the zipper pull to the sewn side of the pencil case, and sew the second half of the seam. When layering the fabric, make sure that the liner and exterior fabric are sewn to the appropriate side of the zipper, and leave the zipper partially open while sewing.
Reinforce the zipper by sewing over the zipper ends several times. Iron the pencil case, and use a pencil to push the corners out evenly.