Changes

Jump to navigation Jump to search
1,655 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.}}
= Which = 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 choose? =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]]
You have If this was too many options to bear in mind that ConTeXt is being developed reasonably fast (see your taste, try the [[Release NotesSimple Windows Installation]]), so it's recommended to update it regularypage instead.
== Stand-alone ConTeXt distribution Updating ==
* http://wwwYou have to bear in mind that ConTeXt is being developed reasonably fast (see [[Release Notes]]), so it's recommended to update it regulary.pragmaThe command ctxtools -ade-updateused to work OK, but is '''no more recommended'''.com/download-1All 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).htm
Good reasons for choosing the stand-alone distribution are:* if you don't need LaTeX* if you always want to have the very latest ConTeXt distribution* ''... write some more''= TeX Distributions =
===Installation Instructions===''by Ville Voipio on the mailing list, 2006-01-19''You first need to choose a TeX distribution. Options are:
Here is == [[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 step by step of how rather small & convenient way to use ConTeXt** if you need it should go (i.e. what I did with success):, you can have ConTeXt Standalone installed parallel to [[TeX Live|TL]] or [[MikTeX]]
# Get Perl and There are two ways to install it. I on Windows:* use GUI intaller by Vyatcheslav [http://wwwminimals.activestatecontextgarden.comnet/Productssetup/Downloadcontext-installer/Download.plex?id=ActivePerl ActivePerl] (or [http://www.activestate.com/Products/ActivePerl/?mp=1]sets environmental variables globally)# Get Ruby and * install it. I used [http://rubyinstaller.rubyforge.org Ruby Installer]. (see note below)# Check that Perl and Ruby work. Go to the from command prompt (Start -> Run... "cmd") and execute the two commands: <texcode>ruby --version<br>perl --version</texcode>These should give some information on Ruby and Perl. It really does not matter what they say, as long as the interpreters are found.# Download [mswincontext.zip]# Unzip the contents under <tt>c:\temp</tt>. You should get <tt>c:\temp\isoimage</tt>. line (see note below)# Create a new folder <tt>cTODO:\context</tt>. (see note below)# Copy everything under c:\temp\isoimage into c:\context. There should be one folder (/usrinstructions) and a few files.# Open the folder <tt>c:\context</tt> and double-click <tt>cdemo.bat</tt>.# 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.
A few notes on the procedure above:== [[TeX Live]] ==
* Perl reference distribution for (La)TeX for all platforms* released once per year and Ruby per se have nothing sent to members of TeX user groups on DVDs* used to do with ConTeXt, ConTeXt just needs them. So, if you have another Perl and Ruby (e.g. through cygwin), they are fine as long as they are in the system path. If you be gigantic; but since 2008 one can get through step #3 without doing #1 install separate packages and #2, fine.update them* It is up to you to choose the location where you unzip the file in step #5, no magic there. Just that you know where the files binaries are.compatible with ConTeXt Standalone* The actual location of the ConTeXt in step #6 tree 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?)is outdated* After you have verified everything works in step #9, you can toss <tt>cdemo.bat</tt> away and use <tt>cstart.bat</tt> to start everything. Make a link to * but it somewhere so that you can start the system by a shortcut or through the Start menu. ''Do not move the batch script anywhere,'' s possible to update it has to be run in the root directory of the distribution (e.g. <tt>c:\context</tt>).manually* Make sure you have something Acrobatish (any decent PDF viewer) installed, otherwise you won't see the results in step #9.* new ConTeXt update mechanism is being prepared
{{todo|explain how ''Another distribution worth mentioning is [http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html W32TeX] that came to choose which ConTeX our attention when Akira (its author) was the first one to execute in case there manage to compile [[XeTeX]] for Windows, and still provides the very latest Windows binaries for [[XeTeX]], [[LuaTeX]], [[pdfTeX]], [[MetaPost]], ... Distribution is also MikTeX ot a bit specific, but his binaries are great - compatible with [[TeX Live installed; explain the best way for updating}}]] and used in [[ConTeXt Standalone]].''
== MikTeX or ProTeXt =[[ConTeXt Standalone]] with TexWorks =
* http://www.miktexThis assumes you are not already using a LaTeX distribution like MikTeX.org/* http://www.tug.org/protext/ (MikTeX based distribution, includes TeXnicCenter, GhostScript and WinEdt)
MikTeX # 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>--context=current</code># It is probably a good idea to make sure ConTeXt is visible from the easiest PATH. In Windows 7, you should go to System > Advanced > Environment Variables and most recommended solution for newbies or for those who have already been add <code>C:\context\tex\texmf-mswin\bin</code> to your 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 LaTeX <code>context filename.tex</code>.# Install the [http://www.tug.org/texworks/ TexWorks] standalone and accept the default options upon installation.# Go to Preferences > Typesetting and don't want add the directory where <code>context.exe</code> is located. It is the same one you added to install your PATH.## Next, under Processing Tools, create a new one and call it anything elseyou want. In the Progream field, enter the path of <code>context.exe</code>, the same as above. MikTeX is very user-friendlyIn the Arguments section, add <code>$fullname</code> and you are done.# Now populate the screen with ConTeXt code, updating is very easyselect ConTeXt and press Typeset. A PDF screen should pop up with the document.
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 =GhostScript ==
Try running texexec --versionIn most cases MikTeX should install the required package for ConTeXt automatically (if not installed yet). It's additionally recommended to download [* http://www.pragma-adecs.comwisc.edu/~ghost/context* http:/current/cont-winwww.zip cont-winghostscript.zip] and to copy <code>texmfstart.exe<com/code> from the zip file into <code>[MikTeX PATH]\miktex\bin</code>.
=== After If you install or change something ===already worked with (La)TeX before, you probably already have it installed. Try gswin32 --version
* You have to download GhostScript (filename ''MikTeX Options -'<code> General -gs851w32.exe</code> File name database -> Refresh Now''* 'or a similar one) and preferrably GSview as well ('MikTeX Options -> General -> Format Files -> Update Now''* ''MikTeX Options -<code> Roots -gsv47w32.exe</code> [select one] -> Refresh FNDB''' or similar). Be sure to include the executables (folder where gswin32.exe is located) into the PATH variable.
''(Don't forget to run the '''MikTeX Update Wizard''' regularly!)''= Special Notes ====Installation Instructions===
=== Additional settings ==={{todo|I made an example how to use the stand-alone distr. isolated from an existing distro. I would like to "join" this somehow with the first section and move opening of <code>cdemo.bat</code> to something like <b>testing the installation</b>. Perhaps <tt>pragmatex.bat</tt> can be executed with autorun or something if one is not using another TeX distribution.}}
Some default "security settings" (not really relevant for you unless you run it ''by Ville Voipio 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 yetmailing list, copy the file <code>cont2006-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>cont01-sys.tex</code> accordingly.* Create a file <code>[localtexmf PATH]\miktex\config\miktex.ini</code> and add the following line to it: write18=enable19''(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.modified)''
Here is a step by step of how it should go (<code>[MikTeX PATH]</code> and <code>[localtexmf PATH]</code> are chosen during the installationi.e. If you don't know what they are, take a look at ''MikTeX Options -> Roots''I did with success):
I don't know why # Install Perl and when exactly this is needed (Ruby# Download [[MPtoPDFhttp://www.pragma-ade.nl/context/install/mswincontext.zip mswincontext.zip]] may cause problems, 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>), butand a few files in it.# Open the folder <code>c:\Programs\context</code> and double-click <code>cdemo.bat</code>. set TEXSYSTEM=miktex# Now you should see the editor SciTE open with a few files. Press F7 to compile one of the files.may help If everything goes smoothly, you are done. If not, read these instructions again carefully. If you solving some problemscannot get it work, mail the list.
== TeX Live or XEmTeX =={{todo|review these steps: join the information - notes about ruby, Acrobat, ... apply to all windows distributions.}}
* httpA few notes on the procedure above://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 It is up to you to choose the documentation. {{todo|can someone with any experience write something about it?}} = 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 location where you unzip the two scripting languages file in other operating systems as wellstep #2, but installing them under Windows may be a bit less intuitive for a newbie than under Linuxno magic thereYou 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)Just that you know where the files areAfter installing them (remember * The actual location of the folder where you've put them!) you have to check if both executables are included ConTeXt tree in the PATHstep #2 does not matter. Open the command line (''Start'' -> ''Run'' ... -> type '''I use <codett>cmdc:\context</codett>''' or '''<code>command</code>''') and check if perl --versionand ruby --versionwork OK, but you might use something elseIf windows complains about ''"Command However, I would not found"'', go to the ''Control Panel'' -> ''System'' -> ''Advanced'' -> click on the ''"Environment variables"'' and choose '''path''' in ''"system variables"''. Type use anything with a space in the path name (e.g. D<tt>c:\Program Files\Perl\bin\;context</tt>) 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 as that may happen that you will never use those scriptsconfuse things.)'' == Installing GhostScript == * http://www[Seems to work with an August 2006 stand-alone distribution.cs.wisc.edu/~ghost/]* http://www.ghostscript.com/ If After you already worked with (La)TeX beforehave verified everything works in step #3, you probably already have it installed. Try gswin32 --version You have to download GhostScript (filename '''can toss <codett>gs851w32cdemo.exebat</codett>''' or a similar one) away and preferrably GSview as well ('''use <codett>gsv47w32cstart.exebat</codett>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,' or similar). Be sure ' it has to include be run in the root directory of the executables distribution (folder where gswin32e.g.exe is located<tt>c:\Programs\context</tt>) into the PATH variable== Other useful software == Assuming that * Make sure you already have Adobe Reader something Acrobatish (if notany decent PDF viewer) installed, otherwise you can get it [http://www.adobe.com/products/acrobat/readstep2.html here]; you donwon't need it to compile your documents, but at least to see the results), in step #4.* A final note: to have it finally running you should build the formats first. To do so there is still some software still worth mentioning.at least a way:
* [http (assuming C://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]]\Programs\context)* [[LilyPond]] Start->Run->cmd* [[Font Tools]] cd C:\Programs\context* .. cdemo. ?bat
= Choosing a [[Text editor]] & compiling = Then close the SciTe window but remain in the cmd.
== For newbies (like Word (ex)users) == Then, in one line: C:\Programs\context\usr\local\context\tex\setuptex.bat C:\Programs\context\usr\local\context\tex
{{todo|Explain the difference between GUI/text editor/compiler/PDF document; people often ask me: "ConTeXt texexec - oh, you mean that program with a blue screen and colourful fonts?"}}-make --all
* '''SciTE''' or '''[http://www.winedt.com WinEdt]''' or Textpad may be a good choice for a newbie Then, close the cmd, double-click in cdemo.bat and voila !
WinEdt has a rich graphical user* Another way to do it could be to type: texexec -interface, but more support for LaTeX than for ConTeXt.ConTeXt support for SciTE was written by Hans Hagen (the ConTeXt developer himself) and also includes recognition and auto-completion of most frequent ConTeXt commandsmake --all directly in SciTe console.
''(You need ===How to install WinEdt AFTER use the installtion of stand-alone distr. if you have MikTeX, GhostScript and Adobe Reader for Windows.)''/TeX Live installed===
{{todo|Someone should write how # 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 install SciTE & ConTeXt support for it without installing 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:
=== For gurus (like (La)TeX users or programmers) ===<pre>call C:\Programs\context\usr\local\context\pragmatex.bat context filename.tex</pre>
You probably already have If you place the <code>pragmatex</code> file in your favourite [[Text editor]] (or at least you know what we're talking about) and ConTeXt directory, this will allow you may skip this. If not, take a look at the [[Text editor]] page to help you choose call ConTeXt from anywhere on your computer with oneclick.* [[Vim]] or [http://www.emacswiki.org/cgi-bin/wiki Emacs] may be a good choice if youThe disadvantage is that it're willing s linked to invest some time into learning them - it may be worth the efforta specific .tex file.
== Compiling =Use the same .bat file to run ConTeXt with any .tex file===
After you've done all that, you # You can finally use your favourite editor to write your [[First Document|first document]]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>
To compile and save itas ConTeXtthis.bat. Now, open the command line again (Start -you can use it this way:<pre> Run .ConTeXtthis.bat anyfile. -tex </pre> type '''cmd''' or '''command''') and run texexec yourfilename
Some text editors support automatic compiling:* F?? in SciTE* ?? in WinEdt* see [[Vim#Makefile|makefile]] for VimWhere anyfile.tex is your main ConTeXt source file. This whole instruction works well whit TeXnicCenter
{{Installation navbox}}
[[Category:Installation]]

Navigation menu