Changes

Jump to navigation Jump to search
3,497 bytes added ,  11:32, 2 July 2020
< [[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 suite''' is a complete, up-to-date ConTeXt distribution which that 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 installationand so forth. It is aimed towards ConTeXt users, so it The suite does not include LaTeX specific packages and binaries.
Sometimes ConTeXt develops at a fast pace, and sometimes beta releases have serious bugsissues. The ConTeXt suite allows you to test the latest ConTeXt release without having to worry if an upgrade worrying whether upgrading will mess an corrupt a critical project. You can have two (or multiple) parallel Multiple ConTeXt suitessuite installations are possible. This allows, and freeze one for your critical projectsexample, a stable version and use a beta version to run in parallel on the other one for experimentingsame computer.
ConTeXt is also included in TeXlive. The ConTeXt suite is updated continuously, whereas ConTeXt in TeXlive is updated less often. In particular, <code>luatex</code> and <code>metapost</code> are under active development and their binaries are updated frequently. ConTeXt follows these developments, indeed often drives development. As the binaries included in the TeXlive distribution are only updated yearly, ConTeXt on TeXlive will necessarily be less current than the ConTeXt suite. (ConTeXt on TeXlive can be kept somewhat more current using the http://tlcontrib.metatex.org repository.) The ConTeXt suite is self-contained and can happily coexist alongside another installed TeX distribution.
{{TOClimit|limit=1}}
! Platform
! Short name
! Binaries by
! Notes
|- align="left" style="background-color:#EEEEEE;"
! Windows
| mswin
| Akira Kakuto (from [http://w32tex.org W32TeX])|- align="left"! Windows/CygWin| cygwin| same binaries as mswin|- align="left" style="background-color:#EEEEEE;"! Windows, 32 bit| win32| Alias for mswin
|- align="left"
! Windows, 64 bit| win64| |- align="left" style="background-color:#EEEEEE;"! Linux, 32-bit
| linux
| Hans Hagen, Mojca Miklavec, Alan Braslau| compiled with glibc 2.3.6Debian 8|- align="left" style="background-color:#EEEEEE;"
! Linux, 64-bit
| linux-64
| Peter Münster||- align="left"! Linux, PowerPC| linux-ppc| Piotr Kopszak|Debian 8
|- align="left" style="background-color:#EEEEEE;"
! Linux, Arm ARM (low end.)| linux-armelarm| Boris Veytsman| in progressRaspbian 8
|- align="left"
! Mac OS XLinux, Intel (32-bit)musl| osxlinuxmusl-intel| Richard Koch, Mojca Miklavec64|Alpine
|- align="left" style="background-color:#EEEEEE;"
! Mac OS X, Intel (64-bit)
| osx-64
| Richard Koch, Mojca Miklavec|Mac OS X 10.6
|- align="left"
! Mac OS XFreeBSD, PowerPC| osx32-ppcbit| Richard Koch, Mojca Miklavecfreebsd
|
|- align="left" style="background-color:#EEEEEE;"
! Mac OS XFreeBSD, Universal Binaries64-bit| osxfreebsd-universal| Richard Koch, Mojca Miklavecamd64
|
|- align="left"
! FreeBSDOpenBSD 6.4, 32-bit| freebsd| Alan Braslauopenbsd6.4
|
|- align="left" style="background-color:#EEEEEE;"
! FreeBSDOpenBSD 6.4, 64-bit| freebsdopenbsd6.4-amd64| Alan Braslau|
|- align="left"
! kFreeBSD| kfreebsdOpenBSD 6.5, 32-i386bit| Alan Braslauopenbsd6.5| FreeBSD + glibc (Debian)
|- align="left" style="background-color:#EEEEEE;"
! kFreeBSDOpenBSD 6.5, 64-bit| kfreebsdopenbsd6.5-amd64| Alan Braslau| FreeBSD + glibc (Debian)
|- align="left"
! Solaris, Intel
| solaris-intel
| Marco Patzer|Solaris 10 on [http://www.opencsw.org/about/ OpenCSW]
|- align="left" style="background-color:#EEEEEE;"
! Solaris, Sparc
| solaris-sparc
| Mojca Miklavec
| Solaris 10 on [http://www.opencsw.org/about/ OpenCSW]
|}
We need volunteers for providing * If you run into problems installing, check the available architectures in the minimal’s [http://minimals.contextgarden.net/setup/ setup folder]!* OpenBSD 6.4 binaries for other platforms. are compiled but are missing in the setup folder ATM (2019-07) If you want to support a new platform, please write to the [[ConTeXt Mailing Lists]]
== Dependencies ==
* [http://www.ruby-lang.org Ruby] 1.8 or newer (used for MKII)
* Rsync (The windows binary of rsync is distributed within the suite)
The following programs are not required for running ConTeXt, but their installation adds additional functionality.
* curl : for including remote content
* ghostscript : for converting PostScript images to PDF
* graphicmagick graphicsmagick (convert) : for converting GIF and TIFF images
* inkscape : for converting SVG and compressed SVG
* mupdf (mudraw) : for converting PDF to PNG (used for ePub covers)
* pstoedit : for converting PostScript to MetaPost outlines
* zint : for providing barcodes
* curl zip or 7zip : for including remote contentEPUB generation
== 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 "bleeding edge" and subject to development, 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 ==
== Installation tree ==* [[ConTeXt Standalone/FAQ|Standalone/FAQ]] * [[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]]* Browse the [http://minimals.contextgarden.net installation tree]
= Unix-like platforms (Linux/MacOS X/FreeBSD/Solaris) =
=== (MacOS X) Using the Command line: Terminal.app ===
 
If you do not what a command tool is, do not worry. It is simply a program in which commands are entered as text and then executed. The needed Terminal.app can be found in the Utilities-folder of the Applications-Folder.
 
Once you have started Terminal, all you have to do is enter a command and press the RETURN-key and the command will be executed.
== Single user installation ==
Select a folder where you want to install ConTeXt. We recommend that you can use your <code>$HOME/context</code> directory. Create this folder. Then download [http://minimals.contextgarden.net/setup/first-setup.sh first-setup.sh] and place it in <code>$HOME/context</code> directory. Open a terminal, then:...
execute (Linux/FreeBSD/Solaris):<pre> mkdir ~/context cd ~/context wget http://minimals.contextgarden.net/setup/first-setup.sh</pre>
Then make or (MacOS):<codepre> mkdir ~/context cd ~/context rsync -av rsync://contextgarden.net/minimals/setup/first-setup.sh.</codepre> executable and run it to download Since the whole distribution and make formats:Mac does not have `wget` pre-installed.
chmod +x Now run the `first-setup.sh` script:<pre> # Install the latest beta of ConTeXt # This takes a long time, so go have a coffee sh ./# Flags you can add to the first-setup.shcall: # --modules=all # Install all third-party modules # --context=latest # Install latest stable version # --engine=luatex # Install only MkIV, leave out MkII # # This shrinks the install from 270 MB to 200 MB
This takes a long time, so go have a coffee sh ./first-setup.sh --modules=all</pre>
By default, the suite installs ConTeXt beta. If you want the stable version of ConTeXt, you can use== System-wide installation ==
sh A system wide installation is '''only''' recommended for experienced users./firstYou will need administrator rights on the Mac as only administrators are allowed to install programs in the Applications folder, or root (sudo) privileges on other unix-setuplike systems.sh --context=current
By default, the suite does ''not'' install modules and other third party content. If * on Linux you want the modules (and have the bandwidth), can use <code>/opt/context</code>* on MacOS X you can use<code>/Applications/ConTeXt</code>
sh Note that, at present, while ''using'' MkIV, you need to have write permissions for the <code>$TEXMFCACHE</code> directory./first-setupThis effectively means that only one user will be able to generate the formats unless you set the group permissions appropriately.sh --modules=allFor example:
Installing mkiv only reduces the size of the installation (including all the modules) from about 270 to 200MB . Use* <code>CONTEXT_HOME=/opt/context</code>* <code>TEXMFCACHE=$CONTEXT_HOME/tex/texmf-cache</code>* <code>chmod -R g+w $TEXMFCACHE</code>
sh <pre> # Create the /opt/context directory -- change as appropriate or desired if you # want a different installation directory. cd /opt mkdir context cd context # Fetch the install script (use rsync on the mac, see above) 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=latest # Install latest stable version # --engine=luatex # Install only MkIV, leave out MkII # # This shrinks the install from 270 MB to 200 MB
== System sh ./first-setup.sh --wide installation =modules=all
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 # change ownership to real rather than effective id chown -R `id -r -u`:`id -r -g` .</pre>
* on Linux you can use <code>/opt/context</code>* on MacOS X you can use <code>/Applications/ConTeXt</code>===Cache===
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 To customize the installation cache directory.<ref>This effectively means that only one user will be able to generate the formats</ref> Soand other options, if you are installing see the suite in <code>/opt/context</code> or <code>/Applications/ConTeXt</code>, run[[Custom_Configuration|Custom Configuration]] page.
chown `whoami` -R /opt/context ===Font Directory===
or Add the OSFONTDIR into ./tex/setuptex. Go to under the line:
chown `whoami` -R /Applications/ConTeXt # TODO: we could set OSFONTDIR on Mac for example
(<code>`whoami`</code> outputs your user name, if you can type that directlydon't have the line above, go to the end of course.the file)and add there:
In order to install the suite, open a terminal, go to the installation directory and download [http: export OSFONTDIR="/usr/minimals.contextgarden.netlocal/share/setupfonts;$HOME/first-setup.sh first-setup.sh]:fonts"
$ rsync -av rsyncFor more information://contextgarden.net/minimals/setup/first-setup.sh .[[Fonts in LuaTeX]]
Then run that script to download the whole distribution and make formats: sh ./first-setup.sh== Apache webserver installation ==
This takes Another common use case is invoking ConTeXt from within a long timeweb application. Because web directories are often self-contained, so go have 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 coffeeConTeXt installation done using either the single-user or system-wide method listed above.
By defaultIn this case the solution is to install ConTeXt within the website tree, and ideally in the suite installs ConTeXt betapublic sub-tree. If you want The public sub-tree is commonly the home directory for the stable version of ConTeXt, you can useapplication and relative pathnames are resolved as if immediately below it.
sh ./firstFor example, in the case of the PHP web framework Laravel, ConTeXt can be installed alongside other assets in the <path-setup.sh to-document-root>/public/context=currentdirectory:
By default<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 suite does ''not'' install first-setup.sh call: # --modules and other =all # Install all third -party contentmodules # --context=latest # Install latest stable version # --engine=luatex # Install only MkIV, leave out MkII # # This shrinks the install from 270 MB to 200 MB  sh . If you want the /first-setup.sh --modules (and have the bandwidth), you can use=all</pre>
sh .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</first-setup.sh --modules=allcode> privileges or root access):
===Cache===<pre>$ cd <path-to-document-root>/public$ sudo chmod -R www-data:www-data context</pre>
Normaly Now as part of your application's invocation of ConTeXt, you do not want will need to allow access in eset up the shell environment.g. /opt. but you like This is easily done by creating a simple BASH shell script, also to allow it be installed in /var/cache/*. So create the needed cache directory as a superuser viapublic part of the document tree:
mkdir /var/cache/context<pre> mkdir /var/cache/context/texmf-cache chmod 777 /var #!/cacheusr/contextbin/texmf-cacheenv bash
Change # # proccontext.sh # # To be installed in the file ./tex/texmf/web2c/texmfcnf.lua the value of TEXMFCACHE <path-to the directory you want (in this example -document-root>/varpublic/cache/context/texmf-cache).bin
===Font Directory=== . <path-to-document-root>/public/context/tex/setuptex <path-to-document-root>/public/context/tex
Add the OSOFONTDIR into . cd tex/spool context $1 > /textmp/setuptexcontext_run. Go to under the line:log</pre>
# TODO: we could set OSFONTDIR on Mac for exampleHere 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 (if you don't have the line above, go to the end of the filein this case using PHP) and add there:
export OSFONTDIR<pre> $cmd ="bin/usr/local/share/fontsproccontext.sh $input_filename"; $HOMElast_line = system($cmd, $ret_val);</.fonts"pre>
For more information: [[Fonts And the output will once again be found in LuaTeX]]<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.
ConTeXt suite 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 === Terminal/Command line === To run context from a terminal, source <code>setuptex</code> like so:
source /installation-dir/tex/setuptex
=== 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 suite and '''never ''' use LaTeX or plain TeX provided by another TeX distribution, you can add the above intialization following line to the startup script of your shell. (For bash, this means the startup script is <code>$HOME/.bashrc</code>; for zsh, this means it is <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 == source /installation-dir/tex/setuptex
If you run ConTeXt from an editor, you need to source {{Then <code|>setuptex}} </code> will always be sourced in a terminal and then open your editor from the same terminal.
Depending on how your === Integrating with an editor initializes, you may still need to source {{code|setuptex}} in order to run ConTeXt directly from your editor. In theory, it is sufficient to add {{code|/installation-dir/tex/texmf-<platform>/bin}} to your {{code|$PATH}} in order to use the suite. You can try to add this to the paths that your editor searches.===
For information about configuring [http://smultronThe easiest way to run ConTeXt from an editor is to open a terminal, source {{code|setuptex}} in the terminal, and then open your editor '''from the same terminal'''.sourceforge.net Another option is to add {{code|/ Smultron] and [http:installation-dir/tex/www.uoregon.edutexmf-<platform>/~koch/texshop/obtainingbin}} to the {{code|$PATH}} that the editor searches.html TeXShop] (which are popular TeX editors The details vary depending on Mac) see [[ConTeXt Standalone/Mac Installation]]the editor. For a list of text editors with ConTeXt integration, see the article on See [[Text Editors|text editors]]for instructions on integrating ConTeXt with various editors.
== Updating ==
cd /opt/context
rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
sh ./first-setup.sh --modules=all</pre> To update retain currently-installed modules:<pre>sh ./first-setup.sh --keep
</pre>
* For making MKIV format
mtxrun --selfupdate
mtxrun --generate
luatools --generate
context --make
= Installation and use on Windows =
If you want to use ConTeXt suite alongside MikTeX/TeXLive (needed if you also run LaTeX), follow the command-line installation method.
=== Command line method ===
Download [http://minimals.contextgarden.net/setup/context-setup-mswin.zip context-setup-mswin.zip] or [http://minimals.contextgarden.net/setup/context-setup-win64.zip context-setup-win64.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 <code>cmd.exe</code>, go to the installation directory and run
first-setup.bat
By default, the suite installs ConTeXt beta. If you want the stable version of ConTeXt, you can use
first-setup.bat --context=currentlatest
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
If the above installation instructions don't seem to answer your questions, see page [[Windows_Installation:_ConTeXt_Suite_with_SciTe| Windows Installation: ConTeXt Suite with SciTe]] for more detailed information.
 
== Proxy settings ==
C:\WINDOWS\System32\cmd.exe /k C:\Programs\context\tex\setuptex.bat
This starts up a new command shell with the environment pre-loaded. Within the new shell you can just type <code>context</code> to run ConTeXt. E.g.  C:\> context --version to check that you are running the version you think you're running.
=== Use ConTeXt with Cygwin ===
== Updating ==
If you used the command line method, just run <code>first-setup.bat</code> again to update the suite. If you have third party modules installed, you should use first-setup.bat --keepto upgrade. See [[ConTeXt_Standalone#Installing_third_party_modules| Installing third party modules]] for details.
* 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.
* If you update luaTeX occasionally you may get something like
 
<code>engine mismatch (luv: This is LuaTeX, Version beta-<version>-<date1> (TeX Live 2013/dev)(rev <number1>) <> bin: This is LuaTeX, Version beta-<version>-<date1> (TeX Live 2012/W32TeX)(rev <number2>)), forcing remake</code>
 
In which case your format will be remade every time you compile a file. In /texmf-mswin make sure that luatex.exe and texlua.exe have the same date; then also delete luatex.dll. This usually solves the problem.
= Installing third party modules =
{{Installation navbox}}
{{Getting started navbox}}
[[Category:Installation]]
[[Category:Standalone]]

Navigation menu