Subject: mailing-list for TeXmacs Users
List archive
From : David <address@hidden>- To: address@hidden
- Subject: Re: Code in TeXmacs
- Date: Mon, 7 Oct 2002 20:13:38 +0200
On Wed, Sep 18, 2002 at 09:30:32PM -0700, michael graffam wrote:
> I'd like to include some C code in a TeXmacs document,
> but it is horrendous to try and preserve C formatting.
>
> Does anyone have a way to bind <tab> to do reasonable
> identing to make entering code (and pseudo-code) more
> managable?
You may find an example of a structured solution in the allouche.ts
package (in the package/example directory). I defined a 'indent'
environment which increases the left margin by 4spc. Nested
indentation use nested indent environment. You may also define a
'code' environment and map the 'tab' key in 'code' to insert a
'indent'.
That would require something like:
(define (in-code?) (inside? "code"))
(set-keymap (in-code?) ("tab" (make-expand-arg "indent")))
--
David Allouche | GNU TeXmacs -- Writing is a pleasure
Free software engineer | http://www.texmacs.org
http://ddaa.net | http://alqua.com/tmresources
address@hidden | address@hidden
TeXmacs is NOT a LaTeX front-end and is unrelated to emacs.
- Re: Code in TeXmacs, David, 10/07/2002
Archive powered by MHonArc 2.6.19.