Subject: mailing-list for TeXmacs Users
List archive
From : Marduk Bolaños <address@hidden>- To: Karl Hegbloom <address@hidden>
- Cc: texmacs-users <address@hidden>
- Subject: Re: [TeXmacs] Hide Maxima session from exported LaTeX file
- Date: Sun, 14 Feb 2016 09:24:14 -0600
I finally solved it writing these functions:
(define (exclude-session t)
(if (eq? (tree-label t) 'session)
(tree "")
t))
(define (export-exclude-maxima)
(let* ((old_name (buffer-get-title (current-buffer)))
(pwd (var-eval-system "pwd"))
(strip_ex (substring old_name 0 (- (string-length old_name) 3)))
(new_name (string-append pwd "/" strip_ex "-maxima" ".tm"))
(new_url (string->url new_name))
(new_body (tree-map-children exclude-session (buffer-tree)))
(new_stm `(document
(TeXmacs ,(texmacs-version))
(style (tuple "generic"))
(body (document ,new_body))))
(new_tree (stree->tree new_stm)))
(tree-export new_tree new_url "texmacs")
(load-buffer new_name)))
I hope this helps others trying to do literate programming in
TeXmacs.
Best,
Marduk
- [TeXmacs] Hide Maxima session from exported LaTeX file, Marduk Bolaños, 02/02/2016
- Re: [TeXmacs] Hide Maxima session from exported LaTeX file, Karl Hegbloom, 02/03/2016
- Re: [TeXmacs] Hide Maxima session from exported LaTeX file, Marduk Bolaños, 02/14/2016
- Re: [TeXmacs] Hide Maxima session from exported LaTeX file, Karl Hegbloom, 02/03/2016
Archive powered by MHonArc 2.6.19.