Difference between revisions of "Windows Installation"

From Wiki
Jump to navigation Jump to search
(→‎Installing Perl and Ruby: an alternative source for ruby installation under windows)
(installation instructions for standalone distribution by Ville Voipio; some more changes)
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 the following:
 
* a stand-alone ConTeXt distribution or any other TeX distribution (such as MikTeX, TeX Live, ... )
 
* a stand-alone ConTeXt distribution or any other TeX distribution (such as MikTeX, TeX Live, ... )
* Perl, Ruby and GhostScript
+
* Perl, Ruby and GhostScript (Perl and Ruby are script languages, GS is a PostScript and PDF interpreter)
* some text editor
+
* some [[Text editor]]
 
* PDF viewer (Adobe Reader, GSview or any other)
 
* PDF viewer (Adobe Reader, GSview or any other)
  
Line 14: Line 14:
  
 
Good reasons for choosing the stand-alone distribution are:
 
Good reasons for choosing the stand-alone distribution are:
* you don't need LaTeX
+
* if you don't need LaTeX
* you always want to have the very latest ConTeXt distribution
+
* if you always want to have the very latest ConTeXt distribution
 
* ''... write some more''
 
* ''... write some more''
  
{{todo|also installation instructions for stand-alone since it's not very intuitive; also explain how to choose which ConTeX to execute in case there is also MikTeX ot TeX Live installed; explain the best way for updating}}
+
===Installation Instructions===
 +
''by Ville Voipio on the mailing list, 2006-01-19''
  
== MikTeX ==
+
Here is a step by step of how it should go (i.e. what I did with success):
 +
 
 +
# Get Perl and install it. I use [http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl ActivePerl] (or [http://www.activestate.com/Products/ActivePerl/?mp=1])
 +
# Get Ruby and install it. I used [http://rubyinstaller.rubyforge.org Ruby Installer]. (see note below)
 +
# Check that Perl and Ruby work. Go to the command prompt (Start -> Run... "cmd") and execute the two commands: <texcode>ruby --version<br>perl --version</texcode>These should give some information on Ruby and Perl. It really does not matter what they say, as long as the interpreters are found.
 +
# Download [mswincontext.zip]
 +
# Unzip the contents under <tt>c:\temp</tt>. You should get <tt>c:\temp\isoimage</tt>. (see note below)
 +
# Create a new folder <tt>c:\context</tt>. (see note below)
 +
# Copy everything under c:\temp\isoimage into c:\context. There should be one folder (/usr) and a few files.
 +
# Open the folder <tt>c:\context</tt> and double-click <tt>cdemo.bat</tt>.
 +
# 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.
 +
 
 +
A few notes on the procedure above:
 +
 
 +
* Perl and Ruby per se have nothing to do with ConTeXt, ConTeXt just needs them. So, if you have another Perl and Ruby (e.g. through cygwin), they are fine as long as they are in the system path. If you can get through step #3 without doing #1 and #2, fine.
 +
* It is up to you to choose the location where you unzip the file in step #5, no magic there. Just that you know where the files are.
 +
* The actual location of the ConTeXt in step #6 tree 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. (Has anybody tried lately?)
 +
* After you have verified everything works in step #9, 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:\context</tt>).
 +
* Make sure you have something Acrobatish (any decent PDF viewer) installed, otherwise you won't see the results in step #9.
 +
 
 +
{{todo|explain how to choose which ConTeX to execute in case there is also MikTeX ot TeX Live installed; explain the best way for updating}}
 +
 
 +
== MikTeX or ProTeXt ==
  
 
* http://www.miktex.org/
 
* 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.
 
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.
Line 43: Line 68:
 
* ''MikTeX Options -> Roots -> [select one] -> Refresh FNDB''
 
* ''MikTeX Options -> Roots -> [select one] -> Refresh FNDB''
  
''(Don't forget to run the <b>MikTeX Update Wizard</b> regularly!)''
+
''(Don't forget to run the '''MikTeX Update Wizard''' regularly!)''
  
 
=== Additional settings ===
 
=== Additional settings ===
  
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:
+
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:
 
* In <code>[MikTeX PATH]\tex\context\user\cont-sys.tex</code> uncomment the following lines:
 
<texcode>
 
<texcode>
Line 64: Line 89:
 
may help you solving some problems.
 
may help you solving some problems.
  
== TeX Live ==
+
== TeX Live or XEmTeX ==
  
 
* http://www.tug.org/texlive/
 
* http://www.tug.org/texlive/
 +
* 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.
  
 
{{todo|can someone with any experience write something about it?}}
 
{{todo|can someone with any experience write something about it?}}
  
== XEmTeX ==
+
= Required and Useful Tools =
  
* https://xemtex.groups.foundry.supelec.fr/
+
== Installing Perl and Ruby ==
 
 
= Installing Perl and Ruby =
 
  
 
* http://www.activestate.com/Products/ActivePerl/
 
* http://www.activestate.com/Products/ActivePerl/
* http://www.ruby-lang.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 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.
Line 93: Line 119:
 
''(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 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 =
+
== Installing GhostScript ==
  
 
* http://www.cs.wisc.edu/~ghost/
 
* http://www.cs.wisc.edu/~ghost/
Line 103: Line 129:
 
You have to download GhostScript (filename '''<code>gs851w32.exe</code>''' or a similar one) and preferrably GSview as well ('''<code>gsv47w32.exe</code>''' or similar). Be sure to include the executables (folder where gswin32.exe is located) into the PATH variable.
 
You have to download GhostScript (filename '''<code>gs851w32.exe</code>''' or a similar one) and preferrably GSview as well ('''<code>gsv47w32.exe</code>''' or similar). Be sure to include the executables (folder where gswin32.exe is located) into the PATH variable.
  
= Choosing a text editor & compiling =
+
== Other useful software ==
  
== For newbies [like Word (ex)users] ==
+
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.
 +
 
 +
* [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]]
 +
* [[LilyPond]]
 +
* [[Font Tools]]
 +
* ... ?
  
{{todo|Explain the difference between GUI/text editor/compiler; people often ask me: "ConTeXt - oh, you mean that program with a blue screen and colourful fonts?"}}
+
= Choosing a [[Text editor]] & compiling =
  
* '''Scite''' or '''[http://www.winedt.com WinEdt]''' or Textpad may be a good choice for a newbie.
+
== For newbies (like Word (ex)users) ==
 +
 
 +
{{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?"}}
 +
 
 +
* '''SciTE''' or '''[http://www.winedt.com WinEdt]''' or Textpad may be a good choice for a newbie.
  
 
WinEdt has a rich graphical user-interface, but more support for LaTeX than for ConTeXt.
 
WinEdt has a rich graphical user-interface, but more support for LaTeX than for ConTeXt.
ConTeXt support for Scite was written by Hans Hagen (ConTeXt developer himself) and also includes recognition and auto-completion(?) of most frequent ConTeXt commands.
+
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.
  
''(You need to install WinEdt AFTER the installtion of MikTeX, ghostscript and Acroreader for Windows.)''
+
''(You need to install WinEdt AFTER the installtion of MikTeX, GhostScript and Adobe Reader for Windows.)''
  
See also: [[Text editor]]
+
{{todo|Someone should write how to install SciTE & ConTeXt support for it without installing the stand-alone ConTeXt.}}
  
{{todo|Someone should write how to install Scite & ConTeXt support for it without installing the stand-alone ConTeXt.}}
+
=== For gurus (like (La)TeX users or programmers) ===
  
=== For gurus [like (La)TeX users or programmers] ===
+
You probably already have your favourite [[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 editor]] page to help you choose one.
 
 
You probably already have your favourite [[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 editor]] page to help you choose one.
 
 
* [[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.
 
* [[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.
  
Line 133: Line 166:
  
 
Some text editors support automatic compiling:
 
Some text editors support automatic compiling:
* F?? in Scite
+
* F?? in SciTE
 
* ?? in WinEdt
 
* ?? in WinEdt
 
* see [[Vim#Makefile|makefile]] for Vim
 
* see [[Vim#Makefile|makefile]] for Vim
  
= 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.
 
 
== PStoEDIT ==
 
 
pstoedit for windows can be downloaded from http://www.pstoedit.net/pstoedit/
 
 
Only needed in order to be able to use some advanced features such as those mentioned in [[manual:mmakempy.pdf|METAPOST outlines]]
 
 
== See also ... ==
 
 
* [[LilyPond]]
 
* [[Font Tools]]
 
* ... ?
 
  
 
[[Category:Installation]]
 
[[Category:Installation]]

Revision as of 12:42, 19 January 2006

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

  • a stand-alone ConTeXt distribution or any other TeX distribution (such as MikTeX, TeX Live, ... )
  • Perl, Ruby and GhostScript (Perl and Ruby are script languages, GS is a PostScript and PDF interpreter)
  • some Text editor
  • PDF viewer (Adobe Reader, GSview or any other)

Which ConTeXt distribution to choose?

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

Stand-alone ConTeXt distribution

Good reasons for choosing the stand-alone distribution are:

  • if you don't need LaTeX
  • if you always want to have the very latest ConTeXt distribution
  • ... write some more

Installation Instructions

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

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

  1. Get Perl and install it. I use ActivePerl (or [1])
  2. Get Ruby and install it. I used Ruby Installer. (see note below)
  3. Check that Perl and Ruby work. Go to the command prompt (Start -> Run... "cmd") and execute the two commands:
    ruby --version
    perl --version
    These should give some information on Ruby and Perl. It really does not matter what they say, as long as the interpreters are found.
  4. Download [mswincontext.zip]
  5. Unzip the contents under c:\temp. You should get c:\temp\isoimage. (see note below)
  6. Create a new folder c:\context. (see note below)
  7. Copy everything under c:\temp\isoimage into c:\context. There should be one folder (/usr) and a few files.
  8. Open the folder c:\context and double-click cdemo.bat.
  9. 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.

A few notes on the procedure above:

  • Perl and Ruby per se have nothing to do with ConTeXt, ConTeXt just needs them. So, if you have another Perl and Ruby (e.g. through cygwin), they are fine as long as they are in the system path. If you can get through step #3 without doing #1 and #2, fine.
  • It is up to you to choose the location where you unzip the file in step #5, no magic there. Just that you know where the files are.
  • The actual location of the ConTeXt in step #6 tree 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. (Has anybody tried lately?)
  • After you have verified everything works in step #9, 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:\context).
  • Make sure you have something Acrobatish (any decent PDF viewer) installed, otherwise you won't see the results in step #9.

TODO: explain how to choose which ConTeX to execute in case there is also MikTeX ot TeX Live installed; explain the best way for updating (See: To-Do List)


MikTeX or ProTeXt

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.

However, some more experienced 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
  • it's difficult to change the source of ConTeXt core (for the sake of experimenting) and remake formats (if anyone doesn't agree here, please explain how you did it)

Packages that you need

Try running

texexec --version

In most cases MikTeX should install the required package for ConTeXt automatically (if not installed yet). It's additionally recommended to download cont-win.zip and to copy texmfstart.exe from the zip file into [MikTeX PATH]\miktex\bin.

After you install or change something

  • MikTeX Options -> General -> File name database -> Refresh Now
  • MikTeX Options -> General -> Format Files -> Update Now
  • MikTeX Options -> Roots -> [select one] -> Refresh FNDB

(Don't forget to run the MikTeX Update Wizard regularly!)

Additional settings

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 [MikTeX PATH]\tex\context\user\cont-sys.tex uncomment the following lines:
\runMPgraphicstrue
\runMPTEXgraphicstrue
  • In case the file doesn't exist yet, copy the file cont-sys.rme (in the same folder) to cont-sys.tex first. cont-sys.rme may change every now and then, so check for major changes from time to time and update your cont-sys.tex accordingly.
  • Create a file [localtexmf PATH]\miktex\config\miktex.ini and add the following line to it:
write18=enable

(Because of some unknown reason, write18=enable in [localtexmf PATH]\miktex\config\miktex.ini may be ignored on some computers. In that case make the change in [MikTeX PATH]\miktex\config\miktex.ini, but you may have to repeat this step every time you update MikTeX packages.)

([MikTeX PATH] and [localtexmf PATH] 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.

TeX Live or XEmTeX

Installation instructions are part of the documentation.


TODO: can someone with any experience write something about it? (See: To-Do List)


Required and Useful Tools

Installing Perl and Ruby

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 here and Ruby here or here (different one; might be better).

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 cmd or command) and check if

perl --version

and

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

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

Assuming that you already have Adobe Reader (if not, you can get it 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.

Choosing a Text editor & compiling

For newbies (like Word (ex)users)


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?" (See: To-Do List)


  • SciTE or WinEdt or Textpad may be a good choice for a newbie.

WinEdt has a rich graphical user-interface, but more support for LaTeX than for ConTeXt. 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.

(You need to install WinEdt AFTER the installtion of MikTeX, GhostScript and Adobe Reader for Windows.)


TODO: Someone should write how to install SciTE & ConTeXt support for it without installing the stand-alone ConTeXt. (See: To-Do List)


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

You probably already have your favourite 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 editor page to help you choose one.

  • Vim or Emacs may be a good choice if you're willing to invest some time into learning them - it 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

Some text editors support automatic compiling:

  • F?? in SciTE
  •  ?? in WinEdt
  • see makefile for Vim