Changes

Jump to navigation Jump to search
m
minimals -> standalone
< [[ConTeXt MinimalsStandalone]]
This page describes an '''alternative''' of installing [[ConTeXt MinimalsStandalone]] on Mac OS X. In particular it describes how to configure some GUI applications to work well with minimalsstandalone.
(It is '''enough''' to follow the steps described in [[ConTeXt MinimalsStandalone]]. Some instructions on this page may cause difficulties that are hard to overcome.)
==Mac newbie installation and configuration==
The following assumes that you want to use ConTeXt and you are a not inside UNIX world (otherwise, see before and after).
It guides you to install ConTeXt minimal standalone installation under Mac in the typical Applications folder. Then it gives you some information
about how to configure [http://smultron.sourceforge.net/ Smultron] and [http://www.uoregon.edu/~koch/texshop/obtaining.html TeXShop] to work as an editor for ConTeXt.
Smultron is a Mac-only, open source text editor which is very easy to use and at the same time powerful (see also [http://en.wikipedia.org/wiki/Smultron]).
===ConTeXt installation===
1. Create a folder inside the Applications folder (in the Finder, press Command-Shift-A, Command-Shift-N) and name it “ConTeXtMinimals”“ConTeXtStandalone”
(BEWARE: Installing in the Applications folder may cause permission problems!)
3. Type this:
<code> cd /Applications/ConTeXtMinimals ConTeXtStandalone </code>, which means “change directory to ConTeXtMinimals”ConTeXtStandalone”. Now you are working in the folder you have just created.
4. Type this:
This calls <code> rsync</code>, a program which goes to the contextgarden site (--> you must be connected to internet) and downloads the denoted file(s). To start, it simply downloads the little file <code> first-setup.sh</code>: this shell script contains a set of instructions which allow for automatic downloads (e.g., it selects the right files depending on which platform you are).
To get the rest of the ConTeXt minimalsstandalone, you have to execute this script by typing in Terminal
<code>./first-setup.sh</code>.
This will start the download and install process. Now (well, after a while) you have all the required files in the /Applications/ConTeXtMinimals ConTeXtStandalone folder.
===Configuring ConTeXT===
1. Open a text editor and create a file that has in it the following line:
<code>. /Applications/ConTeXtMinimalsConTeXtStandalone/tex/setuptex /Applications/ConTeXtMinimalsConTeXtStandalone/tex</code>.
Save this file as “.bash_profile” (see '''Where to put files''', below). (BEWARE: That might overwrite an existing .bash_profile!)
(There is a small utility for working with hidden files on the Mac called "Show/Hide Invisible Files": it is available at <code>http://www.macupdate.com/info.php/id/22318</code>.)You can find out more on [http://www.mac-how.net/ how to view hidden files on mac] on the official site of MacHow.
2. Create a new folder named “texmf-local” inside ConTeXtMinimalsConTeXtStandalone/tex.
3. Create another folder “web2c” inside this texmf-local folder.
4. Inside your ConTeXtMinimals ConTeXtStandalone folder, locate the file named <code>texmf.cnf</code> that is in tex/texmf/web2c. Copy this file to ConTeXtMinimalsConTeXtStandalone/tex/texmf-local/web2c. Open this new texmf.cnf file, find the line
TEXMFHOME = /nonexist
3. The resulting window allows you to define some commands which can be executed by Smultron. Substantially, this means that Smultron opens for you a Terminal, types the code you want and presses return.
4. Create a new command by pressing the "New Command" button and type a name (e.g. "minimalsTexexecstandaloneTexexec"). Then, write in the text field at the bottom:
<pre>
#!/bin/sh
cd /Applications/ConTeXtMinimalsConTeXtStandalone/ . /Applications/ConTeXtMinimalsConTeXtStandalone/tex/setuptex /Applications/ConTeXtMinimalsConTeXtStandalone/tex
cd %%d
texexec %%p
Now Smultron can do it for you.
5. Write your ConTeXt file with Smultron and save it. When you want to compile it, simply go under Tools-->Commands-->Other-->minimalsTexexecstandaloneTexexec. This will generate a pdf file in the same folder of your .tex file.
6. If you want to experiment with LuaTeX (ConTeXt MkIV) simply add another command (you can name it e.g. "minimalsLuastandaloneLua") with this text in its text field:
<pre>
#!/bin/sh
cd /Applications/ConTeXtMinimalsConTeXtStandalone/ . /Applications/ConTeXtMinimalsConTeXtStandalone/tex/setuptex /Applications/ConTeXtMinimalsConTeXtStandalone/tex
cd %%d
context %%p
7. If you want an automatic update of the pdf you are workin on you can use another mac app, [http://pdfview.sourceforge.net/ pdfview]. You have simply to install it, open your pdf file and choose the automatic update option. Every time you recompile form Smultron (or by another editor), it updates the displayed pdf
Here we are not using the famous TeXShop editor, because it is slightly more complicated, and typically you grab it bundled with a TeX distribution (like MacTeX), and opportunely configured. By using Smultron, we have created a completely autonomous and lightweight ConTeXTMinimals ConTeXTStandalone installation which can work aside MacTeX/TeXShop installation. More, by pdfview we have auto update, which is one of the very relevant feature of TeXShop (If you do not know about all this stuff, see [http://wiki.contextgarden.net/Mac_Installation Mac installation]
===TeXShop installation and configuration===
TeXShop is a popular TeX editor for Mac OS X.
1. To install it, download the disk image from <code>http://www.uoregon.edu/~koch/texshop/obtaining.html</code> and put this app in the Applications folder alongside your ConTeXTMinimals ConTeXTStandalone folder.
2. Launch TeXShop. It will automatically create the necessary support files.
<pre>
#!/bin/bash
export PATH=/Applications/ConTeXtMinimalsConTeXtStandalone/tex/texmf-osx-intel/bin:$PATH
texexec "$1"
</pre>
<pre>
#!/bin/bash
export PATH=/Applications/ConTeXtMinimalsConTeXtStandalone/tex/texmf-osx-intel/bin:$PATHexport TEXMFCACHE=/Applications/ConTeXtMinimalsConTeXtStandalone/tex/texmf-cache
context "$1"
</pre>
<pre>
#!/bin/bash
export PATH=/Applications/ConTeXtMinimalsConTeXtStandalone/tex/texmf-osx-intel/bin:$PATH
texexec --xtx "$1"
</pre>

Navigation menu