Skip to Content.
Sympa Menu

texmacs-users - [TeXmacs] Efficient edit mode

Subject: mailing-list for TeXmacs Users

List archive

[TeXmacs] Efficient edit mode


Chronological Thread 
  • From: Alvaro Tejero Cantero <address@hidden>
  • To: TeXmacs users <address@hidden>
  • Subject: [TeXmacs] Efficient edit mode
  • Date: Thu, 4 Nov 2010 18:55:21 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=QbyT8HFiGH6/eOxEtidok8+wehV6eOOALnTwRfvSqya+2vKDfgwyHBOgssKgn7v3Z4 CQdzTllHG7WCJoj4ZgZVQBQpjLiCh0cBCUc7eWuy1b7z3FdQJ0sWxgMvIaOoeEsjxRW7 2OVSt4icL48Uoo1GF+NuaT2f7hgGTHSse2dXg=

Dear all,

just for reference (see previous thread), here are a few shortcuts I
have been using for the last few years and that proved quite helpful.
They were developed with Klaus Hornberger during 2005; I have removed
those that are not anymore so useful in the present status of TeXmacs
or which do not produce well-structured mathematics.

I hope you find them useful!

file keyboard-efficient-edit.scm, to be loaded as

(lazy-keyboard (keyboard kbd-efficient-edit) always?)

from .TeXmacs/progs/my-init-texmacs.scm



-----------
;++ redefinition of important keys
(texmacs-module (keyboard kbd-efficient-edit)
(:use
(math math-edit))
(table table-edit))

(kbd-map
(:mode in-text?)

;-- Delete by words
("S-delete" (begin (kbd-select traverse-right) (clipboard-cut "ternary")))
("S-backspace" (begin (kbd-select traverse-left) (clipboard-cut "ternary")))

;-- <C-Return> inserts equation array
("C-return" (begin (make 'eqnarray) (temp-proof-fix)))


(kbd-map
(:mode in-math?)
;-- Easy movement in equations
;;
;; <return> moves to the right, ie, leaves superscripts etc.
;; (except in labels, hybrids,..)
;; and <space> produces a logical multiplicaton
("return" (if (or (inside? 'hybrid) (inside? 'label)
(inside? 'phantom) (in-prog?))
(begin (kbd-return))
(begin (go-right))))
("C-return" (if (or (table-inside? 'eqnarray) (table-inside? 'eqnarray*)
(inside? 'equation) (inside? 'equation*))
(begin (kbd-end-line) (go-right) ) ; leave math
environment
(begin (kbd-return)) ; should be default
setting
))

;; Double minus makes unary minus

("- -" "<um>")

;;Simplified products

("space" "*")
("space var" " ") ; same as S-space

;; <$> switches to text mode

("$" (make-with "mode" "text"))

;; this would be cool; probably requires binding these key names
;; (obtained from xev) to TeXmacs-recognized keynames; see
;; config-kbd.scm

("XF86Forward" structured-exit-right)
("XF86Back" structured-exit-left)

)

---------END OF FILE-----------

-á.



On Thu, Nov 4, 2010 at 18:03, Joris van der Hoeven <address@hidden> wrote:
> Hi Alvaro,
>
> On Thu, Nov 04, 2010 at 08:32:48AM +0100, Alvaro Tejero Cantero wrote:
>> > Checking some of my existing documents made me discover several typos,
>> > which could have been corrected, so if the semantic mode is not
>> > too much of a burden, then it actually has some immediate advantages.
>> > Not to speak about CAS interfaces.
>>
>> I understand now. However for most people /invisible typos/ won't be an
>> issue.
>
> The typos captured by the semantic modes are not necessarily invisible,
> even though invisible typos are among the most frequent ones.
>
>> > The number of Ctrl-Spaces will probably not increase.
>> > In the formula "a+b+c+d", I was thinking of outward selecting
>> > "a+b-c+d" right after, say "b" (anyway, the decision between "a+b"
>> > and "b-c" would not be clear). On the other hand, you should be
>> > able to select "a+b", "b-c", "a+b-c", "b-c+d" and "a+b-c+d"
>> > using the mouse or S-left, S-right (but not "c+d").
>>
>> Above you mention that selecting x*y in 1/x*y is not selectable by
>> default - do you mean that semantic mode has to be deactivated for
>> that to work? because it is not possible now even with S-Left and
>> S-Right.
>
> Yes, you should either 1) deactivate it, 2) place x*y inside invisible
> brackets right from the start. Indeed, semantically speaking,
> x*y is *not* a valid subexpression of 1/x*y (similarly,
> /x is not a valid subexpression of 1/x*y).
>
>> In the documentation it doesn't speak about how to create the
>> invisible parentheses.
>
> Yes, this should be detailed.
>
>> (btw. it may become instructive to at some
>> point have an option to have all invisible characters displayed for
>> example in light grey, the way some word processors allow showing
>> carriage returns).
>
> Agreed.
>
>> > That might indeed be a good idea inside mathematical formulas.
>> > And if we want to leave on the left? S-enter?
>>
>> Could be. I am not trained to leave on the left
>
> That would be required in order to treat subscripts and superscripts
> using the same system.
>
>> >> > At the very start of TeXmacs, I experimented
>> >> > markup for subscripts and superscripts with their base and found it
>> >> > less natural than the current solution.
>> >>
>> >> I don't understand what was the difference. But they are fine now,
>> >> it's only entering multiple indexes that is annoyingly long.
>> >
>> > Maybe I should add structured-up and structured-down inside subscripts?
>>
>> How would this help with the indexes as in a_{ijk}? But yes, I am for
>> all sorts of structured navigation. I guess up goes to subscript owner
>> and down to further (possible) scripts?
>
> I misunderstood you; I was thinking about adding a superscript
> after typing a subscript.
>
>> >> ',,' indeed is an excellent compromise.
>> >
>> > We might also use A-, by the way (or C-, depending on the OS).
>>
>> I tend to prefer ,, ,it seems faster to me than A- or C-
>
> It might actually even be better to use "space" as a toggle
> to make the adjacent character invisible (whenever applicable).
>
> Best wishes, --Joris
>



Archive powered by MHonArc 2.6.19.

Top of Page