From ConTeXt wiki
Jump to: navigation, search

< Text Editors


Nota bene

This page is outdated and describes the old installation and set of files. There is an updated manual: scite-context-readme.pdf. This file as well as all files needed are also part of the ConTeXt distribution.

There's also a newer and more detailed wiki page on how to install ConTeXt and SciTe on a machine that doesn't use other TeX distribution:

Also have a look at Textadept, a SciTE descendant that already includes the Lua Lexers and is also available for OSX. A Textadept module for ConTeXt is being developed at ta-context-latex.


SciTE is a Scintilla based text editor for Linux and Windows. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs. The ConTeXt distribution includes files which can be used to configure SciTE for editing and building ConTeXt documents.

See also the manual mcite.pdf for details of ConTeXt support. A non-native MacOS X version of SciTE is available via MacPorts.

Installing SciTE for ConTeXt

Installing on Windows

Note. If you are installing ConTeXt and SciTe simultaneously and do not have any other TeX related systems on your Windows, you may prefer to follow the Windows_Installation:_ConTeXt_Suite_with_SciTe instructions instead.

The following procedure has been found to work, assuming that the current ConTeXt distribution is installed in the folder C:\tools\context.

rem Use to start SciTE for ConTeXt
@echo off
cd \tools\context
call setuptex
cd \tools\scite\wscite
start scite.exe %1%
import context

Building a ConTeXt document is as simple as opening it in the editor and pressing [F7].

Configuring SciTe with ConTeXt on Windows

Building ConTeXt documents using MKII

SciTE builds pdf using MKIV (luatex) by default, to change to MKII (pdftex) alter the file as follows: Replace the line

name.context.texexec=$(name.context.mtxrun) --script context $(name.texexec.flag.pdfopen)

with the line

name.context.texexec=$(name.context.mtxrun) --usekpse texexec $(name.texexec.flag.pdfopen)

Using [Cntrl-2] (Change PDF viewer)

The default behaviour for [Cntrl-2] is to open a PDF using GhostView, to get it to use Acrobat Reader, proceed as follows:


then edit the lines beginning "command.2" as follows:

command.2.$(file.patterns.context)=$(name.context.acrobat) $(FileDir)\$(FileName).pdf
command.2.$(file.patterns.example)=$(name.context.acrobat) $(FileDir)\$(FileName).pdf

Spell checking

The spell checker can be configured as follows.


with this one


Using Latin Modern fixed-width font as SciTE display font

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


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 set up, it'll automatically start using the new font.

NB. It seems that this font doesn't have any Cyrillic, so add the font only if using just Roman letters.

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
# Unicode

Now uncomment (i.e. remove the hash sign) and comment (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
# Unicode

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

Installing on Unix

Assuming you installed SciTE successfully and followed the instruction in the manual in order to enable ConTeXt support, there may be a problem in correctly using the Tools (like compiling and building from within SciTE). The launcher inside your Applications menu may be unaware of your $PATH variable, which might lead to an error like

>mtxrun --autogenerate --script context --pdf myfile.tex
sh: mtxrun: not found
>Exit code: 127

To correct this you need to create your own launcher, which executes a script (call it runscite) running SciTE whilst ensuring the $PATH variable is correctly set. You can achieve this by following the code

cat <<'EOF' > /tmp/runscite 
export PATH=/usr/local/texlive/2010/bin/x86_64-linux:$PATH
exec scite $@ 

chmod +x /tmp/runscite

sudo cp /tmp/runscite /usr/local/bin

where the PATH needs to point to your mtxrun (and context) scripts. Then you can have your launcher use the command /usr/local/bin/runscite and then you should be able to build your *.tex files from within SciTE by pressing [F7].


Personal tools
External Help