Changes

Jump to navigation Jump to search
5,430 bytes added ,  19:14, 1 October 2008
New page: < Windows Installation MikTeX (http://www.miktex.org) is a magnificent Windows distribution for TeX, but: * ConTeXt is currently broken (possible to do some tweaking to make it work) ...
< [[Windows Installation]]

MikTeX (http://www.miktex.org) is a magnificent Windows distribution for TeX, but:
* ConTeXt is currently broken (possible to do some tweaking to make it work)
* There is no [[LuaTeX]] available yet

This page deals with some MikTeX 2.7 specifics about ConTeXt.

= Installing ConTeXt =

Manual installation of ConTeXt is currently possible, but ...

'''This section should be removed as soon as possible. ConTeXt in MikTeX should be finally fixed!'''

== Do not forget ==

Before porforming the steps written below, '''update MikTeX packages'''.

=== Things to check ===

Just a few things that you might want to check before proceeding ...

* texmfstart doesn't exist
C:\>texmfstart
'texmfstart' is not recognized as an internal or external command,
operable program or batch file.
* texexec misbehaves
C:\>texexec
texexec: The Windows command script file could not be found.
'''(texexec.exe has been present on this computer in <code>C:\Program Files\MiKTeX 2.7\miktex\bin</code>, but I don't know if that's because it was an old installation or because it's always there.)'''
* ruby is installed: you get
C:\>ruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
instead of
C:\>ruby
'ruby' is not recognized as an internal or external command,
operable program or batch file.
* perl is installed (if you want to use mptopdf)

== Install ConTeXt base files ==

Two slightly different ways to install ConTeXt in MikTeX are described below. Choose either of them (but not both; they are equivalent).

=== Option 1: Installing into existing MikTeX architecture ===

==== Download ConTeXt ====

* download [http://www.pragma-ade.com/context/current/cont-tmf.zip cont-tmf.zip] from http://www.pragma-ade.com/download-1.htm and unzip it into <code>C:\Program Files\MikTeX 2.7</code>, so that you get:
C:\Program Files\MiKTeX 2.7\bibtex
C:\Program Files\MiKTeX 2.7\context
C:\Program Files\MiKTeX 2.7\doc
C:\Program Files\MiKTeX 2.7\...
C:\Program Files\MiKTeX 2.7\web2c
but not
C:\Program Files\MiKTeX 2.7\cont-tmf\bibtex\...

==== Add ConTeXt binaries ====

* Copy <code>texexec.bat</code> (and any other script that you might be using, like <code>mptopdf.bat</code>) from
C:\Program Files\MiKTeX 2.7\scripts\context\stubs\mswin
into
C:\Program Files\MiKTeX 2.7\miktex\bin

* Delete
C:\Program Files\MiKTeX 2.7\miktex\bin\texexec.exe
C:\Program Files\MiKTeX 2.7\miktex\bin\mptopdf.exe
and any other <code>foo.exe</code> belonging to ConTeXt that has been replaced by <code>foo.bat</code> in the previous step.

* Create a file <code>C:\Program Files\MiKTeX 2.7\miktex\bin\texmfstart.bat</code> with the following content:
@echo off
ruby "C:\Program Files\MiKTeX 2.7\scripts\context\ruby\texmfstart.rb" %*

=== Option 2: Installing separately ===

==== Download ConTeXt ====

* Create a new folder
C:\Program Files\ConTeXt

* download [http://www.pragma-ade.com/context/current/cont-tmf.zip cont-tmf.zip] from http://www.pragma-ade.com/download-1.htm and unzip into that folder, so that you get:
C:\Program Files\ConTeXt\bibtex
C:\Program Files\ConTeXt\context
C:\Program Files\ConTeXt\doc
C:\Program Files\ConTeXt\...
C:\Program Files\ConTeXt\web2c

==== Set up a new tree in MikTeX ====

* Open
Start Menu -> MikTeX 2.7 -> Settings

* In tab <code>Roots</code>, choose <code>Add ...</code> button and add <code>C:\Program Files\ConTeXt</code> as a new path

* In tab <code>General</code>, click on <code>Refresh FNDB</code>

* Click <code>OK</code>

==== Add ConTeXt binaries to PATH ====

* Go to
Control Panel -> System -> Advanced -> Environment Variables

* Find <code>PATH</code> in <code>System Variables</code> and <code>Edit</code> it. Add ConTeXt stub path in front of the one for MikTeX, for example replace:
C:\Program Files\MiKTeX 2.7\miktex\bin;
with
C:\Program Files\ConTeXt\scripts\context\stubs\mswin;C:\Program Files\MiKTeX 2.7\miktex\bin;
''(You could just as well copy all the bat files you need from there to some other place in PATH. For most people copying texexec.bat is almost enough. The important thing is to either delete or shield texexec.exe from MikTeX.)''

* Open a new command line and make sure that you now get
C:\>texexec
'texmfstart' is not recognized as an internal or external command,
operable program or batch file.

* Create a new file <code>texmfstart.bat</code> anywhere in your PATH, for example in
C:\Program Files\ConTeXt\scripts\context\stubs\mswin\texmfstart.bat
with the following content:
@echo off
ruby "C:\Program Files\ConTeXt\scripts\context\ruby\texmfstart.rb" %*

* Check that you now get the correct response from command line
C:\>texexec
TeXExec | version 6.2.0 - 1997-2006 - PRAGMA ADE/POD

TeXExec | --check check versions
TeXExec | --figures generate overview of figures
TeXExec | ...
TeXExec | --help --all shows all switches

== Make formats ==

* Go to ''Start Menu -> MikTeX 2.7 -> Settings -> Formats -> New ...''

{|
|-
| '''Format key:'''
| ConTeXt
| ''(could be anything)''
|-
| '''Format name:'''
| cont-en
| ''(could be anything)''
|-
| '''Compiler:'''
| pdftex
|-
| '''Input file name:'''
| cont-en.tex
|-
| '''Description:'''
| ConTeXt format
| ''(could be anything)''
|-
| (uncheck)
| Exclude this format ...
|
|}

* Choose the newly created format and <code>Build</code> it.
* For mptopdf uncheck the box for excluding as well.

[[Category:Installation]]

Navigation menu