Changes

Jump to navigation Jump to search
1,940 bytes added ,  16:01, 20 November 2012
m
{{Installation navbox}}
{{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:
* 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 minimals ConTeXt Standalone installed parallel to [[TeX Live|TL]] or [[MikTeX]]
There are two ways to install it on Windows:
* 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 MinimalsConTeXt Standalone
* ConTeXt is outdated
** but it's possible to update it manually
** 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 [[MinimalsConTeXt Standalone]].'' = [[ConTeXt Minimals]] with TexWorks = Install ConTeXt MkIV with the GUI installer and accept the default options upon installation. This will install Context in folder c:\contextminimal Install [http://www.tug.org/texworks/ TexWorks] and accept the default options upon installation. Goto EDIT>PREFERENCES>EDITOR>SYNTAX COLORING: SELECT CONTEXT>TYPESETTING>DEFAULT>SELECT CONTEXT>PROCESSING TOOLS: CONTEXT>EDIT>PROGRAM: context.cmd and ARGUMENTS: only $fullname>OK>OK
Now populate the screen with ConTeXt code, select = [[ConTeXt and press Typeset. A PDF screen should pup up Standalone]] with the document.TexWorks =
== Compiling ==This assumes you are not already using a LaTeX distribution like MikTeX.
After # You do not need to install Ruby first unless you want to run MkII.# Download the ConTeXt Standalone [http://minimals.contextgarden.net/setup/context-setup-mswin.zip here]# Run <code>first-setup.bat</code> from the command line. By default, this will download the beta version. If you've done all thatwant the stable version, add <code>--context=current</code># 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 can finally use put your favourite editor ConTeXt folder in <code>C:\</code>. This will allow you to write your run ConTeXt from the command line anywhere, using <code>context filename.tex</code>.# Install the [[First Document|first document]http://www.tug.org/texworks/ TexWorks]standalone and accept the default options upon installation.# 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.To compile ## Next, under Processing Tools, create a new one and call itanything you want. In the Progream field, open enter the command line again (Start -path of <code> Run context.exe</code>, the same as above.. -In the Arguments section, add <code>$fullname</code> type '''cmd''' or '''command''') and runyou are done. texexec yourfilename# Now populate the screen with ConTeXt code, select ConTeXt and press Typeset. A PDF screen should pop up with the document.
# 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).
# 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]]

Navigation menu