After all, I might as well forward it to the list.

JMarc

------- Start of forwarded message -------
Date: Tue, 21 Mar 2000 21:23:26 +0000
To: [EMAIL PROTECTED]
Subject: Various (math-mode) HMI improvements
From: Jules Bean <[EMAIL PROTECTED]>

Hiya,

I've been using Lyx for a year or two now, and I have some thoughts on
improving the interface.  Not the GUI, as such, but the basic
Human-Machine interface --- the efficiency with which I can enter
information into it.

As a warning, I'm a mathematician, so a) I talk like a mathematician,
and b) I mainly use LyX for mathematics (although I've done a couple
of letters on it).  Most of my comments are about maths mode.

There are a couple of general principles I'm try to uphold here:

a) If something's easy & quick in LaTeX then it should be easy & quick 
   in LyX (unless it really isn't very common).
b) Actions which are used frequently should be a single key-press,
   even if that's not very easy to remember.  You learn it.
c) Actions which are used rarely should be mnemonic -- easy to
   remember -- even if they are multiple keypresses.  Things you do
   rarely you care less about the time it takes to perform.

1) Tables:

   LyX's table handling sucks.  ;-) No worse than MS Word, but it is
   harder to work with tables in LyX than it is in a LaTeX/emacs
   combination -- not a good sign!  I have a few suggestions:

   Basically, I don't want to have to use a dialog box to do things like
   insert columns and rows, etc.

   What I'd like is something more like the underlying LaTeX in
   ease-of-use.  I propose (for all table-like environments):

   CTRL-<tab>: Should be equivalent to typing an '&'.  I.e., if used at the 
   end of a row, creates a new column and moves into it. If used it the
   end of a cell, creates a new cell here (moving other stuff to the
   right). If used in the middle of a cell, splits a cell (this last is
   how it currently behaves, in the 3xN equation environment).

   [This leaves a glaring UI hole - how to create a new column 'all at
   once'.  It's my personal feeling that this doesn't matter too
   much, since it's less common and can be accessed by the dialog box]
   
   <tab>: Should move from cell to cell (as it currently does)
   
   CTRL-<enter>: Should be something like typing '\\'.  Certainly, if
   used at the end of a row, should insert a new row beneath it. I'm not
   sure if it should work in the middle of a row or not --- that might be 
   less useful, and counter-intuitive.
   
   CTRL-<delete>: This is the important new one, IMO. This should act
   as a 'hard' delete which is also capable of deleting '&' and '\\'
   characters -- i.e. effectively columns and rows.  Except it wouldn't
   delete whole columns, instead you'd be allowed to have non-square
   tables. Currently, it's very hard to delete part-rows and rows.

   Plus, but less important, would be some way of changing alignment
   from the keyboard.

1b) Other table environments

   I'm a LaTeX newbie, so I don't know all the perms here, but it
   seems that LyX can't really create many of the table possibilities
   in LaTeX.  The only one I've used is xymatrix -- from xypic --
   which currently requires lots of ERT.  It would be nice if you
   could say 'this is like a table' and get LyX to use its
   tablerenderer. Even if it prints slightly different (e.g. the
   arrows in xymatrix) it would still be nicer).

2) Math-mode entry

   Under the xemacs keybindings, which I use, (damn it, I don't want
   to confuse my poor muscle memory more than necessary by learning
   too many different bindings for the same actions), the key sequence 
   to enter math-mode is 'M-c m'. I'm not sure exactly what to propose 
   instead, but I really think this needs to be only one keypress.

   As an aside, you may think that I'm whining over nothing.  However, 
   when you enter math mode as often as I do (often more than once a
   sentence) it gets very annoying, especially as compared to simply
   typing '$' in plain emacs. Also, you may say 'why don't you just
   change your bindings file?'.  I will ;) but I wanted to start some
   discussion on this since it can benefit everyone!

   More serious, though, than the number of characters which need to
   be typed is the confusing nature of the command. 'M-c m', typed
   once, puts you into math-mode.  However, typing 'M-c m' again
   doesn't put you out of math-mode --- it puts you into math-text
   mode. Then hitting it again puts you back into normal math-mode.
   IMO, 'modal' keys should either be idempotent (so hitting it the
   second time does nothing) or self-inverting. In fact, the inverse
   to 'M-c m' is either 'ESC' or simply a space typed at the end of
   the block --- which is confusing, since they're not of the same
   'shape' as the command that got you in there.

   Now, I'm not saying that 'space' shouldn't be allowed as a
   short-cut to get you out of math-mode; it's a most useful and
   natural one, I like it a lot. However, on balance I think M-c m
   should also have that effect.

3) Math-mode inconsistencies

   Sometimes 'the same action' has the same keystroke both within and
   without math-mode.  This is very sensible.  However, it is very
   annoying when they don't behave the way you're expecting them to.

   For example, 'M-c e' puts you into 'emphasise' mode.  Ignoring the
   fact that in text mode this is italics, and in math-mode it stands
   for the calligraphic character set, I think of these as the same
   action, so I like the fact that they have the same keys.  However,
   in math-mode, 'M-c e' is idempotent, (and you need 'M-c space' to
   get back into normal) whereas in text-mode 'M-c e' is
   self-inverse.  These are the two possibilities I listed as
   acceptable before, but consistency would be nice ;-)  IMO,
   self-inverse would be best for both.

4) ERT in math-mode

   Math-mode doesn't handle ERT very well at all.  It flips back out
   of TeX-mode as soon as you type any special character.  Very
   annoying if I wish to typeset an \xymatrix inside math-mode (see
   also my comment above about table-like environments), since I can't 
   type the &.  In fact, my xymatrices end up as $$\xymatrix{..}$$ in
   text-mode ERT. Also rather annoying when you want to use a \macro
   with more than one argument (but not fatally so).

5) Proposal : a 'ligatures' or 'autocorrect' system

   One of the very minor, but useful, features of TeX is the way it
   lets you type the nearest approximation to what you want using a
   'typewriter keyboard', and substitutes the typographically neat
   equivalent.  In particular, 'fancy' quotes (") and en and em dashes 
   (---). I propose that this UI element could be taken up a level
   into LyX, with a system that does the following (for example):

        -> becomes \rightarrow
        <- becomes \leftarrow
        => becomes \Rightarrow (etc..)
        ==> becomes \Longrightarrow (etc..)

   This may only be appropriate in math mode, of course.  This family
   bug me in particular because they take ages to type using a
   \-escape. Undoubtedly sharp minds will think of others, and also we 
   need some way of actually typing those sequences as literals when
   we want them.

6) Scope macros:

   The current macro system is clever, but could be neater.  One
   improvement I'd like is to let LyX know about TeX's scoping
   rules...


Anyway, hopefully this will trigger some discussion,

Yours,

Jules

-- 
Jules Bean                          |        Any sufficiently advanced 
jules@{debian.org,jellybean.co.uk}  |  technology is indistinguishable
[EMAIL PROTECTED]              |               from a perl script

------- End of forwarded message -------

Reply via email to