On Wed, May 10, 2000 at 10:34:27AM +0100, Jules Bean wrote: > On Wed, May 10, 2000 at 12:17:46PM +0300, Lior Silberman wrote: > > I wondered: is it possible to switch the enumeration depth keybindings in > > rtl contexts (since then M-p Right should increase the depth, and M-p Left > > should decrease the depth, the opposite of the ltr case). > > I've never found much logic to left or right anyhow ;-) I just keep > hitting it (it's on a cycle) until it's what I want. Use the attached patch. Should it be added to the CVS? > > Secondly, LyX resets the enumeration counters after a paragraph break. > > Thus in LyX (unlike LaTeX) I don't know how to have more than one > > paragraph per point. Also, it's impossible to have an empty point. The > > things I have in mind are like: > > > > 1. <<-- no text here! > > (a) some text > > (b) more text > > > > 2. Some text > > > > Definition 0.1: > > > > 3. Next item > > ... > > When you're in the 'definition' section, hit M-p right. That will > nest it inside 2. Some text, and 'next item' will correctlly be 3. At > least, if 'definition' is a nestab;e environment (I don't know if it > is, I've only used this for normal paras). I'm not sure if he wanted the definition to be nested in the enumeration. If not, you should use the following trick: - At the end of the last enumeration item before the definition, put the following in LaTeX mode: \newcounter{temp}\setcounter{temp}{\value{enumi}}\addtocounter{temp}{1} - At the start of the first item after the definition put (in Latex mode) [\arabic{temp}.]\setcounter{enumi}{\value{temp}} If you are lazy, you can just put [3.]\setcounter{enumi}{3} at the beginning of the 3rd item (in Latex mode). > To do an empty point, put in a non-breaking space (ctrl-space) or > LaTeX empty element (latex-mode {}) These two methods will generate different results: 1 (a) ... (b) ... vs 1 (a) ... (b) ...
Index: src/lyxfunc.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v retrieving revision 1.72 diff -u -p -r1.72 lyxfunc.C --- src/lyxfunc.C 2000/05/04 10:56:58 1.72 +++ src/lyxfunc.C 2000/05/10 22:49:26 @@ -963,11 +963,17 @@ string LyXFunc::Dispatch(int ac, break; case LFUN_DEPTH_MIN: - changeDepth(owner->view(), -1); + if (owner->view()->text->cursor.par->isRightToLeftPar()) + changeDepth(owner->view(), 1); + else + changeDepth(owner->view(), -1); break; case LFUN_DEPTH_PLUS: - changeDepth(owner->view(), 1); + if (owner->view()->text->cursor.par->isRightToLeftPar()) + changeDepth(owner->view(), -1); + else + changeDepth(owner->view(), 1); break; case LFUN_FREE: