Bennett,

You may be having the problem I did and need to specify the path in the environment.plist file. The FAQ at one point says that file is no longer needed, but I think that's only for LyX/mac itself. If you want to use x11 tools (which I like a lot!), I think you need it so LyX can call those tools. This file is in ~/.MacOSX/environment.plist

Mine looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.
com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PATH</key>
<string>/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/sw/bin:/sw/usr/ bin
:/sw/sbin</string>
<key>DISPLAY</key>
<string>0:0</string>
</dict>
</plist>


The other thing you might find helpful if you like some of the X11 tools, which I do is to use a wrapper to call them so that the wrapper can activate X11 if it's not already running. So, if you create a script like so (I call mine LyX.gv.sh):

#!/bin/sh

# make sure X11 is running
osascript <<EOF
tell app "X11"
  activate
end tell
EOF

#start gv
gv "$1"

Then tell LyX in the Preferences\File Formats to use the script LyX.gv.sh instead of using gv directly, it will make sure X11 is running. I find this pretty handy.

I hope this helps.

--Dave

On Dec 9, 2004, at 9:25 AM, Bennett Helm wrote:

On Dec 8, 2004, at 4:52 PM, Sang Oh wrote:

Hi,

I think I have everything installed.  xdvi, gv, etc... and they run
fine from the command line.


i can file->export->dvi, and i can open it from the command line.

everything looks good.


but i still want to be able to launch dvi preview by view->dvi or view->postscript (or by issuing c-d and c-t command).


all installation paths to lyx, xdvi, gv are defaults and they are callable
from the shell window.


maybe i should change the viewer from "gv" to "/sw/bin/gv"?

It sounds like the viewer is misconfigured. If you want to use gv, you'll need to have X11 running *before* you try view->dvi or view->postscript; otherwise nothing will appear to happen.


But why use gv? There are Mac OS X native applications that allow you to view ps and dvi files. (One I've just discovered is TeXniscope, though I haven't yet had the time to figure out how to get reverse dvi searches to work on it.) Perhaps the best solution is to specify "open" in the viewer, and then the Mac will use the default application to open files of the relevant type. So you can designate (through the Finder's Get Info dialog), say, TeXniscope as the default app for .ps and .dvi documents, and LyX's output will be directed there. (If you do this and later decide to change your default .dvi viewer to TeXShop, say, you won't have to change any preference setting in LyX: view->dvi will open the file automatically in TeXShop.)

Bennett




Reply via email to