Difference between revisions of "ConTeXt Standalone"

From Wiki
Jump to navigation Jump to search
(→‎Installation: Cleaned up post-installation stuff)
Line 94: Line 94:
 
This takes a long time, so go have a coffee.
 
This takes a long time, so go have a coffee.
  
 +
By default, the minimals installs ConTeXt beta. If you want the stable version of ConTeXt, you can use
  
=== Usage: permanent ===
+
sh ./first-setup.sh --context=current
  
''(For those who mostly use ConTeXt and [almost] never LaTeX.)''
 
  
Put the following line to <code>~/.bash_profile</code> or <code>~/.bashrc</code>:
+
== Usage ==
source ~/context/tex/setuptex ~/context/tex
 
(t)csh users can use the variant:
 
source ~/context/tex/setuptex.csh
 
  
In theory it should already suffice to add <code>export PATH=~/context/tex/texmf-<platform>/bin:$PATH</code>.
+
ConTeXt minimals 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>.  
  
=== Usage: temporary ===
+
If you run context from a terminal, source <code>setuptex</code> before running ConTeXt. This depends on the shell that you are using.
  
''(For those who often use LaTeX, but need the latest ConTeXt every now and then.)''
+
* '''bash''' users can use
 +
  source /installation-dir/tex/setuptex
  
Just type
+
* '''zsh''' users can use
. ~/context/tex/setuptex ~/context/tex
+
  . /installation-dir/tex/setuptex
to switch from system-wide TeX distribution to the minimals inside current shell.
 
  
=== Updating ===
+
* '''(t)csh''' users can use
 +
  source /installation-dir/tex/setuptex.csh
  
For now just run <code>./first-setup.sh</code> again. This will change - the name is not most self-explanatory at the moment.
+
If you run ConTeXt from an editor, you need to source <code>setuptex</code> in a terminal and then open your editor from the same terminal.
In theory
 
mtxrun --script update
 
should work, but it has not been tested yet.
 
  
=== Uninstalling ===
+
== Exlusive usage ==
  
Just remove the folder (distribution did not touch anything else):
+
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 minimals and never use
rm -rf ~/context
+
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.
  
=== Remaking formats ===
+
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 minimals. You can try to add this to the paths that your editor searches.
 +
 
 +
== Updating ==
 +
 
 +
For updating the ConTeXt minimals, just run <code>first-setup.sh</code> again.
 +
 
 +
== Uninstalling ==
 +
 
 +
ConTeXt minimals 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
  
Thi is optional: only if you need to remake formats for some unexpected reason or use another interface (for example the German one):
 
 
  mktexlsr
 
  mktexlsr
  texexec --make --all en de
+
  texexec --make --xtx --all  
  texexec --make --xtx --all en de
+
 
 +
* For making MKIV format
 +
 
 +
  luatools --selfupdate
 +
mtxrun --selfupdate
 
  luatools --generate
 
  luatools --generate
  context --make en de
+
  context --make
  
 
= Installation and usage on Mac =
 
= Installation and usage on Mac =

Revision as of 00:42, 11 March 2009

< Installation | ConTeXt Minimals/Tree | ConTeXt Minimals/Structure | ConTeXt Minimals/Implementation | ConTeXt Minimals/TODO | ConTeXt Minimals/Contents >

The ConTeXt Minimal 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 installtions 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 minimals allow 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 minimals, and freeze one for your critical projects, and use the other one for experimenting.


General Information

Supported platforms

Platform short name Binarties from Notes
Windows mswin Akira Kakuto (W32TeX)
Linux linux contextgarden.net compiled with glibc 2.3.6
Linux, 64-bit linux-64 Peter Münster Should be renamed to linux-amd64
Linux, PowerPC linux-ppc Piotr Kopszak
Mac OS X, Intel osx-intel Mojca Miklavec
Mac OS X, PowerPC osx-ppc Mojca Miklavec
Mac OS X, Universal Binaries osx-universal Mojca Miklavec
FreeBSD freebsd Yue Wang, Diego Depaoli Should be renamed to freebsd-intel
FreeBSD, AMD64 freebsd-amd64 Michael Krauß
Solaris, Intel solaris-intel Michael Krauß
Solaris, Sparc solaris-sparc Vladimir Volovich compiled on solaris 8

We need volunteers for providing binaries for other platforms. If you want to support a platform, please write to ConTeXt Mailing Lists

