Changes

Jump to navigation Jump to search
3,594 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===You first need to choose a TeX distribution. Options are:
{{todo|I made an example how == [[ConTeXt Standalone]] ==* the official ConTeXt distribution* easy to use the standkeep up-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> -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 something like <b>testing the installation</b>. Perhaps <tt>pragmatex.bat</tt> use ConTeXt** if you need it, you can be executed with autorun have ConTeXt Standalone installed parallel to [[TeX Live|TL]] or something if one is not using another TeX distribution.}}[[MikTeX]]
''There are two ways to install it on Windows:* use GUI intaller by Ville Voipio on the mailing list, 2006Vyatcheslav [http://minimals.contextgarden.net/setup/context-01installer/] (sets environmental variables globally)* install from command-19'' line (modifiedTODO: instructions)
Here is a step by step of how it should go (i.e. what I did with success):== [[TeX Live]] ==
# Install [[Windows Installation#Installing Perl and Ruby|Perl and Ruby]]* reference distribution for (La)TeX for all platforms# Download [http://www.pragma-ade.com/context/install/mswincontext.zip mswincontext.zip], unzip it * released once per year and move/rename the <code>isoimage</code> folder sent to your favourite destination. The instructions to follow assume that you renamed <code>isoimage</code> members of TeX user groups on DVDs* used to <pre>c:\Programs\context</pre> There should be gigantic; but since 2008 one folder (<code>usr</code>) can install separate packages and a few files in it.update them* binaries are compatible with ConTeXt Standalone# Open the folder <code>c:\Programs\context</code> and double-click <code>cdemo.bat</code>.* ConTeXt is outdated# Now you should see the editor SciTE open with a few files. Press F7 ** but it's possible to compile one of the files.update it manuallyIf everything goes smoothly, you are done. If not, read these instructions again carefully. If you cannot get it work, mail the list.** new ConTeXt update mechanism is being prepared
{{todo|review this steps''Another distribution worth mentioning is [http: change step numbers //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 join still provides the information - notes about rubyvery latest Windows binaries for [[XeTeX]], [[LuaTeX]], [[pdfTeX]], Acrobat[[MetaPost]], ... apply to all windows distributionsDistribution is a bit specific, but his binaries are great - compatible with [[TeX Live]] and used in [[ConTeXt Standalone]].}}''
A few notes on the procedure above:* 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 are.* 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 Standalone]] with a space in the name (e.g. <tt>c:\Program Files\context</tt>), as that may confuse things. (Has anybody tried lately?)* 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 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 #9.TexWorks =
===How to use the stand-alone distr. if This assumes you have are not already using a LaTeX distribution like MikTeX/TeX Live installed===.
# Create a file 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>pragmatexfirst-setup.bat</code> (from the name doesn't really matter) with command line. By default, this content: 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 PATH. In Windows 7, you should go to System > Advanced > Environment Variables and add <precode>C:\Programs\context\usrtex\localtexmf-mswin\context\tex\setuptex.bat bin</code> to your user PATH, assuming you put your ConTeXt folder in <code>C:\Programs\</code>. This will allow you to run ConTeXt from the command line anywhere, using <code>context\usr\local\context\filename.tex</precode>.# Install the [http://www.tug.org/texworks/ TexWorks] standalone and accept the default options upon installation.# Go to Preferences > Typesetting and make sure that this file is visible by add the directory where <code>PATHcontext.exe</code>is located. It is the same one you added to your PATH.# You can safely continue using your old TeX distribution (MikTeX# Next, TeX Liveunder Processing Tools, ...). If create a new one and call it anything you want to invoke . In the stand-alone distributionProgream field, just execute enter the path of <precode>pragmatexcontext.exe</precode> from , the command-line and all same as above. In the subsequent calls to Arguments section, add <code>texexec$fullname</code> will use files from the stand-alone tree (and you'll notice are done.# Now populate the difference in file names when running screen with ConTeXt code, select ConTeXt)and press Typeset. A PDF screen should pop up with the document.
===Updating the installation===
{{todo|explain the best way for updating}}== GhostScript ==
== MikTeX or ProTeXt ==* http://www.cs.wisc.edu/~ghost/* http://www.ghostscript.com/
* http://wwwIf you already worked with (La)TeX before, you probably already have it installed.miktex.org/Try* http://www.tug.org/protext/ (MikTeX based distribution, includes TeXnicCenter, GhostScript and WinEdt) gswin32 --version
MikTeX is probably the easiest and most recommended solution for newbies You have to download GhostScript (filename '''<code>gs851w32.exe</code>''' or for those who have already been using LaTeX a similar one) and donpreferrably GSview as well ('''<code>gsv47w32.exe</code>'''t want or similar). Be sure to install anything elseinclude the executables (folder where gswin32. MikTeX exe is very user-friendly, updating is very easylocated) into the PATH variable.
However, some more experienced users may not always be happy with it:= Special Notes =* 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===Installation Instructions===
=== Packages that you need ==={{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.}}
Try running texexec ''by Ville Voipio on the mailing list, 2006-01-versionIn most cases MikTeX should install the required package for ConTeXt automatically 19'' (if not installed yetmodified). It's additionally recommended to download [http://www.pragma-ade.com/context/current/cont-win.zip cont-win.zip] and to copy <code>texmfstart.exe</code> from the zip file into <code>[MikTeX PATH]\miktex\bin</code>.
=== After you install or change something ===Here is a step by step of how it should go (i.e. what I did with success):
* ''MikTeX Options # Install Perl and Ruby# Download [http://www.pragma-ade.nl/context/install/mswincontext.zip mswincontext.zip], unzip it and move/rename the <code>isoimage</code> General -folder to your favourite destination. The instructions to follow assume that you renamed <code>isoimage</code> File name database -to <pre> Refresh Now''* ''MikTeX Options -c:\Programs\context</pre> General -There should be one folder (<code> Format Files -usr</code> Update Now'') and a few files in it.* ''MikTeX Options # Open the folder <code>c:\Programs\context</code> and double-click <code> Roots -cdemo.bat</code> [select .# Now you should see the editor SciTE open with a few files. Press F7 to compile one] -> Refresh FNDB''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.
''(Don't forget {{todo|review these steps: join the information - notes about ruby, Acrobat, ... apply to run the '''MikTeX Update Wizard''' regularly!)''all windows distributions.}}
If A few notes on the procedure above:* It is up to you to choose the location where you have any problems running ConTeXtunzip the file in step #2, checkno magic there. Just that you know where the files are.* ''MikTeX Options -The actual location of the ConTeXt tree in step #2 does not matter. I use <tt>c:\context</tt> TeX Formats -, 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<code/tt>cont), as that may confuse things. [Seems to work with an August 2006 stand-enalone distribution.]* After you have verified everything works in step #3, you can toss <tt>cdemo.bat</codett> away and use <tt> -cstart.bat</tt> Editto 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 #4.* A final note: to have it finally running you should build the formats first. To do so there is at least a way:
The following should be set (assuming C:\Programs\context) Compiler: pdfe Start-TeX (Exteded Mode) Input File Name: cont>Run-en.tex>cmd Output File Name cd C: ? (I've seen it empty & with name)\Programs\context Preloaded Format: [empty] Description: [anything] Exclude when updating: [unchecked] cdemo.bat
After ''Apply''-ing and ''Build''-ing, ''Refresh'' & ''Update'' as described above. This is Then close the MikTeX way for doing texexec --make --enThe latter has no influence since MikTeX doesn't set any system variables and consequently ConTeXt doesn't know where to leave SciTe window but remain in the created formatscmd.
=== Additional settings === Then, in one line: C:\Programs\context\usr\local\context\tex\setuptex.bat C:\Programs\context\usr\local\context\tex
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 texexec -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>contmake -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.)''all
(<code>[MikTeX PATH]</code> and <code>[localtexmf PATH]</code> are chosen during Then, close the installation. If you don't know what they arecmd, take a look at ''MikTeX Options double-> Roots'')click in cdemo.bat and voila !
I don't know why and when exactly this is needed ([[MPtoPDF]] may cause problems), but set TEXSYSTEM=miktexmay help you solving some problems* Another way to do it could be to type: texexec --make --all directly in SciTe console.
== =How to use the stand-alone distr. if you have MikTeX/TeX Live or XEmTeX installed===
* 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?}} = 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 Create 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 '''file <code>cmdpragmatex.bat</code>(the name doesn''' or '''t really matter) with this content: <codepre>command</code>''') and check if perl --versionand ruby --versionwork OKC:\Programs\context\usr\local\context\tex\setuptexIf 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. Dbat C:\Programs\Program Filescontext\Perlusr\binlocal\;) 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!)context\tex</ipre></b> If you have a working perl and ruby under cygwin and if they are in make sure that this file is visible by <code>PATH</code>, this might already work for ConTeXt .# You can safely continue using your old TeX distribution (although it's a better idea to use native Windows versions). HoweverMikTeX, if the inclusion of libraries in ruby fails (because of conversion of path names) and if you object to install ruby againTeX Live, 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><!-- * 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 beforewant to invoke the stand-alone distribution, you probably already have it installed. Try gswin32 --version You have to download GhostScript (filename '''just execute <codepre>gs851w32.exepragmatex</codepre>''' or a similar one) from the command-line and preferrably GSview as well ('''all the subsequent calls to <code>gsv47w32.exetexexec</code>''' or similar). Be sure to include will use files from the executables (folder where gswin32.exe is located) into the PATH variable. == Other useful software == Assuming that you already have Adobe Reader stand-alone tree (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 ll notice the resultsdifference in file names when running ConTeXt), there is still some software still worth mentioning* [http://www.pstoedit.net/pstoedit/ PStoEdit] for Windows is only needed in order # To avoid the need to be able open a new prompt each time you want 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: "run ConTeXt - oh, you mean that program with a blue screen and colourful fonts?"}} * '''[http://scintillacreate another .sourceforge.net/SciTEbat file in your .html SciTE]tex file''' or '''[https folder with the following content://www.winedt.com WinEdt]''' or [http://www.textpad.com/ Textpad] may be a good choice for a newbie. WinEdt has a rich graphical user-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 commands. ''(You need to install WinEdt AFTER the installtion of MikTeX, GhostScript and Adobe Reader for Windows.)'' {{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) ===<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