jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Mixing HTML and S-Lang ... easy way to do a mode?


Jeremy Cowgar <jc@xxxxxxxxxx> wrote:
>Using Jed, a HTML mode exists, and obviously a S-Lang mode exists. Is it
>somehow possible to mix these two modes together? Here's an example
>file:

You can always use "push_mode" to push the current mode to slang_mode
and then use "pop_mode" to restore the previous mode.  There are hooks
that you can use to have this happen automatically, but you would have
to write the code to recognize what the current mode should be.
However, this will not highlight both the HTML code and the S-Lang
code at the same time.

I take a completely different approach for this.  I have a jed-script
called "tmexpand" that expand a text-macro file into HTML.  The reason
I bring this up is that text-macro supports both S-Lang and text-macro
constructs in the same file.  However tm allows files to be
"included" during expansion.  So, I put my slang code in a .sl file
to be included by tmexpand.  For example, I am able to create web
pages with LaTeX equations by converting LaTeX to png images to be
displayed by the browser.  For an example of the result, see:
<http://space.mit.edu/CXC/analysis/davis/head2002/pileup.html>.
A separate file for the S-Lang code also affords me the possibility to
easily test the code.

If there is any interest in tmexpand, I can make it available once
0.99-17 is released.  It uses a few features from 0.99-17 and will not
work with 0.99-16.

--John

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]