mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] Keyboard Reference Card?


Chronological Thread 
  • From: "Mateu Hunter" <address@hidden>
  • To: Marten Bauer <address@hidden>
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] Keyboard Reference Card?
  • Date: Fri, 21 Oct 2005 23:54:49 -0400

Hello Marten,

I have been pondering your exact question. It seems there is no explicit
documentation of menu functions available in scheme that is exhaustive.
Currently for me the best way I've found to create a new keyboard binding is
to search for the menu function name within the scheme menu programs found in
the progs subdirectory of the texmacs path which on my machine is:

/usr/share/TeXmacs/progs

Within in this directory are other subdirectories that contains files such as:
file-menu.scm
document-menu.scm
edit-menu.scm
session-menu.scm

The first three correspond to top level menus while the last scheme program
is for the insert->session submenu.

A few specific examples of keyboard mappings that I have made in my
my-init-texmacs.scm file are:

The menu action "close session" is found in the scheme program
session-menu.scm which is located in the progs/dynamic/ directory. It´s menu
item is associated with the function (connection-stop). Thus I create an
(emacs style) key sequence for closing a session as follows in my
my-init-texmacs.scm file.
("C-x C" (connection-stop))

Likewise the menu action "insert title" is defined in
progs/text/text-menu.scm as (toggle-preamble). Thus using the keyboard mapping
("C-x T" (toggle-preamble))
will allow one to insert a title by typing Control-x E

Another menu action that may be worth having at the finger tips is switching
between edit source tree and wysiwyg mode. The Edit source tree scheme
function is found in document-menu.scm as (make-doc-data). Thus we can map it
to Control-x T with
("C-x E" (make-doc-data))

A final example is mapping Control-x I to load the table of contents to the
interfacing help files.
("C-x I" (load-help-buffer "devel/interface/interface"))

An example of an my-init-texmacs.scm using the above mappings and some other
mappings is:


(kbd-map
("C-x R" (make-session "R" "default"))
("C-x G" (make-session "gnuplot" "default"))
("C-x P" (choose-file print-to-file "Save pdf file" "pdf"))
("C-x V" (preview-with-ghostview))
("C-x S" (connection-stop))
("C-x E" (toggle-preamble))
("C-x T" (make-doc-data))
("C-x I" (load-help-buffer "devel/interface/interface"))
)



J'està

Mateu


PS
I have specifically chosen key sequences that aren't currently being used by
texmacs. It is possible to override existing keyboard settings with (mode:
prevail?) inside the kbd-map




En Marten va escriure...
> Hello to you all,
>
> In one of the last postings I read that I can do word completetion with
> TAB/S-TAB and
> I was surprised about this feature. Now I tried to find a document where
> all Keyboard-Shortcuts
> printed. But I do not find something similar.
>
> Where can I see all Keyboard-Shortcuts? Only in the sourcecode?
>
>
> Greetings
> Marten


  • Re: [TeXmacs] Keyboard Reference Card?, Mateu Hunter, 10/22/2005

Archive powered by MHonArc 2.6.19.

Top of page