Difference between revisions of "MikTeX"

From Wiki
Jump to navigation Jump to search
(the page is obsolete)
(remove obsolete contents about MikTeX 2.7 and write a few sentences about current situations; more instructions are still needed)
Line 1: Line 1:
 
< [[Windows Installation]]
 
< [[Windows Installation]]
  
{{todo|almost everything on this page is obsolete and should be removed; it is stil true that MikTeX is magnificent apart from inability to update ConTeXt and there are some issues, but this article needs a complete rewrite}}
+
[http://www.miktex.org MikTeX] is a magnificent and very user-friendly Windows distribution for TeX, but for various historical reasons, mainly due to lack of LuaTeX, ConTeXt has been broken in MikTeX for a long time. Unless you have some ancient MikTeX with ancient ConTeXt lying around, ConTeXt will only work with '''MikTeX 2.9''' (or later; at the time of writing no newer version exists) that includes LuaTeX 0.70.1.
  
[http://www.miktex.org MikTeX] is a magnificent Windows distribution for TeX, but:
+
== Instructions ==
* There is no [[LuaTeX]] available yet (seems to be solved now: [http://miktex.org/packages/miktex-luatex-bin-2.9])
 
See also
 
* http://www.tug.org/protext/: MikTeX-based distribution, includes TeXnicCenter, GhostScript and WinEdt
 
  
This page deals with some MikTeX 2.7 specifics about ConTeXt.
+
... will become available once ConTeXt starts working ...
  
= Installing ConTeXt =
+
== Problems ==
  
Manual installation of ConTeXt is currently possible, but ...
+
As of end of June 2011 MikTeX is still (or again) non-functional. This will hopefully be fixed soon (you can already replace the version of ConTeXt by your own), however some problems with ConTeXt MKIV will remain:
 
+
* ConTeXt MKIV will never be up-to-date and will hardly ever be hot-fixed.
'''This section should be removed as soon as possible. ConTeXt in MikTeX should be finally fixed!'''
+
* MikTeX only updates binaries every now and then. Since ConTeXt MKIV strongly depends on LuaTeX version, ConTeXt cannot be updated arbitrarily and the updates may become out-of-sync with currently included LuaTeX version. If that happens, ConTeXt stops working.
 
+
* MikTeX now ships for two architectures: 32-bit and 64-bit. If LuaTeX gets out-of-sync on those two, ConTeXt will necessary be broken on at least on of them.
== Do not forget ==
+
* Hans likes to reimplement every bit and piece of standard TeX installations (like kpathsea, texmf.cnf, ...). This has two major consequences:
 
+
** Author of MikTeX may not always be aware of modifications and might implement requirements for these features with delay. In the meantime ConTeXt might become broken.
Before porforming the steps written below, '''update MikTeX packages'''.
+
** Download of packages on request doesn't work with ConTeXt MKIV. The feature is hooked into kpathsea, ConTeXt doesn't use kpathsea, but doesn't provide any alternative for this either.
 
+
* For all of the reasons already mentioned, the number of ConTeXt users on MikTeX is very small which means less testing and more problems.
=== 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]]
 
[[Category:Installation]]

Revision as of 20:07, 24 June 2011

< Windows Installation

MikTeX is a magnificent and very user-friendly Windows distribution for TeX, but for various historical reasons, mainly due to lack of LuaTeX, ConTeXt has been broken in MikTeX for a long time. Unless you have some ancient MikTeX with ancient ConTeXt lying around, ConTeXt will only work with MikTeX 2.9 (or later; at the time of writing no newer version exists) that includes LuaTeX 0.70.1.

Instructions

... will become available once ConTeXt starts working ...

Problems

As of end of June 2011 MikTeX is still (or again) non-functional. This will hopefully be fixed soon (you can already replace the version of ConTeXt by your own), however some problems with ConTeXt MKIV will remain:

  • ConTeXt MKIV will never be up-to-date and will hardly ever be hot-fixed.
  • MikTeX only updates binaries every now and then. Since ConTeXt MKIV strongly depends on LuaTeX version, ConTeXt cannot be updated arbitrarily and the updates may become out-of-sync with currently included LuaTeX version. If that happens, ConTeXt stops working.
  • MikTeX now ships for two architectures: 32-bit and 64-bit. If LuaTeX gets out-of-sync on those two, ConTeXt will necessary be broken on at least on of them.
  • Hans likes to reimplement every bit and piece of standard TeX installations (like kpathsea, texmf.cnf, ...). This has two major consequences:
    • Author of MikTeX may not always be aware of modifications and might implement requirements for these features with delay. In the meantime ConTeXt might become broken.
    • Download of packages on request doesn't work with ConTeXt MKIV. The feature is hooked into kpathsea, ConTeXt doesn't use kpathsea, but doesn't provide any alternative for this either.
  • For all of the reasons already mentioned, the number of ConTeXt users on MikTeX is very small which means less testing and more problems.