Subject: mailing-list for TeXmacs Users
List archive
From : "Sam Liddicott" <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] Feedback on texmacx
- Date: Thu, 17 Jun 2010 09:43:37 +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=
That's pretty sweet stuff! I'm impressed. It's great that you can have references as a distinct semantic item. I'm wondering if guile will make parameterized chunks easier. If I can make ctrl-2 style chunks define first-class texmacs macros within the body, then ctrl-1 style references are really just regular texmacs macro invocations which can be activated or deactivated! Sam On 16/06/10 23:40, Michael Lachmann wrote: You can look a bit back up the list for the discussion. I'm using two files, I think: noweb.ts stored in ~/.TeXmacs/styles, and a few key bindings in ~/.TeXmacs/progs/my-init-texmacs.scm I installed noweb, and maybe that's it. Attached is a sample TeXmacs file. Tell me if it worked... Michael noweb.ts: -- <TeXmacs|1.0.7.2> <style|source> <\body> <use-package|jsc|tmdoc-traversal|tmdoc-markup|tmdoc-keyboard> <assign|noweb-fragment|<\macro|name|x> <\cpp-fragment> \<less\>\<less\><label|<arg|name>><with|color|red|<arg|name>>\<gtr\>\<gtr\>= <arg|x> @ </cpp-fragment> </macro>> <assign|noweb-ref|<macro|name|\<less\>\<less\><hlink|<arg|name>|<merge|#|<arg|name>>>\<gtr\>\<gtr\>>> </body> <\initial> <\collection> <associate|page-type|letter> </collection> </initial> <\references> <\collection> </collection> </references> -- The key bindings: in ~/.TeXmacs/progs/my-init-texmacs.scm: -- (kbd-map ("C-1" (make 'noweb-ref)) ("C-2" (make 'noweb-fragment)) ("C-9" (choose-file (texmacs-save-buffer "verbatim") "save verbatim file" "verbatim") ) ) -- On 16 June 2010 22:23, Sam Liddicott <address@hidden> wrote: 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 --
Sam's signature |
- [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/11/2010
- Re: [TeXmacs] Feedback on texmacx, Aleksandr Dobkin, 06/11/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/13/2010
- Re: [TeXmacs] Feedback on texmacs, Sam Liddicott, 06/14/2010
- Re: [TeXmacs] Feedback on texmacs, Sam Liddicott, 06/15/2010
- Re: [TeXmacs] Feedback on texmacx, Michael Lachmann, 06/16/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/16/2010
- Re: [TeXmacs] Feedback on texmacx, Michael Lachmann, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Michael Lachmann, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Michael Lachmann, 06/17/2010
- Re: [TeXmacs] Feedback on texmacx, Sam Liddicott, 06/16/2010
- Re: [TeXmacs] Feedback on texmacx, Aleksandr Dobkin, 06/11/2010
Archive powered by MHonArc 2.6.19.