Author: baum
Date: Mon May 9 21:21:46 2011
New Revision: 38675
URL: http://www.lyx.org/trac/changeset/38675
Log:
Partial fox for bug #6622: Display \utilde and \undertilde on screen correctly.
Added:
lyx-devel/branches/BRANCH_2_0_X/lib/images/math/undertilde.png
- copied unchanged from r38645,
lyx-devel/trunk/lib/images/math/undertilde.png
lyx-devel/branches/BRANCH_2_0_X/lib/images/math/utilde.png
- copied unchanged from r38633, lyx-devel/trunk/lib/images/math/utilde.png
Modified:
lyx-devel/branches/BRANCH_2_0_X/ (props changed)
lyx-devel/branches/BRANCH_2_0_X/development/scons/scons_manifest.py
lyx-devel/branches/BRANCH_2_0_X/lib/Makefile.am
lyx-devel/branches/BRANCH_2_0_X/lib/chkconfig.ltx
lyx-devel/branches/BRANCH_2_0_X/lib/doc/LaTeXConfig.lyx
lyx-devel/branches/BRANCH_2_0_X/lib/symbols
lyx-devel/branches/BRANCH_2_0_X/lib/ui/stdtoolbars.inc
lyx-devel/branches/BRANCH_2_0_X/src/LaTeXFeatures.cpp
lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathDecoration.cpp
lyx-devel/branches/BRANCH_2_0_X/src/mathed/MathSupport.cpp
lyx-devel/branches/BRANCH_2_0_X/status.20x
Modified: lyx-devel/branches/BRANCH_2_0_X/development/scons/scons_manifest.py
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/development/scons/scons_manifest.py Mon May
9 21:07:59 2011 (r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/development/scons/scons_manifest.py Mon May
9 21:21:46 2011 (r38675)
@@ -2074,6 +2074,7 @@
underrightarrow.png
underscore.png
underset.png
+ undertilde.png
uparrow.png
uparrow2.png
updownarrow.png
@@ -2085,6 +2086,7 @@
upsilon2.png
upuparrows.png
urcorner.png
+ utilde.png
varepsilon.png
varkappa.png
varnothing.png
Modified: lyx-devel/branches/BRANCH_2_0_X/lib/Makefile.am
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/lib/Makefile.am Mon May 9 21:07:59
2011 (r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/lib/Makefile.am Mon May 9 21:21:46
2011 (r38675)
@@ -936,6 +936,7 @@
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 @@
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 \
Modified: lyx-devel/branches/BRANCH_2_0_X/lib/chkconfig.ltx
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/lib/chkconfig.ltx Mon May 9 21:07:59
2011 (r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/lib/chkconfig.ltx Mon May 9 21:21:46
2011 (r38675)
@@ -309,6 +309,7 @@
\TestPackage{subscript}
\TestPackage[turkmen.ldf]{turkmen}
\TestPackage{ulem}
+\TestPackage{undertilde}
\TestPackage{units}
\TestPackage{url}
\TestPackage{varioref}
Modified: lyx-devel/branches/BRANCH_2_0_X/lib/doc/LaTeXConfig.lyx
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/lib/doc/LaTeXConfig.lyx Mon May 9
21:07:59 2011 (r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/lib/doc/LaTeXConfig.lyx Mon May 9
21:21:46 2011 (r38675)
@@ -5592,6 +5592,41 @@
\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
Copied: lyx-devel/branches/BRANCH_2_0_X/lib/images/math/undertilde.png (from
r38645, lyx-devel/trunk/lib/images/math/undertilde.png)
==============================================================================
Binary file (source and/or target). No diff available.
Copied: lyx-devel/branches/BRANCH_2_0_X/lib/images/math/utilde.png (from
r38633, lyx-devel/trunk/lib/images/math/utilde.png)
==============================================================================
Binary file (source and/or target). No diff available.
Modified: lyx-devel/branches/BRANCH_2_0_X/lib/symbols
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/lib/symbols Mon May 9 21:07:59 2011
(r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/lib/symbols Mon May 9 21:21:46 2011
(r38675)
@@ -26,6 +26,14 @@
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
Modified: lyx-devel/branches/BRANCH_2_0_X/lib/ui/stdtoolbars.inc
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/lib/ui/stdtoolbars.inc Mon May 9
21:07:59 2011 (r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/lib/ui/stdtoolbars.inc Mon May 9
21:21:46 2011 (r38675)
@@ -398,6 +398,8 @@
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"
Modified: lyx-devel/branches/BRANCH_2_0_X/src/LaTeXFeatures.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/LaTeXFeatures.cpp Mon May 9
21:07:59 2011 (r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/src/LaTeXFeatures.cpp Mon May 9
21:21:46 2011 (r38675)
@@ -614,7 +614,8 @@
"amscd",
"slashed",
"multirow",
- "tfrupee"
+ "tfrupee",
+ "undertilde",
};
int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
Modified: lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathDecoration.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathDecoration.cpp Mon May
9 21:07:59 2011 (r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathDecoration.cpp Mon May
9 21:21:46 2011 (r38675)
@@ -47,7 +47,7 @@
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 @@
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 @@
// 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, "∼");
Modified: lyx-devel/branches/BRANCH_2_0_X/src/mathed/MathSupport.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/mathed/MathSupport.cpp Mon May 9
21:07:59 2011 (r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/src/mathed/MathSupport.cpp Mon May 9
21:21:46 2011 (r38675)
@@ -287,6 +287,8 @@
{"underleftarrow", arrow, 1 },
{"underrightarrow", arrow, 3 },
{"underleftrightarrow", udarrow, 1 },
+ {"undertilde", tilde, 0 },
+ {"utilde", tilde, 0 },
// Delimiters
{"(", parenth, 0 },
Modified: lyx-devel/branches/BRANCH_2_0_X/status.20x
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/status.20x Mon May 9 21:07:59 2011
(r38674)
+++ lyx-devel/branches/BRANCH_2_0_X/status.20x Mon May 9 21:21:46 2011
(r38675)
@@ -76,6 +76,8 @@
- 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