Even if I do PPT, I can't do without code. In keynote, if I want to paste the code, how can I highlight the syntax?
Supplement 1, this feature is supported by pygments, so the Supported languages can be seen in: http://pygments.org/languages/
Supplement 2: directly convert the content in the clipboard in the following section and set the language to-s py. py indicates that if the code is saved as a file, it should be. PY, so if you want to paste a piece of objective-C code, it is obviously-s m.
The original text and source are reproduced as follows without further translation:
Http://www.peterbe.com/plog/highlighted-code-syntax-in-keynote
Do you want to display some code in a keynote presentation?
It's easy. All you need is homebrew installed.
First you need to install the program highlight.
$ Brew install highlight
So you have a piece of code. For example some Python code. The take that snippet of code and save it to a file likeCode. py. Now all you need to do is run this:
$ Highlight-o rtf code. py | pbcopy
Then, switch back into keynote and simply paste.
But if you don't want to create a file of the snippet, simply copy the snippet from within your editor and run this:
$ Pbpaste | highlight-s Py-o rtf | pbcopy
The-S pyMeans "syntax is py (for Python )".
You can useHighlightFor a bunch of other things like creating html. SeeMan highlightFor more tips.
Keynote code highlighted [go]