Changes

Jump to navigation Jump to search
9,992 bytes removed ,  08:27, 2 July 2022
m
Text replacement - "pragma-ade.com" to "pragma-ade.nl"
In order to be able to run ConTeXt under Windows{{note | October 18, you will need the following2011:* a stand-alone ConTeXt distribution or any other TeX distribution (such as MikTeXThe contents of this page are partly obsolete. To start with, TeX Live, ... )* PerlMK IV is warmly recommended nowadays, Ruby and GhostScript (Perl and Ruby are script languagesthe command used for various operations is no longer <code>texexec</code>, GS in MK IV it is a PostScript and PDF interpreter(usually)* some [[Text editor]]* PDF viewer (Adobe Reader<code>context</code>. At least try the other Windows installation pages, linked to this page, GSview or any other)before following these instructions.}}
= General =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 Editors|text editor]] and [[#PDF Viewer|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. Updating in MikTeX is "one-button-click" operation, updating the stand-alone version means unziping [[cont-tmf.zip]] to the proper folder and remake formats. Recent ConTeXt versions allow you to update withThe 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 [[TeX Live|TL]] or [[MikTeX]]
 
There are two ways to install it on Windows:
* use GUI intaller by Vyatcheslav [http://minimals.contextgarden.net/setup/context-installer/] (sets environmental variables globally)
* install from command-line (TODO: instructions)
But you need to <b>update == [[cont-win.zipTeX Live]]</b> every now and then as well (no matter which distribution you use)!==
== Older versions * reference distribution for (La)TeX for all platforms* released once per year and sent to members of Windows ==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
The stand''Another distribution worth mentioning is [http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-alone distribution only works ptex/web2c75-e.html W32TeX] that came to our attention when Akira (its author) was the first one to manage to compile [[XeTeX]] for newer versions of Windows that have cmd, and still provides the very latest Windows binaries for [[XeTeX]], [[LuaTeX]], [[pdfTeX]], [[MetaPost]], .exe instead of command.com as command interpreter. Running it on Windows 98 (or earlier) Distribution is also possiblea bit specific, but needs some tweaking (hardcoding the paths his binaries are great - compatible with [[TeX Live]] and used in [[ConTeXt Standalone]].bat script). If you really need that and can't make it work alone, try to ask Taco.'
= Which [[ConTeXt distribution to choose? Standalone]] with TexWorks =
MikTeX is great tool for people typsetting in LaTeX. Updating the packages is easy and packages This assumes you are downloaded automatically if you need them. But on the other hand it's not adapted for ConTeXt well enough. ConTeXt is working in already using a LaTeX distribution like MikTeX 2.4 (and with some manual changes in 2.5 as well), but some new features aren't and the new updates are sometimes really way behind the time.
The stand# 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 want the stable version, add <code>--alone context=current</code># It is probably a good idea to make sure ConTeXt is much better in visible from the way that it is always upPATH. In Windows 7, you should go to System > Advanced > Environment Variables and add <code>C:\context\tex\texmf-mswin\bin</code> to-dateyour 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>.# Install the environment is set up properly [http://www.tug.org/texworks/ TexWorks] standalone and some special functionality that doesn't work in MikTeX should work here as expectedaccept the default options upon installation. The only drawbacks (although I don't really dare # Go to call them drawbacks) are that Preferences > Typesetting and add the directory where <code>context.exe</code> is located. It is the same one you have added to have some other distribution working in parallel if your PATH.## Next, under Processing Tools, create a new one and call it anything you need LaTeX want. In the Progream field, enter the path of <code>context.exe</code>, the same as well above. In the Arguments section, add <code>$fullname</code> and that you are done.# Now populate the installation screen with ConTeXt code, select ConTeXt and updates are not automatic (though still straightforward)press Typeset. A PDF screen should pop up with the document.
You can use both MikTeX and the stand-alone distr. simultaneously though.
There's another (not so popular) TeX distribution, [http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html W32TeX] which is probably the only one so far which includes [[XeTeX]]. See [[Windows Installation#XeTeX Installation|XeTeX Installation]] to figure out how to install XeTeX on top of standalone distribution.== GhostScript ==
I never tried XEmTeX and TeX Live* http://www. If anyone is willing to share the experince with other users, you're wellcome to do socs.wisc.edu/~ghost/* http://www.ghostscript.com/
== StandIf you already worked with (La)TeX before, you probably already have it installed. Try gswin32 -alone ConTeXt distribution ==-version
* http:You have to download GhostScript (filename '''<code>gs851w32.exe</code>''' or a similar one) and preferrably GSview as well ('''<code>gsv47w32.exe</wwwcode>''' or similar).pragma-adeBe sure to include the executables (folder where gswin32.com/download-1exe is located) into the PATH variable.htm
= Special Notes =
===Installation Instructions===
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]]# Download [http://www.pragma-ade.comnl/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>.
# 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 this these steps: change step numbers and join the information - notes about ruby, Acrobat, ... apply to all windows distributions.}}
A few notes on the procedure above:
* It is up to you to choose the location where you unzip the file in step #52, no magic there. Just that you know where the files are.* The actual location of the ConTeXt tree in step #6 tree 2 does not matter. I use <tt>c:\context</tt>, but you might use something else. However, I would not use anything with a space in the name (e.g. <tt>c:\Program Files\context</tt>), as that may confuse things. (Has anybody tried lately?)[Seems to work with an August 2006 stand-alone distribution.]* After you have verified everything works in step #93, you can toss <tt>cdemo.bat</tt> away and use <tt>cstart.bat</tt> 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. <tt>c:\Programs\context</tt>).* Make sure you have something Acrobatish (any decent PDF viewer) installed, otherwise you won't see the results in step #94.
* A final note: to have it finally running you should build the formats first. To do so there is at least a way:
texexec --make --all
Then, close the cmd, double -click in cdemo.bat
and voila !
# 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:
===Updating the installation=== {{todo|explain the best way for updating}} == MikTeX or ProTeXt == * http://www.miktex.org/* http://www.tug.org/protext/ (MikTeX-based distribution, includes TeXnicCenter, GhostScript and WinEdt) 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* [[XeTeX]] doesn't work yet with it === MikTeX packages that you need === Try running texexec --versionIn most cases MikTeX should install the required package for ConTeXt automatically (if not installed yet). Don't ask me why Russian und Ukrainian hyphenation patterns have to be downloaded as well. === Additional steps === The following steps are highly recommended (and mandatory for MikTeX 2.5). It would be really nice if MikTeX developer would do that for you - Perhaps it will help if more people ask for it politely. * Download [http://www.pragma-ade.com/context/current/cont-win.zip cont-win.zip] and copy <code>texmfstart.exe</code> from the zip file into <code>[MikTeX PATH]\miktex\bin</code> (update that file every now and then)* Download [http://www.pragma-ade.com/context/current/cont-tmf.zip cont-tmf.zip] and copy the content to MikTeX folder (replace old files).* Put <code>[MikTeX PATH]\scrips\context\stubs\mswin</code> in <code>PATH</code> variable <b>before</b> <code>[MikTeX PATH]\miktex\bin</code>.* Delete the folder <code>fonts/map/dvipdfm</code> or (that would be a proper solution) set TEXFONTMAPS = .;$TEXMF/fonts/map/{$progname,pdftex,dvips,}//: (I didn't yet check how the latter can be done.)* (Open new <code>cmd</code> and check if <code>texexec</code> works. ''I'll put some more notes here.'')* Go to next step (refreshing file name database & rebuilding formats, ...)* <i>(you may skip this)</i> Downloading cont-tmf.zip is not mandatory, but it's easier to explain the other steps then. If you don't want to do it, create an arbitrary folder at some arbitrary place and put it in <code>PATH</code> <b>before</b> MikTeX bin. Create at least <code>texexec.bat</code> with the following content in it: texmfstart texexec %* === After you install or change something: Refresh file name database & Rebuild Formats === * ''MikTeX Options -> General -> Refresh FNDB''* ''MikTeX Options -> General -> Update Formats'' ''(Don't forget to run the '''MikTeX Update Wizard''' regularly!)'' If you have any problems running ConTeXt, check* ''MikTeX Options -> Formats -> <code>cont-en</code> -> Edit'' The following should be set: Compiler: pdfetex Input File Name: cont-en.ini Output File Name: [empty] Preloaded Format: [empty] Description: [anything] Exclude when updating: [unchecked] After ''Apply''-ing and ''Build''-ing, ''Refresh'' & ''Update'' as described above. This is the MikTeX way for doing <code>texexec --make --en</code>. The latter has no influence since MikTeX doesn't set any system variables and consequently ConTeXt doesn't know where to leave the created formats. === Additional settings (for those who use MetaFun) === 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 <code>[MikTeX PATH]\tex\context\user\cont-sys.tex</code> uncomment the following lines:<texcode>\runMPgraphicstrue\runMPTEXgraphicstrue</texcode>* In case the file doesn't exist yet, copy the file <code>cont-sys.rme</code> (in the same folder) to <code>cont-sys.tex</code> first. <code>cont-sys.rme</code> may change every now and then, so check for major changes from time to time and update your <code>cont-sys.tex</code> accordingly.* Create a file <code>[localtexmf PATH]\miktex\config\miktex.ini</code> and add the following line to it: write18=enable''(Because of some unknown reason, <code>write18=enable</code> in <code>[localtexmf PATH]\miktex\config\miktex.ini</code> may be ignored on some computers. In that case make the change in <code>[MikTeX PATH]\miktex\config\miktex.ini</code>, but you may have to repeat this step every time you update MikTeX packages.)'' (<code>[MikTeX PATH]</code> and <code>[localtexmf PATH]</code> 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=miktexmay help you solving some problems. == W32TeX == * http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html The only Windows distribution so far that comes with [[XeTeX]]. == TeX Live or XEmTeX == * http://www.tug.org/texlive/* https://xemtex.groups.foundry.supelec.fr/ (TeX Live-based distribution including Perl, Emacs and GhostScript) [http://www.tug.org/texlive/doc/texlive-en/live.html#x1-200006 Installation instructions] are part of the documentation. {{todo|can someone with any experience write something about it?}} == XeTeX Installation == (Until Hans decides to apply that to the <b>standalone distribution</b>, this notes might be of interest for those who want to use XeTeX under Windows.) * Download ftp://akagi.ms.u-tokyo.ac.jp/pub/TeX/win32/xetex-w32.tar.bz2* Unpack it. <i>(The easiest way might be with Total Commander; you need a plugin for it, available on the official website)</i>* Copy the content of <code>bin</code> into <code>texmf-mswin/bin</code> <i>(copy just the missing files, or simply overwrite the others)</i>* Copy the content of <code>share/texmf</code> to <code>texmf</code>. If you really mind, you can delete the following before copying (but it's not necessary):** <code>tex/xetex/xelatex</code>** <code>tex/xetex/generic/hyphen</code>** <code>tex/xetex/generic/ifxetex</code>** <code>web2c/xetex/xe[la]tex.fmt</code>** (<code>doc</code> in case you don't need it)* <code>web2c/xetex/xetex.pool</code> should go to <code>texmf-mswin/web2c/</code> === Building the formats ===At the first time and when you update ConTeXt, you have to run the following command from console: texexec --xtx --make --all === Using XeTeX ===You can then compile your document using texexec --xtx filename === Setting up fontconfig ===* Open <code>setuptex.bat</code> and add the following three lines <i>(here they're surrounded by the best place where they should be put)</i>: set HOMETEXMF= set FONTCONFIG_FILE=fonts.conf set FONTCONFIG_PATH=%TEXMFMAIN%\fonts\conf set PKGCACHEDIR=%TEXMFMAIN%\fonts\cache if not "%CTXDEVTXPATH%"=="" SET CTXDEVTXPATH=* To use fonts that are not installed on the system you should add something like this to <codepre>call C:\Programs\context\usr\local\context\texmf\fonts\conf\fontspragmatex.conf</code>: <dir>c:/Programs/context/usr/local/context/texmf/fonts/opentype/public/lm</dir>* For the first time and every time when you install a new font that you want to use with XeTeX, issue: fc-cache -f -v* To get a list of the available fonts use: fc-list > list.txt = Required and Useful Tools = == Installing Perl and Ruby == * http://www.activestate.com/Products/ActivePerl/* http://www.ruby-lang.org or http://rubyinstaller.rubyforge.org 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] or [http://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ here] (different one; might be better - you only need to extract files from zip). 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 perl --versionand ruby --versionwork 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.)'' === A note about cygwin === <b><i>(Skip this unless you know what you are doing!)</i></b> If you have a working perl and ruby under cygwin and if they are in <code>PATH</code>, this might already work for ConTeXt (although it's a better idea to use native Windows versions). However, if the inclusion of libraries in ruby fails (because of conversion of path names) and if you object to install ruby again, try setting the environmental variable <code>RUBYLIB</code>: set RUBYLIB=/cygdrive/c/[Path to MikTeX or other distr.]/scripts/context/ruby <!-- <i>My Computer -> Properties -> Advanced -> Environment Variables -> New</i>bat <!-- * Variable name: <code>RUBYLIB</code><!--* Variable value: <code>/cygdrive/c/<i>[Path to MikTeX or other distr.]</i>/scripts/context/ruby</code> -->[http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/50b3c1b275cd0c6d] == Installing GhostScript == * http://www.cs.wisc.edu/~ghost/* http://www.ghostscript.com/ If you already worked with (La)TeX before, you probably already have it installed. Try gswin32 --version You have to download GhostScript (filename '''<code>gs851w32.exe</code>''' or a similar one) and preferrably GSview as well ('''<code>gsv47w32.exetex</codepre>''' or similar). Be sure to include the executables (folder where gswin32.exe is located) into the PATH variable. == Other useful software == Assuming that you already have Adobe Reader (if not, you can get it [http://www.adobe.com/products/acrobat/readstep2.html 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. * [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]]* [[LilyPond]]* [[Font Tools]]* ... ? = Choosing a [[Text editor]] & compiling = == For newbies (like Word (ex)users) == {{todo|Explain the difference between GUI/text editor/compiler/PDF document; people often ask me: "ConTeXt - oh, you mean that program with a blue screen and colourful fonts?"}} * '''[http://scintilla.sourceforge.net/SciTE.html SciTE]''' or '''[http://www.winedt.com WinEdt]''' or [http://www.textpad.com/ Textpad] or [http://www.toolscenter.org TeXnicCenter] may be a good choice for a newbie. WinEdt has a rich graphical user-interface, but more support for LaTeX than for ConTeXt. ''(You need to install WinEdt AFTER the installtion of MikTeX, GhostScript and Adobe Reader for Windows.)'' ConTeXt support for SciTE was written by Hans Hagen (the ConTeXt developer himself) and also includes recognition and auto-completion of most frequent ConTeXt commands. According to their web-site: "TeXnicCenter is a feature rich integrated development environment (IDE) for developing LaTeX-documents on Microsoft Windows (Windows 9x/ME, NT/2000/XP) freely available under GPL."It can also be used for processing ConTeXt documents. {{todo|Someone should write how to install SciTE & ConTeXt support for it without installing the stand-alone ConTeXt.}}
=== For gurus (like (La)TeX users or programmers) ===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.
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 ===Use the [[Text editor]] page to help you choose onesame .* [[Vim]] or [http://www.emacswiki.org/cgi-bin/wiki Emacs] may be a good choice if you're willing bat file to invest some time into learning them - it may be worth the effortrun ConTeXt with any .tex file===
== Compiling ==# 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>
After you've done all thatand save it as ConTeXtthis.bat. Now, you can finally use your favourite editor to write your [[First Document|first document]]it this way:<pre>ConTeXtthis.bat anyfile.tex </pre>
To compile it, open the command line again (Start -> Run Where anyfile.tex is your main ConTeXt source file.. -> type '''cmd''' or '''command''') and run texexec yourfilenameThis whole instruction works well whit TeXnicCenter
Some text editors support automatic compiling:* '''F7''' (= command Build in Tools menu) or '''Ctrl+1''' (= command Process TeX file in Tools menu) in '''SciTE'''* ?? in WinEdt* F?? in TeXnicCenter* see [[Vim#Makefile|makefile]] for Vim{{Installation navbox}}
[[Category:Installation]]

Navigation menu