[OS X TeX] terminal and tex4ht

Peter Dyballa Peter_Dyballa at Web.DE
Mon Apr 17 18:04:49 EDT 2006


Am 17.04.2006 um 22:41 schrieb Thomas Rike:

> Is there someway for me to add another path for the terminal to  
> search?

For Fink you have two files prepared in /sw/bin: /sw/bin/init.csh  
and /sw/bin/init.sh. If your login shell (the command "echo $SHELL"  
will reveal this) is bash, you can invoke in Terminal

	. /sw/bin/init.sh

and if it's tcsh you can invoke in Terminal

	source /sw/bin/init.csh

and you are prepared to work with Fink's TeX. You need to have  
installed Fink's tex4ht package to use Fink's TeX with Fink's tex4ht.


To work with the TeX distribution from MacTeX you need to invoke in  
Terminal in case your login shell is bash:

	PATH=${PATH}:/usr/local/teTeX/bin/`uname -p`-apple-darwin-current

or in case your login shell is tcsh:

	set path=($path /usr/local/teTeX/bin/`uname -p`-apple-darwin-current)
	rehash


All these steps are transient and work only in that one Terminal  
session. To make the use of MacTeX's TeX distribution persistent you  
can invoke in Terminal:

	mkdir ~/.MacOSX
	defaults write ${HOME}/.MacOSX/environment "MANPATH" "/usr/share/ 
man:/usr/local/man:usr/local/teTeX/man"
	defaults write ${HOME}/.MacOSX/environment    "PATH"    "${HOME}/ 
bin:/usr/bin:/bin:/usr/local/bin:/usr/local/teTeX/bin/i386-apple- 
darwin-current"

The last command will only work correctly on your MacBookPro. To use  
Fink's TeX you will need to invoke the commands as mentioned before.  
To make use of the settings recorded in the file ${HOME}/.MacOSX/ 
environment.plist you will need to quit Terminal (with Cmd-Q) and  
launch it again.


Running i-Installer in "Configure Only" mode and checking CLI  
Activation chosen should make it change two files in /etc, a  
directory usually invisible in Finder. The two files are /etc/ 
csh.login and /etc/profile. You can check both with

	ls -l /etc/csh.login /etc/profile

and you should see something like:

	-rw-r--r--   1 root  wheel  870 17 Apr 12:10 /etc/csh.login
	-rw-r--r--   1 root  wheel  744 17 Apr 12:10 /etc/profile

The shell running in Terminal executes either of these files and  
"extends" this way the UNIX search path for programmes, just as  
described before, depending whether it's tcsh or bash. The file $ 
{HOME}/.MacOSX/environment.plist uses a more Mac-like way and  
establishes in Terminal a process environment from which the login  
shell running in it inherits the value for PATH or path.

To clean ${HOME}/.MacOSX/environment.plist just invoke:

	defaults delete ${HOME}/.MacOSX/environment MANPATH
	defaults delete ${HOME}/.MacOSX/environment    PATH


You don't need to log-out and and log-in again, but Terminal needs to  
be re-launched, which is *not* Cmd-N that only creates a new copy of  
what is already running. If i-Installer successfully enhanced the  
files /etc/csh.login and /etc/profile a new Terminal window already  
gets the new settings from them.

--
Greetings

   Pete

Make it simple, as simple as possible but no simpler. (Albert Einstein)


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list