Monday, March 3, 2008

X11 does not run under Mac OS X 10.5.2?

Symptoms:
After upgrading X11 to version 2.0 from the Leopard installation DVD, MATLAB R14 (2007) stopped working properly. This is an issue reported by several people elsewhere. The X11 system itself does not start.

What helped:
After that installation of X11 from the Leopard DVD, I went to XQuartz Project, downloaded X11 version 2.1.4 from there, and installed it over X11 version 2.0. 
After the reboot that is required by 2.1.4 installer, everything works fine for me: 
MATLAB starts and works, and X11 itself also starts without problems. 

Friday, February 15, 2008

Computer Modern fonts (TeX) - system wide install


If you use TeX/LaTeX, it is often helpful to have Computer Modern fonts installed on your Mac for use in other applications as well. Here is how I did this:
  1. Download the Computer Modern fonts from Blue Sky.
  2. Unarchive them (you will need something like Stuffit Expander for this).
  3. Open (e.g. by double clicking) the first file called "CM/PS Screen Fonts". The Font Book application will start.
  4. Click on "Install font" button.

After this, you can use the Computer Modern fonts in Pages, Keynote, and so on.  
There is a little difference comparing to standard fonts, however. 
Instead of "Bold", "Regular", "Italic" in font menus you will see CMBX10 etc.

Wednesday, February 13, 2008

Testing regular expressions: RegExhibit and some others

RegExhibit screenshot In Mac OS X, you can use regular expressions almost everywhere. Having a good tool for testing your sofisticated regular expressions before the real application is a good idea.

My favorite tool on Mac OS X is RegExhibit (see the screenshot). You may also like Reggy or RegExplorer.  All three programs are free. 
Although simple, they provide basic tools for testing search and replace patterns on a user-supplied sample text.

In the MS Windows world, nothing is better than RegexBuddy (commercial software). However, Expresso (free of charge) is also very good.

Redet looks also very interesting and powerful. Unfortunately, I did not find time to try it, as well as many other tools which are listed here and here...

Tuesday, February 12, 2008

Mac OS X Leopard 10.5.2, Preview and Keynote '08: Solution of weird copy problem


Many people, including myself, use Keynote for preparing presentations. However, there is a HUGE problem, which is described in "Leopard Preview cropping weirdness is driving me crazy" or in "Problems with Paste - from Preview". Here is a brief summary of the problem from the latter link:

When I select some graphic with the selection tool from a PDF file, opened with Preview, then try to copy and paste it within a document in Pages '08, what I get is not the selection copied but the whole page... [SEE THE PICTURE] It never happened with Pages '08 and Tiger...

The most recent updates (Mac OS X 10.5.2 Leopard and iWork'08) do not solve this weired issue. 

I tried many ways. Here are the only two that work.

(1) If you have a copy of OmniGraffle (commercial software), then you can copy a selected area in Preview, then paste it to OmniGraffle, copy it to clipboard immediately while you are in OmniGraffle, and then paste the clipboard to Keynote'08 or Pages'08. It is strange, but it works. You can use even OmniGraffle beta software.

(2) The second method is much simpler. Download TeXShop  (distributed under the GPL public license, and thus free) or an old Texniscope and use it as a PDF viewer instead of the Leopard Preview. If you select an area in a PDF document opened in TeXShop or in Texniscope (in Texniscope, use Alt-Click to select a rectangle) and copy it to the clipboad, then you can paste it to Keynote or Pages without any complications like you did in Tiger.

Other PDF viewers (including Skim) or programs do not help.

In each case, TeXShop and/or Texniscope will be nice additions to your Applications folder.

Let us hope that some further update of Preview or iWork'08 will solve this issue properly. 
Since old tools work, I believe there is a bug in the new version of Preview in Leopard or in some Quartz library 

Added 2008-04-25: I have found a detailed explanation here. Indeed, it is Apple's bug.