Difference between revisions of "Windows Installation"

From Wiki
Jump to navigation Jump to search
(→‎Text Editor: Updating links)
m ({{Installation navbox}})
 
(43 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 +
{{note | October 18, 2011: The contents of this page are partly obsolete. To start with, MK IV is warmly recommended nowadays, and the command used for various operations is no longer <code>texexec</code>, in MK IV it is (usually) <code>context</code>. At least try the other Windows installation pages, linked to this page, before following these instructions.}}
 +
 +
== Requirements ==
 
In order to be able to run ConTeXt under Windows, you will need:
 
In order to be able to run ConTeXt under Windows, you will need:
 +
* a TeX distribution
 +
* some scripting languages: Ruby is absolutely required (unless you plan to use MK IV exclusively), Perl and GhostScript are highly recommended, the rest is optional.
 
* your favorite [[Text Editors|text editor]] and [[#PDF Viewer|PDF viewer]]
 
* your favorite [[Text Editors|text editor]] and [[#PDF Viewer|PDF viewer]]
* a TeX distribution
 
** [[ConTeXt Minimals]]
 
** [[TeX-live]]
 
** [[MikTeX]] ('''broken!!!''')
 
* some scripting languages: ruby, perl, GhostScript
 
 
NB. If this was too many options to your taste, try the [[Simple Windows Installation]] page instead.
 
  
 +
If this was too many options to your taste, try the [[Simple Windows Installation]] page instead.
  
 
== Updating ==
 
== Updating ==
Line 19: Line 18:
  
 
You first need to choose a TeX distribution. Options are:
 
You first need to choose a TeX distribution. Options are:
* [[ConTeXt Minimals]]
 
* [[TeX-live]]
 
* [[MikTeX]] ('''broken''')
 
 
== ConTeXt Minimals ==
 
 
[[ConTeXt Minimals]] | http://minimals.contextgarden.net/
 
  
 +
== [[ConTeXt Standalone]] ==
 
* the official ConTeXt distribution
 
* the official ConTeXt distribution
 
* easy to keep up-to-date
 
* easy to keep up-to-date
Line 32: Line 25:
 
* no LaTeX
 
* no LaTeX
 
** if you don't need it, that's a rather small & convenient way to use ConTeXt
 
** 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]]
+
** if you need it, you can have ConTeXt Standalone installed parallel to [[TeX Live|TL]] or [[MikTeX]]
  
 
There are two ways to install it on Windows:
 
There are two ways to install it on Windows:
Line 38: Line 31:
 
* install from command-line (TODO: instructions)
 
* install from command-line (TODO: instructions)
  
== TeX Live ==
+
== [[TeX Live]] ==
 
 
[[TeX Live]] 2008 | http://www.tug.org/texlive/
 
  
 
* reference distribution for (La)TeX for all platforms
 
* reference distribution for (La)TeX for all platforms
 
* released once per year and sent to members of TeX user groups on DVDs
 
* 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
 
* used to be gigantic; but since 2008 one can install separate packages and update them
* binaries are compatible with Minimals
+
* binaries are compatible with ConTeXt Standalone
 
* ConTeXt is outdated
 
* ConTeXt is outdated
 
** but it's possible to update it manually
 
** but it's possible to update it manually
 
** new ConTeXt update mechanism is being prepared
 
** new ConTeXt update mechanism is being prepared
  
''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]].''
+
''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 [[ConTeXt Standalone]].''
  
== MikTeX (broken) ==
+
= [[ConTeXt Standalone]] with TexWorks =
  
[[MikTeX]] 2.7 | http://www.miktex.org
+
This assumes you are not already using a LaTeX distribution like MikTeX.
  
* great tool for people typsetting in LaTeX
+
# You do not need to install Ruby first unless you want to run MkII.
* updating packages is easy, (font) <b>packages are downloaded automatically</b>
+
# Download the ConTeXt Standalone [http://minimals.contextgarden.net/setup/context-setup-mswin.zip here]
* very user friendly
+
# Run <code>first-setup.bat</code> from the command line. By default, this will download the beta version. If you want the stable version, add <code>--context=current</code>
* ConTeXt is often outdated, but currently '''broken'''
+
# It is probably a good idea to make sure ConTeXt is visible from the PATH. In Windows 7, you should go to System > Advanced > Environment Variables and add <code>C:\context\tex\texmf-mswin\bin</code> to your user PATH, assuming you put your ConTeXt folder in <code>C:\</code>. This will allow you to run ConTeXt from the command line anywhere, using <code>context filename.tex</code>.
** (it's possible to do some tweaking to make it work)
+
# Install the [http://www.tug.org/texworks/ TexWorks] standalone and accept the default options upon installation.
* no [[LuaTeX]] available yet
+
# Go to Preferences > Typesetting and add the directory where <code>context.exe</code> is located. It is the same one you added to your PATH.
* binaries incompatible with Minimals and [[TeX Live]]
+
## Next, under Processing Tools, create a new one and call it anything you want. In the Progream field, enter the path of <code>context.exe</code>, the same as above. In the Arguments section, add <code>$fullname</code> and you are done.
 +
# Now populate the screen with ConTeXt code, select ConTeXt and press Typeset. A PDF screen should pop up with the document.
  
See also
 
* http://www.tug.org/protext/: MikTeX-based distribution, includes TeXnicCenter, GhostScript and WinEdt
 
 
= Text Editor =
 
 
See also [[Text Editors]] and [[Text Editors/Windows]].
 
 
== For newbies (like Word (ex)users) ==
 
 
* [[Scite]]: nicely integrated with Minimals; support written by Hans Hagen ConTeXt commands.
 
* [[Notepad++]]: easily configurable editor with lots of features. ConTeXt support available.
 
* '''[http://www.winedt.com WinEdt]''': rich graphical user-interface, but more support for LaTeX than for ConTeXt
 
* '''[http://www.textpad.com/ Textpad]'''
 
* '''[http://www.texniccenter.org/ 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):
 
* [[Vim]]
 
* [http://www.emacswiki.org/cgi-bin/wiki Emacs]
 
 
== Compiling ==
 
 
After you've done all that, you can finally use your favourite editor to write your [[First Document|first document]].
 
 
To compile it, open the command line again (Start -> Run ... -> type '''cmd''' or '''command''') and run
 
texexec yourfilename
 
 
= PDF Viewer=
 
 
== Adobe Reader ==
 
 
* you can get it [http://www.adobe.com/products/acrobat/readstep2.html here]
 
 
= 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 ==
 
 
* http://www.activestate.com/Products/ActivePerl/
 
* http://www.ruby-lang.org or http://rubyinstaller.rubyforge.org
 
 
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).
 
 
After installing check if these work OK:
 
perl --version
 
ruby --version
 
  
 
== GhostScript ==
 
== GhostScript ==
Line 122: Line 66:
  
 
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.
 
== Other useful software ==
 
 
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://gnuwin32.sourceforge.net/packages/unzip.htm unzip]
 
* [[LilyPond]]
 
* [[Font Tools]]
 
* ... ?
 
  
 
= Special Notes =
 
= 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===
 
===Installation Instructions===
  
Line 148: Line 76:
 
Here is a step by step of how it should go (i.e. what I did with success):
 
Here is a step by step of how it should go (i.e. what I did with success):
  
# Install [[Windows Installation#Installing Perl and Ruby|Perl and Ruby]]
+
# Install 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.
 
# 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>.
 
# Open the folder <code>c:\Programs\context</code> and double-click <code>cdemo.bat</code>.
Line 184: Line 112:
 
# 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>.
 
# 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).
 
# 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).
 +
# To avoid the need to open a new prompt each time you want to run ConTeXt, create another .bat file in your .tex file's folder with the following content:
 +
 +
<pre>call C:\Programs\context\usr\local\context\pragmatex.bat
 +
context filename.tex</pre>
 +
 +
If you place the <code>pragmatex</code> file in your ConTeXt directory, this will allow you to call ConTeXt from anywhere on your computer with one click. The disadvantage is that it's linked to a specific .tex file.
 +
 +
===Use the same .bat file to run ConTeXt with any .tex file===
 +
 +
# You can use the .bat file above for any .tex file you have.
 +
Just do the following modification:
 +
<pre>call C:\Programs\context\usr\local\context\pragmatex.bat
 +
context %1</pre>
 +
 +
and save it as ConTeXtthis.bat. Now, you can use it this way:
 +
<pre>ConTeXtthis.bat anyfile.tex </pre>
 +
 +
Where anyfile.tex is your main ConTeXt source file. This whole instruction works well whit TeXnicCenter
  
 +
{{Installation navbox}}
  
 
[[Category:Installation]]
 
[[Category:Installation]]

Latest revision as of 16:01, 20 November 2012


NOTE: October 18, 2011: The contents of this page are partly obsolete. To start with, MK IV is warmly recommended nowadays, and the command used for various operations is no longer texexec, in MK IV it is (usually) context. At least try the other Windows installation pages, linked to this page, before following these instructions.

Requirements

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

  • a TeX distribution
  • some scripting languages: Ruby is absolutely required (unless you plan to use MK IV exclusively), Perl and GhostScript are highly recommended, the rest is optional.
  • your favorite text editor and PDF viewer

If this was too many options to your taste, try the Simple Windows Installation page instead.

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 Standalone

  • 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 ConTeXt Standalone 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

  • 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 ConTeXt Standalone
  • 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 ConTeXt Standalone.

ConTeXt Standalone with TexWorks

This assumes you are not already using a LaTeX distribution like MikTeX.

  1. You do not need to install Ruby first unless you want to run MkII.
  2. Download the ConTeXt Standalone here
  3. Run first-setup.bat from the command line. By default, this will download the beta version. If you want the stable version, add --context=current
  4. It is probably a good idea to make sure ConTeXt is visible from the PATH. In Windows 7, you should go to System > Advanced > Environment Variables and add C:\context\tex\texmf-mswin\bin to your user PATH, assuming you put your ConTeXt folder in C:\. This will allow you to run ConTeXt from the command line anywhere, using context filename.tex.
  5. Install the TexWorks standalone and accept the default options upon installation.
  6. Go to Preferences > Typesetting and add the directory where context.exe is located. It is the same one you added to your PATH.
    1. Next, under Processing Tools, create a new one and call it anything you want. In the Progream field, enter the path of context.exe, the same as above. In the Arguments section, add $fullname and you are done.
  7. Now populate the screen with ConTeXt code, select ConTeXt and press Typeset. A PDF screen should pop up with the document.


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.

Special Notes

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).
  3. To avoid the need to open a new prompt each time you want to run ConTeXt, create another .bat file in your .tex file's folder with the following content:
call C:\Programs\context\usr\local\context\pragmatex.bat 
context filename.tex

If you place the pragmatex file in your ConTeXt directory, this will allow you to call ConTeXt from anywhere on your computer with one click. The disadvantage is that it's linked to a specific .tex file.

Use the same .bat file to run ConTeXt with any .tex file

  1. You can use the .bat file above for any .tex file you have.

Just do the following modification:

call C:\Programs\context\usr\local\context\pragmatex.bat 
context %1

and save it as ConTeXtthis.bat. Now, you can use it this way:

ConTeXtthis.bat anyfile.tex 

Where anyfile.tex is your main ConTeXt source file. This whole instruction works well whit TeXnicCenter