Simple Windows Installation

From Wiki
Jump to navigation Jump to search

Note. Valid as of September 2009.

This page gives instructions on how to easily install ConTeXt Minimals and the SciTe editor on your XP or Vista so that you can compile a document with a few mouse-clicks. If this is not what you want to do, see the Installation page instead.

Step 1: Download all bits and pieces

  • ConTeXt: Vyatcheslav Yatskovsky's Windows installer for the Minimals is the hassle-free alternative
  • SciTE Editor: Go to Scintilla's SciTE Download Page and get full download in the "Windows executables" section. Make sure you get wscite.zip (not scite.zip).
  • Ruby (only needed for running pdftex, i.e. ConTeXt MKII): if you have files that need to be run in MKII/pdftex, download Ruby (a scripting language, a bit like Perl); if you start from scratch, Ruby is not needed!


Now you have all the files you need to successfully setup ConTeXt on your Windows computer. But do not drop the network connection yet! You will need internet to get the rest of ConTeXt while installing, which is why the Minimals Installer is so small itself.


Step 2: Install

  • Start ConTeXt installation by double-clicking on the downloaded installer .exe file.
    • before or during installation you can refer to instruction slides
    • take note of where your ConTeXt gets installed, you'll need to find those files for configuration
    • install the stable ConTeXt; you don't want your first tries to stumble on buggy beta code
    • when the ConTeXt installer has finished, you can move away from the network if needed.
  • Next, unzip SciTE to the location of your choice
  • If you need Ruby, install it by double-clicking the downloaded installer file. Do not install SciTE via Ruby installer (even thought it'll offer that), the One True SciTE is the one you get from Scintilla

Now all the components of a working system are installed: ConTeXt Minimals and SciTE for ConTeXt MKIV (only), ConTeXt Minimals, SciTE and Ruby for ConTeXt MKIV and MKII.


Step 3: Configure

  1. In your ConTeXt files (default name of the main folder is contextminimal) locate scite-ctx.lua. Copy this file to your recently unzipped SciTE folder (by default called wscite).
  2. Again in your ConTeXt files, locate scite-ctx.properties and context.properties. Copy these files to your personal profile folder; in XP that's usually C:\Documents and Settings\yourusername\ (or the equivalent in your language), in Vista C:\Users\yourusername.
  3. Now open SciTE by double-clicking on the SciTE icon. You still need to tell it where to look for the ConTeXt related settings. For this, go to the Options menu and click on Open User Options File. You should get a blank page. Now type into the file
import scite-ctx
import context

Remember to save the file to save these settings. Then close SciTE.


Step 4: Using ConTeXt

Open SciTE. Open a ConTeXt document (if you have any) or try with a simple "Hello world":

\starttext

Hello, world!

\stoptext

If you feel courageous, switch encoding to UTF-8 (if you haven't forced your SciTE to do it) and do it in Finnish (just cut and paste from below, if your keyboard doesn't do diacritics):

\starttext

Päivää, maailma!

\stoptext

Or, even better, do it in Russian:

\starttext

привет мир

\stoptext


Now you have a simple ConTeXt document. Press Ctrl+1 (or go to Tools and then Process TeX file), sit back and watch. If everything was done right, you'll end up with your new pdf in your Acrobat Reader.

Additional configuration

Using fixed-width font in SciTE

The default font in SciTE is a variable-width sansserif (Arial or similar). If you prefer to use a fixed-width font while coding, the minimal distribution comes with a neat Latin Modern font for this purpose. You can find the font at

\yourcontextmainfolder\texmf-context\fonts\truetype\hoekwater\lm\lmtypewriter10-regular.ttf

The only thing you need to do is to install the font as you'd install any TrueType font in your Windows. If you SciTE is otherwise correctly setup (i.e. step 3 is done), it'll automatically start using the new font.


Forcing SciTE to use UTF-8 as default encoding

If you plan to use SciTE only for ConTeXt or if all your files are in UTF-8 anyway, you can make UTF-8 as your default encoding. Especially if you start "from scratch", this is recommended!

To change the encoding setting, open SciTE and go to Options and there to Open Global Properties. Find Internationalisation in the settings file:

# Internationalisation
# Japanese input code page 932 and ShiftJIS character set 128
#code.page=932
#character.set=128
# Unicode
#code.page=65001
code.page=0
#character.set=204

Now uncomment #code.page=65001 (i.e. remove the hash sign) and comment code.page=0 (i.e. add a hash in front of the line. Now your internationalisation settings should look like this:

# Internationalisation
# Japanese input code page 932 and ShiftJIS character set 128
#code.page=932
#character.set=128
# Unicode
code.page=65001
#code.page=0
#character.set=204

Now save the settings file, close it, then close SciTE. When you restart SciTE, UTF-8 should be the default encoding.