mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
- fix requirements of \dddot
- add support for \ddddot - add partial support for inverse diagonal dots (i. e. they are recognized and displayed correctly, but the needed package is not loaded, because it would need an off/auto/on setting as amsmath, and that calls for a general solution) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30162 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
dae70977a0
commit
9c662bf442
@ -1542,6 +1542,7 @@ lib_images_math_files = Split('''
|
||||
Rsh.png
|
||||
Vvdash.png
|
||||
acute.png
|
||||
adots.png
|
||||
aleph.png
|
||||
alpha.png
|
||||
amalg.png
|
||||
@ -1624,6 +1625,8 @@ lib_images_math_files = Split('''
|
||||
dashrightarrow.png
|
||||
dashv.png
|
||||
ddagger.png
|
||||
ddddot.png
|
||||
dddot.png
|
||||
ddot.png
|
||||
ddots.png
|
||||
delim.png
|
||||
@ -1698,6 +1701,7 @@ lib_images_math_files = Split('''
|
||||
hookrightarrow.png
|
||||
hphantom.png
|
||||
hslash.png
|
||||
iddots.png
|
||||
iiiint.png
|
||||
iiiintop.png
|
||||
iiint.png
|
||||
|
@ -450,6 +450,7 @@ dist_imagesmath_DATA = \
|
||||
images/math/Rsh.png \
|
||||
images/math/Vvdash.png \
|
||||
images/math/acute.png \
|
||||
images/math/adots.png \
|
||||
images/math/aleph.png \
|
||||
images/math/alpha.png \
|
||||
images/math/amalg.png \
|
||||
@ -532,6 +533,8 @@ dist_imagesmath_DATA = \
|
||||
images/math/dashrightarrow.png \
|
||||
images/math/dashv.png \
|
||||
images/math/ddagger.png \
|
||||
images/math/ddddot.png \
|
||||
images/math/dddot.png \
|
||||
images/math/ddot.png \
|
||||
images/math/ddots.png \
|
||||
images/math/delta.png \
|
||||
@ -603,6 +606,7 @@ dist_imagesmath_DATA = \
|
||||
images/math/hookrightarrow.png \
|
||||
images/math/hphantom.png \
|
||||
images/math/hslash.png \
|
||||
images/math/iddots.png \
|
||||
images/math/iiiint.png \
|
||||
images/math/iiiintop.png \
|
||||
images/math/iiint.png \
|
||||
|
@ -216,6 +216,7 @@
|
||||
\cdots * \hdots
|
||||
\hdots * \vdots
|
||||
\ddots * \ddots
|
||||
\iddots * \iddots
|
||||
\udots * \udots
|
||||
: = \assign
|
||||
+ = \plusassign
|
||||
|
@ -256,6 +256,7 @@
|
||||
\TestPackage{latex8}
|
||||
\TestPackage{listings}
|
||||
\TestPackage{longtable}
|
||||
\TestPackage{mathdots}
|
||||
\TestPackage{natbib}
|
||||
\TestPackage{nicefrac}
|
||||
\TestPackage{nomencl}
|
||||
|
BIN
lib/images/math/adots.png
Normal file
BIN
lib/images/math/adots.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 160 B |
BIN
lib/images/math/ddddot.png
Normal file
BIN
lib/images/math/ddddot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 174 B |
BIN
lib/images/math/dddot.png
Normal file
BIN
lib/images/math/dddot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 174 B |
BIN
lib/images/math/iddots.png
Normal file
BIN
lib/images/math/iddots.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 160 B |
20
lib/symbols
20
lib/symbols
@ -7,7 +7,8 @@ acute decoration none
|
||||
bar decoration none
|
||||
breve decoration none
|
||||
check decoration none
|
||||
dddot decoration none
|
||||
ddddot decoration none amsmath
|
||||
dddot decoration none amsmath
|
||||
ddot decoration none
|
||||
dot decoration none
|
||||
grave decoration none
|
||||
@ -15,22 +16,26 @@ hat decoration none
|
||||
mathring decoration none
|
||||
overbrace decoration none
|
||||
overleftarrow decoration none
|
||||
overleftrightarrow decoration none
|
||||
overleftrightarrow decoration none amsmath
|
||||
overline decoration none
|
||||
overrightarrow decoration none
|
||||
tilde decoration none
|
||||
underbar decoration none
|
||||
underbrace decoration none
|
||||
underleftarrow decoration none
|
||||
underleftrightarrow decoration none
|
||||
underleftarrow decoration none amsmath
|
||||
underleftrightarrow decoration none amsmath
|
||||
underline decoration none
|
||||
underrightarrow decoration none
|
||||
underrightarrow decoration none amsmath
|
||||
vec decoration none
|
||||
widehat decoration none
|
||||
widetilde decoration none
|
||||
|
||||
# dots
|
||||
dots dots none
|
||||
#Do not load automatically, it redefines some other symbols, and we don't
|
||||
#have a possibility to turn automatic loading off like for ams
|
||||
#adots dots none yhmath
|
||||
adots dots none
|
||||
cdots dots none
|
||||
ddots dots none
|
||||
dotsb dots none amsmath
|
||||
@ -38,6 +43,10 @@ dotsc dots none amsmath
|
||||
dotsi dots none amsmath
|
||||
dotsm dots none amsmath
|
||||
dotso dots none amsmath
|
||||
#Do not load automatically, since we don't have a possibility to turn
|
||||
#automatic loading off like for ams
|
||||
#iddots dots none mathdots
|
||||
iddots dots none
|
||||
ldots dots none
|
||||
vdots dots none
|
||||
|
||||
@ -872,6 +881,7 @@ Pr lyxblacktext 0 0 funclim x
|
||||
gcd lyxblacktext 0 0 funclim x
|
||||
deg lyxblacktext 0 0 func x
|
||||
bmod lyxblacktext 0 0 func x
|
||||
pmod lyxblacktext 0 0 func x
|
||||
|
||||
|
||||
|
||||
|
@ -360,6 +360,8 @@ ToolbarSet
|
||||
Item "cdots" "math-insert \cdots"
|
||||
Item "vdots" "math-insert \vdots"
|
||||
Item "ddots" "math-insert \ddots"
|
||||
# Do not show it as long as it does not load mathdots automatically
|
||||
# Item "iddots" "math-insert \iddots"
|
||||
End
|
||||
|
||||
Toolbar "latex_deco" "Frame Decorations"
|
||||
@ -374,6 +376,8 @@ ToolbarSet
|
||||
Item "vec" "math-insert \vec"
|
||||
Item "acute" "math-insert \acute"
|
||||
Item "ddot" "math-insert \ddot"
|
||||
Item "dddot" "math-insert \dddot"
|
||||
Item "ddddot" "math-insert \ddddot"
|
||||
Item "breve" "math-insert \breve"
|
||||
Item "overline" "math-insert \overline"
|
||||
Item "overbrace" "math-insert \overbrace"
|
||||
|
@ -649,6 +649,14 @@ string const LaTeXFeatures::getPackages() const
|
||||
if (mustProvide("accents"))
|
||||
packages << "\\usepackage{accents}\n";
|
||||
|
||||
// mathdots must be loaded after amsmath
|
||||
if (mustProvide("mathdots"))
|
||||
packages << "\\usepackage{mathdots}\n";
|
||||
|
||||
// yhmath must be loaded after amsmath
|
||||
if (mustProvide("yhmath"))
|
||||
packages << "\\usepackage{yhmath}\n";
|
||||
|
||||
// [x]color and pdfcolmk are handled in getColorOptions() above
|
||||
|
||||
// makeidx.sty
|
||||
|
@ -94,16 +94,6 @@ bool InsetMathDecoration::wide() const
|
||||
}
|
||||
|
||||
|
||||
bool InsetMathDecoration::ams() const
|
||||
{
|
||||
return
|
||||
key_->name == "overleftrightarrow" ||
|
||||
key_->name == "underleftarrow" ||
|
||||
key_->name == "underrightarrow" ||
|
||||
key_->name == "underleftrightarrow";
|
||||
}
|
||||
|
||||
|
||||
void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
cell(0).metrics(mi, dim);
|
||||
@ -160,8 +150,8 @@ void InsetMathDecoration::infoize(odocstream & os) const
|
||||
|
||||
void InsetMathDecoration::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
if (ams())
|
||||
features.require("amsmath");
|
||||
if (!key_->requires.empty())
|
||||
features.require(to_utf8(key_->requires));
|
||||
InsetMathNest::validate(features);
|
||||
}
|
||||
|
||||
|
@ -48,8 +48,6 @@ private:
|
||||
bool protect() const;
|
||||
/// is it a wide decoration?
|
||||
bool wide() const;
|
||||
/// does this need AMS
|
||||
bool ams() const;
|
||||
|
||||
///
|
||||
latexkeys const * key_;
|
||||
|
@ -48,7 +48,7 @@ void InsetMathDots::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
dim.wid = (dim.wid / 2) + 1;
|
||||
dh_ = dim.asc;
|
||||
}
|
||||
else if (key_->name == "ddots")
|
||||
else if (key_->name == "ddots" || key_->name == "adots" || key_->name == "iddots")
|
||||
dh_ = dim.asc;
|
||||
}
|
||||
|
||||
@ -56,11 +56,15 @@ void InsetMathDots::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
void InsetMathDots::draw(PainterInfo & pain, int x, int y) const
|
||||
{
|
||||
Dimension const dim = dimension(*pain.base.bv);
|
||||
if (key_->name == "adots" || key_->name == "iddots")
|
||||
--y;
|
||||
mathed_draw_deco(pain, x + 2, y - dh_, dim.width() - 2, dim.ascent(),
|
||||
key_->name);
|
||||
if (key_->name == "vdots" || key_->name == "ddots")
|
||||
if (key_->name == "vdots" || key_->name == "ddots" || key_->name == "adots" || key_->name == "iddots")
|
||||
++x;
|
||||
if (key_->name != "vdots")
|
||||
if (key_->name == "adots" || key_->name == "iddots")
|
||||
++y;
|
||||
else if (key_->name != "vdots")
|
||||
--y;
|
||||
mathed_draw_deco(pain, x + 2, y - dh_, dim.width() - 2, dim.ascent(),
|
||||
key_->name);
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "support/docstream.h"
|
||||
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -202,6 +201,15 @@ double const dddot[] = {
|
||||
};
|
||||
|
||||
|
||||
double const ddddot[] = {
|
||||
1, 0.0, 0.5, 0.1, 0.5,
|
||||
1, 0.3, 0.5, 0.4, 0.5,
|
||||
1, 0.6, 0.5, 0.7, 0.5,
|
||||
1, 0.9, 0.5, 1.0, 0.5,
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
double const hline3[] = {
|
||||
1, 0.1, 0, 0.15, 0,
|
||||
1, 0.475, 0, 0.525, 0,
|
||||
@ -313,6 +321,7 @@ named_deco_struct deco_table[] = {
|
||||
// Accents
|
||||
{"ddot", ddot, 0 },
|
||||
{"dddot", dddot, 0 },
|
||||
{"ddddot", ddddot, 0 },
|
||||
{"hat", angle, 3 },
|
||||
{"grave", slash, 1 },
|
||||
{"acute", slash, 0 },
|
||||
@ -330,6 +339,8 @@ named_deco_struct deco_table[] = {
|
||||
{"cdots", hline3, 0 },
|
||||
{"vdots", hline3, 1 },
|
||||
{"ddots", dline3, 0 },
|
||||
{"adots", dline3, 1 },
|
||||
{"iddots", dline3, 1 },
|
||||
{"dotsb", hline3, 0 },
|
||||
{"dotsc", hline3, 0 },
|
||||
{"dotsi", hline3, 0 },
|
||||
|
Loading…
Reference in New Issue
Block a user