Subject: mailing-list for TeXmacs Users
List archive
- From : Karl Hegbloom <address@hidden>
- To: address@hidden
- Subject: Re: [TeXmacs] Folding, for exams with answer key.
- Date: Thu, 10 Nov 2005 13:30:47 -0800
Here's the Scheme support for that. I want to work on improving the
layout somewhat. I want the <hflush>( /10) to be on the same line as
the problem, but it must be inside the folded environment for everything
to work right. A negative vspace did not do what I wanted.
Also, the cursor movements in the scheme code don't do what I want.
There cursor is still left at the end of the newly inserted block, and I
have to push [Home] to get to where I want to be.
--
Karl Hegbloom <address@hidden>
;;; make-folded-answer.scm
;;;
;;; 2005 Karl Hegbloom <address@hidden>
;;;
(define (make-folded-answer vspace)
  (insert `(unfolded (document
		      (document
		       (fold-back (traversed
				   (folded (concat (hflush) "(  /10)")
					   (vspace ,vspace))))))
		     (document "Write the answer here.")))
  (go-left)
  (go-start-line))
(tm-define (make-folded-answer-interactive)
  (:synopsis "Make a folded test answer block")
  (:interactive)
  (interactive make-folded-answer
    (list "Vertical space:" "string" "1in")))
;;; You may like to have the following in your 'my-init-texmacs.scm' file:
;;;
;;; (kbd-map
;;;   (:mode in-text?)
;;;   ("C-c a" (make-folded-answer-interactive))
;;;   )
;;; my-init-texmacs.scm
;;;
;;; Karl Hegbloom <address@hidden>
;;;
(load-from-path "make-folded-answer")
(kbd-map
  (:mode in-text?)
  ("C-c a" (make-folded-answer-interactive))
  )
- Folding, for exams with answer key?, Karl Hegbloom, 11/09/2005
- Re: [TeXmacs] Folding, for exams with answer key?, Corey Sweeney, 11/10/2005
- Re: [TeXmacs] Folding, for exams with answer key?, Karl Hegbloom, 11/10/2005
- Re: [TeXmacs] Folding, for exams with answer key?, Karl Hegbloom, 11/10/2005
- Re: [TeXmacs] Folding, for exams with answer key., Karl Hegbloom, 11/10/2005
- Re: [TeXmacs] Folding, for exams with answer key?, Joris van der Hoeven, 11/11/2005
 
 
- Re: [TeXmacs] Folding, for exams with answer key?, Karl Hegbloom, 11/10/2005
 
- Re: [TeXmacs] Folding, for exams with answer key?, Corey Sweeney, 11/10/2005
Archive powered by MHonArc 2.6.19.
