Ah, so you're doing it as a learning exercise, then? In that case, the first thing I'd do is figure out what the grammar for my markup would be, and what it would mean. Sketch it out on a sheet of paper. Then, start writing code to read the text and parse out your instructions. If it gets nasty, you might change your grammar to simplify it.
The roff, troff, etc., layout programs kept their grammar simple by using the rule "if a line begins with a period, then it's a layout command, otherwise it's text". So a marked-up file would look like this:
.TH 7z 1 "September 1 2006" "Mohammed Adnene Trojette"
7z \- A file archiver with highest compression ratio
7-Zip is a file archiver with the highest compression ratio. The progr
+am supports 7z (that implements LZMA compression algorithm), ZIP, CAB
+, ARJ, GZIP, BZIP2, TAR, CPIO, RPM and DEB formats. Compression ratio
+ in the new 7z format is 30-50% better than ratio in ZIP format.
7z uses plugins to handle archives.