mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Support the mathbbm font.
Should just be able to read formulae, not add it from the GUI, as it's mostly redundant with mathds and mathbb.
This commit is contained in:
parent
8dd2e7e681
commit
e709a6626e
6448
lib/fonts/bbm.sfd
Normal file
6448
lib/fonts/bbm.sfd
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/fonts/bbm.ttf
Normal file
BIN
lib/fonts/bbm.ttf
Normal file
Binary file not shown.
@ -119,6 +119,7 @@ mathnormal font mathmode inherit medium up math
|
|||||||
frak font mathmode
|
frak font mathmode
|
||||||
mathbb font mathmode
|
mathbb font mathmode
|
||||||
mathds font mathmode
|
mathds font mathmode
|
||||||
|
mathbbm font mathmode
|
||||||
mathbf font mathmode
|
mathbf font mathmode
|
||||||
mathcal font mathmode
|
mathcal font mathmode
|
||||||
mathfrak font mathmode
|
mathfrak font mathmode
|
||||||
|
@ -47,6 +47,8 @@ enum FontFamily {
|
|||||||
///
|
///
|
||||||
DS_FAMILY,
|
DS_FAMILY,
|
||||||
///
|
///
|
||||||
|
BBM_FAMILY,
|
||||||
|
///
|
||||||
EUFRAK_FAMILY,
|
EUFRAK_FAMILY,
|
||||||
///
|
///
|
||||||
RSFS_FAMILY,
|
RSFS_FAMILY,
|
||||||
|
@ -494,6 +494,7 @@ string getFamilyCSS(FontFamily const & f)
|
|||||||
case MSA_FAMILY:
|
case MSA_FAMILY:
|
||||||
case MSB_FAMILY:
|
case MSB_FAMILY:
|
||||||
case DS_FAMILY:
|
case DS_FAMILY:
|
||||||
|
case BBM_FAMILY:
|
||||||
case EUFRAK_FAMILY:
|
case EUFRAK_FAMILY:
|
||||||
case RSFS_FAMILY:
|
case RSFS_FAMILY:
|
||||||
case STMARY_FAMILY:
|
case STMARY_FAMILY:
|
||||||
|
@ -1159,7 +1159,8 @@ char const * simplefeatures[] = {
|
|||||||
"pict2e",
|
"pict2e",
|
||||||
"drs",
|
"drs",
|
||||||
"environ",
|
"environ",
|
||||||
"dsfont"
|
"dsfont",
|
||||||
|
"bbm"
|
||||||
};
|
};
|
||||||
|
|
||||||
char const * bibliofeatures[] = {
|
char const * bibliofeatures[] = {
|
||||||
|
@ -36,8 +36,8 @@ using namespace std;
|
|||||||
using namespace lyx::support;
|
using namespace lyx::support;
|
||||||
|
|
||||||
QString const math_fonts[] = {"cmex10", "cmmi10", "cmr10", "cmsy10",
|
QString const math_fonts[] = {"cmex10", "cmmi10", "cmr10", "cmsy10",
|
||||||
"dsrom10", "esint10", "eufm10", "msam10", "msbm10", "rsfs10",
|
"dsrom10", "bbm10", "esint10", "eufm10", "msam10", "msbm10",
|
||||||
"stmary10", "wasy10"};
|
"rsfs10", "stmary10", "wasy10"};
|
||||||
int const num_math_fonts = sizeof(math_fonts) / sizeof(*math_fonts);
|
int const num_math_fonts = sizeof(math_fonts) / sizeof(*math_fonts);
|
||||||
|
|
||||||
namespace lyx {
|
namespace lyx {
|
||||||
|
@ -136,6 +136,8 @@ void InsetMathFont::validate(LaTeXFeatures & features) const
|
|||||||
features.require("mhchem");
|
features.require("mhchem");
|
||||||
if (fontname == "mathds")
|
if (fontname == "mathds")
|
||||||
features.require("dsfont");
|
features.require("dsfont");
|
||||||
|
if (fontname == "mathbbm")
|
||||||
|
features.require("bbm");
|
||||||
} else if (features.runparams().math_flavor == OutputParams::MathAsHTML) {
|
} else if (features.runparams().math_flavor == OutputParams::MathAsHTML) {
|
||||||
features.addCSSSnippet(
|
features.addCSSSnippet(
|
||||||
"span.normal{font: normal normal normal inherit serif;}\n"
|
"span.normal{font: normal normal normal inherit serif;}\n"
|
||||||
|
@ -785,6 +785,8 @@ fontinfo fontinfos[] = {
|
|||||||
inh_shape, Color_math},
|
inh_shape, Color_math},
|
||||||
{"mathds", DS_FAMILY, inh_series,
|
{"mathds", DS_FAMILY, inh_series,
|
||||||
inh_shape, Color_math},
|
inh_shape, Color_math},
|
||||||
|
{"mathbbm", BBM_FAMILY, inh_series,
|
||||||
|
inh_shape, Color_math},
|
||||||
{"mathtt", TYPEWRITER_FAMILY, inh_series,
|
{"mathtt", TYPEWRITER_FAMILY, inh_series,
|
||||||
inh_shape, Color_math},
|
inh_shape, Color_math},
|
||||||
{"mathit", inh_family, inh_series,
|
{"mathit", inh_family, inh_series,
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include <stack>
|
#include <stack>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace lyx::support;
|
using namespace lyx::support;
|
||||||
@ -862,17 +863,25 @@ void outputDocBookInfo(
|
|||||||
generateDocBookParagraphWithoutSectioning(text, buf, xs, runparams, paragraphs, bpitInfo, epitInfo);
|
generateDocBookParagraphWithoutSectioning(text, buf, xs, runparams, paragraphs, bpitInfo, epitInfo);
|
||||||
|
|
||||||
if (hasAbstract) {
|
if (hasAbstract) {
|
||||||
string tag = paragraphs[bpitAbstract].layout().docbookforceabstracttag();
|
// Sometimes, there are many paragraphs that should go into the abstract, but none generates actual content.
|
||||||
if (tag == "NONE")
|
// Thus, first generate to a temporary stream, then only create the <abstract> tag if these paragraphs
|
||||||
tag = "abstract";
|
// generate some content.
|
||||||
|
odocstringstream os2;
|
||||||
|
XMLStream xs2(os2);
|
||||||
|
generateDocBookParagraphWithoutSectioning(text, buf, xs2, runparams, paragraphs, bpitAbstract, epitAbstract);
|
||||||
|
|
||||||
xs << xml::StartTag(tag);
|
// Actually output the abstract if there is something to do.
|
||||||
xs << xml::CR();
|
if (!os2.str().empty()) {
|
||||||
xs.startDivision(false);
|
string tag = paragraphs[bpitAbstract].layout().docbookforceabstracttag();
|
||||||
generateDocBookParagraphWithoutSectioning(text, buf, xs, runparams, paragraphs, bpitAbstract, epitAbstract);
|
if (tag == "NONE")
|
||||||
xs.endDivision();
|
tag = "abstract";
|
||||||
xs << xml::EndTag(tag);
|
|
||||||
xs << xml::CR();
|
xs << xml::StartTag(tag);
|
||||||
|
xs << xml::CR();
|
||||||
|
xs << XMLStream::ESCAPE_NONE << os2.str();
|
||||||
|
xs << xml::EndTag(tag);
|
||||||
|
xs << xml::CR();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// End the <info> tag if it was started.
|
// End the <info> tag if it was started.
|
||||||
|
Loading…
Reference in New Issue
Block a user