Talk:Mac Installation

From Wiki
Revision as of 20:56, 6 February 2008 by Mojca Miklavec (talk | contribs) (check and [ BBEdit], add TextMate)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Obsolete instructions

The following text has been moved from the main page since it's supposed to be obsolete now (but perhaps some little portions might still be useful to some users).

Configuration of texmfstart

Versions of ConTeXt later than April 2006, use a new Ruby script (set up by Hans Hagen and Taco Hoekwater) called texmfstart.rb which has to be configured properly. Actually it is still possible to use the "old" script based on Perl, but for instance when one says

       texexec example.tex

in order to typeset the file example.tex, you'll see in the log file a warning like

       warning: use 'texmfstart texexec' instead

Since ConTeXt is developing very fast, it is likely that one day or another the "old" script would become orphan. (Recall that according to some theoretician physicists the velocity of ConTeXt development is a counter-example to the fact that the velocity of light is an upper limit for all velocities...). Since I (i.e. Otared K.) and many other Mac users had difficulties to do this (that is make texmfstart work), thanks to help and insights from Mojca M. and Taco H. I explain below how I did configure texmfstart on my machine. To be more precise, I should say that I have teTeX and ConTeXt installed (and updated quite often...) with Gerben Wierda's i-Installer. Actually in what follows nothing is specific to Mac OS X: it is very likely that on any Unix like system texmfstart can be configured in the same way. If you use TeXshop, then recent versions beginning with 2.10beta are set up in such a way that texmfstart is used. Therefore the following configuration procedures are only of interest for those who use the command line interface (CLI), or when one is willing to create XeConTeXt, that is a format using XeTeX and ConTeXt with a command like

        sudo texmfstart texexec --make --xtx en
  • We begin now the configuration procedure. In principle on your computer there is a directory (or folder...) named

if, as it is very likely, you have installed TeX in /usr/local. Otherwise with the command

         locate /teTeX/bin/

in a Terminal window find the directory teTeX/bin/. In this directory there should be a subdirectory named powerpc-apple-darwin7.9.0 or something like that (depending on the type of the processor you have). Go there with the command cd (change directory): for instance in my case I would say:

       cd powerpc-apple-darwin7.9.0

or even if you know already the path to this directory you can say

       cd  /usr/local/teTeX/bin/powerpc-apple-darwin7.9.0/
  • Find the path to the file "texmfstart.rb" (which has been installed during your TeX and ConTeXt installation): in the Terminal window type
        locate texmfstart.rb

It may happen that several such files exist. For instance on my system I have two "texmfstart.rb",


the second one is old, while the first one is recent and has been installed by Gerben Wierda's i-Installer. I assumed (remember we are using ConTeXt...) that the newer one is the right one...

  • In the Terminal window (while you are in the directory powerpc-apple-darwin7.9.0) type:
        sudo emacs texmfstart

and after giving an su (super user) password, in the editor's window type the following code (given by Taco H.), that is the two following lines:

       ruby /usr/local/teTeX/share/texmf.local/scripts/context/ruby/texmfstart.rb $@

This means that using the "shell sh" we create a new command executed with ruby (the last "$@" is a placeholder which is replaced by an argument when texmfstart is executed). Note that in the above code the path


should be replaced by whatever path you found for the file texmfstart.rb that you are going to use. Indeed you can create a file named texmfstart with any text editor, provided you manage to put (or copy) it in the above mentioned directory powerpc-apple-darwin7.9.0.

  • Save and exit emacs by typing [CTRL]-X [CTRL]-S and then [CTRL]-X [CTRL]-C
  • At this point we have created a script named texmfstart... Now we have to make it executable, so in the Terminal window (while you are in the

directory powerpc-apple-darwin7.9.0) type

          sudo chmod +x texmfstart

("chmod" stands for change mode, "+x" means add the executable bit to the file texmfstart).

  • Now if in any (other) Terminal window you type, for instance


           texmfstart --version

you should get the version of texmfstart and a series of example usage (more or less cryptic to the non specialist like me...).

  • If you go to a directory where you have a file named for instance example.tex, then you can typeset it with ConTeXt by saying:
           texmfstart texexec example.tex

and now you shouldn't have the "warning: use 'texmfstart texexec' instead". Indeed you can make several variation on the above command by giving it more "switches" and optional arguments. And you are done! (O.K., June 28, 2006)

Other method

I don't like the above method of fiddling with files in directories that you shouldn't touch. There's a much easier way:

Just add the following lines to your .profile:

alias texmfstart='ruby /usr/local/teTeX/share/texmf.local/scripts/context/ruby/texmfstart.rb'
alias texexec='texmfstart texexec'
alias texutil='texmfstart texutil'

This redirects calls for texmfstart, texecec and texutil to the real texmfstart script.

The path is the one of Gerben Wierda's iInstaller, perhaps you must adapt it.

Ah, "what is a .profile?" That's your Terminal configuration file, it lives in your home directory (/Users/yourname), but it's hidden (or maybe there's none yet). If you have TextWrangler (or BBedit) installed, you could edit it with

edit ~/.profile

and paste the above lines. Or use your other favorite editor...

Beware: This will work only if you call your commands in Terminal (i.e. on the shell), probably not in TeXshop or the like.

--Hraban 10:13, 29 June 2006 (CEST)

MacOS 9 (Classic)

Unfortunately it's not possible to use ConTeXt on MacOS Classic. You can get as far as creating the ConTeXt formats with one of the Classical Distributions, but ConTeXt's Perl scripts won't work with MacPerl (I tried hard...). Perhaps the problems could be solved, but who'll put a lot of effort in a deprecated system?

So everything else on this page refers to MacOS X.