"%% Strike out display math with tikz\n"
"\\usepackage{tikz}\n"
"\\usetikzlibrary{calc}\n"
- "\\newcommand{\\lyxmathsout}[1]{\n"
+ "\\newcommand{\\lyxmathsout}[1]{%\n"
" \\tikz[baseline=(math.base)]{\n"
" \\node[inner sep=0pt,outer sep=0pt](math){#1};\n"
" \\draw($(math.south west)+(2em,.5em)$)--($(math.north east)-(2em,.5em)$);\n"
"\\DeclareTextCompositeCommand{\\c}{T1}{r}{\\textcommabelow{r}}\n"
"\\DeclareTextCompositeCommand{\\c}{T1}{R}{\\textcommabelow{R}}\n");
+// split-level fractions
+static docstring const xfrac_def = from_ascii(
+ "\\usepackage{xfrac}\n");
+static docstring const smallLetterFrac_def = from_ascii(
+ "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{default}{text}\n"
+ " {phantom=c, scale-factor=1.0, slash-left-kern=-.05em}\n"
+ "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{lmr}{text}\n"
+ " {slash-symbol-font=ptm, phantom=c, scale-factor=1, slash-left-kern=-.05em}\n"
+ "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{lmss}{text}\n"
+ " {slash-symbol-font=ptm, phantom=c, scale-factor=1, slash-left-kern=-.05em}\n"
+ "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{cmr}{text}\n"
+ " {slash-symbol-font=ptm, phantom=c, scale-factor=1, slash-left-kern=-.05em}\n"
+ "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{cmss}{text}\n"
+ " {slash-symbol-font=ptm, phantom=c, scale-factor=1, slash-left-kern=-.05em}\n"
+ "\\newcommand{\\smallLetterFrac}[2]{%\n"
+ " {\\UseCollection{xfrac}{smallLetterFrac}\\sfrac{#1}{#2}}}\n");
+
static docstring const lyxref_def = from_ascii(
"\\RS@ifundefined{subsecref}\n"
" {\\newref{subsec}{name = \\RSsectxt}}\n"
}
+vector<string> LaTeXFeatures::getPolyglossiaExclusiveLanguages() const
+{
+ vector<string> result;
+ // first the main language
+ if (params_.language->isPolyglossiaExclusive())
+ result.push_back(params_.language->display());
+ // now the secondary languages
+ LanguageList::const_iterator const begin = UsedLanguages_.begin();
+ for (LanguageList::const_iterator cit = begin;
+ cit != UsedLanguages_.end();
+ ++cit) {
+ if ((*cit)->isPolyglossiaExclusive())
+ result.push_back((*cit)->display());
+ }
+ return result;
+}
+
+
+vector<string> LaTeXFeatures::getBabelExclusiveLanguages() const
+{
+ vector<string> result;
+ // first the main language
+ if (params_.language->isBabelExclusive())
+ result.push_back(params_.language->display());
+ // now the secondary languages
+ LanguageList::const_iterator const begin = UsedLanguages_.begin();
+ for (LanguageList::const_iterator cit = begin;
+ cit != UsedLanguages_.end();
+ ++cit) {
+ if ((*cit)->isBabelExclusive())
+ result.push_back((*cit)->display());
+ }
+ return result;
+}
+
+
string LaTeXFeatures::getBabelLanguages() const
{
ostringstream languages;
}
-std::map<std::string, std::string> LaTeXFeatures::getPolyglossiaLanguages() const
+set<string> LaTeXFeatures::getPolyglossiaLanguages() const
{
- std::map<std::string, std::string> languages;
+ set<string> languages;
LanguageList::const_iterator const begin = UsedLanguages_.begin();
for (LanguageList::const_iterator cit = begin;
cit != UsedLanguages_.end();
++cit) {
- languages[(*cit)->polyglossia()] = (*cit)->polyglossiaOpts();
+ // We do not need the variants here
+ languages.insert((*cit)->polyglossia());
}
return languages;
}
"fixme",
"todonotes",
"forest",
- "varwidth"
+ "varwidth",
};
char const * bibliofeatures[] = {
macros << lyxarrow_def << '\n';
if (!usePolyglossia() && mustProvide("textgreek")) {
- // ensure LGR font encoding is defined also if fontenc is not loaded by LyX
+ // ensure LGR font encoding is defined also if fontenc is not loaded by LyX
if (params_.font_encoding() == "default")
macros << textgreek_LGR_def;
macros << textgreek_def << '\n';
macros << textcyr_def << '\n';
}
- // non-standard text accents:
+ // non-standard text accents:
if (mustProvide("textcommaabove") || mustProvide("textcommaaboveright") ||
mustProvide("textcommabelow") || mustProvide("textbaltic"))
macros << lyxaccent_def;
if (mustProvide("textbaltic"))
macros << textbaltic_def << '\n';
+ // split-level fractions
+ if (mustProvide("xfrac") || mustProvide("smallLetterFrac"))
+ macros << xfrac_def << '\n';
+
+ if (mustProvide("smallLetterFrac"))
+ macros << smallLetterFrac_def << '\n';
+
if (mustProvide("lyxmathsym"))
macros << lyxmathsym_def << '\n';