What is the best way to insert source code examples into a Microsoft Word document?

前端 未结 15 1608
南笙
南笙 2020-12-22 16:05

I have to write some documents that will include source code examples. Some of the examples will be written from the IDE, and others would be written in place. My examples a

15条回答
  •  庸人自扰
    2020-12-22 16:25

    Use this - http://hilite.me/

    hilite.me converts your code snippets into pretty-printed HTML format, easily embeddable into blog posts, emails and websites.

    How: Just copy the source code to the left pane, select the language and the color scheme, and click "Highlight!". The HTML from the right pane can now be pasted to your blog or email, no external CSS or Javascript files are required.

    For Microsoft Word document: Copy the the content from the Preview section and paste to your Microsoft Word document.

    3 sections : Source Code , HTML and Preview

提交回复
热议问题