Am 06.09.2008 um 17:39 schrieb Stefan Schimanski:


Am 06.09.2008 um 17:34 schrieb Uwe Stöhr:

> They will show up not only exactly in a macro, but also more inside a parameter of one. I don't
> think the context menu will show them then, right?

You are right, so this is not an option.

> Another option would be to put them on the macro toolbar. Wondering if they are there already > (Have no LyX here right now to check)? But also the macro toolbar will not be shown in "auto" mode > if one is not exactly in the MathData of a macro.

OK, them the best would be to make one out of the two menu entries by changing the fold/unfold mechanism to a toggle menu. So when pressing the toggle menu, unfolded macros, get folded and vice versa.

We had this discussion before some months ago. A toggle menu is not enough. You can press unfold several times to unfold a whole hierachy of macros, and the same is true for folding them again.

In fact the menu command is not really usable in practice IMHO. A good key shortcut would be much better. I had chosen Ctrl-+ and Ctrl-- originally, but they were already used at other places. I also looked for a good choice with + and -, but did not find one which was free....

Now that we have command-alternatives: What about mapping C-minus to math-macro-fold in math mode?

Currently math-macro-unfold is C-plus, but math-macro-fold is not accessible with a shortcut.

Stefan

diff --git a/lib/bind/cua.bind b/lib/bind/cua.bind
index 9cbf049..9ce2428 100644
--- a/lib/bind/cua.bind
+++ b/lib/bind/cua.bind
@@ -85,7 +85,7 @@
\bind "C-S-E" "changes-track" # it's what MS Word uses
 \bind "~S-M-quotedbl"          "quote-insert single"
 \bind "~S-C-quotedbl"          "self-insert \""
-\bind "C-minus"                        "specialchar-insert hyphenation"
+\bind "C-minus" "command-alternatives math- macro-fold;specialchar-insert hyphenation"
 \bind "C-M-minus"              "specialchar-insert nobreakdash"
 \bind "M-S-Right"              "depth-increment"
 \bind "M-S-Left"               "depth-decrement"
diff --git a/lib/bind/math.bind b/lib/bind/math.bind
index 856cec9..e4977e3 100644
--- a/lib/bind/math.bind
+++ b/lib/bind/math.bind
@@ -142,8 +142,7 @@

 # math-macros
 \bind "C-plus"         "math-macro-unfold"
-# FIXME: this accelerator is already taken by
-# specialspecialchar-insert hyphenation in cua.bind
+# Defined in cua.bind as command-alternative to specialchar-insert hyphenation
 #\bind "C-minus"        "math-macro-fold"

 # This should be handled properly by some "get the next key" method

Reply via email to