]> git.lyx.org Git - features.git/commitdiff
Support key symbols via menukeys package
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 9 Aug 2018 13:05:19 +0000 (15:05 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 10 Sep 2018 07:46:25 +0000 (09:46 +0200)
(cherry picked from commit fd7490762d6248bb4ca7120fe97b28d96496d9d3)

lib/chkconfig.ltx
lib/unicodesymbols
src/BufferParams.cpp
status.23x

index 5e7c86e3a233ed944d1685183410c192a2f2c8e9..9d743d259666a84bd3933cbf0c9755bc212c8848 100644 (file)
 \TestPackage{mdbch}
 \TestPackage{mdput}
 \TestPackage{mdugm}
+\TestPackage{menukeys}
 \TestPackage{MinionPro}
 \TestFont[rzmnr]{minion2newtx}
 \TestPackage{newtxmath}
index dd9a7f78c78bac4d285322837a50d27c0567511c..af7a028a3785fa0c04d617d85d7e354f4529a1e5 100644 (file)
@@ -17,7 +17,6 @@
 # You can use development/tools/unicodesymbols.py to add stubs for more
 # symbols.
 # Do only add commands that give correct output, no hacks that look "similar".
-# TODO: fix "missing Qt keysequences (MacSpecialKey)" hacks (search for "Qt::")
 # Commands that modify other parts of the text should not be added either.
 # For this reason, all commands requiring txfonts, pxfonts, fourier, mathdesign
 # and MnSymbol are commented out (these packages switch to fonts like times or
 0x21b6 ""                         "" "force=utf8;utf8x" "\\curvearrowleft" "amssymb" # ANTICLOCKWISE TOP SEMICIRCLE ARROW
 0x21b7 ""                         "" "force=utf8;utf8x" "\\curvearrowright" "amssymb" # CLOCKWISE TOP SEMICIRCLE ARROW
 #0x21b8 ""                         "" "" "" "" # NORTH WEST ARROW TO LONG BAR
-#0x21b9 ""                         "" "" "" "" # LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR
+0x21b9 "\\tabwin"                  "menukeys" "force" "" "" # LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR
 0x21ba ""                         "" "force=utf8;utf8x" "\\circlearrowleft" "amssymb" # ANTICLOCKWISE OPEN CIRCLE ARROW
 0x21bb ""                         "" "force=utf8;utf8x" "\\circlearrowright" "amssymb" # CLOCKWISE OPEN CIRCLE ARROW
 0x21bc ""                         "" "force=utf8" "\\leftharpoonup" "" # LEFTWARDS HARPOON WITH BARB UPWARDS
 0x21db ""                         "" "force=utf8;utf8x" "\\Rrightarrow" "amssymb" # RIGHTWARDS TRIPLE ARROW
 #0x21dc ""                         "" "" "\\leftsquigarrow" "mathabx" # LEFTWARDS SQUIGGLE ARROW
 0x21dd ""                         "" "force=utf8;utf8x" "\\rightsquigarrow" "amssymb" # RIGHTWARDS SQUIGGLE ARROW
-0x21de "Option-Up Arrow"          "" "force=utf8;utf8x,notermination=text" "" "" #Qt::Key_PageUp, UPWARDS ARROW WITH DOUBLE STROKE = page up "\\nHuparrow" "boisik|stik"
-0x21df "Option-Down Arrow"        "" "force=utf8;utf8x,notermination=text" "" "" # Qt::Key_PageDown, DOWNWARDS ARROW WITH DOUBLE STROKE = page down "\\nHdownarrow" "boisik|stix"
+# FIXME Yes, these are constructed, but better than a key symbols text.
+0x21de "\\ooalign{\\textuparrow\\cr\\kern.1em\\textdblhyphen}"  "textcomp" "force=utf8;utf8x" "" "" #Qt::Key_PageUp, UPWARDS ARROW WITH DOUBLE STROKE = page up "\\nHuparrow" "boisik|stix"
+0x21df "\\ooalign{\\textdownarrow\\cr\\kern.1em\\textdblhyphen}" "textcomp" "force=utf8;utf8x,notermination=text" "" "" # Qt::Key_PageDown, DOWNWARDS ARROW WITH DOUBLE STROKE = page down "\\nHdownarrow" "boisik|stix"
 0x21e0 ""                         "" "force=utf8;utf8x" "\\dashleftarrow" "amssymb" # LEFTWARDS DASHED ARROW
 #0x21e1 ""                         "" "" "" "" # UPWARDS DASHED ARROW
 0x21e2 ""                         "" "force=utf8;utf8x" "\\dashrightarrow" "amssymb" # RIGHTWARDS DASHED ARROW
 #0x21e3 ""                         "" "" "" "" # DOWNWARDS DASHED ARROW
-0x21e4 "Shift-Tab"                "" "force=utf8;utf8x,notermination=text" "" "" # Qt::Key_Backtab, LEFTWARDS ARROW TO BAR = leftward tab "\\barleftarrow" "boisik|stix"
-0x21e5 "Tab"                      "" "force=utf8;utf8x,notermination=text" "" "" # Qt::Key_Tab, RIGHTWARDS ARROW TO BAR = rightward tab "\\rightarrowbar" "boisik|stix"
+0x21e4 "\\reflectbox{\\tabmac}"   "menukeys,graphics" "force" "" "" # Qt::Key_Backtab, LEFTWARDS ARROW TO BAR = leftward tab "\\barleftarrow" "boisik|stix"
+0x21e5 "\\tabmac"                 "menukeys" "force" "" "" # Qt::Key_Tab, RIGHTWARDS ARROW TO BAR = rightward tab "\\rightarrowbar" "boisik|stix"
 #0x21e6 ""                         "" "" "" "" # LEFTWARDS WHITE ARROW
-#0x21e7 ""                         "" "" "" "" # UPWARDS WHITE ARROW
+0x21e7 "\\shift"                  "menukeys" "force" "" "" # UPWARDS WHITE ARROW
 0x21e8 "\\pointer"                "wasysym" "force=utf8;utf8x" "" "" # RIGHTWARDS WHITE ARROW
 #0x21e9 ""                         "" "" "" "" # DOWNWARDS WHITE ARROW
-0x21ea "Caps Lock"                "" "force=utf8;utf8x,notermination=text" "" "" # Qt::Key_CapsLock, UPWARDS WHITE ARROW FROM BAR = caps lock "\\whitearrowupfrombar" "boisik|stix"
+0x21ea "\\capslockmac"             "menukeys" "force" "" "" # Qt::Key_CapsLock, UPWARDS WHITE ARROW FROM BAR = caps lock "\\whitearrowupfrombar" "boisik|stix"
 #0x21eb ""                         "" "" "" "" # UPWARDS WHITE ARROW ON PEDESTAL
 #0x21ec ""                         "" "" "" "" # UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR
 #0x21ed ""                         "" "" "" "" # UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR
 0x2315 "\\recorder"               "wasysym" "force" "" "" # TELEPHONE RECORDER
 #0x2316 ""                         "" "" "" "" # POSITION INDICATOR
 #0x2317 ""                         "" "" "" "" # VIEWDATA SQUARE
-#0x2318 ""                         "" "" "" "" # PLACE OF INTEREST SIGN
+0x2318 "\\cmdmac"                 "menukeys" "force" "" "" # PLACE OF INTEREST SIGN
 #0x2319 ""                         "" "" "" "" # TURNED NOT SIGN
 0x231a "\\Clocklogo"              "marvosym" "force" # WATCH
 #0x231b ""                         "" "" "" "" # HOURGLASS
 #0x2321 ""                         "" "" "" "" # BOTTOM HALF INTEGRAL
 0x2322 ""                         "" "force" "\\frown" "" # FROWN
 0x2323 ""                         "" "force" "\\smile" "" # SMILE
-#0x2324 ""                         "" "" "" "" # UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS
-#0x2325 ""                         "" "" "" "" # OPTION KEY
-0x2326 "Delete"                   "" "force,notermination=text" "" "" # Qt::Key_Delete, ERASE TO THE RIGHT = delete to the right key
+0x2324 "\\enter"                  "menukeys" "force" "" "" # UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS
+0x2325 "\\Altmac"                 "menukeys" "force" "" "" # OPTION KEY
+0x2326 "\\delmac"                 "menukeys" "force" "" "" # Qt::Key_Delete, ERASE TO THE RIGHT = delete to the right key
 0x2328 "\\Keyboard"               "marvosym" "force" # KEYBOARD
-0x232b "Backspace"                "" "force,notermination=text" "" "" # Qt::Key_Backspace, ERASE TO THE LEFT = delete to the left key
+0x232b "\\backdelmac"             "menukeys" "force" "" "" # Qt::Key_Backspace, ERASE TO THE LEFT = delete to the left key
 0x2339 ""                         "" "force" "\\APLinv" "wasysym" # APL FUNCTIONAL SYMBOL QUAD DIVIDE
 0x233f ""                         "" "force" "\\notslash" "wasysym" # APL FUNCTIONAL SYMBOL SLASH BAR
 0x2340 ""                         "" "force" "\\notbackslash" "wasysym" # APL FUNCTIONAL SYMBOL BACKSLASH BAR
-0x238b "Escape"                   "" "force,notermination=text" "" "" # Qt::Key_Escape, BROKEN CIRCLE WITH NORTHWEST ARROW = escape
+0x238b "\\escmac"                 "menukeys" "force" "" "" # Qt::Key_Escape, BROKEN CIRCLE WITH NORTHWEST ARROW = escape
 #
 # 79 Control Pictures
 #
index 5f57c6aa332472ac6c505a78aa79629d0019c29f..da35db18473666fd2e2e3a6944cec4cc7e17b0b8 100644 (file)
@@ -2247,8 +2247,8 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
                   << "\\makeatother\n\n";
 
        // We try to load babel late, in case it interferes with other packages.
-       // Jurabib, hyperref, varioref, bicaption and listings (bug 8995) have to be
-       // called after babel, though.
+       // Jurabib, hyperref, varioref, bicaption, menukeys and listings (bug 8995)
+       // have to be called after babel, though.
        if (use_babel && !features.isRequired("jurabib")
            && !features.isRequired("hyperref")
            && !features.isRequired("varioref")
@@ -2385,6 +2385,11 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
                os << '\n';
        }
 
+       // Since menukeys uses catoptions, which does some heavy changes on key-value options,
+       // it is recommended to load menukeys as the last package (even after hyperref)
+       if (features.isRequired("menukeys"))
+               os << "\\usepackage{menukeys}\n";
+
        docstring const i18npreamble =
                features.getTClassI18nPreamble(use_babel, use_polyglossia,
                                               use_minted);
index c90ed2ee4f49fdb0bd9b80bd30560c24b9373465..5c50882aee5d238a0517ba664c3afd3032d19538 100644 (file)
@@ -23,6 +23,8 @@ What's new
 
 - Update support for linguistic subexamples.
 
+- Support key symbols via menukeys package (part of bug 10641).
+
 
 * MISCELLANEOUS