Tuesday, September 01, 2009

How do I save as Word document?

Pages is not a Word replacement. If you want a product that saves Word documents, you are better off with MS Word (which costs more) or NeoOffice/OpenOffice (which cost nothing).

Pages can export to Word's doc format, but it can be annoying to always have to select and overwrite the document you already have with a new version every time you change. Besides the export is far from perfect.

If you are set on using Pages, and nothing but Pages to edit your Word documents there is a hack, which is described at leefindlow.com. That site describes very well how to do it, so I will just add a short summary here for the record.

Please, remember that Apple never intended us to do this, and anything you do slightly wrong may mess up Pages for you. Only follow the following steps if you know exactly what you are doing.
  1. Right-click (or ctrl-click) on the application icon for Pages and select "Show Package Contents" from the pop-up menu.
  2. Find the file Contents/info.plist. (You may want to make a backup copy of it, in case you mess up in the following steps.)
  3. Open the file in an editor like Property List Editor. If you are comfortable with XML, you can also use a text editor like TextEdit or TextWrangler.
  4. Look in CFBundleDocumentTypes/Document types. There you will find a list of different Document types (CFBundleTypeName).
  5. Find the document type Microsoft Word document.
  6. Check its associated Role (CFBundleTypeRole). By default it is set to Viewer.
  7. Change the Role to Editor.
  8. Find the document type Microsoft Word 97 - 2004 document.
  9. Check its associated Role (CFBundleTypeRole). By default it is set to Viewer.
  10. Change the Role to Editor.
  11. Save the file info.plist.
From now on, when you open a Word document in Pages 3 or 4, it will be able to save the file when you simply press cmd-S.

Saturday, April 25, 2009

How do I make an organisation chart or a flow chart in Pages?

You do not. One of the crucial things in making a chart is to have connector points between boxes and other objects, so the links can stay the same, even if you move the objects around.



Pages does not have this feature, but Word, Open Office and other tools do. Of course you can paste a chart from another application into Pages, but then it is not editable.

There is however, one work around for simple cases - use Keynote to create the chart. If you paste it into Pages, you can still move things around and change properties. The connector points of keynotes are very limited, but they exist.
  1. In Keynote, create two shapes. (For example: Insert > Shape > Rectangle.)
  2. Highlight the two shapes.
  3. Go to Insert > Connection Line.
  4. Highlight the entire figure.
  5. Copy and paste into Pages.
You can now move the objects around in Pages to fit the page layout, and the connector will remain. You can also drag the middle of the connector line to bend it. Or change line type, shadow, colour, and so on.

Tuesday, April 14, 2009

How do I find paragraph marks and tabs in Pages?

If you want to search for paragraph marks, tabs or other special characters in Pages, you can do that in the search dialogue (Edit > Find > Find...) using the Insert... drop down.


If you prefer to use Applescript to find this kind of items, you can use the special keywords space, tab, return, linefeed and quote, for example like this:

tell application "Pages"
repeat with achar in characters of body text of front document
if contents of achar = return then
display dialog (character offset of achar as integer)
end if
end repeat
end tell

Monday, April 13, 2009

Keyboard Shortcuts in Pages


To quickly learn some of the keyboard shortcuts in Pages, the easiest way is to look in the menus. In the menu above, you can for example see that you use command+C to copy.

These are the symbols that are used:

⌘ is the "command" key.
⌥ is the key called "alt" or "option" depending on your keyboard.
⇧ is the shift key.
^ is the ctrl key.

However there are more keyboard shortcuts that are not necessarily available in any of the menus. Also note that they may be slightly different (or even broken) in other languages than English. Here are some examples of working shortcuts for an English keyboard:

Hold the mouse pointer over a word, and press ⌘ ^ D. This will call up a small dictionary window. If you want more information about the word, click on "more".

Type a few letters, and press ⌥ esc to get a list of words beginning with those letters. You can also use F5 for the same function.

