Difference between revisions of "Mac Installation"

From Wiki
Jump to navigation Jump to search
(Major work over)
m (removed a not needed chmod line during installation of context)
Line 40: Line 40:
 
  cd $HOME/context
 
  cd $HOME/context
  
Now we have to make file first-setup.sh executable and run it to download the whole distribution and make formats:
+
Run first-setup.sh it to download the whole distribution and make formats:
 
    
 
    
  chmod +x first-setup.sh
 
 
   sh ./first-setup.sh
 
   sh ./first-setup.sh
  

Revision as of 12:07, 2 October 2013

< Installation | TeX Distributions >

MacTeX

The easiest way to install ConTeXt on Mac OSX is to use the the MacTeX distribution. MacTeX is a TeXlive distribution modified especially for use on Mac OSX. It will install every thing you need to run ConTeXt, TeX, LaTeX, Xe(La)TeX, along with the editors TeXShop and TeXworks, the TeX Live Utility for managing updates, and many other goodies.

As MacTeX is a TeXlive distribution all binaries are generally frozen for a year. If you wish to have a more current version or the latest beta version of ConTeXt you should consider, also installing the "ConTeXt Suite" often called "Standalone ConTeXt".

Installing MacTeX


Standalone ConTeXt

The "ConTeXt Suite" distribution is the recommended way to use ConTeXt on any OS. If you wish to use "ConTeXt Suite" from the command line you can use the Mac tutorial in the Mac section under ConTeXt Suite or

Use the tutorial that is more Mac centric with as little use of the command line (Terminal) as possible.


Single user installation

As "ConTeXt Suite" is self contained it is best and should be installed inside of a folder of its own. so decide where you want it to be installed. We recommend that you put it a folder called context inside your HOME folder:

  • right click on the following link: first-setup.sh
  • a dialog will come up several choices: choose "Download Linked File As…"
  • you are now presented with a standard save dialog. If you can not see the New Folder-button in the bottom left of the dialog hit the triangle next "first-setup.sh"
  • click on the folder selector just under the file name and select your HOME folder ( has a small house next to it)
  • click on the New Folder-button and enter context in the dialog that comes up and hit return. if you use a different folder remember it location you will need it later on.
  • click the Save-button or just hit return.

Now start the Terminal you will find it in the Utility-folder in the Applications-folder.

Switch to the folder created above:

cd $HOME/context

Run first-setup.sh it to download the whole distribution and make formats:

 sh ./first-setup.sh

This takes a long time, so go have a coffee.

When the installation process is finished you will see a message telling you that you have to initialize ConTeXt each time you want to run ConTeXt or to add the path to your PATH-variable of your shell. You can ignore this message if you are going to use TeXShop. Setting-up TeXShop is described below..


Alterantive ConTeXt Versions

By default, the suite installs ConTeXt beta. If you want the stable version of ConTeXt, you can use

sh ./first-setup.sh --context=current

By default, the suite does not install modules and other third party content. If you want the modules (and have the bandwidth), you can use

sh ./first-setup.sh --modules=all

Installing mkiv only reduces the size of the installation (including all the modules) from about 270 to 200MB . Use

sh ./first-setup.sh --modules=all --engine=luatex

Keeping ConTeXt Up-To-Date

ConTeXt is constantly being improved and expanded if you want to have the latest version of ConTeXt you will need to regularly update your installation this has to be done from within the Terminal.

Start the Terminal and switch to the folder where ConTeXt was installed:

cd $HOME/context

Download the installation script:

rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .

Install the latest version:

sh ./first-setup.sh --modules=all --engine=luatex

If you are using a different version then use the use the appropriate options for first-setup.sh!!


System-wide installation

A system wide installation is only recommended for experienced users. You will need administrator rights on the Mac as only administrators are allowed to install programs in the Applications folder.

Start the Terminal you will find it in the Utility-folder in the Applications-folder.

Switch to the Application folder:

cd /Applications

Create the folder for ConTeXt

mkdir context
 

Switch to the "ConTeXt" folder

cd context

Download the installation script

rsync -av rsync://contextgarden.net/minimals/setup/first-setup.sh .

Then run that script to download the whole distribution and make formats:

sudo sh ./first-setup.sh

You be prompted for you password. Enter your login password and hit return.

This takes a long time, so go have a coffee.

When the installation process is finished you will see a message telling you that you have to initialize ConTeXt each time you want to run ConTeXt or to add the path to your PATH-variable of your shell. You can ignore this message if you are going to use TeXShop. Setting-up TeXShop is described below..

By default only the beta version is installed, If you want a more stable version or third party content then look at the section Alterantive ConTeXt Versions above. All you need to do is add the option to the installation command in this section.


TeXshop and TeXworks

Typically, both editors work out of the box with MacTeX, but if you are using version earlier than those shipped with MacTeX 2011 (TeXShop 2.42) you need to configure engines for ConTeXt manually.

TeXshop

If you install "ConTeXt Suite" or want to use "TeXlive" in parallel with "ConTeXt Suite"s you have to create new engines for "TeXShop", so that you can run your versions of "ConTeXt" directly from within "TeXShop".

Setting TeXShop for Single User Installation

The engines for TeXShop are installed in your Library folder of your HOME folder. They are installed first when you start TexShop for the first time.

  • Start TeXShop. If TeXShop was installed with MacTeX you can find it in the folder TeX in your Application folder.
  • Make TeXshop use utf-8 as its standard encoding for files
Choose the TeXShop->Preferences Menue there look for Encoding
Click on the Popup-Menubar and choose UTF-8 
Close the Dialog window 
  • Start the Terminal you will find it in the Utility-folder in the Applications-folder
  • Open the standard MKIV engine for TeXShop enter
open -a TeXShop $HOME/Library/TeXShop/Engines/ConTeXt\ \(LuaTeX\).engine

This will open the file in TeXShop and switch to TeXShop

  • Save the engine with a new Name "ConTeXt (Standalone)":
 option click on the File menue 
 choose "Save As …"
 change (LuaTeX) in the Name field to (Standalone)
 hit return
 
  • change the set path line to:
set path= (/Users/username/context/tex/texmf-osx-64/bin  $path /usr/local/bin)
If you installed in a different location then change /Users/username/context/ to the location where you
installed ConTeXt standalone.
  • save the file again
use either the file menu or cmd-s

  • close the window
use either the file menu or cmd-w

You can know use your new engine by choosing it from the Pop-up Menu.

If you want other options or use MKII then create a new engine and change the line containing mtxrun.

In the manual for TeXShop you can find instructions for making your engine the the default engine or how to have TeXShop use your engine no matter which engine is set on a file by file basis.


TeXworks

If you install ConTeXt in your Applications Folder, you have to create a new engine.

Go to your preferences inside TeXworks.

In Typesetting Menu, in Processing tools, add a new engine. In Name, type what you want. In Program : /Applications/ConText/tex/texmf-osx-64/bin/texmfstart In Arguments :

*texexec as the first argument
*$fullname as the second argument
*$synctexoption as the third argument.

Skim (PDF viewer)

Unless you are using TeXshop or TeXworks with built-in viewers, the recommended PDF viewer with SyncTeX support and auto-refresh on Mac OS X is Skim.

More Links