Dependences

  • Ruby 1.8
  • Rsync (The windows binary of rsync are distributed with the minimals)

Disc space required

ConTeXt macro files are small (less than 10MB), but the minimals comes with various free fonts which considerable increase the size of the distribution to around 200MB).

Installation and use on Unix like platforms (Linux/FreeBSD/Solaris)

Installation

Select a folder where you want to install ConTeXt. For a single user installation, you can use your $HOME/context directory. For a multi-user installation, in Linux you can use /opt/code; in Mac you can use .... Note that, at present, while using MKIV, you need to have write permissions in the installation directory. In order to install the minimals, ownload first-setup.sh, and place it in your installation directory. Then open a terminal, go to the installation directory, and run

 sh ./first-setup.sh

This takes a long time, so go have a coffee.

By default, the minimals installs ConTeXt beta. If you want the stable version of ConTeXt, you can use

sh ./first-setup.sh --context=current


Usage

ConTeXt minimals 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 run ConTeXt from an editor, you need to source setuptex in a terminal and then open your editor from the same terminal.

Exlusive 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 minimals 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.

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 minimals. You can try to add this to the paths that your editor searches.

Updating

For updating the ConTeXt minimals, just run first-setup.sh again.

Uninstalling

ConTeXt minimals 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
luatools --selfupdate
mtxrun --selfupdate
luatools --generate
context --make

Installation and usage on Mac


TODO: Merge details from ConTeXt Minimals/Mac Installation (See: To-Do List)



Installation and usage on Windows

Installation: global & GUI

(For those who don't need MikTeX/TeX Live and prefer Graphical user interface.)

Download and run the GUI installer (made by Vyatcheslav Yatskovsky).

Slides from author's presentation can be downloaded here.

Use standard windows tool for uninstalling the application.

Installation: local & command-line

(For those who need MikTeX/TeX Live and are comfortable with command-line.)

Download and unzip context-setup-mswin.zip

Run first-setup.bat, go for a coffee.

Before being able to use ConTeXt you need to run setuptex.bat to initialize the environment. A simple way to do it is to create a file startcontext.bat (use any name) somewhere in PATH and put this line into it

C:\Programs\context\tex\setuptex.bat C:\Programs\context\tex

Then, you can type startcontext into CMD whenever you want to use ConTeXt Minimals instead of MikTeX.

Another method is to create a shortcut to cmd.exe and edit the command line to read

C:\WINDOWS\System32\cmd.exe /k C:\Programs\context\tex\setuptex.bat C:\Programs\context\tex

This starts up a new command shell with the environment pre-loaded.

For uninstalling just delete the folder with minimals.

Troubleshooting

  • rsync sometimes has problems with paths with uppercase letters (like c:\Temp or c:\Documents and Settings). Installing into all-lowercase paths without spaces sometimes helps.
  • If you're behind firewall and rsync times out you need to open port 873 for outgoing TCP connections.

Contents

The minimals contain:

  • ConTeXt: current, beta + some older releases
  • Fonts: most important TeX-aware ones
  • Binaries: latest version of pdfTeX, XeTeX, LuaTeX, Metapost
  • Formats (need to be generated by user) for
    • ConTeXt, mptopdf and plain TeX for pdfTeX/XeTeX/LuaTeX
    • metafun and plain for Metapost

See ConTeXt Minimals/Contents.

Configuration

What to install

  • --platform=name-of-platform (see supported platforms; default: the one we are working on)
  • --engines=list-of-engines (options: luatex, xetex, pdftex, all; default: all)
  • --context=version (options: current, beta, alpha, yyyy.mm.dd; default: beta)

What to do

  • --force (as opposed to --dryrun; do the real thing; this is needed) needs to be fixed
  • --update (update minimal tree)
  • --make (make formats and generate file databases)
  • --state (update tree using saved state) needs to be implemented/fixed
  • --keep (as apposed to --delete; don't delete unused or obsolete files) needs to be improved

Where to install

  • --texroot=path (installation path; default: tex)

Rsync Server

(currently there's only one anyway)

  • --server=repository-url (default: rsync://contextgarden.net)
  • --module=string (default: minimals)
  • --rsync=name-of-rsync-binary (default: rsync) Why do we need this?

See also ConTeXt Minimals/Implementation. Catergory:Minimals