Difference between revisions of "ConTeXt Standalone"
m (moved ConTeXt Minimals to ConTeXt Standalone) |
(minimals -> standalone) |
||
Line 1: | Line 1: | ||
− | < [[Installation]] | [[ConTeXt | + | < [[Installation]] | [[ConTeXt Standalone/FAQ|Standalone/FAQ]] | '''[[ConTeXt Standalone/Tree|Standalone/Tree]]''' | [[ConTeXt Standalone/Structure|Standalone/Structure]] | [[ConTeXt Standalone/Implementation|Standalone/Implementation]] | [[ConTeXt Standalone/TODO|Standalone/TODO]] | [[ConTeXt Standalone/Contents|Standalone/Contents]] | [[ConTeXt Standalone/TeX Live|Standalone/TeX Live]] > |
− | The '''ConTeXt | + | The '''ConTeXt Standalone''' is a complete, up-to-date ConTeXt distribution which can be upgraded efficiently. It can be used to install either the stable or the beta version of ConTeXt. It can also be used in parallel with existing TeX installations such as MikTeX, TeXLive, or older minimal installation. It is aimed towards ConTeXt users, so it does not include LaTeX specific packages and binaries. |
− | {{Note | ConTeXt develops at a fast pace, and sometimes beta releases have serious bugs. ConTeXt | + | {{Note | ConTeXt develops at a fast pace, and sometimes beta releases have serious bugs. ConTeXt standalone allows you to test the latest ConTeXt release without having to worry if an upgrade will mess an critical project. You can have two (or multiple) parallel ConTeXt Standalones, and freeze one for your critical projects, and use the other one for experimenting.}} |
Line 94: | Line 94: | ||
== Dependencies == | == Dependencies == | ||
* [http://www.ruby-lang.org Ruby] 1.8 or newer (used for MKII) | * [http://www.ruby-lang.org Ruby] 1.8 or newer (used for MKII) | ||
− | * Rsync (The windows binary of rsync is distributed within the | + | * Rsync (The windows binary of rsync is distributed within the standalone) |
== Disc space required == | == Disc space required == | ||
− | ConTeXt macro files are small (less than 10MB), but the | + | ConTeXt macro files are small (less than 10MB), but the standalone comes with various free fonts which considerably increase the size of the distribution to around 200MB). |
== Installation tree == | == Installation tree == | ||
Line 121: | Line 121: | ||
This takes a long time, so go have a coffee. | This takes a long time, so go have a coffee. | ||
− | By default, the | + | By default, the standalone installs ConTeXt beta. If you want the stable version of ConTeXt, you can use |
sh ./first-setup.sh --context=current | sh ./first-setup.sh --context=current | ||
Line 132: | Line 132: | ||
* on MacOS X you can use <code>/Applications/ConTeXt</code> | * on MacOS X you can use <code>/Applications/ConTeXt</code> | ||
− | Note that, at present, while ''using'' MkIV, you need to have write permissions<ref>Actually, you only need write permission for <code>$TEXMFCACHE</code>.</ref> in the installation directory.<ref>This effectively means that only one user will be able to generate the formats</ref> So, if you are installing the | + | Note that, at present, while ''using'' MkIV, you need to have write permissions<ref>Actually, you only need write permission for <code>$TEXMFCACHE</code>.</ref> in the installation directory.<ref>This effectively means that only one user will be able to generate the formats</ref> So, if you are installing the standalone in <code>/opt/context</code> or <code>/Applications/ConTeXt</code>, run |
chown `whoami` -R /opt/context | chown `whoami` -R /opt/context | ||
Line 142: | Line 142: | ||
(<code>`whoami`</code> outputs your user name, you can type that directly, of course.) | (<code>`whoami`</code> outputs your user name, you can type that directly, of course.) | ||
− | In order to install the | + | In order to install the standalone, open a terminal, go to the installation directory and download [http://minimals.contextgarden.net/setup/first-setup.sh first-setup.sh]: |
$ rsync -av rsync://contextgarden.net/minimals/setup/first-setup.sh . | $ rsync -av rsync://contextgarden.net/minimals/setup/first-setup.sh . | ||
Line 152: | Line 152: | ||
This takes a long time, so go have a coffee. | This takes a long time, so go have a coffee. | ||
− | By default, the | + | By default, the standalone installs ConTeXt beta. If you want the stable version of ConTeXt, you can use |
sh ./first-setup.sh --context=current | sh ./first-setup.sh --context=current | ||
Line 192: | Line 192: | ||
== The funtoo way == | == The funtoo way == | ||
− | If you are using [http://funtoo.org funtoo] there are ebuilds that will make an installation as easy as installing any other package from portage. Take a look at the [[ConTeXt | + | If you are using [http://funtoo.org funtoo] there are ebuilds that will make an installation as easy as installing any other package from portage. Take a look at the [[ConTeXt Standalone Funtoo]] Howto. This might also work for [http://www.gentoo.org gentoo], but is untested right now. |
== Proxy settings == | == Proxy settings == | ||
Line 208: | Line 208: | ||
== Usage == | == Usage == | ||
− | ConTeXt | + | ConTeXt Standalone works in a non-interfering manner because it does not put anything in your <code>$PATH</code> and does not set any system variables. This in turn means that in order to use it, you need to do some initialization. An intialization script called <code>setuptex</code> is provided in <code>installation-dir/tex/</code>. |
If you run context from a terminal, source <code>setuptex</code> before running ConTeXt. This depends on the shell that you are using. | If you run context from a terminal, source <code>setuptex</code> before running ConTeXt. This depends on the shell that you are using. | ||
Line 226: | Line 226: | ||
== Exclusive usage == | == Exclusive usage == | ||
− | The above method means that you always have to type <code>source /installation-dir/tex/setuptex</code> in a terminal before you can use typeset. If you always use ConTeXt | + | The above method means that you always have to type <code>source /installation-dir/tex/setuptex</code> in a terminal before you can use typeset. If you always use ConTeXt standalone and never use LaTeX or plain TeX provided by another TeX distribution, you can add the above intialization line to the startup script of your shell. For bash, this means <code>$HOME/.bashrc</code>; for zsh, this means <code>$HOME/.zshrc</code>; for (t)csh, this means <code>$HOME/.cshrc</code> or <code>$HOME/.tcshrc</code>. Then, <code>setuptex</code> will always be sourced in your terminal. |
== Integrating with an editor == | == Integrating with an editor == | ||
Line 233: | Line 233: | ||
Depending on how your editor intializes, you may still need to source it in order to run ConTeXt directly from your editor, | Depending on how your editor intializes, you may still need to source it in order to run ConTeXt directly from your editor, | ||
− | In theory, it is sufficient to add <code>/installation-dir/tex/texmf-<platform>/bin</code> to your PATH in order to use the | + | In theory, it is sufficient to add <code>/installation-dir/tex/texmf-<platform>/bin</code> to your PATH in order to use the standalone. You can try to add this to the paths that your editor searches. |
− | For information about configuring [http://smultron.sourceforge.net/ Smultron] and [http://www.uoregon.edu/~koch/texshop/obtaining.html TeXShop] (which are popular TeX editors on Mac) see [[ConTeXt | + | For information about configuring [http://smultron.sourceforge.net/ Smultron] and [http://www.uoregon.edu/~koch/texshop/obtaining.html TeXShop] (which are popular TeX editors on Mac) see [[ConTeXt Standalone/Mac Installation]]. If you don't mind investing a bit of money (abt eur 50), [http://macromates.com/ TextMate] with (the not yet officially released) [[ConTeXt Bundle for TextMate]] is an easy-to-install option. |
== Updating == | == Updating == | ||
− | For updating the ConTeXt | + | For updating the ConTeXt standalone, |
first update <code>first-setup.sh</code>, then run it. You could | first update <code>first-setup.sh</code>, then run it. You could | ||
also create an alias or a little script “ctx-update” | also create an alias or a little script “ctx-update” | ||
Line 251: | Line 251: | ||
== Uninstalling == | == Uninstalling == | ||
− | ConTeXt | + | ConTeXt standalone does not touch anything outside its installation folder. So to uninstall it, you can simply remove the installation folder. |
== Remaking formats == | == Remaking formats == | ||
Line 276: | Line 276: | ||
= Installation and use on Windows = | = Installation and use on Windows = | ||
− | If you want to use ConTeXt | + | If you want to use ConTeXt standalone alongside MikTeX/TeXLive (needed if you also run LaTeX), follow the command-line installation method. Otherwise, you can follow either the command line or GUI installation method. |
== Installation == | == Installation == | ||
Line 287: | Line 287: | ||
This takes a long time, so go have a coffee. | This takes a long time, so go have a coffee. | ||
− | By default, the | + | By default, the standalone installs ConTeXt beta. If you want the stable version of ConTeXt, you can use |
first-setup.bat --context=current | first-setup.bat --context=current | ||
Line 319: | Line 319: | ||
installation-dir\tex\setuptex.bat | installation-dir\tex\setuptex.bat | ||
− | on cmd.exe before you run ConTeXt. To avoid always having to type this, you can create a shortcut to cmd.exe and edit the command line to read (assuming you installed the | + | on cmd.exe before you run ConTeXt. To avoid always having to type this, you can create a shortcut to cmd.exe and edit the command line to read (assuming you installed the standalone in <code>C:\Programs</code>; otherwise replace <code>C:\Programs\</code> with your installation directory) |
C:\WINDOWS\System32\cmd.exe /k C:\Programs\context\tex\setuptex.bat | C:\WINDOWS\System32\cmd.exe /k C:\Programs\context\tex\setuptex.bat | ||
Line 326: | Line 326: | ||
=== Use ConTeXt with Cygwin === | === Use ConTeXt with Cygwin === | ||
− | After installing the ConTeXt | + | After installing the ConTeXt standalone, you can run it under Cygwin. With Cygwin, you may use gmake and other Unix tools for your automated workflow. |
# Run <code>setuptex.bat</code> in DOS command prompt | # Run <code>setuptex.bat</code> in DOS command prompt | ||
Line 334: | Line 334: | ||
== Updating == | == Updating == | ||
− | If you used the command line method, just run <code>first-setup.bat</code> again to update the | + | If you used the command line method, just run <code>first-setup.bat</code> again to update the standalone. If you have third party modules installed, you should use |
first-setup.bat --keep | first-setup.bat --keep | ||
− | to upgrade. See [[ | + | to upgrade. See [[ConTeXt_Standalone#Installing_third_party_modules| Installing third party modules]] for details. |
If you used the GUI installer, just run the installer again. | If you used the GUI installer, just run the installer again. | ||
Line 342: | Line 342: | ||
== Uninstallation == | == Uninstallation == | ||
− | If you used the command-line installer, you can just delete the installation directory to uninstall the | + | If you used the command-line installer, you can just delete the installation directory to uninstall the standalone. |
If you used the GUI installer, you can use standard windows tools for uninstallation. | If you used the GUI installer, you can use standard windows tools for uninstallation. | ||
Line 355: | Line 355: | ||
= Installing third party modules = | = Installing third party modules = | ||
− | The ConTeXt | + | The ConTeXt Standalone only comes with Taco's [[Bibliography|t-bib]] module. If you want to install [http://modules.contextgarden.net/ a new module], say Wolfgang's [[Letter|t-letter]] module, you can use |
first-setup.sh --extras="t-letter" | first-setup.sh --extras="t-letter" | ||
Line 382: | Line 382: | ||
[[Category:Installation]] | [[Category:Installation]] | ||
− | [[Category: | + | [[Category:Standalone]] |
Revision as of 07:56, 28 July 2011
< Installation | Standalone/FAQ | Standalone/Tree | Standalone/Structure | Standalone/Implementation | Standalone/TODO | Standalone/Contents | Standalone/TeX Live >
The ConTeXt Standalone is a complete, up-to-date ConTeXt distribution which can be upgraded efficiently. It can be used to install either the stable or the beta version of ConTeXt. It can also be used in parallel with existing TeX installations such as MikTeX, TeXLive, or older minimal installation. It is aimed towards ConTeXt users, so it does not include LaTeX specific packages and binaries.
NOTE: ConTeXt develops at a fast pace, and sometimes beta releases have serious bugs. ConTeXt standalone allows you to test the latest ConTeXt release without having to worry if an upgrade will mess an critical project. You can have two (or multiple) parallel ConTeXt Standalones, and freeze one for your critical projects, and use the other one for experimenting. |
General Information
Supported platforms
Platform | Short name | Binaries by | Notes |
---|---|---|---|
Windows | mswin | Akira Kakuto (W32TeX) | |
Linux | linux | Hans Hagen | compiled with glibc 2.3.6 |
Linux, 64-bit | linux-64 | Peter Münster | might be renamed to linux-amd64 |
Linux, PowerPC | linux-ppc | Piotr Kopszak | |
Mac OS X, Intel (32-bit) | osx-intel | Mojca Miklavec | |
Mac OS X, Intel (64-bit) | osx-64 | Mojca Miklavec | |
Mac OS X, PowerPC | osx-ppc | Mojca Miklavec | |
Mac OS X, Universal Binaries | osx-universal | Mojca Miklavec | not used |
FreeBSD | freebsd | Yue Wang, Diego Depaoli | might be renamed to freebsd-intel |
FreeBSD, 64-bit | freebsd-amd64 | Michael Krauß | |
kFreeBSD | kfreebsd-i386 | Alan Braslau | FreeBSD + glibc (Debian) |
kFreeBSD, 64-bit | kfreebsd-amd64 | Alan Braslau | FreeBSD + glibc (Debian) |
Solaris, Intel | solaris-intel | Marco Patzer | |
Solaris, Sparc | solaris-sparc | Vladimir Volovich | compiled on solaris 8, not maintaned |
We need volunteers for providing binaries for other platforms. If you want to support a platform, please write to ConTeXt Mailing Lists
Dependencies
- Ruby 1.8 or newer (used for MKII)
- Rsync (The windows binary of rsync is distributed within the standalone)
Disc space required
ConTeXt macro files are small (less than 10MB), but the standalone comes with various free fonts which considerably increase the size of the distribution to around 200MB).
Installation tree
Browse the installation tree
Unix-like platforms (Linux/MacOS X/FreeBSD/Solaris)
Single user installation
Select a folder where you want to install ConTeXt. We recommend that you can use your $HOME/context
directory. Create this folder. Then download
first-setup.sh and place it in $HOME/context
directory. Open a terminal, then:
cd context
Then make first-setup.sh
executable and run it to download the whole distribution and make formats:
chmod +x first-setup.sh sh ./first-setup.sh
This takes a long time, so go have a coffee.
By default, the standalone installs ConTeXt beta. If you want the stable version of ConTeXt, you can use
sh ./first-setup.sh --context=current
System-wide installation
A system wide installation is only recommeded for users who are comfortable with the command line. Only the location of installing ConTeXt is different for a system wide installation.
- on Linux you can use
/opt/context
- on MacOS X you can use
/Applications/ConTeXt
Note that, at present, while using MkIV, you need to have write permissions[1] in the installation directory.[2] So, if you are installing the standalone in /opt/context
or /Applications/ConTeXt
, run
chown whoami
-R /opt/context
or
chown whoami
-R /Applications/ConTeXt
(
outputs your user name, you can type that directly, of course.)
whoami
In order to install the standalone, open a terminal, go to the installation directory and download first-setup.sh:
$ rsync -av rsync://contextgarden.net/minimals/setup/first-setup.sh .
Then run that script to download the whole distribution and make formats:
sh ./first-setup.sh
This takes a long time, so go have a coffee.
By default, the standalone installs ConTeXt beta. If you want the stable version of ConTeXt, you can use
sh ./first-setup.sh --context=current
Cache
Normaly you do not want to allow access in e.g. /opt. but you like to allow it in /var/cache/*. So create the needed cache directory as a superuser via
mkdir /var/cache/context mkdir /var/cache/context/texmf-cache chmod 777 /var/cache/context/texmf-cache
Change in the file ./tex/texmf/web2c/texmfcnf.lua the value of TEXMFCACHE to the directory you want (in this example /var/cache/context/texmf-cache).
Font-Dir
Add the OSOFONTDIR into ./tex/setuptex. Go to under the line:
# TODO: we could set OSFONTDIR on Mac for example
and add there:
export OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts"
For more information: Fonts in LuaTeX
Arch Linux
There’s a PKGBUILD in the AUR, provided by Aditya [1]. Install it using your favorite AUR frontend, e.g.
yaourt -S context-minimals-git
This will get you a fresh, up-to-date Context tree in /opt/context-minimals.
The funtoo way
If you are using funtoo there are ebuilds that will make an installation as easy as installing any other package from portage. Take a look at the ConTeXt Standalone Funtoo Howto. This might also work for gentoo, but is untested right now.
Proxy settings
The installation script uses rsync
to fetch the required files. So, if you are behind a proxy server, you need to tell the details to rsync. The easiest way to set this is to set RSYNC_PROXY
variable in the terminal or your startup script (.bashrc
or the corresponding file for your shell). Replace username, password, proxyhost and proxyport with the correct information
export RSYNC_PROXY=username:password@proxyhost:proxyport
Sometimes, when behind a firewall, port 873 may be closed for outgoing TCP connections. If port 22 is open for ssh connections, a trick that can be used is to connect to a computer located somewhere outside of the firewall and to tunnel port 873 (using the program nc
).
export RSYNC_CONNECT_PROG='ssh tunnelhost nc %H 873'
where tunnelhost
is the machine outside of the firewall on which you have ssh
access. Of course, this machine must have nc
and port 873 open for outgoing TCP connections.
Usage
ConTeXt Standalone works in a non-interfering manner because it does not put anything in your $PATH
and does not set any system variables. This in turn means that in order to use it, you need to do some initialization. An intialization script called setuptex
is provided in installation-dir/tex/
.
If you run context from a terminal, source setuptex
before running ConTeXt. This depends on the shell that you are using.
- bash users can use
source /installation-dir/tex/setuptex
- zsh users can use
. /installation-dir/tex/setuptex
- (t)csh users can use
source /installation-dir/tex/setuptex.csh
If you do not know which shell you are using, open a terminal and type
echo $SHELL
Exclusive usage
The above method means that you always have to type source /installation-dir/tex/setuptex
in a terminal before you can use typeset. If you always use ConTeXt standalone and never use LaTeX or plain TeX provided by another TeX distribution, you can add the above intialization line to the startup script of your shell. For bash, this means $HOME/.bashrc
; for zsh, this means $HOME/.zshrc
; for (t)csh, this means $HOME/.cshrc
or $HOME/.tcshrc
. Then, setuptex
will always be sourced in your terminal.
Integrating with an editor
If you run ConTeXt from an editor, you need to source setuptex
in a terminal and then open your editor from the same terminal. I.e. if you run your editor from the shell.
Depending on how your editor intializes, you may still need to source it in order to run ConTeXt directly from your editor,
In theory, it is sufficient to add /installation-dir/tex/texmf-<platform>/bin
to your PATH in order to use the standalone. You can try to add this to the paths that your editor searches.
For information about configuring Smultron and TeXShop (which are popular TeX editors on Mac) see ConTeXt Standalone/Mac Installation. If you don't mind investing a bit of money (abt eur 50), TextMate with (the not yet officially released) ConTeXt Bundle for TextMate is an easy-to-install option.
Updating
For updating the ConTeXt standalone,
first update first-setup.sh
, then run it. You could
also create an alias or a little script “ctx-update”
with the following example contents:
cd /opt/context rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh . ./first-setup.sh --extras=all
Uninstalling
ConTeXt standalone does not touch anything outside its installation folder. So to uninstall it, you can simply remove the installation folder.
Remaking formats
Normally, the update script should create the formats for you. If for some reason you need to recreate the formats, you can do the following:
- For making MKII format.
mktexlsr texexec --make --all
- For making XeTeX format
mktexlsr texexec --make --xtx --all
- For making MKIV format
mtxrun --selfupdate mtxrun --generate luatools --generate context --make
Installation and use on Windows
If you want to use ConTeXt standalone alongside MikTeX/TeXLive (needed if you also run LaTeX), follow the command-line installation method. Otherwise, you can follow either the command line or GUI installation method.
Installation
Command line method
Download context-setup-mswin.zip and unzip to a directory where you want to install ConTeXt. It is recommended that you choose a directory that does not have a space in its full path. Then open cmd.exe
, go to the installation directory and run
first-setup.bat
This takes a long time, so go have a coffee.
By default, the standalone installs ConTeXt beta. If you want the stable version of ConTeXt, you can use
first-setup.bat --context=current
GUI Installer
There is also a GUI installer made by Vyatcheslav Yatskovsky. Download and run the installer and it will ask you where to install the minimals, which distribution to use (stable or beta) and whether or not you want to make formats.
NOTE: The GUI installer asks if you want to set environmental variables globally. Click this only if you do not use MikTeX or TeXLive and do not plan to use LaTeX |
You should also see the slides giving details about the GUI installer.
Proxy settings
The installation script uses rsync
to fetch the required files. So, if you are behind a proxy server, you need to tell the details to rsync. The easiest way to set this is to set RSYNC_PROXY
variable in the terminal as (replace username, password, proxyhost and proxyport with the correct information)
set RSYNC_PROXY=username:password@proxyhost:proxyport
or set the variable permanently as a Windows environment variable.
Sometimes, when behind a firewall, port 873 may be closed for outgoing TCP connections. If port 22 is open for ssh connections, a trick that can be used is to connect to a computer located somewhere outside of the firewall and to tunnel port 873 (using the program nc
).
export RSYNC_CONNECT_PROG='ssh tunnelhost nc %H 873'
where tunnelhost
is the machine outside of the firewall on which you have ssh
access. Of course, this machine must have nc
and port 873 open for outgoing TCP connections.
Usage
If you used the GUI installer and said yes to setting the evironmental variables globally, then you can run ConTeXt from anywhere. Otherwise, before running ConTeXt, you need to run setuptex.bat
which is provided in installation-dir\tex\
. This can be done by typing
installation-dir\tex\setuptex.bat
on cmd.exe before you run ConTeXt. To avoid always having to type this, you can create a shortcut to cmd.exe and edit the command line to read (assuming you installed the standalone in C:\Programs
; otherwise replace C:\Programs\
with your installation directory)
C:\WINDOWS\System32\cmd.exe /k C:\Programs\context\tex\setuptex.bat
This starts up a new command shell with the environment pre-loaded.
Use ConTeXt with Cygwin
After installing the ConTeXt standalone, you can run it under Cygwin. With Cygwin, you may use gmake and other Unix tools for your automated workflow.
- Run
setuptex.bat
in DOS command prompt - In the same DOS prompt, enter Cygwin by running
cygwin.bat
(in your Cygwin installation directory) - Under Cygwin prompt, run
context.cmd test.tex
. Note that the.cmd
extension is needed under Cygwin.
Updating
If you used the command line method, just run first-setup.bat
again to update the standalone. If you have third party modules installed, you should use
first-setup.bat --keep
to upgrade. See Installing third party modules for details.
If you used the GUI installer, just run the installer again.
Uninstallation
If you used the command-line installer, you can just delete the installation directory to uninstall the standalone.
If you used the GUI installer, you can use standard windows tools for uninstallation.
Troubleshooting
- rsync sometimes has problems with paths with uppercase letters (like
c:\Temp
orC:\Documents and Settings
). Installing into all-lowercase paths without spaces sometimes helps. - Directory-name length may also have an effect, due to Windows's 8.3 filename conventions. An indicator is if running "texexec --lua" on a file produces missing-file warnings containing Windows-created 8-character directory names, such as "C:\CONTEX~1\tex", where your ConTeXt directory is really "C:\context_minimals\tex". Be conservative and choose a short name like "C:\ctm\tex". Also, this may even work when an 8-character-or-less directory name like "C:\ctexmin\tex" doesn't.
- If you're behind firewall and rsync times out, you need to open port 873 for outgoing TCP connections.
Installing third party modules
The ConTeXt Standalone only comes with Taco's t-bib module. If you want to install a new module, say Wolfgang's t-letter module, you can use
first-setup.sh --extras="t-letter"
If you want to install more than one extra module, you can separate them by commas. So, to install the t-letter and t-mathsets module, do
sh ./first-setup.sh --extras="t-letter,t-mathsets"
If you want to install all extra modules at once, do
sh ./first-setup.sh --extras=all
Reverting to an older installation
If, for some reason, you want to revert to an older installation, you can do that by
sh ./first-setup.sh --context=date
where date
is the date of one of the stable releases of ConTeXt. The complete list of old releases that are available is here.
Moving the installation tree around (linux)
According to this post, http://archive.contextgarden.net/message/20101129.144331.d721372f.en.html it's safe to move the installation tree across directory or machines (say you don't have broadband access). You just have to clean and regenerate the cache (./tex/texmf-cache/luatex-cache) with mtxrun --generate