How To Format A Block of Code Within a Presentation? [closed]

£可爱£侵袭症+ 提交于 2019-12-02 13:52:25

An on-line syntax highlighter: http://markup.su/highlighter/

Just copy and paste into your document.

EDIT:

Seems the above site is temporarily down so heres an alternative: http://hilite.me/

http://www.tohtml.com/ created syntax highlighted HTML code for lots of languages. It might be what you're looking for.

If you're using Visual Studio (this might work in Eclipse also, but I never tried) and you copy & paste into Microsoft Word (or any other microsoft product) it will paste the code in whatever color your IDE had. Then you just need to copy the text out of word and into your desired application and it will paste as rich text.

I've only seen this work across Visual Studio to other Microsoft products though so I don't know if it will be any help.

With the new Add-Ons for Google Drive, you can get code highlighting with the Code Pretty add-on.

I've also thought of this. Finally, my solution is to use github gist. Don't forget it also has highlight functionality. Just copy it. :)

Just a few suggestions:

  • Screenshots might be an easy way, but you'll have to make sure the code in the image is big enough and clear enough to read. (not the whole screenshot, just the relevant part)
  • If you can embed html then there are lots of tools to generate syntax highlighted html.

Check out http://codepad.org. It probably won't solve the poster's problem; but, I think it will be of use to others who read this article.

coooder

"This extension provides syntax highlighting features for LibreOffice.org. COOoder will be usefull for developers wanting to present code fragments in writer documents. The colors used are the same than the ones from GeSHi. Character styles will be created for each language element."

robintw

If you write your code in emacs then you might be interested in the htmlize elisp package.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!