\backslash
bm
\family default
- (aliased to
-\family typewriter
-
-\backslash
-boldsymbol
-\family default
-) which makes its argument bold.
+ which makes its argument bold.
The argument may be any math object from a single symbol to an expression.
If available, ultra bold fonts can be accesed through the
\family typewriter
\family typewriter
\backslash
-boldsymbol
+bm
\family default
command is similar to the
\family sans
-amsmath
+amsmath
+\family typewriter
+
+\backslash
+boldsymbol
\family default
- command with same name, but the
+ command, but the
\family sans
bm
\family default
version is rather more careful in the way it does things.
+ Be aware that this package allocates symbol fonts for bold fonts into the
+ normal math version, such that, when using other packages that allocate
+ many symbol fonts, they can be exhausted.
+ In this case, one can make do with the
+\family typewriter
+
+\backslash
+boldsymbol
+\family default
+ command.
\end_layout
\begin_layout Subsection
"endnotes",
"ifthen",
"amsthm",
- "listings"
+ "listings",
+ "bm"
};
int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
(mustProvide("esintoramsmath") &&
params_.use_esint == BufferParams::package_off)) {
packages << "\\usepackage{amsmath}\n";
+ } else if (mustProvide("amsbsy")) {
+ // amsbsy is already provided by amsmath
+ packages << "\\usepackage{amsbsy}\n";
}
// wasysym is a simple feature, but it must be after amsmath if both
"\\makenomenclature\n";
}
- // bm -- this package interrogates the font allocations to determine
- // which bold fonts are available, so it is best loaded as the last one,
- // and, in any case, after amsmath.
- if (mustProvide("bm"))
- packages << "\\usepackage{bm}\n";
-
return packages.str();
}
void InsetMathBoldSymbol::validate(LaTeXFeatures & features) const
{
InsetMathNest::validate(features);
- features.require("bm");
+ if (kind_ == AMS_BOLD)
+ features.require("amsbsy");
+ else
+ features.require("bm");
}
void InsetMathBoldSymbol::write(WriteStream & os) const
{
switch (kind_) {
- case BOLD:
+ case AMS_BOLD:
os << "\\boldsymbol{" << cell(0) << "}";
break;
- case HEAVY:
- os << "\\heavysymbol{" << cell(0) << "}";
+ case BM_BOLD:
+ os << "\\bm{" << cell(0) << "}";
+ break;
+ case BM_HEAVY:
+ os << "\\hm{" << cell(0) << "}";
break;
}
}
void InsetMathBoldSymbol::infoize(odocstream & os) const
{
switch (kind_) {
- case BOLD:
+ case AMS_BOLD:
os << "Boldsymbol ";
break;
- case HEAVY:
- os << "Heavysymbol ";
+ case BM_BOLD:
+ os << "Boldsymbol (bm)";
+ break;
+ case BM_HEAVY:
+ os << "Heavysymbol (bm)";
break;
}
}
class InsetMathBoldSymbol : public InsetMathNest {
public:
enum Kind {
- BOLD,
- HEAVY
+ AMS_BOLD,
+ BM_BOLD,
+ BM_HEAVY
};
///
- InsetMathBoldSymbol(Kind kind = BOLD);
+ InsetMathBoldSymbol(Kind kind = AMS_BOLD);
///
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
return MathAtom(new InsetMathFrac(InsetMathFrac::ATOP));
if (s == "lefteqn")
return MathAtom(new InsetMathLefteqn);
- if (s == "boldsymbol" || s == "bm")
- return MathAtom(new InsetMathBoldSymbol(InsetMathBoldSymbol::BOLD));
+ if (s == "boldsymbol")
+ return MathAtom(new InsetMathBoldSymbol(InsetMathBoldSymbol::AMS_BOLD));
+ if (s == "bm")
+ return MathAtom(new InsetMathBoldSymbol(InsetMathBoldSymbol::BM_BOLD));
if (s == "heavysymbol" || s == "hm")
- return MathAtom(new InsetMathBoldSymbol(InsetMathBoldSymbol::HEAVY));
+ return MathAtom(new InsetMathBoldSymbol(InsetMathBoldSymbol::BM_HEAVY));
if (s == "color" || s == "normalcolor")
return MathAtom(new InsetMathColor(true));
if (s == "textcolor")