fisherro / cpp2rtf

Typeset C++ code like TC++PL 3rd edition outputting it as RTF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I liked the way code was typeset in Bjarne Stroustrup's THE C++ PROGRAMMING
LANGUAGE third edition. Essentially, identifiers were set in a proportional-
width typeface while other characters remained in a monospace typeface. I
wanted to imitate this style in a document I was writing. So, I wrote this
program to convert C++ code into an RTF document in this style.
(RTF was the most convenient choice for the task at hand.)

This is actually the third version of this code. It has gone through one
refactoring, and this version uses C++11 features.

Additional features:

- All text in comments or string literals is set in the proportional font.
- Recognized keywords are set in bold rather than italic.
- Preprocessor directives are set like keywords.

About

Typeset C++ code like TC++PL 3rd edition outputting it as RTF


Languages

Language:C++ 98.9%Language:Makefile 1.1%