mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +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
|
||||
mathbb font mathmode
|
||||
mathds font mathmode
|
||||
mathbbm font mathmode
|
||||
mathbf font mathmode
|
||||
mathcal font mathmode
|
||||
mathfrak font mathmode
|
||||
|
@ -47,6 +47,8 @@ enum FontFamily {
|
||||
///
|
||||
DS_FAMILY,
|
||||
///
|
||||
BBM_FAMILY,
|
||||
///
|
||||
EUFRAK_FAMILY,
|
||||
///
|
||||
RSFS_FAMILY,
|
||||
|
@ -494,6 +494,7 @@ string getFamilyCSS(FontFamily const & f)
|
||||
case MSA_FAMILY:
|
||||
case MSB_FAMILY:
|
||||
case DS_FAMILY:
|
||||
case BBM_FAMILY:
|
||||
case EUFRAK_FAMILY:
|
||||
case RSFS_FAMILY:
|
||||
case STMARY_FAMILY:
|
||||
|
@ -1159,7 +1159,8 @@ char const * simplefeatures[] = {
|
||||
"pict2e",
|
||||
"drs",
|
||||
"environ",
|
||||
"dsfont"
|
||||
"dsfont",
|
||||
"bbm"
|
||||
};
|
||||
|
||||
char const * bibliofeatures[] = {
|
||||
|
@ -36,8 +36,8 @@ using namespace std;
|
||||
using namespace lyx::support;
|
||||
|
||||
QString const math_fonts[] = {"cmex10", "cmmi10", "cmr10", "cmsy10",
|
||||
"dsrom10", "esint10", "eufm10", "msam10", "msbm10", "rsfs10",
|
||||
"stmary10", "wasy10"};
|
||||
"dsrom10", "bbm10", "esint10", "eufm10", "msam10", "msbm10",
|
||||
"rsfs10", "stmary10", "wasy10"};
|
||||
int const num_math_fonts = sizeof(math_fonts) / sizeof(*math_fonts);
|
||||
|
||||
namespace lyx {
|
||||
|
@ -136,6 +136,8 @@ void InsetMathFont::validate(LaTeXFeatures & features) const
|
||||
features.require("mhchem");
|
||||
if (fontname == "mathds")
|
||||
features.require("dsfont");
|
||||
if (fontname == "mathbbm")
|
||||
features.require("bbm");
|
||||
} else if (features.runparams().math_flavor == OutputParams::MathAsHTML) {
|
||||
features.addCSSSnippet(
|
||||
"span.normal{font: normal normal normal inherit serif;}\n"
|
||||
|
@ -785,6 +785,8 @@ fontinfo fontinfos[] = {
|
||||
inh_shape, Color_math},
|
||||
{"mathds", DS_FAMILY, inh_series,
|
||||
inh_shape, Color_math},
|
||||
{"mathbbm", BBM_FAMILY, inh_series,
|
||||
inh_shape, Color_math},
|
||||
{"mathtt", TYPEWRITER_FAMILY, inh_series,
|
||||
inh_shape, Color_math},
|
||||
{"mathit", inh_family, inh_series,
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <stack>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
|
||||
using namespace std;
|
||||
using namespace lyx::support;
|
||||
@ -862,17 +863,25 @@ void outputDocBookInfo(
|
||||
generateDocBookParagraphWithoutSectioning(text, buf, xs, runparams, paragraphs, bpitInfo, epitInfo);
|
||||
|
||||
if (hasAbstract) {
|
||||
string tag = paragraphs[bpitAbstract].layout().docbookforceabstracttag();
|
||||
if (tag == "NONE")
|
||||
tag = "abstract";
|
||||
// Sometimes, there are many paragraphs that should go into the abstract, but none generates actual content.
|
||||
// Thus, first generate to a temporary stream, then only create the <abstract> tag if these paragraphs
|
||||
// generate some content.
|
||||
odocstringstream os2;
|
||||
XMLStream xs2(os2);
|
||||
generateDocBookParagraphWithoutSectioning(text, buf, xs2, runparams, paragraphs, bpitAbstract, epitAbstract);
|
||||
|
||||
xs << xml::StartTag(tag);
|
||||
xs << xml::CR();
|
||||
xs.startDivision(false);
|
||||
generateDocBookParagraphWithoutSectioning(text, buf, xs, runparams, paragraphs, bpitAbstract, epitAbstract);
|
||||
xs.endDivision();
|
||||
xs << xml::EndTag(tag);
|
||||
xs << xml::CR();
|
||||
// Actually output the abstract if there is something to do.
|
||||
if (!os2.str().empty()) {
|
||||
string tag = paragraphs[bpitAbstract].layout().docbookforceabstracttag();
|
||||
if (tag == "NONE")
|
||||
tag = "abstract";
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user