Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] A simple

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] A simple


Chronological Thread 
  • From: Henri Lesourd <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] A simple
  • Date: Sun, 26 Oct 2008 20:48:35 +0100

Andrea Gamba wrote:

That's very nice!

Can you possibly explain how to perform a much simpler task, binding Ctrl-+
and
Ctrl-- to decrease/increase the shrinking ratio?

It's easy to find this by yourself: the following recursive grep
into the TeXmacs codebase:

/home/henri/TeXmacs/TeXmacs/src>grep -R 'Shrin' *|grep scm
TeXmacs/progs/texmacs/menus/preferences-menu.scm: (enum ("Shrinking factor" "shrinking factor")
TeXmacs/progs/texmacs/menus/view-menu.scm: (-> "Shrinking factor"
TeXmacs/progs/texmacs/texmacs/tm-view.scm: (:argument s "Shrinking factor")
/home/henri/TeXmacs/TeXmacs/src>

, then having a look inside view-menu.scm, you find:

(menu-bind view-menu
("Open new window" (open-window))
.................................
("Presentation mode" (toggle-full-screen-mode))
(-> "Shrinking factor"
("1" (set-shrinking-factor 1))
................................
("10" (set-shrinking-factor 10))
---
("Other" (interactive other-shrinking-factor))))

=> thus, the function to use to set the shrinking factor
is: (set-shrinking-factor <VALUE>)


Now, to do what you want, use this function inside the (kbd-map)s
of Christophe's program, and then you are done (inside the '+' handler,
you should increment the shrinking factor, and inside the '-' handler,
you should decrease it. I let the rest as an exercise in Scheme
programming for you. It also turns out that the function to read
the current shrinking factor is (get-shrinking-factor)).

Have fun !


It would be also nice that the window is always centered when zooming in/out.
Now it is aligned to the left, do you think it is possible to change this
setting?


No, there are no Scheme commands to change the alignment
of the displayed text inside the window (nor to move or
resize the TeXmacs window, btw).


Best, Henri



Archive powered by MHonArc 2.6.19.

Top of Page