Difference between revisions of "Windows Installation"

From Wiki
Jump to navigation Jump to search
m (→‎Additional settings: set TEXSYSTEM=miktex)
(→‎Installing Perl and Ruby: an alternative source for ruby installation under windows)
Line 81: Line 81:
 
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.
  
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].
+
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).
  
 
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 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

Revision as of 15:04, 17 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
  • 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:

  • you don't need LaTeX
  • you always want to have the very latest ConTeXt distribution
  • ... 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 (See: To-Do List)


MikTeX

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


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


XEmTeX

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.

Choosing a text editor & compiling

For newbies [like Word (ex)users]


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?" (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 (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.)

See also: Text editor


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

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.

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 METAPOST outlines

See also ...