From: Georg Baum Date: Mon, 9 May 2011 19:21:46 +0000 (+0000) Subject: Partial fox for bug #6622: Display \utilde and \undertilde on screen correctly. X-Git-Tag: 2.0.1~327 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=16c6442951bede4840f29631903c9e91fb767804;p=features.git Partial fox for bug #6622: Display \utilde and \undertilde on screen correctly. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@38675 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index 4bf7c9acfe..75d781019b 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -2074,6 +2074,7 @@ lib_images_math_files = Split(''' underrightarrow.png underscore.png underset.png + undertilde.png uparrow.png uparrow2.png updownarrow.png @@ -2085,6 +2086,7 @@ lib_images_math_files = Split(''' upsilon2.png upuparrows.png urcorner.png + utilde.png varepsilon.png varkappa.png varnothing.png diff --git a/lib/Makefile.am b/lib/Makefile.am index 2c7aab0d71..7c98949076 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -936,6 +936,7 @@ dist_imagesmath_DATA = \ images/math/underrightarrow.png \ images/math/underscore.png \ images/math/underset.png \ + images/math/undertilde.png \ images/math/uparrow.png \ images/math/uparrow2.png \ images/math/updownarrow.png \ @@ -947,6 +948,7 @@ dist_imagesmath_DATA = \ images/math/upsilon2.png \ images/math/upuparrows.png \ images/math/urcorner.png \ + images/math/utilde.png \ images/math/varepsilon.png \ images/math/varkappa.png \ images/math/varnothing.png \ diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index 95ea1fe2b1..7f5fcef394 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -309,6 +309,7 @@ \TestPackage{subscript} \TestPackage[turkmen.ldf]{turkmen} \TestPackage{ulem} +\TestPackage{undertilde} \TestPackage{units} \TestPackage{url} \TestPackage{varioref} diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx index 3b5059a3e0..c6947ca8b6 100644 --- a/lib/doc/LaTeXConfig.lyx +++ b/lib/doc/LaTeXConfig.lyx @@ -5591,6 +5591,41 @@ ulem to PDF. \end_layout +\begin_layout Subsection +undertilde +\end_layout + +\begin_layout Description +Found: +\begin_inset Info +type "package" +arg "undertilde" +\end_inset + + +\end_layout + +\begin_layout Description +CTAN: +\family typewriter +macros/latex/contrib/undertilde/ +\end_layout + +\begin_layout Description +Notes: The package +\family sans +undertilde +\family default + provides the +\family sans + +\backslash +utilde +\family default + command. + It is needed by LyX to underline symbols with a tilde in formulas. +\end_layout + \begin_layout Subsection units \end_layout diff --git a/lib/images/math/undertilde.png b/lib/images/math/undertilde.png new file mode 100644 index 0000000000..9854880dd5 Binary files /dev/null and b/lib/images/math/undertilde.png differ diff --git a/lib/images/math/utilde.png b/lib/images/math/utilde.png new file mode 100644 index 0000000000..9854880dd5 Binary files /dev/null and b/lib/images/math/utilde.png differ diff --git a/lib/symbols b/lib/symbols index 1dcf0a4191..89373cefd4 100644 --- a/lib/symbols +++ b/lib/symbols @@ -26,6 +26,14 @@ underleftarrow decoration none amsmath underleftrightarrow decoration none amsmath underline decoration none underrightarrow decoration none amsmath +#Do not load automatically, it redefines some other symbols, and we don't +#have a possibility to turn automatic loading off like for ams +#undertilde decoration none accents +undertilde decoration none +#Do not load automatically, since it might conflict with user macros and we +#don't have a possibility to turn automatic loading off like for ams +#utilde decoration none undertilde +utilde decoration none vec decoration none widehat decoration none widetilde decoration none diff --git a/lib/ui/stdtoolbars.inc b/lib/ui/stdtoolbars.inc index 30bc22c16d..3db71ce031 100644 --- a/lib/ui/stdtoolbars.inc +++ b/lib/ui/stdtoolbars.inc @@ -398,6 +398,8 @@ ToolbarSet Item "check" "math-insert \check" Item "widehat" "math-insert \widehat" Item "widetilde" "math-insert \widetilde" +# enable this once the undertilde package is loaded automatically +# Item "utilde" "math-insert \utilde" Item "vec" "math-insert \vec" Item "acute" "math-insert \acute" Item "ddot" "math-insert \ddot" diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 61bd0a7a03..2cfc1ce6e2 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -614,7 +614,8 @@ char const * simplefeatures[] = { "amscd", "slashed", "multirow", - "tfrupee" + "tfrupee", + "undertilde", }; int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *); diff --git a/src/mathed/InsetMathDecoration.cpp b/src/mathed/InsetMathDecoration.cpp index 37fae79911..b5c235f8e7 100644 --- a/src/mathed/InsetMathDecoration.cpp +++ b/src/mathed/InsetMathDecoration.cpp @@ -47,7 +47,7 @@ Inset * InsetMathDecoration::clone() const bool InsetMathDecoration::upper() const { - return key_->name.substr(0, 5) != "under"; + return key_->name.substr(0, 5) != "under" && key_->name != "utilde"; } @@ -93,7 +93,9 @@ bool InsetMathDecoration::wide() const key_->name == "widetilde" || key_->name == "underleftarrow" || key_->name == "underrightarrow" || - key_->name == "underleftrightarrow"; + key_->name == "underleftrightarrow" || + key_->name == "undertilde" || + key_->name == "utilde"; } @@ -204,6 +206,8 @@ namespace { // this is the macron, again, but it works t["underline"] = Attributes(false, "¯"); t["underrightarrow"] = Attributes(false, "⟶"); + t["undertilde"] = Attributes(false, "∼"); + t["utilde"] = Attributes(false, "∼"); t["vec"] = Attributes(true, "→"); t["widehat"] = Attributes(true, "^"); t["widetilde"] = Attributes(true, "∼"); diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 16cfc46b8c..1d7358abb0 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -287,6 +287,8 @@ named_deco_struct deco_table[] = { {"underleftarrow", arrow, 1 }, {"underrightarrow", arrow, 3 }, {"underleftrightarrow", udarrow, 1 }, + {"undertilde", tilde, 0 }, + {"utilde", tilde, 0 }, // Delimiters {"(", parenth, 0 }, diff --git a/status.20x b/status.20x index bc0f624c29..8d782d150a 100644 --- a/status.20x +++ b/status.20x @@ -76,6 +76,8 @@ What's new - Show the correct label after adding a line to an AMS Multline formula (bug #7511). +- Display \utilde and \undertilde in formulas correctly (part of bug #6622). + * DOCUMENTATION AND LOCALIZATION