[tug-summer-of-code] A hyperlinked and highlighted version of sample2e.tex

Jonathan Fine jfine at pytex.org
Tue Mar 24 07:59:03 CET 2009


Arthur Reutenauer wrote:
>> Arthur:  Do you have any helpful or encouraging comment about the work I 
>> reported in my message?
> 
>   I wondered about how you handled things like:
> 
> 	\newcommand{\ip}[2]{(#1, #2)}
> 
> in the current code.  Both control sequences are linked to an
> independent page, which I think is not right: \newcommand should of
> course have a page of its own (I understand it still needs to be
> written; that's why the link is broken); but \ip certainly shouldn't,
> since it's only defined in the document.

Arthur:  Thank you for this.

Yes.  This is a little bit thorny.  However, I'm confident that the 
hyperlinks will be useful even if some of them are broken, and so I this 
I'm inclined to be guided by the experience of early users.

Here are some possible solutions:

1.  Have the hyperlinker understand \newcommand.
2.  Link only to commands that are in a dictionary.
3.  Have the document state up front, that such-and-such are the 
commands it provides.  (This is like 1, except easier for me).
4.  Do nothing.

I'm inclined to have simple constructs like \newcommand understood, but 
implementing this is not yet a priority.  However, (2) might also be 
sensible, if the dictionary is large enough.

>   Maybe trying to do both syntax highlighting and command reference in
> the same code is too much; do you have any plan on how to deal with
> that?

I've written only about 200 lines of fairly simple code, so the it's not 
yet time for refactoring.

I think my next priority is to write  a 'dtx2html' translator, so that I 
  can produce some pages to link to.

My other priority is to write regular expressions that will hilight and 
hyperlink style files (rather than tex documents).

-- 
Jonathan






More information about the summer-of-code mailing list