[tug-summer-of-code] Project idea: Hyperlinked syntax highlighting for TeX code

Jonathan Fine jfine at pytex.org
Mon Feb 16 10:31:50 CET 2009


Will Robertson wrote:

>> This project has three parts.  The first is providing enhanced syntax 
>> highlighting for TeX code.  The second is creating a commands 
>> database.  The third is linking together the first and second parts.
> 
> The highlighting part is easy enough, right? All editors can do that 
> capably enough (although understanding keyval lists would be novel). And 
> the commands database should be straightforward albeit tedious.

The problem with editors is that there are so many of them.  This is why 
I suggest enhancing Pygments and Chili.  Once all is in place, the 
system can then be ported from web pages to Emacs, WinEdt, TeXShop, 
TeXWorks, Eclipse.  Oh, and editing in a web-page form.

The commands database could be interesting.  For example, it could 
provide example of use of a command.  Maybe with user contributed code, 
such as http://www.djangosnippets.org/ (whose source - less styles - is 
open source and documented in the "Practical Django" book).


> The value in this sort of system for me would be to provide the 
> information in such a way that interactive editors could use it as well 
> as pretty-printing engines. Having auto-complete and spell check while 
> writing documents/package would be quite the value proposition.

I agree, but this will be a student summer project, starting from close 
to scratch.


> With a system in place to support these ideas, formats such as LaTeX3 
> could provide features to aid integrating the syntax of new packages 
> into whatever this system is. (Such as producing a listing for CTAN of 
> all macros defined in a package.)

Yes.  If each package listed the command it provided etc.  As I 
understand it, ConTeXt has something similar.


> Ideas such being able to understand package and class options in LaTeX 
> would fit into this concept, as well. Even a short description (taken 
> from the CTAN catalogue) of what each package/class is.
> 
> * * *
> 
> So clearly there's scope for this sort of project; the utility of it 
> hinges fairly drastically around being able to be actually used 
> somewhere -- and where better than the TeXworks editor?

I suggest that if the student is well-placed to integrate what's done 
with an editor, that should be an optional end-of-project activity.  But 
I'd like to focus first on web-page delivery that is accessible to all.

But I'd like the project to focus on the core items I listed.  There are 
already enough large projects in progress.  I'd favour small simple 
useful projects that succeed.


> If there is more than one student interested, it would be possible to 
> get one working on the hyperlinked pretty-printing engine, and another 
> working on incorporating it into TeXworks.

I think the proposal I've written is nicely self-contained.  Maybe you'd 
like to write another proposal, Will, covering some of your ideas.

-- 
Jonathan


More information about the summer-of-code mailing list