Keyboard layout for using Catalan language on a MacOS X with US keyboard based on the one found at http://www.twam.info/hardware/us-international-on-os-x and adapted using Ukelele.
Add the file U.S. International wo dead keys catalan.keylayout to the ~/Library/Keyboard Layouts/. Then add the keyboard layout from System Preferences -> Keyboard -> Input Sources -> +. In the popup window select others, select the catalan layout in the layout list and click Add. Check the Show Input menu in menu bar checkbox, and change the keyboard layout clicking on the new icon on the topbar.
To write é,í,ó,ú simply type Option + A
To write ï,ú simply type Option + J or Option + U
To write à,è,ò type Option + ` and then the letter
To write l·l type Option + L