<< | Page list | >>
LyX/X11 on MacOSX
This is a HOWTO for LyX/X11 on Mac OSX, including installation, configuration, and enabling drag-and-drop and double-click for LyX files. Unless you have a special reason for using the X11 version, you will probably prefer the native Aqua port of Mac, which is more functional, fully integrated with the Mac GUI, does not require X11, and is an easy drag & drop installation.
The simplest way to install LyX/X11 is to use the
LyX/X11 with the Xforms frontend
setenv CXX g++2 ./configure --with-extra-lib=/sw/lib --with-extra-inc=/sw/include make make install
LyX/X11 with the Qt frontend
sudo gcc_select 2 fink install qt2 sudo gcc_select 3
setenv CXX g++2 ./configure --with-frontend=qt make make install
Use Edit -> Preferences -> File formats -> filetype -> Viewer in LyX to configure the previewers. You can specify open as the viewer for filetypes for which you have configured a default application in the MacOSX finder. Otherwise:
\converter "lyxpreview" "png" "lyxpreview2bitmap.sh" ""
to your ~/.lyx/preferences file.
clear mod1 clear mod2 add mod1 = Meta_L
keycode 66 = Mode_switch
If you're used to emacs commands like M-d (delete-word-forward) and M-f (word-forward), and find that even with the emacs.bind file those keys invoke LyX menu commands, copy /usr/local/share/lyx/ui/default.ui to ~/.lyx/ui/default.ui and edit the copy to remove the |D, |F, etc. from the menu commands.
xset fp+ /usr/X11R6/lib/X11/fonts/TTF,/sw/lib/X11/fonts/applettf,/sw/lib/X11/fonts/msttf
betweeen the <dict> and </dict>. You will have to logout and login again for this change to take effect.
With OpenLyX installed, LyX files will have a distinctive icon in the Finder. You can drag LyX files to the OpenLyX icon to open them in a running LyX. If X11 or LyX are not running on the Desktop, OpenLyX will start them as needed. Enable double-clicking LyX files in the Finder by selecting OpenLyX as the default application to open LyX files in Finder -> File -> Get Info -> Open With.
XDarwin & OroborOSX
echo OroborOSX X11 helper running: lyx-remote \"$x11exec\" "$2" "Contents/Scripts/lyx-remote" "$x11exec" "$2"
echo OroborOSX X11 helper running: lyx-remote "$2" /usr/local/bin/lyx-remote "$2"
With these modifications, you can drag LyX files to the OroborOSX icon to open them in a running LyX. If LyX is not running on the Desktop, it will start as needed. To enable double-clicking LyX files in the Finder, select OroborOSX as the default application for LyX files. (Without these modifications, drag & drop either won't work or OroborOSX will start a new instance of LyX for every file, which is probably not the behavior you want.)
LyX does not print through the OSX Print Center. If you install the gimp-print drivers and ESP ghostscript you can print from LyX to any printer connected to the Mac: specify the name of the printer (from /etc/printcap or http://localhost:631/printers) in LyX -> Preferences -> Outputs -> Printer -> Printer name. You can also print by previewing PDF and printing from Preview or Acrobat to a local or remote printer.
To print envelopes, install envelope in /usr/local/bin and make it executable. While you're writing a letter in LyX, do File -> Export -> Custom -> ASCII and give envelope as the command; the perl script will parse the address from the letter and print an envelope, including the USPS barcode. You can customize envelope for your printer and letter style with command line options or by configuring the Perl code. For documentation, do perldoc envelope.
The information on this page is believed to be accurate, has been used successfully on many systems and sites, and has benefited from the comments and suggestions of many users. Due to the variations in individual systems, this information and the various files and code available on this page are conveyed as is with no warranty of any kind. installation OS X