Hello All,
  I am writing a project report for a PHP project I have completed and
I need to include the code I have written. I would like to have code
that is highlighted similar to the editor I use (it's Notepad2 but I'm
sure most of you know what I mean), has line numbers and is in a
monospaced font.

  Now I know that ConTeXt itself doesn't have support for PHP
highlighting but I have found something in the third party modules
that is able to use ViM to do what I want. Unfortuantely, I can't get
it to work, hence why I am here!

  I'm on Windows XP and I am using the standalone ConTeXt distribution
from the 22nd March 2007. When I came to install the module, I found
that it was already included in the distribution. I have installed the
distribution under C:\ConTeXt\ along with Perl (C:\perl\) and Ruby
(C:\ruby\). What is non-standard in my setup is my own custom built
batch file:

set file=c_Implementation
call C:\ConTeXt\usr\local\context\tex\setuptex.bat
C:\ConTeXt\usr\local\context\tex
call texmfstart texexec --pdf %file%

rem Clears up the log files and puts them in separete directory.
if exist %file%.log move %file%.log Log\%file%.log
if exist %file%-mpgraph.mp move %file%-mpgraph.mp Log\%file%-mpgraph.mp
if exist %file%.tmp move %file%.tmp Log\%file%.tmp
if exist %file%.tui move %file%.tui Log\%file%.tui
if exist %file%.tuo move %file%.tuo Log\%file%.tuo
if exist mpgraph.mp move mpgraph.mp Log\mpgraph.mp
if exist %file%-mpgraph-temp-mpgraph.mp move
%file%-mpgraph-temp-mpgraph.mp Log\%file%-mpgraph-temp-mpgraph.mp
if exist %file%-mpgraph-temp.dvi move %file%-mpgraph-temp.dvi
Log\%file%-mpgraph-temp.dvi
if exist %file%-mpgraph.log move %file%-mpgraph.log Log\%file%-mpgraph.log
if exist %file%-mpgraph.mp.keep move %file%-mpgraph.mp.keep
Log\%file%-mpgraph.mp.keep
if exist %file%-mpgraph.1 move %file%-mpgraph.1 Log\%file%-mpgraph.1
if exist %file%-mpgraph.mpb move %file%-mpgraph.mpb Log\%file%-mpgraph.mpb
if exist %file%-mpgraph.mpo move %file%-mpgraph.mpo Log\%file%-mpgraph.mpo
if exist %file%-mpgraph.mpx move %file%-mpgraph.mpx Log\%file%-mpgraph.mpx

rem Runs whatever is associated with PDF files
if exist %file%.pdf start %file%.pdf

I'll put that in the directory of the .tex file I want to run it on.
In this case it is "c_Implementation.tex". My implementation file
looks like this:

\startcomponent c_Implementation
\product ../prd_TennisClubBookingSystem
\project ../../prj_School

%%%%%%%%%%%%%%%%%
% Setup Figures %
%%%%%%%%%%%%%%%%%
\setupexternalfigures[directory={Implementation/Figures,Figures}]

%%%%%%%%%%%
% Content %
%%%%%%%%%%%
\chapter[cha:Implementation]{Implementation}

\setupcolors[state=start]

\definevimtyping [RUBY] [syntax=ruby]
\startRUBY
#! /usr/bin/ruby
# This is my first ruby program
puts "Hello World"
\stopRUBY

And when I run my batch file on it, TeXexec returns the error:
! Undefined control sequence.
l.36 \definevimtyping
                      [RUBY] [syntax=ruby]

I think where I am falling down is that ViM doesn't seem integrated to
me. I have it placed under C:\Programs\ViM\ and I used the installer
which has all the different types GUI and command line version as
well. Do I need the set something up in the module to make it know
where ViM is or do I need to somehow directly use ViM itself?

Thank you for reading and thank you in advance for any help!

Chris
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to