texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: [Texmacs-dev] Literate Programming in TeXmacs?

 From: Joris van der Hoeven Subject: Re: [Texmacs-dev] Literate Programming in TeXmacs? Date: Tue, 22 May 2007 10:16:07 +0200 User-agent: Mutt/1.5.9i

On Tue, May 22, 2007 at 01:37:35AM +0200, Ralf Hemmecke wrote:
> >A simple implementation that serves both purposes might look as
> >follows. Suppose snippets of code in the document are wrapped in an
> >environment like
> >
> >  <lp-code|label|body>
>
> >where label is an arbitrary string that marks which snippets belong
> >together and body is an arbitrary TeXmacs tree that is "the code".
>
> Hm, for "label" I don't want just any string but finally any text, i.e.
> an expression like
>    $\sqrt[3]{a+5}$

That depends on the purpose of your label. From an internal point of view,
we have a hyperlink system which works with string labels. But you can declare
any markup as being a label for your own purposes. Of course, you can always
use a routine which converts a tree into a string too.

> >* This bare-bones solution should be really simple to implement.
>
> Good. Why has nobody done it?

No time in my case; there are many interesting other projects,
and this is a typical project which can be done by someone else.

> >* One can add custom source code formatting and generation methods
> >  simply by writing a style file and accompanying export filter. This
> >  would
> >  - make use of standard TeXmacs mechanisms
> >  - tie in with the use of filters to store entire TeXmacs documents as
> >    ASCII source code files as David and I had envisioned
> >  - allow one to copy-and-paste fancy formatted code from TeXmacs into
> >    a text editor.
>
> Completely uninteresting for me at the moment. Formatting is something
> that comes last. I want a button that starts code extraction, that's all.

Recall that one major advantage of TeXmacs would be that mathematical
formulas can be rendered in a natural way. But I agree that,
together with syntax highlighting, this is a concern for stage 2.

> >* Instead of using a fixed environment name like "lp-code" and
> >  plain-text labels, one should probably use DRD properties and loci (I
> >  just have no idea how these work).
>
> DRD?

Properties of your markup (Data Relation Definition).

> loci?

The TeXmacs primitive for linkable parts of a document;
can be used in combination with styling and allows for
the implementation of an analogue of Xlink.
Basing your style macros on standard linking primitives will
allow you to use standard TeXmacs navigation tools.



reply via email to

 [Prev in Thread] Current Thread [Next in Thread]