Here is a patch to provide the characters Å(ngström), Ø(rsted), ^, _ and the roman math T (for Transpose) in the math misc panel.
Å and Ø are the only physical units that may be troublesome to generate on a non-scandinavian keyboard. Also they should be in roman, being units. This is done automatically by this patch. ^ is our old troublemaker; I see no other way of getting it to look correct on-screen and load and save correctly as well as render correct LaTeX, than making it a macro. I looked at alternatives, but they require special-casing that would in the end be more messy IMHO. The rest is "shallow" UI stuff. The T(ranspose) sign should be math-roman (I think; any authoritative opinions?) and is often needed. Therefore its own panel place. Ah yes, this patch removes the Blackboard Bold and Calligraphic symbols from the menu, where IMHO they don't really belong. (I mean, there are many, many more symbols that would like to live there ;-) But let's wait for second opinions on that one. It's easily removed from the patch. 2002-03-03 Martin Vermeer <[EMAIL PROTECTED]> * misc.xbm: * math.bind: * default.ui: * LaTeXFeatures.C: * lyx_sty.[Ch]: * FormMathsPanel.C: * MathsSymbols.C: Placed the symbols Å(ngström), Ø(rsted), ^, _ and T(ranspose) on the math misc sub-panel. Martin
Index: images/misc.xbm =================================================================== RCS file: /cvs/lyx/lyx-devel/images/misc.xbm,v retrieving revision 1.4 diff -u -p -r1.4 misc.xbm --- images/misc.xbm 2002/01/15 15:31:18 1.4 +++ images/misc.xbm 2002/03/03 19:32:31 @@ -422,3 +422,56 @@ static unsigned char const misc3_bits[] 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + +#define misc4_width 150 +#define misc4_height 30 +static unsigned char const misc4_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, + 0x00, 0x60, 0x08, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x98, 0x05, 0x00, 0x80, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x80, 0x03, 0x00, 0x00, 0x06, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x02, + 0x00, 0x80, 0x06, 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x83, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x40, 0x0c, 0x00, 0x80, 0x41, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x40, 0x0c, + 0x00, 0x80, 0x41, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x20, 0x0c, 0x00, 0x80, 0x21, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, + 0x20, 0x18, 0x00, 0x80, 0x11, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x11, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x20, 0x18, 0x00, 0x00, 0x0b, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, 0x30, 0x00, + 0x00, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x38, + 0x78, 0x00, 0x00, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; Index: lib/bind/math.bind =================================================================== RCS file: /cvs/lyx/lyx-devel/lib/bind/math.bind,v retrieving revision 1.9 diff -u -p -r1.9 math.bind --- lib/bind/math.bind 2002/02/08 08:04:03 1.9 +++ lib/bind/math.bind 2002/03/03 19:32:32 @@ -28,8 +28,14 @@ \bind "M-m f" "math-insert \frac" \bind "M-m s" "math-insert \sqrt" -\bind "M-m e" "math-insert ^" -\bind "M-m x" "math-insert _" +\bind "M-m e" "math-insert \mathcircumflex" +\bind "M-m S-X" "math-insert \mathcircumflex" +\bind "M-m x" "math-insert \_ " + +\bind "M-m S-A" "command-sequence math-mode; font-roman; math-insert +Å;" +\bind "M-m S-O" "command-sequence math-mode; font-roman; math-insert +Ø;" +\bind "M-m S-T" "command-sequence math-mode; math-insert \mathrm; +math-insert T;" + \bind "M-m u" "math-insert \sum" \bind "M-m i" "math-insert \int" \bind "M-m m" "math-mode" Index: lib/ui/default.ui =================================================================== RCS file: /cvs/lyx/lyx-devel/lib/ui/default.ui,v retrieving revision 1.80 diff -u -p -r1.80 default.ui --- lib/ui/default.ui 2002/02/27 09:59:48 1.80 +++ lib/ui/default.ui 2002/03/03 19:32:33 @@ -234,26 +235,10 @@ Menuset Separator Item "Array environment|y" "math-insert matrix 2 2" Item "Cases environment|C" "math-insert cases 2" - Separator - Submenu "Symbols|S" "insert_math_symbol" Separator Item "Math Panel...|l" "math-panel" End - Menu "insert_math_symbol" - Item "Blackboard bold N (Natural)" "command-sequence math-mode; font-noun; math-insert N;" - Item "Blackboard bold Z (Integer)" "command-sequence math-mode; font-noun; math-insert Z;" - Item "Blackboard bold Q (Rational)" "command-sequence math-mode; font-noun; math-insert Q;" - Item "Blackboard bold R (Real)" "command-sequence math-mode; font-noun; math-insert R;" - Item "Blackboard bold C (Complex)" "command-sequence math-mode; font-noun; math-insert C;" - Item "Blackboard bold H (Quaternions)" "command-sequence math-mode; font-noun; math-insert H;" - Separator - Item "Calligraphic F (Fourier)" "command-sequence math-mode; font-emph; math-insert F;" - Item "Calligraphic L (Laplace)" "command-sequence math-mode; font-emph; math-insert L;" - Item "Calligraphic H (Hankel)" "command-sequence math-mode; font-emph; math-insert H;" - Item "Calligraphic O (Landau)" "command-sequence math-mode; font-emph; math-insert O;" - End - Menu "insert_floats" FloatInsert End Index: src/LaTeXFeatures.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/LaTeXFeatures.C,v retrieving revision 1.57 diff -u -p -r1.57 LaTeXFeatures.C --- src/LaTeXFeatures.C 2002/02/28 14:06:17 1.57 +++ src/LaTeXFeatures.C 2002/03/03 19:32:36 @@ -299,7 +299,9 @@ string const LaTeXFeatures::getMacros() macros << boldsymbol_def << '\n'; if (isRequired("binom") && !isRequired("amsmath")) macros << binom_def << '\n'; - + if (isRequired("mathcircumflex")) + macros << mathcircumflex_def << '\n'; + // other if (isRequired("NeedLyXMinipageIndent")) macros << minipageindent_def; Index: src/lyx_sty.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/lyx_sty.C,v retrieving revision 1.6 diff -u -p -r1.6 lyx_sty.C --- src/lyx_sty.C 2001/05/30 13:53:30 1.6 +++ src/lyx_sty.C 2002/03/03 19:32:39 @@ -122,3 +122,8 @@ string const binom_def = "%% Binom macro for standard LaTeX users\n" "\\newcommand{\\binom}[2]{{#1 \\choose #2}}\n"; +string const mathcircumflex_def = + "%% For printing a cirumflex inside a formula\n" + "\\newcommand{\\mathcircumflex}[0]{\\mbox{\\^{}}}\n"; + + Index: src/lyx_sty.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/lyx_sty.h,v retrieving revision 1.7 diff -u -p -r1.7 lyx_sty.h --- src/lyx_sty.h 2001/05/30 13:53:30 1.7 +++ src/lyx_sty.h 2002/03/03 19:32:39 @@ -62,5 +62,7 @@ extern string const minipageindent_def; extern string const boldsymbol_def; /// extern string const binom_def; +/// +extern string const mathcircumflex_def; #endif Index: src/frontends/xforms/FormMathsPanel.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/FormMathsPanel.C,v retrieving revision 1.22 diff -u -p -r1.22 FormMathsPanel.C --- src/frontends/xforms/FormMathsPanel.C 2002/03/01 09:52:49 1.22 +++ src/frontends/xforms/FormMathsPanel.C 2002/03/03 19:32:49 @@ -212,6 +215,7 @@ void FormMathsPanel::build() greek_->addBitmap(28, 7, 4, greek_width, greek_height, greek_bits); misc_->addBitmap(29, 5, 6, misc_width, misc_height, misc_bits); + misc_->addBitmap(5, 5, 1, misc4_width, misc4_height, misc4_bits); misc_->addBitmap(6, 3, 2, misc2_width, misc2_height, misc2_bits, false); misc_->addBitmap(4, 2, 2, misc3_width, misc3_height, misc3_bits); Index: src/frontends/xforms/MathsSymbols.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/MathsSymbols.C,v retrieving revision 1.15 diff -u -p -r1.15 MathsSymbols.C --- src/frontends/xforms/MathsSymbols.C 2002/01/28 14:36:39 1.15 +++ src/frontends/xforms/MathsSymbols.C 2002/03/03 19:32:51 @@ -137,10 +137,12 @@ char const * latex_misc[] = { "angle", "top", "bot", "Vert", "neg", "flat", "natural", "sharp", "surd", "triangle", "diamondsuit", "heartsuit", "clubsuit", "spadesuit", + "textrm Å", "textrm Ø", "mathcircumflex", "_", + "mathrm T", "mathbb N", "mathbb Z", "mathbb Q", "mathbb R", "mathbb C", "mathbb H", "mathcal F", "mathcal L", - "mathcal H", "mathcal O","" + "mathcal H", "mathcal O", "" }; int const nr_latex_misc = sizeof(latex_misc) / sizeof(char const *);
msg33853/pgp00000.pgp
Description: PGP signature