Changes

Jump to navigation Jump to search
4,190 bytes added ,  00:20, 19 October 2016
added openbsd (coming soon)
{{Installation navbox}}
 
The '''ConTeXt suite''' is a complete, up-to-date ConTeXt distribution that can be upgraded efficiently. It can also be used in parallel with existing TeX installations such as MikTeX, TeXLive, and so forth. The suite does not include LaTeX packages and binaries.
| freebsd
| Alan Braslau
|compiled with libstdc++
|- align="left" style="background-color:#EEEEEE;"
! FreeBSD, 64-bit
| freebsd-amd64
| Alan Braslau
| compiled with libstdc++
|- align="left"
! kFreeBSD
| kfreebsd-i386
| Alan Braslau
| FreeBSD + glibc (Debian)*
|- align="left" style="background-color:#EEEEEE;"
! kFreeBSD, 64-bit
| kfreebsd-amd64
| Alan Braslau
| FreeBSD + glibc (Debian)*|- align="left"! OpenBSD| openbsd| Alan Braslau| coming soon|- align="left" style="background-color:#EEEEEE;"! OpenBSD, 64-bit| openbsd-amd64| Alan Braslau| coming soon
|- align="left"
! Solaris, Intel
| Solaris 10 on [http://www.opencsw.org/about/ OpenCSW]
|}
 
*Note: we have stopped distributing binaries for kfreebsd. However, this system is still supported, and natively-compiled binaries can be installed from the Debian distribution.
We need volunteers for providing binaries for other platforms. If you want to support a platform, please write to [[ConTeXt Mailing Lists]]
== Disc space required ==
ConTeXt macro files are small (less than 10MB), but the suite comes with various free fonts which considerably increase the size of the distribution to around 200MB).
 
== Multiple instances of the installation ==
Please note from the start that we recommend installing a complete ConTeXt installation for each project in a production environment. The installation tree is portable (see Moving the Installation Around, below) and can be located under the project's own directory. The advantage is to allow each project to use an instance of ConTeXt that is adapted to its coding and that only gets updated purposely. Since the ConTeXt Standalone is "bleading edge" and subject to developement, certain details in commands, syntax or rendering may evolve slightly. Having a vintage ConTeXt tree for each production project insures that one can come back years later and produce identical results.
 
So as not to get carried away under this approach, one can eventually group projects by vintage, period or season, according to cycles of productivity.
== Standalone ==
* on MacOS X you can use <code>/Applications/ConTeXt</code>
Note that, at present, while ''using'' MkIV, you need to have write permissions for the <code>$TEXMFCACHE</code> directory. This effectively means that only one user will be able to generate the formatsunless you set the group permissions appropriately.For example: * <code>CONTEXT_HOME=/opt/context</code>* <code>TEXMFCACHE=$CONTEXT_HOME/tex/texmf-cache</code>* <code>chmod -R g+w $TEXMFCACHE</code>
<pre>
mkdir context
# change ownership
chown `whoami`:`whoami` context
cd context
sh ./first-setup.sh --modules=all
# change ownership to real rather than effective id
chown -R `id -r -u`:`id -r -g` .
</pre>
For more information: [[Fonts in LuaTeX]]
 
== Apache webserver installation ==
 
Another common usecase is invoking ConTeXt from within a web application. Because web directories are often self-contained, and in the case of Apache under Ubuntu, ownership of the directory and its contents are assigned to a user and group without a login shell, e.g., <code>www-data:www-data</code> this prevents a web application from invoking a ConTeXt installation done using either the single-user or system-wide method listed above.
 
In this case the solution is to install ConTeXt within the website tree, and ideally in the public sub-tree. The public sub-tree is commonly the home directory for the application and relative pathnames are resolved as if immediately below it.
 
For example, in the case of the PHP web framework Laravel, ConTeXt can be installed alongside other assets in the <path-to-document-root>/public/context directory:
 
<pre>
cd <path-to-document-root>/public
mkdir context
cd context
wget http://minimals.contextgarden.net/setup/first-setup.sh
# Install the latest beta of ConTeXt
# This takes a long time, so go have a coffee
# Flags you can add to the first-setup.sh call:
# --modules=all # Install all third-party modules
# --context=current # Install latest stable version
# --engine=luatex # Install only MkIV, leave out MkII
# # This shrinks the install from 270 MB to 200 MB
 
sh ./first-setup.sh --modules=all
</pre>
 
Once installed, you need to ensure that the permissions are correct for Apache to be able to access it (you will either need <code>sudo</code> privileges or root access):
 
<pre>
$ cd <path-to-document-root>/public
$ sudo chmod -R www-data:www-data context
</pre>
 
Now as part of your application's invocation of ConTeXt, you will need to set up the shell environment. This is easily done by creating a simple BASH shell script, also to be installed in the public part of the document tree:
 
<pre>
#!/usr/bin/env bash
 
#
# proccontext.sh
#
# To be installed in <path-to-document-root>/public/bin
 
. <path-to-document-root>/public/context/tex/setuptex <path-to-document-root>/public/context/tex
 
cd tex/spool
context $1 > /tmp/context_run.log
</pre>
 
Here the dynamically generated ConTeXt source file is expected to be found in the <code><path-to-document-root>/tex/spool</code> directory.
 
Now within your application, you can invoke this shell script (in this case using PHP):
 
<pre>
$cmd = "bin/proccontext.sh $input_filename";
$last_line = system($cmd, $ret_val);
</pre>
 
And the output will once again be found in <code><path-to-document-root>/tex/spool</code>.
==Arch Linux==
There’s a [httphttps://aur.archlinux.org/packages.php?ID=30398 /context-minimals-git PKGBUILD] in
the AUR, provided by Aditya [https://github.com/adityam/context-pkgbuild].
Install it using your favorite AUR frontend, e.g.
<references/>
{{Installation navbox}}
{{Getting started navbox}}
[[Category:Installation]]
[[Category:Standalone]]
148

edits

Navigation menu