Changes

Jump to navigation Jump to search
2,981 bytes added ,  08:38, 4 September 2018
no edit summary
< [[{{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]] >navbox}}
The '''ConTeXt Standalonesuite''' 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.
{{Note | Sometimes ConTeXt develops at a fast pace, and sometimes beta releases have serious bugsissues. The ConTeXt standalone 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 Standalonessuite 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 Standalone distribution 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 Standalone distributionsuite. (The ConTeXt on TeXlive suite is self-contained and can be kept somewhat more current using the http://tlcontrib.metatex.org repositoryhappily coexist alongside another installed TeX distribution.)
{{TOClimit|limit=1}}
! Windows
| mswin
| Akira Kakuto ([http://w32tex.org W32TeX])
|
|- align="left"
! Linux
| linux
| Hans Hagen, Mojca Miklavec, Alan Braslau
| compiled with glibc 2.3.6
|- align="left" style="background-color:#EEEEEE;"
! Linux, 64-bit
| linux-64
| Peter MünsterAlan Braslau| might be renamed to linux-amd64
|- align="left"
! Linux, PowerPC
|
|- align="left" style="background-color:#EEEEEE;"
! Linux, Arm (low end.)
| linux-armel
| Boris Veytsman
| in progress
|- align="left"
! Mac OS X, Intel (32-bit)
| osx-intel
| Richard Koch, Mojca Miklavec
|
|- align="left" style="background-color:#EEEEEE;"
! Mac OS X, Intel (64-bit)
| osx-64
| Richard Koch, Mojca Miklavec
|
|- align="left" style="background-color:#EEEEEE;"
! Mac OS X, PowerPC
| osx-ppc
| Richard Koch, Mojca Miklavec
|
|- align="left"style="background-color:#EEEEEE;"
! Mac OS X, Universal Binaries
| osx-universal
| Richard Koch, Mojca Miklavec| not used|- align="left" style="background-color:#EEEEEE;"
! FreeBSD
| freebsd
| Yue Wang, Diego DepaoliAlan Braslau| might be renamed to freebsd-intelcompiled with libstdc++|- align="left" style="background-color:#EEEEEE;"
! FreeBSD, 64-bit
| freebsd-amd64
| Michael KraußAlan Braslau| compiled with libstdc++|- align="left" style="background-color:#EEEEEE;"
! 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-intel
| Marco Patzer
|
|- align="left" style="background-color:#EEEEEE;"
! Solaris, Sparc
| solaris-sparc
| Vladimir VolovichMojca Miklavec| compiled Solaris 10 on solaris 8, not maintaned[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]]
== Dependencies ==
* [http://www.ruby-lang.org Ruby] 1.8 or newer (used for MKII)
* Rsync (The windows binary of rsync is distributed within the standalonesuite)  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* 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* zip or 7zip : for EPUB generation
== Disc space required ==
ConTeXt macro files are small (less than 10MB), but the standalone 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 ==
== 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) =
For Mac installation see also [http://wiki.contextgarden.net/Mac_Installation Mac installation page].
== 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:
<pre> 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> == System-wide installation ==
Then make <code>first-setupA system wide installation is recommended for users who are comfortable with the command line.sh</code> executable and run it to download Only the whole distribution and make formats: chmod +x first-setup.sh sh ./first-setuplocation of installing ConTeXt is different for a system wide installation.sh
This takes a long time, so go have a coffee.* on Linux you can use <code>/opt/context</code>* on MacOS X you can use <code>/Applications/ConTeXt</code>
By defaultNote that, at present, while ''using'' MkIV, you need to have write permissions for the standalone installs ConTeXt beta<code>$TEXMFCACHE</code> directory. If This effectively means that only one user will be able to generate the formats unless you want set the stable version of ConTeXt, you can usegroup permissions appropriately. For example:
sh .* <code>CONTEXT_HOME=/opt/context</code>* <code>TEXMFCACHE=$CONTEXT_HOME/tex/firsttexmf-setup.sh cache</code>* <code>chmod --context=currentR g+w $TEXMFCACHE</code>
By default, <pre> # Create the standalone does ''not'' install modules and other third party content. If /opt/context directory -- change as appropriate or desired if you # want a different installation directory. cd /opt mkdir context cd context # Fetch the modules (and have install script wget http://minimals.contextgarden.net/setup/first-setup.sh # Install the bandwidth)latest beta of ConTeXt # This takes a long time, so go have a coffee # Flags you can useadd 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
== System # change ownership to real rather than effective id chown -wide installation ==R `id -r -u`:`id -r -g` .</pre>
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.===Cache===
* on Linux you can use <code>/opt/context</code>* on MacOS X you can use <code>/Applications/ConTeXt</code>To customize the cache directory and other options, see the [[Custom_Configuration|Custom Configuration]] page.
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===Font Directory===
chown `whoami` -R Add the OSFONTDIR into ./opttex/context setuptex. Go to under the line:
or # TODO: we could set OSFONTDIR on Mac for example
chown `whoami` -R /Applications/ConTeXt(if you don't have the line above, go to the end of the file) and add there:
(<code>`whoami`< export OSFONTDIR="/usr/local/share/fonts;$HOME/code> outputs your user name, you can type that directly, of course.)fonts"
In order to install the standalone, open a terminal, go to the installation directory and download For more information: [http://minimals.contextgarden.net/setup/first-setup.sh first-setup.sh[Fonts in LuaTeX]]:
$ rsync -av rsync://contextgarden.net/minimals/setup/first-setup.sh .== Apache webserver installation ==
Then run that script 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 download the whole distribution a user and make formatsgroup without a login shell, e.g., <code>www-data: sh .www-data</firstcode> this prevents a web application from invoking a ConTeXt installation done using either the single-user or system-setupwide method listed above.sh
This takes a long timeIn this case the solution is to install ConTeXt within the website tree, so go have a coffeeand 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.
By defaultFor example, in the standalone installs ConTeXt beta. If you want case of the stable version of PHP web framework Laravel, ConTeXt, you can usebe installed alongside other assets in the <path-to-document-root>/public/context directory:
sh <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
By default, the standalone does ''not'' install modules and other third party content sh ./first-setup. If you want the 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 . <path-Dir===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.
and add thereNow within your application, you can invoke this shell script (in this case using PHP):
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.
== Usage ==
ConTeXt Standalone 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> 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=== Exclusive usage ===
* If you always use ConTeXt suite and '''(t)cshnever''' users use LaTeX or plain TeX provided by another TeX distribution, you can use source add the following line to the startup script of your shell (For bash, the startup script is <code>$HOME/installation-dir.bashrc</texcode>; for zsh it is <code>HOME/setuptex.cshzshrc</code>).
If you do not know which shell you are using, open a terminal and type echo $SHELL source /installation-dir/tex/setuptex
== Exclusive usage ==Then <code>setuptex</code> will always be sourced in your terminal.
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 The 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'''. Another option is to add {{code|/installation-dir/tex/texmf-<platform>/bin}} to the {{code|$PATH}} that the editor searches. The details vary depending on the editor. See [[Text Editors]] for instructions on integrating ConTeXt with various editors.
If you run ConTeXt from an editor, you need to source <code>setuptex<For information about configuring [http://smultron.sourceforge.net/code> in a terminal Smultron] and then open your editor from the same terminal[http://www. Iuoregon.eedu/~koch/texshop/obtaining. if you run your editor from the shellhtml TeXShop] (which are popular TeX editors on Mac) see [[ConTeXt Standalone/Mac Installation]].
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 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 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 ==
For updating the ConTeXt standalonesuite,
first update <code>first-setup.sh</code>, then run it. You could
also create an alias or a little script “ctx-update”
cd /opt/context
rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
sh ./first-setup.sh --modules=all
</pre>
== Uninstalling ==
ConTeXt standalone suite does not touch anything outside its installation folder. So to uninstall it, you can simply remove the installation folder.
== Remaking formats ==
* For making MKIV format
mtxrun --selfupdate
mtxrun --generate
luatools --generate
context --make
= Installation and use on Windows =
If you want to use ConTeXt standalone suite 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 [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
This takes a long time, so go have a coffee.
By default, the standalone suite installs ConTeXt beta. If you want the stable version of ConTeXt, you can use
first-setup.bat --context=current
By default, the standalone suite does ''not'' install modules and other third party content. If you want the modules (and have the bandwidth), you can use
first-setup.bat --modules=all
=== GUI Installer ===
 
There is also a [http://minimals.contextgarden.net/setup/context-installer/ContextMinimalInstall.exe 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.
{{noteIf the above installation instructions don't seem to answer your questions, see page [[Windows_Installation:_ConTeXt_Suite_with_SciTe| The GUI installer asks if you want to set environmental variables globallyWindows Installation: ConTeXt Suite with SciTe]] for more detailed information. Click this only if you do '''not''' use MikTeX or TeXLive and do '''not''' plan to use LaTeX}}
You should also see the [http://meeting.contextgarden.net/2008/talks/2008-08-21-vyatcheslav-win-installer/windows_installer.pdf slides] giving details about the GUI installer.
== Proxy settings ==
== 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 Before running ConTeXt, you need to run <code>setuptex.bat</code> which is provided in <code>installation-dir\tex\</code>. 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 suite 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
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 ===
After installing the ConTeXt standalonesuite, 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
== Updating ==
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 --keepto upgrade. See [[ConTeXt_Standalone#Installing_third_party_modules| Installing third party modules]] for detailssuite.
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 uninstallationsuite.
* 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 =
The ConTeXt Standalone suite 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 --modules="t-letter"
= 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
<references/>
{{Getting started navbox}}
[[Category:Installation]]
[[Category:Standalone]]
4

edits

Navigation menu