... sort of.
I've been talking to a couple of the texmacs people on IRC, and came up with the following stuff for generating texmacs-style bindings. Restrictions : 1. M-t is a necessary prefix (due to lyx restriction :/) 2. you must press space after finishing a sequence (another lyx restriction) 3. lyx still can't draw some things like \Ump (right ??)) 4. some of the bindings used from normal text mode give a mathed warning (?) Attached are texmac's shorthands.scm file, and a little perl script for converting it into lyx bind statements as above. So now you can type M-t <****=/<space> to get nsqsubseteq regards john -- "Way back at the beginning of time around 1970 the first man page was handed down from on high. Every one since is an edited copy." - John Hasler <[EMAIL PROTECTED]>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; MODULE : keymaps.scm ;; DESCRIPTION : setup shorthands for many mathematical symbols ;; COPYRIGHT : (C) 1999 Joris van der Hoeven ;; ;; This software falls under the GNU general public license and comes WITHOUT ;; ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for details. ;; If you don't have this file, write to the Free Software Foundation, Inc., ;; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (set-keymap (in-math?) ("E-E-l" "" "Insert a large left delimiter") ("E-E-m" "" "Insert a large separator") ("E-E-r" "" "Insert a large right delimiter") ("E-E-@" "" "Insert a big circled operator") ("E-E-L" "" "Insert an integral with limits") ("E-L" "" "Insert a left script") ("(" "(") (")" ")") ("[" "[") ("]" "]") ("{" "{") ("}" "}") ("| ," "<lfloor>") ("| '" "<lceil>") ("| acute" "<lceil>") (", |" "<rfloor>") ("' |" "<rceil>") ("acute |" "<rceil>") ("[ [ *" "<llbracket>") ("] ] *" "<rrbracket>") ("A-a" "<alpha>") ("A-b" "<beta>") ("A-g" "<gamma>") ("A-d" "<delta>") ("A-e" "<varepsilon>") ("A-e *" "<epsilon>") ("A-e * *" "<backepsilon>") ("A-z" "<zeta>") ("A-h" "<eta>") ("A-q" "<theta>") ("A-q *" "<vartheta>") ("A-j" "<theta>") ("A-j *" "<vartheta>") ("A-i" "<iota>") ("A-k" "<kappa>") ("A-k *" "<varkappa>") ("A-l" "<lambda>") ("A-m" "<mu>") ("A-n" "<nu>") ("A-x" "<xi>") ("A-o" "<omicron>") ("A-p" "<pi>") ("A-p *" "<varpi>") ("A-r" "<rho>") ("A-r *" "<varrho>") ("A-s" "<sigma>") ("A-s *" "<varsigma>") ("A-t" "<tau>") ("A-u" "<upsilon>") ("A-f" "<varphi>") ("A-f *" "<phi>") ("A-y" "<psi>") ("A-c" "<chi>") ("A-w" "<omega>") ("A-w *" "<mho>") ("A-v" "<omega>") ("A-v *" "<mho>") ("A-A" "<Alpha>") ("A-B" "<Beta>") ("A-G" "<Gamma>") ("A-D" "<Delta>") ("A-E" "<Epsilon>") ("A-E *" "<Backepsilon>") ("A-Z" "<Zeta>") ("A-H" "<Eta>") ("A-Q" "<Theta>") ("A-J" "<Theta>") ("A-I" "<Iota>") ("A-K" "<Kappa>") ("A-L" "<Lambda>") ("A-M" "<Mu>") ("A-N" "<Nu>") ("A-X" "<Xi>") ("A-O" "<Omicron>") ("A-P" "<Pi>") ("A-R" "<Rho>") ("A-S" "<Sigma>") ("A-T" "<Tau>") ("A-U" "<Upsilon>") ("A-F" "<Phi>") ("A-Y" "<Psi>") ("A-C" "<Chi>") ("A-W" "<Omega>") ("A-W *" "<Mho>") ("A-V" "<Omega>") ("A-V *" "<Mho>") ("E-E-a" "<amalg>") ("E-E-d" "<partial>") ("E-E-p" "<wp>") ("E-E-n" "<cap>") ("E-E-n *" "<sqcap>") ("E-E-u" "<cup>") ("E-E-u *" "<sqcup>") ("E-E-w" "<wedge>") ("E-E-w *" "<curlywedge>") ("E-E-w * *" "<curlywedgeuparrow>") ("E-E-w * * *" "<curlywedgedownarrow>") ("E-E-w * * * *" "<wedges>") ("E-E-v" "<vee>") ("E-E-v *" "<curlyvee>") ("E-E-v * *" "<curlyveeuparrow>") ("E-E-v * * *" "<curlyveedownarrow>") ("E-E-x" "<times>") ("<" "<less>") (">" "<gtr>") ("< /" "<nless>") ("> /" "<ngtr>") ("< =" "<leqslant>") ("> =" "<geqslant>") ("< = /" "<nleqslant>") ("> = /" "<ngeqslant>") ("< = *" "<leq>") ("> = *" "<geq>") ("< = * /" "<nleq>") ("> = * /" "<ngeq>") ("< <" "<ll>") ("< < <" "<lll>") ("> >" "<gg>") ("> > >" "<ggg>") ("< < =" "<lleq>") ("< < < =" "<llleq>") ("> > =" "<ggeq>") ("> > > =" "<gggeq>") ("< < /" "<nll>") ("< < < /" "<nlll>") ("> > /" "<ngg>") ("> > > /" "<nggg>") ("< < = /" "<nlleq>") ("< < < = /" "<nllleq>") ("> > = /" "<nggeq>") ("> > > = /" "<ngggeq>") ("< ." "<lessdot>") (". >" "<gtrdot>") ("< = ." "<lesseqdot>") (". > =" "<gtreqdot>") ("< *" "<prec>") ("> *" "<succ>") ("< * /" "<nprec>") ("> * /" "<nsucc>") ("< * =" "<preccurlyeq>") ("> * =" "<succcurlyeq>") ("< * = /" "<npreccurlyeq>") ("> * = /" "<nsucccurlyeq>") ("< * = *" "<preceq>") ("> * = *" "<succeq>") ("< * = * /" "<npreceq>") ("> * = * /" "<nsucceq>") ("< * = * / *" "<precneqq>") ("> * = * / *" "<succneqq>") ("< < *" "<precprec>") ("< < < *" "<precprecprec>") ("> > *" "<succsucc>") ("> > > *" "<succsuccsucc>") ("< < * =" "<precpreceq>") ("< < < * =" "<precprecpreceq>") ("> > * =" "<succsucceq>") ("> > > * =" "<succsuccsucceq>") ("< < * /" "<nprecprec>") ("< < < * /" "<nprecprecprec>") ("> > * /" "<nsuccsucc>") ("> > > * /" "<nsuccsuccsucc>") ("< < * = /" "<nprecpreceq>") ("< < < * = /" "<nprecprecpreceq>") ("> > * = /" "<nsuccsucceq>") ("> > > * = /" "<nsuccsuccsucceq>") ("< * ." "<precdot>") (". > *" "<dotsucc>") ("< * = ." "<preceqdot>") (". > * =" "<dotsucceq>") ("< < * *" "<llangle>") ("> > * *" "<rrangle>") ("< >" "<lessgtr>") ("> <" "<gtrless>") ("< ~" "<lesssim>") ("< ~ ~" "<lessapprox>") ("< * ~" "<precsim>") ("< * ~ ~" "<precapprox>") ("> ~" "<gtrsim>") ("> ~ ~" "<gtrapprox>") ("> * ~" "<gtrsim>") ("> * ~ ~" "<gtrapprox>") ("< = * *" "<leqq>") ("> = * *" "<geqq>") ("< = * >" "<lesseqgtr>") ("> = * <" "<gtreqless>") ("< = * * >" "<lesseqqgtr>") ("> = * * <" "<gtreqqless>") ("< > /" "<nlessgtr>") ("> < /" "<ngtrless>") ("< ~ /" "<nlesssim>") ("< ~ / *" "<lnsim>") ("< ~ ~ /" "<nlessapprox>") ("< ~ ~ / *" "<lnapprox>") ("< * ~ /" "<nprecsim>") ("< * ~ / *" "<precnsim>") ("< * ~ ~ /" "<nprecapprox>") ("< * ~ ~ / *" "<precnapprox>") ("> ~ /" "<ngtrsim>") ("> ~ / *" "<gnsim>") ("> ~ ~ /" "<ngtrapprox>") ("> ~ ~ / *" "<gnapprox>") ("> * ~ /" "<nsuccsim>") ("> * ~ / *" "<succnsim>") ("> * ~ ~ /" "<nsuccapprox>") ("> * ~ ~ / *" "<succnapprox>") ("< = * * /" "<nleqq>") ("> = * * /" "<ngeqq>") ("< = * > /" "<nlesseqgtr>") ("> = * < /" "<ngtreqless>") ("< = * * > /" "<nlesseqqgtr>") ("> = * * < /" "<ngtreqqless>") ("< = * / *" "<lneq>") ("< = * * / *" "<lneqq>") ("< = * * / * *" "<lvertneqq>") ("> = * / *" "<gneq>") ("> = * * / *" "<gneqq>") ("> = * * / * *" "<gvertneqq>") ("- >" "<rightarrow>") ("< -" "<leftarrow>") ("< - >" "<leftrightarrow>") ("- - >" "<longrightarrow>") ("< - -" "<longleftarrow>") ("< - - >" "<longleftrightarrow>") ("= >" "<Rightarrow>") ("< = * * *" "<Leftarrow>") ("< = >" "<Leftrightarrow>") ("= = >" "<Longrightarrow>") ("< = =" "<Longleftarrow>") ("< = = >" "<Longleftrightarrow>") ("| - >" "<mapsto>") ("| - - >" "<longmapsto>") ("< - |" "<mapsfrom>") ("< - - |" "<longmapsfrom>") ("| - > *" "<hookrightarrow>") ("< - | *" "<hookleftarrow>") ("~ >" "<rightsquigarrow>") ("< ~ >" "<leftrightsquigarrow>") ("< - <" "<leftarrowtail>") ("> - >" "<rightarrowtail>") ("- > - >" "<rightrightarrows>") ("< - < -" "<leftleftarrows>") ("- > < -" "<rightleftarrows>") ("- > < - *" "<rightleftharpoons>") ("< - - > *" "<leftrightarrows>") ("< - - > * *" "<leftrightharpoons>") ("- > >" "<twoheadrightarrow>") ("< < -" "<twoheadleftarrow>") ("- - > >" "<longtwoheadrightarrow>") ("< < - -" "<longtwoheadleftarrow>") ("- > /" "<nrightarrow>") ("< - /" "<nleftarrow>") ("< - > /" "<nleftrightarrow>") ("= > /" "<nRightarrow>") ("< = * * * /" "<nLeftarrow>") ("< = > /" "<nLeftrightarrow>") ("< - > -" "<leftrightarroweq>") ("- | >" "<rightarrowtriangle>") ("< | -" "<leftarrowtriangle>") ("< | - | >" "<leftrightarrowtriangle>") ("| - | >" "<longmapstotriangle>") ("- - | >" "<longrightarrowtriangle>") ("< | - -" "<longleftarrowtriangle>") ("< | - - | >" "<longleftrightarrowtriangle>") ("| - - | >" "<longmapstotriangle>") ("< - < *" "<leftprec>") ("> * - >" "<succright>") ("< - < * =" "<leftpreceq>") ("> * = - >" "<succeqright>") ("@" "<circ>") ("@ /" "<varnothing>") ("@ +" "<oplus>") ("@ -" "<ominus>") ("@ x" "<otimes>") ("@ :" "<oover>") ("@ ." "<odot>") ("@ R" "<circledR>") ("@ S" "<circledS>") ("@ / *" "<oslash>") ("@ \\" "<obslash>") ("@ <" "<olessthan>") ("@ >" "<ogreaterthan>") ("@ &" "<owedge>") ("@ |" "<obar>") ("@ | *" "<ovee>") ("@ v" "<ovee>") ("@ @" "<infty>") ("@ @ *" "<varocircle>") ("- @ @" "-<infty>") ("@ *" "<box>") ("@ * +" "<boxplus>") ("@ * -" "<boxminus>") ("@ * x" "<boxtimes>") ("@ * ." "<boxdot>") ("@ * /" "<boxslash>") ("@ * \\" "<boxbslash>") ("@ * @" "<boxcircle>") ("@ * @ *" "<boxbox>") ("@ * |" "<boxbar>") ("@ * *" "<bullet>") ("@ * * *" "<blacksquare>") ("= *" "<asymp>") ("= * *" "<equiv>") ("= * * *" "<asympasymp>") ("= * * * *" "<simsim>") ("~" "<sim>") ("~ ~" "<approx>") ("~ ~ -" "<approxeq>") ("~ -" "<simeq>") ("~ =" "<cong>") ("= /" "<neq>") ("= * /" "<nasymp>") ("= * * /" "<nequiv>") ("= * * * /" "<nasympasymp>") ("= * * * * /" "<nsimsim>") ("~ /" "<nsim>") ("~ ~ /" "<napprox>") ("~ - /" "<nsimeq>") ("~ = /" "<ncong>") ("|" "|") ("| *" "<shortmid>") ("| * *" "<varshortmid>") ("| |" "<||>") ("| | |" "<interleave>") ("| | *" "<shortparallel>") ("| -" "<vdash>") ("| - -" "<longvdash>") ("| | -" "<Vdash>") ("| | - -" "<longVdash>") ("| | | -" "<Vvdash>") ("| | | - -" "<longVvdash>") ("- |" "<dashv>") ("- - |" "<longdashv>") ("| =" "<vDash>") ("| = =" "<longvDash>") ;; ("| | =" "<VDash>") ;; ("| | = =" "<longVDash>") ("| /" "<nmid>") ("| | /" "<nparallel>") ("| * /" "<nshortmid>") ("| | * /" "<nshortparallel>") ("| - /" "<nvdash>") ("| | - /" "<nVdash>") ;; ("- | /" "<ndashv>") ;; ("- | | /" "<ndashV>") ("| = /" "<nvDash>") ;; ("| | = /" "<nVDash>") ;; ("= | /" "<nDashv>") ;; ("= | | /" "<nDashV>") ("< |" "<vartriangleleft>") ("< | *" "<blacktriangleleft>") ("< | /" "<ntriangleleft>") ("< | =" "<trianglelefteqslant>") ("< | = /" "<ntrianglelefteqslant>") ("< | = *" "<trianglelefteq>") ("< | = * /" "<ntriangleqleft>") ("| >" "<vartriangleright>") ("| > *" "<blacktriangleright>") ("| > /" "<ntriangleright>") ("| > =" "<trianglerighteq>") ("| > = /" "<ntriangleqright>") ("| > = *" "<trianglerighteqslant>") ("| > = * /" "<ntrianglerighteqslant>") ("- *" "<um>") ("+ -" "<pm>") ("+ - *" "<upm>") ("- +" "<mp>") ("- + *" "<ump>") ("@ =" "<circeq>") ("= @" "<eqcirc>") ("- @" "<multimap>") (". =" "<doteq>") (". ." "<ldots>") (". . *" "<cdots>") (". . * *" "<hdots>") (". . * * *" "<vdots>") (". . * * * *" "<ddots>") (". . * * * * *" "<udots>") (": =" "<assign>") ("+ =" "<plusassign>") ("- =" "<minusassign>") ("/ *" "<div>") ("* *" "<ast>") ("* * *" "<times>") ("* * * *" "<cdot>") ("< * *" "<subset>") ("> * *" "<supset>") ("< * * /" "<nsubset>") ("> * * /" "<nsupset>") ("< * * =" "<subseteq>") ("> * * =" "<supseteq>") ("< * * = /" "<nsubseteq>") ("> * * = /" "<nsupseteq>") ("< * * = *" "<subseteqq>") ("> * * = *" "<supseteqq>") ("< * * = /" "<nsubseteq>") ("> * * = /" "<nsupseteq>") ("< * * = * /" "<nsubseteqq>") ("> * * = * /" "<nsupseteqq>") ("< * * = / *" "<subsetneq>") ("> * * = / *" "<supsetneq>") ("< * * = / * *" "<varsubsetneq>") ("> * * = / * *" "<varsupsetneq>") ("< * * = * / *" "<subsetneqq>") ("> * * = * / *" "<supsetneqq>") ("< * * = * / * *" "<varsubsetneqq>") ("> * * = * / * *" "<varsupsetneqq>") ("< * * +" "<subsetplus>") ("> * * +" "<supsetplus>") ("< * * + =" "<subsetpluseq>") ("> * * + =" "<supsetpluseq>") ("< * * = +" "<subsetpluseq>") ("> * * = +" "<supsetpluseq>") ("< * * *" "<in>") ("> * * *" "<ni>") ("< * * * /" "<nin>") ("> * * * /" "<nni>") ("< * * * *" "<sqsubset>") ("> * * * *" "<sqsupset>") ("< * * * * /" "<nsqsubset>") ("> * * * * /" "<nsqsupset>") ("< * * * * =" "<sqsubseteq>") ("> * * * * =" "<sqsupseteq>") ("< * * * * = /" "<nsqsubseteq>") ("> * * * * = /" "<nsqsupseteq>") ("< * * * * *" "<langle>") ("> * * * * *" "<rangle>") ("< * * * * * *" "<leftslice>") ("> * * * * * *" "<rightslice>"))
#!/usr/bin/perl print "\n\n# TeXMacs bindings\n\n\n"; while (<>) { chomp; # comment next if /^\s*;;/; # empty line next if /^\s*$/; next if /set-keymap/; # strip ws s/^\s*//; s/\w*$//; s/^\(//; s/\)*$//; ($shortcut, $command, $other) = split('" "'); $command =~ s/"//g; $command =~ s/<//g; $command =~ s/>//g; next if ! length $command; $command = "\\$command"; $shortcut =~ s/A-A/S-A-a/; $shortcut =~ s/A-B/S-A-b/; $shortcut =~ s/A-C/S-A-c/; $shortcut =~ s/A-D/S-A-d/; $shortcut =~ s/A-E/S-A-e/; $shortcut =~ s/A-F/S-A-f/; $shortcut =~ s/A-G/S-A-g/; $shortcut =~ s/A-H/S-A-h/; $shortcut =~ s/A-I/S-A-i/; $shortcut =~ s/A-J/S-A-j/; $shortcut =~ s/A-K/S-A-k/; $shortcut =~ s/A-L/S-A-l/; $shortcut =~ s/A-M/S-A-m/; $shortcut =~ s/A-N/S-A-n/; $shortcut =~ s/A-O/S-A-o/; $shortcut =~ s/A-P/S-A-p/; $shortcut =~ s/A-Q/S-A-q/; $shortcut =~ s/A-R/S-A-r/; $shortcut =~ s/A-S/S-A-s/; $shortcut =~ s/A-T/S-A-t/; $shortcut =~ s/A-U/S-A-u/; $shortcut =~ s/A-V/S-A-v/; $shortcut =~ s/A-W/S-A-w/; $shortcut =~ s/A-X/S-A-x/; $shortcut =~ s/A-Y/S-A-y/; $shortcut =~ s/A-Z/S-A-z/; $shortcut =~ s/~/ ~S-asciitilde /g; $shortcut =~ s/"//g; $shortcut =~ s/A-/M-/g; $shortcut =~ s/E-/Escape /g; $shortcut =~ s/\*/ ~S-asterisk /g; $shortcut =~ s/</ ~S-less /g; $shortcut =~ s/>/ ~S-greater /g; $shortcut =~ s/\(/ ~S-parenleft /g; $shortcut =~ s/\[/ ~S-bracketleft /g; $shortcut =~ s/\{/ ~S-braceleft /g; $shortcut =~ s/\)/ ~S-parenright /g; $shortcut =~ s/\]/ ~S-bracketright /g; $shortcut =~ s/\}/ ~S-braceright /g; $shortcut =~ s/=/ ~S-equal /g; $shortcut =~ s/\+/ ~S-plus /g; $shortcut =~ s/- / ~S-minus /g; $shortcut =~ s/ -/ ~S-minus /g; $shortcut =~ s/\\/ ~S-backslash /g; $shortcut =~ s/\// ~S-slash /g; $shortcut =~ s/\,/ ~S-comma /g; $shortcut =~ s/\./ ~S-period /g; $shortcut =~ s/\'/ ~S-apostrophe /g; $shortcut =~ s/\|/ ~S-bar /g; $shortcut =~ s/@/ ~S-at /g; $shortcut =~ s/\&/ ~S-ampersand /g; $shortcut =~ s/:/ ~S-colon /g; $shortcut =~ s/\s\s*/ /g; $shortcut =~ s/\s\s*/ /g; $shortcut =~ s/^\s//; $shortcut =~ s/\s$//; $shortcut =~ s/$/ space/; print "\\bind \"M-t $shortcut\" \"math-insert $command\"\n"; }