Difference between revisions of "Windows Installation"

From Wiki
Jump to navigation Jump to search
(incomplete step towards revision of the page that was completely messy (and still is); we need more nicely organized pages)
Line 1: Line 1:
In order to be able to run ConTeXt under Windows, you will need the following:
+
In order to be able to run ConTeXt under Windows, you will need:
* a stand-alone ConTeXt distribution or any other TeX distribution (such as MikTeX, TeX Live, ... )
+
* your favorite [[Text Editors|text editor]] and [[PDF Viewers|PDF viewer]]
* Perl, Ruby and GhostScript (Perl and Ruby are script languages, GS is a PostScript and PDF interpreter)
+
* a TeX distribution
* some [[Text Editors|Text Editor]]
+
** [[ConTeXt Minimals]]
* PDF viewer (Adobe Reader, GSview or any other)
+
** [[TeX Live]]
Optional:
+
** [[MikTeX]] ('''broken!!!''')
* [http://gnuwin32.sourceforge.net/packages/unzip.htm unzip]
+
* some scripting languages: ruby, perl, GhostScript
 
 
= General =
 
  
 
== Updating ==
 
== Updating ==
  
You have to bear in mind that ConTeXt is being developed reasonably fast (see [[Release Notes]]), so it's recommended to update it regulary. The standalone version of ConTeXt can be updated with
+
You have to bear in mind that ConTeXt is being developed reasonably fast (see [[Release Notes]]), so it's recommended to update it regulary. The command
 
  ctxtools --update
 
  ctxtools --update
But you need to <b>update [[cont-win.zip]]</b> every now and then as well.
+
used to work OK, but is '''no more recommended'''. All the three distributions mentioned here have their own way to update. We'll come back to that later (and move this section to a better place).
  
Under MikTeX you can update the packages with MikTeX's <i>update</i>.
+
= TeX Distributions =
  
== Older versions of Windows ==
+
You first need to choose a TeX distribution. Options are:
 +
* [[ConTeXt Minimals]]
 +
* [[TeX Live]]
 +
* [[MikTeX]] ('''broken''')
  
The stand-alone distribution only works for newer versions of Windows that have cmd.exe instead of command.com as command interpreter. Running it on Windows 98 (or earlier) is also possible, but needs some tweaking (hardcoding the paths in .bat script). If you really need that and can't make it work alone, try to ask Taco.
+
== ConTeXt Minimals ==
  
= Which ConTeXt distribution to choose? =
+
[[ConTeXt Minimals]] | http://minimals.contextgarden.net/
  
Note: You can use both MikTeX and the stand-alone distr. simultaneously.
+
* the official ConTeXt distribution
 +
* easy to keep up-to-date
 +
* includes (almost) everything that you need for ConTeXt
 +
* no LaTeX
 +
** if you don't need it, that's a rather small & convenient way to use ConTeXt
 +
** if you need it, you can have minimals installed parallel to [[TeX Live|TL]] or [[MikTeX]]
  
=== MikTeX ===
+
There are two ways to install it on Windows:
MikTeX is great tool for people typsetting in LaTeX. Updating the packages is easy and (font) <b>packages are downloaded automatically</b>. If you need the very latest version of ConTeXt, you might need to update it manually.
+
* use GUI intaller by Vyatcheslav [http://minimals.contextgarden.net/setup/context-installer/] (sets environmental variables globally)
 +
* install from command-line (TODO: instructions)
  
It comes with [[XeTeX]] since version 2.7, but [[LuaTeX]] is not available yet.
+
== TeX Live ==
  
=== Stand-alone ConTeXt ===
+
[[TeX Live]] 2008 | http://www.tug.org/texlive/
The stand-alone ConTeXt can always be kept up-to-date, it includes LuaTeX, the environment is set up "properly" and some special functionality that doesn't work in MikTeX should work here as expected.
 
  
If you don't need LaTeX, this might be the perfect solution. If you also need LaTeX, the stand-alone doesn't interfere with MikTeX (or other distributions), so you can use both.
+
* reference distribution for (La)TeX for all platforms
 +
* released once per year and sent to members of TeX user groups on DVDs
 +
* used to be gigantic; but since 2008 one can install separate packages and update them
 +
* binaries are compatible with Minimals
 +
* ConTeXt is outdated
 +
** but it's possible to update it manually
 +
** new ConTeXt update mechanism is being prepared
  
=== TeX Live, W32TeX ===
+
''Another distribution worth mentioning is [http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html W32TeX] that came to our attention when Akira (its author) was the first one to manage to compile [[XeTeX]] for Windows, and still provides the very latest Windows binaries for [[XeTeX]], [[LuaTeX]], [[pdfTeX]], [[MetaPost]], ... Distribution is a bit specific, but his binaries are great - compatible with [[TeX Live]] and used in [[Minimals]].''
TeX Live is released once per year and sent to members of TeX user groups on DVDs. Its package management is modest and still in development, and it's not updated between releases.
 
  
W32TeX [http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html W32TeX] came to our attention since Akira (its author) was the first one to manage to compile [[XeTeX]] for Windows, and still provides the very latest Windows binaries for [[XeTeX]], [[LuaTeX]], [[pdfTeX]], [[MetaPost]], ... all of them being compatible with TeX Live.
+
== MikTeX (broken) ==
  
The stand-alone ConTeXt distribution takes files & binaries from both of them, but as a distribution, MikTeX or stand-alone ConTeXt might be a better choice.
+
[[MikTeX]] 2.7 | http://www.miktex.org
  
= Installation =
+
* great tool for people typsetting in LaTeX
 +
* updating packages is easy, (font) <b>packages are downloaded automatically</b>
 +
* very user friendly
 +
* ConTeXt is often outdated, but currently '''broken'''
 +
** (it's possible to do some tweaking to make it work)
 +
* no [[LuaTeX]] available yet
 +
* binaries incompatible with Minimals and [[TeX Live]]
  
== Stand-alone ConTeXt distribution ==
+
See also
 +
* http://www.tug.org/protext/: MikTeX-based distribution, includes TeXnicCenter, GhostScript and WinEdt
  
* http://www.pragma-ade.com/download-1.htm
+
= Text Editor =
  
===Installation Instructions===
+
See also [[Text Editors]].
  
{{todo|I made an example how to use the stand-alone distr. isolated from an existing distro. I would like to "join" this somehow with the first section and move opening of <code>cdemo.bat</code> to something like <b>testing the installation</b>. Perhaps <tt>pragmatex.bat</tt> can be executed with autorun or something if one is not using another TeX distribution.}}
+
== For newbies (like Word (ex)users) ==
  
''by Ville Voipio on the mailing list, 2006-01-19'' (modified)
+
* '''[http://scintilla.sourceforge.net/SciTE.html SciTE]''': nicely integrated with Minimals; support written by Hans Hagen ConTeXt commands.
 +
* '''Notepad++'''
 +
* '''[http://www.winedt.com WinEdt]''': rich graphical user-interface, but more support for LaTeX than for ConTeXt
 +
* '''[http://www.textpad.com/ Textpad]'''
 +
* '''[http://www.toolscenter.org TeXnicCenter]'''
  
Here is a step by step of how it should go (i.e. what I did with success):
+
== For gurus (like (La)TeX users or programmers) ==
  
# Install [[Windows Installation#Installing Perl and Ruby|Perl and Ruby]]
+
These may be a good choice if you're willing to invest some time into learning them (may be worth the effort):
# Download [http://www.pragma-ade.com/context/install/mswincontext.zip mswincontext.zip], unzip it and move/rename the <code>isoimage</code> folder to your favourite destination. The instructions to follow assume that you renamed <code>isoimage</code> to <pre>c:\Programs\context</pre> There should be one folder (<code>usr</code>) and a few files in it.
+
* [[Vim]]
# Open the folder <code>c:\Programs\context</code> and double-click <code>cdemo.bat</code>.
+
* [http://www.emacswiki.org/cgi-bin/wiki Emacs]  
# Now you should see the editor SciTE open with a few files. Press F7 to compile one of the files.
 
If everything goes smoothly, you are done. If not, read these instructions again carefully. If you cannot get it work, mail the list.
 
  
{{todo|review these steps: join the information - notes about ruby, Acrobat, ... apply to all windows distributions.}}
+
== Compiling ==
  
A few notes on the procedure above:
+
After you've done all that, you can finally use your favourite editor to write your [[First Document|first document]].
* It is up to you to choose the location where you unzip the file in step #2, no magic there. Just that you know where the files are.
 
* The actual location of the ConTeXt tree in step #2 does not matter. I use <tt>c:\context</tt>, but you might use something else. However, I would not use anything with a space in the name (e.g. <tt>c:\Program Files\context</tt>), as that may confuse things. [Seems to work with an August 2006 stand-alone distribution.]
 
* After you have verified everything works in step #3, you can toss <tt>cdemo.bat</tt> away and use <tt>cstart.bat</tt> to start everything. Make a link to it somewhere so that you can start the system by a shortcut or through the Start menu. ''Do not move the batch script anywhere,'' it has to be run in the root directory of the distribution (e.g. <tt>c:\Programs\context</tt>).
 
* Make sure you have something Acrobatish (any decent PDF viewer) installed, otherwise you won't see the results in step #4.
 
* A final note: to have it finally running you should build the formats first. To do so there is at least a way:
 
  
  (assuming C:\Programs\context)
+
To compile it, open the command line again (Start -> Run ... -> type '''cmd''' or '''command''') and run
  Start->Run->cmd
+
  texexec yourfilename
  cd C:\Programs\context
 
  cdemo.bat
 
 
 
  Then close the SciTe window but remain in the cmd.
 
 
 
Then, in one line:
 
C:\Programs\context\usr\local\context\tex\setuptex.bat C:\Programs\context\usr\local\context\tex
 
 
 
  texexec --make --all
 
 
 
Then, close the cmd, double-click in cdemo.bat
 
and voila !
 
 
 
* Another way to do it could be to type: texexec --make --all directly in SciTe console.
 
 
 
===How to use the stand-alone distr. if you have MikTeX/TeX Live installed===
 
 
 
# Create a file <code>pragmatex.bat</code> (the name doesn't really matter) with this content: <pre>C:\Programs\context\usr\local\context\tex\setuptex.bat C:\Programs\context\usr\local\context\tex</pre> and make sure that this file is visible by <code>PATH</code>.
 
# You can safely continue using your old TeX distribution (MikTeX, TeX Live, ...). If you want to invoke the stand-alone distribution, just execute <pre>pragmatex</pre> from the command-line and all the subsequent calls to <code>texexec</code> will use files from the stand-alone tree (you'll notice the difference in file names when running ConTeXt).
 
 
 
===Updating the installation===
 
 
 
{{todo|explain the best way for updating}}
 
 
 
== MikTeX or ProTeXt ==
 
 
 
* http://www.miktex.org/
 
* http://www.tug.org/protext/ (MikTeX-based distribution, includes TeXnicCenter, GhostScript and WinEdt)
 
 
 
MikTeX is probably the easiest and most recommended solution for newbies or for those who have already been using LaTeX and don't want to install anything else. MikTeX is very user-friendly, updating is very easy, missing fonts or third-party modules are installed automatically when you first use them.
 
 
 
However, some more experienced ConTeXt users may not always be happy with it:
 
* using fonts doesn't always work as expected (or at least different than in the stand-alone distribution)
 
* ConTeXt format is usually recent, but not always the latest (you can still update ConTeXt manually)
 
* [[LuaTeX]] doesn't work yet with it yet
 
 
 
=== After you install or change something: Refresh file name database & Rebuild Formats ===
 
 
 
{{todo:this needs to be updated, it's slightly different on more recent MikTeX}}
 
 
 
* ''MikTeX Options -> General -> Refresh FNDB''
 
* ''MikTeX Options -> General -> Update Formats''
 
 
 
''(Don't forget to run the '''MikTeX Update Wizard''' regularly!)''
 
 
 
If you have any problems running ConTeXt, check
 
* ''MikTeX Options -> Formats -> <code>cont-en</code> -> Edit''
 
 
 
The following should be set:
 
Compiler:        pdfetex
 
Input File Name:  cont-en.ini
 
Output File Name: [empty]
 
Preloaded Format: [empty]
 
Description:      [anything]
 
Exclude when updating: [unchecked]
 
 
 
After ''Apply''-ing and ''Build''-ing, ''Refresh'' & ''Update'' as described above. This is the MikTeX way for doing <code>texexec --make en</code>. The latter has no influence since MikTeX doesn't set any system variables and consequently ConTeXt doesn't know where to leave the created formats.
 
 
 
=== Additional settings (for those who use MetaFun) ===
 
 
 
Some default "security settings" (not really relevant for you unless you run it on a server) may cause you troubles, esp. when using [[MetaFun]]. Do the following:
 
* In <code>[MikTeX PATH]\tex\context\user\cont-sys.tex</code> uncomment the following lines:
 
<texcode>
 
\runMPgraphicstrue
 
\runMPTEXgraphicstrue
 
</texcode>
 
* In case the file doesn't exist yet, copy the file <code>cont-sys.rme</code> (in the same folder) to <code>cont-sys.tex</code> first. <code>cont-sys.rme</code> may change every now and then, so check for major changes from time to time and update your <code>cont-sys.tex</code> accordingly.
 
* Enable <code>write18</code> ''(see below)''
 
 
 
(<code>[MikTeX PATH]</code> and <code>[localtexmf PATH]</code> are chosen during the installation. If you don't know what they are, take a look at ''MikTeX Options -> Roots'')
 
 
 
I don't know why and when exactly this is needed ([[MPtoPDF]] may cause problems), but
 
set TEXSYSTEM=miktex
 
may help you solving some problems.
 
 
 
=== write18 ===
 
 
 
<code>write18</code> allows calling external programs from within TeX. It's not a good idea to have it enabled on a server, but for comfortable work with ConTeXt (for MetaFun or modules for R and gnuplot) you probably need it.
 
 
 
Each application now has it's own configuration file. To enable <code>write18</code> run
 
  initexmf --edit-config-file=miktex\config\pdfetex.ini
 
and put
 
EnableWrite18=t
 
into it. An alternative is to se the environment variable <code>MIKTEX_ENABLEWRITE18=t</code> (in early MikTeX 2.5 versions there was a bug and only MIKTEX_ENABLEWRITE188=t worked, but you should better upgrade your MikTeX to 2.6 or 2.7 anyway).
 
 
 
== W32TeX ==
 
  
* http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html
+
= PDF Viewer=
  
== TeX Live or XEmTeX ==
+
== Adobe Reader ==
  
* http://www.tug.org/texlive/
+
* you can get it [http://www.adobe.com/products/acrobat/readstep2.html here]
* https://xemtex.groups.foundry.supelec.fr/ (TeX Live-based distribution including Perl, Emacs and GhostScript)
 
  
[http://www.tug.org/texlive/doc/texlive-en/live.html#x1-200006 Installation instructions] are part of the documentation.
+
= Tools =
  
 +
Ruby is absolutely required (unless you plan to use [[MK IV]] exclusively), Perl and GS are highly recommended, the rest is optional.
  
== Notes about fontconfig (for XeTeX) ==
+
== Ruby and Perl ==
 
 
* To use fonts that are not installed on the system you should add something like this to <code>C:\Programs\context\usr\local\context\texmf\fonts\conf\fonts.conf</code> (adjust the path according to your settings):
 
<dir>c:/Programs/context/usr/local/context/texmf/fonts/opentype/public/lm</dir>
 
* For the first time and every time when you install a new font that you want to use with XeTeX, issue:
 
fc-cache -f -v
 
* To get a list of the available fonts use:
 
fc-list > list.txt
 
 
 
= Required and Useful Tools =
 
 
 
== Installing Perl and Ruby ==
 
  
 
* http://www.activestate.com/Products/ActivePerl/
 
* http://www.activestate.com/Products/ActivePerl/
 
* http://www.ruby-lang.org or http://rubyinstaller.rubyforge.org
 
* http://www.ruby-lang.org or http://rubyinstaller.rubyforge.org
  
You need the two scripting languages in other operating systems as well, but installing them under Windows may be a bit less intuitive for a newbie than under Linux.
+
You can download ActivePerl [http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl here] and Ruby [http://rubyinstaller.rubyforge.org/wiki/wiki.pl here] (automatic installation) or [http://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ here] (you need to extract files from zip and add ruby to PATH).
 
 
You can download ActivePerl [http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl here] and Ruby [http://rubyinstaller.rubyforge.org/wiki/wiki.pl here] or [http://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ here] (different one; might be better - you only need to extract files from zip).
 
  
After installing them (remember the folder where you've put them!) you have to check if both executables are included in the PATH. Open the command line (''Start'' -> ''Run'' ... -> type '''<code>cmd</code>''' or '''<code>command</code>''') and check if
+
After installing check if these work OK:
 
  perl --version
 
  perl --version
and
 
 
  ruby --version
 
  ruby --version
work OK.
 
 
If windows complains about ''"Command not found"'', go to the ''Control Panel'' -> ''System'' -> ''Advanced'' -> click on the ''"Environment variables"'' and choose '''path''' in ''"system variables"''. Type in the path (e.g. D\Program Files\Perl\bin\;) where the ruby and perl  *.exe files are installed. Generally, the installation is automatic. you may not need the above method.
 
 
''(Installing ruby is optional under Windows, but nevertheless recommended. Some scripts need ruby, although it may happen that you will never use those scripts.)''
 
 
 
  
== Installing GhostScript ==
+
== GhostScript ==
  
 
* http://www.cs.wisc.edu/~ghost/
 
* http://www.cs.wisc.edu/~ghost/
Line 214: Line 122:
 
== Other useful software ==
 
== Other useful software ==
  
Assuming that you already have Adobe Reader (if not, you can get it [http://www.adobe.com/products/acrobat/readstep2.html here]; you don't need it to compile your documents, but at least to see the results), there is still some software still worth mentioning.
+
There is still some software worth mentioning:
 
 
 
* [http://www.pstoedit.net/pstoedit/ PStoEdit] for Windows is only needed in order to be able to use some advanced features such as those mentioned in [[manual:mmakempy.pdf|METAPOST outlines]]
 
* [http://www.pstoedit.net/pstoedit/ PStoEdit] for Windows is only needed in order to be able to use some advanced features such as those mentioned in [[manual:mmakempy.pdf|METAPOST outlines]]
 +
* [http://gnuwin32.sourceforge.net/packages/unzip.htm unzip]
 
* [[LilyPond]]
 
* [[LilyPond]]
 
* [[Font Tools]]
 
* [[Font Tools]]
 
* ... ?
 
* ... ?
  
= Choosing a [[Text Editors|text editor]] & compiling =
+
= Special Notes =
 +
 
 +
== Older versions of Windows ==
 +
 
 +
The stand-alone distribution only works for newer versions of Windows that have cmd.exe instead of command.com as command interpreter. Running it on Windows 98 (or earlier) is also possible, but needs some tweaking (hardcoding the paths in .bat script). If you really need that and can't make it work alone, try to ask Taco.
 +
 
 +
== TODO - needs revision ==
  
== For newbies (like Word (ex)users) ==
+
===Installation Instructions===
 +
 
 +
{{todo|I made an example how to use the stand-alone distr. isolated from an existing distro. I would like to "join" this somehow with the first section and move opening of <code>cdemo.bat</code> to something like <b>testing the installation</b>. Perhaps <tt>pragmatex.bat</tt> can be executed with autorun or something if one is not using another TeX distribution.}}
 +
 
 +
''by Ville Voipio on the mailing list, 2006-01-19'' (modified)
 +
 
 +
Here is a step by step of how it should go (i.e. what I did with success):
  
{{todo|Explain the difference between GUI/text editor/compiler/PDF document; people often ask me: "ConTeXt - oh, you mean that program with a blue screen and colourful fonts?"}}
+
# Install [[Windows Installation#Installing Perl and Ruby|Perl and Ruby]]
 +
# Download [http://www.pragma-ade.com/context/install/mswincontext.zip mswincontext.zip], unzip it and move/rename the <code>isoimage</code> folder to your favourite destination. The instructions to follow assume that you renamed <code>isoimage</code> to <pre>c:\Programs\context</pre> There should be one folder (<code>usr</code>) and a few files in it.
 +
# Open the folder <code>c:\Programs\context</code> and double-click <code>cdemo.bat</code>.
 +
# Now you should see the editor SciTE open with a few files. Press F7 to compile one of the files.
 +
If everything goes smoothly, you are done. If not, read these instructions again carefully. If you cannot get it work, mail the list.
  
* '''[http://scintilla.sourceforge.net/SciTE.html SciTE]''' or '''[http://www.winedt.com WinEdt]''' or [http://www.textpad.com/ Textpad] or [http://www.toolscenter.org TeXnicCenter] may be a good choice for a newbie.
+
{{todo|review these steps: join the information - notes about ruby, Acrobat, ... apply to all windows distributions.}}
  
WinEdt has a rich graphical user-interface, but more support for LaTeX than for ConTeXt. ''(You need to install WinEdt AFTER the installtion of MikTeX, GhostScript and Adobe Reader for Windows.)''
+
A few notes on the procedure above:
 +
* It is up to you to choose the location where you unzip the file in step #2, no magic there. Just that you know where the files are.
 +
* The actual location of the ConTeXt tree in step #2 does not matter. I use <tt>c:\context</tt>, but you might use something else. However, I would not use anything with a space in the name (e.g. <tt>c:\Program Files\context</tt>), as that may confuse things. [Seems to work with an August 2006 stand-alone distribution.]
 +
* After you have verified everything works in step #3, you can toss <tt>cdemo.bat</tt> away and use <tt>cstart.bat</tt> to start everything. Make a link to it somewhere so that you can start the system by a shortcut or through the Start menu. ''Do not move the batch script anywhere,'' it has to be run in the root directory of the distribution (e.g. <tt>c:\Programs\context</tt>).
 +
* Make sure you have something Acrobatish (any decent PDF viewer) installed, otherwise you won't see the results in step #4.
 +
* A final note: to have it finally running you should build the formats first. To do so there is at least a way:
  
ConTeXt support for SciTE was written by Hans Hagen (the ConTeXt developer himself) and also includes recognition and auto-completion of most frequent ConTeXt commands.
+
  (assuming C:\Programs\context)
 +
  Start->Run->cmd
 +
  cd C:\Programs\context
 +
  cdemo.bat
  
According to their web-site: "TeXnicCenter is a feature rich integrated development environment (IDE) for developing LaTeX-documents on Microsoft Windows (Windows 9x/ME, NT/2000/XP) freely available under GPL."
+
  Then close the SciTe window but remain in the cmd.
It can also be used for processing ConTeXt documents.
 
  
{{todo|Someone should write how to install SciTE & ConTeXt support for it without installing the stand-alone ConTeXt.}}
+
Then, in one line:
 +
C:\Programs\context\usr\local\context\tex\setuptex.bat C:\Programs\context\usr\local\context\tex
  
=== For gurus (like (La)TeX users or programmers) ===
+
  texexec --make --all
  
You probably already have your favourite [[Text Editors|text editor]] (or at least you know what we're talking about) and you may skip this. If not, take a look at the [[Text Editors|text editor]] page to help you choose one.
+
Then, close the cmd, double-click in cdemo.bat
* [[Vim]] or [http://www.emacswiki.org/cgi-bin/wiki Emacs] may be a good choice if you're willing to invest some time into learning them - it may be worth the effort.
+
and voila !
  
== Compiling ==
+
* Another way to do it could be to type: texexec --make --all directly in SciTe console.
  
After you've done all that, you can finally use your favourite editor to write your [[First Document|first document]].
+
===How to use the stand-alone distr. if you have MikTeX/TeX Live installed===
  
To compile it, open the command line again (Start -> Run ... -> type '''cmd''' or '''command''') and run
+
# Create a file <code>pragmatex.bat</code> (the name doesn't really matter) with this content: <pre>C:\Programs\context\usr\local\context\tex\setuptex.bat C:\Programs\context\usr\local\context\tex</pre> and make sure that this file is visible by <code>PATH</code>.
texexec yourfilename
+
# You can safely continue using your old TeX distribution (MikTeX, TeX Live, ...). If you want to invoke the stand-alone distribution, just execute <pre>pragmatex</pre> from the command-line and all the subsequent calls to <code>texexec</code> will use files from the stand-alone tree (you'll notice the difference in file names when running ConTeXt).
  
Some text editors support automatic compiling:
 
* '''F7''' (= command Build in Tools menu) or '''Ctrl+1''' (= command Process TeX file in Tools menu) in '''SciTE'''
 
* ?? in WinEdt
 
* F?? in TeXnicCenter
 
* see [[Vim#Makefile|makefile]] for Vim
 
  
 
[[Category:Installation]]
 
[[Category:Installation]]

Revision as of 22:09, 1 October 2008

In order to be able to run ConTeXt under Windows, you will need:

Updating

You have to bear in mind that ConTeXt is being developed reasonably fast (see Release Notes), so it's recommended to update it regulary. The command

ctxtools --update

used to work OK, but is no more recommended. All the three distributions mentioned here have their own way to update. We'll come back to that later (and move this section to a better place).

TeX Distributions

You first need to choose a TeX distribution. Options are:

ConTeXt Minimals

ConTeXt Minimals | http://minimals.contextgarden.net/

  • the official ConTeXt distribution
  • easy to keep up-to-date
  • includes (almost) everything that you need for ConTeXt
  • no LaTeX
    • if you don't need it, that's a rather small & convenient way to use ConTeXt
    • if you need it, you can have minimals installed parallel to TL or MikTeX

There are two ways to install it on Windows:

  • use GUI intaller by Vyatcheslav [1] (sets environmental variables globally)
  • install from command-line (TODO: instructions)

TeX Live

TeX Live 2008 | http://www.tug.org/texlive/

  • reference distribution for (La)TeX for all platforms
  • released once per year and sent to members of TeX user groups on DVDs
  • used to be gigantic; but since 2008 one can install separate packages and update them
  • binaries are compatible with Minimals
  • ConTeXt is outdated
    • but it's possible to update it manually
    • new ConTeXt update mechanism is being prepared

Another distribution worth mentioning is W32TeX that came to our attention when Akira (its author) was the first one to manage to compile XeTeX for Windows, and still provides the very latest Windows binaries for XeTeX, LuaTeX, pdfTeX, MetaPost, ... Distribution is a bit specific, but his binaries are great - compatible with TeX Live and used in Minimals.

MikTeX (broken)

MikTeX 2.7 | http://www.miktex.org

  • great tool for people typsetting in LaTeX
  • updating packages is easy, (font) packages are downloaded automatically
  • very user friendly
  • ConTeXt is often outdated, but currently broken
    • (it's possible to do some tweaking to make it work)
  • no LuaTeX available yet
  • binaries incompatible with Minimals and TeX Live

See also

Text Editor

See also Text Editors.

For newbies (like Word (ex)users)

  • SciTE: nicely integrated with Minimals; support written by Hans Hagen ConTeXt commands.
  • Notepad++
  • WinEdt: rich graphical user-interface, but more support for LaTeX than for ConTeXt
  • Textpad
  • TeXnicCenter

For gurus (like (La)TeX users or programmers)

These may be a good choice if you're willing to invest some time into learning them (may be worth the effort):

Compiling

After you've done all that, you can finally use your favourite editor to write your first document.

To compile it, open the command line again (Start -> Run ... -> type cmd or command) and run

texexec yourfilename

PDF Viewer

Adobe Reader

Tools

Ruby is absolutely required (unless you plan to use MK IV exclusively), Perl and GS are highly recommended, the rest is optional.

Ruby and Perl

You can download ActivePerl here and Ruby here (automatic installation) or here (you need to extract files from zip and add ruby to PATH).

After installing check if these work OK:

perl --version
ruby --version

GhostScript

If you already worked with (La)TeX before, you probably already have it installed. Try

gswin32 --version

You have to download GhostScript (filename gs851w32.exe or a similar one) and preferrably GSview as well (gsv47w32.exe or similar). Be sure to include the executables (folder where gswin32.exe is located) into the PATH variable.

Other useful software

There is still some software worth mentioning:

Special Notes

Older versions of Windows

The stand-alone distribution only works for newer versions of Windows that have cmd.exe instead of command.com as command interpreter. Running it on Windows 98 (or earlier) is also possible, but needs some tweaking (hardcoding the paths in .bat script). If you really need that and can't make it work alone, try to ask Taco.

TODO - needs revision

Installation Instructions


TODO: I made an example how to use the stand-alone distr. isolated from an existing distro. I would like to "join" this somehow with the first section and move opening of cdemo.bat to something like testing the installation. Perhaps pragmatex.bat can be executed with autorun or something if one is not using another TeX distribution. (See: To-Do List)


by Ville Voipio on the mailing list, 2006-01-19 (modified)

Here is a step by step of how it should go (i.e. what I did with success):

  1. Install Perl and Ruby
  2. Download mswincontext.zip, unzip it and move/rename the isoimage folder to your favourite destination. The instructions to follow assume that you renamed isoimage to
    c:\Programs\context
    There should be one folder (usr) and a few files in it.
  3. Open the folder c:\Programs\context and double-click cdemo.bat.
  4. Now you should see the editor SciTE open with a few files. Press F7 to compile one of the files.

If everything goes smoothly, you are done. If not, read these instructions again carefully. If you cannot get it work, mail the list.


TODO: review these steps: join the information - notes about ruby, Acrobat, ... apply to all windows distributions. (See: To-Do List)


A few notes on the procedure above:

  • It is up to you to choose the location where you unzip the file in step #2, no magic there. Just that you know where the files are.
  • The actual location of the ConTeXt tree in step #2 does not matter. I use c:\context, but you might use something else. However, I would not use anything with a space in the name (e.g. c:\Program Files\context), as that may confuse things. [Seems to work with an August 2006 stand-alone distribution.]
  • After you have verified everything works in step #3, you can toss cdemo.bat away and use cstart.bat to start everything. Make a link to it somewhere so that you can start the system by a shortcut or through the Start menu. Do not move the batch script anywhere, it has to be run in the root directory of the distribution (e.g. c:\Programs\context).
  • Make sure you have something Acrobatish (any decent PDF viewer) installed, otherwise you won't see the results in step #4.
  • A final note: to have it finally running you should build the formats first. To do so there is at least a way:
 (assuming C:\Programs\context)
 Start->Run->cmd
 cd C:\Programs\context
 cdemo.bat
 Then close the SciTe window but remain in the cmd.
Then, in one line:
C:\Programs\context\usr\local\context\tex\setuptex.bat C:\Programs\context\usr\local\context\tex
 texexec --make --all
Then, close the cmd, double-click in cdemo.bat
and voila !
  • Another way to do it could be to type: texexec --make --all directly in SciTe console.

How to use the stand-alone distr. if you have MikTeX/TeX Live installed

  1. Create a file pragmatex.bat (the name doesn't really matter) with this content:
    C:\Programs\context\usr\local\context\tex\setuptex.bat C:\Programs\context\usr\local\context\tex
    and make sure that this file is visible by PATH.
  2. You can safely continue using your old TeX distribution (MikTeX, TeX Live, ...). If you want to invoke the stand-alone distribution, just execute
    pragmatex
    from the command-line and all the subsequent calls to texexec will use files from the stand-alone tree (you'll notice the difference in file names when running ConTeXt).