How To Format A Block of Code Within a Presentatio

2019-03-07 20:25发布

I am preparing a presentation using Google Slides, though I can also work on the presentation within Open Office that will include code snippets.

Is there any easy way to perform basic syntax highlighting on the code snippets with either Google Docs or Open Office Presenter?

Edit: Since I believe that I can find a way to embed HTML, any tools that can perform syntax highlighting on HTML would also be welcome suggestions.

9条回答
Melony?
2楼-- · 2019-03-07 20:59

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.

查看更多
劳资没心,怎么记你
3楼-- · 2019-03-07 20:59

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."

查看更多
淡お忘
4楼-- · 2019-03-07 21:01

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

查看更多
走好不送
5楼-- · 2019-03-07 21:01

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.
查看更多
冷血范
6楼-- · 2019-03-07 21:02

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

查看更多
该账号已被封号
7楼-- · 2019-03-07 21:08

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/

查看更多
登录 后发表回答