I'm creating a presentation in Keynote on the Mac. It is intended for an audience of Java developers, and has some slides that contain blocks of Java code. Even with a monospaced font, I find the TextBox feature to be difficult in terms of formatting.

Crazy Bob has an article on how he handled it in 2004 (he creates PDFs from the code samples and then includes those). However, I would like to know if there have been any changes since then.

How do you work with code examples (Java, C#, Javascript, whatever) in Keynote?


In one of two ways:

  • Short examples

    I just set the style once the way I like it, and then copy & paste the formatting everywhere it's needed.

  • Long examples

    I'll use a link that kicks out to a web page that contains my code, and then I use CSS to style it just the way I want it. Also, this way I can do things like have highlighting when I hover over particular lines of code, or have a link that runs web-based examples.

    When I'm done, I just bounce back to Keynote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.