Syntax Highlighting in Pages

Hello,

I am currently in the process of writing a technical book and I have chosen to attempt to write it within pages. It is going very nicely, pages is working great for this job. But I have run into an issue: How can I get syntax highlighting within pages? I tried doing it in another program, then taking a screenshot and importing the image as a high quality TIF but its too hard to keep the text size consistent.

Any suggestions? Thank you.

Mitchell Hashimoto

MacBook Pro 1.83 GHz, Mac OS X (10.5)

Posted on Jan 8, 2008 11:03 AM

Reply
Question marked as ⚠️ Top-ranking reply

Posted on Jan 8, 2008 2:27 PM

Syntax highlighting is not a feature available in Pages. In my experience it's a feature usually available only in text editors that are used for creating scripts or code.

I'd suggest creating paragraph or character styles if you want to mimic syntax highlighting in Pages rather than copy and paste images or illustrations. You might also be able to create some AutoText entries if there are frequently used phrases or coding examples you want to illustrate.

Good luck,

Terry
3 replies
Sort By: 
Question marked as ⚠️ Top-ranking reply

Jan 8, 2008 2:27 PM in response to Mitchell Hashimoto

Syntax highlighting is not a feature available in Pages. In my experience it's a feature usually available only in text editors that are used for creating scripts or code.

I'd suggest creating paragraph or character styles if you want to mimic syntax highlighting in Pages rather than copy and paste images or illustrations. You might also be able to create some AutoText entries if there are frequently used phrases or coding examples you want to illustrate.

Good luck,

Terry
Reply

Jan 8, 2008 2:28 PM in response to Terry Keelan1

Thank you. I understand its not a feature in pages but I was hoping there was some sort of addon or some better way to have it implemented. Merely copying and pasting from most text editors won't retain the syntax highlighting... I wish there was one which did.
Reply

Jan 8, 2008 8:43 PM in response to Mitchell Hashimoto

Copying & pasting from Xcode, Apple's integrated development environment will retain the style information when you paste into Pages. If you don't already have it installed in the Developer folder, you should be able to install it from the discs that came with your Mac (or OS X).

I don't know the extent of languages that are supported, but certainly HTML, C, C++.
Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Syntax Highlighting in Pages

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.