Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] Feedback on texmacx

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] Feedback on texmacx


Chronological Thread 
  • From: "Sam Liddicott" <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] Feedback on texmacx
  • Date: Wed, 16 Jun 2010 21:23:39 +0100
  • Envelope-to: address@hidden
  • Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAADxQTFRF NTdQY2Z/i286eHFugnNXoJBwm5GCs5VeoqO0ua+fwLCQ4c2q19C81NDF4eLr/unQ/PTf/fXW+/rq /f/7XKo76wAAAAlwSFlzAAALEwAACxMBAJqcGAAAAi9JREFUSMetloGSqyAMRVsFNAQkxP//15cE 62rFdt/MZqbTVu/hBhLEx/qf8fgDIAN455wHyPk7wCIe9nA+fwGSH87hgD8AHPfRpy2GwdMtcBh+ mg4Ech9Ih+RNixJKDLEL0GF8VLkSojePHrDlryNijbFW8zBg8PUKbBOI6D1WCV5Rf2DzxCtgBlMs tRRVW5LyVW3ew1TfAZZ6RcQicpb4yZmaC74DJADK6BdATOrUAbJzsZie+K22ZnEBknNYysvhVH6u 1X8CqAe4DuANoPoOrAbsHXUARJ5knc5z4EyyTnHoAqj7xvkYIdk65AwhyEZKMusOIDV2QQQaCnDQ gBiDR3RdIEb5CBESt2wgQJI0Yx/Agphg1MgNsD+QkszM9wHVPx/PeQOW+fmcR9DF8+4CyCJhCuP8 fDzmBbLqs8JzMODqYNfDvKhoGYM2lDosy5jlRozccRAgrPM8iygQS3Mv87IugUgKlC7NZ6liuy4r uresVq5QuQAr09ZKEga8OkluyKXeQ6Bs3SrtqgC1pWLNqAfwDhBnB+sK8OrVL4D4h1B4zWPWhJhu gPUHKA5EwSMYUMsdQK+UKDhIOTSHeg+8HCoTOGtB/gwcl4mSdGybwXegPWhM/RHYKwchkckhUNMX 6j7ueQNScLbZZOPRxaADyO2UQCJpl7wbnE6gQ+ksWjpngxOwF1tF5ecP3R6KB+AQxPfHLncQ+nKw 06fhu68OTIfJ869eTtg22l+9zfwDK3mKl5BFHMYAAAAASUVORK5CYII=

On 16/06/10 17:18, Michael Lachmann wrote:
On 11 June 2010 18:04, Sam Liddicott <address@hidden> wrote:
I really miss latex's lstlistings. I wrote a literate programming addon for
Lyx (http://www.nongnu.org/newfangle/index.shtml). The weave side was done
entirely in latex macros and based on lstlistings, and the tangle side was
done with a single awk script. I see that texmacs replaces tex mostly (fair
enough, the difficulties in parsing tex drove me to texmacs). I intend to
port the literate programming to texmacs and implement as xslt and guile.  I
guess I'll have a lot to do to get lstlistings ported. Mainly it had syntax
highlighting and line counting, but it had some freaky tricks to approximate
per-word grids for fake mono-spacing with variable fonts. (I know about
lp4texmacs).

I've been using texmacs for literate programming over the last year
with a bunch of hacks.
There is a small environment for texmacs to install that makes a new
document class, 'noweb'. The document is exported to verbatim from
within texmacs, and then I run  notangle on it to get the various
parts. I haven't implemented a nice make interface as you have. One
nice feature is that because of texmacs' sessions, at the end of the
document I have a shell session and a scheme session that I use to
generate everything. So I don't need to remember how to do stuff.

Inserting a new section is done with ctrl-2, and a link to a prev
section with ctrl-1. It is nice that once that is done you can easily
jump between the different parts of the program.

Syntax highlighting of the different languages has to be hard coded
using cpp for now....

It would really be nice to make it less hacky, add some make
possibility that recognizes changes, and the possibility to reassemble
the document from the files so that you can edit your code in whatever
editor you want....


I'm quite excited by the guile/scheme integration, for once it may mean that references to other blocks can be expanded, and possibly even edited in-situ.

But it seems like the main task will be re-writing lstlistings in scheme. I know how the keywording works in lstlistings, by looking for keywords that are not in quoted strings, so I think I can do that.

On partially implemented feature in newfangle is automatic contextual quoting, so that if a chunk of text is included in a line that begins with // that all the lines have // prefixed; or if a chunk of text with a newline in is included within a string definition, the newline is replaced with \n"<literal-newline>"

and so on; but I found this to be difficult with languages like perl where $a=~m/a/; and $a=~s|a/|b/|; are both regex type stuff and quite hard to detect where the regex starts and ends; so I can't automatically do such stuff in perl; but as the Texmacs editor is so great with it's macro editing I can quite easily have the human markup regexes and so-forth and not need to automatically detect all of it!

Please could you tell me where to get the literate stuff you have been doing?

Sam

--
Sam's signature



Archive powered by MHonArc 2.6.19.

Top of Page