To change to the next open Pages window, press ⌘ `.

To change to the next open application, press ⌘ tab.

To copy text or a graphic, highlight it. Then hold down at the same time as you drag it to the place where you want to copy it.

You may have noticed that you can drag tabs around in the ruler with your mouse. However, by default they only land at certain positions. To be able to move the tabs around to any position on the ruler, hold down at the same time as you drag.

When you try to close a modified document window, you get a dialogue asking if you want to change your changes. The three buttons each have their hidden shortcut: Return saves. Escape closes the dialogue without closing the window. ⌘ D is equivalent to "Don't save" and discards your modifications.

To get super script, like in mc², highlight a character, and press ⇧ ^ ⌘ +. (In the menu, it looks like the shortcut is simply ^⌘+. However, as the + character needs ⇧ to display, you need to add ⇧ as well. To get subscripts , like O₂, you only need to press ^⌘-).

To add an indent level to an item in a list, use ⌘ ]. To remove an indent level for a list item, use ⌘ [.

To add an indent level to an item in an outline, use tab. To remove an indent level for an outline, use
⇧ tab.

Graphics

If you change the size of a shape, you can hold down at the same time as you drag its corners to keep the proportions between height and width.

If you want to rotate a shape or image, you can hold down and hold the cursor over a resize point of the shape or image, to change the cursor to a rotation tool.

If you want to make sure that a shape or image keeps the same centre point, hold down
at the same time as you resize.

Some more graphics keyboard combinations are described in this post.

More resources

In Finder, go to Help, and type "shortcut" in the search field, to get generic Mac OS X shortcuts.

In Pages, go to Help, and type "shortcut" in the searchfield, to get Pages shortcuts.

You can find more information about shortcuts in Mac OS X at Apple's support site.

You can find more information about shortcuts in Pages at Apple's support site.

To learn how to customize your own shortcuts in Mac OS X and Pages, go to this page.

Wednesday, February 04, 2009

How do I unlearn words from the spelling dictionary?

Let's say that you write a text about someone with the incredibly attractive name "Magnus". The name is underlined in Pages as incorrectly spelt, if you type in English. To add the name to your spelling dictionary, you may simply right-click (ctrl-click) on it and select "Learn Spelling" from the menu, and Pages will from now on accept the spelling.

Now, assume that by mistake the word you right-clicked was "Nagnus". To tell Pages that you made a mistake that should be forgotten, you right-click the word and this time select "Unlearn Spelling" from the menu.



This technique applies to TextEdit as well.

In older versions of Apple's software, you could unlearn words from the Spelling dialogue box, but with current versions, the way to go is right-clicking.

Saturday, January 31, 2009

PDF/X Problems in Leopard

With Mac OS X 10.5 (Leopard) some people got problems printing PDF/X files. It seems the people who did not get problems did not print complicated documents.


Problem one - some documents. Certain documents, like the Pages '09 template Word Processing > Reports > Visual Report simply refuses to create any document. You can choose the menu item in the Print dialogue, you can enter a file name, but then you get a message: "Alert Couldn't create PDF/X-3 document."


Problem two - resolution. This limitation was likely here even before Leopard, but it is worth mentioning. PDF/X-3 does not support layers, and that means that the PDF/X-creator has to rasterise vector graphics over pictures, like text over shadows. The problem is that Mac OS X rasterizes to 72 dpi, and that is no way good enough for printing on most modern high resolution printers.

The resolution is defined in a Filter in ColorSync (Applications > Utilities > ColorSync Utility). Go to Filters and check the properties for "Create Generic PDFX-3 Document". The resolution is defined next to the "Flatten Transparency" checkbox. The annoying thing is that the Filter is read only, so we cannot change the resolution.


What we can do, is to create a copy of the original Filter and change the value there. (Do not try to change the values for Trimbox or Bleedbox. I do not know anyone who has made them work.)

Next, is something you should NOT do. The entry in the Print dialogue to print to PDF-X is defined in /Library/PDF Services. Do not be tempted to change any of those entries. You will get a warning message saying: The behavior of this workflow may have changed because of the reasons listed below. The workflow was saved with an older version of the action "Apply Qua... If you try to resave it, you may break it and stand with one less working entry in the Print dialogue.

Instead, to solve the resolution problem, follow the following steps.

Setup
  1. Open ColorSync.
  2. Go to Filters.
  3. Click on the circled triangle next to the filter Create Generic PDFX-3 Document and select the option "Duplicate".
  4. Double click on the name of the new filter and change the name, if you want to.
  5. Expand the filter elements and change the resolution to 300 and 300. You do not need to save the changes, but you may want to quit ColorSync and reopen it, to make sure that the change has been taken into account.


Usage
  1. Open the document you want to make into PDF/X.
  2. Print to PDF (standard PDF).
  3. Right click or control click on the created PDF file and select Open With > ColorSync Utility from the pop up menu.
  4. In the document window in ColorSync select the filter you created above from the list in the bottom left corner of the window.
  5. Click on Apply. (The Filter list will be reset to "None" through some quirk, but do not let that scare you.)
  6. Select Save or Save As... from the File menu. You will now have a high resolution PDF/X file. Probably.
Warning: The error handling in ColorSync is abysmal. If you have too complicated a file - for example one that would not even allow you create a low resolution PDF/X file from the Print dialogue, then the resulting file may not be compliant with PDF/X even after the ColorSync treatment. The only way I know of verifying this for sure, is to open the file in Adobe Acrobat and do a "preflight".

Friday, January 23, 2009

iWork '09 and Security

The new version of iWork has a few issues with security that previous versions did not have. Note that I have no personal experience of any of the issues below, but I rely entirely on other sources. Please, use your own judgement when you use the information.

A Trojan called iServices.a has spread with an unofficial version of iWork that can be downloaded from other places than Apple.com. According to Intego, 20000 people have already downloaded the Trojan, but that sounds exaggerated. Once the Trojan is installed, it listens for instructions from a remote server. The remote server could for example ask for your personal address book or other private data, which would be sent without your knowledge.

To see if you have the Trojan, go to /System/Library/StartupItems. If there is a folder there called iWorkServices, the Mac is infected.

To remove the Trojan automatically, download this script at MacUpdate.

To remove the Trojan manually:
  1. Open the Terminal (Applications > Utilities > Terminal).
  2. Type sudo su and enter.
  3. Type your account password and enter. (This assumes you are administrator.)
  4. Type rm -r /System/Library/StartupItems/iWorkServices and enter.
  5. Type rm /private/tmp/.iWorkServices and enter.
  6. Type rm /usr/bin/iWorkServices and enter.
  7. Type rm -r /Library/Receipts/iWorkServices.pkg and enter.
  8. Type killall -9 iWorkServices and enter.
More information about the Trojan can be found here.

The next security issue is ad.doubleclick.net. Several posters in Apples forum confirm that the iWork applications send information to the advertising company doubleclick.net when the application is launched. It seems like lists of software installed at the computer and the computer model is sent to doubleclick.net without the user's knowledge. Apple has so far not made any comments on this, so we do not know if the information is limited to that, or if other information may be sent under some circumstances.

A serial number is only needed if you buy the downloadable version. If you buy the DVD, you just install it and that is that. This makes it easier to copy the application between machines, and it is likely to increase both the piracy and the usage of the product. There is also a way to hack the trial version to work as a full version, but this is not the right forum to give instructions how to do that.

Finally, iWork '09 includes the possibility to save documents so they cannot be opened without a password. However, Apple has not said anything about what level of encryption is used. The encryption may be very good, but it may also be ridiculously easy to break for anyone with the right tools. We users do not know. For now, I would not recommend anyone to use iWork's password functionality except for harmless documents. Do not use it for bank details, credit card information or commercial confidential information, for example.

All this should remind us that iWork is not just a harmless tool on our harddisks. If one is not careful, one can get into some really delicate situations.

Saturday, January 10, 2009

Why did the layout of my old Pages document change?

If you open documents created with Pages '08 in Pages '09, it is possible that the layout does not look the same any more.

One possible error source is a bug in Pages '08, which made some fonts look bigger than they should. There is no known easy way to get the old layout back, but to manually readjust the fonts, playing with size, and line Spacing (set in the Inspector's T pane).

A description of the previous problem can be found here.

Friday, January 09, 2009

How do I change a single file Pages document to a package?

If you for some reason want to change a Pages '09 single file document to a package type document, you can follow these steps.
  1. Unzip the single file.
  2. Put the unzipped content in a new folder.
  3. Rename the new folder to any name with the extension ".pages".
The folder turns into a file which should open fine in Pages.

How do I see what my file contains?

If you want to see the elements included in your Pages '09 file, you can simply unzip it, using the command unzip in a terminal window.

To avoid any accidents with large numbers of files spread in the current directory you can follow these steps.
  1. Create a new folder "test".
  2. Drag your Pages file to the folder "test".
  3. Open the Terminal (Applications > Utilities > Terminal).
  4. Type cd in the Terminal and press the spacebar.
  5. Drag the folder "test" to the terminal.
  6. Hit enter. (This will change the "current directory" of the Terminal to your folder.)
  7. Type unzip in the Terminal and press the spacebar.
  8. Drag the Pages file to the Terminal.
  9. Hit enter.
  10. Open the folder "test" in the Finder
The folder "test" now contains all the images and media of your Pages file. The actual text is in a file called index.xml.gz. You can now easily see which images you have, how big they are and so on.

If you want more information about the unzip command, type man unzip in a Terminal window, and press enter. Move up or down in the man page using the arrow keys. Type q to leave the man page.

Before Pages '09, all Pages files were packages. To see the content you would simply right click on the file and choose the option "Show package content" from the pop-up menu.

Even in Pages '09, you can use packages instead of single files, if you go to the menu Pages > Preferences > Save new documents as packages.

Tuesday, January 06, 2009

iWork '09 released - what's new and what isn't

There is a new version of iWork out there today. This is an incomplete list of new functionality in Pages '09/Pages 4.0:
  • Full screen view
  • Dynamic outlines
  • Mail Merge integration with Numbers
  • Support for MathType and EndNote
  • A "Share" menu to quickly mail documents to other users or to share them using "iwork.com" or iweb.
  • Documents are no longer packages, but "real" files, which more easily can be attached to emails.
  • Tables (but not images) in RTF files are now recognised.
  • Documents can be password protected.
  • Reduce File Size to remove non used data from cropped or shrunk pictures.
  • Insert Filename
  • Sub-pixel font smoothing seems solved
  • A more advanced gradient fill for graphics
  • A fix of the problem with exact line spacing.
  • Reflections can now be added to shapes.
  • You can now add paste tables from Safari.
  • The flag "Keep with following paragraph" now works for several paragraphs after each other.
The following new languages are added:
  • Traditional Chinese
  • Danish
  • Finnish
  • Korean
  • Norwegian (BokmÃ¥l)
  • Polish
  • Portuguese
  • Russian
  • Swedish
Some issues that are not fixed are:
  • Auto-save
  • Japanese furigana, vertical script
  • Right-to-left writing in for example Arabic and Hebrew
  • Support for Open Document format
  • There is still no easy way to change default font.
  • There is still no easy way to change default dictionary language inside Pages.

Saturday, November 01, 2008

OpenOffice 3.0 and Pages 3.0 comparison

This comparison is inspired by Wikipedia's Word vs. Pages comparison, but it is about OpenOffice instead of Word, and it contains some personal observations. It does not cover all the differences, but only some I consider important or interesting. The points are not ranked but just listed in a random order.

The current price for iWork '08 (with Pages 3.0) is close to 80 euro. The price for OpenOffice is 0 euro.

In OpenOffice but not Pages
  • Open and save OpenDocument files
  • Native "Save" of RTF and Word format (Pages "exports" to RTF and Word format, but subsequent changes have to be exported again through a number of dialogue steps.)
  • HTML editing
  • Document comparisons
  • Multiple windows with the same document (However, there is no split window, as far as I can tell.)
  • Multiple versions (Pages stores only one version of the document in each file)
  • AutoSave
  • Master documents
  • Script recording (Called “macros” in OpenOffice. The language is OpenOffice Basic by default. Applescript is not supported.)
  • Connector points for objects in diagrams.
  • Drop caps
  • Italics and bold in fonts with no built in typeface for it.
  • Hidden text
  • Paste Special - for pasting a chart as an image
  • Bibliography databases
  • Vertical Script and Japanese furigana
  • Support for right-to-left scripts, like Arabic and Hebrew
  • Built in formula editor
In Pages but not OpenOffice
  • Save and open Pages documents
  • Save and open RTFD files
  • Support for Mac OS X Services
  • Image Masks
  • Usable image controls. (OpenOffice actually has plenty of controls to edit images, but they are so stone age like, that they are virtually impossible to use.)
  • Multi-language dictionary (OpenOffice has several language dictionaries, but for each part of the text, one has to decide which language it shall be checked against.)
  • Ligatures and other advanced typographic features
Neither application seems to have anything like Microsoft Word's WordArt module.

Looking at the usefulness of the functions, it would seem like OpenOffice is much better. Most of the functionality that is unique to Pages is cosmetic or largely irrelevant to most people. Even if Pages is better at editing images, anyone who really cares about images will have to have an external dedicated image editor anyhow.

However, using the two programs there is a huge difference in perception. OpenOffice feels slower. There are a few milliseconds before the characters are displayed after each keystroke. It is more difficult to find options, and what is implemented is usually done in a strange way. There is for example a function called Conditional Text. To use it you have to start by following the menu path Insert > Fields > Other, and then click the Variables tab. As far as I can tell, none of those labels have anything to do with conditions or text.

In other words, OpenOffice is not a program to have fun with.

Wednesday, October 08, 2008

How do I get svg files into Pages?

SVG files are "images" which can be resized without losing any information. They can be created by programs like OpenOffice (the drawing module), Inkscape or Adobe Illustrator.

Often the program that created them can also save to PDF, which Pages handles directly, and that is then an easier solution.

However, there is a way to import black and white SVG files to Pages with the help of some other programs. It it may be cumbersome, the first time you set it up, and you will have to type commands in the Terminal, but it does work.
  1. Download the program svg2key and follow the corresponding instructions at http://mcb.berkeley.edu/labs/zusman/dave/svg2key/ .
  2. Run the program on the SVG you want to import to Pages.
  3. You will get a Keynote file. Open it in Keynote.
  4. Copy the content and paste it into Pages.
(Images are usually stored inside the Pages file "package" as separate objects. However SVG objects are stored inside the index.xml file in the package, just like "shapes", text and style information. As far as I can tell, they appear within the tags SFDBezierPathSource.)

Saturday, October 04, 2008

Which are my preferences?

If you have Pages running fine for one user on one computer, but you have problems on another, it is possible that the preferences are corrupted.

The quickest and dirtiest way to check this is to delete the preference file -homedirectory-/Library/Preferences/com.apple.iWork.Pages.

However, if you want to check for the exact difference in preferences between the two files you can follow the following steps.

  1. Launch the Terminal (Application > Utilities > Terminal).
  2. Type the command defaults read com.apple.iWork.Pages |less
  3. Hit enter.

You will now get a list of all preferences set for Pages for the active user. It will look something like this:


{
"AppleNavServices:PutFile:0:Disclosure" = <01>;
"AppleNavServices:PutFile:0:HomeDirectoryPath" = "file://~/Desktop/";
"AppleNavServices:PutFile:0:Path" = "file://localhost/Users/Magnus/Desktop/";
"AppleNavServices:PutFile:0:Position" = <01b201ba>;
and so on...


To move to the next page, press space. To move up one page, type b. To get more information about navigating around, press h. To leave the display to be able to type another command, type q.


Using the command defaults you can also change individual values, if needed.

Warning! When you change those values by hand, you may make things worse than they were before, unless you are careful. Make sure you know what you are doing. You can try the commands out in a test account, before you change things in the main account, if you are unsure.

Let's say that you are interested in the following preference:
MediaBrowserVisibility = 0;
You realise that means that the Media Browser is invisible in Pages. (It actually means that it is invisible by default, when Pages starts.) To change it to visible, you type the following text. The full line may not display well in your browser, but you can copy the line. When you paste it in Terminal, it will paste the full line.
defaults write com.apple.iWork.Pages MediaBrowserVisibility 1
Next time you open Pages the Media Browser will be visible.

defaults write com.apple.iWork.Pages MediaBrowserVisibility 0
And it will be invisible next time you open Pages.

Remember that you will have to close Pages and reopen it for it to take the changed values into account.

Thursday, July 10, 2008

Using Aperture with Pages

There are some hints how to use Aperture with Pages at the blog Photo Phindings.