Changes

Jump to navigation Jump to search
5,341 bytes added ,  11:33, 15 February 2017
m
updated links to textadept
< [[Text Editors]] >
=Nota bene= This page is outdated and describes the old installation and set of files. Thereis an updated manual: [http://www.pragma-ade.com/general/manuals/scite-context-readme.pdf 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: http://wiki.contextgarden.net/Windows_Installation:_ConTeXt_Suite_with_SciTe. 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 [https://github.com/stephengaito/ta-context-latex ta-context-latex]. =Introduction= [http://www.scintilla.org/SciTE.html SciTE] is a [http://www.scintilla.org/ Scintilla] based text editorfor 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 [http://www.pragma-ade.com/general/manuals/mscite-s.pdf manual mcite.pdf] for details of ConTeXt support. A non-native MacOS X version of SciTE is available via [http://www.macports.org/ 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.
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 MKII ===There are still some problems with MKiv, but SciTE builds pdf using MKiv MKIV (luatex) by default, to change to MKii MKII (pdftex) alter
the file context.properties as follows:
Replace the line
<pre>
name.context.texexec=$(name.context.mtxrun) --script context $(name.texexec.flag.pdfopen)
</pre>
with the line
<pre>
#name.context.texexec=$(name.context.mtxrun) --script context $(name.texexec.flag.pdfopen)
name.context.texexec=$(name.context.mtxrun) --usekpse texexec $(name.texexec.flag.pdfopen)
</pre>
=== 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:
* Edit the file context.properties to include the line:
* Make sure that the PATH environment variable includes the directory of the Acrobat executable (e.g. C:\Program Files\Adobe\Reader 8.0\Reader).
=== Spell checking ===
The spell checker can be configured as follows.
 
* First, construct a word list, which is just a file containing all the valid words in your language! For English, a suitable word list can be constructed from files at [http://wordlist.sourceforge.net/ wordlist.sourceforge.net], e.g. concatenating all the files starting with english* and british* up to level 70 from the Scowl-6 group is one option.
* Copy this new file to a suitable location, e.g. C:\tools\spell\spell-uk.txt
* The automatic language detection does not seem to work, so edit scite-ctx.properties, replace the line:
<pre>
ctx.spellcheck.language=auto
</pre>
with this one
<pre>
ctx.spellcheck.language=uk
</pre>
* Add the environment variable CTXSPELLPATH and make it point to the location of the word lists (e.g. C:\tools\spell).
* Restart SciTE, open a .tex file and press [Cntrl-B] to spell check the file. New words can be added to the word list, but you need to restart SciTE after each change.
 
=== 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
''\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 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:
<pre># 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</pre>
 
Now '''uncomment <tt>#code.page=65001</tt>''' (i.e. remove the hash sign) and '''comment <tt>code.page=0</tt>''' (i.e. add a hash in front of the line. Now your internationalisation settings should look like this:
<pre>
# 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
</pre>
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 [http://www.pragma-ade.com/general/manuals/mscite-s.pdf 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
 
<pre>
>mtxrun --autogenerate --script context --pdf myfile.tex
sh: mtxrun: not found
>Exit code: 127
</pre>
 
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
 
<pre>
cat <<'EOF' > /tmp/runscite
#!/bin/bash
export PATH=/usr/local/texlive/2010/bin/x86_64-linux:$PATH
exec scite $@
EOF
 
chmod +x /tmp/runscite
 
sudo cp /tmp/runscite /usr/local/bin
</pre>
 
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].
 
{{Installation navbox}}
[[Category: Text Editors]]
4

edits

Navigation menu