开发者_StackOverflow中文版
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionI am working on a book containing a number of C examples. I am looking for a way I can spit the code through a processor that will give it to me with alternating grey/white lines with line numbers and b&w only syntax highlighting.
Any suggestions?
Thanks,
Alan
Are you sure you want to use MS-Word, especially for a book text? If it's not completely required, have a look at latex and packages like:
- listings
- minted
Alternatively if you don't want to do full, proper text layout, just find some application which does format the code and copy&paste it. Visual Studio can copy formats apparently.
Download Notepad++ then select
TextFX -> TextFX Edit -> Reindent C++ code|Indent & surround| ...| more options
To get the colors read this question
Then just paste it in your word processor.
精彩评论