Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] copying drawn images into a table

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] copying drawn images into a table


Chronological Thread 
  • From: Henri Lesourd <address@hidden>
  • To: Kamaraju Kusumanchi <address@hidden>
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] copying drawn images into a table
  • Date: Sat, 25 Nov 2006 18:19:49 +0100

Kamaraju Kusumanchi wrote:

On Friday 24 November 2006 05:00, Henri Lesourd wrote:

Kamaraju Kusumanchi wrote:

Let's I drew a image by
Insert -> Image -> Draw image

After this, say I create a table and want to copy the previously drawn
image into (1,1) element array of this table. How can I do that? Simple
copy and pasting does not seem to work. Any other ideas?

There used to be a slight bug with copying a graphics, namely,
the "Copy" operation doesnt always work once you surrounded
the graphics with the red selection. I just checked, I have this
problem in my current todo list.

But anyway, it always works if you perform the Copy operation
while in "Edit source tree" mode.


wonderful piece of hint. I had no idea about this. Using

Document -> View -> Edit source tree

and then doing copy+paste and then deselecting this option works fine. Is there any way to make the whole process quicker? The above process involves lot of mouse clicks and is very slow...


As for me, I use switching from wysiwyg <-> edit source tree very
often, thus I defined a keyboard shortcut for this :
<<
(kbd-map
("S-tab" (toggle-preamble))
)
>>

You put this in the (init) function of a plugin of yours,
and it should work.


Due to (perhaps currently solved, but I rather think they are not)
problems with the lazy loading of the plugins, if you want to
be **sure** that the keyboard shortcuts are activated immediately,
when TeXmacs starts, use :
<<
(keyboard-extend-forever
("S-tab" (toggle-preamble))
)
>>

, somewhere directly at level 0 (the level where the functions are
defined ; outside of any function) in one of the .scm files of one
of your personal plugins (or inside your my-init-texmacs.scm),
and put :
<<
; Permanent key mappings
(define-public kbd-map-old kbd-map)
(define kbd-map-looping #f)
(define-public-macro (kbd-map . l)
`(begin
(kbd-map-old . ,l)
(if (not kbd-map-looping)
(begin
(set! kbd-map-looping #t)
(always-key-mappings)
(set! kbd-map-looping #f)))))

(define (always-key-mappings) (lambda () #t))
(define always-key-mappings0 always-key-mappings)

(define keyboard-extend-forever-nb 0)
(define-macro (keyboard-extend-forever . body)
(define akm0 "")
(define akm1 "")
(set! akm0 (string->symbol (string-append "always-key-mappings"
(number->string keyboard-extend-forever-nb))))
(set! keyboard-extend-forever-nb (+ keyboard-extend-forever-nb 1))
(set! akm1 (string->symbol (string-append "always-key-mappings"
(number->string keyboard-extend-forever-nb))))
`(begin
(define-public (,akm1)
,(cons 'kbd-map body)
(,akm0))
(set! always-key-mappings ,akm1)))
>>

inside your my-init-texmacs.scm.

You can find a tutorial about how to define your own plugins,
keyboard shortcuts, menus, etc. at :
<<
http://www.ags.uni-sb.de/~henri/texmacs/aTeXmacsTutorial.pdf
>>


Hope it helps,

Henri




Archive powered by MHonArc 2.6.19.

Top of Page